diff options
author | Sree Kuchibhotla <sreek@google.com> | 2016-10-25 14:29:10 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2016-10-25 14:29:10 -0700 |
commit | 14b701c11431d828b01ffb9aa39b7ad47659c904 (patch) | |
tree | 43dd22fb8aa6b859c2dc2908b5fd32347b3ddb8d /test/cpp/thread_manager | |
parent | cb4cd3dc5d160c2070320c74feabb2a7351fa897 (diff) |
Use nullptr instead of NULL. Move test to grpc namespace so that when using gcc4.4, we use nullptr definition in grpc++/impl/codegen/config.h
Diffstat (limited to 'test/cpp/thread_manager')
-rw-r--r-- | test/cpp/thread_manager/thread_manager_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/cpp/thread_manager/thread_manager_test.cc b/test/cpp/thread_manager/thread_manager_test.cc index 50c33f7162..5c70103947 100644 --- a/test/cpp/thread_manager/thread_manager_test.cc +++ b/test/cpp/thread_manager/thread_manager_test.cc @@ -42,6 +42,7 @@ #include "src/cpp/thread_manager/thread_manager.h" #include "test/cpp/util/test_config.h" +namespace grpc { class ThreadManagerTest GRPC_FINAL : public grpc::ThreadManager { public: ThreadManagerTest() @@ -91,7 +92,7 @@ grpc::ThreadManager::WorkStatus ThreadManagerTest::PollForWork(void **tag, // Simulate "polling for work" by sleeping for sometime SleepForMs(kPollingTimeoutMsec); - *tag = NULL; + *tag = nullptr; *ok = true; // Return timeout roughly 1 out of every 3 calls @@ -122,12 +123,13 @@ void ThreadManagerTest::PerformTest() { GPR_ASSERT(gpr_atm_no_barrier_load(&num_do_work_) == gpr_atm_no_barrier_load(&num_work_found_)); } +} // namespace grpc int main(int argc, char **argv) { std::srand(std::time(NULL)); grpc::testing::InitTest(&argc, &argv, true); - ThreadManagerTest test_rpc_manager; + grpc::ThreadManagerTest test_rpc_manager; test_rpc_manager.PerformTest(); return 0; |