diff options
| author | Benoit Germain <benoit.germain@ubisoft.com> | 2025-07-31 18:35:42 +0200 |
|---|---|---|
| committer | Benoit Germain <benoit.germain@ubisoft.com> | 2025-07-31 18:35:42 +0200 |
| commit | ab941c943aedf8f233619773c09c0fde304b8e93 (patch) | |
| tree | 0fc848eb51519860ed2f4196b3517ba051b088e7 /unit_tests/shared.cpp | |
| parent | 658f60168004d2a75685c32743fdd84427765af1 (diff) | |
| download | lanes-ab941c943aedf8f233619773c09c0fde304b8e93.tar.gz lanes-ab941c943aedf8f233619773c09c0fde304b8e93.tar.bz2 lanes-ab941c943aedf8f233619773c09c0fde304b8e93.zip | |
Copy deep_userdata_example test script in the test framework
* 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/shared.cpp')
| -rw-r--r-- | unit_tests/shared.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unit_tests/shared.cpp b/unit_tests/shared.cpp index daac5a2..9f3b08e 100644 --- a/unit_tests/shared.cpp +++ b/unit_tests/shared.cpp | |||
| @@ -51,7 +51,7 @@ namespace | |||
| 51 | return 1; | 51 | return 1; |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | // a function that enables any lane to require "fixture" | 54 | // a function that enables any lane to require "fixture" and "deep_userdata_example" |
| 55 | lua_CFunction sOnStateCreate = +[](lua_State* const L_) { | 55 | lua_CFunction sOnStateCreate = +[](lua_State* const L_) { |
| 56 | PreloadModule(L_, "fixture", luaopen_fixture); | 56 | PreloadModule(L_, "fixture", luaopen_fixture); |
| 57 | PreloadModule(L_, "deep_userdata_example", luaopen_deep_userdata_example); | 57 | PreloadModule(L_, "deep_userdata_example", luaopen_deep_userdata_example); |
