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

Function UNIT_TEST

libs/platform/platform_tests/language_test.cpp:10–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <string>
9
10UNIT_TEST(LangNormalize_Smoke)
11{
12 char const * arr1[] = {"en", "en-GB", "zh", "es-SP", "zh-penyn", "en-US", "ru_RU", "es"};
13 char const * arr2[] = {"en", "en", "zh", "es", "zh", "en", "ru", "es"};
14 static_assert(ARRAY_SIZE(arr1) == ARRAY_SIZE(arr2), "");
15
16 for (size_t i = 0; i < ARRAY_SIZE(arr1); ++i)
17 TEST_EQUAL(arr2[i], languages::Normalize(arr1[i]), ());
18}
19
20UNIT_TEST(PrefLanguages_Smoke)
21{

Callers

nothing calls this directly

Calls 6

GetPreferredFunction · 0.85
TESTFunction · 0.85
GetCurrentOrigFunction · 0.85
GetCurrentNormFunction · 0.85
NormalizeFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected