diff --git a/compiler/src/value/field/field_type.rs b/compiler/src/value/field/field_type.rs index 67afc09ebc..d0525113a5 100644 --- a/compiler/src/value/field/field_type.rs +++ b/compiler/src/value/field/field_type.rs @@ -209,10 +209,16 @@ impl PartialOrd for FieldType { } impl EvaluateEqGadget for FieldType { - fn evaluate_equal>(&self, _cs: CS, other: &Self) -> Result { + fn evaluate_equal>(&self, mut cs: CS, other: &Self) -> Result { match (self, other) { (FieldType::Constant(first), FieldType::Constant(second)) => Ok(Boolean::constant(first.eq(second))), - _ => unimplemented!(), + (FieldType::Allocated(fisrt), FieldType::Allocated(second)) => fisrt.evaluate_equal(cs, second), + (FieldType::Constant(constant_value), FieldType::Allocated(allocated_value)) + | (FieldType::Allocated(allocated_value), FieldType::Constant(constant_value)) => { + let allocated_constant_value = + FpGadget::alloc(&mut cs.ns(|| format!("alloc constant for eq")), || Ok(constant_value))?; + allocated_value.evaluate_equal(cs, &allocated_constant_value) + } } } } diff --git a/compiler/src/value/group/targets/edwards_bls12.rs b/compiler/src/value/group/targets/edwards_bls12.rs index 0b9fadd7ca..862fb31a75 100644 --- a/compiler/src/value/group/targets/edwards_bls12.rs +++ b/compiler/src/value/group/targets/edwards_bls12.rs @@ -236,13 +236,48 @@ impl PartialEq for EdwardsGroupType { impl Eq for EdwardsGroupType {} +fn compare_allocated_edwards_bls_gadgets>( + mut cs: CS, + first: &EdwardsBlsGadget, + second: &EdwardsBlsGadget, +) -> Result { + // compare x coordinates + let x_first = &first.x; + let x_second = &second.x; + + let compare_x = x_first.evaluate_equal(&mut cs.ns(|| format!("compare x")), x_second)?; + + // compare y coordinates + let y_first = &first.y; + let y_second = &second.y; + + let compare_y = y_first.evaluate_equal(&mut cs.ns(|| format!("compare y")), y_second)?; + + Boolean::and( + &mut cs.ns(|| format!("compare x and y results")), + &compare_x, + &compare_y, + ) +} + impl EvaluateEqGadget for EdwardsGroupType { - fn evaluate_equal>(&self, _cs: CS, other: &Self) -> Result { + fn evaluate_equal>(&self, mut cs: CS, other: &Self) -> Result { match (self, other) { (EdwardsGroupType::Constant(self_value), EdwardsGroupType::Constant(other_value)) => { Ok(Boolean::constant(self_value.eq(other_value))) } - _ => unimplemented!(), + (EdwardsGroupType::Allocated(first), EdwardsGroupType::Allocated(second)) => { + compare_allocated_edwards_bls_gadgets(cs, first, second) + } + (EdwardsGroupType::Constant(constant_value), EdwardsGroupType::Allocated(allocated_value)) + | (EdwardsGroupType::Allocated(allocated_value), EdwardsGroupType::Constant(constant_value)) => { + let allocated_constant_value = + , Fq>>::alloc( + &mut cs.ns(|| format!("alloc constant for eq")), + || Ok(constant_value), + )?; + compare_allocated_edwards_bls_gadgets(cs, allocated_value, &allocated_constant_value) + } } } } diff --git a/compiler/tests/array/mod.rs b/compiler/tests/array/mod.rs index 63090e2bb7..884657974f 100644 --- a/compiler/tests/array/mod.rs +++ b/compiler/tests/array/mod.rs @@ -8,14 +8,14 @@ use crate::{ }; pub fn output_ones(program: EdwardsTestCompiler) { - let expected = include_bytes!("output_/registers_ones.out"); + let expected = include_bytes!("output/registers_ones.out"); let actual = get_output(program); assert!(expected.eq(actual.bytes().as_slice())); } pub fn output_zeros(program: EdwardsTestCompiler) { - let expected = include_bytes!("output_/registers_zeros.out"); + let expected = include_bytes!("output/registers_zeros.out"); let actual = get_output(program); assert!(expected.eq(actual.bytes().as_slice())); diff --git a/compiler/tests/array/output_/registers_ones.out b/compiler/tests/array/output/registers_ones.out similarity index 100% rename from compiler/tests/array/output_/registers_ones.out rename to compiler/tests/array/output/registers_ones.out diff --git a/compiler/tests/array/output_/registers_zeros.out b/compiler/tests/array/output/registers_zeros.out similarity index 100% rename from compiler/tests/array/output_/registers_zeros.out rename to compiler/tests/array/output/registers_zeros.out diff --git a/compiler/tests/boolean/mod.rs b/compiler/tests/boolean/mod.rs index d5243bc082..812939ecdb 100644 --- a/compiler/tests/boolean/mod.rs +++ b/compiler/tests/boolean/mod.rs @@ -1,7 +1,6 @@ use crate::{ assert_satisfied, expect_compiler_error, - expect_synthesis_error, get_output, parse_program, parse_program_with_input, @@ -10,14 +9,14 @@ use crate::{ use leo_compiler::errors::{BooleanError, CompilerError, ExpressionError, FunctionError, StatementError}; pub fn output_true(program: EdwardsTestCompiler) { - let expected = include_bytes!("output_/registers_true.out"); + let expected = include_bytes!("output/registers_true.out"); let actual = get_output(program); assert_eq!(expected, actual.bytes().as_slice()); } pub fn output_false(program: EdwardsTestCompiler) { - let expected = include_bytes!("output_/registers_false.out"); + let expected = include_bytes!("output/registers_false.out"); let actual = get_output(program); assert_eq!(expected, actual.bytes().as_slice()); diff --git a/compiler/tests/boolean/output_/registers_false.out b/compiler/tests/boolean/output/registers_false.out similarity index 100% rename from compiler/tests/boolean/output_/registers_false.out rename to compiler/tests/boolean/output/registers_false.out diff --git a/compiler/tests/boolean/output_/registers_true.out b/compiler/tests/boolean/output/registers_true.out similarity index 100% rename from compiler/tests/boolean/output_/registers_true.out rename to compiler/tests/boolean/output/registers_true.out diff --git a/compiler/tests/circuits/pedersen_mock.leo b/compiler/tests/circuits/pedersen_mock.leo index df96540d08..fae0c7eb5a 100644 --- a/compiler/tests/circuits/pedersen_mock.leo +++ b/compiler/tests/circuits/pedersen_mock.leo @@ -21,5 +21,7 @@ function main() { let pedersen = PedersenHash::new(parameters); let input: bool[512] = [true; 512]; - console.assert(pedersen.hash(input) == 0u32); + let res = pedersen.hash(input); + + console.assert(res == 0u32); } diff --git a/compiler/tests/console/conditional_assert.leo b/compiler/tests/console/conditional_assert.leo new file mode 100644 index 0000000000..f2c1591e9c --- /dev/null +++ b/compiler/tests/console/conditional_assert.leo @@ -0,0 +1,7 @@ +function main(a: bool) { + if a { + console.assert(a == true); + } else { + console.assert(a == false); + } +} \ No newline at end of file diff --git a/compiler/tests/console/mod.rs b/compiler/tests/console/mod.rs index 979be8fc31..d2773c7660 100644 --- a/compiler/tests/console/mod.rs +++ b/compiler/tests/console/mod.rs @@ -109,3 +109,22 @@ fn test_assert() { expect_compiler_error(program); } + +#[test] +fn test_conditional_assert() { + let bytes = include_bytes!("conditional_assert.leo"); + let mut program = parse_program(bytes).unwrap(); + + let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(true)))]); + program.set_main_input(main_input); + + assert_satisfied(program); + + let mut program = parse_program(bytes).unwrap(); + + let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(false)))]); + + program.set_main_input(main_input); + + assert_satisfied(program); +} diff --git a/compiler/tests/field/add.leo b/compiler/tests/field/add.leo index df9cdec45a..8dc2c7df4e 100644 --- a/compiler/tests/field/add.leo +++ b/compiler/tests/field/add.leo @@ -1,3 +1,3 @@ function main(a: field, b: field, c: field) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/field/assert_eq.leo b/compiler/tests/field/console_assert.leo similarity index 56% rename from compiler/tests/field/assert_eq.leo rename to compiler/tests/field/console_assert.leo index a5dbe51c6a..c7224bcea5 100644 --- a/compiler/tests/field/assert_eq.leo +++ b/compiler/tests/field/console_assert.leo @@ -1,3 +1,3 @@ function main(a: field, b: field) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/field/div.leo b/compiler/tests/field/div.leo index 6bb4fd4bc5..028b06fad2 100644 --- a/compiler/tests/field/div.leo +++ b/compiler/tests/field/div.leo @@ -1,3 +1,3 @@ function main(a: field, b: field, c: field) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/field/eq.leo b/compiler/tests/field/eq.leo index 52699c0383..e64307d8de 100644 --- a/compiler/tests/field/eq.leo +++ b/compiler/tests/field/eq.leo @@ -1,3 +1,3 @@ function main(a: field, b: field, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/field/mod.rs b/compiler/tests/field/mod.rs index 3249d3d783..d17e17400d 100644 --- a/compiler/tests/field/mod.rs +++ b/compiler/tests/field/mod.rs @@ -1,4 +1,4 @@ -use crate::{assert_satisfied, expect_synthesis_error, generate_main_input, parse_program}; +use crate::{assert_satisfied, expect_compiler_error, generate_main_input, parse_program}; use leo_typed::InputValue; use snarkos_curves::edwards_bls12::Fq; @@ -169,7 +169,6 @@ fn test_mul() { } #[test] -#[ignore] fn test_eq() { let mut rng = XorShiftRng::seed_from_u64(1231275789u64); @@ -214,7 +213,7 @@ fn test_eq() { } #[test] -fn test_assert_eq_pass() { +fn test_console_assert_pass() { let mut rng = XorShiftRng::seed_from_u64(1231275789u64); for _ in 0..10 { @@ -222,7 +221,7 @@ fn test_assert_eq_pass() { let a_string = field_to_decimal_string(a); - let bytes = include_bytes!("assert_eq.leo"); + let bytes = include_bytes!("console_assert.leo"); let mut program = parse_program(bytes).unwrap(); let main_input = generate_main_input(vec![ @@ -237,7 +236,7 @@ fn test_assert_eq_pass() { } #[test] -fn test_assert_eq_fail() { +fn test_console_assert_fail() { let mut rng = XorShiftRng::seed_from_u64(1231275789u64); for _ in 0..10 { @@ -251,7 +250,7 @@ fn test_assert_eq_fail() { let a_string = field_to_decimal_string(a); let b_string = field_to_decimal_string(b); - let bytes = include_bytes!("assert_eq.leo"); + let bytes = include_bytes!("console_assert.leo"); let mut program = parse_program(bytes).unwrap(); let main_input = generate_main_input(vec![ @@ -261,7 +260,7 @@ fn test_assert_eq_fail() { program.set_main_input(main_input); - expect_synthesis_error(program); + expect_compiler_error(program); } } diff --git a/compiler/tests/field/mul.leo b/compiler/tests/field/mul.leo index c96104aa23..7df7c83830 100644 --- a/compiler/tests/field/mul.leo +++ b/compiler/tests/field/mul.leo @@ -1,3 +1,3 @@ function main(a: field, b: field, c: field) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/field/negate.leo b/compiler/tests/field/negate.leo index f7314f60a1..94c730207a 100644 --- a/compiler/tests/field/negate.leo +++ b/compiler/tests/field/negate.leo @@ -1,3 +1,3 @@ function main(a: field, b: field) { - assert_eq!(-a, b); + console.assert(-a == b); } \ No newline at end of file diff --git a/compiler/tests/field/output_/register_one.out b/compiler/tests/field/output/register_one.out similarity index 100% rename from compiler/tests/field/output_/register_one.out rename to compiler/tests/field/output/register_one.out diff --git a/compiler/tests/field/output_/register_zero.out b/compiler/tests/field/output/register_zero.out similarity index 100% rename from compiler/tests/field/output_/register_zero.out rename to compiler/tests/field/output/register_zero.out diff --git a/compiler/tests/field/sub.leo b/compiler/tests/field/sub.leo index 2dbca87c07..2c84b24647 100644 --- a/compiler/tests/field/sub.leo +++ b/compiler/tests/field/sub.leo @@ -1,3 +1,3 @@ function main(a: field, b: field, c: field) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/field/ternary.leo b/compiler/tests/field/ternary.leo index aeb196400e..49cd6a4e62 100644 --- a/compiler/tests/field/ternary.leo +++ b/compiler/tests/field/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: field, b: field, c: field) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/function/iteration.leo b/compiler/tests/function/iteration.leo index 931ce78180..19af4dd9cf 100644 --- a/compiler/tests/function/iteration.leo +++ b/compiler/tests/function/iteration.leo @@ -9,5 +9,5 @@ function main() { a += one(); } - assert_eq!(a, 10u32); + console.assert(a == 10u32); } \ No newline at end of file diff --git a/compiler/tests/function/iteration_repeated.leo b/compiler/tests/function/iteration_repeated.leo index dcf357fe34..3694b3594a 100644 --- a/compiler/tests/function/iteration_repeated.leo +++ b/compiler/tests/function/iteration_repeated.leo @@ -11,5 +11,5 @@ function iteration() -> u32 { function main() { let total = iteration() + iteration(); - assert_eq!(total, 20); + console.assert(total == 20); } \ No newline at end of file diff --git a/compiler/tests/function/mod.rs b/compiler/tests/function/mod.rs index 1fe9b24e4b..63a6839ae1 100644 --- a/compiler/tests/function/mod.rs +++ b/compiler/tests/function/mod.rs @@ -47,7 +47,7 @@ fn test_newlines() { let program_bytes = include_bytes!("newlines.leo"); let program = parse_program_with_input(program_bytes, input_bytes).unwrap(); - let expected_bytes = include_bytes!("output_/newlines.out"); + let expected_bytes = include_bytes!("output/newlines.out"); let expected = std::str::from_utf8(expected_bytes).unwrap(); let actual_bytes = get_output(program); let actual = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); @@ -70,7 +70,7 @@ fn test_multiple_returns_main() { let program = parse_program_with_input(program_bytes, input_bytes).unwrap(); - let expected_bytes = include_bytes!("output_/registers.out"); + let expected_bytes = include_bytes!("output/registers.out"); let expected = std::str::from_utf8(expected_bytes).unwrap(); let actual_bytes = get_output(program); let actual = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); diff --git a/compiler/tests/function/multiple.leo b/compiler/tests/function/multiple.leo index 0603745623..ef00a4ef47 100644 --- a/compiler/tests/function/multiple.leo +++ b/compiler/tests/function/multiple.leo @@ -5,6 +5,6 @@ function tuple() -> (bool, bool) { function main() { let (a, b) = tuple(); - assert_eq!(a, true); - assert_eq!(b, false); + console.assert(a == true); + console.assert(b == false); } \ No newline at end of file diff --git a/compiler/tests/function/output_/newlines.out b/compiler/tests/function/output/newlines.out similarity index 100% rename from compiler/tests/function/output_/newlines.out rename to compiler/tests/function/output/newlines.out diff --git a/compiler/tests/function/output_/registers.out b/compiler/tests/function/output/registers.out similarity index 100% rename from compiler/tests/function/output_/registers.out rename to compiler/tests/function/output/registers.out diff --git a/compiler/tests/function/repeated.leo b/compiler/tests/function/repeated.leo index c8b987ff00..a2d04d55f9 100644 --- a/compiler/tests/function/repeated.leo +++ b/compiler/tests/function/repeated.leo @@ -5,5 +5,5 @@ function one() -> bool { function main() { let a = one() && one(); - assert_eq!(a, true); + console.assert(a == true); } \ No newline at end of file diff --git a/compiler/tests/function/return.leo b/compiler/tests/function/return.leo index 58fbd6ac95..10c7138977 100644 --- a/compiler/tests/function/return.leo +++ b/compiler/tests/function/return.leo @@ -3,5 +3,5 @@ function one() -> u32 { } function main() { - assert_eq!(one(), 1u32); + console.assert(one() == 1u32); } \ No newline at end of file diff --git a/compiler/tests/function/value_unchanged.leo b/compiler/tests/function/value_unchanged.leo index e61afd1e76..32dcfa62d6 100644 --- a/compiler/tests/function/value_unchanged.leo +++ b/compiler/tests/function/value_unchanged.leo @@ -15,5 +15,5 @@ function main() { let a = 1u32; bad_mutate(a); - assert_eq!(a, 1u32); // <- value `a` is still `1u32` + console.assert(a == 1u32); // <- value `a` is still `1u32` } \ No newline at end of file diff --git a/compiler/tests/group/add.leo b/compiler/tests/group/add.leo index 2b8713ac94..bb84df2d6c 100644 --- a/compiler/tests/group/add.leo +++ b/compiler/tests/group/add.leo @@ -1,3 +1,3 @@ function main(a: group, b: group, c: group) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/group/assert_eq.leo b/compiler/tests/group/assert_eq.leo index 0d67b938c7..3886a07bbf 100644 --- a/compiler/tests/group/assert_eq.leo +++ b/compiler/tests/group/assert_eq.leo @@ -1,3 +1,3 @@ function main(a: group, b: group) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/group/eq.leo b/compiler/tests/group/eq.leo index 07feb0b8be..89701d9c99 100644 --- a/compiler/tests/group/eq.leo +++ b/compiler/tests/group/eq.leo @@ -1,3 +1,3 @@ function main(a: group, b: group, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/group/input.leo b/compiler/tests/group/input.leo index 0d67b938c7..3886a07bbf 100644 --- a/compiler/tests/group/input.leo +++ b/compiler/tests/group/input.leo @@ -1,3 +1,3 @@ function main(a: group, b: group) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/group/mod.rs b/compiler/tests/group/mod.rs index b10e6b0842..dc094726af 100644 --- a/compiler/tests/group/mod.rs +++ b/compiler/tests/group/mod.rs @@ -1,5 +1,6 @@ use crate::{ assert_satisfied, + expect_compiler_error, expect_synthesis_error, field::field_to_decimal_string, generate_main_input, @@ -66,7 +67,7 @@ fn test_input() { let program = parse_program_with_input(program_bytes, input_bytes_fail).unwrap(); - expect_synthesis_error(program); + expect_compiler_error(program); } #[test] @@ -154,7 +155,7 @@ fn test_sub() { } #[test] -fn test_assert_eq_pass() { +fn test_console_assert_pass() { let mut rng = XorShiftRng::seed_from_u64(1231275789u64); for _ in 0..10 { @@ -177,7 +178,7 @@ fn test_assert_eq_pass() { } #[test] -fn test_assert_eq_fail() { +fn test_console_assert_fail() { let mut rng = XorShiftRng::seed_from_u64(1231275789u64); for _ in 0..10 { @@ -201,12 +202,11 @@ fn test_assert_eq_fail() { program.set_main_input(main_input); - expect_synthesis_error(program); + expect_compiler_error(program); } } #[test] -#[ignore] fn test_eq() { let mut rng = XorShiftRng::seed_from_u64(1231275789u64); diff --git a/compiler/tests/group/negate.leo b/compiler/tests/group/negate.leo index bdb93ce93f..506d8d73ce 100644 --- a/compiler/tests/group/negate.leo +++ b/compiler/tests/group/negate.leo @@ -1,3 +1,3 @@ function main(a: group, b: group) { - assert_eq!(-a, b); + console.assert(-a == b); } \ No newline at end of file diff --git a/compiler/tests/group/sub.leo b/compiler/tests/group/sub.leo index 982a0ed1f0..dfe82d8e31 100644 --- a/compiler/tests/group/sub.leo +++ b/compiler/tests/group/sub.leo @@ -1,3 +1,3 @@ function main(a: group, b: group, c: group) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/group/ternary.leo b/compiler/tests/group/ternary.leo index fc2dd439c1..b213bb1419 100644 --- a/compiler/tests/group/ternary.leo +++ b/compiler/tests/group/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: group, b: group, c: group) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/import/alias.leo b/compiler/tests/import/alias.leo index 576e5d5acb..96c65282ef 100644 --- a/compiler/tests/import/alias.leo +++ b/compiler/tests/import/alias.leo @@ -1,5 +1,5 @@ import test_import.foo as bar; function main() { - assert_eq!(bar(), 1u32); + console.assert(bar() == 1u32); } \ No newline at end of file diff --git a/compiler/tests/import/basic.leo b/compiler/tests/import/basic.leo index 03f7d892fe..53d243efaa 100644 --- a/compiler/tests/import/basic.leo +++ b/compiler/tests/import/basic.leo @@ -1,5 +1,5 @@ import test-import.foo; function main() { - assert_eq!(foo(), 1u32); + console.assert(foo() == 1u32); } \ No newline at end of file diff --git a/compiler/tests/import/many_import.leo b/compiler/tests/import/many_import.leo index a699229614..339700fd68 100644 --- a/compiler/tests/import/many_import.leo +++ b/compiler/tests/import/many_import.leo @@ -21,5 +21,5 @@ function main() { const car = Car { c: 1u32 }; - assert_eq!(car.c, 1u32); + console.assert(car.c == 1u32); } \ No newline at end of file diff --git a/compiler/tests/import/many_import_star.leo b/compiler/tests/import/many_import_star.leo index f27d08f991..575487a929 100644 --- a/compiler/tests/import/many_import_star.leo +++ b/compiler/tests/import/many_import_star.leo @@ -15,5 +15,5 @@ function main() { const car = Car { c: 1u32 }; - assert_eq!(car.c, 1u32); + console.assert(car.c == 1u32); } \ No newline at end of file diff --git a/compiler/tests/import/multiple.leo b/compiler/tests/import/multiple.leo index 0854d6e1c8..5c89aaee0c 100644 --- a/compiler/tests/import/multiple.leo +++ b/compiler/tests/import/multiple.leo @@ -6,5 +6,5 @@ import test-import.( function main() { let a = Point { x: 1u32, y: 0u32 }; - assert_eq!(a.x, 1u32); + console.assert(a.x == 1u32); } \ No newline at end of file diff --git a/compiler/tests/import/star.leo b/compiler/tests/import/star.leo index 4e546af535..9cd817686f 100644 --- a/compiler/tests/import/star.leo +++ b/compiler/tests/import/star.leo @@ -3,5 +3,5 @@ import test-import.*; function main() { let a = Point { x: 1u32, y: 0u32 }; - assert_eq!(foo(), 1u32); + console.assert(foo() == 1u32); } \ No newline at end of file diff --git a/compiler/tests/input_files/program_input/main.leo b/compiler/tests/input_files/program_input/main.leo index 8a8ab02f28..ba6be77256 100644 --- a/compiler/tests/input_files/program_input/main.leo +++ b/compiler/tests/input_files/program_input/main.leo @@ -1,3 +1,3 @@ function main(a: bool) { - assert_eq!(a, true); + console.assert(a == true); } \ No newline at end of file diff --git a/compiler/tests/input_files/program_input/main_multiple.leo b/compiler/tests/input_files/program_input/main_multiple.leo index 49ad704a2f..eb5ef8d1f6 100644 --- a/compiler/tests/input_files/program_input/main_multiple.leo +++ b/compiler/tests/input_files/program_input/main_multiple.leo @@ -1,4 +1,4 @@ function main(a: bool, b: bool) { - assert_eq!(a, true); - assert_eq!(b, false); + console.assert(a == true); + console.assert(b == false); } \ No newline at end of file diff --git a/compiler/tests/input_files/program_input_and_program_state/access.leo b/compiler/tests/input_files/program_input_and_program_state/access.leo index 9a280f9a76..e5610aeb7a 100644 --- a/compiler/tests/input_files/program_input_and_program_state/access.leo +++ b/compiler/tests/input_files/program_input_and_program_state/access.leo @@ -1,11 +1,11 @@ function main(input, data: u8[32]) { - assert_eq!(input.registers.value_balance, 0u64); + console.assert(input.registers.value_balance == 0u64); - assert_eq!(input.state.leaf_index, 0u32); + console.assert(input.state.leaf_index == 0u32); - assert_eq!(input.record.value, 5u64); + console.assert(input.record.value == 5u64); - assert_eq!(input.state_leaf.network_id, 0u8); + console.assert(input.state_leaf.network_id == 0u8); - assert_eq!(data, [0u8; 32]); + console.assert(data == [0u8; 32]); } \ No newline at end of file diff --git a/compiler/tests/input_files/program_state/access_all.leo b/compiler/tests/input_files/program_state/access_all.leo index ea6d5d6743..4e7cba5776 100644 --- a/compiler/tests/input_files/program_state/access_all.leo +++ b/compiler/tests/input_files/program_state/access_all.leo @@ -1,8 +1,8 @@ function main(input) { - assert_eq!(input.state.root, [0u8; 32]); + console.assert(input.state.root == [0u8; 32]); let expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - assert_eq!(input.record.owner, expected); + //console.assert(input.record.owner, expected); - assert_eq!(input.state_leaf.network_id, 0u8); + console.assert(input.state_leaf.network_id == 0u8); } \ No newline at end of file diff --git a/compiler/tests/input_files/program_state/access_state.leo b/compiler/tests/input_files/program_state/access_state.leo index c9cfdc22b2..0e014aec54 100644 --- a/compiler/tests/input_files/program_state/access_state.leo +++ b/compiler/tests/input_files/program_state/access_state.leo @@ -1,3 +1,3 @@ function main(input) { - assert_eq!(input.state.root, [0u8; 32]); + console.assert(input.state.root == [0u8; 32]); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/add.leo b/compiler/tests/integers/i128/add.leo index 868354c66a..e35648f545 100644 --- a/compiler/tests/integers/i128/add.leo +++ b/compiler/tests/integers/i128/add.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: i128) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/assert_eq.leo b/compiler/tests/integers/i128/console_assert.leo similarity index 55% rename from compiler/tests/integers/i128/assert_eq.leo rename to compiler/tests/integers/i128/console_assert.leo index a6dc495a84..c89021f609 100644 --- a/compiler/tests/integers/i128/assert_eq.leo +++ b/compiler/tests/integers/i128/console_assert.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/div.leo b/compiler/tests/integers/i128/div.leo index 3674db9571..ffaeae19a8 100644 --- a/compiler/tests/integers/i128/div.leo +++ b/compiler/tests/integers/i128/div.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: i128) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/eq.leo b/compiler/tests/integers/i128/eq.leo index c1662f7ef9..f4beddc8fc 100644 --- a/compiler/tests/integers/i128/eq.leo +++ b/compiler/tests/integers/i128/eq.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/ge.leo b/compiler/tests/integers/i128/ge.leo index f9b17623a9..1fbbd68073 100644 --- a/compiler/tests/integers/i128/ge.leo +++ b/compiler/tests/integers/i128/ge.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/gt.leo b/compiler/tests/integers/i128/gt.leo index 4c45bf6605..27849afbe8 100644 --- a/compiler/tests/integers/i128/gt.leo +++ b/compiler/tests/integers/i128/gt.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/input.leo b/compiler/tests/integers/i128/input.leo index a6dc495a84..c89021f609 100644 --- a/compiler/tests/integers/i128/input.leo +++ b/compiler/tests/integers/i128/input.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/le.leo b/compiler/tests/integers/i128/le.leo index 2f9d100793..ea0c3c9e1d 100644 --- a/compiler/tests/integers/i128/le.leo +++ b/compiler/tests/integers/i128/le.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/lt.leo b/compiler/tests/integers/i128/lt.leo index 766024aaac..bde4def85c 100644 --- a/compiler/tests/integers/i128/lt.leo +++ b/compiler/tests/integers/i128/lt.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/mod.rs b/compiler/tests/integers/i128/mod.rs index 0c3574755d..e3681b5c0b 100644 --- a/compiler/tests/integers/i128/mod.rs +++ b/compiler/tests/integers/i128/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_computation_error, expect_parsing_error, IntegerTester}, parse_program, @@ -108,7 +108,7 @@ fn test_i128_lt() { #[test] fn test_i128_assert_eq() { - TestI128::test_assert_eq(); + TestI128::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/i128/mul.leo b/compiler/tests/integers/i128/mul.leo index f03ca57dd1..25b902d53c 100644 --- a/compiler/tests/integers/i128/mul.leo +++ b/compiler/tests/integers/i128/mul.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: i128) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/ne.leo b/compiler/tests/integers/i128/ne.leo index b97b3c2dbe..dae148b49c 100644 --- a/compiler/tests/integers/i128/ne.leo +++ b/compiler/tests/integers/i128/ne.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/negate.leo b/compiler/tests/integers/i128/negate.leo index a55ad8711d..437ee06390 100644 --- a/compiler/tests/integers/i128/negate.leo +++ b/compiler/tests/integers/i128/negate.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128) { - assert_eq!(-a, b); + console.assert(-a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/negate_zero.leo b/compiler/tests/integers/i128/negate_zero.leo index c216f1d9d8..9fb0c11afe 100644 --- a/compiler/tests/integers/i128/negate_zero.leo +++ b/compiler/tests/integers/i128/negate_zero.leo @@ -1,5 +1,5 @@ function main() { let a = 0i128; - assert_eq!(-a, 0i128); + console.assert(-a == 0i128); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/pow.leo b/compiler/tests/integers/i128/pow.leo index dde3d48fe7..05536aad51 100644 --- a/compiler/tests/integers/i128/pow.leo +++ b/compiler/tests/integers/i128/pow.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: i128) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/sub.leo b/compiler/tests/integers/i128/sub.leo index bb473336c7..3a723eec49 100644 --- a/compiler/tests/integers/i128/sub.leo +++ b/compiler/tests/integers/i128/sub.leo @@ -1,3 +1,3 @@ function main(a: i128, b: i128, c: i128) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i128/ternary.leo b/compiler/tests/integers/i128/ternary.leo index a0e207d69b..5c2f199499 100644 --- a/compiler/tests/integers/i128/ternary.leo +++ b/compiler/tests/integers/i128/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: i128, b: i128, c: i128) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/add.leo b/compiler/tests/integers/i16/add.leo index ac0bfd8127..556ae65c3a 100644 --- a/compiler/tests/integers/i16/add.leo +++ b/compiler/tests/integers/i16/add.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: i16) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/assert_eq.leo b/compiler/tests/integers/i16/console_assert.leo similarity index 54% rename from compiler/tests/integers/i16/assert_eq.leo rename to compiler/tests/integers/i16/console_assert.leo index 4bc5fffcad..3afb25b207 100644 --- a/compiler/tests/integers/i16/assert_eq.leo +++ b/compiler/tests/integers/i16/console_assert.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/div.leo b/compiler/tests/integers/i16/div.leo index 7facede4fb..6d0c8f4614 100644 --- a/compiler/tests/integers/i16/div.leo +++ b/compiler/tests/integers/i16/div.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: i16) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/eq.leo b/compiler/tests/integers/i16/eq.leo index 7cdea269f3..338e3e50f6 100644 --- a/compiler/tests/integers/i16/eq.leo +++ b/compiler/tests/integers/i16/eq.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/ge.leo b/compiler/tests/integers/i16/ge.leo index b4e27b787b..68a4d40bf8 100644 --- a/compiler/tests/integers/i16/ge.leo +++ b/compiler/tests/integers/i16/ge.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/gt.leo b/compiler/tests/integers/i16/gt.leo index 2132a8aa6b..75d9bfb612 100644 --- a/compiler/tests/integers/i16/gt.leo +++ b/compiler/tests/integers/i16/gt.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/input.leo b/compiler/tests/integers/i16/input.leo index 4bc5fffcad..3afb25b207 100644 --- a/compiler/tests/integers/i16/input.leo +++ b/compiler/tests/integers/i16/input.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/le.leo b/compiler/tests/integers/i16/le.leo index e33b3212f1..ff112c7fbc 100644 --- a/compiler/tests/integers/i16/le.leo +++ b/compiler/tests/integers/i16/le.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/lt.leo b/compiler/tests/integers/i16/lt.leo index 2a93c04ae3..46c57aabe6 100644 --- a/compiler/tests/integers/i16/lt.leo +++ b/compiler/tests/integers/i16/lt.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/mod.rs b/compiler/tests/integers/i16/mod.rs index 7f419c37c6..82a755bc80 100644 --- a/compiler/tests/integers/i16/mod.rs +++ b/compiler/tests/integers/i16/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_computation_error, expect_parsing_error, IntegerTester}, parse_program, @@ -106,8 +106,8 @@ fn test_i16_lt() { } #[test] -fn test_i16_assert_eq() { - TestI16::test_assert_eq(); +fn test_i16_console_assert() { + TestI16::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/i16/mul.leo b/compiler/tests/integers/i16/mul.leo index 314381d199..6fd19b703a 100644 --- a/compiler/tests/integers/i16/mul.leo +++ b/compiler/tests/integers/i16/mul.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: i16) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/ne.leo b/compiler/tests/integers/i16/ne.leo index ead2f5f3fe..f0a9472678 100644 --- a/compiler/tests/integers/i16/ne.leo +++ b/compiler/tests/integers/i16/ne.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/negate.leo b/compiler/tests/integers/i16/negate.leo index 19046f9cb9..1d2644dce7 100644 --- a/compiler/tests/integers/i16/negate.leo +++ b/compiler/tests/integers/i16/negate.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16) { - assert_eq!(-a, b); + console.assert(-a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/negate_zero.leo b/compiler/tests/integers/i16/negate_zero.leo index 3edc84307b..46340c3dc5 100644 --- a/compiler/tests/integers/i16/negate_zero.leo +++ b/compiler/tests/integers/i16/negate_zero.leo @@ -1,5 +1,5 @@ function main() { let a = 0i16; - assert_eq!(-a, 0i16); + console.assert(-a == 0i16); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/pow.leo b/compiler/tests/integers/i16/pow.leo index 22bd4baa5d..769d2d2fbb 100644 --- a/compiler/tests/integers/i16/pow.leo +++ b/compiler/tests/integers/i16/pow.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: i16) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/sub.leo b/compiler/tests/integers/i16/sub.leo index ef1143d3f5..e935935187 100644 --- a/compiler/tests/integers/i16/sub.leo +++ b/compiler/tests/integers/i16/sub.leo @@ -1,3 +1,3 @@ function main(a: i16, b: i16, c: i16) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i16/ternary.leo b/compiler/tests/integers/i16/ternary.leo index 0ef5670781..ccf29bfd50 100644 --- a/compiler/tests/integers/i16/ternary.leo +++ b/compiler/tests/integers/i16/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: i16, b: i16, c: i16) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/add.leo b/compiler/tests/integers/i32/add.leo index d670593866..3d8fb1b1d2 100644 --- a/compiler/tests/integers/i32/add.leo +++ b/compiler/tests/integers/i32/add.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: i32) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/assert_eq.leo b/compiler/tests/integers/i32/console_assert.leo similarity index 54% rename from compiler/tests/integers/i32/assert_eq.leo rename to compiler/tests/integers/i32/console_assert.leo index 326cca12b6..a2d6980e9a 100644 --- a/compiler/tests/integers/i32/assert_eq.leo +++ b/compiler/tests/integers/i32/console_assert.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/div.leo b/compiler/tests/integers/i32/div.leo index c183f43ea0..3189a354f0 100644 --- a/compiler/tests/integers/i32/div.leo +++ b/compiler/tests/integers/i32/div.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: i32) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/eq.leo b/compiler/tests/integers/i32/eq.leo index 09a3c69f73..bac7af0be0 100644 --- a/compiler/tests/integers/i32/eq.leo +++ b/compiler/tests/integers/i32/eq.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/ge.leo b/compiler/tests/integers/i32/ge.leo index 99ca610acd..362521fc82 100644 --- a/compiler/tests/integers/i32/ge.leo +++ b/compiler/tests/integers/i32/ge.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/gt.leo b/compiler/tests/integers/i32/gt.leo index be6645354d..63ddcaa85c 100644 --- a/compiler/tests/integers/i32/gt.leo +++ b/compiler/tests/integers/i32/gt.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/input.leo b/compiler/tests/integers/i32/input.leo index 326cca12b6..a2d6980e9a 100644 --- a/compiler/tests/integers/i32/input.leo +++ b/compiler/tests/integers/i32/input.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/le.leo b/compiler/tests/integers/i32/le.leo index 37682aeda2..948c66b1fc 100644 --- a/compiler/tests/integers/i32/le.leo +++ b/compiler/tests/integers/i32/le.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/lt.leo b/compiler/tests/integers/i32/lt.leo index 90965ae47a..72a8fb0d53 100644 --- a/compiler/tests/integers/i32/lt.leo +++ b/compiler/tests/integers/i32/lt.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/mod.rs b/compiler/tests/integers/i32/mod.rs index 96c0e4abf9..69ad2070ae 100644 --- a/compiler/tests/integers/i32/mod.rs +++ b/compiler/tests/integers/i32/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_computation_error, expect_parsing_error, IntegerTester}, parse_program, @@ -106,8 +106,8 @@ fn test_i32_lt() { } #[test] -fn test_i32_assert_eq() { - TestI32::test_assert_eq(); +fn test_i32_console_assert() { + TestI32::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/i32/mul.leo b/compiler/tests/integers/i32/mul.leo index 029aa60758..50ba5b4128 100644 --- a/compiler/tests/integers/i32/mul.leo +++ b/compiler/tests/integers/i32/mul.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: i32) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/ne.leo b/compiler/tests/integers/i32/ne.leo index 6b797872d7..dcc1a185d1 100644 --- a/compiler/tests/integers/i32/ne.leo +++ b/compiler/tests/integers/i32/ne.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/negate.leo b/compiler/tests/integers/i32/negate.leo index 60524c24f9..eef94c934f 100644 --- a/compiler/tests/integers/i32/negate.leo +++ b/compiler/tests/integers/i32/negate.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32) { - assert_eq!(-a, b); + console.assert(-a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/negate_zero.leo b/compiler/tests/integers/i32/negate_zero.leo index e606ae5994..5533f575a6 100644 --- a/compiler/tests/integers/i32/negate_zero.leo +++ b/compiler/tests/integers/i32/negate_zero.leo @@ -1,5 +1,5 @@ function main() { let a = 0i32; - assert_eq!(-a, 0i32); + console.assert(-a == 0i32); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/pow.leo b/compiler/tests/integers/i32/pow.leo index 65a840cf26..ebb131e30b 100644 --- a/compiler/tests/integers/i32/pow.leo +++ b/compiler/tests/integers/i32/pow.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: i32) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/sub.leo b/compiler/tests/integers/i32/sub.leo index 03179a547d..1f054a5ddf 100644 --- a/compiler/tests/integers/i32/sub.leo +++ b/compiler/tests/integers/i32/sub.leo @@ -1,3 +1,3 @@ function main(a: i32, b: i32, c: i32) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i32/ternary.leo b/compiler/tests/integers/i32/ternary.leo index 211065cea2..3066547ae3 100644 --- a/compiler/tests/integers/i32/ternary.leo +++ b/compiler/tests/integers/i32/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: i32, b: i32, c: i32) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/add.leo b/compiler/tests/integers/i64/add.leo index edd5137eae..aefdbb178f 100644 --- a/compiler/tests/integers/i64/add.leo +++ b/compiler/tests/integers/i64/add.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: i64) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/assert_eq.leo b/compiler/tests/integers/i64/console_assert.leo similarity index 54% rename from compiler/tests/integers/i64/assert_eq.leo rename to compiler/tests/integers/i64/console_assert.leo index a9e7b44750..ab9a5d6e91 100644 --- a/compiler/tests/integers/i64/assert_eq.leo +++ b/compiler/tests/integers/i64/console_assert.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/div.leo b/compiler/tests/integers/i64/div.leo index 5fd9b5929e..142e4ab801 100644 --- a/compiler/tests/integers/i64/div.leo +++ b/compiler/tests/integers/i64/div.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: i64) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/eq.leo b/compiler/tests/integers/i64/eq.leo index 736b94efd2..86a234c834 100644 --- a/compiler/tests/integers/i64/eq.leo +++ b/compiler/tests/integers/i64/eq.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/ge.leo b/compiler/tests/integers/i64/ge.leo index 00ea4e716b..e7b453c5dc 100644 --- a/compiler/tests/integers/i64/ge.leo +++ b/compiler/tests/integers/i64/ge.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/gt.leo b/compiler/tests/integers/i64/gt.leo index c39799fb2c..9709bad012 100644 --- a/compiler/tests/integers/i64/gt.leo +++ b/compiler/tests/integers/i64/gt.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/input.leo b/compiler/tests/integers/i64/input.leo index a9e7b44750..ab9a5d6e91 100644 --- a/compiler/tests/integers/i64/input.leo +++ b/compiler/tests/integers/i64/input.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/le.leo b/compiler/tests/integers/i64/le.leo index e8b1f47478..3e2cfcb711 100644 --- a/compiler/tests/integers/i64/le.leo +++ b/compiler/tests/integers/i64/le.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/lt.leo b/compiler/tests/integers/i64/lt.leo index a908b8b0f7..ef4e38eb76 100644 --- a/compiler/tests/integers/i64/lt.leo +++ b/compiler/tests/integers/i64/lt.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/mod.rs b/compiler/tests/integers/i64/mod.rs index 8f18f85c09..2d7d919698 100644 --- a/compiler/tests/integers/i64/mod.rs +++ b/compiler/tests/integers/i64/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_computation_error, expect_parsing_error, IntegerTester}, parse_program, @@ -107,8 +107,8 @@ fn test_i64_lt() { } #[test] -fn test_i64_assert_eq() { - TestI64::test_assert_eq(); +fn test_i64_console_assert() { + TestI64::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/i64/mul.leo b/compiler/tests/integers/i64/mul.leo index cbff5a9cc8..a3b8bd1da5 100644 --- a/compiler/tests/integers/i64/mul.leo +++ b/compiler/tests/integers/i64/mul.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: i64) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/ne.leo b/compiler/tests/integers/i64/ne.leo index e45941e8cc..a2642bb479 100644 --- a/compiler/tests/integers/i64/ne.leo +++ b/compiler/tests/integers/i64/ne.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/negate.leo b/compiler/tests/integers/i64/negate.leo index 036967943e..fe0cdc4d97 100644 --- a/compiler/tests/integers/i64/negate.leo +++ b/compiler/tests/integers/i64/negate.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64) { - assert_eq!(-a, b); + console.assert(-a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/negate_zero.leo b/compiler/tests/integers/i64/negate_zero.leo index 947aa924d8..6badfe4dc7 100644 --- a/compiler/tests/integers/i64/negate_zero.leo +++ b/compiler/tests/integers/i64/negate_zero.leo @@ -1,5 +1,5 @@ function main() { let a = 0i64; - assert_eq!(-a, 0i64); + console.assert(-a == 0i64); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/pow.leo b/compiler/tests/integers/i64/pow.leo index 99e71b1968..dca2dace74 100644 --- a/compiler/tests/integers/i64/pow.leo +++ b/compiler/tests/integers/i64/pow.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: i64) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/sub.leo b/compiler/tests/integers/i64/sub.leo index 98af2e973a..4d335e504b 100644 --- a/compiler/tests/integers/i64/sub.leo +++ b/compiler/tests/integers/i64/sub.leo @@ -1,3 +1,3 @@ function main(a: i64, b: i64, c: i64) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i64/ternary.leo b/compiler/tests/integers/i64/ternary.leo index 049e1d8d4e..811c759bdf 100644 --- a/compiler/tests/integers/i64/ternary.leo +++ b/compiler/tests/integers/i64/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: i64, b: i64, c: i64) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/add.leo b/compiler/tests/integers/i8/add.leo index 054c46374a..dd71bc7f53 100644 --- a/compiler/tests/integers/i8/add.leo +++ b/compiler/tests/integers/i8/add.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: i8) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/assert_eq.leo b/compiler/tests/integers/i8/console_assert.leo similarity index 52% rename from compiler/tests/integers/i8/assert_eq.leo rename to compiler/tests/integers/i8/console_assert.leo index c397ca8c07..1fc09cb57d 100644 --- a/compiler/tests/integers/i8/assert_eq.leo +++ b/compiler/tests/integers/i8/console_assert.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/div.leo b/compiler/tests/integers/i8/div.leo index 02cbcb6ee8..a80d8e6319 100644 --- a/compiler/tests/integers/i8/div.leo +++ b/compiler/tests/integers/i8/div.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: i8) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/eq.leo b/compiler/tests/integers/i8/eq.leo index 6dee94580b..130cc64b89 100644 --- a/compiler/tests/integers/i8/eq.leo +++ b/compiler/tests/integers/i8/eq.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/ge.leo b/compiler/tests/integers/i8/ge.leo index df95a325bd..3084692c0c 100644 --- a/compiler/tests/integers/i8/ge.leo +++ b/compiler/tests/integers/i8/ge.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/gt.leo b/compiler/tests/integers/i8/gt.leo index 70c59e398c..d3913b8b24 100644 --- a/compiler/tests/integers/i8/gt.leo +++ b/compiler/tests/integers/i8/gt.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/input.leo b/compiler/tests/integers/i8/input.leo index c397ca8c07..1fc09cb57d 100644 --- a/compiler/tests/integers/i8/input.leo +++ b/compiler/tests/integers/i8/input.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/le.leo b/compiler/tests/integers/i8/le.leo index dba7694960..92e011f206 100644 --- a/compiler/tests/integers/i8/le.leo +++ b/compiler/tests/integers/i8/le.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/lt.leo b/compiler/tests/integers/i8/lt.leo index 0385ce1c49..eb34b7148e 100644 --- a/compiler/tests/integers/i8/lt.leo +++ b/compiler/tests/integers/i8/lt.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/mod.rs b/compiler/tests/integers/i8/mod.rs index 37dd327545..382987a690 100644 --- a/compiler/tests/integers/i8/mod.rs +++ b/compiler/tests/integers/i8/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_computation_error, expect_parsing_error, IntegerTester}, parse_program, @@ -106,8 +106,8 @@ fn test_i8_lt() { } #[test] -fn test_i8_assert_eq() { - TestI8::test_assert_eq(); +fn test_i8_console_assert() { + TestI8::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/i8/mul.leo b/compiler/tests/integers/i8/mul.leo index 3542bc092c..34726fff92 100644 --- a/compiler/tests/integers/i8/mul.leo +++ b/compiler/tests/integers/i8/mul.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: i8) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/ne.leo b/compiler/tests/integers/i8/ne.leo index 9bbb8b3cb1..e5028d404a 100644 --- a/compiler/tests/integers/i8/ne.leo +++ b/compiler/tests/integers/i8/ne.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/negate.leo b/compiler/tests/integers/i8/negate.leo index 039067b6e4..2a2266bc56 100644 --- a/compiler/tests/integers/i8/negate.leo +++ b/compiler/tests/integers/i8/negate.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8) { - assert_eq!(-a, b); + console.assert(-a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/negate_zero.leo b/compiler/tests/integers/i8/negate_zero.leo index 5c435bcd92..21fbbab675 100644 --- a/compiler/tests/integers/i8/negate_zero.leo +++ b/compiler/tests/integers/i8/negate_zero.leo @@ -1,5 +1,5 @@ function main() { let a = 0i8; - assert_eq!(-a, 0i8); + console.assert(-a == 0i8); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/pow.leo b/compiler/tests/integers/i8/pow.leo index c66bb67b7a..18aeb44b46 100644 --- a/compiler/tests/integers/i8/pow.leo +++ b/compiler/tests/integers/i8/pow.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: i8) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/sub.leo b/compiler/tests/integers/i8/sub.leo index b4a4ad01d9..a795bed153 100644 --- a/compiler/tests/integers/i8/sub.leo +++ b/compiler/tests/integers/i8/sub.leo @@ -1,3 +1,3 @@ function main(a: i8, b: i8, c: i8) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/i8/ternary.leo b/compiler/tests/integers/i8/ternary.leo index 1de75a7b99..de797c6e3b 100644 --- a/compiler/tests/integers/i8/ternary.leo +++ b/compiler/tests/integers/i8/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: i8, b: i8, c: i8) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/int_macro.rs b/compiler/tests/integers/int_macro.rs index 6ad1dd3b56..b7162e500f 100644 --- a/compiler/tests/integers/int_macro.rs +++ b/compiler/tests/integers/int_macro.rs @@ -447,12 +447,12 @@ macro_rules! test_int { } } - fn test_assert_eq() { + fn test_console_assert() { for _ in 0..10 { let a: $type_ = rand::random(); // test equal - let bytes = include_bytes!("assert_eq.leo"); + let bytes = include_bytes!("console_assert.leo"); let mut program = parse_program(bytes).unwrap(); let main_input = generate_main_input(vec![ @@ -480,7 +480,7 @@ macro_rules! test_int { program.set_main_input(main_input); - expect_synthesis_error(program); + expect_compiler_error(program); } } diff --git a/compiler/tests/integers/integer_tester.rs b/compiler/tests/integers/integer_tester.rs index 8539798ef2..d8684236b4 100644 --- a/compiler/tests/integers/integer_tester.rs +++ b/compiler/tests/integers/integer_tester.rs @@ -48,7 +48,7 @@ pub trait IntegerTester { fn test_lt(); /// Test assert equals constraint keyword - fn test_assert_eq(); + fn test_console_assert(); /// Test ternary if bool ? num_1 : num_2; fn test_ternary(); diff --git a/compiler/tests/integers/mod.rs b/compiler/tests/integers/mod.rs index 5b76da6e08..2abbeacf2e 100644 --- a/compiler/tests/integers/mod.rs +++ b/compiler/tests/integers/mod.rs @@ -8,7 +8,7 @@ pub mod integer_tester; pub use self::integer_tester::*; // must be below macro definitions! -// pub mod u128; +pub mod u128; pub mod u16; pub mod u32; pub mod u64; diff --git a/compiler/tests/integers/u128/add.leo b/compiler/tests/integers/u128/add.leo index d03c236d3e..6b32042fd5 100644 --- a/compiler/tests/integers/u128/add.leo +++ b/compiler/tests/integers/u128/add.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: u128) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/assert_eq.leo b/compiler/tests/integers/u128/console_assert.leo similarity index 55% rename from compiler/tests/integers/u128/assert_eq.leo rename to compiler/tests/integers/u128/console_assert.leo index 9ee2ff0f12..adab295385 100644 --- a/compiler/tests/integers/u128/assert_eq.leo +++ b/compiler/tests/integers/u128/console_assert.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/div.leo b/compiler/tests/integers/u128/div.leo index 04e75f6cff..0d62054eca 100644 --- a/compiler/tests/integers/u128/div.leo +++ b/compiler/tests/integers/u128/div.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: u128) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/eq.leo b/compiler/tests/integers/u128/eq.leo index 52821882d0..2c2acd923a 100644 --- a/compiler/tests/integers/u128/eq.leo +++ b/compiler/tests/integers/u128/eq.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/ge.leo b/compiler/tests/integers/u128/ge.leo index 8e18e647a8..bff7cd321b 100644 --- a/compiler/tests/integers/u128/ge.leo +++ b/compiler/tests/integers/u128/ge.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/gt.leo b/compiler/tests/integers/u128/gt.leo index 6c2208917c..e8aec0faf2 100644 --- a/compiler/tests/integers/u128/gt.leo +++ b/compiler/tests/integers/u128/gt.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/input.leo b/compiler/tests/integers/u128/input.leo index 9ee2ff0f12..adab295385 100644 --- a/compiler/tests/integers/u128/input.leo +++ b/compiler/tests/integers/u128/input.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/le.leo b/compiler/tests/integers/u128/le.leo index c2cd03db53..c9e4609136 100644 --- a/compiler/tests/integers/u128/le.leo +++ b/compiler/tests/integers/u128/le.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/lt.leo b/compiler/tests/integers/u128/lt.leo index af80c96c34..b37057c895 100644 --- a/compiler/tests/integers/u128/lt.leo +++ b/compiler/tests/integers/u128/lt.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/mod.rs b/compiler/tests/integers/u128/mod.rs index a0e79a6026..8c170ba00b 100644 --- a/compiler/tests/integers/u128/mod.rs +++ b/compiler/tests/integers/u128/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_parsing_error, IntegerTester}, parse_program, @@ -91,8 +91,8 @@ fn test_u128_lt() { } #[test] -fn test_u128_assert_eq() { - TestU128::test_assert_eq(); +fn test_u128_console_assert() { + TestU128::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/u128/mul.leo b/compiler/tests/integers/u128/mul.leo index eb22c254e3..c7fdc1530c 100644 --- a/compiler/tests/integers/u128/mul.leo +++ b/compiler/tests/integers/u128/mul.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: u128) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/ne.leo b/compiler/tests/integers/u128/ne.leo index 60c104d701..da3467d01e 100644 --- a/compiler/tests/integers/u128/ne.leo +++ b/compiler/tests/integers/u128/ne.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/pow.leo b/compiler/tests/integers/u128/pow.leo index 4d63290922..27614bfa56 100644 --- a/compiler/tests/integers/u128/pow.leo +++ b/compiler/tests/integers/u128/pow.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: u128) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/sub.leo b/compiler/tests/integers/u128/sub.leo index 14b9925cbe..2374413505 100644 --- a/compiler/tests/integers/u128/sub.leo +++ b/compiler/tests/integers/u128/sub.leo @@ -1,3 +1,3 @@ function main(a: u128, b: u128, c: u128) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u128/ternary.leo b/compiler/tests/integers/u128/ternary.leo index f604e6dcf6..48299fac66 100644 --- a/compiler/tests/integers/u128/ternary.leo +++ b/compiler/tests/integers/u128/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: u128, b: u128, c: u128) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/add.leo b/compiler/tests/integers/u16/add.leo index e693fb7075..f00701181b 100644 --- a/compiler/tests/integers/u16/add.leo +++ b/compiler/tests/integers/u16/add.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: u16) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/assert_eq.leo b/compiler/tests/integers/u16/console_assert.leo similarity index 54% rename from compiler/tests/integers/u16/assert_eq.leo rename to compiler/tests/integers/u16/console_assert.leo index 38f850139c..761f0639d0 100644 --- a/compiler/tests/integers/u16/assert_eq.leo +++ b/compiler/tests/integers/u16/console_assert.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/div.leo b/compiler/tests/integers/u16/div.leo index a136fd238e..f1dd3fa463 100644 --- a/compiler/tests/integers/u16/div.leo +++ b/compiler/tests/integers/u16/div.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: u16) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/eq.leo b/compiler/tests/integers/u16/eq.leo index d194b3a60c..a4b4e78b49 100644 --- a/compiler/tests/integers/u16/eq.leo +++ b/compiler/tests/integers/u16/eq.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/ge.leo b/compiler/tests/integers/u16/ge.leo index 91e03c4303..4b1da1b27b 100644 --- a/compiler/tests/integers/u16/ge.leo +++ b/compiler/tests/integers/u16/ge.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/gt.leo b/compiler/tests/integers/u16/gt.leo index 499d0296c3..2c5ffbe8eb 100644 --- a/compiler/tests/integers/u16/gt.leo +++ b/compiler/tests/integers/u16/gt.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/input.leo b/compiler/tests/integers/u16/input.leo index 38f850139c..761f0639d0 100644 --- a/compiler/tests/integers/u16/input.leo +++ b/compiler/tests/integers/u16/input.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/le.leo b/compiler/tests/integers/u16/le.leo index bcee775d58..49713482d0 100644 --- a/compiler/tests/integers/u16/le.leo +++ b/compiler/tests/integers/u16/le.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/lt.leo b/compiler/tests/integers/u16/lt.leo index 2fe4a8a37a..dae1951231 100644 --- a/compiler/tests/integers/u16/lt.leo +++ b/compiler/tests/integers/u16/lt.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/mod.rs b/compiler/tests/integers/u16/mod.rs index f321e5771a..8c60026d4c 100644 --- a/compiler/tests/integers/u16/mod.rs +++ b/compiler/tests/integers/u16/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_parsing_error, IntegerTester}, parse_program, @@ -91,8 +91,8 @@ fn test_u16_lt() { } #[test] -fn test_u16_assert_eq() { - TestU16::test_assert_eq(); +fn test_u16_console_assert() { + TestU16::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/u16/mul.leo b/compiler/tests/integers/u16/mul.leo index 87fa28c5d2..f2c6f0aac8 100644 --- a/compiler/tests/integers/u16/mul.leo +++ b/compiler/tests/integers/u16/mul.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: u16) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/ne.leo b/compiler/tests/integers/u16/ne.leo index 1509e0874e..e90a304cfe 100644 --- a/compiler/tests/integers/u16/ne.leo +++ b/compiler/tests/integers/u16/ne.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/pow.leo b/compiler/tests/integers/u16/pow.leo index 2fe42e8822..564c1c51fe 100644 --- a/compiler/tests/integers/u16/pow.leo +++ b/compiler/tests/integers/u16/pow.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: u16) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/sub.leo b/compiler/tests/integers/u16/sub.leo index 5f60b58a52..92aae9ac2c 100644 --- a/compiler/tests/integers/u16/sub.leo +++ b/compiler/tests/integers/u16/sub.leo @@ -1,3 +1,3 @@ function main(a: u16, b: u16, c: u16) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u16/ternary.leo b/compiler/tests/integers/u16/ternary.leo index 22f9f76e38..2e2752a130 100644 --- a/compiler/tests/integers/u16/ternary.leo +++ b/compiler/tests/integers/u16/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: u16, b: u16, c: u16) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/add.leo b/compiler/tests/integers/u32/add.leo index 6b1a19fb4e..6f6a2454b4 100644 --- a/compiler/tests/integers/u32/add.leo +++ b/compiler/tests/integers/u32/add.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: u32) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/assert_eq.leo b/compiler/tests/integers/u32/console_assert.leo similarity index 54% rename from compiler/tests/integers/u32/assert_eq.leo rename to compiler/tests/integers/u32/console_assert.leo index b95ae3bef0..32604eb3b8 100644 --- a/compiler/tests/integers/u32/assert_eq.leo +++ b/compiler/tests/integers/u32/console_assert.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/div.leo b/compiler/tests/integers/u32/div.leo index b9e9acea9d..ed689bd408 100644 --- a/compiler/tests/integers/u32/div.leo +++ b/compiler/tests/integers/u32/div.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: u32) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/eq.leo b/compiler/tests/integers/u32/eq.leo index 68f873f6e9..ca427b3c42 100644 --- a/compiler/tests/integers/u32/eq.leo +++ b/compiler/tests/integers/u32/eq.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/ge.leo b/compiler/tests/integers/u32/ge.leo index 99ba75da83..35c1c71829 100644 --- a/compiler/tests/integers/u32/ge.leo +++ b/compiler/tests/integers/u32/ge.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/gt.leo b/compiler/tests/integers/u32/gt.leo index aa5f66bf2c..f76df415c4 100644 --- a/compiler/tests/integers/u32/gt.leo +++ b/compiler/tests/integers/u32/gt.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/input.leo b/compiler/tests/integers/u32/input.leo index b95ae3bef0..32604eb3b8 100644 --- a/compiler/tests/integers/u32/input.leo +++ b/compiler/tests/integers/u32/input.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/le.leo b/compiler/tests/integers/u32/le.leo index 8d82db212d..9a802f896d 100644 --- a/compiler/tests/integers/u32/le.leo +++ b/compiler/tests/integers/u32/le.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/lt.leo b/compiler/tests/integers/u32/lt.leo index 6cd57df2c9..73e5654470 100644 --- a/compiler/tests/integers/u32/lt.leo +++ b/compiler/tests/integers/u32/lt.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/mod.rs b/compiler/tests/integers/u32/mod.rs index a7db6b97c2..781ea6fbc7 100644 --- a/compiler/tests/integers/u32/mod.rs +++ b/compiler/tests/integers/u32/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_parsing_error, IntegerTester}, parse_program, @@ -91,8 +91,8 @@ fn test_u32_lt() { } #[test] -fn test_u32_assert_eq() { - TestU32::test_assert_eq(); +fn test_u32_console_assert() { + TestU32::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/u32/mul.leo b/compiler/tests/integers/u32/mul.leo index e2120276e7..a77a85477b 100644 --- a/compiler/tests/integers/u32/mul.leo +++ b/compiler/tests/integers/u32/mul.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: u32) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/ne.leo b/compiler/tests/integers/u32/ne.leo index f75c0e97d3..00ee1a9989 100644 --- a/compiler/tests/integers/u32/ne.leo +++ b/compiler/tests/integers/u32/ne.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/pow.leo b/compiler/tests/integers/u32/pow.leo index dc598a4d0d..b82496ff77 100644 --- a/compiler/tests/integers/u32/pow.leo +++ b/compiler/tests/integers/u32/pow.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: u32) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/sub.leo b/compiler/tests/integers/u32/sub.leo index 38e12009a3..54480bd4bc 100644 --- a/compiler/tests/integers/u32/sub.leo +++ b/compiler/tests/integers/u32/sub.leo @@ -1,3 +1,3 @@ function main(a: u32, b: u32, c: u32) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u32/ternary.leo b/compiler/tests/integers/u32/ternary.leo index 72370f1367..fde04ac4b8 100644 --- a/compiler/tests/integers/u32/ternary.leo +++ b/compiler/tests/integers/u32/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: u32, b: u32, c: u32) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/add.leo b/compiler/tests/integers/u64/add.leo index eab76baebd..28abe51201 100644 --- a/compiler/tests/integers/u64/add.leo +++ b/compiler/tests/integers/u64/add.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: u64) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/assert_eq.leo b/compiler/tests/integers/u64/console_assert.leo similarity index 54% rename from compiler/tests/integers/u64/assert_eq.leo rename to compiler/tests/integers/u64/console_assert.leo index 5ea21a4097..ac1d6d40c3 100644 --- a/compiler/tests/integers/u64/assert_eq.leo +++ b/compiler/tests/integers/u64/console_assert.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/div.leo b/compiler/tests/integers/u64/div.leo index 4502cc7273..059da236bb 100644 --- a/compiler/tests/integers/u64/div.leo +++ b/compiler/tests/integers/u64/div.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: u64) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/eq.leo b/compiler/tests/integers/u64/eq.leo index afccdf875e..990b2dad2d 100644 --- a/compiler/tests/integers/u64/eq.leo +++ b/compiler/tests/integers/u64/eq.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/ge.leo b/compiler/tests/integers/u64/ge.leo index 000a59deca..46ba36ceff 100644 --- a/compiler/tests/integers/u64/ge.leo +++ b/compiler/tests/integers/u64/ge.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/gt.leo b/compiler/tests/integers/u64/gt.leo index 37629b508e..7d3032c7f5 100644 --- a/compiler/tests/integers/u64/gt.leo +++ b/compiler/tests/integers/u64/gt.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/input.leo b/compiler/tests/integers/u64/input.leo index 5ea21a4097..ac1d6d40c3 100644 --- a/compiler/tests/integers/u64/input.leo +++ b/compiler/tests/integers/u64/input.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/le.leo b/compiler/tests/integers/u64/le.leo index b27259d4ee..625b38d2d9 100644 --- a/compiler/tests/integers/u64/le.leo +++ b/compiler/tests/integers/u64/le.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/lt.leo b/compiler/tests/integers/u64/lt.leo index 3e95f330eb..ed379f7341 100644 --- a/compiler/tests/integers/u64/lt.leo +++ b/compiler/tests/integers/u64/lt.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/mod.rs b/compiler/tests/integers/u64/mod.rs index e58dd64693..afe83806e2 100644 --- a/compiler/tests/integers/u64/mod.rs +++ b/compiler/tests/integers/u64/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_parsing_error, IntegerTester}, parse_program, @@ -91,8 +91,8 @@ fn test_u64_lt() { } #[test] -fn test_u64_assert_eq() { - TestU64::test_assert_eq(); +fn test_u64_console_assert() { + TestU64::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/u64/mul.leo b/compiler/tests/integers/u64/mul.leo index 832142ffbf..2633e6780c 100644 --- a/compiler/tests/integers/u64/mul.leo +++ b/compiler/tests/integers/u64/mul.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: u64) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/ne.leo b/compiler/tests/integers/u64/ne.leo index b85cb73b34..e47acbb1de 100644 --- a/compiler/tests/integers/u64/ne.leo +++ b/compiler/tests/integers/u64/ne.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/pow.leo b/compiler/tests/integers/u64/pow.leo index 3fd7074871..64f0694ed1 100644 --- a/compiler/tests/integers/u64/pow.leo +++ b/compiler/tests/integers/u64/pow.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: u64) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/sub.leo b/compiler/tests/integers/u64/sub.leo index 820c264745..9961f0f7b7 100644 --- a/compiler/tests/integers/u64/sub.leo +++ b/compiler/tests/integers/u64/sub.leo @@ -1,3 +1,3 @@ function main(a: u64, b: u64, c: u64) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u64/ternary.leo b/compiler/tests/integers/u64/ternary.leo index 8d8e9bb312..315fd7400b 100644 --- a/compiler/tests/integers/u64/ternary.leo +++ b/compiler/tests/integers/u64/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: u64, b: u64, c: u64) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/add.leo b/compiler/tests/integers/u8/add.leo index df22ad8c05..1b40e304d2 100644 --- a/compiler/tests/integers/u8/add.leo +++ b/compiler/tests/integers/u8/add.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: u8) { - assert_eq!(a + b, c); + console.assert(a + b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/assert_eq.leo b/compiler/tests/integers/u8/console_assert.leo similarity index 52% rename from compiler/tests/integers/u8/assert_eq.leo rename to compiler/tests/integers/u8/console_assert.leo index c4ffe7b4a0..4d99dc106c 100644 --- a/compiler/tests/integers/u8/assert_eq.leo +++ b/compiler/tests/integers/u8/console_assert.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/div.leo b/compiler/tests/integers/u8/div.leo index e8b85479b1..945aa94c30 100644 --- a/compiler/tests/integers/u8/div.leo +++ b/compiler/tests/integers/u8/div.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: u8) { - assert_eq!(a / b, c); + console.assert(a / b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/eq.leo b/compiler/tests/integers/u8/eq.leo index 4421872b20..c2a487b0e7 100644 --- a/compiler/tests/integers/u8/eq.leo +++ b/compiler/tests/integers/u8/eq.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: bool) { - assert_eq!(a == b, c); + console.assert(a == b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/ge.leo b/compiler/tests/integers/u8/ge.leo index db539a77d3..d819422276 100644 --- a/compiler/tests/integers/u8/ge.leo +++ b/compiler/tests/integers/u8/ge.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: bool) { - assert_eq!(a >= b, c); + console.assert(a >= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/gt.leo b/compiler/tests/integers/u8/gt.leo index f26697c3ce..87843f575f 100644 --- a/compiler/tests/integers/u8/gt.leo +++ b/compiler/tests/integers/u8/gt.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: bool) { - assert_eq!(a > b, c); + console.assert(a > b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/input.leo b/compiler/tests/integers/u8/input.leo index c4ffe7b4a0..4d99dc106c 100644 --- a/compiler/tests/integers/u8/input.leo +++ b/compiler/tests/integers/u8/input.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8) { - assert_eq!(a, b); + console.assert(a == b); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/le.leo b/compiler/tests/integers/u8/le.leo index 09876d4175..2607b7f3d1 100644 --- a/compiler/tests/integers/u8/le.leo +++ b/compiler/tests/integers/u8/le.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: bool) { - assert_eq!(a <= b, c); + console.assert(a <= b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/lt.leo b/compiler/tests/integers/u8/lt.leo index 8cea3ccab8..7495d0fe37 100644 --- a/compiler/tests/integers/u8/lt.leo +++ b/compiler/tests/integers/u8/lt.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: bool) { - assert_eq!(a < b, c); + console.assert(a < b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/mod.rs b/compiler/tests/integers/u8/mod.rs index c13a63e29e..76b9284f1f 100644 --- a/compiler/tests/integers/u8/mod.rs +++ b/compiler/tests/integers/u8/mod.rs @@ -1,6 +1,6 @@ use crate::{ assert_satisfied, - expect_synthesis_error, + expect_compiler_error, generate_main_input, integers::{expect_parsing_error, IntegerTester}, parse_program, @@ -91,8 +91,8 @@ fn test_u8_lt() { } #[test] -fn test_u8_assert_eq() { - TestU8::test_assert_eq(); +fn test_u8_console_assert() { + TestU8::test_console_assert(); } #[test] diff --git a/compiler/tests/integers/u8/mul.leo b/compiler/tests/integers/u8/mul.leo index a5d6e7664c..11acf4688b 100644 --- a/compiler/tests/integers/u8/mul.leo +++ b/compiler/tests/integers/u8/mul.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: u8) { - assert_eq!(a * b, c); + console.assert(a * b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/ne.leo b/compiler/tests/integers/u8/ne.leo index 70864bd246..e75194a2f2 100644 --- a/compiler/tests/integers/u8/ne.leo +++ b/compiler/tests/integers/u8/ne.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: bool) { - assert_eq!(a != b, c); + console.assert(a != b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/pow.leo b/compiler/tests/integers/u8/pow.leo index 143106b1b4..928ab73b0d 100644 --- a/compiler/tests/integers/u8/pow.leo +++ b/compiler/tests/integers/u8/pow.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: u8) { - assert_eq!(a ** b, c); + console.assert(a ** b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/sub.leo b/compiler/tests/integers/u8/sub.leo index dedd23d2f7..1335409c29 100644 --- a/compiler/tests/integers/u8/sub.leo +++ b/compiler/tests/integers/u8/sub.leo @@ -1,3 +1,3 @@ function main(a: u8, b: u8, c: u8) { - assert_eq!(a - b, c); + console.assert(a - b == c); } \ No newline at end of file diff --git a/compiler/tests/integers/u8/ternary.leo b/compiler/tests/integers/u8/ternary.leo index 7ae0af35c1..ce868a5ec9 100644 --- a/compiler/tests/integers/u8/ternary.leo +++ b/compiler/tests/integers/u8/ternary.leo @@ -1,5 +1,5 @@ function main(s: bool, a: u8, b: u8, c: u8) { let r = if s ? a : b; - assert_eq!(r, c); + console.assert(r == c); } \ No newline at end of file diff --git a/compiler/tests/integers/uint_macro.rs b/compiler/tests/integers/uint_macro.rs index 3600372173..6357628646 100644 --- a/compiler/tests/integers/uint_macro.rs +++ b/compiler/tests/integers/uint_macro.rs @@ -385,12 +385,12 @@ macro_rules! test_uint { } } - fn test_assert_eq() { + fn test_console_assert() { for _ in 0..10 { let a: $type_ = rand::random(); // test equal - let bytes = include_bytes!("assert_eq.leo"); + let bytes = include_bytes!("console_assert.leo"); let mut program = parse_program(bytes).unwrap(); let main_input = generate_main_input(vec![ @@ -418,7 +418,7 @@ macro_rules! test_uint { program.set_main_input(main_input); - expect_synthesis_error(program); + expect_compiler_error(program); } } diff --git a/compiler/tests/mutability/circuit_mut.leo b/compiler/tests/mutability/circuit_mut.leo index cc3fbb2f9b..27bd6109b2 100644 --- a/compiler/tests/mutability/circuit_mut.leo +++ b/compiler/tests/mutability/circuit_mut.leo @@ -7,5 +7,5 @@ function main() { let mut a = Foo { x: 1 }; a.x = 0; - assert_eq!(a.x, 0u32); + console.assert(a.x == 0u32); } \ No newline at end of file diff --git a/compiler/tests/mutability/function_input_mut.leo b/compiler/tests/mutability/function_input_mut.leo index 631e2ff57e..2df24b227c 100644 --- a/compiler/tests/mutability/function_input_mut.leo +++ b/compiler/tests/mutability/function_input_mut.leo @@ -2,5 +2,5 @@ function main(mut a: bool) { a = true; - assert_eq!(a, true); + console.assert(a == true); } \ No newline at end of file diff --git a/compiler/tests/mutability/let_mut.leo b/compiler/tests/mutability/let_mut.leo index 756729cad5..5766d144d3 100644 --- a/compiler/tests/mutability/let_mut.leo +++ b/compiler/tests/mutability/let_mut.leo @@ -3,5 +3,5 @@ function main() { let mut a = 1u32; a = 0; - assert_eq!(a, 0u32); + console.assert(a == 0u32); } \ No newline at end of file diff --git a/compiler/tests/tuples/function_multiple.leo b/compiler/tests/tuples/function_multiple.leo index 12c2e0fb04..39848377c6 100644 --- a/compiler/tests/tuples/function_multiple.leo +++ b/compiler/tests/tuples/function_multiple.leo @@ -5,6 +5,6 @@ function foo() -> (bool, bool) { function main() { let (a, b) = foo(); - assert_eq!(a, true); - assert_eq!(b, false); + console.assert(a == true); + console.assert(b == false); } \ No newline at end of file diff --git a/compiler/tests/tuples/function_typed.leo b/compiler/tests/tuples/function_typed.leo index c874fd6485..8af2c907ca 100644 --- a/compiler/tests/tuples/function_typed.leo +++ b/compiler/tests/tuples/function_typed.leo @@ -5,6 +5,6 @@ function foo() -> (bool, bool) { function main() { let a: (bool, bool) = foo(); - assert_eq!(a.0, true); - assert_eq!(a.1, false); + console.assert(a.0 == true); + console.assert(a.1 == false); } \ No newline at end of file diff --git a/compiler/tests/tuples/multiple.leo b/compiler/tests/tuples/multiple.leo index b052ce0e66..b7627dad2a 100644 --- a/compiler/tests/tuples/multiple.leo +++ b/compiler/tests/tuples/multiple.leo @@ -1,6 +1,6 @@ function main() { let (a, b) = (true, false); - assert_eq!(a, true); - assert_eq!(b, false); + console.assert(a == true); + console.assert(b == false); } \ No newline at end of file diff --git a/compiler/tests/tuples/multiple_typed.leo b/compiler/tests/tuples/multiple_typed.leo index c39f026f20..29fc7ef877 100644 --- a/compiler/tests/tuples/multiple_typed.leo +++ b/compiler/tests/tuples/multiple_typed.leo @@ -1,6 +1,6 @@ function main() { let (a, b): (bool, bool) = (true, false); - assert_eq!(a, true); - assert_eq!(b, false); + console.assert(a == true); + console.assert(b == false); } \ No newline at end of file diff --git a/compiler/tests/tuples/nested_access.leo b/compiler/tests/tuples/nested_access.leo index 7633cbcd83..5edba64e24 100644 --- a/compiler/tests/tuples/nested_access.leo +++ b/compiler/tests/tuples/nested_access.leo @@ -2,7 +2,7 @@ function main() { let a = (true, false); let b = (true, a); - assert_eq!(b.0, true); - assert_eq!(b.1.0, true); - assert_eq!(b.1.1, false); + console.assert(b.0 == true); + console.assert(b.1.0 == true); + console.assert(b.1.1 == false); } \ No newline at end of file