Skip to content

Commit

Permalink
Include JSON output tests with Proto2 messages in the conformance tes…
Browse files Browse the repository at this point in the history
…t suite.

PiperOrigin-RevId: 595173790
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Jan 2, 2024
1 parent 8876b10 commit 255f95e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions conformance/binary_json_conformance_suite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -453,17 +453,15 @@ void BinaryAndJsonConformanceSuiteImpl<MessageType>::RunValidProtobufTest(
const std::string& equivalent_text_format) {
MessageType prototype;

ConformanceRequestSetting setting1(
ConformanceRequestSetting binary_to_binary(
level, conformance::PROTOBUF, conformance::PROTOBUF,
conformance::BINARY_TEST, prototype, test_name, input_protobuf);
suite_.RunValidInputTest(setting1, equivalent_text_format);
suite_.RunValidInputTest(binary_to_binary, equivalent_text_format);

if (run_proto3_tests_) {
ConformanceRequestSetting setting2(
level, conformance::PROTOBUF, conformance::JSON,
conformance::BINARY_TEST, prototype, test_name, input_protobuf);
suite_.RunValidInputTest(setting2, equivalent_text_format);
}
ConformanceRequestSetting binary_to_json(
level, conformance::PROTOBUF, conformance::JSON, conformance::BINARY_TEST,
prototype, test_name, input_protobuf);
suite_.RunValidInputTest(binary_to_json, equivalent_text_format);
}

template <typename MessageType>
Expand Down

0 comments on commit 255f95e

Please sign in to comment.