diff --git a/compiler/parser/src/parser/type_.rs b/compiler/parser/src/parser/type_.rs index 08ed2e336b..552efe421b 100644 --- a/compiler/parser/src/parser/type_.rs +++ b/compiler/parser/src/parser/type_.rs @@ -32,6 +32,7 @@ pub(crate) const TYPE_TOKENS: &[Token] = &[ Token::Group, Token::Address, Token::Bool, + Token::Char, ]; impl ParserContext<'_> { diff --git a/disabled_tests/compiler/console/log_parameter_fail_empty.leo b/disabled_tests/compiler/console/log_parameter_empty_fail.leo similarity index 100% rename from disabled_tests/compiler/console/log_parameter_fail_empty.leo rename to disabled_tests/compiler/console/log_parameter_empty_fail.leo diff --git a/disabled_tests/compiler/console/log_parameter_fail_none.leo b/disabled_tests/compiler/console/log_parameter_none_fail.leo similarity index 100% rename from disabled_tests/compiler/console/log_parameter_fail_none.leo rename to disabled_tests/compiler/console/log_parameter_none_fail.leo diff --git a/disabled_tests/compiler/function/multiple_returns_fail.leo b/disabled_tests/compiler/function/multiple_returns_fail.leo index ea4f5de447..2f956ea1d1 100644 --- a/disabled_tests/compiler/function/multiple_returns_fail.leo +++ b/disabled_tests/compiler/function/multiple_returns_fail.leo @@ -5,9 +5,6 @@ input_file: input/dummy.in */ function main() -> i8 { - if true { - return 1i8; //ignored - } - return 2i8; //ignored - return 3i8; //returns + return 2i8; + return 3i8; } diff --git a/disabled_tests/compiler/function/shadow_global_const_input_fail copy.leo b/disabled_tests/compiler/function/shadow_global_const_input_fail copy.leo index c07c729b2a..288c4ba829 100644 --- a/disabled_tests/compiler/function/shadow_global_const_input_fail copy.leo +++ b/disabled_tests/compiler/function/shadow_global_const_input_fail copy.leo @@ -1,7 +1,6 @@ /* namespace: Compile expectation: Fail -input_file: input/dummy.in */ const hi = 1u32; diff --git a/disabled_tests/compiler/integers/i16/negate_min.leo b/disabled_tests/compiler/integers/i16/negate_min_fail.leo similarity index 100% rename from disabled_tests/compiler/integers/i16/negate_min.leo rename to disabled_tests/compiler/integers/i16/negate_min_fail.leo diff --git a/disabled_tests/compiler/integers/i32/max.leo b/disabled_tests/compiler/integers/i32/max.leo deleted file mode 100644 index a0a9b81009..0000000000 --- a/disabled_tests/compiler/integers/i32/max.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: ../input/dummy.in -*/ - -function main(y: bool) -> bool { - const a: i32 = 2147483647; - return y == true; -} diff --git a/disabled_tests/compiler/integers/i32/min.leo b/disabled_tests/compiler/integers/i32/min.leo deleted file mode 100644 index a8ba83186c..0000000000 --- a/disabled_tests/compiler/integers/i32/min.leo +++ /dev/null @@ -1,10 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: ../input/dummy.in -*/ - -function main(y: bool) -> bool { - const a: i32 = -2147483648; - return y == true; -} diff --git a/disabled_tests/compiler/integers/i32/mul.leo b/disabled_tests/compiler/integers/i32/mul.leo deleted file mode 100644 index ce66848f09..0000000000 --- a/disabled_tests/compiler/integers/i32/mul.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - i32.in: | - [main] - a: i32 = 2; - b: i32 = 5; - c: i32 = 10; - - [registers] - r0: bool = false; -*/ - -function main(a: i32, b: i32, c: i32) -> bool { - return a * b == c; -} diff --git a/disabled_tests/compiler/integers/i32/ne.leo b/disabled_tests/compiler/integers/i32/ne.leo deleted file mode 100644 index 502ca22281..0000000000 --- a/disabled_tests/compiler/integers/i32/ne.leo +++ /dev/null @@ -1,25 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - i32_ne.in: | - [main] - a: i32 = 2; - b: i32 = 5; - c: bool = true; - - [registers] - r0: bool = false; - - i32_e.in: | - [main] - a: i32 = 5; - b: i32 = 5; - c: bool = false; - - [registers] - r0: bool = false; -*/ - -function main(a: i32, b: i32, c: bool) -> bool{ - return (a != b) == c; -} diff --git a/disabled_tests/compiler/integers/i32/negate.leo b/disabled_tests/compiler/integers/i32/negate.leo deleted file mode 100644 index 2aee276336..0000000000 --- a/disabled_tests/compiler/integers/i32/negate.leo +++ /dev/null @@ -1,23 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - i32.in: | - [main] - a: i32 = 5; - b: i32 = -5; - - [registers] - r0: bool = false; - - i32.in: | - [main] - a: i32 = -5; - b: i32 = 5; - - [registers] - r0: bool = false; -*/ - -function main(a: i32, b: i32) -> bool { - return -a == b; -} diff --git a/disabled_tests/compiler/integers/i32/negate_zero.leo b/disabled_tests/compiler/integers/i32/negate_zero.leo deleted file mode 100644 index fe9084ea56..0000000000 --- a/disabled_tests/compiler/integers/i32/negate_zero.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - dummy.in: | - [main] - y: bool = true; - - [registers] - r0: bool = false; -*/ - -function main(y: bool) -> bool { - const a = 0i32; - - return (-a == 0i32) == y; -} diff --git a/disabled_tests/compiler/integers/i32/pow.leo b/disabled_tests/compiler/integers/i32/pow.leo deleted file mode 100644 index 2db0063b3d..0000000000 --- a/disabled_tests/compiler/integers/i32/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: i32) -> bool { - return a ** b == c; -} diff --git a/disabled_tests/compiler/integers/i32/sub.leo b/disabled_tests/compiler/integers/i32/sub.leo deleted file mode 100644 index cf554eba72..0000000000 --- a/disabled_tests/compiler/integers/i32/sub.leo +++ /dev/null @@ -1,17 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - i32.in: | - [main] - a: i32 = 100; - b: i32 = 50; - c: i32 = 50; - - [registers] - r0: bool = false; -*/ - -function main(a: i32, b: i32, c: i32) -> bool { - return a - b == c; -} diff --git a/disabled_tests/compiler/integers/i32/ternary.leo b/disabled_tests/compiler/integers/i32/ternary.leo deleted file mode 100644 index bbbb2ac2db..0000000000 --- a/disabled_tests/compiler/integers/i32/ternary.leo +++ /dev/null @@ -1,29 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - i32.in: | - [main] - s: bool = true; - a: i32 = 10; - b: i32 = 5; - c: i32 = 10; - - [registers] - r0: bool = false; - - i32_rev.in: | - [main] - s: bool = false; - a: i32 = 10; - b: i32 = 5; - c: i32 = 5; - - [registers] - r0: bool = false; -*/ - -function main(s: bool, a: i32, b: i32, c: i32) -> bool { - let r = s ? a : b; - - return r == c; -} diff --git a/disabled_tests/compiler/integers/i8/negate_min.leo b/disabled_tests/compiler/integers/i8/negate_min.leo index 5ec07974bd..4e85c5d49c 100644 --- a/disabled_tests/compiler/integers/i8/negate_min.leo +++ b/disabled_tests/compiler/integers/i8/negate_min.leo @@ -1,9 +1,12 @@ /* namespace: Compile -expectation: Fail +expectation: Pass +input_file: ../input/dummy.in */ -function main() { - const a = -128i8; - const b = -a; +function main(y: bool) -> bool { + const a: = -128i8; + const b: = -a; + + return (b == -a) == y; } diff --git a/disabled_tests/compiler/mutability/let_mut_nested.leo b/disabled_tests/compiler/mutability/let_mut_nested.leo deleted file mode 100644 index 98d1293211..0000000000 --- a/disabled_tests/compiler/mutability/let_mut_nested.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -*/ - -function main(a: bool) -> bool { - let x = 2u8; - let y = x; - let z = y / 2u8; - return (z == 1) == a; -} diff --git a/disabled_tests/compiler/statements/all_loops.leo b/disabled_tests/compiler/statements/all_loops.leo deleted file mode 100644 index d8128513d5..0000000000 --- a/disabled_tests/compiler/statements/all_loops.leo +++ /dev/null @@ -1,29 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/dummy.in -*/ - -function main(k: bool) -> bool { - let reverse: u32 = 0; - for i in 9..0 { - reverse += i; - } - - let forward: u32 = 0; - for x in 0..10 { - forward += x; - } - - let reverse_inclusive: u32 = 0; - for a in 10..=0 { - reverse_inclusive += a; - } - - let forward_inclusive: u32 = 0; - for b in 0..=10 { - forward_inclusive += b; - } - - return (reverse == forward) && (reverse_inclusive == forward_inclusive) && k; -} \ No newline at end of file diff --git a/disabled_tests/compiler/statements/iteration_variable.leo b/disabled_tests/compiler/statements/iteration_variable.leo deleted file mode 100644 index 1726525f91..0000000000 --- a/disabled_tests/compiler/statements/iteration_variable.leo +++ /dev/null @@ -1,16 +0,0 @@ -/* -namespace: Compile -expectation: Pass -input_file: inputs/u32_3.in -*/ - -function main(x: u32) -> bool { - const COUNT: u32 = 2; - let y = x; - - for i in 0..COUNT { - y -= 1; - } - - return y == 1; -} diff --git a/tests/compiler/_group/add.leo b/tests/compiler/_group/add.leo deleted file mode 100644 index bb84df2d6c..0000000000 --- a/tests/compiler/_group/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: group, b: group, c: group) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/tests/compiler/_group/assert_eq.leo b/tests/compiler/_group/assert_eq.leo deleted file mode 100644 index 3886a07bbf..0000000000 --- a/tests/compiler/_group/assert_eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: group, b: group) { - console.assert(a == b); -} \ No newline at end of file diff --git a/tests/compiler/_group/both_sign_high.leo b/tests/compiler/_group/both_sign_high.leo deleted file mode 100644 index 4c93573e1e..0000000000 --- a/tests/compiler/_group/both_sign_high.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = (+, +)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/both_sign_inferred.leo b/tests/compiler/_group/both_sign_inferred.leo deleted file mode 100644 index 0bbd360ba0..0000000000 --- a/tests/compiler/_group/both_sign_inferred.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = (_, _)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/both_sign_low.leo b/tests/compiler/_group/both_sign_low.leo deleted file mode 100644 index 1cb4f46c55..0000000000 --- a/tests/compiler/_group/both_sign_low.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = (-, -)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/eq.leo b/tests/compiler/_group/eq.leo deleted file mode 100644 index 09f6210ac3..0000000000 --- a/tests/compiler/_group/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: group, b: group, c: bool) { - console.assert((a == b) == c); -} \ No newline at end of file diff --git a/tests/compiler/_group/input.leo b/tests/compiler/_group/input.leo deleted file mode 100644 index 3886a07bbf..0000000000 --- a/tests/compiler/_group/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: group, b: group) { - console.assert(a == b); -} \ No newline at end of file diff --git a/tests/compiler/_group/input/valid.in b/tests/compiler/_group/input/valid.in deleted file mode 100644 index 651a28bea6..0000000000 --- a/tests/compiler/_group/input/valid.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -a: group = (0, -)group; -b: group = (0, _)group; diff --git a/tests/compiler/_group/negate.leo b/tests/compiler/_group/negate.leo deleted file mode 100644 index 506d8d73ce..0000000000 --- a/tests/compiler/_group/negate.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: group, b: group) { - console.assert(-a == b); -} \ No newline at end of file diff --git a/tests/compiler/_group/no_space_between_literal.leo b/tests/compiler/_group/no_space_between_literal.leo deleted file mode 100644 index af53e5dffe..0000000000 --- a/tests/compiler/_group/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const g = (0,1) group; -} \ No newline at end of file diff --git a/tests/compiler/_group/one.leo b/tests/compiler/_group/one.leo deleted file mode 100644 index 510110150b..0000000000 --- a/tests/compiler/_group/one.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = 1group; -} \ No newline at end of file diff --git a/tests/compiler/_group/point.leo b/tests/compiler/_group/point.leo deleted file mode 100644 index 5e68415a0d..0000000000 --- a/tests/compiler/_group/point.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const point = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/point_input.leo b/tests/compiler/_group/point_input.leo deleted file mode 100644 index a3a8e63bd3..0000000000 --- a/tests/compiler/_group/point_input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: group) { - const b = a; -} \ No newline at end of file diff --git a/tests/compiler/_group/positive_and_negative.leo b/tests/compiler/_group/positive_and_negative.leo deleted file mode 100644 index 5d29e36ef2..0000000000 --- a/tests/compiler/_group/positive_and_negative.leo +++ /dev/null @@ -1,10 +0,0 @@ -function main() { - const pos_element = 1group; - const neg_element = -1group; - - const pair_x_pos = (1, _)group; - const pair_x_neg = (-1, _)group; - - const pair_y_pos = (_, 1)group; - const pair_y_neg = (_, -1)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/sub.leo b/tests/compiler/_group/sub.leo deleted file mode 100644 index dfe82d8e31..0000000000 --- a/tests/compiler/_group/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: group, b: group, c: group) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/tests/compiler/_group/ternary.leo b/tests/compiler/_group/ternary.leo deleted file mode 100644 index 97fba1f5b6..0000000000 --- a/tests/compiler/_group/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: group, b: group, c: group) { - const r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/tests/compiler/_group/x_sign_high.leo b/tests/compiler/_group/x_sign_high.leo deleted file mode 100644 index f38b54ad9a..0000000000 --- a/tests/compiler/_group/x_sign_high.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = (0, +)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/x_sign_inferred.leo b/tests/compiler/_group/x_sign_inferred.leo deleted file mode 100644 index 02c5ac988b..0000000000 --- a/tests/compiler/_group/x_sign_inferred.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = (0, _)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/x_sign_low.leo b/tests/compiler/_group/x_sign_low.leo deleted file mode 100644 index ad74d18b64..0000000000 --- a/tests/compiler/_group/x_sign_low.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = (0, -)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/y_sign_high.leo b/tests/compiler/_group/y_sign_high.leo deleted file mode 100644 index af2a20149d..0000000000 --- a/tests/compiler/_group/y_sign_high.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = (+, 1)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/y_sign_inferred.leo b/tests/compiler/_group/y_sign_inferred.leo deleted file mode 100644 index a4efa6a982..0000000000 --- a/tests/compiler/_group/y_sign_inferred.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = (_, 1)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/y_sign_low.leo b/tests/compiler/_group/y_sign_low.leo deleted file mode 100644 index f557ed0d35..0000000000 --- a/tests/compiler/_group/y_sign_low.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = (-, 1)group; -} \ No newline at end of file diff --git a/tests/compiler/_group/zero.leo b/tests/compiler/_group/zero.leo deleted file mode 100644 index 6cdd4c960e..0000000000 --- a/tests/compiler/_group/zero.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = 0group; -} \ No newline at end of file diff --git a/tests/compiler/boolean/and.leo b/tests/compiler/boolean/and.leo index 738d413251..b109ac8781 100644 --- a/tests/compiler/boolean/and.leo +++ b/tests/compiler/boolean/and.leo @@ -2,10 +2,10 @@ namespace: Compile expectation: Pass input_file: - - input/false_false.in - - input/false_true.in - - input/true_false.in - - input/true_true.in + - inputs/false_false.in + - inputs/false_true.in + - inputs/true_false.in + - inputs/true_true.in */ function main(a: bool, b: bool) -> bool { diff --git a/tests/compiler/boolean/conditional.leo b/tests/compiler/boolean/conditional.leo index c1e9d23606..a5bd201b74 100644 --- a/tests/compiler/boolean/conditional.leo +++ b/tests/compiler/boolean/conditional.leo @@ -2,10 +2,10 @@ namespace: Compile expectation: Pass input_file: - - input/false_false.in - - input/false_true.in - - input/true_false.in - - input/true_true.in + - inputs/false_false.in + - inputs/false_true.in + - inputs/true_false.in + - inputs/true_true.in */ function main(a: bool, b: bool) -> bool { diff --git a/tests/compiler/boolean/equal.leo b/tests/compiler/boolean/equal.leo index f31f34de9b..39531dd5d6 100644 --- a/tests/compiler/boolean/equal.leo +++ b/tests/compiler/boolean/equal.leo @@ -2,10 +2,10 @@ namespace: Compile expectation: Pass input_file: - - input/false_false.in - - input/false_true.in - - input/true_false.in - - input/true_true.in + - inputs/false_false.in + - inputs/false_true.in + - inputs/true_false.in + - inputs/true_true.in */ function main(a: bool, b: bool) -> bool { diff --git a/tests/compiler/boolean/input/false_false.in b/tests/compiler/boolean/inputs/false_false.in similarity index 100% rename from tests/compiler/boolean/input/false_false.in rename to tests/compiler/boolean/inputs/false_false.in diff --git a/tests/compiler/boolean/input/false_true.in b/tests/compiler/boolean/inputs/false_true.in similarity index 100% rename from tests/compiler/boolean/input/false_true.in rename to tests/compiler/boolean/inputs/false_true.in diff --git a/tests/compiler/boolean/input/true_false.in b/tests/compiler/boolean/inputs/true_false.in similarity index 100% rename from tests/compiler/boolean/input/true_false.in rename to tests/compiler/boolean/inputs/true_false.in diff --git a/tests/compiler/boolean/input/true_true.in b/tests/compiler/boolean/inputs/true_true.in similarity index 100% rename from tests/compiler/boolean/input/true_true.in rename to tests/compiler/boolean/inputs/true_true.in diff --git a/tests/compiler/boolean/not_equal.leo b/tests/compiler/boolean/not_equal.leo index 62a1bef945..c0c970fa10 100644 --- a/tests/compiler/boolean/not_equal.leo +++ b/tests/compiler/boolean/not_equal.leo @@ -2,10 +2,10 @@ namespace: Compile expectation: Pass input_file: - - input/false_false.in - - input/false_true.in - - input/true_false.in - - input/true_true.in + - inputs/false_false.in + - inputs/false_true.in + - inputs/true_false.in + - inputs/true_true.in */ function main(a: bool, b: bool) -> bool { diff --git a/tests/compiler/boolean/or.leo b/tests/compiler/boolean/or.leo index 59488b6d98..05dd9325aa 100644 --- a/tests/compiler/boolean/or.leo +++ b/tests/compiler/boolean/or.leo @@ -2,10 +2,10 @@ namespace: Compile expectation: Pass input_file: - - input/false_false.in - - input/false_true.in - - input/true_false.in - - input/true_true.in + - inputs/false_false.in + - inputs/false_true.in + - inputs/true_false.in + - inputs/true_true.in */ function main(a: bool, b: bool) -> bool { diff --git a/disabled_tests/compiler/char/inputs/ascii.in b/tests/compiler/char/inputs/ascii.in similarity index 100% rename from disabled_tests/compiler/char/inputs/ascii.in rename to tests/compiler/char/inputs/ascii.in diff --git a/disabled_tests/compiler/char/inputs/escaped.in b/tests/compiler/char/inputs/escaped.in similarity index 100% rename from disabled_tests/compiler/char/inputs/escaped.in rename to tests/compiler/char/inputs/escaped.in diff --git a/disabled_tests/compiler/char/inputs/escaped_unicode1.in b/tests/compiler/char/inputs/escaped_unicode1.in similarity index 100% rename from disabled_tests/compiler/char/inputs/escaped_unicode1.in rename to tests/compiler/char/inputs/escaped_unicode1.in diff --git a/disabled_tests/compiler/char/inputs/escaped_unicode2.in b/tests/compiler/char/inputs/escaped_unicode2.in similarity index 100% rename from disabled_tests/compiler/char/inputs/escaped_unicode2.in rename to tests/compiler/char/inputs/escaped_unicode2.in diff --git a/disabled_tests/compiler/char/inputs/escaped_unicode3.in b/tests/compiler/char/inputs/escaped_unicode3.in similarity index 100% rename from disabled_tests/compiler/char/inputs/escaped_unicode3.in rename to tests/compiler/char/inputs/escaped_unicode3.in diff --git a/disabled_tests/compiler/char/inputs/escaped_unicode4.in b/tests/compiler/char/inputs/escaped_unicode4.in similarity index 100% rename from disabled_tests/compiler/char/inputs/escaped_unicode4.in rename to tests/compiler/char/inputs/escaped_unicode4.in diff --git a/disabled_tests/compiler/char/inputs/escaped_unicode5.in b/tests/compiler/char/inputs/escaped_unicode5.in similarity index 100% rename from disabled_tests/compiler/char/inputs/escaped_unicode5.in rename to tests/compiler/char/inputs/escaped_unicode5.in diff --git a/disabled_tests/compiler/char/inputs/escaped_unicode6.in b/tests/compiler/char/inputs/escaped_unicode6.in similarity index 100% rename from disabled_tests/compiler/char/inputs/escaped_unicode6.in rename to tests/compiler/char/inputs/escaped_unicode6.in diff --git a/disabled_tests/compiler/char/inputs/hex1.in b/tests/compiler/char/inputs/hex1.in similarity index 100% rename from disabled_tests/compiler/char/inputs/hex1.in rename to tests/compiler/char/inputs/hex1.in diff --git a/disabled_tests/compiler/char/inputs/hex2.in b/tests/compiler/char/inputs/hex2.in similarity index 100% rename from disabled_tests/compiler/char/inputs/hex2.in rename to tests/compiler/char/inputs/hex2.in diff --git a/disabled_tests/compiler/char/inputs/nonprinting.in b/tests/compiler/char/inputs/nonprinting.in similarity index 100% rename from disabled_tests/compiler/char/inputs/nonprinting.in rename to tests/compiler/char/inputs/nonprinting.in diff --git a/disabled_tests/compiler/char/inputs/unicode1.in b/tests/compiler/char/inputs/unicode1.in similarity index 100% rename from disabled_tests/compiler/char/inputs/unicode1.in rename to tests/compiler/char/inputs/unicode1.in diff --git a/disabled_tests/compiler/char/inputs/unicode2.in b/tests/compiler/char/inputs/unicode2.in similarity index 100% rename from disabled_tests/compiler/char/inputs/unicode2.in rename to tests/compiler/char/inputs/unicode2.in diff --git a/disabled_tests/compiler/char/inputs/unicode3.in b/tests/compiler/char/inputs/unicode3.in similarity index 100% rename from disabled_tests/compiler/char/inputs/unicode3.in rename to tests/compiler/char/inputs/unicode3.in diff --git a/disabled_tests/compiler/char/inputs/unicode4.in b/tests/compiler/char/inputs/unicode4.in similarity index 100% rename from disabled_tests/compiler/char/inputs/unicode4.in rename to tests/compiler/char/inputs/unicode4.in diff --git a/disabled_tests/compiler/char/inputs/unicode5.in b/tests/compiler/char/inputs/unicode5.in similarity index 100% rename from disabled_tests/compiler/char/inputs/unicode5.in rename to tests/compiler/char/inputs/unicode5.in diff --git a/disabled_tests/compiler/char/invalid_char.leo b/tests/compiler/char/invalid_char.leo similarity index 100% rename from disabled_tests/compiler/char/invalid_char.leo rename to tests/compiler/char/invalid_char.leo diff --git a/disabled_tests/compiler/char/neq.leo b/tests/compiler/char/neq.leo similarity index 100% rename from disabled_tests/compiler/char/neq.leo rename to tests/compiler/char/neq.leo diff --git a/disabled_tests/compiler/char/out.leo b/tests/compiler/char/out.leo similarity index 100% rename from disabled_tests/compiler/char/out.leo rename to tests/compiler/char/out.leo diff --git a/disabled_tests/compiler/console/assert.leo b/tests/compiler/console/assert.leo similarity index 58% rename from disabled_tests/compiler/console/assert.leo rename to tests/compiler/console/assert.leo index 870ca70b18..39d478c8b8 100644 --- a/disabled_tests/compiler/console/assert.leo +++ b/tests/compiler/console/assert.leo @@ -1,13 +1,7 @@ /* namespace: Compile expectation: Pass -inputs: - - assert.in: | - [main] - a: bool = true; - - [registers] - r0: bool = false; +input_file: inputs/true.in */ function main(a: bool) -> bool { diff --git a/disabled_tests/compiler/console/conditional_assert.leo b/tests/compiler/console/conditional_assert.leo similarity index 53% rename from disabled_tests/compiler/console/conditional_assert.leo rename to tests/compiler/console/conditional_assert.leo index 71bf6ae5ee..2985e81164 100644 --- a/disabled_tests/compiler/console/conditional_assert.leo +++ b/tests/compiler/console/conditional_assert.leo @@ -1,19 +1,17 @@ /* namespace: Compile expectation: Pass -inputs: - - cond.in: | - [main] - a: bool = true; - - cond_2.in: | - [main] - a: bool = false; +input_file: + - inputs/true.in + - inputs/false.in */ -function main(a: bool) { +function main(a: bool) -> bool { if a { console.assert(a == true); } else { console.assert(a == false); } + + return a; } \ No newline at end of file diff --git a/disabled_tests/compiler/console/error.leo b/tests/compiler/console/error.leo similarity index 82% rename from disabled_tests/compiler/console/error.leo rename to tests/compiler/console/error.leo index a2db2fc013..5725b6d16e 100644 --- a/disabled_tests/compiler/console/error.leo +++ b/tests/compiler/console/error.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/disabled_tests/compiler/console/input/dummy.in b/tests/compiler/console/inputs/dummy.in similarity index 100% rename from disabled_tests/compiler/console/input/dummy.in rename to tests/compiler/console/inputs/dummy.in diff --git a/tests/compiler/console/inputs/false.in b/tests/compiler/console/inputs/false.in new file mode 100644 index 0000000000..c4c35b98a9 --- /dev/null +++ b/tests/compiler/console/inputs/false.in @@ -0,0 +1,5 @@ +[main] +a: bool = false; + +[registers] +r0: bool = false; \ No newline at end of file diff --git a/disabled_tests/compiler/console/input/input_equal.in b/tests/compiler/console/inputs/input_equal.in similarity index 55% rename from disabled_tests/compiler/console/input/input_equal.in rename to tests/compiler/console/inputs/input_equal.in index b9f602b338..8e08698ed1 100644 --- a/disabled_tests/compiler/console/input/input_equal.in +++ b/tests/compiler/console/inputs/input_equal.in @@ -1,6 +1,6 @@ [main] -a: u32 = 1; -b: u32 = 1; +a: u32 = 1u32; +b: u32 = 1u32; [registers] r0: bool = true; diff --git a/disabled_tests/compiler/console/input/input_unequal.in b/tests/compiler/console/inputs/input_unequal.in similarity index 55% rename from disabled_tests/compiler/console/input/input_unequal.in rename to tests/compiler/console/inputs/input_unequal.in index 3320fc7439..17b72b948a 100644 --- a/disabled_tests/compiler/console/input/input_unequal.in +++ b/tests/compiler/console/inputs/input_unequal.in @@ -1,6 +1,6 @@ [main] -a: u32 = 1; -b: u32 = 0; +a: u32 = 1u32; +b: u32 = 0u32; [registers] r0: bool = true; diff --git a/tests/compiler/console/inputs/true.in b/tests/compiler/console/inputs/true.in new file mode 100644 index 0000000000..0a23cb7755 --- /dev/null +++ b/tests/compiler/console/inputs/true.in @@ -0,0 +1,5 @@ +[main] +a: bool = true; + +[registers] +r0: bool = false; \ No newline at end of file diff --git a/disabled_tests/compiler/console/log.leo b/tests/compiler/console/log.leo similarity index 82% rename from disabled_tests/compiler/console/log.leo rename to tests/compiler/console/log.leo index 93b96ca095..1264df33cd 100644 --- a/disabled_tests/compiler/console/log.leo +++ b/tests/compiler/console/log.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/disabled_tests/compiler/console/log_conditional.leo b/tests/compiler/console/log_conditional.leo similarity index 84% rename from disabled_tests/compiler/console/log_conditional.leo rename to tests/compiler/console/log_conditional.leo index df637bc018..c7d8903deb 100644 --- a/disabled_tests/compiler/console/log_conditional.leo +++ b/tests/compiler/console/log_conditional.leo @@ -2,8 +2,8 @@ namespace: Compile expectation: Pass input_file: - - input/input_unequal.in - - input/input_equal.in + - inputs/input_unequal.in + - inputs/input_equal.in */ // Conditionally add two u32 integers and log the result to the console. diff --git a/disabled_tests/compiler/console/log_fail.leo b/tests/compiler/console/log_fail.leo similarity index 100% rename from disabled_tests/compiler/console/log_fail.leo rename to tests/compiler/console/log_fail.leo diff --git a/disabled_tests/compiler/console/log_input.leo b/tests/compiler/console/log_input.leo similarity index 82% rename from disabled_tests/compiler/console/log_input.leo rename to tests/compiler/console/log_input.leo index 233fd18c47..285ab6eae1 100644 --- a/disabled_tests/compiler/console/log_input.leo +++ b/tests/compiler/console/log_input.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/disabled_tests/compiler/console/log_parameter.leo b/tests/compiler/console/log_parameter.leo similarity index 82% rename from disabled_tests/compiler/console/log_parameter.leo rename to tests/compiler/console/log_parameter.leo index 6dffd420d1..75536f7b58 100644 --- a/disabled_tests/compiler/console/log_parameter.leo +++ b/tests/compiler/console/log_parameter.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/disabled_tests/compiler/console/log_parameter_many.leo b/tests/compiler/console/log_parameter_many.leo similarity index 83% rename from disabled_tests/compiler/console/log_parameter_many.leo rename to tests/compiler/console/log_parameter_many.leo index c83bc92cda..ed1e769b82 100644 --- a/disabled_tests/compiler/console/log_parameter_many.leo +++ b/tests/compiler/console/log_parameter_many.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/disabled_tests/compiler/console/log_parameter_fail_unknown.leo b/tests/compiler/console/log_parameter_unkown_fail.leo similarity index 100% rename from disabled_tests/compiler/console/log_parameter_fail_unknown.leo rename to tests/compiler/console/log_parameter_unkown_fail.leo diff --git a/tests/compiler/definition/input/dummy.in b/tests/compiler/definition/inputs/dummy.in similarity index 100% rename from tests/compiler/definition/input/dummy.in rename to tests/compiler/definition/inputs/dummy.in diff --git a/tests/compiler/definition/out_of_order.leo b/tests/compiler/definition/out_of_order.leo index 3b3a7551f7..77de4f3547 100644 --- a/tests/compiler/definition/out_of_order.leo +++ b/tests/compiler/definition/out_of_order.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ // @test diff --git a/tests/compiler/field/output/register_one.out b/tests/compiler/field/output/register_one.out deleted file mode 100644 index 16556c1c51..0000000000 --- a/tests/compiler/field/output/register_one.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: field = 1; diff --git a/tests/compiler/field/output/register_zero.out b/tests/compiler/field/output/register_zero.out deleted file mode 100644 index 2ba759ffc8..0000000000 --- a/tests/compiler/field/output/register_zero.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: field = 0; diff --git a/tests/compiler/function/conditional_return.leo b/tests/compiler/function/conditional_return.leo index 84bdbf7928..2532c1ef0a 100644 --- a/tests/compiler/function/conditional_return.leo +++ b/tests/compiler/function/conditional_return.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/integers.in +input_file: inputs/integers.in */ function main(a: u32) -> u32 { diff --git a/tests/compiler/function/duplicate_definition_fail.leo b/tests/compiler/function/duplicate_definition_fail.leo index 4f3a449a13..6455312b3d 100644 --- a/tests/compiler/function/duplicate_definition_fail.leo +++ b/tests/compiler/function/duplicate_definition_fail.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Fail -input_file: input/dummy.in +input_file: inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/function/duplicate_parameter_fail.leo b/tests/compiler/function/duplicate_parameter_fail.leo index e7badc1613..0f3ad0cb6a 100644 --- a/tests/compiler/function/duplicate_parameter_fail.leo +++ b/tests/compiler/function/duplicate_parameter_fail.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Fail -input_file: input/dummy.in +input_file: inputs/dummy.in */ function main(a: u32, a: u32) -> u32 { diff --git a/tests/compiler/function/input/dummy.in b/tests/compiler/function/inputs/dummy.in similarity index 100% rename from tests/compiler/function/input/dummy.in rename to tests/compiler/function/inputs/dummy.in diff --git a/tests/compiler/function/input/integers.in b/tests/compiler/function/inputs/integers.in similarity index 100% rename from tests/compiler/function/input/integers.in rename to tests/compiler/function/inputs/integers.in diff --git a/tests/compiler/function/iteration.leo b/tests/compiler/function/iteration.leo index c0296b2dee..cf6be01e12 100644 --- a/tests/compiler/function/iteration.leo +++ b/tests/compiler/function/iteration.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function one() -> u32 { diff --git a/tests/compiler/function/iteration_repeated.leo b/tests/compiler/function/iteration_repeated.leo index 4c79ab5507..813970dcce 100644 --- a/tests/compiler/function/iteration_repeated.leo +++ b/tests/compiler/function/iteration_repeated.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function iteration() -> u32 { diff --git a/tests/compiler/function/repeated.leo b/tests/compiler/function/repeated.leo index 0bd1f13cf1..c20fc2e8ca 100644 --- a/tests/compiler/function/repeated.leo +++ b/tests/compiler/function/repeated.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function one() -> bool { diff --git a/tests/compiler/function/return.leo b/tests/compiler/function/return.leo index c6ad8a6366..69233233e8 100644 --- a/tests/compiler/function/return.leo +++ b/tests/compiler/function/return.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function one() -> u32 { diff --git a/disabled_tests/compiler/function/scope_fail.leo b/tests/compiler/function/scope_fail.leo similarity index 67% rename from disabled_tests/compiler/function/scope_fail.leo rename to tests/compiler/function/scope_fail.leo index 3f183386ac..9315b239df 100644 --- a/disabled_tests/compiler/function/scope_fail.leo +++ b/tests/compiler/function/scope_fail.leo @@ -8,9 +8,9 @@ function foo() -> field { return myGlobal; } -function main() { +function main() -> field { const myGlobal = 42field; const err = foo(); - // TODO: update after field comparison is enabled + return err; } diff --git a/tests/compiler/function/shadow_function_with_input_fail.leo b/tests/compiler/function/shadow_function_with_input_fail.leo new file mode 100644 index 0000000000..c8099b627c --- /dev/null +++ b/tests/compiler/function/shadow_function_with_input_fail.leo @@ -0,0 +1,16 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function hi() -> u8 { + return 0u8; +} + +function tester(hi: u8) -> u8 { + return 0u8; +} + +function main (y: bool) -> bool { + return y; +} \ No newline at end of file diff --git a/tests/compiler/group/add.leo b/tests/compiler/group/add.leo new file mode 100644 index 0000000000..ef133231cc --- /dev/null +++ b/tests/compiler/group/add.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/three.in +*/ + +function main(a: group, b: group, c: group) -> bool { + console.assert(a + b == c); + + return a + b == c; +} \ No newline at end of file diff --git a/tests/compiler/group/assert_eq.leo b/tests/compiler/group/assert_eq.leo new file mode 100644 index 0000000000..40d09c087e --- /dev/null +++ b/tests/compiler/group/assert_eq.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/eq.in +*/ + +function main(a: group, b: group) -> bool { + console.assert(a == b); + return a == b; +} \ No newline at end of file diff --git a/tests/compiler/group/both_sign_high.leo b/tests/compiler/group/both_sign_high.leo new file mode 100644 index 0000000000..0b00daf25c --- /dev/null +++ b/tests/compiler/group/both_sign_high.leo @@ -0,0 +1,9 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> bool { + const element: group = (+, +)group; + return true; +} \ No newline at end of file diff --git a/tests/compiler/group/both_sign_inferred.leo b/tests/compiler/group/both_sign_inferred.leo new file mode 100644 index 0000000000..7b41a0a480 --- /dev/null +++ b/tests/compiler/group/both_sign_inferred.leo @@ -0,0 +1,9 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> bool { + const element: group = (_, _)group; + return true; +} \ No newline at end of file diff --git a/tests/compiler/group/both_sign_low.leo b/tests/compiler/group/both_sign_low.leo new file mode 100644 index 0000000000..88517b55a7 --- /dev/null +++ b/tests/compiler/group/both_sign_low.leo @@ -0,0 +1,9 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> bool { + const element: group = (-, -)group; + return true; +} \ No newline at end of file diff --git a/tests/compiler/group/eq.leo b/tests/compiler/group/eq.leo new file mode 100644 index 0000000000..40d09c087e --- /dev/null +++ b/tests/compiler/group/eq.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/eq.in +*/ + +function main(a: group, b: group) -> bool { + console.assert(a == b); + return a == b; +} \ No newline at end of file diff --git a/tests/compiler/group/input.leo b/tests/compiler/group/input.leo new file mode 100644 index 0000000000..35a99f9ce9 --- /dev/null +++ b/tests/compiler/group/input.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/dummy.in +*/ + +function main(a: group, b: group) -> bool { + console.assert(a == b); + return a == b; +} \ No newline at end of file diff --git a/tests/compiler/group/inputs/dummy.in b/tests/compiler/group/inputs/dummy.in new file mode 100644 index 0000000000..e1f298789f --- /dev/null +++ b/tests/compiler/group/inputs/dummy.in @@ -0,0 +1,6 @@ +[main] +a: group = (0, -)group; +b: group = (0, +)group; + +[registers] +r0: bool = true; diff --git a/tests/compiler/group/inputs/eq.in b/tests/compiler/group/inputs/eq.in new file mode 100644 index 0000000000..5471dd7fec --- /dev/null +++ b/tests/compiler/group/inputs/eq.in @@ -0,0 +1,6 @@ +[main] +a: group = (0, -)group; +b: group = (0, -)group; + +[registers] +r0: bool = true; diff --git a/tests/compiler/_group/input/invalid.in b/tests/compiler/group/inputs/invalid.in similarity index 100% rename from tests/compiler/_group/input/invalid.in rename to tests/compiler/group/inputs/invalid.in diff --git a/tests/compiler/_group/input/point.in b/tests/compiler/group/inputs/point.in similarity index 64% rename from tests/compiler/_group/input/point.in rename to tests/compiler/group/inputs/point.in index 9d49d9d847..b9fd95d55d 100644 --- a/tests/compiler/_group/input/point.in +++ b/tests/compiler/group/inputs/point.in @@ -1,2 +1,5 @@ [main] -a: group = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group; \ No newline at end of file +a: group = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group; + +[registers] +r0: bool = true; \ No newline at end of file diff --git a/tests/compiler/group/inputs/three.in b/tests/compiler/group/inputs/three.in new file mode 100644 index 0000000000..10e1c0ba28 --- /dev/null +++ b/tests/compiler/group/inputs/three.in @@ -0,0 +1,7 @@ +[main] +a: group = (0, 4)group; +b: group = (4, 0)group; +c: group = (4, 4)group; + +[registers] +r0: bool = true; diff --git a/tests/compiler/group/negate.leo b/tests/compiler/group/negate.leo new file mode 100644 index 0000000000..4b4d3d6b8c --- /dev/null +++ b/tests/compiler/group/negate.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/eq.in +*/ + +function main(a: group, b: group) -> bool { + console.assert(-a == b); + + return -a == b; +} \ No newline at end of file diff --git a/tests/compiler/group/no_space_between_literal.leo b/tests/compiler/group/no_space_between_literal.leo new file mode 100644 index 0000000000..f8746c5083 --- /dev/null +++ b/tests/compiler/group/no_space_between_literal.leo @@ -0,0 +1,9 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() -> group { + const g: group = (0,1) group; + return g; +} \ No newline at end of file diff --git a/tests/compiler/group/one.leo b/tests/compiler/group/one.leo new file mode 100644 index 0000000000..cfc643fd88 --- /dev/null +++ b/tests/compiler/group/one.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const element: group = 1group; + + return element; +} \ No newline at end of file diff --git a/tests/compiler/group/point.leo b/tests/compiler/group/point.leo new file mode 100644 index 0000000000..01e357eca4 --- /dev/null +++ b/tests/compiler/group/point.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const point: group = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group; + + return point; +} \ No newline at end of file diff --git a/tests/compiler/group/point_input.leo b/tests/compiler/group/point_input.leo new file mode 100644 index 0000000000..30a52c8d55 --- /dev/null +++ b/tests/compiler/group/point_input.leo @@ -0,0 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/point.in +*/ + +function main(a: group) -> bool { + return a == (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group; +} \ No newline at end of file diff --git a/tests/compiler/group/positive_and_negative.leo b/tests/compiler/group/positive_and_negative.leo new file mode 100644 index 0000000000..7f8d5b2203 --- /dev/null +++ b/tests/compiler/group/positive_and_negative.leo @@ -0,0 +1,17 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const pos_element: group = 1group; + const neg_element: group = -1group; + + const pair_x_pos: group = (1, _)group; + const pair_x_neg: group = (-1, _)group; + + const pair_y_pos: group = (_, 1)group; + const pair_y_neg: group = (_, -1)group; + + return pair_x_neg; +} \ No newline at end of file diff --git a/tests/compiler/group/sub.leo b/tests/compiler/group/sub.leo new file mode 100644 index 0000000000..e80ea0061f --- /dev/null +++ b/tests/compiler/group/sub.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/three.in +*/ + +function main(a: group, b: group, c: group) -> bool { + console.assert(a - b == c); + + return a - b == c; +} \ No newline at end of file diff --git a/tests/compiler/group/ternary.leo b/tests/compiler/group/ternary.leo new file mode 100644 index 0000000000..f3bf0e0705 --- /dev/null +++ b/tests/compiler/group/ternary.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/point.in +*/ + +function main(a: group, b: group, c: group) -> bool { + const r: group = true ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/_group/x_and_y.leo b/tests/compiler/group/x_and_y.leo similarity index 100% rename from tests/compiler/_group/x_and_y.leo rename to tests/compiler/group/x_and_y.leo diff --git a/tests/compiler/group/x_sign_high.leo b/tests/compiler/group/x_sign_high.leo new file mode 100644 index 0000000000..329086045c --- /dev/null +++ b/tests/compiler/group/x_sign_high.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const element: group = (0, +)group; + + return element; +} \ No newline at end of file diff --git a/tests/compiler/group/x_sign_inferred.leo b/tests/compiler/group/x_sign_inferred.leo new file mode 100644 index 0000000000..b7dfccfbfb --- /dev/null +++ b/tests/compiler/group/x_sign_inferred.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const element: group = (0, _)group; + + return element; +} \ No newline at end of file diff --git a/tests/compiler/group/x_sign_low.leo b/tests/compiler/group/x_sign_low.leo new file mode 100644 index 0000000000..759a255a6b --- /dev/null +++ b/tests/compiler/group/x_sign_low.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const element: group = (0, -)group; + + return element; +} \ No newline at end of file diff --git a/tests/compiler/group/y_sign_high.leo b/tests/compiler/group/y_sign_high.leo new file mode 100644 index 0000000000..6a56027dae --- /dev/null +++ b/tests/compiler/group/y_sign_high.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const element: group = (+, 1)group; + + return element; +} \ No newline at end of file diff --git a/tests/compiler/group/y_sign_inferred.leo b/tests/compiler/group/y_sign_inferred.leo new file mode 100644 index 0000000000..86ab11f5ea --- /dev/null +++ b/tests/compiler/group/y_sign_inferred.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const element: group = (_, 1)group; + + return element; +} \ No newline at end of file diff --git a/tests/compiler/group/y_sign_low.leo b/tests/compiler/group/y_sign_low.leo new file mode 100644 index 0000000000..80e233badf --- /dev/null +++ b/tests/compiler/group/y_sign_low.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const element: group = (-, 1)group; + + return element; +} \ No newline at end of file diff --git a/tests/compiler/group/zero.leo b/tests/compiler/group/zero.leo new file mode 100644 index 0000000000..2ccbe12068 --- /dev/null +++ b/tests/compiler/group/zero.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + +function main() -> group { + const element: group = 0group; + + return element; +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/input/const_input_non_const.in b/tests/compiler/input_files/program_input/inputs/const_input_non_const.in similarity index 100% rename from tests/compiler/input_files/program_input/input/const_input_non_const.in rename to tests/compiler/input_files/program_input/inputs/const_input_non_const.in diff --git a/tests/compiler/input_files/program_input/input/different_types_const_signed_fail.in b/tests/compiler/input_files/program_input/inputs/different_types_const_signed_fail.in similarity index 100% rename from tests/compiler/input_files/program_input/input/different_types_const_signed_fail.in rename to tests/compiler/input_files/program_input/inputs/different_types_const_signed_fail.in diff --git a/tests/compiler/input_files/program_input/input/different_types_const_unsigned_fail.in b/tests/compiler/input_files/program_input/inputs/different_types_const_unsigned_fail.in similarity index 100% rename from tests/compiler/input_files/program_input/input/different_types_const_unsigned_fail.in rename to tests/compiler/input_files/program_input/inputs/different_types_const_unsigned_fail.in diff --git a/tests/compiler/input_files/program_input/input/different_types_fail_signed.in b/tests/compiler/input_files/program_input/inputs/different_types_fail_signed.in similarity index 100% rename from tests/compiler/input_files/program_input/input/different_types_fail_signed.in rename to tests/compiler/input_files/program_input/inputs/different_types_fail_signed.in diff --git a/tests/compiler/input_files/program_input/input/different_types_unsigned_fail.in b/tests/compiler/input_files/program_input/inputs/different_types_unsigned_fail.in similarity index 100% rename from tests/compiler/input_files/program_input/input/different_types_unsigned_fail.in rename to tests/compiler/input_files/program_input/inputs/different_types_unsigned_fail.in diff --git a/tests/compiler/input_files/program_input/input/main.in b/tests/compiler/input_files/program_input/inputs/main.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main.in rename to tests/compiler/input_files/program_input/inputs/main.in diff --git a/tests/compiler/input_files/program_input/input/main_array.in b/tests/compiler/input_files/program_input/inputs/main_array.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_array.in rename to tests/compiler/input_files/program_input/inputs/main_array.in diff --git a/tests/compiler/input_files/program_input/input/main_array_fail.in b/tests/compiler/input_files/program_input/inputs/main_array_fail.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_array_fail.in rename to tests/compiler/input_files/program_input/inputs/main_array_fail.in diff --git a/tests/compiler/input_files/program_input/input/main_char.in b/tests/compiler/input_files/program_input/inputs/main_char.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_char.in rename to tests/compiler/input_files/program_input/inputs/main_char.in diff --git a/tests/compiler/input_files/program_input/input/main_fail_name.in b/tests/compiler/input_files/program_input/inputs/main_fail_name.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_fail_name.in rename to tests/compiler/input_files/program_input/inputs/main_fail_name.in diff --git a/tests/compiler/input_files/program_input/input/main_fail_type.in b/tests/compiler/input_files/program_input/inputs/main_fail_type.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_fail_type.in rename to tests/compiler/input_files/program_input/inputs/main_fail_type.in diff --git a/tests/compiler/input_files/program_input/input/main_field.in b/tests/compiler/input_files/program_input/inputs/main_field.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_field.in rename to tests/compiler/input_files/program_input/inputs/main_field.in diff --git a/tests/compiler/input_files/program_input/input/main_group.in b/tests/compiler/input_files/program_input/inputs/main_group.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_group.in rename to tests/compiler/input_files/program_input/inputs/main_group.in diff --git a/tests/compiler/input_files/program_input/input/main_multi_dimension_array.in b/tests/compiler/input_files/program_input/inputs/main_multi_dimension_array.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_multi_dimension_array.in rename to tests/compiler/input_files/program_input/inputs/main_multi_dimension_array.in diff --git a/tests/compiler/input_files/program_input/input/main_multiple.in b/tests/compiler/input_files/program_input/inputs/main_multiple.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_multiple.in rename to tests/compiler/input_files/program_input/inputs/main_multiple.in diff --git a/tests/compiler/input_files/program_input/input/main_string.in b/tests/compiler/input_files/program_input/inputs/main_string.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_string.in rename to tests/compiler/input_files/program_input/inputs/main_string.in diff --git a/tests/compiler/input_files/program_input/input/main_tuple.in b/tests/compiler/input_files/program_input/inputs/main_tuple.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_tuple.in rename to tests/compiler/input_files/program_input/inputs/main_tuple.in diff --git a/tests/compiler/input_files/program_input/input/main_tuple_fail.in b/tests/compiler/input_files/program_input/inputs/main_tuple_fail.in similarity index 100% rename from tests/compiler/input_files/program_input/input/main_tuple_fail.in rename to tests/compiler/input_files/program_input/inputs/main_tuple_fail.in diff --git a/tests/compiler/input_files/program_input/input/non_const_input_const.in b/tests/compiler/input_files/program_input/inputs/non_const_input_const.in similarity index 100% rename from tests/compiler/input_files/program_input/input/non_const_input_const.in rename to tests/compiler/input_files/program_input/inputs/non_const_input_const.in diff --git a/tests/compiler/input_files/program_input/main.leo b/tests/compiler/input_files/program_input/main.leo index 3a87ed310e..4ecc0cc8d2 100644 --- a/tests/compiler/input_files/program_input/main.leo +++ b/tests/compiler/input_files/program_input/main.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/main.in +input_file: inputs/main.in */ function main(a: bool) -> bool { diff --git a/tests/compiler/input_files/program_input/main_field.leo b/tests/compiler/input_files/program_input/main_field.leo index 12a25103aa..cdcc88b79e 100644 --- a/tests/compiler/input_files/program_input/main_field.leo +++ b/tests/compiler/input_files/program_input/main_field.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/main_field.in +input_file: inputs/main_field.in */ function main(a: field, b: field, y: bool) -> bool { diff --git a/tests/compiler/input_files/program_input/main_group.leo b/tests/compiler/input_files/program_input/main_group.leo index 7ed611cd2a..21a86c3425 100644 --- a/tests/compiler/input_files/program_input/main_group.leo +++ b/tests/compiler/input_files/program_input/main_group.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/main_group.in +input_file: inputs/main_group.in */ function main(a: group, b: group, c: group) -> bool { diff --git a/tests/compiler/input_files/program_input_constants/input/main.in b/tests/compiler/input_files/program_input_constants/inputs/main.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main.in rename to tests/compiler/input_files/program_input_constants/inputs/main.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_array.in b/tests/compiler/input_files/program_input_constants/inputs/main_array.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_array.in rename to tests/compiler/input_files/program_input_constants/inputs/main_array.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_array_fail.in b/tests/compiler/input_files/program_input_constants/inputs/main_array_fail.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_array_fail.in rename to tests/compiler/input_files/program_input_constants/inputs/main_array_fail.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_char.in b/tests/compiler/input_files/program_input_constants/inputs/main_char.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_char.in rename to tests/compiler/input_files/program_input_constants/inputs/main_char.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_fail_name.in b/tests/compiler/input_files/program_input_constants/inputs/main_fail_name.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_fail_name.in rename to tests/compiler/input_files/program_input_constants/inputs/main_fail_name.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_fail_type.in b/tests/compiler/input_files/program_input_constants/inputs/main_fail_type.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_fail_type.in rename to tests/compiler/input_files/program_input_constants/inputs/main_fail_type.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_field.in b/tests/compiler/input_files/program_input_constants/inputs/main_field.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_field.in rename to tests/compiler/input_files/program_input_constants/inputs/main_field.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_group.in b/tests/compiler/input_files/program_input_constants/inputs/main_group.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_group.in rename to tests/compiler/input_files/program_input_constants/inputs/main_group.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in b/tests/compiler/input_files/program_input_constants/inputs/main_multi_dimension_array.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in rename to tests/compiler/input_files/program_input_constants/inputs/main_multi_dimension_array.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_multiple.in b/tests/compiler/input_files/program_input_constants/inputs/main_multiple.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_multiple.in rename to tests/compiler/input_files/program_input_constants/inputs/main_multiple.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_string.in b/tests/compiler/input_files/program_input_constants/inputs/main_string.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_string.in rename to tests/compiler/input_files/program_input_constants/inputs/main_string.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_tuple.in b/tests/compiler/input_files/program_input_constants/inputs/main_tuple.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_tuple.in rename to tests/compiler/input_files/program_input_constants/inputs/main_tuple.in diff --git a/tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in b/tests/compiler/input_files/program_input_constants/inputs/main_tuple_fail.in similarity index 100% rename from tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in rename to tests/compiler/input_files/program_input_constants/inputs/main_tuple_fail.in diff --git a/tests/compiler/input_files/program_input_constants/main.leo b/tests/compiler/input_files/program_input_constants/main.leo index 2ef2c8df2e..eca171d053 100644 --- a/tests/compiler/input_files/program_input_constants/main.leo +++ b/tests/compiler/input_files/program_input_constants/main.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/main.in +input_file: inputs/main.in */ function main(const a: bool, b: bool) -> bool { diff --git a/tests/compiler/input_files/program_input_constants/main_field.leo b/tests/compiler/input_files/program_input_constants/main_field.leo index fa84edbcdb..8041749ad4 100644 --- a/tests/compiler/input_files/program_input_constants/main_field.leo +++ b/tests/compiler/input_files/program_input_constants/main_field.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/main_field.in +input_file: inputs/main_field.in */ function main(const a: field, const b: field, y: bool) -> bool { diff --git a/tests/compiler/input_files/program_input_constants/main_group.leo b/tests/compiler/input_files/program_input_constants/main_group.leo index c06d7ff87b..1cb68f1b93 100644 --- a/tests/compiler/input_files/program_input_constants/main_group.leo +++ b/tests/compiler/input_files/program_input_constants/main_group.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/main_group.in +input_file: inputs/main_group.in */ function main(const a: group, const b: group, const c: group, y: bool) -> bool { diff --git a/tests/compiler/input_files/program_input_constants/main_multiple.leo b/tests/compiler/input_files/program_input_constants/main_multiple.leo index e06775ea4b..76ffcef96c 100644 --- a/tests/compiler/input_files/program_input_constants/main_multiple.leo +++ b/tests/compiler/input_files/program_input_constants/main_multiple.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/main_multiple.in +input_file: inputs/main_multiple.in */ function main(const a: bool, const b: bool, y: bool) -> bool { diff --git a/tests/compiler/integers/i128/max.leo b/tests/compiler/integers/i128/max.leo index 01ae59f60f..f12d46b39b 100644 --- a/tests/compiler/integers/i128/max.leo +++ b/tests/compiler/integers/i128/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i128/max_fail.leo b/tests/compiler/integers/i128/max_fail.leo new file mode 100644 index 0000000000..694f5455fe --- /dev/null +++ b/tests/compiler/integers/i128/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i128 = 170141183460469231731687303715884105728i128; +} diff --git a/tests/compiler/integers/i128/min.leo b/tests/compiler/integers/i128/min.leo index 9da468eb76..dfc2e62b33 100644 --- a/tests/compiler/integers/i128/min.leo +++ b/tests/compiler/integers/i128/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i128/min_fail.leo b/tests/compiler/integers/i128/min_fail.leo new file mode 100644 index 0000000000..742f72104d --- /dev/null +++ b/tests/compiler/integers/i128/min_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i128 = -170141183460469231731687303715884105729i128; +} diff --git a/tests/compiler/integers/i128/negate_min.leo b/tests/compiler/integers/i128/negate_min.leo new file mode 100644 index 0000000000..5f19ca45c0 --- /dev/null +++ b/tests/compiler/integers/i128/negate_min.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: ../inputs/dummy.in +*/ + +function main(y: bool) -> bool{ + const a: i128 = -170141183460469231731687303715884105728i128; + const b: i128 = -a; + return (b == -a) == y; +} diff --git a/tests/compiler/integers/i128/negate_zero.leo b/tests/compiler/integers/i128/negate_zero.leo index 2141798012..6ba1c2bfe6 100644 --- a/tests/compiler/integers/i128/negate_zero.leo +++ b/tests/compiler/integers/i128/negate_zero.leo @@ -2,7 +2,7 @@ namespace: Compile expectation: Pass input_file: - - ../input/dummy.in + - ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i16/max.leo b/tests/compiler/integers/i16/max.leo index 46b2d72841..2da9885cb3 100644 --- a/tests/compiler/integers/i16/max.leo +++ b/tests/compiler/integers/i16/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i16/max_fail.leo b/tests/compiler/integers/i16/max_fail.leo new file mode 100644 index 0000000000..96f55e241b --- /dev/null +++ b/tests/compiler/integers/i16/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i16 = 32768i16; +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/min.leo b/tests/compiler/integers/i16/min.leo index a3c89b617a..9f3bdecc7b 100644 --- a/tests/compiler/integers/i16/min.leo +++ b/tests/compiler/integers/i16/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i16/min_fail.leo b/tests/compiler/integers/i16/min_fail.leo new file mode 100644 index 0000000000..6067f11c29 --- /dev/null +++ b/tests/compiler/integers/i16/min_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i16 = -32769i16; +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/negate_min_fail.leo b/tests/compiler/integers/i16/negate_min_fail.leo new file mode 100644 index 0000000000..c54433dc30 --- /dev/null +++ b/tests/compiler/integers/i16/negate_min_fail.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: ../inputs/dummy.in +*/ + +function main(y: bool) -> bool { + const a: i16 = -32768i16; + const b: i16 = -a; + return (b == -a) == y; +} diff --git a/tests/compiler/integers/i16/negate_zero.leo b/tests/compiler/integers/i16/negate_zero.leo index eb13d912be..bf3eceab02 100644 --- a/tests/compiler/integers/i16/negate_zero.leo +++ b/tests/compiler/integers/i16/negate_zero.leo @@ -2,7 +2,7 @@ namespace: Compile expectation: Pass input_file: - - ../input/dummy.in + - ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i32/max.leo b/tests/compiler/integers/i32/max.leo index c3e8a3dfeb..6048ffd15a 100644 --- a/tests/compiler/integers/i32/max.leo +++ b/tests/compiler/integers/i32/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i32/max_fail.leo b/tests/compiler/integers/i32/max_fail.leo new file mode 100644 index 0000000000..be6809dd83 --- /dev/null +++ b/tests/compiler/integers/i32/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i32 = 2147483648i32; +} diff --git a/tests/compiler/integers/i32/min.leo b/tests/compiler/integers/i32/min.leo index 709fb4cd22..6d28095607 100644 --- a/tests/compiler/integers/i32/min.leo +++ b/tests/compiler/integers/i32/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i32/min_fail.leo b/tests/compiler/integers/i32/min_fail.leo new file mode 100644 index 0000000000..a36687aea2 --- /dev/null +++ b/tests/compiler/integers/i32/min_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i32 = -2147483649i32; +} diff --git a/tests/compiler/integers/i32/negate_min.leo b/tests/compiler/integers/i32/negate_min.leo new file mode 100644 index 0000000000..b2ee023ab9 --- /dev/null +++ b/tests/compiler/integers/i32/negate_min.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: ../inputs/dummy.in +*/ + +function main(y: bool) -> bool{ + const a: i32 = -2147483648i32; + const b: i32 = -a; + return (b == -a) == y; +} diff --git a/tests/compiler/integers/i32/negate_zero.leo b/tests/compiler/integers/i32/negate_zero.leo index df505768d8..23539e51e3 100644 --- a/tests/compiler/integers/i32/negate_zero.leo +++ b/tests/compiler/integers/i32/negate_zero.leo @@ -2,7 +2,7 @@ namespace: Compile expectation: Pass input_file: - - ../input/dummy.in + - ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i64/max.leo b/tests/compiler/integers/i64/max.leo index 0668d35b0f..7769e27400 100644 --- a/tests/compiler/integers/i64/max.leo +++ b/tests/compiler/integers/i64/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i64/max_fail.leo b/tests/compiler/integers/i64/max_fail.leo new file mode 100644 index 0000000000..fafa225bae --- /dev/null +++ b/tests/compiler/integers/i64/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i64 = 9223372036854775808i64; +} diff --git a/tests/compiler/integers/i64/min.leo b/tests/compiler/integers/i64/min.leo index 0b6181d57c..d3ea694ae6 100644 --- a/tests/compiler/integers/i64/min.leo +++ b/tests/compiler/integers/i64/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i64/min_fail.leo b/tests/compiler/integers/i64/min_fail.leo new file mode 100644 index 0000000000..83f2fe2d4a --- /dev/null +++ b/tests/compiler/integers/i64/min_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i64 = -9223372036854775809i64; +} diff --git a/tests/compiler/integers/i64/negate_min.leo b/tests/compiler/integers/i64/negate_min.leo new file mode 100644 index 0000000000..a9acff4d0d --- /dev/null +++ b/tests/compiler/integers/i64/negate_min.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: ../inputs/dummy.in +*/ + +function main(y: bool) -> bool{ + const a: i64 = -9223372036854775808i64; + const b: i64 = -a; + return (b == -a) == y; +} diff --git a/tests/compiler/integers/i64/negate_zero.leo b/tests/compiler/integers/i64/negate_zero.leo index 955e5f954d..2a048c2af6 100644 --- a/tests/compiler/integers/i64/negate_zero.leo +++ b/tests/compiler/integers/i64/negate_zero.leo @@ -2,7 +2,7 @@ namespace: Compile expectation: Pass input_file: - - ../input/dummy.in + - ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i8/max.leo b/tests/compiler/integers/i8/max.leo index eb0d270741..0fd2a0137e 100644 --- a/tests/compiler/integers/i8/max.leo +++ b/tests/compiler/integers/i8/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i8/max_fail.leo b/tests/compiler/integers/i8/max_fail.leo new file mode 100644 index 0000000000..ce820caf4e --- /dev/null +++ b/tests/compiler/integers/i8/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i8 = 128i8; +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/min.leo b/tests/compiler/integers/i8/min.leo index c5b8827da4..1ffd0cf604 100644 --- a/tests/compiler/integers/i8/min.leo +++ b/tests/compiler/integers/i8/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/i8/min_fail.leo b/tests/compiler/integers/i8/min_fail.leo new file mode 100644 index 0000000000..db51dcaa15 --- /dev/null +++ b/tests/compiler/integers/i8/min_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: i8 = -129i8; +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/negate_min.leo b/tests/compiler/integers/i8/negate_min.leo new file mode 100644 index 0000000000..f27e45cab2 --- /dev/null +++ b/tests/compiler/integers/i8/negate_min.leo @@ -0,0 +1,12 @@ +/* +namespace: Compile +expectation: Pass +input_file: ../inputs/dummy.in +*/ + +function main(y: bool) -> bool { + const a: i8 = -128i8; + const b: i8 = -a; + + return (b == -a) == y; +} diff --git a/tests/compiler/integers/i8/negate_zero.leo b/tests/compiler/integers/i8/negate_zero.leo index 70ed6da011..2688c5fe56 100644 --- a/tests/compiler/integers/i8/negate_zero.leo +++ b/tests/compiler/integers/i8/negate_zero.leo @@ -2,7 +2,7 @@ namespace: Compile expectation: Pass input_file: - - ../input/dummy.in + - ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/input/dummy.in b/tests/compiler/integers/inputs/dummy.in similarity index 100% rename from tests/compiler/integers/input/dummy.in rename to tests/compiler/integers/inputs/dummy.in diff --git a/tests/compiler/integers/u128/max.leo b/tests/compiler/integers/u128/max.leo index 430efbf217..425d31b082 100644 --- a/tests/compiler/integers/u128/max.leo +++ b/tests/compiler/integers/u128/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/u128/max_fail.leo b/tests/compiler/integers/u128/max_fail.leo new file mode 100644 index 0000000000..17eedb2280 --- /dev/null +++ b/tests/compiler/integers/u128/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: u128 = 340282366920938463463374607431768211456u128; +} diff --git a/tests/compiler/integers/u128/min.leo b/tests/compiler/integers/u128/min.leo index 8f87b75c46..abb130957b 100644 --- a/tests/compiler/integers/u128/min.leo +++ b/tests/compiler/integers/u128/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool{ diff --git a/tests/compiler/integers/u128/min_fail.leo b/tests/compiler/integers/u128/min_fail.leo new file mode 100644 index 0000000000..846004c4dd --- /dev/null +++ b/tests/compiler/integers/u128/min_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: u128 = -1u128; +} diff --git a/tests/compiler/integers/u16/max.leo b/tests/compiler/integers/u16/max.leo index 284c07ec44..8d66563b89 100644 --- a/tests/compiler/integers/u16/max.leo +++ b/tests/compiler/integers/u16/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/u16/max_fail.leo b/tests/compiler/integers/u16/max_fail.leo new file mode 100644 index 0000000000..36da3893a7 --- /dev/null +++ b/tests/compiler/integers/u16/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: u16 = 65536u16; +} diff --git a/tests/compiler/integers/u16/min.leo b/tests/compiler/integers/u16/min.leo index 4a0935b6c8..7ea7ddfda1 100644 --- a/tests/compiler/integers/u16/min.leo +++ b/tests/compiler/integers/u16/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/u16/min_fail.leo b/tests/compiler/integers/u16/min_fail.leo new file mode 100644 index 0000000000..10b10f0e0c --- /dev/null +++ b/tests/compiler/integers/u16/min_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: u16 = -1u16; +} diff --git a/tests/compiler/integers/u32/max.leo b/tests/compiler/integers/u32/max.leo index c497c853f0..1c6690022f 100644 --- a/tests/compiler/integers/u32/max.leo +++ b/tests/compiler/integers/u32/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/u32/max_fail.leo b/tests/compiler/integers/u32/max_fail.leo new file mode 100644 index 0000000000..c4eafaf9f9 --- /dev/null +++ b/tests/compiler/integers/u32/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: u32 = 4294967296u32; +} diff --git a/tests/compiler/integers/u32/min.leo b/tests/compiler/integers/u32/min.leo index 9cc5b890d1..b579e3c3bf 100644 --- a/tests/compiler/integers/u32/min.leo +++ b/tests/compiler/integers/u32/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/u32/min_fail.leo b/tests/compiler/integers/u32/min_fail.leo new file mode 100644 index 0000000000..86bd325e98 --- /dev/null +++ b/tests/compiler/integers/u32/min_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: u32 = -1u32; +} diff --git a/tests/compiler/integers/u64/max.leo b/tests/compiler/integers/u64/max.leo index 7222518802..bbffbb1ec7 100644 --- a/tests/compiler/integers/u64/max.leo +++ b/tests/compiler/integers/u64/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/u64/max_fail.leo b/tests/compiler/integers/u64/max_fail.leo new file mode 100644 index 0000000000..1afe054065 --- /dev/null +++ b/tests/compiler/integers/u64/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: u64 = 18446744073709551616u64; +} diff --git a/tests/compiler/integers/u64/min.leo b/tests/compiler/integers/u64/min.leo index bf9f62c6e5..d6812ad0bf 100644 --- a/tests/compiler/integers/u64/min.leo +++ b/tests/compiler/integers/u64/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/u64/min_fail.leo b/tests/compiler/integers/u64/min_fail.leo new file mode 100644 index 0000000000..ba4ffa67a1 --- /dev/null +++ b/tests/compiler/integers/u64/min_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: u64 = -1u64; +} diff --git a/tests/compiler/integers/u8/max.leo b/tests/compiler/integers/u8/max.leo index 427f0703b1..c44f0c562e 100644 --- a/tests/compiler/integers/u8/max.leo +++ b/tests/compiler/integers/u8/max.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/integers/u8/max_fail.leo b/tests/compiler/integers/u8/max_fail.leo new file mode 100644 index 0000000000..59f6e707ee --- /dev/null +++ b/tests/compiler/integers/u8/max_fail.leo @@ -0,0 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + const a: u8 = 256u8; +} diff --git a/tests/compiler/integers/u8/min.leo b/tests/compiler/integers/u8/min.leo index 9f88406715..cd74114fad 100644 --- a/tests/compiler/integers/u8/min.leo +++ b/tests/compiler/integers/u8/min.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: ../input/dummy.in +input_file: ../inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/disabled_tests/compiler/integers/i32/no_space_between_literal.leo b/tests/compiler/integers/u8/min_fail.leo similarity index 72% rename from disabled_tests/compiler/integers/i32/no_space_between_literal.leo rename to tests/compiler/integers/u8/min_fail.leo index f3a03890d3..aaea2d9d53 100644 --- a/disabled_tests/compiler/integers/i32/no_space_between_literal.leo +++ b/tests/compiler/integers/u8/min_fail.leo @@ -4,5 +4,5 @@ expectation: Fail */ function main() { - const i = 1 i32; + const a: u8 = -1u8; } diff --git a/tests/compiler/mutability/cond_mut.leo b/tests/compiler/mutability/cond_mut.leo index 33a8179f96..cf488c8304 100644 --- a/tests/compiler/mutability/cond_mut.leo +++ b/tests/compiler/mutability/cond_mut.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function main(y: bool) -> bool { diff --git a/tests/compiler/mutability/function_input_mut.leo b/tests/compiler/mutability/function_input_mut.leo index bf2ed26078..8ab536faf9 100644 --- a/tests/compiler/mutability/function_input_mut.leo +++ b/tests/compiler/mutability/function_input_mut.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ // Function input are mutable by default. diff --git a/tests/compiler/mutability/input/dummy.in b/tests/compiler/mutability/inputs/dummy.in similarity index 100% rename from tests/compiler/mutability/input/dummy.in rename to tests/compiler/mutability/inputs/dummy.in diff --git a/tests/compiler/mutability/input/index1.in b/tests/compiler/mutability/inputs/index1.in similarity index 100% rename from tests/compiler/mutability/input/index1.in rename to tests/compiler/mutability/inputs/index1.in diff --git a/tests/compiler/mutability/input/index1_tuple.in b/tests/compiler/mutability/inputs/index1_tuple.in similarity index 100% rename from tests/compiler/mutability/input/index1_tuple.in rename to tests/compiler/mutability/inputs/index1_tuple.in diff --git a/tests/compiler/mutability/input/index2.in b/tests/compiler/mutability/inputs/index2.in similarity index 100% rename from tests/compiler/mutability/input/index2.in rename to tests/compiler/mutability/inputs/index2.in diff --git a/tests/compiler/mutability/input/index2_tuple.in b/tests/compiler/mutability/inputs/index2_tuple.in similarity index 100% rename from tests/compiler/mutability/input/index2_tuple.in rename to tests/compiler/mutability/inputs/index2_tuple.in diff --git a/tests/compiler/mutability/let_mut_nested.leo b/tests/compiler/mutability/let_mut_nested.leo index c57fc1af16..0def80befb 100644 --- a/tests/compiler/mutability/let_mut_nested.leo +++ b/tests/compiler/mutability/let_mut_nested.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: input/dummy.in +input_file: inputs/dummy.in */ function main(a: bool) -> bool { diff --git a/tests/compiler/statements/all_loops.leo b/tests/compiler/statements/all_loops.leo new file mode 100644 index 0000000000..df25a12a61 --- /dev/null +++ b/tests/compiler/statements/all_loops.leo @@ -0,0 +1,29 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/dummy.in +*/ + +function main(k: bool) -> bool { + let reverse: u32 = 0u32; + for i: u32 in 9u32..0u32 { + reverse = reverse + i; + } + + let forward: u32 = 0u32; + for x: u32 in 0u32..10u32 { + forward = forward + x; + } + + let reverse_inclusive: u32 = 0u32; + for a: u32 in 10u32..=0u32 { + reverse_inclusive = reverse_inclusive + a; + } + + let forward_inclusive: u32 = 0u32; + for b: u32 in 0u32..=10u32 { + forward_inclusive = forward_inclusive + b; + } + + return (reverse == forward) && (reverse_inclusive == forward_inclusive) && k; +} \ No newline at end of file diff --git a/disabled_tests/compiler/statements/assign_ternary.leo b/tests/compiler/statements/assign_ternary.leo similarity index 74% rename from disabled_tests/compiler/statements/assign_ternary.leo rename to tests/compiler/statements/assign_ternary.leo index ed49709cb4..4fbc98d107 100644 --- a/disabled_tests/compiler/statements/assign_ternary.leo +++ b/tests/compiler/statements/assign_ternary.leo @@ -5,5 +5,5 @@ input_file: inputs/u32_3.in */ function main(x: u32) { - let x = true ? x: true; + let x: bool = true ? x: true; } \ No newline at end of file diff --git a/disabled_tests/compiler/statements/block.leo b/tests/compiler/statements/block.leo similarity index 65% rename from disabled_tests/compiler/statements/block.leo rename to tests/compiler/statements/block.leo index ca1a1abe89..b6cf61d421 100644 --- a/disabled_tests/compiler/statements/block.leo +++ b/tests/compiler/statements/block.leo @@ -5,11 +5,11 @@ input_file: inputs/u32_3.in */ function main(x: u32) -> bool { - let y = x; + let y: u32 = x; { - y += 5u32; + y = y + 5u32; } - return y == 8; + return y == 8u32; } \ No newline at end of file diff --git a/disabled_tests/compiler/statements/duplicate_variable.leo b/tests/compiler/statements/duplicate_variable.leo similarity index 75% rename from disabled_tests/compiler/statements/duplicate_variable.leo rename to tests/compiler/statements/duplicate_variable.leo index 3271a58d7a..134c9e2cdd 100644 --- a/disabled_tests/compiler/statements/duplicate_variable.leo +++ b/tests/compiler/statements/duplicate_variable.leo @@ -5,8 +5,8 @@ input_file: inputs/dummy.in */ function main(k: bool) -> bool { - let x = 1u8; - let x = true; + let x: u8 = 1u8; + let x: bool = true; return k == true; } \ No newline at end of file diff --git a/disabled_tests/compiler/statements/for_loop.leo b/tests/compiler/statements/for_loop.leo similarity index 50% rename from disabled_tests/compiler/statements/for_loop.leo rename to tests/compiler/statements/for_loop.leo index e220e30734..245f4eb7a2 100644 --- a/disabled_tests/compiler/statements/for_loop.leo +++ b/tests/compiler/statements/for_loop.leo @@ -5,15 +5,15 @@ input_file: inputs/u32_3.in */ function main(x: u32) -> bool { - let b = 0u32; + let b: u32 = 0u32; - if x == 3 { - for i in 0..4 { - b += i; + if x == 3u32 { + for i: u32 in 0u32..4u32 { + b = b + i; } } - let r: u32 = x == 3 ? 6 : 0; + let r: u32 = x == 3u32 ? 6u32 : 0u32; return r == b; } diff --git a/disabled_tests/compiler/statements/iteration_basic.leo b/tests/compiler/statements/iteration_basic.leo similarity index 55% rename from disabled_tests/compiler/statements/iteration_basic.leo rename to tests/compiler/statements/iteration_basic.leo index 20ca8f6c5c..c41d94b946 100644 --- a/disabled_tests/compiler/statements/iteration_basic.leo +++ b/tests/compiler/statements/iteration_basic.leo @@ -5,11 +5,11 @@ input_file: inputs/u32_3.in */ function main(x: u32) -> bool { - let y = x; + let y: u32 = x; - for i in 0..3 { - y -= 1; + for i: u32 in 0u32..3u32 { + y = y - 1u32; } - return y == 0; + return y == 0u32; } diff --git a/tests/compiler/statements/iteration_variable.leo b/tests/compiler/statements/iteration_variable.leo new file mode 100644 index 0000000000..c7d1ec9f9a --- /dev/null +++ b/tests/compiler/statements/iteration_variable.leo @@ -0,0 +1,16 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/u32_3.in +*/ + +function main(x: u32) -> bool { + const COUNT: u32 = 2u32; + let y: u32 = x; + + for i: u32 in 0u32..COUNT { + y = y - 1u32; + } + + return y == 1u32; +} diff --git a/tests/expectations/compiler/compiler/char/invalid_char.leo.out b/tests/expectations/compiler/compiler/char/invalid_char.leo.out new file mode 100644 index 0000000000..1f6e688849 --- /dev/null +++ b/tests/expectations/compiler/compiler/char/invalid_char.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370026]: Expected a closed char but found `'`." diff --git a/tests/expectations/compiler/compiler/char/neq.leo.out b/tests/expectations/compiler/compiler/char/neq.leo.out new file mode 100644 index 0000000000..ff7a412802 --- /dev/null +++ b/tests/expectations/compiler/compiler/char/neq.leo.out @@ -0,0 +1,22 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: cd2c41435af95147ff1dcd94031e443b93b15ac7b4f65331ef734759006f3c03 + - initial_input_ast: 5e4fd7cfc681e863ed393f7746308d7b962e2b5f9dcd21aa09a26526ce2ea8e3 + - initial_input_ast: 8fcda0e92250e9897bdb8cfb9b1e3046f94f6f6206ecb958d9758e64e5615889 + - initial_input_ast: 41fef97affd26b29428302f519a5e7a7d61158923e6576618c42607f0c16ff4f + - initial_input_ast: 30c56d9a2e096215900942f18b63cf5a96fb9c0b7cf4fea11dafeeabb02a5233 + - initial_input_ast: 076d0f1b70534c15108ea0dc9e74860030d6701ce1ce38b4a3a41e5ba9fe0121 + - initial_input_ast: d3bff6374e68b63bf35fe089bbff0abb31958571b99b9e0251d82895fdc27edd + - initial_input_ast: 9455652735eb74bd67423f9ed2c7d76b1b27e47f62b5331843f8f4975a03cc9a + - initial_input_ast: 3f69c5fdd03605808dfb6ae116cdf860525b494d5d7cac39b667931c282e8c3e + - initial_input_ast: bdc202a836d17bcb974e33b5b938148c0c9b57fd8b779e813c26d8feac915547 + - initial_input_ast: 6e12715d32233251ea63ae7457c7c1d20e82995cf3df02a1adb943ee358a2643 + - initial_input_ast: 6383f20ea72b337521956a9d86608fc1861f8a5e709bb29e88f2022e893d4e59 + - initial_input_ast: e4ba1106bf3425f620578111bd3c63c0178dbc087ab4c90e873c5b9cc790f6bc + - initial_input_ast: 4c7f9b03dd308ff3981127c4c12adcb883fd8b3ce1dbd744cd935750961fc1c4 + - initial_input_ast: 2a5e92af845c8a56375cbc6123e92aa87cf4523e059c02dfcde326970d88f5c2 + initial_ast: 96f468f0e322334f4df9ca1d34402e66718676fd4e3d06c6996f08a4719f1e2a + symbol_table: cf3569155d9961e6cab441ea9a60f5c92d2b18e6cd2ecaa64b1529d1774d3585 diff --git a/tests/expectations/compiler/compiler/char/out.leo.out b/tests/expectations/compiler/compiler/char/out.leo.out new file mode 100644 index 0000000000..9fa63112b6 --- /dev/null +++ b/tests/expectations/compiler/compiler/char/out.leo.out @@ -0,0 +1,22 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: cd2c41435af95147ff1dcd94031e443b93b15ac7b4f65331ef734759006f3c03 + - initial_input_ast: 5e4fd7cfc681e863ed393f7746308d7b962e2b5f9dcd21aa09a26526ce2ea8e3 + - initial_input_ast: 8fcda0e92250e9897bdb8cfb9b1e3046f94f6f6206ecb958d9758e64e5615889 + - initial_input_ast: 41fef97affd26b29428302f519a5e7a7d61158923e6576618c42607f0c16ff4f + - initial_input_ast: 30c56d9a2e096215900942f18b63cf5a96fb9c0b7cf4fea11dafeeabb02a5233 + - initial_input_ast: 076d0f1b70534c15108ea0dc9e74860030d6701ce1ce38b4a3a41e5ba9fe0121 + - initial_input_ast: d3bff6374e68b63bf35fe089bbff0abb31958571b99b9e0251d82895fdc27edd + - initial_input_ast: 9455652735eb74bd67423f9ed2c7d76b1b27e47f62b5331843f8f4975a03cc9a + - initial_input_ast: 3f69c5fdd03605808dfb6ae116cdf860525b494d5d7cac39b667931c282e8c3e + - initial_input_ast: bdc202a836d17bcb974e33b5b938148c0c9b57fd8b779e813c26d8feac915547 + - initial_input_ast: 6e12715d32233251ea63ae7457c7c1d20e82995cf3df02a1adb943ee358a2643 + - initial_input_ast: 6383f20ea72b337521956a9d86608fc1861f8a5e709bb29e88f2022e893d4e59 + - initial_input_ast: e4ba1106bf3425f620578111bd3c63c0178dbc087ab4c90e873c5b9cc790f6bc + - initial_input_ast: 4c7f9b03dd308ff3981127c4c12adcb883fd8b3ce1dbd744cd935750961fc1c4 + - initial_input_ast: 2a5e92af845c8a56375cbc6123e92aa87cf4523e059c02dfcde326970d88f5c2 + initial_ast: b9e8d9b129d27ec2f91d1b4fd811fe6f3e109ecb60af55dea77e8e1832443ac3 + symbol_table: 1cad55eef598e4d05af7c5f88119636a2e6d23d81213bbaad908d66a32906780 diff --git a/tests/expectations/compiler/compiler/console/assert.leo.out b/tests/expectations/compiler/compiler/console/assert.leo.out new file mode 100644 index 0000000000..5b8aa7e44c --- /dev/null +++ b/tests/expectations/compiler/compiler/console/assert.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 204a90b23ba88927aabdc72aed02effa556d73742caf7d370527f79f0b30f621 + initial_ast: 99f1b1c681fe493ac676f44985edbae014d9306038e8e32e08efe0f88f5d588f + symbol_table: f8c971e501487f7a368a50fd1941c3fb70684b041478fe615a91f088796e301b diff --git a/tests/expectations/compiler/compiler/console/conditional_assert.leo.out b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out new file mode 100644 index 0000000000..eb99fa39fc --- /dev/null +++ b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out @@ -0,0 +1,9 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 204a90b23ba88927aabdc72aed02effa556d73742caf7d370527f79f0b30f621 + - initial_input_ast: cbc36a842b21e80aee167b65bd1a59861d59a43e27915b785410f032ae19a570 + initial_ast: 65952133a9c8ae9cdac6ef184e46bc4dacf711243480b40bbfaae81b9f9d9c07 + symbol_table: f4e056be00b25dfd854a5be8197aeb205436bb0ee11cfe06701531ea086e038c diff --git a/tests/expectations/compiler/compiler/console/error.leo.out b/tests/expectations/compiler/compiler/console/error.leo.out new file mode 100644 index 0000000000..a3bed15f99 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/error.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 38e6b369397fcf11fa921808be61baf33a705d4509bc15a46ec69e1a0aaa5031 + initial_ast: 418ad64ad15c2579603ef4dac51d9fd4ae9573d0c5f4b5f00e6529076b56924b + symbol_table: d46f6eb98259f34d32a60788aa178efa34166bcc6ba1058e2ff5f8327a129b9c diff --git a/tests/expectations/compiler/compiler/console/log.leo.out b/tests/expectations/compiler/compiler/console/log.leo.out new file mode 100644 index 0000000000..7df74bec7d --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 38e6b369397fcf11fa921808be61baf33a705d4509bc15a46ec69e1a0aaa5031 + initial_ast: bdee199da499e7bde2a901151c1ff12c16dade415128d678eb752ee5825ebe57 + symbol_table: 559484bc163178bf54b169f5dd573167771566aa993055b6a28f0c1a759339bc diff --git a/tests/expectations/compiler/compiler/console/log_conditional.leo.out b/tests/expectations/compiler/compiler/console/log_conditional.leo.out new file mode 100644 index 0000000000..371ef8e927 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_conditional.leo.out @@ -0,0 +1,9 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: b9ca1f9e4746ba9f99375205e309b977a522109054d058039197767b39fa6833 + - initial_input_ast: 398a847f3f6c8826a10942c856b67d9acf37a51bf4ec9109be549b24b2dfff94 + initial_ast: 6c9e14fff56659827d68946ebd96577c5efae2b8b8dba3a12b73f4f9847eea9e + symbol_table: 560afbb790df70bfc770d5c2f966428a37baf94a5c0f5312ad445456d33a2cd9 diff --git a/tests/expectations/compiler/compiler/console/log_fail.leo.out b/tests/expectations/compiler/compiler/console/log_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/console/log_input.leo.out b/tests/expectations/compiler/compiler/console/log_input.leo.out new file mode 100644 index 0000000000..d8d56140e2 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_input.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 38e6b369397fcf11fa921808be61baf33a705d4509bc15a46ec69e1a0aaa5031 + initial_ast: 0c4d40a4f5409b6b1d7e4d2f620873148445b231317fd2dad898991374f68c7d + symbol_table: 720c2aafae77c261ed1640d4080f9a73657638baa30e54a5e10e2323b6f6eca0 diff --git a/tests/expectations/compiler/compiler/console/log_parameter.leo.out b/tests/expectations/compiler/compiler/console/log_parameter.leo.out new file mode 100644 index 0000000000..82f62c8ebb --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_parameter.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 38e6b369397fcf11fa921808be61baf33a705d4509bc15a46ec69e1a0aaa5031 + initial_ast: 20bb81a14e5c144a812f70d1b81dd5a5f16acc3e7d44aac2df43ad003308c7d9 + symbol_table: e5159343ab03573032873783b28058a482dd401d534a0d3af03790a5286ba470 diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out new file mode 100644 index 0000000000..081cc31697 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 38e6b369397fcf11fa921808be61baf33a705d4509bc15a46ec69e1a0aaa5031 + initial_ast: 63bcef4c2f9221a32a041d4ce1aa645a795d47dbd7590830fa58202ea36785f8 + symbol_table: 757bb967973b87466c01be1a9dc78d30701964e0d234e0e65d1bbcbd3072370f diff --git a/tests/expectations/compiler/compiler/console/log_parameter_unkown_fail.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_unkown_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_parameter_unkown_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/function/scope_fail.leo.out b/tests/expectations/compiler/compiler/function/scope_fail.leo.out new file mode 100644 index 0000000000..cf561c6ce6 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected : -- got '='\n --> compiler-test:9:20\n |\n 9 | const myGlobal = 42field;\n | ^" diff --git a/tests/expectations/compiler/compiler/function/shadow_function_with_input_fail.leo.out b/tests/expectations/compiler/compiler/function/shadow_function_with_input_fail.leo.out new file mode 100644 index 0000000000..3276ba7de3 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/shadow_function_with_input_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EAST0372014]: function `hi` shadowed\n --> compiler-test:3:1\n |\n 3 | function hi() -> u8 {\n 4 | ...\n 5 | }\n | ^\nError [EAST0372014]: function `hi` shadowed\n --> compiler-test:3:1\n |\n 3 | function hi() -> u8 {\n 4 | ...\n 5 | }\n | ^" diff --git a/tests/expectations/compiler/compiler/group/add.leo.out b/tests/expectations/compiler/compiler/group/add.leo.out new file mode 100644 index 0000000000..53cdfcaa2c --- /dev/null +++ b/tests/expectations/compiler/compiler/group/add.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: ee823464d3be14662261697b47c73a67a47c47558987333869ea6e72d6e34ebf + initial_ast: 64c94034bd1ca4bc616b3be459139ef6d65ec92c90093e247c600c6bfd9d30be + symbol_table: b10964224747af7f8ba12f1b3c0dfa228842b3e08b9b82d785b71def31387144 diff --git a/tests/expectations/compiler/compiler/group/assert_eq.leo.out b/tests/expectations/compiler/compiler/group/assert_eq.leo.out new file mode 100644 index 0000000000..231d0180cb --- /dev/null +++ b/tests/expectations/compiler/compiler/group/assert_eq.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: ecd9a5086d5d85f1794e023ff6c06e68cc0b4ae67e3f9abc88cd1354ed8fdfad + initial_ast: a5bfe7c18f041f12f7adc2fb9726eacd225383207b4d3c355bfffe831769bfae + symbol_table: 584d3ba9f7908f1b2e0c918710e78d0a483c12aa3f4644edada2eac31ac689ca diff --git a/tests/expectations/compiler/compiler/group/both_sign_high.leo.out b/tests/expectations/compiler/compiler/group/both_sign_high.leo.out new file mode 100644 index 0000000000..95eac33b77 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/both_sign_high.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: b14d302e43f9f5d759e3399df9c77d6d44b6297c0da78d7f66cde5f2ba252778 + symbol_table: 9a61702119ebc681917d7cb7e40ecafa00354849326bf1182635f27a28da35e9 diff --git a/tests/expectations/compiler/compiler/group/both_sign_inferred.leo.out b/tests/expectations/compiler/compiler/group/both_sign_inferred.leo.out new file mode 100644 index 0000000000..8ee455d309 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/both_sign_inferred.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: 4450d4bd84a116aa500e82a4768d23193ee97159b5449f0ca7736ea769323e39 + symbol_table: e4a96223c049893c904a90f24d069592b33fc137de0f4816cf92089e63663693 diff --git a/tests/expectations/compiler/compiler/group/both_sign_low.leo.out b/tests/expectations/compiler/compiler/group/both_sign_low.leo.out new file mode 100644 index 0000000000..0f2e90db12 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/both_sign_low.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: 5f5ec502724efe67bbe9d168cbea8a9771aedf8c4f7df65c08f6a12be8995af7 + symbol_table: 1817d91b99941ddc2590c6a2777ad8f7d4ba26a8b2a3baa3932f1a08eb540206 diff --git a/tests/expectations/compiler/compiler/group/eq.leo.out b/tests/expectations/compiler/compiler/group/eq.leo.out new file mode 100644 index 0000000000..231d0180cb --- /dev/null +++ b/tests/expectations/compiler/compiler/group/eq.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: ecd9a5086d5d85f1794e023ff6c06e68cc0b4ae67e3f9abc88cd1354ed8fdfad + initial_ast: a5bfe7c18f041f12f7adc2fb9726eacd225383207b4d3c355bfffe831769bfae + symbol_table: 584d3ba9f7908f1b2e0c918710e78d0a483c12aa3f4644edada2eac31ac689ca diff --git a/tests/expectations/compiler/compiler/group/input.leo.out b/tests/expectations/compiler/compiler/group/input.leo.out new file mode 100644 index 0000000000..25b07ca155 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/input.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 5cce2653606494bd949a7631bb7fe6ab255fbcb1618e5e099875e4f1e9c082aa + initial_ast: a5bfe7c18f041f12f7adc2fb9726eacd225383207b4d3c355bfffe831769bfae + symbol_table: 584d3ba9f7908f1b2e0c918710e78d0a483c12aa3f4644edada2eac31ac689ca diff --git a/tests/expectations/compiler/compiler/group/negate.leo.out b/tests/expectations/compiler/compiler/group/negate.leo.out new file mode 100644 index 0000000000..8b71dac270 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/negate.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: ecd9a5086d5d85f1794e023ff6c06e68cc0b4ae67e3f9abc88cd1354ed8fdfad + initial_ast: 7382760a9540b1f7491ab97b3eda2e7687995d37c0e8368c4ff6464f7dda433e + symbol_table: efa845f46b76b7927005e6e7b8ba6353db6f3a783ec1a8b74993ccc97738eadc diff --git a/tests/expectations/compiler/compiler/group/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/group/no_space_between_literal.leo.out new file mode 100644 index 0000000000..4a09044a4a --- /dev/null +++ b/tests/expectations/compiler/compiler/group/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370004]: Unexpected white space between terms (0,1) and group\n --> compiler-test:4:24\n |\n 4 | const g: group = (0,1) group;\n | ^" diff --git a/tests/expectations/compiler/compiler/group/one.leo.out b/tests/expectations/compiler/compiler/group/one.leo.out new file mode 100644 index 0000000000..1451ff1c88 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/one.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: 8c730537e1bc9efd6b7004201e49eb37a39931a7e579f7c0dbcfdcf59daac4ba + symbol_table: 1459210791fd0aae2827b2b7c3fd438e7a8315b290e23cbfe365b4214d5cd284 diff --git a/tests/expectations/compiler/compiler/group/point.leo.out b/tests/expectations/compiler/compiler/group/point.leo.out new file mode 100644 index 0000000000..da77e02dbc --- /dev/null +++ b/tests/expectations/compiler/compiler/group/point.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: 8d228887cf0ac8a041bfc2d714a945b31974e632dde21636fffa86cfe6d3da84 + symbol_table: ac8c4425959cf548f2f0edc8aa637b1d827394f11fe2c10ecef366a803fe30a2 diff --git a/tests/expectations/compiler/compiler/group/point_input.leo.out b/tests/expectations/compiler/compiler/group/point_input.leo.out new file mode 100644 index 0000000000..4933ddaceb --- /dev/null +++ b/tests/expectations/compiler/compiler/group/point_input.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: e03c4a2ba40d2e844353081fc62efae967d074fb34a08bd30c99dff1387bd3fd + initial_ast: 3e5e6c4e27849e4d2b56f9145a94cda521fdbee41ff24e15dd41f47b9f9cf8db + symbol_table: 0db35c4a8548b1c37607ad3a7d67be41b7949f6219107f4d5ef8442a75dd2a7a diff --git a/tests/expectations/compiler/compiler/group/positive_and_negative.leo.out b/tests/expectations/compiler/compiler/group/positive_and_negative.leo.out new file mode 100644 index 0000000000..b48f91fc0d --- /dev/null +++ b/tests/expectations/compiler/compiler/group/positive_and_negative.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: 6c150c7f1faa1259c42139186ca5715c96d3c9914e89a426e1d833e91df705d1 + symbol_table: 877713c611c84057862de19fa49429efb7c57a29ed3ef686b59c1ab3696c4117 diff --git a/tests/expectations/compiler/compiler/group/sub.leo.out b/tests/expectations/compiler/compiler/group/sub.leo.out new file mode 100644 index 0000000000..cd95267be1 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/sub.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: ee823464d3be14662261697b47c73a67a47c47558987333869ea6e72d6e34ebf + initial_ast: 7f7134f02b190880606fe76adeb58295b48174dc3fda20551b08e452aa859388 + symbol_table: 8d7179908ac5272f4892b2e374ad5c5401332d4d12d7d0505ba1e51a98ef0d6d diff --git a/tests/expectations/compiler/compiler/group/ternary.leo.out b/tests/expectations/compiler/compiler/group/ternary.leo.out new file mode 100644 index 0000000000..8d7bfe585a --- /dev/null +++ b/tests/expectations/compiler/compiler/group/ternary.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: e03c4a2ba40d2e844353081fc62efae967d074fb34a08bd30c99dff1387bd3fd + initial_ast: 408ea050f4db2d1429d0522efe4f3a7713f52097c26dd9feacd725af866a13bf + symbol_table: 5e96e4138e5643222224de143ab32b6716c4dbaf965318b48eaf9e4ba63f8586 diff --git a/tests/expectations/compiler/compiler/group/x_sign_high.leo.out b/tests/expectations/compiler/compiler/group/x_sign_high.leo.out new file mode 100644 index 0000000000..2bf27526a0 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/x_sign_high.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: d862fe6e0c7824b043d51579e3d928d85dbfb3ceb127cff804cf35ab46a0d27f + symbol_table: 2d0db26fa84f8daad71afd4420718043de1c97757ae4fe4fa78e9874891d1d80 diff --git a/tests/expectations/compiler/compiler/group/x_sign_inferred.leo.out b/tests/expectations/compiler/compiler/group/x_sign_inferred.leo.out new file mode 100644 index 0000000000..37c45db3dd --- /dev/null +++ b/tests/expectations/compiler/compiler/group/x_sign_inferred.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: d9131042766bcda201691ff910702675d9a70a9e8501abe6de2fca13e22dddf9 + symbol_table: c20979f64468655131a488980c1de31384fd7ff35561ed569c3db6f2d0bc19cc diff --git a/tests/expectations/compiler/compiler/group/x_sign_low.leo.out b/tests/expectations/compiler/compiler/group/x_sign_low.leo.out new file mode 100644 index 0000000000..794d042cbc --- /dev/null +++ b/tests/expectations/compiler/compiler/group/x_sign_low.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: 6e20ff0d1d9ff333eb7f56da5a239c09864f5e90d5282e734e9faa2c7ccbc76c + symbol_table: f450d14b0bb862b0bec4a5f8d41eb92f7cf951dee469505fb20dbfa25972eb7b diff --git a/tests/expectations/compiler/compiler/group/y_sign_high.leo.out b/tests/expectations/compiler/compiler/group/y_sign_high.leo.out new file mode 100644 index 0000000000..d12a2b8577 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/y_sign_high.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: de1fa4a91757146bd6c659b1507abad6e4b66f5cee22c8e8523a6cdd1212d6ee + symbol_table: 52760622da95d189f6e707df97fc6bba4216fa59022a4ae79d840b9c05fdf5b1 diff --git a/tests/expectations/compiler/compiler/group/y_sign_inferred.leo.out b/tests/expectations/compiler/compiler/group/y_sign_inferred.leo.out new file mode 100644 index 0000000000..0ce2614aea --- /dev/null +++ b/tests/expectations/compiler/compiler/group/y_sign_inferred.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: d3c56fc45ce1638a11aa840a68f67acbcd6d453fd6ef58ed820c82b852806beb + symbol_table: d3bf69e78619e63bc1c56c1efe49712b226f5d477e1c42491d0b31e24d5a98a7 diff --git a/tests/expectations/compiler/compiler/group/y_sign_low.leo.out b/tests/expectations/compiler/compiler/group/y_sign_low.leo.out new file mode 100644 index 0000000000..8169d59831 --- /dev/null +++ b/tests/expectations/compiler/compiler/group/y_sign_low.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: 6f55711d5640711c72ee76879ba01f9a116e3a42125a6fa88fa8985587cfceb0 + symbol_table: 026430e928e2236167d6587cb1885784f30bbc916f75d3a0f42fa7a3f2c6978b diff --git a/tests/expectations/compiler/compiler/group/zero.leo.out b/tests/expectations/compiler/compiler/group/zero.leo.out new file mode 100644 index 0000000000..632eefac2d --- /dev/null +++ b/tests/expectations/compiler/compiler/group/zero.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: no input + initial_ast: cbdc33ff0e2346a4b205b0fcd945c8948bbc574418a9136760e23f11be47df7e + symbol_table: b181fa2d3c50419dbdaadbe2e91aa4a3e17baa614b0635f9ce6fa7367ead48eb diff --git a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out new file mode 100644 index 0000000000..4dfa79f1d8 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 3674d8249023145121ff35eb4d9e59b0ce79cda7e17f9f98b5dbaa6ba4f80cf2 + initial_ast: f25f8ff443e8db19544f294dec594f2121e975a27aa500e794d12e38f8e65413 + symbol_table: 49a0f7957853abe54b078bb95a1091e5262b58ecc5ff8b8e546ff1fe82547e1f diff --git a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out new file mode 100644 index 0000000000..e3a3a1a3fe --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 3674d8249023145121ff35eb4d9e59b0ce79cda7e17f9f98b5dbaa6ba4f80cf2 + initial_ast: 87411a2334bb03e186ad8e58cb93ebc5e98dc19c49cc8d25505a0fe5a5a694a2 + symbol_table: cc902d05b8e7171b94fb0335b85ef2147427d0840e15360f6a88c4906ebceaa2 diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_min_fail.leo.out new file mode 100644 index 0000000000..e3a3a1a3fe --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min_fail.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 3674d8249023145121ff35eb4d9e59b0ce79cda7e17f9f98b5dbaa6ba4f80cf2 + initial_ast: 87411a2334bb03e186ad8e58cb93ebc5e98dc19c49cc8d25505a0fe5a5a694a2 + symbol_table: cc902d05b8e7171b94fb0335b85ef2147427d0840e15360f6a88c4906ebceaa2 diff --git a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out new file mode 100644 index 0000000000..ac7d2ab92a --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 3674d8249023145121ff35eb4d9e59b0ce79cda7e17f9f98b5dbaa6ba4f80cf2 + initial_ast: e85a47fcd2f126fda73b6adb5f4ecd52795a765aabf312b1374dbbb96b3e2bad + symbol_table: 4316835ec95347cdf02c020035e9cb3416318c71618d710108c716ae1554d139 diff --git a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out new file mode 100644 index 0000000000..b38aa6bf24 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 3674d8249023145121ff35eb4d9e59b0ce79cda7e17f9f98b5dbaa6ba4f80cf2 + initial_ast: ea34d774b6c7baaf3c789cebc97f3b4ee6bfab3bc780344b58906d419709c435 + symbol_table: 927e4c4f2b53eb922fd507cb7faa00e94d47ccdbf16a2a0afe83b57e31873cb2 diff --git a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out new file mode 100644 index 0000000000..c1c3957b04 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 3674d8249023145121ff35eb4d9e59b0ce79cda7e17f9f98b5dbaa6ba4f80cf2 + initial_ast: 79499af29661bd059f4bbd1997f99eb96552b6842e21911d82da6fc5c2e36dd5 + symbol_table: 480e1058cba976845e762dbcc1568635f4940fb87dc8e89da28b568f16febfac diff --git a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out new file mode 100644 index 0000000000..6072996488 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:17\n |\n 3 | function main() {\n | ^" diff --git a/tests/expectations/compiler/compiler/statements/all_loops.leo.out b/tests/expectations/compiler/compiler/statements/all_loops.leo.out new file mode 100644 index 0000000000..0477c00ee5 --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/all_loops.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 0431e7bfd2506632ab038adc1a10c45951fc1f90f1b61930228ed3022006d315 + initial_ast: 81665afabc473c27c41707ed83231dd872813d6c4bcbcb6cb0923261eb9b006c + symbol_table: 3f85b29e75222f03e70b83cbc2399746f23dbbeabd857acaa486db9e8076c03c diff --git a/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out new file mode 100644 index 0000000000..bc2fcb5fec --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/assign_ternary.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EPAR0370005]: expected -> -- got '{'\n --> compiler-test:3:23\n |\n 3 | function main(x: u32) {\n | ^" diff --git a/tests/expectations/compiler/compiler/statements/block.leo.out b/tests/expectations/compiler/compiler/statements/block.leo.out new file mode 100644 index 0000000000..fdb195b471 --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/block.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 7f5eb67955fff9556d758dea428c97687be661cf6ef33f8acf736e3e77d487f8 + initial_ast: 0ab9aaa950215c96b207e236e15857a4d0f66a137dd2c44071be7d806b0850b6 + symbol_table: ce729d406fca8cbf2bc8fea55010b163168705232be0ce9edaeff1c187269d54 diff --git a/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out new file mode 100644 index 0000000000..f72840a998 --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/duplicate_variable.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [EAST0372015]: variable `x` shadowed\n --> compiler-test:4:2\n |\n 4 | \tlet x: u8 = 1u8;\n | ^^^^^^^^^^^^^^^\nError [EAST0372015]: variable `x` shadowed\n --> compiler-test:4:2\n |\n 4 | \tlet x: u8 = 1u8;\n | ^^^^^^^^^^^^^^^" diff --git a/tests/expectations/compiler/compiler/statements/for_loop.leo.out b/tests/expectations/compiler/compiler/statements/for_loop.leo.out new file mode 100644 index 0000000000..2cd458b83e --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/for_loop.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 7f5eb67955fff9556d758dea428c97687be661cf6ef33f8acf736e3e77d487f8 + initial_ast: a3eb3afb0d01504a949f76baa11f119955aa29bc9e57ec0b8823b48c3b1e45e7 + symbol_table: 69da3b565e7a6a957b957fa0726be3d3f849cd1c71d5d1d5bbbcf1c5620b1c07 diff --git a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out new file mode 100644 index 0000000000..6dc876466d --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 7f5eb67955fff9556d758dea428c97687be661cf6ef33f8acf736e3e77d487f8 + initial_ast: 63565858ee45b7520a60fd504151e2deb023601da8289a8fa25841488fbe7602 + symbol_table: 210a8b745bd95b8350226242f6b51656f817fadb90c768564b0c6f4f8dcfa706 diff --git a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out new file mode 100644 index 0000000000..3fc156ac7a --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out @@ -0,0 +1,8 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - output: + - initial_input_ast: 7f5eb67955fff9556d758dea428c97687be661cf6ef33f8acf736e3e77d487f8 + initial_ast: fe85afd83a8a1f1c33be0b8d061ea699b4b250a0c2d4b6a557fe224eaf391c1b + symbol_table: 8b6313fa019dfc473aea778b67ecf00f38110f339c9c0fb416b221994f8f9c7b