Skip to content

Commit

Permalink
fix test values acc to dfinity/candid#564
Browse files Browse the repository at this point in the history
  • Loading branch information
crusso committed Jul 26, 2024
1 parent f132d3b commit e6a75ed
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
24 changes: 12 additions & 12 deletions test/run-drun/idl-spacebomb.mo
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ actor this {
]);

await* test("zero_sized_record_extra_argument", [
"DIDL\04\6c\03\01\7f\02\01\03\02\6c\01\01\70\6c\00\6d\00\01\03\80\94\eb\dc\03"
"DIDL\04\6c\03\00\7f\01\01\02\02\6c\01\00\70\6c\00\6d\00\01\03\80\94\eb\dc\03"
]);

await* test("vec_vec_null_extra_argument", [
"DIDL\02\6d\01\6d\7f\01\00\05\ff\ff\3f\ff\ff\3f\ff\ff\3f\ff\ff\3f\ff\ff\3f"
]);

await* test("vec_record_emp_extra_argument", [
"DIDL\03\6c\01\d6\fc\a7\02\01\6d\02\6c\00\01\00\80\ad\e2\04"
"DIDL\02\6d\01\6c\00\01\00\80\ad\e2\04"
]);

await* test("vec_opt_record_with_2_20_null_extra_argument", [
Expand All @@ -149,10 +149,10 @@ actor this {

debugPrint("BROKEN TEST?");
await* test("zero_sized_record_not_ignored", [
"DIDL\04\6c\03\01\7f\02\01\03\02\6c\01\01\70\6c\00\6d\00\01\03\80\94\eb\dc\03",
"DIDL\04\6c\03\01\7f\02\01\03\02\6c\01\01\70\6c\00\6d\00\01\03\80\ad\e2\04",
"DIDL\04\6c\03\01\7f\02\01\03\02\6c\01\01\70\6c\00\6d\00\01\03\ff\ff\3f",
"DIDL\04\6c\03\01\7f\02\01\03\02\6c\01\01\70\6c\00\6d\00\01\03\80\b5\18",
"DIDL\04\6c\03\00\7f\01\01\02\02\6c\01\00\70\6c\00\6d\00\01\03\80\94\eb\dc\03",
"DIDL\04\6c\03\00\7f\01\01\02\02\6c\01\00\70\6c\00\6d\00\01\03\80\ad\e2\04",
"DIDL\04\6c\03\00\7f\01\01\02\02\6c\01\00\70\6c\00\6d\00\01\03\ff\ff\3f",
"DIDL\04\6c\03\00\7f\01\01\02\02\6c\01\00\70\6c\00\6d\00\01\03\80\b5\18",
]);

await* test("vec_vec_null_not_ignored", [
Expand All @@ -161,7 +161,7 @@ actor this {

debugPrint("BROKEN TEST?");
await* test("vec_record_emp_not_ignored", [
"DIDL\03\6c\01\d6\fc\a7\02\01\6d\02\6c\00\01\00\80\ad\e2\04"
"DIDL\02\6d\01\6c\00\01\00\80\ad\e2\04"
]);

// Decoding under opt
Expand All @@ -181,10 +181,10 @@ actor this {

debugPrint("BROKEN TEST?");
await* test("zero_sized_record_subtyping", [
"DIDL\04\6c\03\01\7f\02\01\03\02\6c\01\01\70\6c\00\6d\00\01\03\80\94\eb\dc\03",
"DIDL\04\6c\03\01\7f\02\01\03\02\6c\01\01\70\6c\00\6d\00\01\03\80\ad\e2\04",
"DIDL\04\6c\03\01\7f\02\01\03\02\6c\01\01\70\6c\00\6d\00\01\03\ff\ff\3f",
"DIDL\04\6c\03\01\7f\02\01\03\02\6c\01\01\70\6c\00\6d\00\01\03\80\b5\18",
"DIDL\04\6c\03\00\7f\01\01\02\02\6c\01\00\70\6c\00\6d\00\01\03\80\94\eb\dc\03",
"DIDL\04\6c\03\00\7f\01\01\02\02\6c\01\00\70\6c\00\6d\00\01\03\80\ad\e2\04",
"DIDL\04\6c\03\00\7f\01\01\02\02\6c\01\00\70\6c\00\6d\00\01\03\ff\ff\3f",
"DIDL\04\6c\03\00\7f\01\01\02\02\6c\01\00\70\6c\00\6d\00\01\03\80\b5\18",
]);

await* test("vec_vec_null_subtyping", [
Expand All @@ -193,7 +193,7 @@ actor this {

debugPrint("BROKEN TEST?");
await* test("vec_record_emp_subtyping", [
"DIDL\03\6c\01\d6\fc\a7\02\01\6d\02\6c\00\01\00\80\ad\e2\04"
"DIDL\02\6d\01\6c\00\01\00\80\ad\e2\04"
]);

await* test("vec_opt_record_with_2_20_null_subtyping", [
Expand Down
32 changes: 16 additions & 16 deletions test/run-drun/ok/idl-spacebomb.drun-run.ok
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ debug.print: {function = "vec_null_extra_argument"; hex = "4449444C016D7F0100809
debug.print: decoded at low cost
debug.print: {function = "vec_reserved_extra_argument"; hex = "4449444C016D7001008094EBDC03"}
debug.print: decoded at low cost
debug.print: {function = "zero_sized_record_extra_argument"; hex = "4449444C046C03017F020103026C0101706C006D0001038094EBDC03"}
debug.print: {function = "zero_sized_record_extra_argument"; hex = "4449444C046C03007F010102026C0100706C006D0001038094EBDC03"}
debug.print: decoded at low cost
debug.print: {function = "vec_vec_null_extra_argument"; hex = "4449444C026D016D7F010005FFFF3FFFFF3FFFFF3FFFFF3FFFFF3F"}
debug.print: decoded at low cost
debug.print: {function = "vec_record_emp_extra_argument"; hex = "4449444C036C01D6FCA702016D026C00010080ADE204"}
debug.print: {function = "vec_record_emp_extra_argument"; hex = "4449444C026D016C00010080ADE204"}
debug.print: decoded at low cost
debug.print: {function = "vec_opt_record_with_2_20_null_extra_argument"; hex = "4449444C176C02017F027F6C02010002006C02000101016C02000201026C02000301036C02000401046C02000501056C02000601066C02000701076C02000801086C02000901096C02000A010A6C02000B010B6C02000C010C6C02000D020D6C02000E010E6C02000F010F6C02001001106C02001101116C02001201126C02001301136E146D150116050101010101"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: exceeded instruction limit
Expand All @@ -29,19 +29,19 @@ debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: ID
debug.print: {function = "vec_reserved_not_ignored"; hex = "4449444C016D70010080BF18"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: exceeded instruction limit
debug.print: BROKEN TEST?
debug.print: {function = "zero_sized_record_not_ignored"; hex = "4449444C046C03017F020103026C0101706C006D0001038094EBDC03"}
debug.print: {function = "zero_sized_record_not_ignored"; hex = "4449444C046C03007F010102026C0100706C006D0001038094EBDC03"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: RTS error: Array allocation too large
debug.print: {function = "zero_sized_record_not_ignored"; hex = "4449444C046C03017F020103026C0101706C006D00010380ADE204"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: did not find field _0_ in record
debug.print: {function = "zero_sized_record_not_ignored"; hex = "4449444C046C03017F020103026C0101706C006D000103FFFF3F"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: did not find field _0_ in record
debug.print: {function = "zero_sized_record_not_ignored"; hex = "4449444C046C03017F020103026C0101706C006D00010380B518"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: did not find field _0_ in record
debug.print: {function = "zero_sized_record_not_ignored"; hex = "4449444C046C03007F010102026C0100706C006D00010380ADE204"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: exceeded instruction limit
debug.print: {function = "zero_sized_record_not_ignored"; hex = "4449444C046C03007F010102026C0100706C006D000103FFFF3F"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: exceeded instruction limit
debug.print: {function = "zero_sized_record_not_ignored"; hex = "4449444C046C03007F010102026C0100706C006D00010380B518"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: exceeded instruction limit
debug.print: {function = "vec_vec_null_not_ignored"; hex = "4449444C026D016D7F010005FFFF3FFFFF3FFFFF3FFFFF3FFFFF3F"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: exceeded instruction limit
debug.print: BROKEN TEST?
debug.print: {function = "vec_record_emp_not_ignored"; hex = "4449444C036C01D6FCA702016D026C00010080ADE204"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: unexpected IDL type when parsing [{}]
debug.print: {function = "vec_record_emp_not_ignored"; hex = "4449444C026D016C00010080ADE204"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: exceeded instruction limit
debug.print: {function = "vec_null_subtyping"; hex = "4449444C016D7F01008094EBDC03"}
debug.print: decoded at low cost
debug.print: {function = "vec_null_subtyping"; hex = "4449444C016D7F010080ADE204"}
Expand All @@ -59,18 +59,18 @@ debug.print: decoded at low cost
debug.print: {function = "vec_reserved_subtyping"; hex = "4449444C016D70010080BF18"}
debug.print: decoded at low cost
debug.print: BROKEN TEST?
debug.print: {function = "zero_sized_record_subtyping"; hex = "4449444C046C03017F020103026C0101706C006D0001038094EBDC03"}
debug.print: {function = "zero_sized_record_subtyping"; hex = "4449444C046C03007F010102026C0100706C006D0001038094EBDC03"}
debug.print: decoded at low cost
debug.print: {function = "zero_sized_record_subtyping"; hex = "4449444C046C03017F020103026C0101706C006D00010380ADE204"}
debug.print: {function = "zero_sized_record_subtyping"; hex = "4449444C046C03007F010102026C0100706C006D00010380ADE204"}
debug.print: decoded at low cost
debug.print: {function = "zero_sized_record_subtyping"; hex = "4449444C046C03017F020103026C0101706C006D000103FFFF3F"}
debug.print: {function = "zero_sized_record_subtyping"; hex = "4449444C046C03007F010102026C0100706C006D000103FFFF3F"}
debug.print: decoded at low cost
debug.print: {function = "zero_sized_record_subtyping"; hex = "4449444C046C03017F020103026C0101706C006D00010380B518"}
debug.print: {function = "zero_sized_record_subtyping"; hex = "4449444C046C03007F010102026C0100706C006D00010380B518"}
debug.print: decoded at low cost
debug.print: {function = "vec_vec_null_subtyping"; hex = "4449444C026D016D7F010005FFFF3FFFFF3FFFFF3FFFFF3FFFFF3F"}
debug.print: decoded at low cost
debug.print: BROKEN TEST?
debug.print: {function = "vec_record_emp_subtyping"; hex = "4449444C036C01D6FCA702016D026C00010080ADE204"}
debug.print: {function = "vec_record_emp_subtyping"; hex = "4449444C026D016C00010080ADE204"}
debug.print: decoded at low cost
debug.print: {function = "vec_opt_record_with_2_20_null_subtyping"; hex = "4449444C176C02017F027F6C02010002006C02000101016C02000201026C02000301036C02000401046C02000501056C02000601066C02000701076C02000801086C02000901096C02000A010A6C02000B010B6C02000C010C6C02000D020D6C02000E010E6C02000F010F6C02001001106C02001101116C02001201126C02001301136E146D150116050101010101"}
debug.print: IC0503: Canister rwlgt-iiaaa-aaaaa-aaaaa-cai trapped explicitly: IDL error: exceeded instruction limit
Expand Down

0 comments on commit e6a75ed

Please sign in to comment.