|
@@ -654,6 +654,12 @@ TEST_F(MetaFunc, OverloadedConstFirst) {
|
|
|
|
|
|
|
|
ASSERT_EQ(func.invoke(std::as_const(instance), 1).cast<int>(), 2);
|
|
ASSERT_EQ(func.invoke(std::as_const(instance), 1).cast<int>(), 2);
|
|
|
ASSERT_FALSE(next.invoke(std::as_const(instance), 1));
|
|
ASSERT_FALSE(next.invoke(std::as_const(instance), 1));
|
|
|
|
|
+
|
|
|
|
|
+ ASSERT_EQ(func.invoke(entt::meta_handle{instance}, entt::meta_any{1}).cast<int>(), 2);
|
|
|
|
|
+ ASSERT_EQ(next.invoke(entt::meta_handle{instance}, entt::meta_any{1}).cast<int>(), 1);
|
|
|
|
|
+
|
|
|
|
|
+ ASSERT_EQ(func.invoke(entt::meta_handle{std::as_const(instance)}, entt::meta_any{1}).cast<int>(), 2);
|
|
|
|
|
+ ASSERT_FALSE(next.invoke(entt::meta_handle{std::as_const(instance)}, entt::meta_any{1}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
TEST_F(MetaFunc, OverloadedNonConstFirst) {
|
|
TEST_F(MetaFunc, OverloadedNonConstFirst) {
|
|
@@ -680,6 +686,12 @@ TEST_F(MetaFunc, OverloadedNonConstFirst) {
|
|
|
|
|
|
|
|
ASSERT_FALSE(func.invoke(std::as_const(instance), 1));
|
|
ASSERT_FALSE(func.invoke(std::as_const(instance), 1));
|
|
|
ASSERT_EQ(next.invoke(std::as_const(instance), 1).cast<int>(), 2);
|
|
ASSERT_EQ(next.invoke(std::as_const(instance), 1).cast<int>(), 2);
|
|
|
|
|
+
|
|
|
|
|
+ ASSERT_EQ(func.invoke(entt::meta_handle{instance}, entt::meta_any{1}).cast<int>(), 1);
|
|
|
|
|
+ ASSERT_EQ(next.invoke(entt::meta_handle{instance}, entt::meta_any{1}).cast<int>(), 2);
|
|
|
|
|
+
|
|
|
|
|
+ ASSERT_FALSE(func.invoke(entt::meta_handle{std::as_const(instance)}, entt::meta_any{1}));
|
|
|
|
|
+ ASSERT_EQ(next.invoke(entt::meta_handle{std::as_const(instance)}, entt::meta_any{1}).cast<int>(), 2);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
TEST_F(MetaFunc, OverloadedOrder) {
|
|
TEST_F(MetaFunc, OverloadedOrder) {
|