Commit a6bdd0a
Add conformance test cases for malformed nanos fields on Durations and Timestamps.
Durations have a validity restriction on `nanos` that:
- The range allowed is (-1s..1s) exclusive
- The sign must match the sign of `secs` (for 0 secs both positive and negative values of nanos are allowed)
Timestamps have a validity restriction on `nanos` that:
- The range allowed is [0..1s)
These cases have always been commented as only being valid under these constraints, and other validity constraints are already checked to be handled as ProtoJSON serialize-failures, but this particular condition was not covered by the conformance suite.
PiperOrigin-RevId: 7911949391 parent fbe1d65 commit a6bdd0a
File tree
3 files changed
+26
-0
lines changed- conformance
3 files changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3128 | 3128 | | |
3129 | 3129 | | |
3130 | 3130 | | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
3131 | 3143 | | |
3132 | 3144 | | |
3133 | 3145 | | |
| |||
3220 | 3232 | | |
3221 | 3233 | | |
3222 | 3234 | | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
3223 | 3241 | | |
3224 | 3242 | | |
3225 | 3243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
0 commit comments