diff options
Diffstat (limited to 'test/platform/ColorTest.cpp')
-rw-r--r-- | test/platform/ColorTest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/platform/ColorTest.cpp b/test/platform/ColorTest.cpp index 451fb069..0c7c18ba 100644 --- a/test/platform/ColorTest.cpp +++ b/test/platform/ColorTest.cpp @@ -1,14 +1,14 @@ #include "cru/platform/Color.h" -#include <gtest/gtest.h> +#include <catch2/catch_test_macros.hpp> using cru::platform::Color; -TEST(Color, Parse) { - ASSERT_EQ(Color::Parse(u"blue"), Color::Parse(u"#0000ff")); - ASSERT_EQ(Color::Parse(u"#12abAB"), Color::FromHex(0x12abAB)); - ASSERT_EQ(Color::Parse(u"#8812abAB"), Color::FromHexAlpha(0x8812abAB)); - ASSERT_EQ(Color::Parse(u"averystrangestring"), std::nullopt); - ASSERT_EQ(Color::Parse(u"112233"), std::nullopt); - ASSERT_EQ(Color::Parse(u"#7777777"), std::nullopt); +TEST_CASE("Color Parse", "[color]") { + REQUIRE(Color::Parse(u"blue") == Color::Parse(u"#0000ff")); + REQUIRE(Color::Parse(u"#12abAB") == Color::FromHex(0x12abAB)); + REQUIRE(Color::Parse(u"#8812abAB") == Color::FromHexAlpha(0x8812abAB)); + REQUIRE(Color::Parse(u"averystrangestring") == std::nullopt); + REQUIRE(Color::Parse(u"112233") == std::nullopt); + REQUIRE(Color::Parse(u"#7777777") == std::nullopt); } |