Updates upb conformance failures file.

Empty strings are invalid numeric values. upb must fail to convert JSON objects that contain empty string values for numbers, but it currently does not.

PiperOrigin-RevId: 681623866
pull/18590/head
Protobuf Team Bot 2 months ago committed by Copybara-Service
parent 976eff8d2b
commit d88a3d0c95
  1. 22
      conformance/binary_json_conformance_suite.cc
  2. 24
      conformance/failure_list_jruby_ffi.txt
  3. 24
      conformance/failure_list_php_c.txt
  4. 24
      conformance/failure_list_ruby.txt
  5. 24
      upb/conformance/conformance_upb_failures.txt

@ -2303,7 +2303,8 @@ void BinaryAndJsonConformanceSuiteImpl<
R"({"optionalInt64": "-9223372036854775809"})");
ExpectParseFailureForJson("Uint64FieldTooLarge", REQUIRED,
R"({"optionalUint64": "18446744073709551616"})");
// Parser reject non-integer numeric values as well.
// Parser reject non-integer numeric values.
ExpectParseFailureForJson("Int32FieldNotInteger", REQUIRED,
R"({"optionalInt32": 0.5})");
ExpectParseFailureForJson("Uint32FieldNotInteger", REQUIRED,
@ -2313,6 +2314,16 @@ void BinaryAndJsonConformanceSuiteImpl<
ExpectParseFailureForJson("Uint64FieldNotInteger", REQUIRED,
R"({"optionalUint64": "0.5"})");
// Parser reject empty string values.
ExpectParseFailureForJson("Int32FieldEmptyString", REQUIRED,
R"({"optionalInt32": ""})");
ExpectParseFailureForJson("Uint32FieldEmptyString", REQUIRED,
R"({"optionalUint32": ""})");
ExpectParseFailureForJson("Int64FieldEmptyString", REQUIRED,
R"({"optionalInt64": ""})");
ExpectParseFailureForJson("Uint64FieldEmptyString", REQUIRED,
R"({"optionalUint64": ""})");
// Integers but represented as float values are accepted.
RunValidJsonTest("Int32FieldFloatTrailingZero", REQUIRED,
R"({"optionalInt32": 100000.000})",
@ -2436,12 +2447,17 @@ void BinaryAndJsonConformanceSuiteImpl<
R"({"optionalFloat": Infinity})");
ExpectParseFailureForJson("FloatFieldNegativeInfinityNotQuoted", RECOMMENDED,
R"({"optionalFloat": -Infinity})");
// Parsers should reject out-of-bound values.
ExpectParseFailureForJson("FloatFieldTooSmall", REQUIRED,
R"({"optionalFloat": -3.502823e+38})");
ExpectParseFailureForJson("FloatFieldTooLarge", REQUIRED,
R"({"optionalFloat": 3.502823e+38})");
// Parsers should reject empty string values.
ExpectParseFailureForJson("FloatFieldEmptyString", REQUIRED,
R"({"optionalFloat": ""})");
// Double fields.
RunValidJsonTest("DoubleFieldMinPositiveValue", REQUIRED,
R"({"optionalDouble": 2.22507e-308})",
@ -2494,6 +2510,10 @@ void BinaryAndJsonConformanceSuiteImpl<
ExpectParseFailureForJson("DoubleFieldTooLarge", REQUIRED,
R"({"optionalDouble": +1.89769e+308})");
// Parsers should reject empty string values.
ExpectParseFailureForJson("DoubleFieldEmptyString", REQUIRED,
R"({"optionalDouble": ""})");
// Enum fields.
RunValidJsonTest("EnumField", REQUIRED, R"({"optionalNestedEnum": "FOO"})",
"optional_nested_enum: FOO");

@ -0,0 +1,24 @@
Required.Editions_Proto2.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.

@ -1,4 +1,28 @@
Recommended.Proto2.JsonInput.FieldNameExtension.Validator
Required.Editions_Proto2.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.BoolFieldFalse.JsonOutput
Required.Proto2.JsonInput.BoolFieldFalse.ProtobufOutput
Required.Proto2.JsonInput.EnumField.JsonOutput

@ -0,0 +1,24 @@
Required.Editions_Proto2.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.

@ -0,0 +1,24 @@
Required.Editions_Proto2.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto2.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Editions_Proto3.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto2.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.DoubleFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.FloatFieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Int32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Int64FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Uint32FieldEmptyString # Should have failed to parse, but didn't.
Required.Proto3.JsonInput.Uint64FieldEmptyString # Should have failed to parse, but didn't.
Loading…
Cancel
Save