Skip to content

Commit

Permalink
Don't test colour names without map
Browse files Browse the repository at this point in the history
This fixes #1940.
  • Loading branch information
brndnmtthws committed May 28, 2024
1 parent f2938d8 commit b80209c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test-colours.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)));
Expand Down

0 comments on commit b80209c

Please sign in to comment.