assertExpectedCount function
void
assertExpectedCount(
- int actual,
- int expected,
- String itemType,
- ResolvedDecodeOptions options,
Asserts that the actual count matches the expected count in strict mode.
@param actual The actual count
@param expected The expected count
@param itemType The type of items being counted (e.g., list array items, tabular rows)
@param options Decode options
@throws RangeError if counts don't match in strict mode
Implementation
void assertExpectedCount(
int actual, int expected, String itemType, ResolvedDecodeOptions options) {
if (options.strict && actual != expected) {
throw RangeError('Expected $expected $itemType, but got $actual');
}
}