mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-11 23:54:19 +00:00
checking that the enum is valid (not empty and not forward declaration) (#323)
This commit is contained in:
parent
41f674b061
commit
e09f25780a
8 changed files with 74 additions and 20 deletions
|
|
@ -119,11 +119,6 @@ TEST_CASE("containers_array") {
|
|||
REQUIRE(std::make_pair(colors[1], color_rgb_container_int[colors[1]]) == std::make_pair<Color, std::uint8_t>(Color::GREEN, 2U));
|
||||
REQUIRE(std::make_pair(colors[2], color_rgb_container_int[colors[2]]) == std::make_pair<Color, std::uint8_t>(Color::BLUE, 4U));
|
||||
|
||||
auto empty = magic_enum::containers::array<Empty, std::nullptr_t>();
|
||||
REQUIRE(empty.empty());
|
||||
REQUIRE(empty.size() == 0);
|
||||
REQUIRE(magic_enum::enum_count<Empty>() == empty.size());
|
||||
|
||||
auto color_rgb_container = magic_enum::containers::array<Color, RGB>();
|
||||
REQUIRE_FALSE(color_rgb_container.empty());
|
||||
REQUIRE(color_rgb_container.size() == 3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue