webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
com.google.protobuf.IsValidUtf8Test Class Reference
Inheritance diagram for com.google.protobuf.IsValidUtf8Test:

Public Member Functions

void testIsValidUtf8_1Byte ()
 
void testIsValidUtf8_2Bytes ()
 
void testIsValidUtf8_3Bytes ()
 
void testIsValidUtf8_4BytesSamples ()
 
void testSomeSequences ()
 
void testShardsHaveExpectedRoundTrippables ()
 

Detailed Description

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.

Author
jonp@.nosp@m.goog.nosp@m.le.co.nosp@m.m (Jon Perlow)
marti.nosp@m.nrb@.nosp@m.googl.nosp@m.e.co.nosp@m.m (Martin Buchholz)

Member Function Documentation

◆ testIsValidUtf8_1Byte()

void com.google.protobuf.IsValidUtf8Test.testIsValidUtf8_1Byte ( )
inline

Tests that round tripping of all two byte permutations work.

◆ testIsValidUtf8_2Bytes()

void com.google.protobuf.IsValidUtf8Test.testIsValidUtf8_2Bytes ( )
inline

Tests that round tripping of all two byte permutations work.

◆ testIsValidUtf8_3Bytes()

void com.google.protobuf.IsValidUtf8Test.testIsValidUtf8_3Bytes ( )
inline

Tests that round tripping of all three byte permutations work.

◆ testIsValidUtf8_4BytesSamples()

void com.google.protobuf.IsValidUtf8Test.testIsValidUtf8_4BytesSamples ( )
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.

◆ testShardsHaveExpectedRoundTrippables()

void com.google.protobuf.IsValidUtf8Test.testShardsHaveExpectedRoundTrippables ( )
inline

◆ testSomeSequences()

void com.google.protobuf.IsValidUtf8Test.testSomeSequences ( )
inline

Tests some hard-coded test cases.


The documentation for this class was generated from the following file: