Skip to content

Commit 6a61148

Browse files
authored
Update Enum.cpp
1 parent 9f4aa8a commit 6a61148

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/cpp/src/Enum.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,15 @@ void Enum_add_enum_constant(void) {
494494
test_assert(id == ecs.pair(r, c));
495495
}
496496

497+
void Enum_add_enum_constant_explicit(void) {
498+
flecs::world ecs;
499+
500+
auto e = ecs.entity().add<StandardEnum>(StandardEnum::Red);
501+
test_assert(e.has<StandardEnum>(StandardEnum::Red));
502+
test_assert(!e.has<StandardEnum>(StandardEnum::Green));
503+
test_assert(!e.has<StandardEnum>(StandardEnum::Blue));
504+
}
505+
497506
void Enum_add_enum_class_constant(void) {
498507
flecs::world ecs;
499508

0 commit comments

Comments
 (0)