Explorar el Código

meta: get around an issue of VS2017

Michele Caini hace 6 años
padre
commit
11349629f4
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      test/entt/meta/meta.cpp

+ 2 - 1
test/entt/meta/meta.cpp

@@ -290,7 +290,8 @@ struct Meta: ::testing::Test {
 
 
 TEST_F(Meta, Resolve) {
 TEST_F(Meta, Resolve) {
     ASSERT_EQ(entt::resolve<derived_type>(), entt::resolve("derived"_hs));
     ASSERT_EQ(entt::resolve<derived_type>(), entt::resolve("derived"_hs));
-    ASSERT_EQ(entt::resolve_if([](auto type) { return type.id() == "char"_hs; }), entt::resolve<char>());
+    // it could be "char"_hs rather than entt::hashed_string::value("char") if it weren't for a bug in VS2017
+    ASSERT_EQ(entt::resolve_if([](auto type) { return type.id() == entt::hashed_string::value("char"); }), entt::resolve<char>());
 
 
     bool found = false;
     bool found = false;