1
0
Fork 0
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:
Daniil Goncharov 2023-12-16 17:00:00 +04:00 committed by GitHub
parent 41f674b061
commit e09f25780a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 74 additions and 20 deletions

View file

@ -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);