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

Function UNIT_TEST

libs/drape/drape_tests/harfbuzz_shaping_test.cpp:13–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11}
12
13UNIT_TEST(GetTextSegments)
14{
15 auto const [text, segments] = GetTextSegments("Map data © OpenStreetMap");
16 TEST(text == u"Map data © OpenStreetMap", ());
17
18 std::vector<TextSegment> const expected{
19 {0, 3, HB_SCRIPT_LATIN, HB_DIRECTION_LTR}, {3, 1, HB_SCRIPT_COMMON, HB_DIRECTION_LTR},
20 {4, 4, HB_SCRIPT_LATIN, HB_DIRECTION_LTR}, {8, 3, HB_SCRIPT_COMMON, HB_DIRECTION_LTR},
21 {11, 13, HB_SCRIPT_LATIN, HB_DIRECTION_LTR},
22 };
23
24 TEST_EQUAL(segments, expected, ());
25}
26} // namespace harfbuzz_shaping

Callers

nothing calls this directly

Calls 2

GetTextSegmentsFunction · 0.85
TESTFunction · 0.85

Tested by

no test coverage detected