Explorar o código

tests: Use 'registerUserType' which registers the constructor automatically

Ole %!s(int64=10) %!d(string=hai) anos
pai
achega
d9d95b81c6
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      tests/usertypes.cpp

+ 1 - 3
tests/usertypes.cpp

@@ -16,9 +16,7 @@ TEST_CASE("UserTypeRegistration") {
 
 TEST_CASE("UserTypeConstruction") {
 	luwra::StateWrapper state;
-	luwra::registerUserType<A>(state);
-
-	luwra::setGlobal(state, "A", LUWRA_WRAP_CONSTRUCTOR(A, int));
+	luwra::registerUserType<A(int)>(state, "A");
 
 	// Construction
 	REQUIRE(luaL_dostring(state, "return A(73)") == 0);