MCPcopy Create free account
hub / github.com/comaps/comaps / UNIT_TEST

Function UNIT_TEST

libs/platform/platform_tests/meta_config_tests.cpp:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using namespace downloader;
8
9UNIT_TEST(MetaConfig_JSONParser_OldFormat)
10{
11 std::string oldFormatJson = R"(["http://url1", "http://url2", "http://url3"])";
12 auto result = ParseMetaConfig(oldFormatJson);
13 TEST(result.has_value(), ());
14 TEST_EQUAL(result->m_serversList.size(), 3, ());
15 TEST_EQUAL(result->m_serversList[0], "http://url1", ());
16 TEST_EQUAL(result->m_serversList[1], "http://url2", ());
17 TEST_EQUAL(result->m_serversList[2], "http://url3", ());
18 TEST(result->m_settings.empty(), ());
19}
20
21UNIT_TEST(MetaConfig_JSONParser_InvalidJSON)
22{

Callers

nothing calls this directly

Calls 5

ParseMetaConfigFunction · 0.85
TESTFunction · 0.85
has_valueMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected