mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 04:11:06 -05:00
Move JSON helpers to lib
This commit is contained in:
@@ -20,21 +20,6 @@ TEST_CASE("ReplaceAll", "[utility]")
|
||||
REQUIRE(input == "sleeping");
|
||||
}
|
||||
|
||||
TEST_CASE("GetJsonField", "[utility]")
|
||||
{
|
||||
auto result = advss::GetJsonField("{}", "");
|
||||
REQUIRE_FALSE(result);
|
||||
|
||||
result = advss::GetJsonField("{}", "not there");
|
||||
REQUIRE_FALSE(result);
|
||||
|
||||
result = advss::GetJsonField("invalid json", "not there");
|
||||
REQUIRE_FALSE(result);
|
||||
|
||||
result = advss::GetJsonField("{ \"test\": 1 }", "test");
|
||||
REQUIRE(*result == "1");
|
||||
}
|
||||
|
||||
TEST_CASE("CompareIgnoringLineEnding", "[utility]")
|
||||
{
|
||||
QString s1;
|
||||
|
||||
Reference in New Issue
Block a user