pikapython/test/PikaCV-test.cpp

172 lines
4.2 KiB
C
Raw Normal View History

#include "test_common.h"
TEST_START
2022-10-02 00:00:53 +08:00
#if (PIKA_SYNTAX_LEVEL == PIKA_SYNTAX_LEVEL_MAXIMAL) && (!PIKA_POOL_ENABLE)
TEST(PikaCV, test1) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
2022-07-15 14:21:45 +08:00
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test1.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(PikaCV, test2) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test2.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
2022-07-15 15:14:57 +08:00
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(PikaCV, test3) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test3.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
2022-07-18 16:00:15 +08:00
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(PikaCV, test4) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test4.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(PikaCV, test5) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test5.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(PikaCV, test6) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test6.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(PikaCV, test7) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test7.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(PikaCV, test8) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test8.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
2022-07-20 14:11:52 +08:00
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(PikaCV, test9) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test9.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
2022-07-20 14:52:22 +08:00
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(PikaCV, test10) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test10.py");
/* collect */
/* assert */
/* deinit */
obj_deinit(pikaMain);
EXPECT_EQ(pikaMemNow(), 0);
}
2022-07-26 10:24:31 +08:00
TEST(PikaCV, test11) {
/* init */
pikaMemInfo.heapUsedMax = 0;
PikaObj* pikaMain = newRootObj("pikaMain", New_PikaMain);
/* run */
__platform_printf("BEGIN\r\n");
pikaVM_runSingleFile(pikaMain, "test/python/PikaCV/PikaCV_test11.py");
/* collect */
2022-07-26 10:41:29 +08:00
// Arg* data = obj_getArg(pikaMain, "data");
2022-07-26 10:24:31 +08:00
/* assert */
/* deinit */
obj_deinit(pikaMain);
EXPECT_EQ(pikaMemNow(), 0);
}
2022-07-26 10:41:29 +08:00
#endif
TEST_END