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 ca93dd81355d5a188853919baaae06f1da8767d4 · PR merge 9a6544d68789b3583ad80c91b2078d40569bbd1e · Head 32ac8f1b162c327529dfa8d802eb0e9f2d83ee6a · 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
@@ -2690,13 +2690,17 @@ BinParams BinParams_from_JSON(mixed json) {
26902690 BinParams retval = BinParams();
26912691
26922692 retval.base = json["base"];
2693+ if (has_index(json, "divide") && sizeof(json["divide"]) < 1) error("Array too short");
26932694 retval.divide = json["divide"];
2695+ if (has_index(json, "extent") && sizeof(json["extent"]) < 2) error("Array too short");
2696+ if (has_index(json, "extent") && sizeof(json["extent"]) > 2) error("Array too long");
26942697 retval.extent = json["extent"];
26952698 if (has_index(json, "maxbins") && json["maxbins"] < 2) error("Value below minimum");
26962699 retval.maxbins = json["maxbins"];
26972700 retval.minstep = json["minstep"];
26982701 retval.nice = json["nice"];
26992702 retval.step = json["step"];
2703+ if (has_index(json, "steps") && sizeof(json["steps"]) < 1) error("Array too short");
27002704 retval.steps = json["steps"];
27012705
27022706 return retval;
@@ -2837,6 +2841,8 @@ Predicate Predicate_from_JSON(mixed json) {
28372841 retval.equal = json["equal"];
28382842 retval.field = json["field"];
28392843 retval.time_unit = TimeUnit_from_JSON(json["timeUnit"]);
2844+ if (has_index(json, "range") && sizeof(json["range"]) < 2) error("Array too short");
2845+ if (has_index(json, "range") && sizeof(json["range"]) > 2) error("Array too long");
28402846 retval.range = json["range"];
28412847 retval.one_of = json["oneOf"];
28422848 if (arrayp(json["selection"])) error("Unexpected array");
No generated files match these filters.