From 9c8f60c8399ab80429a71fffc330ae0b059c1a61 Mon Sep 17 00:00:00 2001 From: lyon Date: Sat, 11 Feb 2023 14:58:40 +0800 Subject: [PATCH] add thread --- test/thread-test.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/thread-test.cpp diff --git a/test/thread-test.cpp b/test/thread-test.cpp new file mode 100644 index 000000000..5380f4ef7 --- /dev/null +++ b/test/thread-test.cpp @@ -0,0 +1,21 @@ +#include "test_common.h" +TEST_START +#if !PIKA_NANO_ENABLE && 1 + +TEST(thread, test1) { + pikaMemInfo.heapUsedMax = 0; + PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain); + extern unsigned char pikaModules_py_a[]; + obj_linkLibrary(pikaMain, pikaModules_py_a); + /* run */ + __platform_printf("BEGIN\r\n"); + pikaVM_runSingleFile(pikaMain, "test/python/_thread/test1.py"); + /* clang-format on */ + /* deinit */ + obj_deinit(pikaMain); + + EXPECT_EQ(pikaMemNow(), 0); +} + +#endif +TEST_END