From bce1ab5deb005432f52cb661cc73b893074b3a15 Mon Sep 17 00:00:00 2001 From: lyon Date: Sun, 22 Aug 2021 13:34:48 +0800 Subject: [PATCH] restore sysobj test --- src/test/object-test.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/test/object-test.cpp b/src/test/object-test.cpp index d4a50994f..f8705d9d7 100644 --- a/src/test/object-test.cpp +++ b/src/test/object-test.cpp @@ -161,25 +161,25 @@ TEST(object_test, test6) EXPECT_EQ(pikaMemNow(), 0); } -// TEST(object_test, test7) -// { -// PikaObj *sys = newRootObj((char *)"sys", New_SysObj); -// int32_t a = 0; -// obj_bind(sys, (char *)"int", (char *)"a", &a); -// obj_run(sys, (char *)"set('a', 1)"); -// obj_deinit(sys); -// EXPECT_EQ(1, a); -// EXPECT_EQ(pikaMemNow(), 0); -// } - -// TEST(object_test, test8) -// { -// PikaObj *sys = newRootObj((char *)"sys", New_SysObj); -// obj_run(sys, (char *)"set('a', 1)"); -// obj_run(sys, (char *)"del('a')"); -// obj_deinit(sys); -// EXPECT_EQ(pikaMemNow(), 0); -// } +TEST(object_test, test7) +{ + PikaObj *sys = newRootObj((char *)"sys", New_SysObj); + int32_t a = 0; + obj_bind(sys, (char *)"int", (char *)"a", &a); + obj_run(sys, (char *)"set('a', 1)"); + obj_deinit(sys); + EXPECT_EQ(1, a); + EXPECT_EQ(pikaMemNow(), 0); +} + +TEST(object_test, test8) +{ + PikaObj *sys = newRootObj((char *)"sys", New_SysObj); + obj_run(sys, (char *)"set('a', 1)"); + obj_run(sys, (char *)"del('a')"); + obj_deinit(sys); + EXPECT_EQ(pikaMemNow(), 0); +} TEST(object_test, test9) {