1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-16 04:02:15 +00:00

Don't test colour names without map

This fixes #1940.
This commit is contained in:
Brenden Matthews 2024-05-28 14:04:57 -04:00
parent f2938d8d66
commit b80209cb2c

View File

@ -76,6 +76,7 @@ TEST_CASE("parse_color correctly parses colours", "[colours][parse_color]") {
REQUIRE(colour.blue == 0x44); REQUIRE(colour.blue == 0x44);
} }
#ifdef BUILD_COLOUR_NAME_MAP
SECTION("it parses the colour 'red'") { SECTION("it parses the colour 'red'") {
auto colour = parse_color("red"); auto colour = parse_color("red");
REQUIRE(colour.alpha == 255); REQUIRE(colour.alpha == 255);
@ -99,6 +100,7 @@ TEST_CASE("parse_color correctly parses colours", "[colours][parse_color]") {
REQUIRE(colour.green == 0); REQUIRE(colour.green == 0);
REQUIRE(colour.blue == 255); REQUIRE(colour.blue == 255);
} }
#endif /* BUILD_COLOUR_NAME_MAP */
SECTION("two identical colours should be equal") { SECTION("two identical colours should be equal") {
auto c = GENERATE(take(100, random((uint32_t)0, (uint32_t)0xffffffff))); auto c = GENERATE(take(100, random((uint32_t)0, (uint32_t)0xffffffff)));