From b80209cb2cb22c63b95994e6ed143f75b6ed5b06 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Tue, 28 May 2024 14:04:57 -0400 Subject: [PATCH] Don't test colour names without map This fixes #1940. --- tests/test-colours.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-colours.cc b/tests/test-colours.cc index 7a5b425fed..886f13b898 100644 --- a/tests/test-colours.cc +++ b/tests/test-colours.cc @@ -76,6 +76,7 @@ TEST_CASE("parse_color correctly parses colours", "[colours][parse_color]") { REQUIRE(colour.blue == 0x44); } +#ifdef BUILD_COLOUR_NAME_MAP SECTION("it parses the colour 'red'") { auto colour = parse_color("red"); REQUIRE(colour.alpha == 255); @@ -99,6 +100,7 @@ TEST_CASE("parse_color correctly parses colours", "[colours][parse_color]") { REQUIRE(colour.green == 0); REQUIRE(colour.blue == 255); } +#endif /* BUILD_COLOUR_NAME_MAP */ SECTION("two identical colours should be equal") { auto c = GENERATE(take(100, random((uint32_t)0, (uint32_t)0xffffffff)));