Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
2test cases
2files differ
2modified
0new
0deleted
11changed lines
+11 −0insertions / deletions
Base 51ec47a0b9414d24e4d9668d802d2f65cfef9dc3 · PR merge 3098bf3e7d95fae18270555e49ca1490f1a621ab · Head dd363175f079a3559a0d4ebccc5d4f674c80702a · raw patch
Test case

test/inputs/schema/min-max-items.schema

1 generated file · +5 −0
Mschema-pikedefault / TopLevel.pmod+5 −0
@@ -35,10 +35,15 @@ class TopLevel {
3535 TopLevel TopLevel_from_JSON(mixed json) {
3636 TopLevel retval = TopLevel();
3737
38+ if (sizeof(json["maxOnly"]) > 3) error("Array too long");
3839 retval.max_only = json["maxOnly"];
40+ if (sizeof(json["minAndMax"]) < 1) error("Array too short");
41+ if (sizeof(json["minAndMax"]) > 4) error("Array too long");
3942 retval.min_and_max = json["minAndMax"];
43+ if (sizeof(json["minOnly"]) < 2) error("Array too short");
4044 retval.min_only = json["minOnly"];
4145 retval.plain = json["plain"];
46+ if (sizeof(json["unionItems"]) < 2) error("Array too short");
4247 retval.union_items = json["unionItems"];
4348
4449 return retval;
Test case

test/inputs/schema/vega-lite.schema

1 generated file · +6 −0
Mschema-pikedefault / TopLevel.pmod+6 −0
@@ -2636,13 +2636,17 @@ BinParams BinParams_from_JSON(mixed json) {
26362636 BinParams retval = BinParams();
26372637
26382638 retval.base = json["base"];
2639+ if (has_index(json, "divide") && sizeof(json["divide"]) < 1) error("Array too short");
26392640 retval.divide = json["divide"];
2641+ if (has_index(json, "extent") && sizeof(json["extent"]) < 2) error("Array too short");
2642+ if (has_index(json, "extent") && sizeof(json["extent"]) > 2) error("Array too long");
26402643 retval.extent = json["extent"];
26412644 if (has_index(json, "maxbins") && json["maxbins"] < 2) error("Value below minimum");
26422645 retval.maxbins = json["maxbins"];
26432646 retval.minstep = json["minstep"];
26442647 retval.nice = json["nice"];
26452648 retval.step = json["step"];
2649+ if (has_index(json, "steps") && sizeof(json["steps"]) < 1) error("Array too short");
26462650 retval.steps = json["steps"];
26472651
26482652 return retval;
@@ -2783,6 +2787,8 @@ Predicate Predicate_from_JSON(mixed json) {
27832787 retval.equal = json["equal"];
27842788 retval.field = json["field"];
27852789 retval.time_unit = TimeUnit_from_JSON(json["timeUnit"]);
2790+ if (has_index(json, "range") && sizeof(json["range"]) < 2) error("Array too short");
2791+ if (has_index(json, "range") && sizeof(json["range"]) > 2) error("Array too long");
27862792 retval.range = json["range"];
27872793 retval.one_of = json["oneOf"];
27882794 if (arrayp(json["selection"])) error("Unexpected array");
No generated files match these filters.