diff --git a/test/entt/meta/meta_any.cpp b/test/entt/meta/meta_any.cpp index fbd917ac2..a7c2e87db 100644 --- a/test/entt/meta/meta_any.cpp +++ b/test/entt/meta/meta_any.cpp @@ -1321,16 +1321,21 @@ TEST_F(MetaAny, Cast) { } TEST_F(MetaAny, AllowCast) { + entt::meta_any any{}; entt::meta_any instance{clazz{}}; entt::meta_any other{fat{}}; entt::meta_any arithmetic{3}; auto as_cref = entt::forward_as_meta(arithmetic.cast()); + ASSERT_FALSE(any); ASSERT_TRUE(instance); ASSERT_TRUE(other); ASSERT_TRUE(arithmetic); ASSERT_TRUE(as_cref); + ASSERT_FALSE(any.allow_cast()); + ASSERT_FALSE(std::as_const(any).allow_cast()); + ASSERT_TRUE(instance.allow_cast()); ASSERT_TRUE(instance.allow_cast()); ASSERT_TRUE(instance.allow_cast()); @@ -1379,16 +1384,20 @@ TEST_F(MetaAny, AllowCast) { } TEST_F(MetaAny, OpaqueAllowCast) { + entt::meta_any any{}; entt::meta_any instance{clazz{}}; entt::meta_any other{fat{}}; entt::meta_any arithmetic{3}; auto as_cref = entt::forward_as_meta(arithmetic.cast()); + ASSERT_FALSE(any); ASSERT_TRUE(instance); ASSERT_TRUE(other); ASSERT_TRUE(arithmetic); ASSERT_TRUE(as_cref); + ASSERT_FALSE(any.allow_cast(entt::resolve())); + ASSERT_TRUE(instance.allow_cast(entt::resolve())); ASSERT_EQ(instance.type(), entt::resolve());