webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
void | testIsValidUtf8_1Byte () |
void | testIsValidUtf8_2Bytes () |
void | testIsValidUtf8_3Bytes () |
void | testIsValidUtf8_4BytesSamples () |
void | testSomeSequences () |
void | testShardsHaveExpectedRoundTrippables () |
Tests cases for ByteString#isValidUtf8(). This includes three brute force tests that actually test every permutation of one byte, two byte, and three byte sequences to ensure that the method produces the right result for every possible byte encoding where "right" means it's consistent with java's UTF-8 string encoding/decoding such that the method returns true for any sequence that will round trip when converted to a String and then back to bytes and will return false for any sequence that will not round trip. See also IsValidUtf8FourByteTest. It also includes some other more targeted tests.
|
inline |
Tests that round tripping of all two byte permutations work.
|
inline |
Tests that round tripping of all two byte permutations work.
|
inline |
Tests that round tripping of all three byte permutations work.
|
inline |
Tests that round tripping of a sample of four byte permutations work. All permutations are prohibitively expensive to test for automated runs; IsValidUtf8FourByteTest is used for full coverage. This method tests specific four-byte cases.
|
inline |
|
inline |
Tests some hard-coded test cases.