You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For {extension,non-extension} {singular,repeated} fields, check range and type
checks.
All fields with range checks are tested. For type and nullability checks we
only use a message and a `bool` field, as there are too many types of fields
and most of them use the same validation function.
Fields with range checks are not tested for type and nullability checks. To
check whether a value is within range we have to use as a non-null `int` or
`double`, so if the value being checked doesn't have the right type the range
check function will throw anyway.
This reveals two inconsistencies in the library:
- When type of a non-repeated extension value is not right we throw an argument
error instead of a type error.
- `setExtension` takes an `Object` (not nullable) as an argument but
`addExtension` takes `Object?` (nullable).
I tested accordingly instead of trying to fix the inconsistencies as fixing
them will break downstream.
0 commit comments