Skip to content

Commit 4e8d718

Browse files
committed
fix(game): make registry tests constructible on macos
1 parent 9ffdbe5 commit 4e8d718

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

‎tests/RegistryTests.cpp‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,26 @@ namespace
2828
{
2929
struct Position
3030
{
31+
Position() = default;
32+
33+
Position(float px, float py)
34+
: x(px), y(py)
35+
{
36+
}
37+
3138
float x{0.0F};
3239
float y{0.0F};
3340
};
3441

3542
struct Velocity
3643
{
44+
Velocity() = default;
45+
46+
Velocity(float vx, float vy)
47+
: dx(vx), dy(vy)
48+
{
49+
}
50+
3751
float dx{0.0F};
3852
float dy{0.0F};
3953
};
@@ -263,8 +277,11 @@ TEST(RegistryTests, EntitiesReturnsEntityList)
263277
{
264278
vix::game::Registry registry;
265279

266-
registry.create_entity("a");
267-
registry.create_entity("b");
280+
auto entity_a = registry.create_entity("a");
281+
auto entity_b = registry.create_entity("b");
282+
283+
EXPECT_TRUE(entity_a.valid());
284+
EXPECT_TRUE(entity_b.valid());
268285

269286
auto entities = registry.entities();
270287

0 commit comments

Comments
 (0)