Skip to content

Commit

Permalink
test: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Nov 20, 2023
1 parent 838d0e5 commit 8ce8014
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/entt/meta/meta_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <entt/meta/pointer.hpp>
#include <entt/meta/resolve.hpp>
#include <entt/meta/template.hpp>
#include "../common/empty.h"

struct base {
base() = default;
Expand Down Expand Up @@ -49,11 +50,9 @@ struct clazz: base {
}

int value{};
static inline int bucket{};
inline static int bucket{};
};

struct local_only {};

struct argument {
argument(int val)
: value{val} {}
Expand Down Expand Up @@ -101,7 +100,7 @@ class MetaContext: public ::testing::Test {
entt::meta<int>(context)
.data<local_marker>("marker"_hs);

entt::meta<local_only>(context)
entt::meta<test::empty>(context)
.type("quux"_hs);

entt::meta<argument>(context)
Expand Down Expand Up @@ -152,14 +151,14 @@ TEST_F(MetaContext, Resolve) {
ASSERT_TRUE(entt::resolve<clazz>());
ASSERT_TRUE(entt::resolve<clazz>(context));

ASSERT_TRUE(entt::resolve<local_only>());
ASSERT_TRUE(entt::resolve<local_only>(context));
ASSERT_TRUE(entt::resolve<test::empty>());
ASSERT_TRUE(entt::resolve<test::empty>(context));

ASSERT_TRUE(entt::resolve(entt::type_id<clazz>()));
ASSERT_TRUE(entt::resolve(context, entt::type_id<clazz>()));

ASSERT_FALSE(entt::resolve(entt::type_id<local_only>()));
ASSERT_TRUE(entt::resolve(context, entt::type_id<local_only>()));
ASSERT_FALSE(entt::resolve(entt::type_id<test::empty>()));
ASSERT_TRUE(entt::resolve(context, entt::type_id<test::empty>()));

ASSERT_TRUE(entt::resolve("foo"_hs));
ASSERT_FALSE(entt::resolve(context, "foo"_hs));
Expand Down

0 comments on commit 8ce8014

Please sign in to comment.