Wildcard support for Protobuf conformance failure lists by using a Trie made up of nodes that contain a section of a test name (divided by '.').

If there's an unexpected failure message or an unexpected succeeding test from a wildcard expansion users will be made to remove the wildcarded equivalent. Once removed, they must rerun the conformance test to add the failures contained within the removed wildcarded equivalent.

PiperOrigin-RevId: 663040062
pull/17738/head
Yamil Morales 8 months ago committed by Copybara-Service
parent a60097abfc
commit 3f908cfff7
  1. 10
      .github/workflows/test_cpp.yml
  2. 2
      cmake/conformance.cmake
  3. 24
      conformance/BUILD.bazel
  4. 3
      conformance/conformance.proto
  5. 145
      conformance/conformance_test.cc
  6. 25
      conformance/conformance_test.h
  7. 130
      conformance/failure_list_cpp.txt
  8. 87
      conformance/failure_list_trie_node.cc
  9. 58
      conformance/failure_list_trie_node.h
  10. 125
      conformance/failure_list_trie_node_test.cc
  11. 60
      conformance/text_format_failure_list_cpp.txt

@ -38,7 +38,7 @@ jobs:
include:
# Set defaults
- image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize@sha256:3d959f731dc5c54af4865c31ee2bd581ec40028adcdf4c038f3122581f595191
- targets: //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/...
- targets: //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/... //conformance:conformance_framework_tests
# Override cases with custom images
- config: { name: "Bazel7", flags: --noenable_bzlmod }
@ -93,7 +93,7 @@ jobs:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:${{ matrix.version }}-6.3.0-63dd26c0c7a808d92673a3e52e848189d4ab0f17
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: cpp_linux/gcc-${{ matrix.version }}
bazel: test //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/...
bazel: test //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/... //conformance:conformance_framework_tests
linux-release:
strategy:
@ -355,11 +355,11 @@ jobs:
- name: MacOS Bazel
os: macos-12
cache_key: macos-12
bazel: test //src/... //third_party/utf8_range/...
bazel: test //src/... //third_party/utf8_range/... //conformance:conformance_framework_tests
- name: MacOS Bazel 7
os: macos-12
cache_key: macos-12-bazel7
bazel: test //src/... //third_party/utf8_range/...
bazel: test //src/... //third_party/utf8_range/... //conformance:conformance_framework_tests
bazel_version: '7.1.2'
continuous-only: true
- name: MacOS Apple Silicon (build only) Bazel
@ -367,7 +367,7 @@ jobs:
cache_key: macos-12-arm
# Current github runners are all Intel based, so just build/compile
# for Apple Silicon to detect issues there.
bazel: build --cpu=darwin_arm64 //src/... //third_party/utf8_range/...
bazel: build --cpu=darwin_arm64 //src/... //third_party/utf8_range/... //conformance:conformance_framework_tests
- name: Windows Bazel
os: windows-2022
cache_key: windows-2022

@ -93,6 +93,8 @@ add_executable(conformance_test_runner
${protobuf_SOURCE_DIR}/conformance/conformance_test_main.cc
${protobuf_SOURCE_DIR}/conformance/text_format_conformance_suite.cc
${protobuf_SOURCE_DIR}/conformance/text_format_conformance_suite.h
${protobuf_SOURCE_DIR}/conformance/failure_list_trie_node.cc
${protobuf_SOURCE_DIR}/conformance/failure_list_trie_node.h
)
add_executable(conformance_cpp

@ -134,9 +134,11 @@ cc_library(
srcs = [
"conformance_test.cc",
"conformance_test_runner.cc",
"failure_list_trie_node.cc",
],
hdrs = [
"conformance_test.h",
"failure_list_trie_node.h",
],
includes = ["."],
deps = [
@ -152,11 +154,33 @@ cc_library(
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/log:absl_log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/types:optional",
],
)
cc_test(
name = "failure_list_trie_node_test",
srcs = ["failure_list_trie_node_test.cc"],
deps = [
":conformance_test",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:optional",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
# Add more meta-testing here. This is not to be confused with a conformance test itself.
test_suite(
name = "conformance_framework_tests",
tests = ["failure_list_trie_node_test"],
)
cc_library(
name = "binary_json_conformance_suite",
testonly = 1,

@ -63,6 +63,9 @@ enum TestCategory {
message TestStatus {
string name = 1;
string failure_message = 2;
// What an actual test name matched to in a failure list. Can be wildcarded or
// an exact match without wildcards.
string matched_name = 3;
}
// The conformance runner will request a list of failures as the first request.

@ -24,11 +24,13 @@
#include "absl/container/flat_hash_set.h"
#include "absl/log/absl_check.h"
#include "absl/log/absl_log.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "conformance/conformance.pb.h"
#include "conformance/conformance.pb.h"
#include "failure_list_trie_node.h"
#include "google/protobuf/descriptor_legacy.h"
#include "google/protobuf/endian.h"
#include "google/protobuf/message.h"
@ -120,7 +122,7 @@ static void Normalize(std::string& input) {
}
// Sets up a failure message properly for our failure lists.
static TestStatus FormatFailureMessage(TestStatus& input) {
static TestStatus FormatFailureMessage(const TestStatus& input) {
// Make copy just this once, as we need to modify it for our failure lists.
std::string formatted_failure_message = input.failure_message();
// Remove newlines
@ -159,7 +161,12 @@ bool CheckSetEmpty(const absl::btree_map<std::string, TestStatus>& set_to_check,
std::ofstream os{std::string(filename)};
if (os) {
for (const auto& pair : set_to_check) {
os << pair.first << " # " << pair.second.failure_message() << "\n";
// Additions will not have a 'matched_name' while removals will.
string potential_add_or_removal = pair.second.matched_name().empty()
? pair.first
: pair.second.matched_name();
os << potential_add_or_removal << " # " << pair.second.failure_message()
<< "\n";
}
} else {
absl::StrAppendFormat(output,
@ -176,6 +183,8 @@ bool CheckSetEmpty(const absl::btree_map<std::string, TestStatus>& set_to_check,
namespace google {
namespace protobuf {
constexpr int kMaximumWildcardExpansions = 5;
ConformanceTestSuite::ConformanceRequestSetting::ConformanceRequestSetting(
ConformanceLevel level, conformance::WireFormat input_format,
conformance::WireFormat output_format,
@ -348,14 +357,16 @@ ConformanceResponse ConformanceTestSuite::TruncateResponse(
}
void ConformanceTestSuite::ReportSuccess(const TestStatus& test) {
if (expected_to_fail_.erase(test.name()) != 0) {
absl::StrAppendFormat(
&output_,
"ERROR: test %s is in the failure list, but test succeeded. "
"Remove it from the failure list.\n",
test.name());
unexpected_succeeding_tests_[test.name()] = test;
}
if (expected_to_fail_.contains(test.name())) {
absl::StrAppendFormat(&output_,
"ERROR: test %s (matched to %s) is in the failure "
"list, but test succeeded. "
"Remove its match from the failure list.\n",
test.name(),
expected_to_fail_[test.name()].matched_name());
unexpected_succeeding_tests_[test.name()] = expected_to_fail_[test.name()];
}
expected_to_fail_.erase(test.name());
successes_++;
}
@ -383,8 +394,9 @@ void ConformanceTestSuite::ReportFailure(TestStatus& test,
// to it the same failure message that was in the list.
TestStatus incorrect_failure_message;
incorrect_failure_message.set_name(test.name());
incorrect_failure_message.set_failure_message(
expected_to_fail_[test.name()].failure_message());
incorrect_failure_message.set_failure_message(expected_failure_message);
incorrect_failure_message.set_matched_name(
expected_to_fail_[test.name()].matched_name());
expected_failure_messages_[test.name()] = incorrect_failure_message;
}
@ -518,6 +530,29 @@ bool ConformanceTestSuite::RunTest(const std::string& test_name,
ABSL_LOG(FATAL) << "Duplicated test name: " << test_name;
}
// In essence, find what wildcarded test names expand to or direct matches
// (without wildcards).
if (auto result = failure_list_root_.WalkDownMatch(test_name);
result.has_value()) {
string matched_equivalent = result.value();
unmatched_.erase(matched_equivalent);
TestStatus expansion;
expansion.set_name(test_name);
expansion.set_matched_name(matched_equivalent);
expansion.set_failure_message(saved_failure_messages_[matched_equivalent]);
expected_to_fail_[test_name] = expansion;
if (number_of_matches_.contains(matched_equivalent)) {
if (number_of_matches_[matched_equivalent] > kMaximumWildcardExpansions &&
!exceeded_max_matches_.contains(matched_equivalent)) {
exceeded_max_matches_[matched_equivalent] = expansion;
}
number_of_matches_[matched_equivalent]++;
} else {
number_of_matches_[matched_equivalent] = 1;
}
}
std::string serialized_request;
std::string serialized_response;
request.SerializeToString(&serialized_request);
@ -597,8 +632,17 @@ std::string ConformanceTestSuite::WireFormatToString(WireFormat wire_format) {
return "";
}
void ConformanceTestSuite::AddExpectedFailedTest(const TestStatus& failure) {
expected_to_fail_[failure.name()] = failure;
bool ConformanceTestSuite::AddExpectedFailedTest(
const TestStatus& expected_failure) {
absl::Status attempt = failure_list_root_.Insert(expected_failure.name());
if (!attempt.ok()) {
absl::StrAppend(&output_, attempt.message(), "\n\n");
return false;
}
unmatched_[expected_failure.name()] = expected_failure;
saved_failure_messages_[expected_failure.name()] =
expected_failure.failure_message();
return true;
}
bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
@ -606,6 +650,7 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
const std::string& filename,
conformance::FailureSet* failure_list) {
runner_ = runner;
failure_list_root_ = FailureListTrieNode("root");
successes_ = 0;
expected_failures_ = 0;
skipped_.clear();
@ -620,8 +665,11 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
failure_list_filename_ = filename;
expected_to_fail_.clear();
for (const TestStatus& failure : failure_list->test()) {
AddExpectedFailedTest(failure);
for (const TestStatus& expected_failure : failure_list->test()) {
if (!AddExpectedFailedTest(expected_failure)) {
output->assign(output_);
return false;
}
}
RunSuiteImpl();
@ -632,24 +680,26 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
bool ok = true;
if (!CheckSetEmpty(
expected_to_fail_, "nonexistent_tests.txt",
unmatched_, "unmatched.txt",
absl::StrCat(
"These tests were listed in the failure list, but they "
"don't exist. Remove them from the failure list by "
"running from the root of your workspace:\n"
"These test names were listed in the failure list, but they "
"didn't match any actual test name. Remove them from the "
"failure list by running from the root of your workspace:\n"
" bazel run "
"//google/protobuf/conformance:update_failure_list -- ",
failure_list_filename_, " --remove ", output_dir_,
"nonexistent_tests.txt"),
"unmatched.txt"),
output_dir_, &output_)) {
ok = false;
}
if (!CheckSetEmpty(
expected_failure_messages_, "expected_failure_messages.txt",
absl::StrCat(
"These tests were listed in the failure list, but their failure "
"messages do not match. Remove them from the failure list "
"by running:\n"
"These tests (either expanded from wildcard(s) or direct "
"matches) were listed in the failure list, but their "
"failure messages do not match. Remove their match from the "
"failure list by running from the root of your workspace:\n"
" bazel run ",
"//google/protobuf/conformance:update_failure_list -- ",
failure_list_filename_, " --remove ", output_dir_,
@ -657,10 +707,42 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
output_dir_, &output_)) {
ok = false;
}
if (!CheckSetEmpty(
unexpected_succeeding_tests_, "succeeding_tests.txt",
absl::StrCat(
"These tests succeeded, even though they were listed in "
"the failure list (expanded from wildcard(s) or direct matches). "
" Remove their match from the failure list by "
"running from the root of your workspace:\n"
" bazel run "
"//google/protobuf/conformance:update_failure_list -- ",
failure_list_filename_, " --remove ", output_dir_,
"succeeding_tests.txt"),
output_dir_, &output_)) {
ok = false;
}
if (!CheckSetEmpty(
exceeded_max_matches_, "exceeded_max_matches.txt",
absl::StrFormat(
"These failure list entries served as matches to too many test "
"names exceeding the max amount of %d. "
"Remove them from the failure list by running from the root of "
"your workspace:\n"
" bazel run "
"//google/protobuf/conformance:update_failure_list -- %s "
"--remove %sexceeded_max_matches.txt",
kMaximumWildcardExpansions, failure_list_filename_, output_dir_),
output_dir_, &output_)) {
ok = false;
}
if (!CheckSetEmpty(
unexpected_failure_messages_, "unexpected_failure_messages.txt",
absl::StrCat(
"These tests failed because their failure messages did "
"These tests (expanded from wildcard(s) or direct matches from "
"the failure list) failed because their failure messages did "
"not match. If they can't be fixed right now, "
"you can add them to the failure list so the overall "
"suite can succeed. Add them to the failure list by "
@ -687,19 +769,6 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
output_dir_, &output_)) {
ok = false;
}
if (!CheckSetEmpty(
unexpected_succeeding_tests_, "succeeding_tests.txt",
absl::StrCat(
"These tests succeeded, even though they were listed in "
"the failure list. Remove them from the failure list by running "
"from the root of your workspace:\n"
" bazel run "
"//google/protobuf/conformance:update_failure_list -- ",
failure_list_filename_, " --remove ", output_dir_,
"succeeding_tests.txt"),
output_dir_, &output_)) {
ok = false;
}
if (verbose_) {
CheckSetEmpty(skipped_, "",

@ -26,6 +26,7 @@
#include "absl/container/flat_hash_set.h"
#include "conformance/conformance.pb.h"
#include "conformance/conformance.pb.h"
#include "failure_list_trie_node.h"
#include "google/protobuf/descriptor.h"
namespace conformance {
@ -293,11 +294,15 @@ class ConformanceTestSuite {
const conformance::ConformanceRequest& request,
conformance::ConformanceResponse* response);
void AddExpectedFailedTest(const conformance::TestStatus& failure);
// Will return false if an entry from the failure list was either a
// duplicate of an already added one to the trie or it contained invalid
// wildcards; otherwise, returns true.
bool AddExpectedFailedTest(const conformance::TestStatus& failure);
virtual void RunSuiteImpl() = 0;
ConformanceTestRunner* runner_;
FailureListTrieNode failure_list_root_;
std::string testee_;
int successes_;
int expected_failures_;
@ -315,8 +320,8 @@ class ConformanceTestSuite {
// will be run and this bool will be set to true.
bool isolated_ = false;
// The set of test names that are expected to fail in this run, but haven't
// failed yet.
// The set of test names (expanded from wildcard(s) and non-expanded) that are
// expected to fail in this run, but haven't failed yet.
absl::btree_map<std::string, conformance::TestStatus> expected_to_fail_;
// The set of tests that failed because their failure message did not match
@ -345,8 +350,22 @@ class ConformanceTestSuite {
absl::btree_map<std::string, conformance::TestStatus>
unexpected_failure_messages_;
// The set of test names (wildcarded or not) from the failure list that did
// not match any actual test name.
absl::btree_map<std::string, conformance::TestStatus> unmatched_;
// The set of tests that the testee opted out of;
absl::btree_map<std::string, conformance::TestStatus> skipped_;
// Allows us to remove from unmatched_.
absl::btree_map<std::string, std::string> saved_failure_messages_;
// If a failure list entry served as a match for more than 'max_matches_',
// those will be added here for removal.
absl::btree_map<std::string, conformance::TestStatus> exceeded_max_matches_;
// Keeps track of how many tests matched to each failure list entry.
absl::btree_map<std::string, int> number_of_matches_;
};
} // namespace protobuf

@ -7,105 +7,31 @@
# TODO: insert links to corresponding bugs tracking the issue.
# Should we use GitHub issues or the Google-internal bug tracker?
Recommended.Editions_Proto2.JsonInput.BoolFieldDoubleQuotedFalse # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.BoolFieldDoubleQuotedTrue # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.FieldNameDuplicate # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.FieldNameDuplicateDifferentCasing1 # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.FieldNameDuplicateDifferentCasing2 # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.FieldNameExtension.Validator # Expected JSON payload but got type 1
Recommended.Editions_Proto2.JsonInput.FieldNameNotQuoted # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.IgnoreUnknownEnumStringValueInMapPart.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key2]: FOO
Recommended.Editions_Proto2.JsonInput.IgnoreUnknownEnumStringValueInMapValue.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key]: FOO
Recommended.Editions_Proto2.JsonInput.MapFieldValueIsNull # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.RepeatedFieldMessageElementIsNull # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.RepeatedFieldPrimitiveElementIsNull # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.RepeatedFieldTrailingComma # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.RepeatedFieldTrailingCommaWithNewlines # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.RepeatedFieldTrailingCommaWithSpace # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.StringFieldSingleQuoteBoth # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.StringFieldSingleQuoteKey # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.StringFieldSingleQuoteValue # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.StringFieldUppercaseEscapeLetter # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.TrailingCommaInAnObject # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.TrailingCommaInAnObjectWithNewlines # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.TrailingCommaInAnObjectWithSpace # Should have failed to parse, but didn't.
Recommended.Editions_Proto2.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.FieldMaskNumbersDontRoundTrip.JsonOutput # Should have failed to serialize, but didn't.
Recommended.Editions_Proto3.FieldMaskPathsDontRoundTrip.JsonOutput # Should have failed to serialize, but didn't.
Recommended.Editions_Proto3.FieldMaskTooManyUnderscore.JsonOutput # Should have failed to serialize, but didn't.
Recommended.Editions_Proto3.JsonInput.BoolFieldDoubleQuotedFalse # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.BoolFieldDoubleQuotedTrue # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.FieldMaskInvalidCharacter # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.FieldNameDuplicate # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.FieldNameDuplicateDifferentCasing1 # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.FieldNameDuplicateDifferentCasing2 # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.FieldNameNotQuoted # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.IgnoreUnknownEnumStringValueInMapPart.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key2]: FOO
Recommended.Editions_Proto3.JsonInput.IgnoreUnknownEnumStringValueInMapValue.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key]: FOO
Recommended.Editions_Proto3.JsonInput.MapFieldValueIsNull # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.RepeatedFieldMessageElementIsNull # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.RepeatedFieldPrimitiveElementIsNull # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.RepeatedFieldTrailingComma # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.RepeatedFieldTrailingCommaWithNewlines # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpace # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.StringFieldSingleQuoteBoth # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.StringFieldSingleQuoteKey # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.StringFieldSingleQuoteValue # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.StringFieldUppercaseEscapeLetter # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.TrailingCommaInAnObject # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.TrailingCommaInAnObjectWithNewlines # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.TrailingCommaInAnObjectWithSpace # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.BoolFieldDoubleQuotedFalse # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.BoolFieldDoubleQuotedTrue # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.FieldNameDuplicate # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.FieldNameDuplicateDifferentCasing1 # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.FieldNameDuplicateDifferentCasing2 # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.FieldNameExtension.Validator # Expected JSON payload but got type 1
Recommended.Proto2.JsonInput.FieldNameNotQuoted # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.IgnoreUnknownEnumStringValueInMapPart.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key2]: FOO
Recommended.Proto2.JsonInput.IgnoreUnknownEnumStringValueInMapValue.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key]: FOO
Recommended.Proto2.JsonInput.MapFieldValueIsNull # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.RepeatedFieldMessageElementIsNull # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.RepeatedFieldPrimitiveElementIsNull # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.RepeatedFieldTrailingComma # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.RepeatedFieldTrailingCommaWithNewlines # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.RepeatedFieldTrailingCommaWithSpace # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.StringFieldSingleQuoteBoth # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.StringFieldSingleQuoteKey # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.StringFieldSingleQuoteValue # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.StringFieldUppercaseEscapeLetter # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.TrailingCommaInAnObject # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.TrailingCommaInAnObjectWithNewlines # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.TrailingCommaInAnObjectWithSpace # Should have failed to parse, but didn't.
Recommended.Proto2.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.Proto3.FieldMaskNumbersDontRoundTrip.JsonOutput # Should have failed to serialize, but didn't.
Recommended.Proto3.FieldMaskPathsDontRoundTrip.JsonOutput # Should have failed to serialize, but didn't.
Recommended.Proto3.FieldMaskTooManyUnderscore.JsonOutput # Should have failed to serialize, but didn't.
Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedFalse # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.BoolFieldDoubleQuotedTrue # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.FieldMaskInvalidCharacter # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.FieldNameDuplicate # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.FieldNameDuplicateDifferentCasing1 # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.FieldNameDuplicateDifferentCasing2 # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.FieldNameNotQuoted # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.IgnoreUnknownEnumStringValueInMapPart.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key2]: FOO
Recommended.Proto3.JsonInput.IgnoreUnknownEnumStringValueInMapValue.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key]: FOO
Recommended.Proto3.JsonInput.MapFieldValueIsNull # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.RepeatedFieldMessageElementIsNull # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.RepeatedFieldPrimitiveElementIsNull # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.RepeatedFieldTrailingComma # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithNewlines # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpace # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.StringFieldSingleQuoteBoth # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.StringFieldSingleQuoteKey # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.StringFieldSingleQuoteValue # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.StringFieldUppercaseEscapeLetter # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.TrailingCommaInAnObject # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithNewlines # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithSpace # Should have failed to parse, but didn't.
Recommended.Proto3.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.*.JsonInput.BoolFieldDoubleQuotedFalse # Should have failed to parse, but didn't.
Recommended.*.JsonInput.BoolFieldDoubleQuotedTrue # Should have failed to parse, but didn't.
Recommended.*.JsonInput.FieldNameDuplicate # Should have failed to parse, but didn't.
Recommended.*.JsonInput.FieldNameDuplicateDifferentCasing1 # Should have failed to parse, but didn't.
Recommended.*.JsonInput.FieldNameDuplicateDifferentCasing2 # Should have failed to parse, but didn't.
Recommended.*.JsonInput.FieldNameExtension.Validator # Expected JSON payload but got type 1
Recommended.*.JsonInput.FieldNameNotQuoted # Should have failed to parse, but didn't.
Recommended.*.JsonInput.IgnoreUnknownEnumStringValueInMapPart.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key2]: FOO
Recommended.*.JsonInput.IgnoreUnknownEnumStringValueInMapValue.ProtobufOutput # Output was not equivalent to reference message: added: map_string_nested_enum[key]: FOO
Recommended.*.JsonInput.MapFieldValueIsNull # Should have failed to parse, but didn't.
Recommended.*.JsonInput.RepeatedFieldMessageElementIsNull # Should have failed to parse, but didn't.
Recommended.*.JsonInput.RepeatedFieldPrimitiveElementIsNull # Should have failed to parse, but didn't.
Recommended.*.JsonInput.RepeatedFieldTrailingComma # Should have failed to parse, but didn't.
Recommended.*.JsonInput.RepeatedFieldTrailingCommaWithNewlines # Should have failed to parse, but didn't.
Recommended.*.JsonInput.RepeatedFieldTrailingCommaWithSpace # Should have failed to parse, but didn't.
Recommended.*.JsonInput.RepeatedFieldTrailingCommaWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.*.JsonInput.StringFieldSingleQuoteBoth # Should have failed to parse, but didn't.
Recommended.*.JsonInput.StringFieldSingleQuoteKey # Should have failed to parse, but didn't.
Recommended.*.JsonInput.StringFieldSingleQuoteValue # Should have failed to parse, but didn't.
Recommended.*.JsonInput.StringFieldUppercaseEscapeLetter # Should have failed to parse, but didn't.
Recommended.*.JsonInput.TrailingCommaInAnObject # Should have failed to parse, but didn't.
Recommended.*.JsonInput.TrailingCommaInAnObjectWithNewlines # Should have failed to parse, but didn't.
Recommended.*.JsonInput.TrailingCommaInAnObjectWithSpace # Should have failed to parse, but didn't.
Recommended.*.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace # Should have failed to parse, but didn't.
Recommended.*.FieldMaskNumbersDontRoundTrip.JsonOutput # Should have failed to serialize, but didn't.
Recommended.*.FieldMaskPathsDontRoundTrip.JsonOutput # Should have failed to serialize, but didn't.
Recommended.*.FieldMaskTooManyUnderscore.JsonOutput # Should have failed to serialize, but didn't.
Recommended.*.JsonInput.FieldMaskInvalidCharacter # Should have failed to parse, but didn't.

@ -0,0 +1,87 @@
#include "failure_list_trie_node.h"
#include <memory>
#include <string>
#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
namespace google {
namespace protobuf {
absl::Status FailureListTrieNode::Insert(absl::string_view test_name) {
if (auto result = WalkDownMatch(test_name); result.has_value()) {
return absl::AlreadyExistsError(
absl::StrFormat("Test name %s already exists in the trie FROM %s",
test_name, result.value()));
}
auto sections = absl::StrSplit(test_name, '.');
for (auto section : sections) {
if (absl::StrContains(section, '*') && section.length() > 1) {
return absl::InvalidArgumentError(absl::StrFormat(
"Test name %s contains invalid wildcard(s) (wildcards "
"must span the whole of a section)",
test_name));
}
}
InsertImpl(test_name);
return absl::OkStatus();
}
void FailureListTrieNode::InsertImpl(absl::string_view test_name) {
absl::string_view section = test_name.substr(0, test_name.find('.'));
// Extracted last section -> no more '.' -> test_name_copy will be equal to
// section
if (test_name == section) {
children_.push_back(std::make_unique<FailureListTrieNode>(section));
return;
}
test_name = test_name.substr(section.length() + 1);
for (auto& child : children_) {
if (child->data_ == section) {
return child->InsertImpl(test_name);
}
}
// No match
children_.push_back(std::make_unique<FailureListTrieNode>(section));
children_.back()->InsertImpl(test_name);
}
absl::optional<std::string> FailureListTrieNode::WalkDownMatch(
absl::string_view test_name) {
absl::string_view section = test_name.substr(0, test_name.find('.'));
// test_name cannot be overridden
absl::string_view to_match;
if (section != test_name) {
to_match = test_name.substr(section.length() + 1);
}
for (auto& child : children_) {
if (child->data_ == section || child->data_ == "*" || section == "*") {
absl::string_view appended = child->data_;
// Extracted last section -> no more '.' -> test_name will be
// equal to section
if (test_name == section) {
// Must match all the way to the bottom of the tree
if (child->children_.empty()) {
return std::string(appended);
}
} else {
if (auto result = child->WalkDownMatch(to_match); result.has_value()) {
return absl::StrCat(appended, ".", result.value());
}
}
}
}
// No match
return absl::nullopt;
}
} // namespace protobuf
} // namespace google

@ -0,0 +1,58 @@
#ifndef GOOGLE_PROTOBUF_CONFORMANCE_FAILURE_LIST_TRIE_NODE_H__
#define GOOGLE_PROTOBUF_CONFORMANCE_FAILURE_LIST_TRIE_NODE_H__
#include <memory>
#include <string>
#include <vector>
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
namespace google {
namespace protobuf {
// Each node represents a section of a test name (divided by '.'). One can
// imagine them as prefixes to search for a match. Once we hit a prefix that
// doesn't match, we can stop searching. Wildcards matching to any set of
// characters are supported.
//
// This is not a general trie implementation
// as pointed out by its name. It is only meant to only be used for conformance
// failure lists.
//
// Example of what the trie might look like in practice:
//
// (root)
// / \
// "Recommended" "Required"
// / \
// "Proto2" "*"
// / \ \
// "JsonInput" "ProtobufInput" "JsonInput"
//
//
class FailureListTrieNode {
public:
FailureListTrieNode() : data_("") {}
explicit FailureListTrieNode(absl::string_view data) : data_(data) {}
// Will attempt to insert a test name into the trie returning
// absl::StatusCode::kAlreadyExists if the test name already exists or
// absl::StatusCode::kInvalidArgument if the test name contains invalid
// wildcards; otherwise, insertion is successful.
absl::Status Insert(absl::string_view test_name);
// Returns what it matched to if it matched anything, otherwise returns
// absl::nullopt
absl::optional<std::string> WalkDownMatch(absl::string_view test_name);
private:
absl::string_view data_;
std::vector<std::unique_ptr<FailureListTrieNode>> children_;
void InsertImpl(absl::string_view test_name);
};
} // namespace protobuf
} // namespace google
#endif // GOOGLE_PROTOBUF_CONFORMANCE_FAILURE_LIST_TRIE_NODE_H__

@ -0,0 +1,125 @@
#include "failure_list_trie_node.h"
#include <memory>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/types/optional.h"
using ::testing::Eq;
using ::testing::HasSubstr;
using ::testing::Optional;
absl::Status GetStatus(const absl::Status& s) { return s; }
template <typename T>
absl::Status GetStatus(const absl::StatusOr<T>& s) {
return s.status();
}
MATCHER_P2(StatusIs, status, message,
absl::StrCat(".status() is ", testing::PrintToString(status))) {
return GetStatus(arg).code() == status &&
testing::ExplainMatchResult(message, GetStatus(arg).message(),
result_listener);
}
#define EXPECT_OK(x) EXPECT_THAT(x, StatusIs(absl::StatusCode::kOk, testing::_))
#define ASSERT_OK(x) ASSERT_THAT(x, StatusIs(absl::StatusCode::kOk, testing::_))
namespace google {
namespace protobuf {
TEST(FailureListTrieTest, WalkDownMatchWithoutWildcard) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
ASSERT_OK(root_->Insert("Recommended.Proto2.ProtobufInput.World"));
EXPECT_THAT(root_->WalkDownMatch("Recommended.Proto2.ProtobufInput.World"),
Optional(Eq("Recommended.Proto2.ProtobufInput.World")));
}
TEST(FailureListTrieTest, WalkDownMatchWithoutWildcardNoMatch) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
ASSERT_OK(root_->Insert("Recommended.Proto2.JsonInput.World"));
EXPECT_EQ(root_->WalkDownMatch("Recommended.Proto2.TextFormatInput"),
absl::nullopt);
}
TEST(FailureListTrieTest, WalkDownMatchWithWildcard) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
ASSERT_OK(root_->Insert("Recommended.*.ProtobufInput.World"));
EXPECT_THAT(root_->WalkDownMatch("Recommended.Proto2.ProtobufInput.World"),
Optional(Eq("Recommended.*.ProtobufInput.World")));
}
TEST(FailureListTrieTest, WalkDownMatchWithWildcardNoMatch) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
ASSERT_OK(root_->Insert("Recommended.*.ProtobufInput.World"));
EXPECT_EQ(root_->WalkDownMatch("Recommended.Proto2.JsonInput.World"),
absl::nullopt);
}
TEST(FailureListTrieTest, WalkDownMatchTestLessNumberofSectionsNoMatch) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
ASSERT_OK(root_->Insert("Recommended.*.*.*"));
EXPECT_EQ(root_->WalkDownMatch("Recommended.Proto2.JsonInput"),
absl::nullopt);
}
TEST(FailureListTrieTest, WalkDownMatchTestMoreNumberOfSectionsNoMatch) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
ASSERT_OK(root_->Insert("*"));
EXPECT_EQ(root_->WalkDownMatch("Recommended.Proto2.JsonInput.World"),
absl::nullopt);
}
TEST(FailureListTrieTest, WalkDownMatchTakeMoreThanOneBranch) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
ASSERT_OK(root_->Insert(
"Recommended.*.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace"));
ASSERT_OK(root_->Insert(
"Recommended.Proto3.*.RepeatedFieldTrailingCommaWithSpaceCommaSpace"));
EXPECT_THAT(
root_->WalkDownMatch("Recommended.Proto3.JsonInput."
"RepeatedFieldTrailingCommaWithSpaceCommaSpace"),
Optional(Eq("Recommended.Proto3.*."
"RepeatedFieldTrailingCommaWithSpaceCommaSpace")));
}
TEST(FailureListTrieTest, InsertWilcardedAmbiguousMatchFails) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
ASSERT_OK(root_->Insert(
"Recommended.*.JsonInput.TrailingCommaInAnObjectWithSpaceCommaSpace"));
// Essentially a duplicated test name if inserted.
EXPECT_THAT(
root_->Insert(
"Recommended.Proto3.*.TrailingCommaInAnObjectWithSpaceCommaSpace"),
StatusIs(absl::StatusCode::kAlreadyExists, HasSubstr("already exists")));
}
TEST(FailureListTrieTest, InsertWilcardedAmbiguousMatchMutlipleWildcardsFails) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
ASSERT_OK(root_->Insert("Recommended.*.JsonInput.FieldMaskInvalidCharacter"));
// Essentially a duplicated test name if inserted.
EXPECT_THAT(
root_->Insert("Recommended.*.*.*"),
StatusIs(absl::StatusCode::kAlreadyExists, HasSubstr("already exists")));
}
TEST(FailureListTrieTest, InsertInvalidWildcardFails) {
auto root_ = std::make_unique<google::protobuf::FailureListTrieNode>("dummy");
EXPECT_THAT(root_->Insert("This*Is.Not.A.Valid.Wildcard"),
StatusIs(absl::StatusCode::kInvalidArgument,
HasSubstr("invalid wildcard")));
}
} // namespace protobuf
} // namespace google

@ -1,42 +1,22 @@
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyBytes # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyString # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairBytes # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairString # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyBytes # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyString # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyBytes # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyString # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairBytes # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairString # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyBytes # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyString # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortBytes # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortString # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongBytes # Should have failed to parse, but didn't.
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongString # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyBytes # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyString # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairBytes # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairString # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyBytes # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyString # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyBytes # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyString # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairBytes # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairString # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyBytes # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyString # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortBytes # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortString # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongBytes # Should have failed to parse, but didn't.
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongString # Should have failed to parse, but didn't.
Required.Editions_Proto3.TextFormatInput.StringFieldBadUTF8Hex # Should have failed to parse, but didn't.
Required.Editions_Proto3.TextFormatInput.StringFieldBadUTF8Octal # Should have failed to parse, but didn't.
Required.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeBytes # Should have failed to parse, but didn't.
Required.Editions_Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeString # Should have failed to parse, but didn't.
Required.Proto3.TextFormatInput.StringFieldBadUTF8Hex # Should have failed to parse, but didn't.
Required.Proto3.TextFormatInput.StringFieldBadUTF8Octal # Should have failed to parse, but didn't.
Required.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeBytes # Should have failed to parse, but didn't.
Required.Proto3.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeString # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyBytes # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateFirstOnlyString # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairBytes # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogatePairString # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyBytes # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralLongUnicodeEscapeSurrogateSecondOnlyString # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyBytes # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateFirstOnlyString # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairBytes # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairString # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyBytes # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogateSecondOnlyString # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortBytes # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortString # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongBytes # Should have failed to parse, but didn't.
Recommended.*.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairShortLongString # Should have failed to parse, but didn't.
Required.*.TextFormatInput.StringFieldBadUTF8Hex # Should have failed to parse, but didn't.
Required.*.TextFormatInput.StringFieldBadUTF8Octal # Should have failed to parse, but didn't.
Required.*.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeBytes # Should have failed to parse, but didn't.
Required.*.TextFormatInput.StringLiteralLongUnicodeEscapeTooLargeString # Should have failed to parse, but didn't.
# End up setting the high bit as a sign instead of failing to parse.

Loading…
Cancel
Save