|
@@ -152,14 +152,22 @@ ENTT_DEBUG_TEST_F(MetaFactoryDeathTest, Type) {
|
|
|
using namespace entt::literals;
|
|
using namespace entt::literals;
|
|
|
|
|
|
|
|
entt::meta_factory<int> factory{};
|
|
entt::meta_factory<int> factory{};
|
|
|
- entt::meta_factory<int> overloaded{"overloaded"_hs};
|
|
|
|
|
entt::meta_factory<double> other{};
|
|
entt::meta_factory<double> other{};
|
|
|
|
|
|
|
|
factory.type("foo"_hs);
|
|
factory.type("foo"_hs);
|
|
|
- overloaded.type("bar"_hs);
|
|
|
|
|
|
|
|
|
|
ASSERT_DEATH(other.type("foo"_hs), "");
|
|
ASSERT_DEATH(other.type("foo"_hs), "");
|
|
|
- ASSERT_DEATH(other.type("overloaded"_hs), "");
|
|
|
|
|
|
|
+ ASSERT_DEATH(factory.type(entt::type_hash<double>::value()), "");
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+ENTT_DEBUG_TEST_F(MetaFactoryDeathTest, OverloadedType) {
|
|
|
|
|
+ using namespace entt::literals;
|
|
|
|
|
+
|
|
|
|
|
+ entt::meta_factory<int> factory{};
|
|
|
|
|
+ entt::meta_factory<double> other{"overloaded"_hs};
|
|
|
|
|
+
|
|
|
|
|
+ ASSERT_DEATH(other.type(entt::type_hash<int>::value()), "");
|
|
|
|
|
+ ASSERT_DEATH(factory.type("overloaded"_hs), "");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
TEST_F(MetaFactory, Base) {
|
|
TEST_F(MetaFactory, Base) {
|