Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dulajdilshan committed May 11, 2023
1 parent 9f188b8 commit 7c72d3c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,18 @@ function testMappingBindingPatternInListBindingPattern() {
int p5;

[[{p1, p2}], [[{p3, p4}], {p5}]] = [[{p1: 10, p2: 12}], [[{p3: 13, p4: 14}], {p5: 15}]];

{p3: {p1, p2}} = getMap();

// TODO: Uncomment after fixing #40312
// int d;
// error<record { record { int d; } x; }> err = error("Transaction Failure", x = {d: 0});

// error(x = {d}) = err;
}

function getMap() returns record {record {int p1; int p2;} p3;} {
return {p3: {p1: 2, p2: 3}};
}

function assertEquality(anydata expected, anydata actual) {
Expand Down

0 comments on commit 7c72d3c

Please sign in to comment.