Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
com.google.protobuf.TextFormatTest Class Reference
Inheritance diagram for com.google.protobuf.TextFormatTest:
Inheritance graph
[legend]

Public Member Functions

void testEscape () throws Exception
 
void testEscape () throws Exception
 
void testEscapeQuestionMark () throws InvalidEscapeSequenceException
 
void testMapDuplicateKeys () throws Exception
 
void testMapOverwrite () throws Exception
 
void testMapOverwrite () throws Exception
 
void testMapShortForm () throws Exception
 
void testMapShortForm () throws Exception
 
void testMapShortFormEmpty () throws Exception
 
void testMapShortFormEmpty () throws Exception
 
void testMapShortFormTrailingComma () throws Exception
 
void testMapShortFormTrailingComma () throws Exception
 
void testMapTextFormat () throws Exception
 
void testMapTextFormat () throws Exception
 
void testMerge () throws Exception
 
void testMerge () throws Exception
 
void testMergeAndParseCompatibility () throws Exception
 
void testMergeAndParseCompatibility () throws Exception
 
void testMergeAndParseExotic () throws Exception
 
void testMergeAndParseExotic () throws Exception
 
void testMergeAngleBrackets () throws Exception
 
void testMergeAngleBrackets () throws Exception
 
void testMergeAny_customBuiltTypeRegistry () throws Exception
 
void testMergeAny_customBuiltTypeRegistry () throws Exception
 
void testMergeComment () throws Exception
 
void testMergeComment () throws Exception
 
void testMergeExtensions () throws Exception
 
void testMergeExtensions () throws Exception
 
void testMergeInitialized () throws Exception
 
void testMergeInitialized () throws Exception
 
void testMergeMessageSet () throws Exception
 
void testMergeMessageSet () throws Exception
 
void testMergeMessageSetWithOverwriteForbidden () throws Exception
 
void testMergeMessageSetWithOverwriteForbidden () throws Exception
 
void testMergeNumericEnum () throws Exception
 
void testMergeNumericEnum () throws Exception
 
void testMergeReader () throws Exception
 
void testMergeReader () throws Exception
 
void testMergeUninitialized () throws Exception
 
void testMergeUninitialized () throws Exception
 
void testOneofOverwriteAllowed () throws Exception
 
void testOneofOverwriteAllowed () throws Exception
 
void testOneofOverwriteForbidden () throws Exception
 
void testOneofOverwriteForbidden () throws Exception
 
void testOneofTextFormat () throws Exception
 
void testOneofTextFormat () throws Exception
 
void testParse () throws Exception
 
void testParse () throws Exception
 
void testParseAdjacentStringLiterals () throws Exception
 
void testParseAdjacentStringLiterals () throws Exception
 
void testParseBoolean () throws Exception
 
void testParseBoolean () throws Exception
 
void testParseErrors () throws Exception
 
void testParseErrors () throws Exception
 
void testParseExtensions () throws Exception
 
void testParseExtensions () throws Exception
 
void testParseInfoTreeBuilding () throws Exception
 
void testParseInfoTreeBuilding () throws Exception
 
void testParseInitialized () throws Exception
 
void testParseInitialized () throws Exception
 
void testParseInteger () throws Exception
 
void testParseInteger () throws Exception
 
void testParseLongString () throws Exception
 
void testParseLongString () throws Exception
 
void testParseNonRepeatedFields () throws Exception
 
void testParseNonRepeatedFields () throws Exception
 
void testParseShortRepeatedFormOfEmptyRepeatedFields () throws Exception
 
void testParseShortRepeatedFormOfEmptyRepeatedFields () throws Exception
 
void testParseShortRepeatedFormOfNonRepeatedFields () throws Exception
 
void testParseShortRepeatedFormOfNonRepeatedFields () throws Exception
 
void testParseShortRepeatedFormOfRepeatedFields () throws Exception
 
void testParseShortRepeatedFormOfRepeatedFields () throws Exception
 
void testParseShortRepeatedFormWithTrailingComma () throws Exception
 
void testParseShortRepeatedFormWithTrailingComma () throws Exception
 
void testParseString () throws Exception
 
void testParseString () throws Exception
 
void testParseUninitialized () throws Exception
 
void testParseUninitialized () throws Exception
 
void testParseUnknownExtensions () throws Exception
 
void testParseUnknownExtensions () throws Exception
 
void testPreservesFloatingPointNegative0 () throws Exception
 
void testPrintAny_anyFromWithNoTypeUrlField () throws Exception
 
void testPrintAny_anyFromWithNoTypeUrlField () throws Exception
 
void testPrintAny_anyFromWithNoValueField () throws Exception
 
void testPrintAny_anyFromWithNoValueField () throws Exception
 
void testPrintAny_anyWithDynamicMessage () throws Exception
 
void testPrintAny_anyWithDynamicMessage () throws Exception
 
void testPrintAny_anyWithInvalidFieldType () throws Exception
 
void testPrintAny_anyWithInvalidFieldType () throws Exception
 
void testPrintAny_customBuiltTypeRegistry () throws Exception
 
void testPrintAny_customBuiltTypeRegistry () throws Exception
 
void testPrintExotic () throws Exception
 
void testPrintExotic () throws Exception
 
void testPrintExtensions () throws Exception
 
void testPrintExtensions () throws Exception
 
void testPrintField () throws Exception
 
void testPrintField () throws Exception
 
void testPrintFieldValue () throws Exception
 
void testPrintFieldValue () throws Exception
 
void testPrintFieldValueThrows () throws Exception
 
void testPrintMessage () throws Exception
 
void testPrintMessage () throws Exception
 
void testPrintMessageBuilder () throws Exception
 
void testPrintMessageBuilder () throws Exception
 
void testPrintMessageSet () throws Exception
 
void testPrintMessageSet () throws Exception
 
void testPrintToUnicodeString () throws Exception
 
void testPrintToUnicodeString () throws Exception
 
void testPrintToUnicodeString_unknown ()
 
void testPrintToUnicodeString_unknown ()
 
void testPrintToUnicodeStringWithNewlines () throws Exception
 
void testPrintToUnicodeStringWithNewlines () throws Exception
 
void testPrintUnknownFields () throws Exception
 
void testPrintUnknownFields () throws Exception
 
void testRoundtripProto3Optional () throws Exception
 
void testShortDebugString ()
 
void testShortDebugString ()
 
void testShortDebugString_field ()
 
void testShortDebugString_field ()
 
void testShortDebugString_unknown ()
 
void testShortDebugString_unknown ()
 
void testSortMapFields () throws Exception
 

Private Member Functions

void assertLocation (TextFormatParseInfoTree tree, final Descriptor descriptor, final String fieldName, int index, int line, int column)
 
void assertLocation (TextFormatParseInfoTree tree, final Descriptor descriptor, final String fieldName, int index, int line, int column)
 
void assertParseError (String error, String text)
 
void assertParseError (String error, String text)
 
void assertParseErrorWithOverwriteForbidden (String error, String text)
 
void assertParseErrorWithOverwriteForbidden (String error, String text)
 
void assertParseErrorWithUnknownExtensions (String error, String text)
 
void assertParseErrorWithUnknownExtensions (String error, String text)
 
void assertParseErrorWithUnknownFields (String error, String text)
 
void assertParseErrorWithUnknownFields (String error, String text)
 
TestAllTypes assertParseSuccessWithOverwriteForbidden (String text) throws TextFormat.ParseException
 
TestAllTypes assertParseSuccessWithOverwriteForbidden (String text) throws TextFormat.ParseException
 
TestAllTypes assertParseSuccessWithUnknownExtensions (String text) throws TextFormat.ParseException
 
TestAllTypes assertParseSuccessWithUnknownExtensions (String text) throws TextFormat.ParseException
 
TestAllTypes assertParseSuccessWithUnknownFields (String text) throws TextFormat.ParseException
 
TestAllTypes assertParseSuccessWithUnknownFields (String text) throws TextFormat.ParseException
 
void assertPrintFieldThrowsClassCastException (final Object value, String fieldName) throws Exception
 
void assertPrintFieldValue (String expect, Object value, String fieldName) throws Exception
 
void assertPrintFieldValue (String expect, Object value, String fieldName) throws Exception
 
ByteString bytes (int... bytesAsInts)
 
ByteString bytes (int... bytesAsInts)
 
ByteString bytes (String str)
 
ByteString bytes (String str)
 
UnknownFieldSet makeUnknownFieldSet ()
 
UnknownFieldSet makeUnknownFieldSet ()
 

Static Private Member Functions

static Descriptor createDescriptorForAny (FieldDescriptorProto... fields) throws Exception
 
static Descriptor createDescriptorForAny (FieldDescriptorProto... fields) throws Exception
 

Private Attributes

final TextFormat.Parser defaultParser = TextFormat.Parser.newBuilder().build()
 
String messageSetText
 
String messageSetTextWithRepeatedExtension
 
final TextFormat.Parser parserAllowingUnknownExtensions
 
final TextFormat.Parser parserAllowingUnknownFields
 
final TextFormat.Parser parserWithOverwriteForbidden
 

Static Private Attributes

static final String ALL_EXTENSIONS_SET_TEXT
 
static final String ALL_FIELDS_SET_TEXT
 
static String allExtensionsSetText
 
static String allFieldsSetText
 
static final String CANONICAL_EXOTIC_TEXT
 
static String canonicalExoticText
 
static final TextFormat.Parser DEFAULT_PARSER = TextFormat.Parser.newBuilder().build()
 
static final String ESCAPE_TEST_STRING
 
static final String ESCAPE_TEST_STRING_ESCAPED
 
static final String EXOTIC_TEXT
 
static String exoticText
 
static final String MESSAGE_SET_TEXT
 
static final String MESSAGE_SET_TEXT_WITH_REPEATED_EXTENSION
 
static final TextFormat.Parser PARSER_ALLOWING_UNKNOWN_EXTENSIONS
 
static final TextFormat.Parser PARSER_ALLOWING_UNKNOWN_FIELDS
 
static final TextFormat.Parser PARSER_WITH_OVERWRITE_FORBIDDEN
 

Detailed Description

Test case for TextFormat.

TODO(wenboz): ExtensionTest and rest of text_format_unittest.cc.

Author
wenbo.nosp@m.z@go.nosp@m.ogle..nosp@m.com (Wenbo Zhu)

Test case for TextFormat.

TODO(wenboz): ExtensionTest and rest of text_format_unittest.cc.

Definition at line 68 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

Member Function Documentation

◆ assertLocation() [1/2]

void com.google.protobuf.TextFormatTest.assertLocation ( TextFormatParseInfoTree  tree,
final Descriptor  descriptor,
final String  fieldName,
int  index,
int  line,
int  column 
)
inlineprivate

◆ assertLocation() [2/2]

void com.google.protobuf.TextFormatTest.assertLocation ( TextFormatParseInfoTree  tree,
final Descriptor  descriptor,
final String  fieldName,
int  index,
int  line,
int  column 
)
inlineprivate

◆ assertParseError() [1/2]

void com.google.protobuf.TextFormatTest.assertParseError ( String  error,
String  text 
)
inlineprivate

◆ assertParseError() [2/2]

void com.google.protobuf.TextFormatTest.assertParseError ( String  error,
String  text 
)
inlineprivate

◆ assertParseErrorWithOverwriteForbidden() [1/2]

void com.google.protobuf.TextFormatTest.assertParseErrorWithOverwriteForbidden ( String  error,
String  text 
)
inlineprivate

◆ assertParseErrorWithOverwriteForbidden() [2/2]

void com.google.protobuf.TextFormatTest.assertParseErrorWithOverwriteForbidden ( String  error,
String  text 
)
inlineprivate

◆ assertParseErrorWithUnknownExtensions() [1/2]

void com.google.protobuf.TextFormatTest.assertParseErrorWithUnknownExtensions ( String  error,
String  text 
)
inlineprivate

◆ assertParseErrorWithUnknownExtensions() [2/2]

void com.google.protobuf.TextFormatTest.assertParseErrorWithUnknownExtensions ( String  error,
String  text 
)
inlineprivate

◆ assertParseErrorWithUnknownFields() [1/2]

void com.google.protobuf.TextFormatTest.assertParseErrorWithUnknownFields ( String  error,
String  text 
)
inlineprivate

◆ assertParseErrorWithUnknownFields() [2/2]

void com.google.protobuf.TextFormatTest.assertParseErrorWithUnknownFields ( String  error,
String  text 
)
inlineprivate

◆ assertParseSuccessWithOverwriteForbidden() [1/2]

TestAllTypes com.google.protobuf.TextFormatTest.assertParseSuccessWithOverwriteForbidden ( String  text) throws TextFormat.ParseException
inlineprivate

◆ assertParseSuccessWithOverwriteForbidden() [2/2]

TestAllTypes com.google.protobuf.TextFormatTest.assertParseSuccessWithOverwriteForbidden ( String  text) throws TextFormat.ParseException
inlineprivate

◆ assertParseSuccessWithUnknownExtensions() [1/2]

TestAllTypes com.google.protobuf.TextFormatTest.assertParseSuccessWithUnknownExtensions ( String  text) throws TextFormat.ParseException
inlineprivate

◆ assertParseSuccessWithUnknownExtensions() [2/2]

TestAllTypes com.google.protobuf.TextFormatTest.assertParseSuccessWithUnknownExtensions ( String  text) throws TextFormat.ParseException
inlineprivate

◆ assertParseSuccessWithUnknownFields() [1/2]

TestAllTypes com.google.protobuf.TextFormatTest.assertParseSuccessWithUnknownFields ( String  text) throws TextFormat.ParseException
inlineprivate

◆ assertParseSuccessWithUnknownFields() [2/2]

TestAllTypes com.google.protobuf.TextFormatTest.assertParseSuccessWithUnknownFields ( String  text) throws TextFormat.ParseException
inlineprivate

◆ assertPrintFieldThrowsClassCastException()

void com.google.protobuf.TextFormatTest.assertPrintFieldThrowsClassCastException ( final Object  value,
String  fieldName 
) throws Exception
inlineprivate

◆ assertPrintFieldValue() [1/2]

void com.google.protobuf.TextFormatTest.assertPrintFieldValue ( String  expect,
Object  value,
String  fieldName 
) throws Exception
inlineprivate

◆ assertPrintFieldValue() [2/2]

void com.google.protobuf.TextFormatTest.assertPrintFieldValue ( String  expect,
Object  value,
String  fieldName 
) throws Exception
inlineprivate

◆ bytes() [1/4]

ByteString com.google.protobuf.TextFormatTest.bytes ( int...  bytesAsInts)
inlineprivate

Helper to construct a ByteString from a bunch of bytes. The inputs are actually ints so that I can use hex notation and not get stupid errors about precision.

Definition at line 275 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ bytes() [2/4]

ByteString com.google.protobuf.TextFormatTest.bytes ( int...  bytesAsInts)
inlineprivate

Helper to construct a ByteString from a bunch of bytes. The inputs are actually ints so that I can use hex notation and not get stupid errors about precision.

Definition at line 287 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ bytes() [3/4]

ByteString com.google.protobuf.TextFormatTest.bytes ( String  str)
inlineprivate

Helper to construct a ByteString from a String containing only 8-bit characters. The characters are converted directly to bytes, not encoded using UTF-8.

Definition at line 267 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ bytes() [4/4]

ByteString com.google.protobuf.TextFormatTest.bytes ( String  str)
inlineprivate

Helper to construct a ByteString from a String containing only 8-bit characters. The characters are converted directly to bytes, not encoded using UTF-8.

Definition at line 279 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ createDescriptorForAny() [1/2]

static Descriptor com.google.protobuf.TextFormatTest.createDescriptorForAny ( FieldDescriptorProto...  fields) throws Exception
inlinestaticprivate

◆ createDescriptorForAny() [2/2]

static Descriptor com.google.protobuf.TextFormatTest.createDescriptorForAny ( FieldDescriptorProto...  fields) throws Exception
inlinestaticprivate

◆ makeUnknownFieldSet() [1/2]

UnknownFieldSet com.google.protobuf.TextFormatTest.makeUnknownFieldSet ( )
inlineprivate

◆ makeUnknownFieldSet() [2/2]

UnknownFieldSet com.google.protobuf.TextFormatTest.makeUnknownFieldSet ( )
inlineprivate

◆ testEscape() [1/2]

void com.google.protobuf.TextFormatTest.testEscape ( ) throws Exception
inline

◆ testEscape() [2/2]

void com.google.protobuf.TextFormatTest.testEscape ( ) throws Exception
inline

◆ testEscapeQuestionMark()

void com.google.protobuf.TextFormatTest.testEscapeQuestionMark ( ) throws InvalidEscapeSequenceException
inline

◆ testMapDuplicateKeys()

void com.google.protobuf.TextFormatTest.testMapDuplicateKeys ( ) throws Exception
inline

◆ testMapOverwrite() [1/2]

void com.google.protobuf.TextFormatTest.testMapOverwrite ( ) throws Exception
inline

◆ testMapOverwrite() [2/2]

void com.google.protobuf.TextFormatTest.testMapOverwrite ( ) throws Exception
inline

◆ testMapShortForm() [1/2]

void com.google.protobuf.TextFormatTest.testMapShortForm ( ) throws Exception
inline

◆ testMapShortForm() [2/2]

void com.google.protobuf.TextFormatTest.testMapShortForm ( ) throws Exception
inline

◆ testMapShortFormEmpty() [1/2]

void com.google.protobuf.TextFormatTest.testMapShortFormEmpty ( ) throws Exception
inline

◆ testMapShortFormEmpty() [2/2]

void com.google.protobuf.TextFormatTest.testMapShortFormEmpty ( ) throws Exception
inline

◆ testMapShortFormTrailingComma() [1/2]

void com.google.protobuf.TextFormatTest.testMapShortFormTrailingComma ( ) throws Exception
inline

◆ testMapShortFormTrailingComma() [2/2]

void com.google.protobuf.TextFormatTest.testMapShortFormTrailingComma ( ) throws Exception
inline

◆ testMapTextFormat() [1/2]

void com.google.protobuf.TextFormatTest.testMapTextFormat ( ) throws Exception
inline

◆ testMapTextFormat() [2/2]

void com.google.protobuf.TextFormatTest.testMapTextFormat ( ) throws Exception
inline

◆ testMerge() [1/2]

void com.google.protobuf.TextFormatTest.testMerge ( ) throws Exception
inline

◆ testMerge() [2/2]

void com.google.protobuf.TextFormatTest.testMerge ( ) throws Exception
inline

◆ testMergeAndParseCompatibility() [1/2]

void com.google.protobuf.TextFormatTest.testMergeAndParseCompatibility ( ) throws Exception
inline

◆ testMergeAndParseCompatibility() [2/2]

void com.google.protobuf.TextFormatTest.testMergeAndParseCompatibility ( ) throws Exception
inline

◆ testMergeAndParseExotic() [1/2]

void com.google.protobuf.TextFormatTest.testMergeAndParseExotic ( ) throws Exception
inline

◆ testMergeAndParseExotic() [2/2]

void com.google.protobuf.TextFormatTest.testMergeAndParseExotic ( ) throws Exception
inline

◆ testMergeAngleBrackets() [1/2]

void com.google.protobuf.TextFormatTest.testMergeAngleBrackets ( ) throws Exception
inline

◆ testMergeAngleBrackets() [2/2]

void com.google.protobuf.TextFormatTest.testMergeAngleBrackets ( ) throws Exception
inline

◆ testMergeAny_customBuiltTypeRegistry() [1/2]

void com.google.protobuf.TextFormatTest.testMergeAny_customBuiltTypeRegistry ( ) throws Exception
inline

◆ testMergeAny_customBuiltTypeRegistry() [2/2]

void com.google.protobuf.TextFormatTest.testMergeAny_customBuiltTypeRegistry ( ) throws Exception
inline

◆ testMergeComment() [1/2]

void com.google.protobuf.TextFormatTest.testMergeComment ( ) throws Exception
inline

◆ testMergeComment() [2/2]

void com.google.protobuf.TextFormatTest.testMergeComment ( ) throws Exception
inline

◆ testMergeExtensions() [1/2]

void com.google.protobuf.TextFormatTest.testMergeExtensions ( ) throws Exception
inline

◆ testMergeExtensions() [2/2]

void com.google.protobuf.TextFormatTest.testMergeExtensions ( ) throws Exception
inline

◆ testMergeInitialized() [1/2]

void com.google.protobuf.TextFormatTest.testMergeInitialized ( ) throws Exception
inline

◆ testMergeInitialized() [2/2]

void com.google.protobuf.TextFormatTest.testMergeInitialized ( ) throws Exception
inline

◆ testMergeMessageSet() [1/2]

void com.google.protobuf.TextFormatTest.testMergeMessageSet ( ) throws Exception
inline

◆ testMergeMessageSet() [2/2]

void com.google.protobuf.TextFormatTest.testMergeMessageSet ( ) throws Exception
inline

◆ testMergeMessageSetWithOverwriteForbidden() [1/2]

void com.google.protobuf.TextFormatTest.testMergeMessageSetWithOverwriteForbidden ( ) throws Exception
inline

◆ testMergeMessageSetWithOverwriteForbidden() [2/2]

void com.google.protobuf.TextFormatTest.testMergeMessageSetWithOverwriteForbidden ( ) throws Exception
inline

◆ testMergeNumericEnum() [1/2]

void com.google.protobuf.TextFormatTest.testMergeNumericEnum ( ) throws Exception
inline

◆ testMergeNumericEnum() [2/2]

void com.google.protobuf.TextFormatTest.testMergeNumericEnum ( ) throws Exception
inline

◆ testMergeReader() [1/2]

void com.google.protobuf.TextFormatTest.testMergeReader ( ) throws Exception
inline

◆ testMergeReader() [2/2]

void com.google.protobuf.TextFormatTest.testMergeReader ( ) throws Exception
inline

◆ testMergeUninitialized() [1/2]

void com.google.protobuf.TextFormatTest.testMergeUninitialized ( ) throws Exception
inline

◆ testMergeUninitialized() [2/2]

void com.google.protobuf.TextFormatTest.testMergeUninitialized ( ) throws Exception
inline

◆ testOneofOverwriteAllowed() [1/2]

void com.google.protobuf.TextFormatTest.testOneofOverwriteAllowed ( ) throws Exception
inline

◆ testOneofOverwriteAllowed() [2/2]

void com.google.protobuf.TextFormatTest.testOneofOverwriteAllowed ( ) throws Exception
inline

◆ testOneofOverwriteForbidden() [1/2]

void com.google.protobuf.TextFormatTest.testOneofOverwriteForbidden ( ) throws Exception
inline

◆ testOneofOverwriteForbidden() [2/2]

void com.google.protobuf.TextFormatTest.testOneofOverwriteForbidden ( ) throws Exception
inline

◆ testOneofTextFormat() [1/2]

void com.google.protobuf.TextFormatTest.testOneofTextFormat ( ) throws Exception
inline

◆ testOneofTextFormat() [2/2]

void com.google.protobuf.TextFormatTest.testOneofTextFormat ( ) throws Exception
inline

◆ testParse() [1/2]

void com.google.protobuf.TextFormatTest.testParse ( ) throws Exception
inline

◆ testParse() [2/2]

void com.google.protobuf.TextFormatTest.testParse ( ) throws Exception
inline

◆ testParseAdjacentStringLiterals() [1/2]

void com.google.protobuf.TextFormatTest.testParseAdjacentStringLiterals ( ) throws Exception
inline

◆ testParseAdjacentStringLiterals() [2/2]

void com.google.protobuf.TextFormatTest.testParseAdjacentStringLiterals ( ) throws Exception
inline

◆ testParseBoolean() [1/2]

void com.google.protobuf.TextFormatTest.testParseBoolean ( ) throws Exception
inline

◆ testParseBoolean() [2/2]

void com.google.protobuf.TextFormatTest.testParseBoolean ( ) throws Exception
inline

◆ testParseErrors() [1/2]

void com.google.protobuf.TextFormatTest.testParseErrors ( ) throws Exception
inline

◆ testParseErrors() [2/2]

void com.google.protobuf.TextFormatTest.testParseErrors ( ) throws Exception
inline

◆ testParseExtensions() [1/2]

void com.google.protobuf.TextFormatTest.testParseExtensions ( ) throws Exception
inline

◆ testParseExtensions() [2/2]

void com.google.protobuf.TextFormatTest.testParseExtensions ( ) throws Exception
inline

◆ testParseInfoTreeBuilding() [1/2]

void com.google.protobuf.TextFormatTest.testParseInfoTreeBuilding ( ) throws Exception
inline

◆ testParseInfoTreeBuilding() [2/2]

void com.google.protobuf.TextFormatTest.testParseInfoTreeBuilding ( ) throws Exception
inline

◆ testParseInitialized() [1/2]

void com.google.protobuf.TextFormatTest.testParseInitialized ( ) throws Exception
inline

◆ testParseInitialized() [2/2]

void com.google.protobuf.TextFormatTest.testParseInitialized ( ) throws Exception
inline

◆ testParseInteger() [1/2]

void com.google.protobuf.TextFormatTest.testParseInteger ( ) throws Exception
inline

◆ testParseInteger() [2/2]

void com.google.protobuf.TextFormatTest.testParseInteger ( ) throws Exception
inline

◆ testParseLongString() [1/2]

void com.google.protobuf.TextFormatTest.testParseLongString ( ) throws Exception
inline

◆ testParseLongString() [2/2]

void com.google.protobuf.TextFormatTest.testParseLongString ( ) throws Exception
inline

◆ testParseNonRepeatedFields() [1/2]

void com.google.protobuf.TextFormatTest.testParseNonRepeatedFields ( ) throws Exception
inline

◆ testParseNonRepeatedFields() [2/2]

void com.google.protobuf.TextFormatTest.testParseNonRepeatedFields ( ) throws Exception
inline

◆ testParseShortRepeatedFormOfEmptyRepeatedFields() [1/2]

void com.google.protobuf.TextFormatTest.testParseShortRepeatedFormOfEmptyRepeatedFields ( ) throws Exception
inline

◆ testParseShortRepeatedFormOfEmptyRepeatedFields() [2/2]

void com.google.protobuf.TextFormatTest.testParseShortRepeatedFormOfEmptyRepeatedFields ( ) throws Exception
inline

◆ testParseShortRepeatedFormOfNonRepeatedFields() [1/2]

void com.google.protobuf.TextFormatTest.testParseShortRepeatedFormOfNonRepeatedFields ( ) throws Exception
inline

◆ testParseShortRepeatedFormOfNonRepeatedFields() [2/2]

void com.google.protobuf.TextFormatTest.testParseShortRepeatedFormOfNonRepeatedFields ( ) throws Exception
inline

◆ testParseShortRepeatedFormOfRepeatedFields() [1/2]

void com.google.protobuf.TextFormatTest.testParseShortRepeatedFormOfRepeatedFields ( ) throws Exception
inline

◆ testParseShortRepeatedFormOfRepeatedFields() [2/2]

void com.google.protobuf.TextFormatTest.testParseShortRepeatedFormOfRepeatedFields ( ) throws Exception
inline

◆ testParseShortRepeatedFormWithTrailingComma() [1/2]

void com.google.protobuf.TextFormatTest.testParseShortRepeatedFormWithTrailingComma ( ) throws Exception
inline

◆ testParseShortRepeatedFormWithTrailingComma() [2/2]

void com.google.protobuf.TextFormatTest.testParseShortRepeatedFormWithTrailingComma ( ) throws Exception
inline

◆ testParseString() [1/2]

void com.google.protobuf.TextFormatTest.testParseString ( ) throws Exception
inline

◆ testParseString() [2/2]

void com.google.protobuf.TextFormatTest.testParseString ( ) throws Exception
inline

◆ testParseUninitialized() [1/2]

void com.google.protobuf.TextFormatTest.testParseUninitialized ( ) throws Exception
inline

◆ testParseUninitialized() [2/2]

void com.google.protobuf.TextFormatTest.testParseUninitialized ( ) throws Exception
inline

◆ testParseUnknownExtensions() [1/2]

void com.google.protobuf.TextFormatTest.testParseUnknownExtensions ( ) throws Exception
inline

◆ testParseUnknownExtensions() [2/2]

void com.google.protobuf.TextFormatTest.testParseUnknownExtensions ( ) throws Exception
inline

◆ testPreservesFloatingPointNegative0()

void com.google.protobuf.TextFormatTest.testPreservesFloatingPointNegative0 ( ) throws Exception
inline

◆ testPrintAny_anyFromWithNoTypeUrlField() [1/2]

void com.google.protobuf.TextFormatTest.testPrintAny_anyFromWithNoTypeUrlField ( ) throws Exception
inline

◆ testPrintAny_anyFromWithNoTypeUrlField() [2/2]

void com.google.protobuf.TextFormatTest.testPrintAny_anyFromWithNoTypeUrlField ( ) throws Exception
inline

◆ testPrintAny_anyFromWithNoValueField() [1/2]

void com.google.protobuf.TextFormatTest.testPrintAny_anyFromWithNoValueField ( ) throws Exception
inline

◆ testPrintAny_anyFromWithNoValueField() [2/2]

void com.google.protobuf.TextFormatTest.testPrintAny_anyFromWithNoValueField ( ) throws Exception
inline

◆ testPrintAny_anyWithDynamicMessage() [1/2]

void com.google.protobuf.TextFormatTest.testPrintAny_anyWithDynamicMessage ( ) throws Exception
inline

◆ testPrintAny_anyWithDynamicMessage() [2/2]

void com.google.protobuf.TextFormatTest.testPrintAny_anyWithDynamicMessage ( ) throws Exception
inline

◆ testPrintAny_anyWithInvalidFieldType() [1/2]

void com.google.protobuf.TextFormatTest.testPrintAny_anyWithInvalidFieldType ( ) throws Exception
inline

◆ testPrintAny_anyWithInvalidFieldType() [2/2]

void com.google.protobuf.TextFormatTest.testPrintAny_anyWithInvalidFieldType ( ) throws Exception
inline

◆ testPrintAny_customBuiltTypeRegistry() [1/2]

void com.google.protobuf.TextFormatTest.testPrintAny_customBuiltTypeRegistry ( ) throws Exception
inline

◆ testPrintAny_customBuiltTypeRegistry() [2/2]

void com.google.protobuf.TextFormatTest.testPrintAny_customBuiltTypeRegistry ( ) throws Exception
inline

◆ testPrintExotic() [1/2]

void com.google.protobuf.TextFormatTest.testPrintExotic ( ) throws Exception
inline

◆ testPrintExotic() [2/2]

void com.google.protobuf.TextFormatTest.testPrintExotic ( ) throws Exception
inline

◆ testPrintExtensions() [1/2]

void com.google.protobuf.TextFormatTest.testPrintExtensions ( ) throws Exception
inline

Print TestAllExtensions and compare with golden file.

Definition at line 179 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ testPrintExtensions() [2/2]

void com.google.protobuf.TextFormatTest.testPrintExtensions ( ) throws Exception
inline

Print TestAllExtensions and compare with golden file.

Definition at line 190 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ testPrintField() [1/2]

void com.google.protobuf.TextFormatTest.testPrintField ( ) throws Exception
inline

◆ testPrintField() [2/2]

void com.google.protobuf.TextFormatTest.testPrintField ( ) throws Exception
inline

◆ testPrintFieldValue() [1/2]

void com.google.protobuf.TextFormatTest.testPrintFieldValue ( ) throws Exception
inline

◆ testPrintFieldValue() [2/2]

void com.google.protobuf.TextFormatTest.testPrintFieldValue ( ) throws Exception
inline

◆ testPrintFieldValueThrows()

void com.google.protobuf.TextFormatTest.testPrintFieldValueThrows ( ) throws Exception
inline

◆ testPrintMessage() [1/2]

void com.google.protobuf.TextFormatTest.testPrintMessage ( ) throws Exception
inline

Print TestAllTypes and compare with golden file.

Definition at line 155 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ testPrintMessage() [2/2]

void com.google.protobuf.TextFormatTest.testPrintMessage ( ) throws Exception
inline

Print TestAllTypes and compare with golden file.

Definition at line 164 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ testPrintMessageBuilder() [1/2]

void com.google.protobuf.TextFormatTest.testPrintMessageBuilder ( ) throws Exception
inline

Print TestAllTypes as Builder and compare with golden file.

Definition at line 167 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ testPrintMessageBuilder() [2/2]

void com.google.protobuf.TextFormatTest.testPrintMessageBuilder ( ) throws Exception
inline

Print TestAllTypes as Builder and compare with golden file.

Definition at line 177 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ testPrintMessageSet() [1/2]

void com.google.protobuf.TextFormatTest.testPrintMessageSet ( ) throws Exception
inline

◆ testPrintMessageSet() [2/2]

void com.google.protobuf.TextFormatTest.testPrintMessageSet ( ) throws Exception
inline

◆ testPrintToUnicodeString() [1/2]

void com.google.protobuf.TextFormatTest.testPrintToUnicodeString ( ) throws Exception
inline

◆ testPrintToUnicodeString() [2/2]

void com.google.protobuf.TextFormatTest.testPrintToUnicodeString ( ) throws Exception
inline

◆ testPrintToUnicodeString_unknown() [1/2]

void com.google.protobuf.TextFormatTest.testPrintToUnicodeString_unknown ( )
inline

◆ testPrintToUnicodeString_unknown() [2/2]

void com.google.protobuf.TextFormatTest.testPrintToUnicodeString_unknown ( )
inline

◆ testPrintToUnicodeStringWithNewlines() [1/2]

void com.google.protobuf.TextFormatTest.testPrintToUnicodeStringWithNewlines ( ) throws Exception
inline

◆ testPrintToUnicodeStringWithNewlines() [2/2]

void com.google.protobuf.TextFormatTest.testPrintToUnicodeStringWithNewlines ( ) throws Exception
inline

◆ testPrintUnknownFields() [1/2]

void com.google.protobuf.TextFormatTest.testPrintUnknownFields ( ) throws Exception
inline

◆ testPrintUnknownFields() [2/2]

void com.google.protobuf.TextFormatTest.testPrintUnknownFields ( ) throws Exception
inline

◆ testRoundtripProto3Optional()

void com.google.protobuf.TextFormatTest.testRoundtripProto3Optional ( ) throws Exception
inline

◆ testShortDebugString() [1/2]

void com.google.protobuf.TextFormatTest.testShortDebugString ( )
inline

◆ testShortDebugString() [2/2]

void com.google.protobuf.TextFormatTest.testShortDebugString ( )
inline

◆ testShortDebugString_field() [1/2]

void com.google.protobuf.TextFormatTest.testShortDebugString_field ( )
inline

◆ testShortDebugString_field() [2/2]

void com.google.protobuf.TextFormatTest.testShortDebugString_field ( )
inline

◆ testShortDebugString_unknown() [1/2]

void com.google.protobuf.TextFormatTest.testShortDebugString_unknown ( )
inline

◆ testShortDebugString_unknown() [2/2]

void com.google.protobuf.TextFormatTest.testShortDebugString_unknown ( )
inline

◆ testSortMapFields()

void com.google.protobuf.TextFormatTest.testSortMapFields ( ) throws Exception
inline

Member Data Documentation

◆ ALL_EXTENSIONS_SET_TEXT

final String com.google.protobuf.TextFormatTest.ALL_EXTENSIONS_SET_TEXT
staticprivate
Initial value:
=
TestUtil.readTextFromFile("text_format_unittest_extensions_data.txt")

Definition at line 89 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ ALL_FIELDS_SET_TEXT

final String com.google.protobuf.TextFormatTest.ALL_FIELDS_SET_TEXT
staticprivate
Initial value:
=
TestUtil.readTextFromFile("text_format_unittest_data_oneof_implemented.txt")

Definition at line 87 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ allExtensionsSetText

String com.google.protobuf.TextFormatTest.allExtensionsSetText
staticprivate
Initial value:
=
TestUtil.readTextFromFile("text_format_unittest_extensions_data.txt")

Definition at line 81 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ allFieldsSetText

String com.google.protobuf.TextFormatTest.allFieldsSetText
staticprivate
Initial value:
=
TestUtil.readTextFromFile("text_format_unittest_data_oneof_implemented.txt")

Definition at line 79 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ CANONICAL_EXOTIC_TEXT

final String com.google.protobuf.TextFormatTest.CANONICAL_EXOTIC_TEXT
staticprivate
Initial value:
=
.replace(": .", ": 0.")
.replace(": -.", ": -0.")
.replace("23e", "23E")
.replace("E+", "E")
.replace("0.23E17", "2.3E16")
.replace(",", "")

Definition at line 122 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ canonicalExoticText

String com.google.protobuf.TextFormatTest.canonicalExoticText
staticprivate
Initial value:
=
.replace(": .", ": 0.")
.replace(": -.", ": -0.")
.replace("23e", "23E")
.replace("E+", "E")
.replace("0.23E17", "2.3E16")
.replace(",", "")

Definition at line 114 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ DEFAULT_PARSER

final TextFormat.Parser com.google.protobuf.TextFormatTest.DEFAULT_PARSER = TextFormat.Parser.newBuilder().build()
staticprivate

◆ defaultParser

final TextFormat.Parser com.google.protobuf.TextFormatTest.defaultParser = TextFormat.Parser.newBuilder().build()
private

◆ ESCAPE_TEST_STRING

static final String com.google.protobuf.TextFormatTest.ESCAPE_TEST_STRING
staticprivate
Initial value:
=
"\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\"

Definition at line 71 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ ESCAPE_TEST_STRING_ESCAPED

static final String com.google.protobuf.TextFormatTest.ESCAPE_TEST_STRING_ESCAPED
staticprivate
Initial value:
=
"\\\"A string with \\' characters \\n and \\r newlines "
+ "and \\t tabs and \\001 slashes \\\\"

Definition at line 75 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ EXOTIC_TEXT

final String com.google.protobuf.TextFormatTest.EXOTIC_TEXT
staticprivate
Initial value:
=
""
+ "repeated_int32: -1\n"
+ "repeated_int32: -2147483648\n"
+ "repeated_int64: -1,\n"
+ "repeated_int64: -9223372036854775808\n"
+ "repeated_uint32: 4294967295\n"
+ "repeated_uint32: 2147483648\n"
+ "repeated_uint64: 18446744073709551615\n"
+ "repeated_uint64: 9223372036854775808\n"
+ "repeated_double: 123.0\n"
+ "repeated_double: 123.5\n"
+ "repeated_double: 0.125\n"
+ "repeated_double: .125\n"
+ "repeated_double: -.125\n"
+ "repeated_double: 1.23E17\n"
+ "repeated_double: 1.23E+17\n"
+ "repeated_double: -1.23e-17\n"
+ "repeated_double: .23e+17\n"
+ "repeated_double: -.23E17\n"
+ "repeated_double: 1.235E22\n"
+ "repeated_double: 1.235E-18\n"
+ "repeated_double: 123.456789\n"
+ "repeated_double: Infinity\n"
+ "repeated_double: -Infinity\n"
+ "repeated_double: NaN\n"
+ "repeated_string: \"\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\""
+ "\\341\\210\\264\"\n"
+ "repeated_bytes: \"\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"\\376\"\n"

Definition at line 92 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ exoticText

String com.google.protobuf.TextFormatTest.exoticText
staticprivate
Initial value:
=
""
+ "repeated_int32: -1\n"
+ "repeated_int32: -2147483648\n"
+ "repeated_int64: -1,\n"
+ "repeated_int64: -9223372036854775808\n"
+ "repeated_uint32: 4294967295\n"
+ "repeated_uint32: 2147483648\n"
+ "repeated_uint64: 18446744073709551615\n"
+ "repeated_uint64: 9223372036854775808\n"
+ "repeated_double: 123.0\n"
+ "repeated_double: 123.5\n"
+ "repeated_double: 0.125\n"
+ "repeated_double: .125\n"
+ "repeated_double: -.125\n"
+ "repeated_double: 1.23E17\n"
+ "repeated_double: 1.23E+17\n"
+ "repeated_double: -1.23e-17\n"
+ "repeated_double: .23e+17\n"
+ "repeated_double: -.23E17\n"
+ "repeated_double: 1.235E22\n"
+ "repeated_double: 1.235E-18\n"
+ "repeated_double: 123.456789\n"
+ "repeated_double: Infinity\n"
+ "repeated_double: -Infinity\n"
+ "repeated_double: NaN\n"
+ "repeated_string: \"\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\""
+ "\\341\\210\\264\"\n"
+ "repeated_bytes: \"\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"\\376\"\n"

Definition at line 84 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ MESSAGE_SET_TEXT

final String com.google.protobuf.TextFormatTest.MESSAGE_SET_TEXT
staticprivate
Initial value:
=
""
+ "[protobuf_unittest.TestMessageSetExtension1] {\n"
+ " i: 123\n"
+ "}\n"
+ "[protobuf_unittest.TestMessageSetExtension2] {\n"
+ " str: \"foo\"\n"
+ "}\n"

Definition at line 131 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ MESSAGE_SET_TEXT_WITH_REPEATED_EXTENSION

final String com.google.protobuf.TextFormatTest.MESSAGE_SET_TEXT_WITH_REPEATED_EXTENSION
staticprivate
Initial value:
=
""
+ "[protobuf_unittest.TestMessageSetExtension1] {\n"
+ " i: 123\n"
+ "}\n"
+ "[protobuf_unittest.TestMessageSetExtension1] {\n"
+ " i: 456\n"
+ "}\n"

Definition at line 140 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ messageSetText

String com.google.protobuf.TextFormatTest.messageSetText
private
Initial value:
=
""
+ "[protobuf_unittest.TestMessageSetExtension1] {\n"
+ " i: 123\n"
+ "}\n"
+ "[protobuf_unittest.TestMessageSetExtension2] {\n"
+ " str: \"foo\"\n"
+ "}\n"

Definition at line 123 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ messageSetTextWithRepeatedExtension

String com.google.protobuf.TextFormatTest.messageSetTextWithRepeatedExtension
private
Initial value:
=
""
+ "[protobuf_unittest.TestMessageSetExtension1] {\n"
+ " i: 123\n"
+ "}\n"
+ "[protobuf_unittest.TestMessageSetExtension1] {\n"
+ " i: 456\n"
+ "}\n"

Definition at line 132 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ PARSER_ALLOWING_UNKNOWN_EXTENSIONS

final TextFormat.Parser com.google.protobuf.TextFormatTest.PARSER_ALLOWING_UNKNOWN_EXTENSIONS
staticprivate
Initial value:
=
TextFormat.Parser.newBuilder().setAllowUnknownExtensions(true).build()

Definition at line 152 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ PARSER_ALLOWING_UNKNOWN_FIELDS

final TextFormat.Parser com.google.protobuf.TextFormatTest.PARSER_ALLOWING_UNKNOWN_FIELDS
staticprivate
Initial value:
=
TextFormat.Parser.newBuilder().setAllowUnknownFields(true).build()

Definition at line 149 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ PARSER_WITH_OVERWRITE_FORBIDDEN

final TextFormat.Parser com.google.protobuf.TextFormatTest.PARSER_WITH_OVERWRITE_FORBIDDEN
staticprivate
Initial value:
=
TextFormat.Parser.newBuilder()
.setSingularOverwritePolicy(SingularOverwritePolicy.FORBID_SINGULAR_OVERWRITES)
.build()

Definition at line 155 of file protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ parserAllowingUnknownExtensions

final TextFormat.Parser com.google.protobuf.TextFormatTest.parserAllowingUnknownExtensions
private
Initial value:
=
TextFormat.Parser.newBuilder().setAllowUnknownExtensions(true).build()

Definition at line 144 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ parserAllowingUnknownFields

final TextFormat.Parser com.google.protobuf.TextFormatTest.parserAllowingUnknownFields
private
Initial value:
=
TextFormat.Parser.newBuilder().setAllowUnknownFields(true).build()

Definition at line 141 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.

◆ parserWithOverwriteForbidden

final TextFormat.Parser com.google.protobuf.TextFormatTest.parserWithOverwriteForbidden
private
Initial value:
=
TextFormat.Parser.newBuilder()
.setSingularOverwritePolicy(SingularOverwritePolicy.FORBID_SINGULAR_OVERWRITES)
.build()

Definition at line 147 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java.


The documentation for this class was generated from the following file:
grpc::protobuf::TextFormat
GRPC_CUSTOM_TEXTFORMAT TextFormat
Definition: config_grpc_cli.h:59
com.google.protobuf.TextFormatTest.exoticText
static String exoticText
Definition: bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java:84
com.google.protobuf.TextFormatTest.EXOTIC_TEXT
static final String EXOTIC_TEXT
Definition: protobuf/java/core/src/test/java/com/google/protobuf/TextFormatTest.java:92


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:08