Ver Fonte

[fix] enhance strength about cpp testcase.

liuxianliang há 3 anos atrás
pai
commit
75a55f2028
1 ficheiros alterados com 8 adições e 0 exclusões
  1. 8 0
      examples/utest/testcases/cpp11/thread_tc.cpp

+ 8 - 0
examples/utest/testcases/cpp11/thread_tc.cpp

@@ -31,6 +31,14 @@ static void test_thread(void)
         uassert_false(1);
     }
 
+    std::thread t2(func);
+    t2.join();
+
+    if (count != 200)
+    {
+        uassert_false(1);
+    }
+
     uassert_true(1);
 }