Changeset View
Changeset View
Standalone View
Standalone View
src/autotests/CharacterWidthTest.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 32 | { | |||
---|---|---|---|---|---|
56 | QTest::newRow("0x300b") << uint(0x300b) << 2; | 56 | QTest::newRow("0x300b") << uint(0x300b) << 2; | ||
57 | QTest::newRow("0xFF01") << uint(0xFF01) << 2; | 57 | QTest::newRow("0xFF01") << uint(0xFF01) << 2; | ||
58 | QTest::newRow("0xFF5F") << uint(0xFF5F) << 2; | 58 | QTest::newRow("0xFF5F") << uint(0xFF5F) << 2; | ||
59 | QTest::newRow("0xFF60") << uint(0xFF60) << 2; | 59 | QTest::newRow("0xFF60") << uint(0xFF60) << 2; | ||
60 | QTest::newRow("0xFFe0") << uint(0xFFe6) << 2; | 60 | QTest::newRow("0xFFe0") << uint(0xFFe6) << 2; | ||
61 | 61 | | |||
62 | QTest::newRow("0x1F943 tumbler glass") << uint(0x1F943) << 2; | 62 | QTest::newRow("0x1F943 tumbler glass") << uint(0x1F943) << 2; | ||
63 | QTest::newRow("0x1F944 spoon") << uint(0x1F944) << 2; | 63 | QTest::newRow("0x1F944 spoon") << uint(0x1F944) << 2; | ||
64 | | ||||
65 | QTest::newRow("0x26A1 high voltage sign (BUG 378124)") << uint(0x026A1) << 2; | ||||
66 | QTest::newRow("0x2615 hot beverage (BUG 392171)") << uint(0x02615) << 2; | ||||
67 | QTest::newRow("0x26EA church (BUG 392171)") << uint(0x026EA) << 2; | ||||
68 | QTest::newRow("0x1D11E musical symbol g clef (BUG 339439)") << uint(0x1D11E) << 1; | ||||
69 | | ||||
64 | } | 70 | } | ||
65 | 71 | | |||
66 | void CharacterWidthTest::testWidth() | 72 | void CharacterWidthTest::testWidth() | ||
67 | { | 73 | { | ||
68 | QFETCH(uint, character); | 74 | QFETCH(uint, character); | ||
69 | 75 | | |||
70 | QEXPECT_FAIL("0x1F943 tumbler glass", "emoji width currently broken", Continue); | | |||
71 | QEXPECT_FAIL("0x1F944 spoon", "emoji width currently broken", Continue); | | |||
72 | QTEST(Character::width(character), "width"); | 76 | QTEST(Character::width(character), "width"); | ||
73 | } | 77 | } | ||
74 | 78 | | |||
75 | QTEST_GUILESS_MAIN(CharacterWidthTest) | 79 | QTEST_GUILESS_MAIN(CharacterWidthTest) |