From c633ec01a6e5f5a96aa0f32753f7f58d73517f2f Mon Sep 17 00:00:00 2001 From: Steve Hill Date: Fri, 9 Sep 2016 15:53:47 -0400 Subject: [PATCH] Test WorkBoundExpensiveOperationController treats -1 as unlimited. --- .../work_bound_expensive_operation_controller_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pagespeed/controller/work_bound_expensive_operation_controller_test.cc b/pagespeed/controller/work_bound_expensive_operation_controller_test.cc index 89664266a..b07d7c341 100644 --- a/pagespeed/controller/work_bound_expensive_operation_controller_test.cc +++ b/pagespeed/controller/work_bound_expensive_operation_controller_test.cc @@ -99,6 +99,10 @@ TEST_F(WorkBoundExpensiveOperationTest, LimitZeroIsUnlimited) { EXPECT_TRUE(TryToWork()); } +TEST_F(WorkBoundExpensiveOperationTest, LimitNegativeIsUnlimited) { + InitControllerWithLimit(-1); + EXPECT_TRUE(TryToWork()); +} } // namespace } // namespace net_instaweb