From 82a326876dccc1242883f7102c7f42226d4a6281 Mon Sep 17 00:00:00 2001 From: terik23 Date: Mon, 8 Apr 2019 03:13:19 +0500 Subject: [PATCH] fix warnings --- test/test.cpp | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/test/test.cpp b/test/test.cpp index b772419..9ddaf1a 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include enum class Color { RED = -12, GREEN = 7, BLUE = 15 }; @@ -72,7 +72,7 @@ TEST_CASE("enum_cast") { #undef constexpr } - SECTION("string") { + SECTION("integer") { constexpr auto cr = yae::enum_cast(-12); REQUIRE(cr.value() == Color::RED); REQUIRE(yae::enum_cast(7).value() == Color::GREEN); @@ -124,31 +124,31 @@ TEST_CASE("enum_value") { } TEST_CASE("enum_values") { - constexpr auto mge_s1 = yae::enum_values(); - REQUIRE(mge_s1 == std::array{Color::RED, Color::GREEN, Color::BLUE}); + constexpr auto s1 = yae::enum_values(); + REQUIRE(s1 == std::array{{Color::RED, Color::GREEN, Color::BLUE}}); - constexpr auto mge_s2 = yae::enum_values(); - REQUIRE(mge_s2 == std::array{Numbers::one, Numbers::two, Numbers::three}); + constexpr auto s2 = yae::enum_values(); + REQUIRE(s2 == std::array{{Numbers::one, Numbers::two, Numbers::three}}); - constexpr auto mge_s3 = yae::enum_values(); - REQUIRE(mge_s3 == std::array{Directions::Left, Directions::Down, Directions::Up, Directions::Right}); + constexpr auto s3 = yae::enum_values(); + REQUIRE(s3 == std::array{{Directions::Left, Directions::Down, Directions::Up, Directions::Right}}); - constexpr auto mge_s4 = yae::enum_values(); - REQUIRE(mge_s4 == std::array{number::one, number::two, number::three}); + constexpr auto s4 = yae::enum_values(); + REQUIRE(s4 == std::array{{number::one, number::two, number::three}}); } TEST_CASE("enum_count") { - constexpr auto mge_s1 = yae::enum_count(); - REQUIRE(mge_s1 == 3); + constexpr auto s1 = yae::enum_count(); + REQUIRE(s1 == 3); - constexpr auto mge_s2 = yae::enum_count(); - REQUIRE(mge_s2 == 3); + constexpr auto s2 = yae::enum_count(); + REQUIRE(s2 == 3); - constexpr auto mge_s3 = yae::enum_count(); - REQUIRE(mge_s3 == 4); + constexpr auto s3 = yae::enum_count(); + REQUIRE(s3 == 4); - constexpr auto mge_s4 = yae::enum_count(); - REQUIRE(mge_s4 == 3); + constexpr auto s4 = yae::enum_count(); + REQUIRE(s4 == 3); } TEST_CASE("enum_name") { @@ -188,17 +188,17 @@ TEST_CASE("enum_name") { } TEST_CASE("enum_names") { - constexpr auto mge_s1 = yae::enum_names(); - REQUIRE(mge_s1 == std::array{"RED", "GREEN", "BLUE"}); + constexpr auto s1 = yae::enum_names(); + REQUIRE(s1 == std::array{{"RED", "GREEN", "BLUE"}}); - constexpr auto mge_s2 = yae::enum_names(); - REQUIRE(mge_s2 == std::array{"one", "two", "three"}); + constexpr auto s2 = yae::enum_names(); + REQUIRE(s2 == std::array{{"one", "two", "three"}}); - constexpr auto mge_s3 = yae::enum_names(); - REQUIRE(mge_s3 == std::array{"Left", "Down", "Up", "Right"}); + constexpr auto s3 = yae::enum_names(); + REQUIRE(s3 == std::array{{"Left", "Down", "Up", "Right"}}); - constexpr auto mge_s4 = yae::enum_names(); - REQUIRE(mge_s4 == std::array{"one", "two", "three"}); + constexpr auto s4 = yae::enum_names(); + REQUIRE(s4 == std::array{{"one", "two", "three"}}); } TEST_CASE("operator<<") {