aboutsummaryrefslogtreecommitdiff
path: root/unit_tests/deep_tests.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-07-31 18:35:42 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2025-07-31 18:35:42 +0200
commitab941c943aedf8f233619773c09c0fde304b8e93 (patch)
tree0fc848eb51519860ed2f4196b3517ba051b088e7 /unit_tests/deep_tests.cpp
parent658f60168004d2a75685c32743fdd84427765af1 (diff)
downloadlanes-master.tar.gz
lanes-master.tar.bz2
lanes-master.zip
Copy deep_userdata_example test script in the test frameworkHEADmaster
* I need to keep deep_userdata_example hackishly built-in inside the unit tests executable, because using the external module cause a crash in Lua51 tests (module is unloaded before some deep objects are GCed...) * copy the test script in the proper location and invoke it as part of the tests
Diffstat (limited to 'unit_tests/deep_tests.cpp')
-rw-r--r--unit_tests/deep_tests.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/unit_tests/deep_tests.cpp b/unit_tests/deep_tests.cpp
index e21072c..f18ff81 100644
--- a/unit_tests/deep_tests.cpp
+++ b/unit_tests/deep_tests.cpp
@@ -92,4 +92,13 @@ TEST_CASE("misc.deep_userdata.example")
92 " assert(due.get_deep_count() == 0)" 92 " assert(due.get_deep_count() == 0)"
93 ); 93 );
94 } 94 }
95} \ No newline at end of file 95}
96
97#define MAKE_TEST_CASE(DIR, FILE, CONDITION) \
98 TEST_CASE("scripted_tests." #DIR "." #FILE) \
99 { \
100 FileRunner _runner(R"(.\unit_tests\scripts)"); \
101 _runner.performTest(FileRunnerParam{ #DIR "/" #FILE, TestType::CONDITION }); \
102 }
103
104MAKE_TEST_CASE(misc, deeptest, AssertNoLuaError)