mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Pull out test expression to fix compile errors on clang (CHECK does not like function pointers?)
This commit is contained in:
parent
ec02b1c716
commit
0d2c4844f1
1 changed files with 2 additions and 2 deletions
|
@ -1304,9 +1304,9 @@ TEST_CASE("UserdataApi")
|
||||||
auto dtor = [](lua_State* l, void* data) {
|
auto dtor = [](lua_State* l, void* data) {
|
||||||
dtorhits += *(int*)data;
|
dtorhits += *(int*)data;
|
||||||
};
|
};
|
||||||
CHECK(lua_getuserdatadtor(L, 42) == nullptr);
|
bool dtorIsNull = lua_getuserdatadtor(L, 42) == nullptr; CHECK(dtorIsNull);
|
||||||
lua_setuserdatadtor(L, 42, dtor);
|
lua_setuserdatadtor(L, 42, dtor);
|
||||||
CHECK(lua_getuserdatadtor(L, 42) == dtor);
|
bool dtorIsSet = lua_getuserdatadtor(L, 42) == dtor; CHECK(dtorIsSet);
|
||||||
|
|
||||||
// light user data
|
// light user data
|
||||||
int lud;
|
int lud;
|
||||||
|
|
Loading…
Add table
Reference in a new issue