Skip to content

Commit c49f43e

Browse files
committed
Add a static_assert for compile time test
1 parent f20adae commit c49f43e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/ArgumentTests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ TEST(ArgumentsCase, TaskStateEnumConstexpr)
218218
internal::sorted_map_lookup<internal::shorter_or_less>(today::getTaskStateValues(),
219219
"Started"sv);
220220

221+
static_assert(today::TaskState::Started == *actual, "can also perform lookups at compile time");
222+
221223
ASSERT_TRUE(actual) << "should find a value";
222224
EXPECT_TRUE(today::TaskState::Started == *actual) << "should parse the enum";
223225
}

0 commit comments

Comments
 (0)