From 0d2c4844f158b825b0ecd0b8949527b22eb6378e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petri=20H=C3=A4kkinen?= Date: Sun, 19 Mar 2023 20:58:52 +0200 Subject: [PATCH] Pull out test expression to fix compile errors on clang (CHECK does not like function pointers?) --- tests/Conformance.test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Conformance.test.cpp b/tests/Conformance.test.cpp index 30b163ab..58fb7d91 100644 --- a/tests/Conformance.test.cpp +++ b/tests/Conformance.test.cpp @@ -1304,9 +1304,9 @@ TEST_CASE("UserdataApi") auto dtor = [](lua_State* l, void* data) { dtorhits += *(int*)data; }; - CHECK(lua_getuserdatadtor(L, 42) == nullptr); + bool dtorIsNull = lua_getuserdatadtor(L, 42) == nullptr; CHECK(dtorIsNull); lua_setuserdatadtor(L, 42, dtor); - CHECK(lua_getuserdatadtor(L, 42) == dtor); + bool dtorIsSet = lua_getuserdatadtor(L, 42) == dtor; CHECK(dtorIsSet); // light user data int lud;