Explorar o código

tests: Use const qualifier in tests

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

+ 2 - 2
tests/usertypes.cpp

@@ -35,7 +35,7 @@ struct B {
 		return prop += x;
 	}
 
-	B* add(const B* other) {
+	B* add(const B* other) const {
 		return new B {prop + other->prop};
 	}
 };
@@ -49,7 +49,7 @@ TEST_CASE("usertypes_lua_usage") {
 			{"prop", luwra::wrap_property<B, int, &B::prop>}
 		},
 		{
-			{"__add", luwra::wrap_method<B, B*(const B*), &B::add>}
+			{"__add", luwra::wrap_method<const B, B*(const B*), &B::add>}
 		}
 	);