Add conformance tests for Timestamp parsing In general, runtimes also expose Timestamp parsing by utils but it is conformance-testable via JSON. Timestamp format is RFC3339 which looks like `1970-01-01T00:00:00Z` (for UTC timestamps) or `1970-01-02T01:00:00+02:00` (with timezone). There's actually two different reasons why a Timestamp format might be invalid. RFC3339 spec has some bright line rules as follows: - All of the segments must be the expected fixed width (eg: month is always 2 digits, 1970-01-01 and not 1970-1-1). - Year must be [0001 .. 9999] - Month must be [01 .. 12] - Day must be valid for the relevant month, including that Feb 29 is only legal in leap years. - The literal `T` comes next (spec ambiguous if `t` is also allowed, not tested in this change) - Hour must be [00..23] - Minute must be [00..59] - Second must be [00..59] - Subseconds are unconstrained precision - Timezone must be Z for UTC or else formatted with HH:MM where HH is [00..23] and MM is [00..59]. Protobuf has a few extra effective constraints compared to RFC3339 though, which are _mostly_ academic: - We disallow subsecond resolution has more than 9 decimal digits - Some RFC3339 timestamps which are not-UTC-timezone in year 1 or year 9999 are not valid in Protobuf [*reason explained below] Note that GoProto uses a std RFC3339 parser and does implement these bonus restrictions rules on top. * The reason is that `0001-01-01T00:00:00+00:01` is a legal RFC3339 timestamp, but is BCE in UTC timezone. This is an oddity: we otherwise say parsers should accept RFC3339 timestamps with any timezone, but must serialize as UTC. This timestamp is not legally representable in RFC3339 in UTC, and the google.protobuf.Timestamp field secs is documented that `-62135596800` is the minimum legal value, but this timestamp is earlier than that. Because this situation only occurs at the years 1 and 9999 its not plausibly a concern on real user data, its only an oddity that you must either reject this legal RFC3339 timestamp at parse time, or else accept it but produce an in-memory google.protobuf.Timestamp which is officially 'invalid' and cannot be printed back out. PiperOrigin-RevId: 954603113
diff --git a/conformance/binary_json_conformance_suite.cc b/conformance/binary_json_conformance_suite.cc index 0398495..d35b659 100644 --- a/conformance/binary_json_conformance_suite.cc +++ b/conformance/binary_json_conformance_suite.cc
@@ -3405,6 +3405,71 @@ return value["optionalTimestamp"].asString() == "1970-01-01T00:00:00.000000010Z"; }); + + // Out of bounds / invalid components should JSON parse fail + ExpectParseFailureForJson("TimestampJsonInputMonthTooLarge", REQUIRED, + R"({"optionalTimestamp": "1970-13-01T00:00:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputMonthZero", REQUIRED, + R"({"optionalTimestamp": "1970-00-01T00:00:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputDayTooLarge", REQUIRED, + R"({"optionalTimestamp": "1970-01-32T00:00:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputDayZero", REQUIRED, + R"({"optionalTimestamp": "1970-01-00T00:00:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputHourTooLarge", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T24:00:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputHourTooLarge25", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T25:00:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputMinuteTooLarge", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T00:60:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputSecondTooLarge", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T00:00:60Z"})"); + ExpectParseFailureForJson( + "TimestampJsonInputInvalidOffsetHour", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T00:00:00+24:00"})"); + ExpectParseFailureForJson( + "TimestampJsonInputInvalidOffsetMinute", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T00:00:00+00:60"})"); + ExpectParseFailureForJson( + "TimestampJsonInputOffsetBoundaryUnderflow", REQUIRED, + R"({"optionalTimestamp": "0001-01-01T00:00:00+00:01"})"); + ExpectParseFailureForJson( + "TimestampJsonInputOffsetBoundaryOverflow", REQUIRED, + R"({"optionalTimestamp": "9999-12-31T23:59:59-00:01"})"); + ExpectParseFailureForJson( + "TimestampJsonInputInvalidNanos", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T00:00:00.1234567890Z"})"); + ExpectParseFailureForJson( + "TimestampJsonInputInvalidCharsInNanos", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T00:00:00.123aZ"})"); + ExpectParseFailureForJson("TimestampJsonInputYearTooShort", REQUIRED, + R"({"optionalTimestamp": "999-01-01T00:00:00Z"})"); + ExpectParseFailureForJson( + "TimestampJsonInputYearTooLong", REQUIRED, + R"({"optionalTimestamp": "00001-01-01T00:00:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputMonthTooShort", REQUIRED, + R"({"optionalTimestamp": "1970-1-01T00:00:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputDayTooShort", REQUIRED, + R"({"optionalTimestamp": "1970-01-1T00:00:00Z"})"); + ExpectParseFailureForJson("TimestampJsonInputNonLeapFeb29", REQUIRED, + R"({"optionalTimestamp": "2001-02-29T00:00:00Z"})"); + + // Honoring time zones correctly + RunValidJsonTest("TimestampJsonInputLeapFeb29", REQUIRED, + R"({"optionalTimestamp": "2000-02-29T00:00:00Z"})", + "optional_timestamp: {seconds: 951782400}"); + RunValidJsonTest("TimestampWithOffsetShiftsDay", REQUIRED, + + R"({"optionalTimestamp": "1970-01-02T01:00:00+02:00"})", + "optional_timestamp: {seconds: 82800}"); + RunValidJsonTest("TimestampWithOffsetBoundaryInBoundsMin", REQUIRED, + R"({"optionalTimestamp": "0001-01-01T00:00:00-00:01"})", + "optional_timestamp: {seconds: -62135596740}"); + RunValidJsonTest("TimestampWithOffsetBoundaryInBoundsMax", REQUIRED, + R"({"optionalTimestamp": "9999-12-31T23:59:59+00:01"})", + "optional_timestamp: {seconds: 253402300739}"); + RunValidJsonTest("TimestampWithComplexOffset", REQUIRED, + R"({"optionalTimestamp": "1970-01-01T00:00:00-11:30"})", + "optional_timestamp: {seconds: 41400}"); } template <typename MessageType>
diff --git a/conformance/failure_list_cpp.txt b/conformance/failure_list_cpp.txt index f2d1149..8eee23e 100644 --- a/conformance/failure_list_cpp.txt +++ b/conformance/failure_list_cpp.txt
@@ -34,6 +34,17 @@ Recommended.*.JsonInput.FieldMaskInvalidCharacter # Should have failed to parse, but didn't. Required.*.JsonInput.SingleValueForRepeatedFieldInt32 # Should have failed to parse, but didn't. Required.*.JsonInput.SingleValueForRepeatedFieldMessage # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge25 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMinuteTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputNonLeapFeb29 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputOffsetBoundaryOverflow # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputOffsetBoundaryUnderflow # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputSecondTooLarge # Should have failed to parse, but didn't. Required.*.ProtobufInput.BadTag_FieldNumberSlightlyTooHigh # Should have failed to parse, but didn't. # TODO: Uncomment once conformance tests can express failures that are not expected to be fixed. # Recommended.Editions_Proto2.ProtobufInput.RejectInvalidUtf8.String.MapKey # Should have failed to parse, but didn't.
diff --git a/conformance/failure_list_java.txt b/conformance/failure_list_java.txt index ded745c..325f394 100644 --- a/conformance/failure_list_java.txt +++ b/conformance/failure_list_java.txt
@@ -44,6 +44,22 @@ Required.*.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotBool # Should have failed to parse, but didn't. Required.*.JsonInput.RepeatedFieldWrongElementTypeExpectingStringsGotInt # Should have failed to parse, but didn't. Required.*.JsonInput.StringFieldNotAString # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooShort # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge25 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidNanos # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMinuteTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooShort # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputNonLeapFeb29 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputSecondTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputYearTooLong # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputYearTooShort # Should have failed to parse, but didn't. Required.*.ProtobufInput.UnknownOrdering.ProtobufOutput # Unknown field mismatch Required.*.ProtobufInput.BadTag_FieldNumberTooHigh # Should have failed to parse, but didn't. Required.*.ProtobufInput.BadTag_FieldNumberSlightlyTooHigh # Should have failed to parse, but didn't.
diff --git a/conformance/failure_list_jruby.txt b/conformance/failure_list_jruby.txt index ae082a2..3f09c36 100644 --- a/conformance/failure_list_jruby.txt +++ b/conformance/failure_list_jruby.txt
@@ -162,3 +162,20 @@ # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Oneof # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Repeated # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Singular # Should have failed to parse, but didn't. + +Required.*.JsonInput.TimestampJsonInputDayTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooShort # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge25 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidNanos # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMinuteTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooShort # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputNonLeapFeb29 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputSecondTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputYearTooLong # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputYearTooShort # Should have failed to parse, but didn't.
diff --git a/conformance/failure_list_jruby_ffi.txt b/conformance/failure_list_jruby_ffi.txt index 05fe4fe..cd374f2 100644 --- a/conformance/failure_list_jruby_ffi.txt +++ b/conformance/failure_list_jruby_ffi.txt
@@ -14,3 +14,16 @@ # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Oneof # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Repeated # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Singular # Should have failed to parse, but didn't. + +Required.*.JsonInput.TimestampJsonInputDayTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge25 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMinuteTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputNonLeapFeb29 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputOffsetBoundaryOverflow # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputSecondTooLarge # Should have failed to parse, but didn't.
diff --git a/conformance/failure_list_php.txt b/conformance/failure_list_php.txt index 6e54a83..c21c5bb 100644 --- a/conformance/failure_list_php.txt +++ b/conformance/failure_list_php.txt
@@ -56,3 +56,19 @@ Required.*.JsonInput.DoubleFieldTrueValue # Should have failed to parse, but didn't. Required.*.JsonInput.FloatFieldFalseValue # Should have failed to parse, but didn't. Required.*.JsonInput.FloatFieldTrueValue # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooShort # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge25 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMinuteTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooShort # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputNonLeapFeb29 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputOffsetBoundaryOverflow # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputOffsetBoundaryUnderflow # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputSecondTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputYearTooShort # Should have failed to parse, but didn't.
diff --git a/conformance/failure_list_php_c.txt b/conformance/failure_list_php_c.txt index 3eecf12..78281f5 100644 --- a/conformance/failure_list_php_c.txt +++ b/conformance/failure_list_php_c.txt
@@ -1,6 +1,6 @@ -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.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.Proto2.JsonInput.FieldNameExtension.Validator Required.*.JsonInput.Int32FieldQuotedExponentialValue.* # Failed to parse input or produce output. Required.Proto2.JsonInput.BoolFieldFalse.JsonOutput @@ -11,3 +11,15 @@ Required.Proto2.JsonInput.EnumFieldNumericValueZero.ProtobufOutput Required.Proto2.JsonInput.StoresDefaultPrimitive.Validator Required.*.JsonInput.AnyWithNoType.* +Required.*.JsonInput.TimestampJsonInputDayTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge25 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMinuteTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputNonLeapFeb29 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputOffsetBoundaryOverflow # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputSecondTooLarge # Should have failed to parse, but didn't.
diff --git a/conformance/failure_list_python.txt b/conformance/failure_list_python.txt index ee19466..09c3b36 100644 --- a/conformance/failure_list_python.txt +++ b/conformance/failure_list_python.txt
@@ -1,11 +1,15 @@ -Recommended.*.JsonInput.FieldNameDuplicateDifferentCasing1 # Should have failed to parse, but didn't. -Recommended.*.JsonInput.FieldNameDuplicateDifferentCasing2 # 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. Required.*.JsonInput.DoubleFieldFalseValue # Should have failed to parse, but didn't. Required.*.JsonInput.DoubleFieldTrueValue # Should have failed to parse, but didn't. Required.*.JsonInput.EnumFieldFalseValue # Should have failed to parse, but didn't. Required.*.JsonInput.EnumFieldTrueValue # Should have failed to parse, but didn't. Required.*.JsonInput.FloatFieldFalseValue # Should have failed to parse, but didn't. Required.*.JsonInput.FloatFieldTrueValue # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooShort # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooShort # Should have failed to parse, but didn't. Required.*.ProtobufInput.BadTag_FieldNumberTooHigh # Should have failed to parse, but didn't. Required.*.ProtobufInput.BadTag_FieldNumberSlightlyTooHigh # Should have failed to parse, but didn't. Required.*.ProtobufInput.BadTag_OverlongVarint # Should have failed to parse, but didn't.
diff --git a/conformance/failure_list_python_cpp.txt b/conformance/failure_list_python_cpp.txt index aa42541..dc0e034 100644 --- a/conformance/failure_list_python_cpp.txt +++ b/conformance/failure_list_python_cpp.txt
@@ -7,14 +7,18 @@ # TODO: insert links to corresponding bugs tracking the issue. # Should we use GitHub issues or the Google-internal bug tracker? -Recommended.*.JsonInput.FieldNameDuplicateDifferentCasing1 # Should have failed to parse, but didn't. -Recommended.*.JsonInput.FieldNameDuplicateDifferentCasing2 # 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. Required.*.JsonInput.DoubleFieldFalseValue # Should have failed to parse, but didn't. Required.*.JsonInput.DoubleFieldTrueValue # Should have failed to parse, but didn't. Required.*.JsonInput.EnumFieldFalseValue # Should have failed to parse, but didn't. Required.*.JsonInput.EnumFieldTrueValue # Should have failed to parse, but didn't. Required.*.JsonInput.FloatFieldFalseValue # Should have failed to parse, but didn't. Required.*.JsonInput.FloatFieldTrueValue # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooShort # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooShort # Should have failed to parse, but didn't. Required.*.ProtobufInput.BadTag_FieldNumberSlightlyTooHigh # Should have failed to parse, but didn't. # TODO: Uncomment once conformance tests can express failures that are not expected to be fixed. # Recommended.Editions_Proto2.ProtobufInput.RejectInvalidUtf8.String.MapKey # Should have failed to parse, but didn't.
diff --git a/conformance/failure_list_python_upb.txt b/conformance/failure_list_python_upb.txt index 96376fc..22d445d 100644 --- a/conformance/failure_list_python_upb.txt +++ b/conformance/failure_list_python_upb.txt
@@ -1,5 +1,5 @@ -Recommended.*.JsonInput.FieldNameDuplicateDifferentCasing1 # Should have failed to parse, but didn't. -Recommended.*.JsonInput.FieldNameDuplicateDifferentCasing2 # 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. Required.*.JsonInput.DoubleFieldFalseValue # Should have failed to parse, but didn't. Required.*.JsonInput.DoubleFieldTrueValue # Should have failed to parse, but didn't. Required.*.JsonInput.EnumFieldFalseValue # Should have failed to parse, but didn't. @@ -17,3 +17,8 @@ # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Oneof # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Repeated # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Singular # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooShort # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooShort # Should have failed to parse, but didn't. +
diff --git a/conformance/failure_list_ruby.txt b/conformance/failure_list_ruby.txt index 1e71680..dbd57a4 100644 --- a/conformance/failure_list_ruby.txt +++ b/conformance/failure_list_ruby.txt
@@ -14,3 +14,16 @@ # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Oneof # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Repeated # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Singular # Should have failed to parse, but didn't. + +Required.*.JsonInput.TimestampJsonInputDayTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge25 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMinuteTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputNonLeapFeb29 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputOffsetBoundaryOverflow # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputSecondTooLarge # Should have failed to parse, but didn't.
diff --git a/upb/conformance/conformance_upb_failures.txt b/upb/conformance/conformance_upb_failures.txt index 05fe4fe..cc17691 100644 --- a/upb/conformance/conformance_upb_failures.txt +++ b/upb/conformance/conformance_upb_failures.txt
@@ -1,8 +1,8 @@ -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. -Required.*.JsonInput.Int32FieldQuotedExponentialValue.* # Failed to parse input or produce output. -Required.*.JsonInput.AnyWithNoType.* # Failed to parse input or produce output. +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. +Required.*.JsonInput.Int32FieldQuotedExponentialValue.* # Failed to parse input or produce output. +Required.*.JsonInput.AnyWithNoType.* # Failed to parse input or produce output. # TODO: Uncomment once conformance tests can express failures that are not expected to be fixed. # Recommended.Editions_Proto2.ProtobufInput.RejectInvalidUtf8.String.MapKey # Should have failed to parse, but didn't. # Recommended.Editions_Proto2.ProtobufInput.RejectInvalidUtf8.String.MapValue # Should have failed to parse, but didn't. @@ -14,3 +14,15 @@ # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Oneof # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Repeated # Should have failed to parse, but didn't. # Recommended.Proto2.ProtobufInput.RejectInvalidUtf8.String.Singular # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputDayZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputHourTooLarge25 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetHour # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputInvalidOffsetMinute # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMinuteTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthTooLarge # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputMonthZero # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputNonLeapFeb29 # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputOffsetBoundaryOverflow # Should have failed to parse, but didn't. +Required.*.JsonInput.TimestampJsonInputSecondTooLarge # Should have failed to parse, but didn't.