Classes | Namespaces | Macros | Functions
protobuf/src/google/protobuf/text_format_unittest.cc File Reference
#include <google/protobuf/text_format.h>
#include <math.h>
#include <stdlib.h>
#include <atomic>
#include <limits>
#include <memory>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/testing/file.h>
#include <google/protobuf/any.pb.h>
#include <google/protobuf/map_unittest.pb.h>
#include <google/protobuf/test_util.h>
#include <google/protobuf/test_util2.h>
#include <google/protobuf/unittest.pb.h>
#include <google/protobuf/unittest_mset.pb.h>
#include <google/protobuf/unittest_mset_wire_format.pb.h>
#include <google/protobuf/unittest_proto3.pb.h>
#include <google/protobuf/io/tokenizer.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/stubs/strutil.h>
#include <gmock/gmock.h>
#include <google/protobuf/testing/googletest.h>
#include <gtest/gtest.h>
#include <google/protobuf/stubs/substitute.h>
#include <google/protobuf/port_def.inc>
#include <google/protobuf/port_undef.inc>
Include dependency graph for protobuf/src/google/protobuf/text_format_unittest.cc:

Go to the source code of this file.

Classes

class  google::protobuf::text_format_unittest::CompactRepeatedFieldPrinter
 
class  google::protobuf::text_format_unittest::CustomInt32FieldValuePrinter
 
class  google::protobuf::text_format_unittest::CustomMessageContentFieldValuePrinter
 
class  google::protobuf::text_format_unittest::CustomMessageFieldValuePrinter
 
class  google::protobuf::text_format_unittest::CustomMultilineCommentPrinter
 
class  google::protobuf::text_format_unittest::CustomNestedMessagePrinter
 
class  google::protobuf::text_format_unittest::CustomUInt32FieldValuePrinter
 
class  google::protobuf::text_format_unittest::TextFormatParserTest::MockErrorCollector
 
class  google::protobuf::text_format_unittest::MultilineStringPrinter
 
class  google::protobuf::text_format_unittest::TextFormatExtensionsTest
 
class  google::protobuf::text_format_unittest::TextFormatMessageSetTest
 
class  google::protobuf::text_format_unittest::TextFormatParserTest
 
class  google::protobuf::text_format_unittest::TextFormatSilentMarkerTest
 
class  google::protobuf::text_format_unittest::TextFormatTest
 

Namespaces

 google
 
 google::protobuf
 
 google.protobuf.internal
 
 google::protobuf::text_format_unittest
 

Macros

#define EXPECT_BOOL_FIELD(name, value, valuestring)
 
#define EXPECT_DOUBLE_FIELD(name, value, valuestring)
 
#define EXPECT_FIELD(name, value, valuestring)
 
#define EXPECT_FLOAT_FIELD(name, value, valuestring)
 
#define EXPECT_INVALID(name, valuestring)
 

Functions

static std::string google::protobuf::text_format_unittest::RemoveRedundantZeros (std::string text)
 
 google::protobuf::text_format_unittest::TEST (TextFormatFloatingPointTest, PreservesNegative0)
 
 google::protobuf::text_format_unittest::TEST (TextFormatUnknownFieldTest, TestAnyInUnknownField)
 
 google::protobuf::text_format_unittest::TEST (TextFormatUnknownFieldTest, TestUnknownExtension)
 
 google::protobuf::text_format_unittest::TEST (TextFormatUnknownFieldTest, TestUnknownField)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatExtensionsTest, Extensions)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatExtensionsTest, ParseExtensions)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatMessageSetTest, Deserialize)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatMessageSetTest, Serialize)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, AllowIgnoreCapitalizationError)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ExplicitDelimiters)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, FailsOnTokenizationError)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, InvalidCapitalization)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, InvalidFieldName)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, InvalidFieldValues)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, InvalidToken)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, MergeDuplicateOptional)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, MergeDuplicateRequired)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, MessageDelimiters)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, MissingRequired)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseAnyFieldWithAdditionalWhiteSpaces)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseDeprecatedField)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseDuplicateOptional)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseDuplicateRequired)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseExtensionFieldWithAdditionalWhiteSpaces)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseFieldValueFromString)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseInfoTreeBuilding)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseNormalFieldWithAdditionalWhiteSpaces)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseSkippedFieldWithAdditionalWhiteSpaces)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, PrintErrorsToStderr)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, SetRecursionLimit)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, SetRecursionLimitUnknownFieldMessage)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, SetRecursionLimitUnknownFieldValue)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, UnknownExtension)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatSilentMarkerTest, AnyFieldAsFirstField)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatSilentMarkerTest, ExtensionFieldAsFirstField)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatSilentMarkerTest, MapFieldAsFirstField)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatSilentMarkerTest, MessageFieldAsFirstField)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatSilentMarkerTest, NonMessageFieldAsFirstField)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatSilentMarkerTest, UnknownFieldAsFirstField)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, AllowPartial)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, Basic)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, Comments)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, CompactRepeatedFieldPrinter)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, CustomMessagePrinter)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, CustomPrinterForComments)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, CustomPrinterForMessageContent)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, CustomPrinterForMultilineComments)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, DefaultCustomFieldPrinter)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ErrorCasesRegisteringFieldValuePrinterShouldFail)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, FieldSpecificCustomPrinter)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, FieldSpecificCustomPrinterRegisterSameFieldTwice)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, MultilineStringPrinter)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, OptionalColon)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseBasic)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseConcatenatedString)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseEnumFieldFromNegativeNumber)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseEnumFieldFromNumber)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseExotic)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseFloatWithSuffix)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseShortRepeatedConcatenatedWithEmpty)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseShortRepeatedEmpty)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseShortRepeatedForm)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseShortRepeatedWithTrailingComma)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseStringEscape)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseUnknownEnumFieldProto3)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintBufferTooSmall)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintDeeplyNestedUnknownMessage)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintExotic)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintFieldsInIndexOrder)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintFloatPrecision)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintMessageSingleLine)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintMessageWithIndent)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintUnknownEnumFieldProto3)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintUnknownFields)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintUnknownFieldsHidden)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintUnknownMessage)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ShortDebugString)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ShortPrimitiveRepeateds)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, StringEscape)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, Utf8DebugString)
 

Macro Definition Documentation

◆ EXPECT_BOOL_FIELD

#define EXPECT_BOOL_FIELD (   name,
  value,
  valuestring 
)
Value:
EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \
valuestring, d->FindFieldByName("optional_" #name), message.get())); \
EXPECT_TRUE(message->optional_##name() == value); \
EXPECT_TRUE(message->has_optional_##name());

◆ EXPECT_DOUBLE_FIELD

#define EXPECT_DOUBLE_FIELD (   name,
  value,
  valuestring 
)
Value:
EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \
valuestring, d->FindFieldByName("optional_" #name), message.get())); \
EXPECT_DOUBLE_EQ(value, message->optional_##name()); \
EXPECT_TRUE(message->has_optional_##name());

◆ EXPECT_FIELD

#define EXPECT_FIELD (   name,
  value,
  valuestring 
)
Value:
EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \
valuestring, d->FindFieldByName("optional_" #name), message.get())); \
EXPECT_EQ(value, message->optional_##name()); \
EXPECT_TRUE(message->has_optional_##name());

◆ EXPECT_FLOAT_FIELD

#define EXPECT_FLOAT_FIELD (   name,
  value,
  valuestring 
)
Value:
EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \
valuestring, d->FindFieldByName("optional_" #name), message.get())); \
EXPECT_FLOAT_EQ(value, message->optional_##name()); \
EXPECT_TRUE(message->has_optional_##name());

◆ EXPECT_INVALID

#define EXPECT_INVALID (   name,
  valuestring 
)
Value:
EXPECT_FALSE(TextFormat::ParseFieldValueFromString( \
valuestring, d->FindFieldByName("optional_" #name), message.get()));
EXPECT_FALSE
#define EXPECT_FALSE(condition)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:1970
setup.name
name
Definition: setup.py:542
message
char * message
Definition: libuv/docs/code/tty-gravity/main.c:12
d
static const fe d
Definition: curve25519_tables.h:19
value
const char * value
Definition: hpack_parser_table.cc:165
EXPECT_TRUE
#define EXPECT_TRUE(condition)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:1967


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