webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Namespaces | Macros | Functions | Variables
text_format_unittest.cc File Reference
#include <google/protobuf/text_format.h>
#include <math.h>
#include <stdlib.h>
#include <limits>
#include <memory>
#include <google/protobuf/stubs/shared_ptr.h>
#include <google/protobuf/stubs/logging.h>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/testing/file.h>
#include <google/protobuf/test_util.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/io/tokenizer.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/substitute.h>
#include <google/protobuf/testing/googletest.h>
#include <gtest/gtest.h>
#include <google/protobuf/stubs/mathlimits.h>

Classes

class  google::protobuf::text_format_unittest::TextFormatTest
 
class  google::protobuf::text_format_unittest::TextFormatExtensionsTest
 
class  google::protobuf::text_format_unittest::CustomUInt32FieldValuePrinter
 
class  google::protobuf::text_format_unittest::CustomInt32FieldValuePrinter
 
class  google::protobuf::text_format_unittest::CustomMessageFieldValuePrinter
 
class  google::protobuf::text_format_unittest::CustomMultilineCommentPrinter
 
class  google::protobuf::text_format_unittest::TextFormatParserTest
 
class  google::protobuf::text_format_unittest::TextFormatParserTest::MockErrorCollector
 
class  google::protobuf::text_format_unittest::TextFormatMessageSetTest
 

Namespaces

 google
 
 google::protobuf
 
 google::protobuf::text_format_unittest
 

Macros

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

Functions

 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, Basic)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatExtensionsTest, Extensions)
 
 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)
 
 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, PrintMessageWithIndent)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintMessageSingleLine)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintBufferTooSmall)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, DefaultCustomFieldPrinter)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, FieldSpecificCustomPrinter)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ErrorCasesRegisteringFieldValuePrinterShouldFail)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, CustomPrinterForComments)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, CustomPrinterForMultilineComments)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseBasic)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatExtensionsTest, ParseExtensions)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseEnumFieldFromNumber)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseEnumFieldFromNegativeNumber)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseStringEscape)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseConcatenatedString)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseFloatWithSuffix)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseShortRepeatedForm)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, Comments)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, OptionalColon)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintExotic)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintFloatPrecision)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, AllowPartial)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, ParseExotic)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatTest, PrintFieldsInIndexOrder)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseInfoTreeBuilding)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseFieldValueFromString)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, InvalidToken)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, InvalidFieldName)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, InvalidCapitalization)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, AllowIgnoreCapitalizationError)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, InvalidFieldValues)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, MessageDelimiters)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, UnknownExtension)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, MissingRequired)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseDuplicateRequired)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseDuplicateOptional)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, MergeDuplicateRequired)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, MergeDuplicateOptional)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ExplicitDelimiters)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, PrintErrorsToStderr)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, FailsOnTokenizationError)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatParserTest, ParseDeprecatedField)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatMessageSetTest, Serialize)
 
 google::protobuf::text_format_unittest::TEST_F (TextFormatMessageSetTest, Deserialize)
 

Variables

const string google::protobuf::text_format_unittest::kEscapeTestString
 
const string google::protobuf::text_format_unittest::kEscapeTestStringEscaped
 

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());
EGLAttrib * value
Definition: eglext.h:120
EGLImageKHR EGLint * name
Definition: eglext.h:851
#define EXPECT_TRUE(condition)
Definition: gtest.h:1696
GLuint GLsizei const GLchar * message
Definition: gl2ext.h:137
#define d
Definition: float-mm.c:30

◆ 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());
EGLAttrib * value
Definition: eglext.h:120
EGLImageKHR EGLint * name
Definition: eglext.h:851
#define EXPECT_TRUE(condition)
Definition: gtest.h:1696
GLuint GLsizei const GLchar * message
Definition: gl2ext.h:137
#define d
Definition: float-mm.c:30

◆ 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());
EGLAttrib * value
Definition: eglext.h:120
EGLImageKHR EGLint * name
Definition: eglext.h:851
#define EXPECT_TRUE(condition)
Definition: gtest.h:1696
GLuint GLsizei const GLchar * message
Definition: gl2ext.h:137
#define d
Definition: float-mm.c:30

◆ 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());
EGLAttrib * value
Definition: eglext.h:120
EGLImageKHR EGLint * name
Definition: eglext.h:851
#define EXPECT_TRUE(condition)
Definition: gtest.h:1696
GLuint GLsizei const GLchar * message
Definition: gl2ext.h:137
#define d
Definition: float-mm.c:30

◆ EXPECT_INVALID

#define EXPECT_INVALID (   name,
  valuestring 
)
Value:
EXPECT_FALSE(TextFormat::ParseFieldValueFromString( \
valuestring, d->FindFieldByName("optional_" #name), message.get()));
#define EXPECT_FALSE(condition)
Definition: gtest.h:1699
EGLImageKHR EGLint * name
Definition: eglext.h:851
GLuint GLsizei const GLchar * message
Definition: gl2ext.h:137
#define d
Definition: float-mm.c:30