summaryrefslogtreecommitdiff
path: root/tests/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-05-08 15:31:02 +0100
committerGitHub <noreply@github.com>2026-05-08 15:31:02 +0100
commitb94f1498542be0e83fe8060a50bce5ff2d5a1c39 (patch)
tree8bddcfc9f8504817d5778136ec8c7c05d881c852 /tests/helpers/MiscFunctions.cpp
parenta6a0cc308c827557d04cb3e4c3b5d258de0411e6 (diff)
config: allow hashes for parsing colors (#14337)
Diffstat (limited to 'tests/helpers/MiscFunctions.cpp')
-rw-r--r--tests/helpers/MiscFunctions.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/helpers/MiscFunctions.cpp b/tests/helpers/MiscFunctions.cpp
index e0857987..4eefb5d3 100644
--- a/tests/helpers/MiscFunctions.cpp
+++ b/tests/helpers/MiscFunctions.cpp
@@ -97,49 +97,3 @@ TEST(Helpers, truthyFalse) {
EXPECT_FALSE(truthy(""));
EXPECT_FALSE(truthy("random"));
}
-
-// configStringToInt
-
-TEST(Helpers, configStringToIntDecimal) {
- EXPECT_EQ(configStringToInt("42").value(), 42);
- EXPECT_EQ(configStringToInt("0").value(), 0);
- EXPECT_EQ(configStringToInt("-1").value(), -1);
-}
-
-TEST(Helpers, configStringToIntHex) {
- EXPECT_EQ(configStringToInt("0xFF").value(), 255);
- EXPECT_EQ(configStringToInt("0x00").value(), 0);
- EXPECT_EQ(configStringToInt("0x10").value(), 16);
-}
-
-TEST(Helpers, configStringToIntRgba) {
- auto result = configStringToInt("rgba(255, 0, 0, 1.0)");
- EXPECT_TRUE(result.has_value());
-}
-
-TEST(Helpers, configStringToIntBooleanStrings) {
- // "true", "yes", "on" -> 1; "false", "no", "off" -> 0
- EXPECT_EQ(configStringToInt("true").value(), 1);
- EXPECT_EQ(configStringToInt("yes").value(), 1);
- EXPECT_EQ(configStringToInt("on").value(), 1);
- EXPECT_EQ(configStringToInt("false").value(), 0);
- EXPECT_EQ(configStringToInt("no").value(), 0);
- EXPECT_EQ(configStringToInt("off").value(), 0);
-}
-
-TEST(Helpers, configStringToIntInvalid) {
- EXPECT_FALSE(configStringToInt("").has_value());
- EXPECT_FALSE(configStringToInt("abc").has_value());
-}
-
-// configStringToVector2D
-
-TEST(Helpers, configStringToVector2DValid) {
- EXPECT_EQ(configStringToVector2D("1920 1080"), Vector2D(1920, 1080));
- EXPECT_EQ(configStringToVector2D("0 0"), Vector2D(0, 0));
-}
-
-TEST(Helpers, configStringToVector2DInvalid) {
- EXPECT_THROW(configStringToVector2D("notvalid"), std::invalid_argument);
- EXPECT_THROW(configStringToVector2D(""), std::invalid_argument);
-}