Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
google::protobuf::BinaryAndJsonConformanceSuite Class Reference

#include <binary_json_conformance_suite.h>

Inheritance diagram for google::protobuf::BinaryAndJsonConformanceSuite:
Inheritance graph
[legend]

Public Member Functions

 BinaryAndJsonConformanceSuite ()
 
- Public Member Functions inherited from google::protobuf::ConformanceTestSuite
 ConformanceTestSuite ()
 
string GetFailureListFlagName ()
 
bool RunSuite (ConformanceTestRunner *runner, std::string *output, const std::string &filename, conformance::FailureSet *failure_list)
 
void SetEnforceRecommended (bool value)
 
void SetFailureListFlagName (const std::string &failure_list_flag_name)
 
void SetVerbose (bool verbose)
 
virtual ~ConformanceTestSuite ()
 

Private Types

typedef std::function< bool(const Json::Value &)> Validator
 

Private Member Functions

void ExpectHardParseFailureForProto (const std::string &proto, const std::string &test_name, ConformanceLevel level)
 
void ExpectParseFailureForJson (const string &test_name, ConformanceLevel level, const string &input_json)
 
void ExpectParseFailureForProto (const std::string &proto, const std::string &test_name, ConformanceLevel level)
 
void ExpectParseFailureForProtoWithProtoVersion (const string &proto, const string &test_name, ConformanceLevel level, bool is_proto3)
 
void ExpectSerializeFailureForJson (const string &test_name, ConformanceLevel level, const string &text_format)
 
bool ParseJsonResponse (const conformance::ConformanceResponse &response, Message *test_message)
 
bool ParseResponse (const conformance::ConformanceResponse &response, const ConformanceRequestSetting &setting, Message *test_message) override
 
void RunSuiteImpl ()
 
void RunValidBinaryProtobufTest (const string &test_name, ConformanceLevel level, const string &input_protobuf, bool is_proto3)
 
void RunValidJsonIgnoreUnknownTest (const string &test_name, ConformanceLevel level, const string &input_json, const string &equivalent_text_format)
 
void RunValidJsonTest (const string &test_name, ConformanceLevel level, const string &input_json, const string &equivalent_text_format)
 
void RunValidJsonTestWithProtobufInput (const string &test_name, ConformanceLevel level, const protobuf_test_messages::proto3::TestAllTypesProto3 &input, const string &equivalent_text_format)
 
void RunValidJsonTestWithValidator (const string &test_name, ConformanceLevel level, const string &input_json, const Validator &validator)
 
void RunValidProtobufTest (const string &test_name, ConformanceLevel level, const string &input_protobuf, const string &equivalent_text_format, bool is_proto3)
 
void RunValidProtobufTestWithMessage (const string &test_name, ConformanceLevel level, const Message *input, const string &equivalent_text_format, bool is_proto3)
 
void TestIllegalTags ()
 
template<class MessageType >
void TestOneofMessage (MessageType &message, bool is_proto3)
 
void TestPrematureEOFForType (google::protobuf::FieldDescriptor::Type type)
 
template<class MessageType >
void TestUnknownMessage (MessageType &message, bool is_proto3)
 
void TestValidDataForType (google::protobuf::FieldDescriptor::Type, std::vector< std::pair< std::string, std::string >> values)
 

Private Attributes

std::unique_ptr< google::protobuf::util::TypeResolvertype_resolver_
 
std::string type_url_
 

Additional Inherited Members

- Protected Types inherited from google::protobuf::ConformanceTestSuite
enum  ConformanceLevel { REQUIRED = 0, RECOMMENDED = 1 }
 
- Protected Member Functions inherited from google::protobuf::ConformanceTestSuite
void AddExpectedFailedTest (const std::string &test_name)
 
bool CheckSetEmpty (const std::set< string > &set_to_check, const std::string &write_to_file, const std::string &msg)
 
void ReportFailure (const string &test_name, ConformanceLevel level, const conformance::ConformanceRequest &request, const conformance::ConformanceResponse &response, const char *fmt,...)
 
void ReportSkip (const string &test_name, const conformance::ConformanceRequest &request, const conformance::ConformanceResponse &response)
 
void ReportSuccess (const std::string &test_name)
 
void RunTest (const std::string &test_name, const conformance::ConformanceRequest &request, conformance::ConformanceResponse *response)
 
void RunValidBinaryInputTest (const ConformanceRequestSetting &setting, const string &equivalent_wire_format)
 
void RunValidInputTest (const ConformanceRequestSetting &setting, const string &equivalent_text_format)
 
void VerifyResponse (const ConformanceRequestSetting &setting, const string &equivalent_wire_format, const conformance::ConformanceResponse &response, bool need_report_success)
 
string WireFormatToString (conformance::WireFormat wire_format)
 
- Protected Attributes inherited from google::protobuf::ConformanceTestSuite
bool enforce_recommended_
 
int expected_failures_
 
std::set< std::stringexpected_to_fail_
 
std::string failure_list_filename_
 
std::string failure_list_flag_name_
 
std::string output_
 
ConformanceTestRunnerrunner_
 
std::set< std::stringskipped_
 
int successes_
 
std::set< std::stringtest_names_
 
std::set< std::stringunexpected_failing_tests_
 
std::set< std::stringunexpected_succeeding_tests_
 
bool verbose_
 

Detailed Description

Definition at line 40 of file binary_json_conformance_suite.h.

Member Typedef Documentation

◆ Validator

typedef std::function<bool(const Json::Value&)> google::protobuf::BinaryAndJsonConformanceSuite::Validator
private

Definition at line 80 of file binary_json_conformance_suite.h.

Constructor & Destructor Documentation

◆ BinaryAndJsonConformanceSuite()

google::protobuf::BinaryAndJsonConformanceSuite::BinaryAndJsonConformanceSuite ( )
inline

Definition at line 42 of file binary_json_conformance_suite.h.

Member Function Documentation

◆ ExpectHardParseFailureForProto()

void google::protobuf::BinaryAndJsonConformanceSuite::ExpectHardParseFailureForProto ( const std::string proto,
const std::string test_name,
ConformanceLevel  level 
)
private

Definition at line 312 of file binary_json_conformance_suite.cc.

◆ ExpectParseFailureForJson()

void google::protobuf::BinaryAndJsonConformanceSuite::ExpectParseFailureForJson ( const string test_name,
ConformanceLevel  level,
const string input_json 
)
private

Definition at line 442 of file binary_json_conformance_suite.cc.

◆ ExpectParseFailureForProto()

void google::protobuf::BinaryAndJsonConformanceSuite::ExpectParseFailureForProto ( const std::string proto,
const std::string test_name,
ConformanceLevel  level 
)
private

Definition at line 301 of file binary_json_conformance_suite.cc.

◆ ExpectParseFailureForProtoWithProtoVersion()

void google::protobuf::BinaryAndJsonConformanceSuite::ExpectParseFailureForProtoWithProtoVersion ( const string proto,
const string test_name,
ConformanceLevel  level,
bool  is_proto3 
)
private

Definition at line 271 of file binary_json_conformance_suite.cc.

◆ ExpectSerializeFailureForJson()

void google::protobuf::BinaryAndJsonConformanceSuite::ExpectSerializeFailureForJson ( const string test_name,
ConformanceLevel  level,
const string text_format 
)
private

Definition at line 468 of file binary_json_conformance_suite.cc.

◆ ParseJsonResponse()

bool google::protobuf::BinaryAndJsonConformanceSuite::ParseJsonResponse ( const conformance::ConformanceResponse &  response,
Message test_message 
)
private

Definition at line 195 of file binary_json_conformance_suite.cc.

◆ ParseResponse()

bool google::protobuf::BinaryAndJsonConformanceSuite::ParseResponse ( const conformance::ConformanceResponse &  response,
const ConformanceRequestSetting setting,
Message test_message 
)
overrideprivatevirtual

◆ RunSuiteImpl()

void google::protobuf::BinaryAndJsonConformanceSuite::RunSuiteImpl ( )
privatevirtual

◆ RunValidBinaryProtobufTest()

void google::protobuf::BinaryAndJsonConformanceSuite::RunValidBinaryProtobufTest ( const string test_name,
ConformanceLevel  level,
const string input_protobuf,
bool  is_proto3 
)
private

Definition at line 375 of file binary_json_conformance_suite.cc.

◆ RunValidJsonIgnoreUnknownTest()

void google::protobuf::BinaryAndJsonConformanceSuite::RunValidJsonIgnoreUnknownTest ( const string test_name,
ConformanceLevel  level,
const string input_json,
const string equivalent_text_format 
)
private

Definition at line 343 of file binary_json_conformance_suite.cc.

◆ RunValidJsonTest()

void google::protobuf::BinaryAndJsonConformanceSuite::RunValidJsonTest ( const string test_name,
ConformanceLevel  level,
const string input_json,
const string equivalent_text_format 
)
private

Definition at line 317 of file binary_json_conformance_suite.cc.

◆ RunValidJsonTestWithProtobufInput()

void google::protobuf::BinaryAndJsonConformanceSuite::RunValidJsonTestWithProtobufInput ( const string test_name,
ConformanceLevel  level,
const protobuf_test_messages::proto3::TestAllTypesProto3 &  input,
const string equivalent_text_format 
)
private

Definition at line 333 of file binary_json_conformance_suite.cc.

◆ RunValidJsonTestWithValidator()

void google::protobuf::BinaryAndJsonConformanceSuite::RunValidJsonTestWithValidator ( const string test_name,
ConformanceLevel  level,
const string input_json,
const Validator validator 
)
private

Definition at line 398 of file binary_json_conformance_suite.cc.

◆ RunValidProtobufTest()

void google::protobuf::BinaryAndJsonConformanceSuite::RunValidProtobufTest ( const string test_name,
ConformanceLevel  level,
const string input_protobuf,
const string equivalent_text_format,
bool  is_proto3 
)
private

Definition at line 354 of file binary_json_conformance_suite.cc.

◆ RunValidProtobufTestWithMessage()

void google::protobuf::BinaryAndJsonConformanceSuite::RunValidProtobufTestWithMessage ( const string test_name,
ConformanceLevel  level,
const Message input,
const string equivalent_text_format,
bool  is_proto3 
)
private

Definition at line 386 of file binary_json_conformance_suite.cc.

◆ TestIllegalTags()

void google::protobuf::BinaryAndJsonConformanceSuite::TestIllegalTags ( )
private

Definition at line 622 of file binary_json_conformance_suite.cc.

◆ TestOneofMessage()

template<class MessageType >
void google::protobuf::BinaryAndJsonConformanceSuite::TestOneofMessage ( MessageType &  message,
bool  is_proto3 
)
private

Definition at line 637 of file binary_json_conformance_suite.cc.

◆ TestPrematureEOFForType()

void google::protobuf::BinaryAndJsonConformanceSuite::TestPrematureEOFForType ( google::protobuf::FieldDescriptor::Type  type)
private

Definition at line 498 of file binary_json_conformance_suite.cc.

◆ TestUnknownMessage()

template<class MessageType >
void google::protobuf::BinaryAndJsonConformanceSuite::TestUnknownMessage ( MessageType &  message,
bool  is_proto3 
)
private

Definition at line 676 of file binary_json_conformance_suite.cc.

◆ TestValidDataForType()

void google::protobuf::BinaryAndJsonConformanceSuite::TestValidDataForType ( google::protobuf::FieldDescriptor::Type  ,
std::vector< std::pair< std::string, std::string >>  values 
)
private

Definition at line 586 of file binary_json_conformance_suite.cc.

Member Data Documentation

◆ type_resolver_

std::unique_ptr<google::protobuf::util::TypeResolver> google::protobuf::BinaryAndJsonConformanceSuite::type_resolver_
private

Definition at line 114 of file binary_json_conformance_suite.h.

◆ type_url_

std::string google::protobuf::BinaryAndJsonConformanceSuite::type_url_
private

Definition at line 115 of file binary_json_conformance_suite.h.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:08