From 365c864a587365fe443b11cc0cd7cfc8f8f8eb81 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期二, 01 六月 2021 11:19:22 +0800 Subject: [PATCH] refactor, clean up useless code. --- utest/simple_tests.cpp | 18 ++---------------- 1 files changed, 2 insertions(+), 16 deletions(-) diff --git a/utest/simple_tests.cpp b/utest/simple_tests.cpp index e9131b0..6d3c7a2 100644 --- a/utest/simple_tests.cpp +++ b/utest/simple_tests.cpp @@ -104,21 +104,6 @@ } } -BOOST_AUTO_TEST_CASE(TimedWaitTest) -{ - SharedMemory &shm = TestShm(); - GlobalInit(shm); - ShmMsgQueue q(shm, NewSession(), 64); - for (int i = 0; i < 2; ++i) { - int ms = i * 100; - printf("Timeout Test %4d: ", ms); - boost::timer::auto_cpu_timer timer; - MsgI msg(shm); - bool r = q.Recv(msg, ms); - BOOST_CHECK(!r); - } -} - BOOST_AUTO_TEST_CASE(RefCountTest) { SharedMemory &shm = TestShm(); @@ -126,7 +111,8 @@ GlobalInit(shm); Msg m0(1000, shm); - BOOST_CHECK(m0.valid()); + BOOST_CHECK(!m0.valid()); + m0.Make(100); BOOST_CHECK_EQUAL(m0.Count(), 1); Msg m1 = m0; BOOST_CHECK(m1.valid()); -- Gitblit v1.8.0