void TestPart1() { printf("Test Part1: Character by character test\n"); uint32_t i = 0; uint32_t numFailed = 0; uint32_t numPassed = 0; uint32_t codepoint; uint32_t testDataCodepoint = UTF32CodepointFromTestcase(&Part1TestData[i]); for (codepoint = 1; codepoint < 0x110000; ++codepoint) { if (testDataCodepoint == codepoint) { if (TestInvariants(&Part1TestData[i])) ++numPassed; else ++numFailed; testDataCodepoint = UTF32CodepointFromTestcase(&Part1TestData[++i]); } else { if (TestUnspecifiedCodepoint(codepoint)) ++numPassed; else ++numFailed; } } printf(" %d cases passed, %d failed\n\n", numPassed, numFailed); }
void TestPart3() { printf("Test Part3: PRI #29 Test\n"); uint32_t i = 0; uint32_t numFailed = 0; uint32_t numPassed = 0; while (Part3TestData[i].c1[0] != 0) { if (TestInvariants(&Part3TestData[i++])) ++numPassed; else ++numFailed; } printf(" %d cases passed, %d failed\n\n", numPassed, numFailed); }
void TestPart2() { printf("Test Part2: Canonical Order Test\n"); uint32_t i = 0; uint32_t numFailed = 0; uint32_t numPassed = 0; while (Part2TestData[i].c1[0] != 0) { if (TestInvariants(&Part2TestData[i++])) ++numPassed; else ++numFailed; } printf(" %d cases passed, %d failed\n\n", numPassed, numFailed); EXPECT_EQ(0u, numFailed); }
void TestPart0() { printf("Test Part0: Specific cases\n"); uint32_t i = 0; uint32_t numFailed = 0; uint32_t numPassed = 0; while (Part0TestData[i].c1[0] != 0) { if (TestInvariants(&Part0TestData[i++])) ++numPassed; else ++numFailed; } printf(" %d cases passed, %d failed\n\n", numPassed, numFailed); EXPECT_EQ(0u, numFailed); }