lichao
2021-04-08 c338820e4db43ad32c20ff429a038b06bcb980f8
utest/simple_tests.cpp
@@ -36,7 +36,7 @@
   BOOST_CHECK(!p);
   BOOST_CHECK(p.get() == 0);
   const char *str = "basic";
   p               = str;
   p = str;
   BOOST_CHECK(p);
   BOOST_CHECK(p.get() == str);
   p = 0;
@@ -49,7 +49,7 @@
      auto Code = [&](int id) {
         typedef ShmObject<s1000> Int;
         std::string name = std::to_string(id);
         auto a0          = Avail();
         auto a0 = Avail();
         Int i1(shm, name);
         auto a1 = Avail();
         BOOST_CHECK_LT(a1, a0);
@@ -64,7 +64,7 @@
         {
            auto old = Avail();
            void *p  = shm.Alloc(1024);
            void *p = shm.Alloc(1024);
            shm.Dealloc(p);
            BOOST_CHECK_EQUAL(old, Avail());
         }
@@ -80,7 +80,7 @@
   // boost::timer::auto_cpu_timer timer;
   ThreadManager threads;
   int nthread = 1;
   int nloop   = 1;
   int nloop = 1;
   for (int i = 0; i < nthread; ++i) {
      threads.Launch(BasicTest, i, nloop);
   }
@@ -114,7 +114,7 @@
      int ms = i * 100;
      printf("Timeout Test %4d: ", ms);
      boost::timer::auto_cpu_timer timer;
      BHMsg msg;
      MsgI msg;
      bool r = q.Recv(msg, ms);
      BOOST_CHECK(!r);
   }