Skip to content

Commit

Permalink
add more code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-schott committed Oct 3, 2023
1 parent 4c30e6c commit d9cdcb6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372082]: Expected a tuple with 2 elements, found one with 3 elements\n --> compiler-test:5:13\n |\n 5 | let (a,b,c): (u8,u8) = (2u8,3u8);\n | ^^^^^^^\nError [ETYC0372082]: Expected a tuple with 3 elements, found one with 2 elements\n --> compiler-test:6:13\n |\n 6 | let (d,e): (u8,u8,u8) = (1u8,2u8,3u8);\n | ^^^^^\n"
- "Error [EPAR0370029]: A tuple type must have at least two elements.\n --> compiler-test:7:18\n |\n 7 | let (f): (u8) = (1u8);\n | ^^^^"
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*
namespace: Compile
expectation: Fail
expectation: Pass
*/

program test.aleo {
function main(y: bool) -> bool {
let (a,b,c): (u8,u8) = (2u8,3u8);
let (d,e): (u8,u8,u8) = (1u8,2u8,3u8);
let (g,h,i): (u8,u8,u8) = (1u8);
return y;
}
}
Expand Down
11 changes: 11 additions & 0 deletions tests/tests/compiler/definition/tuple_def_fail.leo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
namespace: Compile
expectation: Pass
*/

program test.aleo {
function main(y: bool) -> bool {
let (1u8+1u8,1u8+1u8): (u8,u8) = (1u8,2u8);
return y;
}
}

0 comments on commit d9cdcb6

Please sign in to comment.