From 534f36a077fdea32ac2f3e1a15fe81e578d44975 Mon Sep 17 00:00:00 2001 From: Protryon Date: Mon, 19 Apr 2021 18:08:14 -0700 Subject: [PATCH 01/26] compiler tests --- Cargo.lock | 5 + compiler/Cargo.toml | 11 + .../address/console_assert_fail.leo | 0 .../address/console_assert_pass.leo | 0 compiler/{tests => otests}/address/empty.leo | 0 compiler/{tests => otests}/address/equal.leo | 0 .../address/implicit_invalid.leo | 0 .../address/implicit_valid.leo | 0 compiler/{tests => otests}/address/input.leo | 0 .../address/invalid_length.leo | 0 .../address/invalid_prefix.leo | 0 compiler/{tests => otests}/address/mod.rs | 0 .../{tests => otests}/address/ternary.leo | 0 compiler/{tests => otests}/address/valid.leo | 0 .../{tests => otests}/array/initializer.leo | 0 .../array/initializer_fail.leo | 0 .../array/initializer_input.leo | 0 compiler/{tests => otests}/array/inline.leo | 0 .../array/input/initializer_fail.in | 0 .../array/input/inline_fail.leo | 0 .../array/input/input_nested_3x2.in | 0 .../array/input/input_nested_3x2_fail.in | 0 .../array/input/input_tuple_3x2.in | 0 .../array/input/input_tuple_3x2_fail.in | 0 .../array/input/registers_ones.in | 0 .../array/input/registers_zeros.in | 0 .../array/input/six_zeros.in | 0 .../array/input/three_ones.in | 0 .../input/type_nested_value_nested_3x2.in | 0 .../type_nested_value_nested_3x2_fail.in | 0 .../input/type_nested_value_nested_4x3x2.in | 0 .../type_nested_value_nested_4x3x2_fail.in | 0 .../input/type_nested_value_tuple_3x2.in | 0 .../input/type_nested_value_tuple_3x2_fail.in | 0 .../input/type_nested_value_tuple_4x3x2.in | 0 .../type_nested_value_tuple_4x3x2_fail.in | 0 .../input/type_tuple_value_nested_3x2.in | 0 .../input/type_tuple_value_nested_3x2_fail.in | 0 .../input/type_tuple_value_nested_4x3x2.in | 0 .../type_tuple_value_nested_4x3x2_fail.in | 0 .../array/input/type_tuple_value_tuple_3x2.in | 0 .../input/type_tuple_value_tuple_3x2_fail.in | 0 .../input/type_tuple_value_tuple_4x3x2.in | 0 .../type_tuple_value_tuple_4x3x2_fail.in | 0 .../array/input_nested_3x2.leo | 0 .../array/input_nested_3x2_fail.leo | 0 .../array/input_tuple_3x2.leo | 0 .../array/input_tuple_3x2_fail.leo | 0 compiler/{tests => otests}/array/mod.rs | 0 .../array/multi_fail_initializer.leo | 0 .../array/multi_fail_inline.leo | 0 .../array/multi_initializer.leo | 0 .../array/multi_initializer_fail.leo | 0 compiler/{tests => otests}/array/nested.leo | 0 .../array/nested_3x2_value.leo | 0 .../array/nested_3x2_value_fail.leo | 0 .../array/output/registers_ones.out | 0 .../array/output/registers_zeros.out | 0 .../{tests => otests}/array/registers.leo | 0 compiler/{tests => otests}/array/slice.leo | 0 .../{tests => otests}/array/slice_lower.leo | 0 compiler/{tests => otests}/array/spread.leo | 0 .../array/tuple_3x2_value.leo | 0 .../array/tuple_3x2_value_fail.leo | 0 .../{tests => otests}/array/type_fail.leo | 0 .../array/type_input_3x2.leo | 0 .../array/type_input_4x3x2.leo | 0 .../array/type_nested_value_nested_3x2.leo | 0 .../type_nested_value_nested_3x2_fail.leo | 0 .../array/type_nested_value_nested_4x3x2.leo | 0 .../type_nested_value_nested_4x3x2_fail.leo | 0 .../array/type_nested_value_tuple_3x2.leo | 0 .../type_nested_value_tuple_3x2_fail.leo | 0 .../array/type_nested_value_tuple_4x3x2.leo | 0 .../type_nested_value_tuple_4x3x2_fail.leo | 0 .../array/type_tuple_value_nested_3x2.leo | 0 .../type_tuple_value_nested_3x2_fail.leo | 0 .../array/type_tuple_value_nested_4x3x2.leo | 0 .../type_tuple_value_nested_4x3x2_fail.leo | 0 .../array/type_tuple_value_tuple_3x2.leo | 0 .../array/type_tuple_value_tuple_3x2_fail.leo | 0 .../array/type_tuple_value_tuple_4x3x2.leo | 0 .../type_tuple_value_tuple_4x3x2_fail.leo | 0 .../array/variable_slice_fail.leo | 0 compiler/{tests => otests}/boolean/all.leo | 0 .../boolean/assert_eq_input.leo | 0 .../boolean/conditional_mut.leo | 0 .../boolean/false_and_false.leo | 0 .../boolean/false_or_false.leo | 0 .../boolean/input/registers_false.in | 0 .../boolean/input/registers_true.in | 0 .../boolean/input/true_false.in | 0 .../boolean/input/true_true.in | 0 compiler/{tests => otests}/boolean/mod.rs | 0 .../{tests => otests}/boolean/not_false.leo | 0 .../{tests => otests}/boolean/not_mutable.leo | 0 .../{tests => otests}/boolean/not_true.leo | 0 .../{tests => otests}/boolean/not_u32.leo | 0 .../boolean/output/registers_false.out | 0 .../boolean/output/registers_true.out | 0 .../boolean/output_register.leo | 0 .../boolean/true_and_false.leo | 0 .../boolean/true_and_true.leo | 0 .../boolean/true_and_u32.leo | 0 .../boolean/true_or_false.leo | 0 .../boolean/true_or_true.leo | 0 .../{tests => otests}/boolean/true_or_u32.leo | 0 .../canonicalization/array_expansion.json | 0 .../canonicalization/array_expansion.leo | 0 .../canonicalization/array_size_zero_fail.leo | 0 .../big_self_in_circuit_replacement.json | 0 .../big_self_in_circuit_replacement.leo | 0 .../big_self_outside_circuit_fail.leo | 0 .../canonicalization/compound_assignment.json | 0 .../canonicalization/compound_assignment.leo | 0 .../canonicalization/input/array_expansion.in | 0 .../{tests => otests}/canonicalization/mod.rs | 0 .../circuits/const_self_variable.leo | 0 .../circuits/const_self_variable_fail.leo | 0 ...define_circuit_inside_circuit_function.leo | 0 .../circuits/duplicate_name_context.leo | 0 .../{tests => otests}/circuits/inline.leo | 0 .../circuits/inline_fail.leo | 0 .../circuits/inline_member_fail.leo | 0 .../circuits/inline_member_pass.leo | 0 .../circuits/inline_undefined.leo | 0 .../circuits/member_function.leo | 0 .../circuits/member_function_fail.leo | 0 .../circuits/member_function_invalid.leo | 0 .../circuits/member_function_nested.leo | 0 .../circuits/member_static_function.leo | 0 .../member_static_function_invalid.leo | 0 .../member_static_function_nested.leo | 0 .../member_static_function_undefined.leo | 0 .../circuits/member_variable.leo | 0 .../circuits/member_variable_and_function.leo | 0 .../circuits/member_variable_fail.leo | 0 compiler/{tests => otests}/circuits/mod.rs | 0 .../circuits/mut_function_fail.leo | 0 .../circuits/mut_self_function_fail.leo | 0 .../mut_self_static_function_fail.leo | 0 .../circuits/mut_self_variable.leo | 0 .../circuits/mut_self_variable_branch.leo | 0 .../mut_self_variable_conditional.leo | 0 .../circuits/mut_self_variable_fail.leo | 0 .../circuits/mut_static_function_fail.leo | 0 .../circuits/mut_variable.leo | 0 .../circuits/mut_variable_fail.leo | 0 .../mutable_call_immutable_context.leo | 0 .../circuits/pedersen_mock.leo | 0 .../circuits/self_circuit.leo | 0 .../{tests => otests}/circuits/self_fail.leo | 0 .../circuits/self_member.leo | 0 .../circuits/self_member_invalid.leo | 0 .../circuits/self_member_undefined.leo | 0 compiler/{tests => otests}/compiler/main.leo | 0 compiler/{tests => otests}/compiler/mod.rs | 0 .../compiler_output/empty.out | 0 compiler/{tests => otests}/console/assert.leo | 0 .../console/conditional_assert.leo | 0 compiler/{tests => otests}/console/debug.leo | 0 compiler/{tests => otests}/console/error.leo | 0 .../console/input/input_equal.in | 0 .../console/input/input_unequal.in | 0 compiler/{tests => otests}/console/log.leo | 0 .../console/log_conditional.leo | 0 .../{tests => otests}/console/log_fail.leo | 0 .../{tests => otests}/console/log_input.leo | 0 .../console/log_parameter.leo | 0 .../console/log_parameter_fail_empty.leo | 0 .../console/log_parameter_fail_none.leo | 0 .../console/log_parameter_fail_unknown.leo | 0 .../console/log_parameter_many.leo | 0 compiler/{tests => otests}/console/mod.rs | 0 .../core/core_circuit_invalid.leo | 0 .../core/core_circuit_star_fail.leo | 0 .../core/core_package_invalid.leo | 0 .../core/core_unstable_package_invalid.leo | 0 compiler/{tests => otests}/core/mod.rs | 0 .../{tests => otests}/core/packages/mod.rs | 0 .../blake2s/arguments_length_fail.leo | 0 .../unstable/blake2s/arguments_type_fail.leo | 0 .../unstable/blake2s/blake2s_input.leo | 0 .../unstable/blake2s/blake2s_random.leo | 0 .../unstable/blake2s/inputs/valid_input.in | 0 .../core/packages/unstable/blake2s/mod.rs | 0 .../unstable/blake2s/outputs/valid_output.out | 0 .../core/packages/unstable/mod.rs | 0 .../core/unstable_blake2s.leo | 0 compiler/{tests => otests}/definition/mod.rs | 0 .../definition/out_of_order.leo | 0 .../definition/out_of_order_with_import.leo | 0 compiler/{tests => otests}/field/add.leo | 0 .../field/console_assert.leo | 0 compiler/{tests => otests}/field/div.leo | 0 compiler/{tests => otests}/field/eq.leo | 0 compiler/{tests => otests}/field/field.leo | 0 .../field/input/register_one.in | 0 .../field/input/register_zero.in | 0 compiler/{tests => otests}/field/mod.rs | 0 compiler/{tests => otests}/field/mul.leo | 0 compiler/{tests => otests}/field/negate.leo | 0 .../field/no_space_between_literal.leo | 0 .../field/output/register_one.out | 0 .../field/output/register_zero.out | 0 .../field/output_register.leo | 0 compiler/{tests => otests}/field/sub.leo | 0 compiler/{tests => otests}/field/ternary.leo | 0 .../function/array_input.leo | 0 .../function/array_params_direct_call.leo | 0 .../function/conditional_return.leo | 0 .../function/duplicate_definition.leo | 0 compiler/{tests => otests}/function/empty.leo | 0 .../function/input/conditional_return.in | 0 .../function/input/newlines.in | 0 .../function/input/registers.in | 0 .../{tests => otests}/function/iteration.leo | 0 .../function/iteration_repeated.leo | 0 compiler/{tests => otests}/function/mod.rs | 0 .../function/multiple_returns.leo | 0 .../function/multiple_returns_fail.leo | 0 .../multiple_returns_fail_conditional.leo | 0 .../function/multiple_returns_main.leo | 0 .../{tests => otests}/function/newlines.leo | 0 .../function/output/conditional_return.out | 0 .../function/output/newlines.out | 0 .../function/output/registers.out | 0 .../{tests => otests}/function/repeated.leo | 0 .../{tests => otests}/function/return.leo | 0 .../function/return_array_nested_fail.leo | 0 .../function/return_array_nested_pass.leo | 0 .../function/return_array_tuple_fail.leo | 0 .../function/return_array_tuple_pass.leo | 0 .../function/return_tuple.leo | 0 .../function/return_tuple_conditional.leo | 0 .../{tests => otests}/function/scope_fail.leo | 0 .../{tests => otests}/function/undefined.leo | 0 .../function/value_unchanged.leo | 0 compiler/{tests => otests}/group/add.leo | 0 .../{tests => otests}/group/assert_eq.leo | 0 .../group/both_sign_high.leo | 0 .../group/both_sign_inferred.leo | 0 .../{tests => otests}/group/both_sign_low.leo | 0 compiler/{tests => otests}/group/eq.leo | 0 compiler/{tests => otests}/group/input.leo | 0 .../{tests => otests}/group/input/invalid.in | 0 .../{tests => otests}/group/input/point.in | 0 .../{tests => otests}/group/input/valid.in | 0 compiler/{tests => otests}/group/mod.rs | 0 compiler/{tests => otests}/group/negate.leo | 0 .../group/no_space_between_literal.leo | 0 compiler/{tests => otests}/group/one.leo | 0 compiler/{tests => otests}/group/point.leo | 0 .../{tests => otests}/group/point_input.leo | 0 .../group/positive_and_negative.leo | 0 compiler/{tests => otests}/group/sub.leo | 0 compiler/{tests => otests}/group/ternary.leo | 0 compiler/{tests => otests}/group/x_and_y.leo | 0 .../{tests => otests}/group/x_sign_high.leo | 0 .../group/x_sign_inferred.leo | 0 .../{tests => otests}/group/x_sign_low.leo | 0 .../{tests => otests}/group/y_sign_high.leo | 0 .../group/y_sign_inferred.leo | 0 .../{tests => otests}/group/y_sign_low.leo | 0 compiler/{tests => otests}/group/zero.leo | 0 compiler/{tests => otests}/import/alias.leo | 0 compiler/{tests => otests}/import/basic.leo | 0 .../import/imports/bar/.gitignore | 0 .../import/imports/bar/Leo.toml | 0 .../import/imports/bar/src/bat/bat.leo | 0 .../import/imports/bar/src/baz.leo | 0 .../import/imports/bar/src/lib.leo | 0 .../import/imports/car/.gitignore | 0 .../import/imports/car/Leo.toml | 0 .../import/imports/car/src/lib.leo | 0 .../{tests => otests}/import/many_import.leo | 0 .../import/many_import_star.leo | 0 compiler/{tests => otests}/import/mod.rs | 0 .../{tests => otests}/import/multiple.leo | 0 compiler/{tests => otests}/import/names.leo | 0 .../{tests => otests}/import/names_a_dash.leo | 0 .../{tests => otests}/import/names_dash_a.leo | 0 .../{tests => otests}/import/names_dollar.leo | 0 .../import/names_underscore.leo | 0 compiler/{tests => otests}/import/src/a-9.leo | 0 .../{tests => otests}/import/src/a0-f.leo | 0 .../import/src/hello-world.leo | 0 .../import/src/test-import.leo | 0 compiler/{tests => otests}/import/star.leo | 0 .../{tests => otests}/import/star_fail.leo | 0 compiler/{tests => otests}/input_files/mod.rs | 0 .../input_files/program_input/input/main.in | 0 .../program_input/input/main_array.in | 0 .../program_input/input/main_array_fail.in | 0 .../program_input/input/main_fail_name.in | 0 .../program_input/input/main_fail_type.in | 0 .../program_input/input/main_field.in | 0 .../program_input/input/main_group.in | 0 .../input/main_multi_dimension_array.in | 0 .../program_input/input/main_multiple.in | 0 .../program_input/input/main_tuple_fail.in | 0 .../input_files/program_input/main.leo | 0 .../input_files/program_input/main_array.leo | 0 .../program_input/main_array_fail.leo | 0 .../input_files/program_input/main_field.leo | 0 .../input_files/program_input/main_group.leo | 0 .../main_multi_dimension_array.leo | 0 .../program_input/main_multiple.leo | 0 .../program_input/main_tuple_fail.leo | 0 .../input_files/program_input/mod.rs | 0 .../access.leo | 0 .../input/basic.in | 0 .../input/basic.state | 0 .../input/token_withdraw.in | 0 .../input/token_withdraw.state | 0 .../program_input_and_program_state/mod.rs | 0 .../program_input_constants/input/main.in | 0 .../input/main_array.in | 0 .../input/main_array_fail.in | 0 .../input/main_double_declaration_fail.in | 0 .../input/main_fail_name.in | 0 .../input/main_fail_type.in | 0 .../input/main_field.in | 0 .../input/main_group.in | 0 .../input/main_multi_dimension_array.in | 0 .../input/main_multiple.in | 0 .../input/main_not_const_input_fail.in | 0 .../input/main_tuple_fail.in | 0 .../input/main_type_mismatch.in | 0 .../program_input_constants/main.leo | 0 .../program_input_constants/main_array.leo | 0 .../main_array_fail.leo | 0 .../program_input_constants/main_field.leo | 0 .../program_input_constants/main_group.leo | 0 .../main_multi_dimension_array.leo | 0 .../program_input_constants/main_multiple.leo | 0 .../main_tuple_fail.leo | 0 .../program_input_constants/mod.rs | 0 .../program_registers/input/array.in | 0 .../program_registers/input/main.in | 0 .../input_files/program_registers/mod.rs | 0 .../output/registers_array.out | 0 .../output/registers_pass.out | 0 .../program_registers/registers_array.leo | 0 .../program_registers/registers_fail.leo | 0 .../program_registers/registers_pass.leo | 0 .../input_files/program_state/access_all.leo | 0 .../program_state/access_state.leo | 0 .../program_state/input/basic.state | 0 .../program_state/input/section_invalid.state | 0 .../input/section_undefined.state | 0 .../program_state/input/token_withdraw.state | 0 .../program_state/input/visibility_fail.state | 0 .../input_files/program_state/mod.rs | 0 .../{tests => otests}/integers/i128/add.leo | 0 .../integers/i128/console_assert.leo | 0 .../{tests => otests}/integers/i128/div.leo | 0 .../{tests => otests}/integers/i128/eq.leo | 0 .../{tests => otests}/integers/i128/ge.leo | 0 .../{tests => otests}/integers/i128/gt.leo | 0 .../{tests => otests}/integers/i128/input.leo | 0 .../{tests => otests}/integers/i128/le.leo | 0 .../{tests => otests}/integers/i128/lt.leo | 0 .../{tests => otests}/integers/i128/max.leo | 0 .../integers/i128/max_fail.leo | 0 .../{tests => otests}/integers/i128/min.leo | 0 .../integers/i128/min_fail.leo | 0 .../{tests => otests}/integers/i128/mod.rs | 0 .../{tests => otests}/integers/i128/mul.leo | 0 .../{tests => otests}/integers/i128/ne.leo | 0 .../integers/i128/negate.leo | 0 .../integers/i128/negate_min.leo | 0 .../integers/i128/negate_zero.leo | 0 .../i128/no_space_between_literal.leo | 0 .../{tests => otests}/integers/i128/pow.leo | 0 .../{tests => otests}/integers/i128/sub.leo | 0 .../integers/i128/ternary.leo | 0 .../{tests => otests}/integers/i16/add.leo | 0 .../integers/i16/console_assert.leo | 0 .../{tests => otests}/integers/i16/div.leo | 0 .../{tests => otests}/integers/i16/eq.leo | 0 .../{tests => otests}/integers/i16/ge.leo | 0 .../{tests => otests}/integers/i16/gt.leo | 0 .../{tests => otests}/integers/i16/input.leo | 0 .../{tests => otests}/integers/i16/le.leo | 0 .../{tests => otests}/integers/i16/lt.leo | 0 .../{tests => otests}/integers/i16/max.leo | 0 .../integers/i16/max_fail.leo | 0 .../{tests => otests}/integers/i16/min.leo | 0 .../integers/i16/min_fail.leo | 0 .../{tests => otests}/integers/i16/mod.rs | 0 .../{tests => otests}/integers/i16/mul.leo | 0 .../{tests => otests}/integers/i16/ne.leo | 0 .../{tests => otests}/integers/i16/negate.leo | 0 .../integers/i16/negate_min.leo | 0 .../integers/i16/negate_zero.leo | 0 .../integers/i16/no_space_between_literal.leo | 0 .../{tests => otests}/integers/i16/pow.leo | 0 .../{tests => otests}/integers/i16/sub.leo | 0 .../integers/i16/ternary.leo | 0 .../{tests => otests}/integers/i32/add.leo | 0 .../integers/i32/console_assert.leo | 0 .../{tests => otests}/integers/i32/div.leo | 0 .../{tests => otests}/integers/i32/eq.leo | 0 .../{tests => otests}/integers/i32/ge.leo | 0 .../{tests => otests}/integers/i32/gt.leo | 0 .../{tests => otests}/integers/i32/input.leo | 0 .../{tests => otests}/integers/i32/le.leo | 0 .../{tests => otests}/integers/i32/lt.leo | 0 .../{tests => otests}/integers/i32/max.leo | 0 .../integers/i32/max_fail.leo | 0 .../{tests => otests}/integers/i32/min.leo | 0 .../integers/i32/min_fail.leo | 0 .../{tests => otests}/integers/i32/mod.rs | 0 .../{tests => otests}/integers/i32/mul.leo | 0 .../{tests => otests}/integers/i32/ne.leo | 0 .../{tests => otests}/integers/i32/negate.leo | 0 .../integers/i32/negate_min.leo | 0 .../integers/i32/negate_zero.leo | 0 .../integers/i32/no_space_between_literal.leo | 0 .../{tests => otests}/integers/i32/pow.leo | 0 .../{tests => otests}/integers/i32/sub.leo | 0 .../integers/i32/ternary.leo | 0 .../{tests => otests}/integers/i64/add.leo | 0 .../integers/i64/console_assert.leo | 0 .../{tests => otests}/integers/i64/div.leo | 0 .../{tests => otests}/integers/i64/eq.leo | 0 .../{tests => otests}/integers/i64/ge.leo | 0 .../{tests => otests}/integers/i64/gt.leo | 0 .../{tests => otests}/integers/i64/input.leo | 0 .../{tests => otests}/integers/i64/le.leo | 0 .../{tests => otests}/integers/i64/lt.leo | 0 .../{tests => otests}/integers/i64/max.leo | 0 .../integers/i64/max_fail.leo | 0 .../{tests => otests}/integers/i64/min.leo | 0 .../integers/i64/min_fail.leo | 0 .../{tests => otests}/integers/i64/mod.rs | 0 .../{tests => otests}/integers/i64/mul.leo | 0 .../{tests => otests}/integers/i64/ne.leo | 0 .../{tests => otests}/integers/i64/negate.leo | 0 .../integers/i64/negate_min.leo | 0 .../integers/i64/negate_zero.leo | 0 .../integers/i64/no_space_between_literal.leo | 0 .../{tests => otests}/integers/i64/pow.leo | 0 .../{tests => otests}/integers/i64/sub.leo | 0 .../integers/i64/ternary.leo | 0 .../{tests => otests}/integers/i8/add.leo | 0 .../integers/i8/console_assert.leo | 0 .../{tests => otests}/integers/i8/div.leo | 0 compiler/{tests => otests}/integers/i8/eq.leo | 0 compiler/{tests => otests}/integers/i8/ge.leo | 0 compiler/{tests => otests}/integers/i8/gt.leo | 0 .../{tests => otests}/integers/i8/input.leo | 0 compiler/{tests => otests}/integers/i8/le.leo | 0 compiler/{tests => otests}/integers/i8/lt.leo | 0 .../{tests => otests}/integers/i8/max.leo | 0 .../integers/i8/max_fail.leo | 0 .../{tests => otests}/integers/i8/min.leo | 0 .../integers/i8/min_fail.leo | 0 compiler/{tests => otests}/integers/i8/mod.rs | 0 .../{tests => otests}/integers/i8/mul.leo | 0 compiler/{tests => otests}/integers/i8/ne.leo | 0 .../{tests => otests}/integers/i8/negate.leo | 0 .../integers/i8/negate_min.leo | 0 .../integers/i8/negate_zero.leo | 0 .../integers/i8/no_space_between_literal.leo | 0 .../{tests => otests}/integers/i8/pow.leo | 0 .../{tests => otests}/integers/i8/sub.leo | 0 .../{tests => otests}/integers/i8/ternary.leo | 0 .../{tests => otests}/integers/int_macro.rs | 0 .../integers/integer_tester.rs | 0 compiler/{tests => otests}/integers/mod.rs | 0 .../{tests => otests}/integers/u128/add.leo | 0 .../integers/u128/console_assert.leo | 0 .../{tests => otests}/integers/u128/div.leo | 0 .../{tests => otests}/integers/u128/eq.leo | 0 .../{tests => otests}/integers/u128/ge.leo | 0 .../{tests => otests}/integers/u128/gt.leo | 0 .../{tests => otests}/integers/u128/input.leo | 0 .../{tests => otests}/integers/u128/le.leo | 0 .../{tests => otests}/integers/u128/lt.leo | 0 .../{tests => otests}/integers/u128/max.leo | 0 .../integers/u128/max_fail.leo | 0 .../{tests => otests}/integers/u128/min.leo | 0 .../integers/u128/min_fail.leo | 0 .../{tests => otests}/integers/u128/mod.rs | 0 .../{tests => otests}/integers/u128/mul.leo | 0 .../{tests => otests}/integers/u128/ne.leo | 0 .../u128/no_space_between_literal.leo | 0 .../{tests => otests}/integers/u128/pow.leo | 0 .../{tests => otests}/integers/u128/sub.leo | 0 .../integers/u128/ternary.leo | 0 .../{tests => otests}/integers/u16/add.leo | 0 .../integers/u16/console_assert.leo | 0 .../{tests => otests}/integers/u16/div.leo | 0 .../{tests => otests}/integers/u16/eq.leo | 0 .../{tests => otests}/integers/u16/ge.leo | 0 .../{tests => otests}/integers/u16/gt.leo | 0 .../{tests => otests}/integers/u16/input.leo | 0 .../{tests => otests}/integers/u16/le.leo | 0 .../{tests => otests}/integers/u16/lt.leo | 0 .../{tests => otests}/integers/u16/max.leo | 0 .../integers/u16/max_fail.leo | 0 .../{tests => otests}/integers/u16/min.leo | 0 .../integers/u16/min_fail.leo | 0 .../{tests => otests}/integers/u16/mod.rs | 0 .../{tests => otests}/integers/u16/mul.leo | 0 .../{tests => otests}/integers/u16/ne.leo | 0 .../integers/u16/no_space_between_literal.leo | 0 .../{tests => otests}/integers/u16/pow.leo | 0 .../{tests => otests}/integers/u16/sub.leo | 0 .../integers/u16/ternary.leo | 0 .../{tests => otests}/integers/u32/add.leo | 0 .../integers/u32/console_assert.leo | 0 .../{tests => otests}/integers/u32/div.leo | 0 .../{tests => otests}/integers/u32/eq.leo | 0 .../{tests => otests}/integers/u32/ge.leo | 0 .../{tests => otests}/integers/u32/gt.leo | 0 .../{tests => otests}/integers/u32/input.leo | 0 .../{tests => otests}/integers/u32/le.leo | 0 .../{tests => otests}/integers/u32/lt.leo | 0 .../{tests => otests}/integers/u32/max.leo | 0 .../integers/u32/max_fail.leo | 0 .../{tests => otests}/integers/u32/min.leo | 0 .../integers/u32/min_fail.leo | 0 .../{tests => otests}/integers/u32/mod.rs | 0 .../{tests => otests}/integers/u32/mul.leo | 0 .../{tests => otests}/integers/u32/ne.leo | 0 .../integers/u32/no_space_between_literal.leo | 0 .../{tests => otests}/integers/u32/pow.leo | 0 .../{tests => otests}/integers/u32/sub.leo | 0 .../integers/u32/ternary.leo | 0 .../{tests => otests}/integers/u64/add.leo | 0 .../integers/u64/console_assert.leo | 0 .../{tests => otests}/integers/u64/div.leo | 0 .../{tests => otests}/integers/u64/eq.leo | 0 .../{tests => otests}/integers/u64/ge.leo | 0 .../{tests => otests}/integers/u64/gt.leo | 0 .../{tests => otests}/integers/u64/input.leo | 0 .../{tests => otests}/integers/u64/le.leo | 0 .../{tests => otests}/integers/u64/lt.leo | 0 .../{tests => otests}/integers/u64/max.leo | 0 .../integers/u64/max_fail.leo | 0 .../{tests => otests}/integers/u64/min.leo | 0 .../integers/u64/min_fail.leo | 0 .../{tests => otests}/integers/u64/mod.rs | 0 .../{tests => otests}/integers/u64/mul.leo | 0 .../{tests => otests}/integers/u64/ne.leo | 0 .../integers/u64/no_space_between_literal.leo | 0 .../{tests => otests}/integers/u64/pow.leo | 0 .../{tests => otests}/integers/u64/sub.leo | 0 .../integers/u64/ternary.leo | 0 .../{tests => otests}/integers/u8/add.leo | 0 .../integers/u8/console_assert.leo | 0 .../{tests => otests}/integers/u8/div.leo | 0 compiler/{tests => otests}/integers/u8/eq.leo | 0 compiler/{tests => otests}/integers/u8/ge.leo | 0 compiler/{tests => otests}/integers/u8/gt.leo | 0 .../{tests => otests}/integers/u8/input.leo | 0 compiler/{tests => otests}/integers/u8/le.leo | 0 compiler/{tests => otests}/integers/u8/lt.leo | 0 .../{tests => otests}/integers/u8/max.leo | 0 .../integers/u8/max_fail.leo | 0 .../{tests => otests}/integers/u8/min.leo | 0 .../integers/u8/min_fail.leo | 0 compiler/{tests => otests}/integers/u8/mod.rs | 0 .../{tests => otests}/integers/u8/mul.leo | 0 compiler/{tests => otests}/integers/u8/ne.leo | 0 .../integers/u8/no_space_between_literal.leo | 0 .../{tests => otests}/integers/u8/pow.leo | 0 .../{tests => otests}/integers/u8/sub.leo | 0 .../{tests => otests}/integers/u8/ternary.leo | 0 .../{tests => otests}/integers/uint_macro.rs | 0 compiler/{tests => otests}/mod.rs | 0 .../{tests => otests}/mutability/array.leo | 0 .../mutability/array_mut.leo | 0 .../mutability/array_splice_mut.leo | 0 .../mutability/array_tuple_mut.leo | 0 .../{tests => otests}/mutability/circuit.leo | 0 .../mutability/circuit_function_mut.leo | 0 .../mutability/circuit_mut.leo | 0 .../circuit_static_function_mut.leo | 0 .../mutability/circuit_variable_mut.leo | 0 .../{tests => otests}/mutability/cond_mut.leo | 0 .../{tests => otests}/mutability/const.leo | 0 .../mutability/function_input.leo | 0 .../mutability/function_input_mut.leo | 0 compiler/{tests => otests}/mutability/let.leo | 0 .../{tests => otests}/mutability/let_mut.leo | 0 .../mutability/let_mut_nested.leo | 0 compiler/{tests => otests}/mutability/mod.rs | 0 .../{tests => otests}/mutability/swap.leo | 0 .../{tests => otests}/statements/block.leo | 0 .../statements/conditional/assert.leo | 0 .../statements/conditional/chain.leo | 0 .../statements/conditional/cond_switch.leo | 0 .../statements/conditional/for_loop.leo | 0 .../conditional/input/cond_switch.in | 0 .../conditional/input/registers_one.in | 0 .../conditional/input/registers_zero.in | 0 .../statements/conditional/mod.rs | 0 .../conditional/multiple_returns.leo | 0 .../statements/conditional/mutate.leo | 0 .../statements/conditional/nested.leo | 0 .../conditional/output/cond_switch.out | 0 .../conditional/output/registers_one.out | 0 .../conditional/output/registers_zero.out | 0 .../statements/iteration_basic.leo | 0 .../statements/iteration_input.in | 0 .../statements/iteration_input.leo | 0 .../statements/iteration_type_fail.leo | 0 .../statements/iteration_variable.leo | 0 compiler/{tests => otests}/statements/mod.rs | 0 .../statements/num_returns_fail.leo | 0 .../statements/ternary_basic.leo | 0 .../syntax/compare_mismatched_types.leo | 0 .../syntax/identifiers/address_fail.leo | 0 .../syntax/identifiers/console_fail.leo | 0 .../syntax/identifiers/field_fail.leo | 0 .../syntax/identifiers/group_fail.leo | 0 .../syntax/identifiers/i8_fail.leo | 0 .../syntax/identifiers/input_fail.leo | 0 .../syntax/identifiers/mod.rs | 0 .../syntax/identifiers/self_keyword_fail.leo | 0 .../syntax/identifiers/self_type_fail.leo | 0 .../syntax/identifiers/true_fail.leo | 0 .../syntax/identifiers/u8_fail.leo | 0 .../syntax/input_semicolon.leo | 0 compiler/{tests => otests}/syntax/mod.rs | 0 .../{tests => otests}/syntax/semicolon.leo | 0 .../{tests => otests}/syntax/undefined.leo | 0 compiler/{tests => otests}/tuples/access.leo | 0 compiler/{tests => otests}/tuples/basic.leo | 0 .../{tests => otests}/tuples/function.leo | 0 .../tuples/function_multiple.leo | 0 .../tuples/function_typed.leo | 0 compiler/{tests => otests}/tuples/input.leo | 0 .../{tests => otests}/tuples/inputs/input.in | 0 compiler/{tests => otests}/tuples/mod.rs | 0 .../{tests => otests}/tuples/multiple.leo | 0 .../tuples/multiple_typed.leo | 0 compiler/{tests => otests}/tuples/nested.leo | 0 .../tuples/nested_access.leo | 0 .../{tests => otests}/tuples/nested_typed.leo | 0 compiler/{tests => otests}/tuples/typed.leo | 0 compiler/src/compiler.rs | 13 +- compiler/src/constraints/constraints.rs | 6 +- compiler/src/function/main_function.rs | 8 +- compiler/src/lib.rs | 3 + compiler/src/output/mod.rs | 96 +++ compiler/src/test.rs | 151 ++++ parser/src/test.rs | 18 +- synthesizer/Cargo.toml | 6 + synthesizer/src/circuit_synthesizer.rs | 17 +- synthesizer/src/lib.rs | 3 + synthesizer/src/summarized_circuit.rs | 45 ++ test-framework/src/error.rs | 2 + test-framework/src/runner.rs | 43 +- test-framework/src/test.rs | 4 + tests/compiler/address/address1.in | 5 + tests/compiler/address/address2.in | 5 + tests/compiler/address/equal.leo | 13 + tests/compiler/address/ternary.leo | 14 + tests/compiler/array/equal_initializer.leo | 11 + tests/compiler/array/equal_initializer_2.leo | 11 + tests/compiler/array/input/count_to_6.in | 5 + .../compiler/array/input/initializer_fail.in | 2 + .../compiler/array/input/input_nested_3x2.in | 2 + .../array/input/input_nested_3x2_fail.in | 2 + tests/compiler/array/input/input_tuple_3x2.in | 2 + .../array/input/input_tuple_3x2_fail.in | 2 + tests/compiler/array/input/registers_ones.in | 2 + tests/compiler/array/input/registers_zeros.in | 2 + tests/compiler/array/input/six_zeros.in | 5 + tests/compiler/array/input/three_ones.in | 2 + .../input/type_nested_value_nested_3x2.in | 2 + .../type_nested_value_nested_3x2_fail.in | 2 + .../input/type_nested_value_nested_4x3x2.in | 2 + .../type_nested_value_nested_4x3x2_fail.in | 2 + .../input/type_nested_value_tuple_3x2.in | 2 + .../input/type_nested_value_tuple_3x2_fail.in | 2 + .../input/type_nested_value_tuple_4x3x2.in | 2 + .../type_nested_value_tuple_4x3x2_fail.in | 2 + .../input/type_tuple_value_nested_3x2.in | 2 + .../input/type_tuple_value_nested_3x2_fail.in | 2 + .../input/type_tuple_value_nested_4x3x2.in | 2 + .../type_tuple_value_nested_4x3x2_fail.in | 2 + .../array/input/type_tuple_value_tuple_3x2.in | 2 + .../input/type_tuple_value_tuple_3x2_fail.in | 2 + .../input/type_tuple_value_tuple_4x3x2.in | 2 + .../type_tuple_value_tuple_4x3x2_fail.in | 2 + tests/compiler/array/input_nested_3x2.leo | 3 + .../compiler/array/input_nested_3x2_fail.leo | 3 + tests/compiler/array/input_tuple_3x2.leo | 3 + tests/compiler/array/input_tuple_3x2_fail.leo | 3 + tests/compiler/array/mod.rs | 716 ++++++++++++++++++ .../compiler/array/multi_fail_initializer.leo | 3 + tests/compiler/array/multi_fail_inline.leo | 4 + tests/compiler/array/multi_initializer.leo | 7 + .../compiler/array/multi_initializer_fail.leo | 3 + tests/compiler/array/nested.leo | 4 + tests/compiler/array/nested_3x2_value.leo | 8 + .../compiler/array/nested_3x2_value_fail.leo | 4 + tests/compiler/array/registers.leo | 3 + tests/compiler/array/slice.leo | 6 + tests/compiler/array/slice_lower.leo | 8 + tests/compiler/array/spread.leo | 7 + tests/compiler/array/tuple_3x2_value.leo | 8 + tests/compiler/array/tuple_3x2_value_fail.leo | 4 + tests/compiler/array/type_fail.leo | 3 + tests/compiler/array/type_input_3x2.leo | 5 + tests/compiler/array/type_input_4x3x2.leo | 8 + .../array/type_nested_value_nested_3x2.leo | 7 + .../type_nested_value_nested_3x2_fail.leo | 3 + .../array/type_nested_value_nested_4x3x2.leo | 10 + .../type_nested_value_nested_4x3x2_fail.leo | 3 + .../array/type_nested_value_tuple_3x2.leo | 7 + .../type_nested_value_tuple_3x2_fail.leo | 3 + .../array/type_nested_value_tuple_4x3x2.leo | 10 + .../type_nested_value_tuple_4x3x2_fail.leo | 3 + .../array/type_tuple_value_nested_3x2.leo | 7 + .../type_tuple_value_nested_3x2_fail.leo | 3 + .../array/type_tuple_value_nested_4x3x2.leo | 10 + .../type_tuple_value_nested_4x3x2_fail.leo | 3 + .../array/type_tuple_value_tuple_3x2.leo | 7 + .../array/type_tuple_value_tuple_3x2_fail.leo | 3 + .../array/type_tuple_value_tuple_4x3x2.leo | 10 + .../type_tuple_value_tuple_4x3x2_fail.leo | 3 + tests/compiler/array/variable_slice_fail.leo | 7 + tests/compiler/boolean/and.leo | 13 + tests/compiler/boolean/conditional.leo | 13 + tests/compiler/boolean/equal.leo | 13 + tests/compiler/boolean/input/false_false.in | 6 + tests/compiler/boolean/input/false_true.in | 6 + tests/compiler/boolean/input/true_false.in | 6 + tests/compiler/boolean/input/true_true.in | 6 + tests/compiler/boolean/not_equal.leo | 13 + tests/compiler/boolean/or.leo | 13 + .../compiler/circuits/const_self_variable.leo | 13 + .../circuits/const_self_variable_fail.leo | 13 + ...define_circuit_inside_circuit_function.leo | 13 + .../circuits/duplicate_name_context.leo | 13 + tests/compiler/circuits/inline.leo | 7 + tests/compiler/circuits/inline_fail.leo | 7 + .../compiler/circuits/inline_member_fail.leo | 8 + .../compiler/circuits/inline_member_pass.leo | 13 + tests/compiler/circuits/inline_undefined.leo | 3 + tests/compiler/circuits/member_function.leo | 13 + .../circuits/member_function_fail.leo | 10 + .../circuits/member_function_invalid.leo | 10 + .../circuits/member_function_nested.leo | 18 + .../circuits/member_static_function.leo | 11 + .../member_static_function_invalid.leo | 9 + .../member_static_function_nested.leo | 15 + .../member_static_function_undefined.leo | 9 + tests/compiler/circuits/member_variable.leo | 9 + .../circuits/member_variable_and_function.leo | 15 + .../circuits/member_variable_fail.leo | 9 + tests/compiler/circuits/mod.rs | 318 ++++++++ tests/compiler/circuits/mut_function_fail.leo | 11 + .../circuits/mut_self_function_fail.leo | 15 + .../mut_self_static_function_fail.leo | 15 + tests/compiler/circuits/mut_self_variable.leo | 22 + .../circuits/mut_self_variable_branch.leo | 32 + .../mut_self_variable_conditional.leo | 15 + .../circuits/mut_self_variable_fail.leo | 13 + .../circuits/mut_static_function_fail.leo | 9 + tests/compiler/circuits/mut_variable.leo | 17 + tests/compiler/circuits/mut_variable_fail.leo | 9 + .../mutable_call_immutable_context.leo | 25 + tests/compiler/circuits/pedersen_mock.leo | 27 + tests/compiler/circuits/self_circuit.leo | 9 + tests/compiler/circuits/self_fail.leo | 3 + tests/compiler/circuits/self_member.leo | 14 + .../compiler/circuits/self_member_invalid.leo | 12 + .../circuits/self_member_undefined.leo | 10 + tests/compiler/console/assert.leo | 3 + tests/compiler/console/conditional_assert.leo | 7 + tests/compiler/console/debug.leo | 3 + tests/compiler/console/error.leo | 3 + tests/compiler/console/input/input_equal.in | 3 + tests/compiler/console/input/input_unequal.in | 3 + tests/compiler/console/log.leo | 3 + tests/compiler/console/log_conditional.leo | 6 + tests/compiler/console/log_fail.leo | 3 + tests/compiler/console/log_input.leo | 3 + tests/compiler/console/log_parameter.leo | 3 + .../console/log_parameter_fail_empty.leo | 3 + .../console/log_parameter_fail_none.leo | 3 + .../console/log_parameter_fail_unknown.leo | 3 + tests/compiler/console/log_parameter_many.leo | 3 + tests/compiler/console/mod.rs | 169 +++++ tests/compiler/core/core_circuit_invalid.leo | 3 + .../compiler/core/core_circuit_star_fail.leo | 3 + tests/compiler/core/core_package_invalid.leo | 3 + .../core/core_unstable_package_invalid.leo | 3 + tests/compiler/core/mod.rs | 59 ++ tests/compiler/core/packages/mod.rs | 17 + .../blake2s/arguments_length_fail.leo | 9 + .../unstable/blake2s/arguments_type_fail.leo | 10 + .../unstable/blake2s/blake2s_input.leo | 5 + .../unstable/blake2s/blake2s_random.leo | 7 + .../unstable/blake2s/inputs/valid_input.in | 6 + .../core/packages/unstable/blake2s/mod.rs | 106 +++ .../unstable/blake2s/outputs/valid_output.out | 2 + tests/compiler/core/packages/unstable/mod.rs | 17 + tests/compiler/core/unstable_blake2s.leo | 10 + tests/compiler/definition/mod.rs | 38 + tests/compiler/definition/out_of_order.leo | 6 + .../definition/out_of_order_with_import.leo | 7 + tests/compiler/field/add.leo | 3 + tests/compiler/field/console_assert.leo | 3 + tests/compiler/field/div.leo | 3 + tests/compiler/field/eq.leo | 3 + tests/compiler/field/field.leo | 4 + tests/compiler/field/input/register_one.in | 2 + tests/compiler/field/input/register_zero.in | 2 + tests/compiler/field/mod.rs | 369 +++++++++ tests/compiler/field/mul.leo | 3 + tests/compiler/field/negate.leo | 3 + .../field/no_space_between_literal.leo | 3 + tests/compiler/field/output/register_one.out | 2 + tests/compiler/field/output/register_zero.out | 2 + tests/compiler/field/output_register.leo | 3 + tests/compiler/field/sub.leo | 3 + tests/compiler/field/ternary.leo | 5 + tests/compiler/function/array_input.leo | 6 + .../function/array_params_direct_call.leo | 9 + .../compiler/function/conditional_return.leo | 7 + .../function/duplicate_definition.leo | 7 + tests/compiler/function/empty.leo | 5 + .../function/input/conditional_return.in | 5 + tests/compiler/function/input/newlines.in | 7 + tests/compiler/function/input/registers.in | 3 + tests/compiler/function/iteration.leo | 13 + .../compiler/function/iteration_repeated.leo | 15 + tests/compiler/function/mod.rs | 221 ++++++ tests/compiler/function/multiple_returns.leo | 10 + .../function/multiple_returns_fail.leo | 7 + .../multiple_returns_fail_conditional.leo | 9 + .../function/multiple_returns_main.leo | 3 + tests/compiler/function/newlines.leo | 9 + .../function/output/conditional_return.out | 2 + tests/compiler/function/output/newlines.out | 3 + tests/compiler/function/output/registers.out | 3 + tests/compiler/function/repeated.leo | 9 + tests/compiler/function/return.leo | 7 + .../function/return_array_nested_fail.leo | 7 + .../function/return_array_nested_pass.leo | 12 + .../function/return_array_tuple_fail.leo | 7 + .../function/return_array_tuple_pass.leo | 12 + tests/compiler/function/return_tuple.leo | 11 + .../function/return_tuple_conditional.leo | 15 + tests/compiler/function/scope_fail.leo | 8 + tests/compiler/function/undefined.leo | 3 + tests/compiler/function/value_unchanged.leo | 19 + tests/compiler/group/add.leo | 3 + tests/compiler/group/assert_eq.leo | 3 + tests/compiler/group/both_sign_high.leo | 3 + tests/compiler/group/both_sign_inferred.leo | 3 + tests/compiler/group/both_sign_low.leo | 3 + tests/compiler/group/eq.leo | 3 + tests/compiler/group/input.leo | 3 + tests/compiler/group/input/invalid.in | 3 + tests/compiler/group/input/point.in | 2 + tests/compiler/group/input/valid.in | 3 + tests/compiler/group/mod.rs | 407 ++++++++++ tests/compiler/group/negate.leo | 3 + .../group/no_space_between_literal.leo | 3 + tests/compiler/group/one.leo | 3 + tests/compiler/group/point.leo | 3 + tests/compiler/group/point_input.leo | 3 + .../compiler/group/positive_and_negative.leo | 10 + tests/compiler/group/sub.leo | 3 + tests/compiler/group/ternary.leo | 5 + tests/compiler/group/x_and_y.leo | 3 + tests/compiler/group/x_sign_high.leo | 3 + tests/compiler/group/x_sign_inferred.leo | 3 + tests/compiler/group/x_sign_low.leo | 3 + tests/compiler/group/y_sign_high.leo | 3 + tests/compiler/group/y_sign_inferred.leo | 3 + tests/compiler/group/y_sign_low.leo | 3 + tests/compiler/group/zero.leo | 3 + tests/compiler/import/alias.leo | 5 + tests/compiler/import/basic.leo | 5 + tests/compiler/import/imports/bar/.gitignore | 1 + tests/compiler/import/imports/bar/Leo.toml | 3 + .../import/imports/bar/src/bat/bat.leo | 3 + tests/compiler/import/imports/bar/src/baz.leo | 7 + tests/compiler/import/imports/bar/src/lib.leo | 3 + tests/compiler/import/imports/car/.gitignore | 1 + tests/compiler/import/imports/car/Leo.toml | 3 + tests/compiler/import/imports/car/src/lib.leo | 3 + tests/compiler/import/many_import.leo | 26 + tests/compiler/import/many_import_star.leo | 19 + tests/compiler/import/mod.rs | 154 ++++ tests/compiler/import/multiple.leo | 10 + tests/compiler/import/names.leo | 5 + tests/compiler/import/names_a_dash.leo | 3 + tests/compiler/import/names_dash_a.leo | 3 + tests/compiler/import/names_dollar.leo | 3 + tests/compiler/import/names_underscore.leo | 3 + tests/compiler/import/src/a-9.leo | 1 + tests/compiler/import/src/a0-f.leo | 1 + tests/compiler/import/src/hello-world.leo | 1 + tests/compiler/import/src/test-import.leo | 8 + tests/compiler/import/star.leo | 7 + tests/compiler/import/star_fail.leo | 4 + tests/compiler/input_files/mod.rs | 21 + .../input_files/program_input/input/main.in | 2 + .../program_input/input/main_array.in | 2 + .../program_input/input/main_array_fail.in | 2 + .../program_input/input/main_fail_name.in | 2 + .../program_input/input/main_fail_type.in | 2 + .../program_input/input/main_field.in | 3 + .../program_input/input/main_group.in | 4 + .../input/main_multi_dimension_array.in | 2 + .../program_input/input/main_multiple.in | 3 + .../program_input/input/main_tuple_fail.in | 2 + .../input_files/program_input/main.leo | 3 + .../input_files/program_input/main_array.leo | 4 + .../program_input/main_array_fail.leo | 3 + .../input_files/program_input/main_field.leo | 5 + .../input_files/program_input/main_group.leo | 6 + .../main_multi_dimension_array.leo | 9 + .../program_input/main_multiple.leo | 4 + .../program_input/main_tuple_fail.leo | 3 + .../compiler/input_files/program_input/mod.rs | 125 +++ .../access.leo | 11 + .../input/basic.in | 5 + .../input/basic.state | 12 + .../input/token_withdraw.in | 6 + .../input/token_withdraw.state | 24 + .../program_input_and_program_state/mod.rs | 44 ++ .../program_input_constants/input/main.in | 2 + .../input/main_array.in | 2 + .../input/main_array_fail.in | 2 + .../input/main_double_declaration_fail.in | 5 + .../input/main_fail_name.in | 2 + .../input/main_fail_type.in | 2 + .../input/main_field.in | 3 + .../input/main_group.in | 4 + .../input/main_multi_dimension_array.in | 2 + .../input/main_multiple.in | 3 + .../input/main_not_const_input_fail.in | 2 + .../input/main_tuple_fail.in | 2 + .../input/main_type_mismatch.in | 2 + .../program_input_constants/main.leo | 3 + .../program_input_constants/main_array.leo | 4 + .../main_array_fail.leo | 3 + .../program_input_constants/main_field.leo | 5 + .../program_input_constants/main_group.leo | 6 + .../main_multi_dimension_array.leo | 9 + .../program_input_constants/main_multiple.leo | 4 + .../main_tuple_fail.leo | 3 + .../program_input_constants/mod.rs | 145 ++++ .../program_registers/input/array.in | 2 + .../program_registers/input/main.in | 4 + .../input_files/program_registers/mod.rs | 53 ++ .../output/registers_array.out | 2 + .../output/registers_pass.out | 2 + .../program_registers/registers_array.leo | 3 + .../program_registers/registers_fail.leo | 3 + .../program_registers/registers_pass.leo | 3 + .../input_files/program_state/access_all.leo | 8 + .../program_state/access_state.leo | 3 + .../program_state/input/basic.state | 10 + .../program_state/input/section_invalid.state | 4 + .../input/section_undefined.state | 4 + .../program_state/input/token_withdraw.state | 24 + .../program_state/input/visibility_fail.state | 1 + .../compiler/input_files/program_state/mod.rs | 78 ++ tests/compiler/integers/i128/add.leo | 3 + .../compiler/integers/i128/console_assert.leo | 3 + tests/compiler/integers/i128/div.leo | 3 + tests/compiler/integers/i128/eq.leo | 3 + tests/compiler/integers/i128/ge.leo | 3 + tests/compiler/integers/i128/gt.leo | 3 + tests/compiler/integers/i128/input.leo | 3 + tests/compiler/integers/i128/le.leo | 3 + tests/compiler/integers/i128/lt.leo | 3 + tests/compiler/integers/i128/max.leo | 3 + tests/compiler/integers/i128/max_fail.leo | 3 + tests/compiler/integers/i128/min.leo | 3 + tests/compiler/integers/i128/min_fail.leo | 3 + tests/compiler/integers/i128/mod.rs | 142 ++++ tests/compiler/integers/i128/mul.leo | 3 + tests/compiler/integers/i128/ne.leo | 3 + tests/compiler/integers/i128/negate.leo | 3 + tests/compiler/integers/i128/negate_min.leo | 4 + tests/compiler/integers/i128/negate_zero.leo | 5 + .../i128/no_space_between_literal.leo | 3 + tests/compiler/integers/i128/pow.leo | 3 + tests/compiler/integers/i128/sub.leo | 3 + tests/compiler/integers/i128/ternary.leo | 5 + tests/compiler/integers/i16/add.leo | 3 + .../compiler/integers/i16/console_assert.leo | 3 + tests/compiler/integers/i16/div.leo | 3 + tests/compiler/integers/i16/eq.leo | 3 + tests/compiler/integers/i16/ge.leo | 3 + tests/compiler/integers/i16/gt.leo | 3 + tests/compiler/integers/i16/input.leo | 3 + tests/compiler/integers/i16/le.leo | 3 + tests/compiler/integers/i16/lt.leo | 3 + tests/compiler/integers/i16/max.leo | 3 + tests/compiler/integers/i16/max_fail.leo | 3 + tests/compiler/integers/i16/min.leo | 3 + tests/compiler/integers/i16/min_fail.leo | 3 + tests/compiler/integers/i16/mod.rs | 141 ++++ tests/compiler/integers/i16/mul.leo | 3 + tests/compiler/integers/i16/ne.leo | 3 + tests/compiler/integers/i16/negate.leo | 3 + tests/compiler/integers/i16/negate_min.leo | 4 + tests/compiler/integers/i16/negate_zero.leo | 5 + .../integers/i16/no_space_between_literal.leo | 3 + tests/compiler/integers/i16/pow.leo | 3 + tests/compiler/integers/i16/sub.leo | 3 + tests/compiler/integers/i16/ternary.leo | 5 + tests/compiler/integers/i32/add.leo | 3 + .../compiler/integers/i32/console_assert.leo | 3 + tests/compiler/integers/i32/div.leo | 3 + tests/compiler/integers/i32/eq.leo | 3 + tests/compiler/integers/i32/ge.leo | 3 + tests/compiler/integers/i32/gt.leo | 3 + tests/compiler/integers/i32/input.leo | 3 + tests/compiler/integers/i32/le.leo | 3 + tests/compiler/integers/i32/lt.leo | 3 + tests/compiler/integers/i32/max.leo | 3 + tests/compiler/integers/i32/max_fail.leo | 3 + tests/compiler/integers/i32/min.leo | 3 + tests/compiler/integers/i32/min_fail.leo | 3 + tests/compiler/integers/i32/mod.rs | 141 ++++ tests/compiler/integers/i32/mul.leo | 3 + tests/compiler/integers/i32/ne.leo | 3 + tests/compiler/integers/i32/negate.leo | 3 + tests/compiler/integers/i32/negate_min.leo | 4 + tests/compiler/integers/i32/negate_zero.leo | 5 + .../integers/i32/no_space_between_literal.leo | 3 + tests/compiler/integers/i32/pow.leo | 3 + tests/compiler/integers/i32/sub.leo | 3 + tests/compiler/integers/i32/ternary.leo | 5 + tests/compiler/integers/i64/add.leo | 3 + .../compiler/integers/i64/console_assert.leo | 3 + tests/compiler/integers/i64/div.leo | 3 + tests/compiler/integers/i64/eq.leo | 3 + tests/compiler/integers/i64/ge.leo | 3 + tests/compiler/integers/i64/gt.leo | 3 + tests/compiler/integers/i64/input.leo | 3 + tests/compiler/integers/i64/le.leo | 3 + tests/compiler/integers/i64/lt.leo | 3 + tests/compiler/integers/i64/max.leo | 3 + tests/compiler/integers/i64/max_fail.leo | 3 + tests/compiler/integers/i64/min.leo | 3 + tests/compiler/integers/i64/min_fail.leo | 3 + tests/compiler/integers/i64/mod.rs | 142 ++++ tests/compiler/integers/i64/mul.leo | 3 + tests/compiler/integers/i64/ne.leo | 3 + tests/compiler/integers/i64/negate.leo | 3 + tests/compiler/integers/i64/negate_min.leo | 4 + tests/compiler/integers/i64/negate_zero.leo | 5 + .../integers/i64/no_space_between_literal.leo | 3 + tests/compiler/integers/i64/pow.leo | 3 + tests/compiler/integers/i64/sub.leo | 3 + tests/compiler/integers/i64/ternary.leo | 5 + tests/compiler/integers/i8/add.leo | 3 + tests/compiler/integers/i8/console_assert.leo | 3 + tests/compiler/integers/i8/div.leo | 3 + tests/compiler/integers/i8/eq.leo | 3 + tests/compiler/integers/i8/ge.leo | 3 + tests/compiler/integers/i8/gt.leo | 3 + tests/compiler/integers/i8/input.leo | 3 + tests/compiler/integers/i8/le.leo | 3 + tests/compiler/integers/i8/lt.leo | 3 + tests/compiler/integers/i8/max.leo | 3 + tests/compiler/integers/i8/max_fail.leo | 3 + tests/compiler/integers/i8/min.leo | 3 + tests/compiler/integers/i8/min_fail.leo | 3 + tests/compiler/integers/i8/mod.rs | 141 ++++ tests/compiler/integers/i8/mul.leo | 3 + tests/compiler/integers/i8/ne.leo | 3 + tests/compiler/integers/i8/negate.leo | 3 + tests/compiler/integers/i8/negate_min.leo | 4 + tests/compiler/integers/i8/negate_zero.leo | 5 + .../integers/i8/no_space_between_literal.leo | 3 + tests/compiler/integers/i8/pow.leo | 3 + tests/compiler/integers/i8/sub.leo | 3 + tests/compiler/integers/i8/ternary.leo | 5 + tests/compiler/integers/int_macro.rs | 538 +++++++++++++ tests/compiler/integers/integer_tester.rs | 83 ++ tests/compiler/integers/mod.rs | 37 + tests/compiler/integers/u128/add.leo | 3 + .../compiler/integers/u128/console_assert.leo | 3 + tests/compiler/integers/u128/div.leo | 3 + tests/compiler/integers/u128/eq.leo | 3 + tests/compiler/integers/u128/ge.leo | 3 + tests/compiler/integers/u128/gt.leo | 3 + tests/compiler/integers/u128/input.leo | 3 + tests/compiler/integers/u128/le.leo | 3 + tests/compiler/integers/u128/lt.leo | 3 + tests/compiler/integers/u128/max.leo | 3 + tests/compiler/integers/u128/max_fail.leo | 3 + tests/compiler/integers/u128/min.leo | 3 + tests/compiler/integers/u128/min_fail.leo | 3 + tests/compiler/integers/u128/mod.rs | 126 +++ tests/compiler/integers/u128/mul.leo | 3 + tests/compiler/integers/u128/ne.leo | 3 + .../u128/no_space_between_literal.leo | 3 + tests/compiler/integers/u128/pow.leo | 3 + tests/compiler/integers/u128/sub.leo | 3 + tests/compiler/integers/u128/ternary.leo | 5 + tests/compiler/integers/u16/add.leo | 3 + .../compiler/integers/u16/console_assert.leo | 3 + tests/compiler/integers/u16/div.leo | 3 + tests/compiler/integers/u16/eq.leo | 3 + tests/compiler/integers/u16/ge.leo | 3 + tests/compiler/integers/u16/gt.leo | 3 + tests/compiler/integers/u16/input.leo | 3 + tests/compiler/integers/u16/le.leo | 3 + tests/compiler/integers/u16/lt.leo | 3 + tests/compiler/integers/u16/max.leo | 3 + tests/compiler/integers/u16/max_fail.leo | 3 + tests/compiler/integers/u16/min.leo | 3 + tests/compiler/integers/u16/min_fail.leo | 3 + tests/compiler/integers/u16/mod.rs | 126 +++ tests/compiler/integers/u16/mul.leo | 3 + tests/compiler/integers/u16/ne.leo | 3 + .../integers/u16/no_space_between_literal.leo | 3 + tests/compiler/integers/u16/pow.leo | 3 + tests/compiler/integers/u16/sub.leo | 3 + tests/compiler/integers/u16/ternary.leo | 5 + tests/compiler/integers/u32/add.leo | 3 + .../compiler/integers/u32/console_assert.leo | 3 + tests/compiler/integers/u32/div.leo | 3 + tests/compiler/integers/u32/eq.leo | 3 + tests/compiler/integers/u32/ge.leo | 3 + tests/compiler/integers/u32/gt.leo | 3 + tests/compiler/integers/u32/input.leo | 3 + tests/compiler/integers/u32/le.leo | 3 + tests/compiler/integers/u32/lt.leo | 3 + tests/compiler/integers/u32/max.leo | 3 + tests/compiler/integers/u32/max_fail.leo | 3 + tests/compiler/integers/u32/min.leo | 3 + tests/compiler/integers/u32/min_fail.leo | 3 + tests/compiler/integers/u32/mod.rs | 126 +++ tests/compiler/integers/u32/mul.leo | 3 + tests/compiler/integers/u32/ne.leo | 3 + .../integers/u32/no_space_between_literal.leo | 3 + tests/compiler/integers/u32/pow.leo | 3 + tests/compiler/integers/u32/sub.leo | 3 + tests/compiler/integers/u32/ternary.leo | 5 + tests/compiler/integers/u64/add.leo | 3 + .../compiler/integers/u64/console_assert.leo | 3 + tests/compiler/integers/u64/div.leo | 3 + tests/compiler/integers/u64/eq.leo | 3 + tests/compiler/integers/u64/ge.leo | 3 + tests/compiler/integers/u64/gt.leo | 3 + tests/compiler/integers/u64/input.leo | 3 + tests/compiler/integers/u64/le.leo | 3 + tests/compiler/integers/u64/lt.leo | 3 + tests/compiler/integers/u64/max.leo | 3 + tests/compiler/integers/u64/max_fail.leo | 3 + tests/compiler/integers/u64/min.leo | 3 + tests/compiler/integers/u64/min_fail.leo | 3 + tests/compiler/integers/u64/mod.rs | 126 +++ tests/compiler/integers/u64/mul.leo | 3 + tests/compiler/integers/u64/ne.leo | 3 + .../integers/u64/no_space_between_literal.leo | 3 + tests/compiler/integers/u64/pow.leo | 3 + tests/compiler/integers/u64/sub.leo | 3 + tests/compiler/integers/u64/ternary.leo | 5 + tests/compiler/integers/u8/add.leo | 3 + tests/compiler/integers/u8/console_assert.leo | 3 + tests/compiler/integers/u8/div.leo | 3 + tests/compiler/integers/u8/eq.leo | 3 + tests/compiler/integers/u8/ge.leo | 3 + tests/compiler/integers/u8/gt.leo | 3 + tests/compiler/integers/u8/input.leo | 3 + tests/compiler/integers/u8/le.leo | 3 + tests/compiler/integers/u8/lt.leo | 3 + tests/compiler/integers/u8/max.leo | 3 + tests/compiler/integers/u8/max_fail.leo | 3 + tests/compiler/integers/u8/min.leo | 3 + tests/compiler/integers/u8/min_fail.leo | 3 + tests/compiler/integers/u8/mod.rs | 126 +++ tests/compiler/integers/u8/mul.leo | 3 + tests/compiler/integers/u8/ne.leo | 3 + .../integers/u8/no_space_between_literal.leo | 3 + tests/compiler/integers/u8/pow.leo | 3 + tests/compiler/integers/u8/sub.leo | 3 + tests/compiler/integers/u8/ternary.leo | 5 + tests/compiler/integers/uint_macro.rs | 476 ++++++++++++ tests/compiler/mutability/array.leo | 5 + tests/compiler/mutability/array_mut.leo | 7 + .../compiler/mutability/array_splice_mut.leo | 9 + tests/compiler/mutability/array_tuple_mut.leo | 8 + tests/compiler/mutability/circuit.leo | 9 + .../mutability/circuit_function_mut.leo | 9 + tests/compiler/mutability/circuit_mut.leo | 11 + .../circuit_static_function_mut.leo | 9 + .../mutability/circuit_variable_mut.leo | 11 + tests/compiler/mutability/cond_mut.leo | 7 + tests/compiler/mutability/const.leo | 5 + tests/compiler/mutability/function_input.leo | 4 + .../mutability/function_input_mut.leo | 6 + tests/compiler/mutability/let.leo | 5 + tests/compiler/mutability/let_mut.leo | 7 + tests/compiler/mutability/let_mut_nested.leo | 5 + tests/compiler/mutability/mod.rs | 157 ++++ tests/compiler/mutability/swap.leo | 20 + tests/compiler/statements/block.leo | 15 + tests/compiler/statements/chain.leo | 21 + tests/compiler/statements/for_loop.leo | 19 + tests/compiler/statements/iteration_basic.leo | 15 + .../statements/iteration_variable.leo | 16 + .../compiler/statements/multiple_returns.leo | 15 + tests/compiler/statements/mutate.leo | 23 + tests/compiler/statements/nested_mutate.leo | 21 + tests/compiler/statements/u32_3.in | 5 + tests/compiler/statements/u32_5.in | 5 + tests/compiler/statements/u32_6.in | 5 + tests/compiler/tuples/basic.leo | 11 + tests/compiler/tuples/dependent.leo | 11 + tests/compiler/tuples/destructured.leo | 11 + tests/compiler/tuples/inputs/true_true.in | 6 + tests/compiler/tuples/nested_access.leo | 11 + .../compiler/compiler/address/equal.leo.out | 24 + .../compiler/compiler/address/ternary.leo.out | 24 + .../compiler/array/equal_initializer.leo.out | 24 + .../array/equal_initializer_2.leo.out | 24 + .../compiler/compiler/boolean/and.leo.out | 36 + .../compiler/boolean/conditional.leo.out | 36 + .../compiler/compiler/boolean/equal.leo.out | 36 + .../compiler/boolean/not_equal.leo.out | 36 + .../compiler/compiler/boolean/or.leo.out | 36 + .../compiler/statements/block.leo.out | 18 + .../compiler/statements/chain.leo.out | 30 + .../compiler/statements/for_loop.leo.out | 18 + .../statements/iteration_basic.leo.out | 18 + .../statements/iteration_variable.leo.out | 18 + .../statements/multiple_returns.leo.out | 24 + .../compiler/statements/mutate.leo.out | 24 + .../compiler/statements/nested_mutate.leo.out | 30 + .../compiler/compiler/tuples/basic.leo.out | 21 + .../compiler/tuples/dependent.leo.out | 21 + .../compiler/tuples/destructured.leo.out | 21 + .../compiler/tuples/nested_access.leo.out | 21 + 1246 files changed, 9371 insertions(+), 39 deletions(-) rename compiler/{tests => otests}/address/console_assert_fail.leo (100%) rename compiler/{tests => otests}/address/console_assert_pass.leo (100%) rename compiler/{tests => otests}/address/empty.leo (100%) rename compiler/{tests => otests}/address/equal.leo (100%) rename compiler/{tests => otests}/address/implicit_invalid.leo (100%) rename compiler/{tests => otests}/address/implicit_valid.leo (100%) rename compiler/{tests => otests}/address/input.leo (100%) rename compiler/{tests => otests}/address/invalid_length.leo (100%) rename compiler/{tests => otests}/address/invalid_prefix.leo (100%) rename compiler/{tests => otests}/address/mod.rs (100%) rename compiler/{tests => otests}/address/ternary.leo (100%) rename compiler/{tests => otests}/address/valid.leo (100%) rename compiler/{tests => otests}/array/initializer.leo (100%) rename compiler/{tests => otests}/array/initializer_fail.leo (100%) rename compiler/{tests => otests}/array/initializer_input.leo (100%) rename compiler/{tests => otests}/array/inline.leo (100%) rename compiler/{tests => otests}/array/input/initializer_fail.in (100%) rename compiler/{tests => otests}/array/input/inline_fail.leo (100%) rename compiler/{tests => otests}/array/input/input_nested_3x2.in (100%) rename compiler/{tests => otests}/array/input/input_nested_3x2_fail.in (100%) rename compiler/{tests => otests}/array/input/input_tuple_3x2.in (100%) rename compiler/{tests => otests}/array/input/input_tuple_3x2_fail.in (100%) rename compiler/{tests => otests}/array/input/registers_ones.in (100%) rename compiler/{tests => otests}/array/input/registers_zeros.in (100%) rename compiler/{tests => otests}/array/input/six_zeros.in (100%) rename compiler/{tests => otests}/array/input/three_ones.in (100%) rename compiler/{tests => otests}/array/input/type_nested_value_nested_3x2.in (100%) rename compiler/{tests => otests}/array/input/type_nested_value_nested_3x2_fail.in (100%) rename compiler/{tests => otests}/array/input/type_nested_value_nested_4x3x2.in (100%) rename compiler/{tests => otests}/array/input/type_nested_value_nested_4x3x2_fail.in (100%) rename compiler/{tests => otests}/array/input/type_nested_value_tuple_3x2.in (100%) rename compiler/{tests => otests}/array/input/type_nested_value_tuple_3x2_fail.in (100%) rename compiler/{tests => otests}/array/input/type_nested_value_tuple_4x3x2.in (100%) rename compiler/{tests => otests}/array/input/type_nested_value_tuple_4x3x2_fail.in (100%) rename compiler/{tests => otests}/array/input/type_tuple_value_nested_3x2.in (100%) rename compiler/{tests => otests}/array/input/type_tuple_value_nested_3x2_fail.in (100%) rename compiler/{tests => otests}/array/input/type_tuple_value_nested_4x3x2.in (100%) rename compiler/{tests => otests}/array/input/type_tuple_value_nested_4x3x2_fail.in (100%) rename compiler/{tests => otests}/array/input/type_tuple_value_tuple_3x2.in (100%) rename compiler/{tests => otests}/array/input/type_tuple_value_tuple_3x2_fail.in (100%) rename compiler/{tests => otests}/array/input/type_tuple_value_tuple_4x3x2.in (100%) rename compiler/{tests => otests}/array/input/type_tuple_value_tuple_4x3x2_fail.in (100%) rename compiler/{tests => otests}/array/input_nested_3x2.leo (100%) rename compiler/{tests => otests}/array/input_nested_3x2_fail.leo (100%) rename compiler/{tests => otests}/array/input_tuple_3x2.leo (100%) rename compiler/{tests => otests}/array/input_tuple_3x2_fail.leo (100%) rename compiler/{tests => otests}/array/mod.rs (100%) rename compiler/{tests => otests}/array/multi_fail_initializer.leo (100%) rename compiler/{tests => otests}/array/multi_fail_inline.leo (100%) rename compiler/{tests => otests}/array/multi_initializer.leo (100%) rename compiler/{tests => otests}/array/multi_initializer_fail.leo (100%) rename compiler/{tests => otests}/array/nested.leo (100%) rename compiler/{tests => otests}/array/nested_3x2_value.leo (100%) rename compiler/{tests => otests}/array/nested_3x2_value_fail.leo (100%) rename compiler/{tests => otests}/array/output/registers_ones.out (100%) rename compiler/{tests => otests}/array/output/registers_zeros.out (100%) rename compiler/{tests => otests}/array/registers.leo (100%) rename compiler/{tests => otests}/array/slice.leo (100%) rename compiler/{tests => otests}/array/slice_lower.leo (100%) rename compiler/{tests => otests}/array/spread.leo (100%) rename compiler/{tests => otests}/array/tuple_3x2_value.leo (100%) rename compiler/{tests => otests}/array/tuple_3x2_value_fail.leo (100%) rename compiler/{tests => otests}/array/type_fail.leo (100%) rename compiler/{tests => otests}/array/type_input_3x2.leo (100%) rename compiler/{tests => otests}/array/type_input_4x3x2.leo (100%) rename compiler/{tests => otests}/array/type_nested_value_nested_3x2.leo (100%) rename compiler/{tests => otests}/array/type_nested_value_nested_3x2_fail.leo (100%) rename compiler/{tests => otests}/array/type_nested_value_nested_4x3x2.leo (100%) rename compiler/{tests => otests}/array/type_nested_value_nested_4x3x2_fail.leo (100%) rename compiler/{tests => otests}/array/type_nested_value_tuple_3x2.leo (100%) rename compiler/{tests => otests}/array/type_nested_value_tuple_3x2_fail.leo (100%) rename compiler/{tests => otests}/array/type_nested_value_tuple_4x3x2.leo (100%) rename compiler/{tests => otests}/array/type_nested_value_tuple_4x3x2_fail.leo (100%) rename compiler/{tests => otests}/array/type_tuple_value_nested_3x2.leo (100%) rename compiler/{tests => otests}/array/type_tuple_value_nested_3x2_fail.leo (100%) rename compiler/{tests => otests}/array/type_tuple_value_nested_4x3x2.leo (100%) rename compiler/{tests => otests}/array/type_tuple_value_nested_4x3x2_fail.leo (100%) rename compiler/{tests => otests}/array/type_tuple_value_tuple_3x2.leo (100%) rename compiler/{tests => otests}/array/type_tuple_value_tuple_3x2_fail.leo (100%) rename compiler/{tests => otests}/array/type_tuple_value_tuple_4x3x2.leo (100%) rename compiler/{tests => otests}/array/type_tuple_value_tuple_4x3x2_fail.leo (100%) rename compiler/{tests => otests}/array/variable_slice_fail.leo (100%) rename compiler/{tests => otests}/boolean/all.leo (100%) rename compiler/{tests => otests}/boolean/assert_eq_input.leo (100%) rename compiler/{tests => otests}/boolean/conditional_mut.leo (100%) rename compiler/{tests => otests}/boolean/false_and_false.leo (100%) rename compiler/{tests => otests}/boolean/false_or_false.leo (100%) rename compiler/{tests => otests}/boolean/input/registers_false.in (100%) rename compiler/{tests => otests}/boolean/input/registers_true.in (100%) rename compiler/{tests => otests}/boolean/input/true_false.in (100%) rename compiler/{tests => otests}/boolean/input/true_true.in (100%) rename compiler/{tests => otests}/boolean/mod.rs (100%) rename compiler/{tests => otests}/boolean/not_false.leo (100%) rename compiler/{tests => otests}/boolean/not_mutable.leo (100%) rename compiler/{tests => otests}/boolean/not_true.leo (100%) rename compiler/{tests => otests}/boolean/not_u32.leo (100%) rename compiler/{tests => otests}/boolean/output/registers_false.out (100%) rename compiler/{tests => otests}/boolean/output/registers_true.out (100%) rename compiler/{tests => otests}/boolean/output_register.leo (100%) rename compiler/{tests => otests}/boolean/true_and_false.leo (100%) rename compiler/{tests => otests}/boolean/true_and_true.leo (100%) rename compiler/{tests => otests}/boolean/true_and_u32.leo (100%) rename compiler/{tests => otests}/boolean/true_or_false.leo (100%) rename compiler/{tests => otests}/boolean/true_or_true.leo (100%) rename compiler/{tests => otests}/boolean/true_or_u32.leo (100%) rename compiler/{tests => otests}/canonicalization/array_expansion.json (100%) rename compiler/{tests => otests}/canonicalization/array_expansion.leo (100%) rename compiler/{tests => otests}/canonicalization/array_size_zero_fail.leo (100%) rename compiler/{tests => otests}/canonicalization/big_self_in_circuit_replacement.json (100%) rename compiler/{tests => otests}/canonicalization/big_self_in_circuit_replacement.leo (100%) rename compiler/{tests => otests}/canonicalization/big_self_outside_circuit_fail.leo (100%) rename compiler/{tests => otests}/canonicalization/compound_assignment.json (100%) rename compiler/{tests => otests}/canonicalization/compound_assignment.leo (100%) rename compiler/{tests => otests}/canonicalization/input/array_expansion.in (100%) rename compiler/{tests => otests}/canonicalization/mod.rs (100%) rename compiler/{tests => otests}/circuits/const_self_variable.leo (100%) rename compiler/{tests => otests}/circuits/const_self_variable_fail.leo (100%) rename compiler/{tests => otests}/circuits/define_circuit_inside_circuit_function.leo (100%) rename compiler/{tests => otests}/circuits/duplicate_name_context.leo (100%) rename compiler/{tests => otests}/circuits/inline.leo (100%) rename compiler/{tests => otests}/circuits/inline_fail.leo (100%) rename compiler/{tests => otests}/circuits/inline_member_fail.leo (100%) rename compiler/{tests => otests}/circuits/inline_member_pass.leo (100%) rename compiler/{tests => otests}/circuits/inline_undefined.leo (100%) rename compiler/{tests => otests}/circuits/member_function.leo (100%) rename compiler/{tests => otests}/circuits/member_function_fail.leo (100%) rename compiler/{tests => otests}/circuits/member_function_invalid.leo (100%) rename compiler/{tests => otests}/circuits/member_function_nested.leo (100%) rename compiler/{tests => otests}/circuits/member_static_function.leo (100%) rename compiler/{tests => otests}/circuits/member_static_function_invalid.leo (100%) rename compiler/{tests => otests}/circuits/member_static_function_nested.leo (100%) rename compiler/{tests => otests}/circuits/member_static_function_undefined.leo (100%) rename compiler/{tests => otests}/circuits/member_variable.leo (100%) rename compiler/{tests => otests}/circuits/member_variable_and_function.leo (100%) rename compiler/{tests => otests}/circuits/member_variable_fail.leo (100%) rename compiler/{tests => otests}/circuits/mod.rs (100%) rename compiler/{tests => otests}/circuits/mut_function_fail.leo (100%) rename compiler/{tests => otests}/circuits/mut_self_function_fail.leo (100%) rename compiler/{tests => otests}/circuits/mut_self_static_function_fail.leo (100%) rename compiler/{tests => otests}/circuits/mut_self_variable.leo (100%) rename compiler/{tests => otests}/circuits/mut_self_variable_branch.leo (100%) rename compiler/{tests => otests}/circuits/mut_self_variable_conditional.leo (100%) rename compiler/{tests => otests}/circuits/mut_self_variable_fail.leo (100%) rename compiler/{tests => otests}/circuits/mut_static_function_fail.leo (100%) rename compiler/{tests => otests}/circuits/mut_variable.leo (100%) rename compiler/{tests => otests}/circuits/mut_variable_fail.leo (100%) rename compiler/{tests => otests}/circuits/mutable_call_immutable_context.leo (100%) rename compiler/{tests => otests}/circuits/pedersen_mock.leo (100%) rename compiler/{tests => otests}/circuits/self_circuit.leo (100%) rename compiler/{tests => otests}/circuits/self_fail.leo (100%) rename compiler/{tests => otests}/circuits/self_member.leo (100%) rename compiler/{tests => otests}/circuits/self_member_invalid.leo (100%) rename compiler/{tests => otests}/circuits/self_member_undefined.leo (100%) rename compiler/{tests => otests}/compiler/main.leo (100%) rename compiler/{tests => otests}/compiler/mod.rs (100%) rename compiler/{tests => otests}/compiler_output/empty.out (100%) rename compiler/{tests => otests}/console/assert.leo (100%) rename compiler/{tests => otests}/console/conditional_assert.leo (100%) rename compiler/{tests => otests}/console/debug.leo (100%) rename compiler/{tests => otests}/console/error.leo (100%) rename compiler/{tests => otests}/console/input/input_equal.in (100%) rename compiler/{tests => otests}/console/input/input_unequal.in (100%) rename compiler/{tests => otests}/console/log.leo (100%) rename compiler/{tests => otests}/console/log_conditional.leo (100%) rename compiler/{tests => otests}/console/log_fail.leo (100%) rename compiler/{tests => otests}/console/log_input.leo (100%) rename compiler/{tests => otests}/console/log_parameter.leo (100%) rename compiler/{tests => otests}/console/log_parameter_fail_empty.leo (100%) rename compiler/{tests => otests}/console/log_parameter_fail_none.leo (100%) rename compiler/{tests => otests}/console/log_parameter_fail_unknown.leo (100%) rename compiler/{tests => otests}/console/log_parameter_many.leo (100%) rename compiler/{tests => otests}/console/mod.rs (100%) rename compiler/{tests => otests}/core/core_circuit_invalid.leo (100%) rename compiler/{tests => otests}/core/core_circuit_star_fail.leo (100%) rename compiler/{tests => otests}/core/core_package_invalid.leo (100%) rename compiler/{tests => otests}/core/core_unstable_package_invalid.leo (100%) rename compiler/{tests => otests}/core/mod.rs (100%) rename compiler/{tests => otests}/core/packages/mod.rs (100%) rename compiler/{tests => otests}/core/packages/unstable/blake2s/arguments_length_fail.leo (100%) rename compiler/{tests => otests}/core/packages/unstable/blake2s/arguments_type_fail.leo (100%) rename compiler/{tests => otests}/core/packages/unstable/blake2s/blake2s_input.leo (100%) rename compiler/{tests => otests}/core/packages/unstable/blake2s/blake2s_random.leo (100%) rename compiler/{tests => otests}/core/packages/unstable/blake2s/inputs/valid_input.in (100%) rename compiler/{tests => otests}/core/packages/unstable/blake2s/mod.rs (100%) rename compiler/{tests => otests}/core/packages/unstable/blake2s/outputs/valid_output.out (100%) rename compiler/{tests => otests}/core/packages/unstable/mod.rs (100%) rename compiler/{tests => otests}/core/unstable_blake2s.leo (100%) rename compiler/{tests => otests}/definition/mod.rs (100%) rename compiler/{tests => otests}/definition/out_of_order.leo (100%) rename compiler/{tests => otests}/definition/out_of_order_with_import.leo (100%) rename compiler/{tests => otests}/field/add.leo (100%) rename compiler/{tests => otests}/field/console_assert.leo (100%) rename compiler/{tests => otests}/field/div.leo (100%) rename compiler/{tests => otests}/field/eq.leo (100%) rename compiler/{tests => otests}/field/field.leo (100%) rename compiler/{tests => otests}/field/input/register_one.in (100%) rename compiler/{tests => otests}/field/input/register_zero.in (100%) rename compiler/{tests => otests}/field/mod.rs (100%) rename compiler/{tests => otests}/field/mul.leo (100%) rename compiler/{tests => otests}/field/negate.leo (100%) rename compiler/{tests => otests}/field/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/field/output/register_one.out (100%) rename compiler/{tests => otests}/field/output/register_zero.out (100%) rename compiler/{tests => otests}/field/output_register.leo (100%) rename compiler/{tests => otests}/field/sub.leo (100%) rename compiler/{tests => otests}/field/ternary.leo (100%) rename compiler/{tests => otests}/function/array_input.leo (100%) rename compiler/{tests => otests}/function/array_params_direct_call.leo (100%) rename compiler/{tests => otests}/function/conditional_return.leo (100%) rename compiler/{tests => otests}/function/duplicate_definition.leo (100%) rename compiler/{tests => otests}/function/empty.leo (100%) rename compiler/{tests => otests}/function/input/conditional_return.in (100%) rename compiler/{tests => otests}/function/input/newlines.in (100%) rename compiler/{tests => otests}/function/input/registers.in (100%) rename compiler/{tests => otests}/function/iteration.leo (100%) rename compiler/{tests => otests}/function/iteration_repeated.leo (100%) rename compiler/{tests => otests}/function/mod.rs (100%) rename compiler/{tests => otests}/function/multiple_returns.leo (100%) rename compiler/{tests => otests}/function/multiple_returns_fail.leo (100%) rename compiler/{tests => otests}/function/multiple_returns_fail_conditional.leo (100%) rename compiler/{tests => otests}/function/multiple_returns_main.leo (100%) rename compiler/{tests => otests}/function/newlines.leo (100%) rename compiler/{tests => otests}/function/output/conditional_return.out (100%) rename compiler/{tests => otests}/function/output/newlines.out (100%) rename compiler/{tests => otests}/function/output/registers.out (100%) rename compiler/{tests => otests}/function/repeated.leo (100%) rename compiler/{tests => otests}/function/return.leo (100%) rename compiler/{tests => otests}/function/return_array_nested_fail.leo (100%) rename compiler/{tests => otests}/function/return_array_nested_pass.leo (100%) rename compiler/{tests => otests}/function/return_array_tuple_fail.leo (100%) rename compiler/{tests => otests}/function/return_array_tuple_pass.leo (100%) rename compiler/{tests => otests}/function/return_tuple.leo (100%) rename compiler/{tests => otests}/function/return_tuple_conditional.leo (100%) rename compiler/{tests => otests}/function/scope_fail.leo (100%) rename compiler/{tests => otests}/function/undefined.leo (100%) rename compiler/{tests => otests}/function/value_unchanged.leo (100%) rename compiler/{tests => otests}/group/add.leo (100%) rename compiler/{tests => otests}/group/assert_eq.leo (100%) rename compiler/{tests => otests}/group/both_sign_high.leo (100%) rename compiler/{tests => otests}/group/both_sign_inferred.leo (100%) rename compiler/{tests => otests}/group/both_sign_low.leo (100%) rename compiler/{tests => otests}/group/eq.leo (100%) rename compiler/{tests => otests}/group/input.leo (100%) rename compiler/{tests => otests}/group/input/invalid.in (100%) rename compiler/{tests => otests}/group/input/point.in (100%) rename compiler/{tests => otests}/group/input/valid.in (100%) rename compiler/{tests => otests}/group/mod.rs (100%) rename compiler/{tests => otests}/group/negate.leo (100%) rename compiler/{tests => otests}/group/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/group/one.leo (100%) rename compiler/{tests => otests}/group/point.leo (100%) rename compiler/{tests => otests}/group/point_input.leo (100%) rename compiler/{tests => otests}/group/positive_and_negative.leo (100%) rename compiler/{tests => otests}/group/sub.leo (100%) rename compiler/{tests => otests}/group/ternary.leo (100%) rename compiler/{tests => otests}/group/x_and_y.leo (100%) rename compiler/{tests => otests}/group/x_sign_high.leo (100%) rename compiler/{tests => otests}/group/x_sign_inferred.leo (100%) rename compiler/{tests => otests}/group/x_sign_low.leo (100%) rename compiler/{tests => otests}/group/y_sign_high.leo (100%) rename compiler/{tests => otests}/group/y_sign_inferred.leo (100%) rename compiler/{tests => otests}/group/y_sign_low.leo (100%) rename compiler/{tests => otests}/group/zero.leo (100%) rename compiler/{tests => otests}/import/alias.leo (100%) rename compiler/{tests => otests}/import/basic.leo (100%) rename compiler/{tests => otests}/import/imports/bar/.gitignore (100%) rename compiler/{tests => otests}/import/imports/bar/Leo.toml (100%) rename compiler/{tests => otests}/import/imports/bar/src/bat/bat.leo (100%) rename compiler/{tests => otests}/import/imports/bar/src/baz.leo (100%) rename compiler/{tests => otests}/import/imports/bar/src/lib.leo (100%) rename compiler/{tests => otests}/import/imports/car/.gitignore (100%) rename compiler/{tests => otests}/import/imports/car/Leo.toml (100%) rename compiler/{tests => otests}/import/imports/car/src/lib.leo (100%) rename compiler/{tests => otests}/import/many_import.leo (100%) rename compiler/{tests => otests}/import/many_import_star.leo (100%) rename compiler/{tests => otests}/import/mod.rs (100%) rename compiler/{tests => otests}/import/multiple.leo (100%) rename compiler/{tests => otests}/import/names.leo (100%) rename compiler/{tests => otests}/import/names_a_dash.leo (100%) rename compiler/{tests => otests}/import/names_dash_a.leo (100%) rename compiler/{tests => otests}/import/names_dollar.leo (100%) rename compiler/{tests => otests}/import/names_underscore.leo (100%) rename compiler/{tests => otests}/import/src/a-9.leo (100%) rename compiler/{tests => otests}/import/src/a0-f.leo (100%) rename compiler/{tests => otests}/import/src/hello-world.leo (100%) rename compiler/{tests => otests}/import/src/test-import.leo (100%) rename compiler/{tests => otests}/import/star.leo (100%) rename compiler/{tests => otests}/import/star_fail.leo (100%) rename compiler/{tests => otests}/input_files/mod.rs (100%) rename compiler/{tests => otests}/input_files/program_input/input/main.in (100%) rename compiler/{tests => otests}/input_files/program_input/input/main_array.in (100%) rename compiler/{tests => otests}/input_files/program_input/input/main_array_fail.in (100%) rename compiler/{tests => otests}/input_files/program_input/input/main_fail_name.in (100%) rename compiler/{tests => otests}/input_files/program_input/input/main_fail_type.in (100%) rename compiler/{tests => otests}/input_files/program_input/input/main_field.in (100%) rename compiler/{tests => otests}/input_files/program_input/input/main_group.in (100%) rename compiler/{tests => otests}/input_files/program_input/input/main_multi_dimension_array.in (100%) rename compiler/{tests => otests}/input_files/program_input/input/main_multiple.in (100%) rename compiler/{tests => otests}/input_files/program_input/input/main_tuple_fail.in (100%) rename compiler/{tests => otests}/input_files/program_input/main.leo (100%) rename compiler/{tests => otests}/input_files/program_input/main_array.leo (100%) rename compiler/{tests => otests}/input_files/program_input/main_array_fail.leo (100%) rename compiler/{tests => otests}/input_files/program_input/main_field.leo (100%) rename compiler/{tests => otests}/input_files/program_input/main_group.leo (100%) rename compiler/{tests => otests}/input_files/program_input/main_multi_dimension_array.leo (100%) rename compiler/{tests => otests}/input_files/program_input/main_multiple.leo (100%) rename compiler/{tests => otests}/input_files/program_input/main_tuple_fail.leo (100%) rename compiler/{tests => otests}/input_files/program_input/mod.rs (100%) rename compiler/{tests => otests}/input_files/program_input_and_program_state/access.leo (100%) rename compiler/{tests => otests}/input_files/program_input_and_program_state/input/basic.in (100%) rename compiler/{tests => otests}/input_files/program_input_and_program_state/input/basic.state (100%) rename compiler/{tests => otests}/input_files/program_input_and_program_state/input/token_withdraw.in (100%) rename compiler/{tests => otests}/input_files/program_input_and_program_state/input/token_withdraw.state (100%) rename compiler/{tests => otests}/input_files/program_input_and_program_state/mod.rs (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_array.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_array_fail.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_double_declaration_fail.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_fail_name.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_fail_type.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_field.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_group.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_multi_dimension_array.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_multiple.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_not_const_input_fail.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_tuple_fail.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/input/main_type_mismatch.in (100%) rename compiler/{tests => otests}/input_files/program_input_constants/main.leo (100%) rename compiler/{tests => otests}/input_files/program_input_constants/main_array.leo (100%) rename compiler/{tests => otests}/input_files/program_input_constants/main_array_fail.leo (100%) rename compiler/{tests => otests}/input_files/program_input_constants/main_field.leo (100%) rename compiler/{tests => otests}/input_files/program_input_constants/main_group.leo (100%) rename compiler/{tests => otests}/input_files/program_input_constants/main_multi_dimension_array.leo (100%) rename compiler/{tests => otests}/input_files/program_input_constants/main_multiple.leo (100%) rename compiler/{tests => otests}/input_files/program_input_constants/main_tuple_fail.leo (100%) rename compiler/{tests => otests}/input_files/program_input_constants/mod.rs (100%) rename compiler/{tests => otests}/input_files/program_registers/input/array.in (100%) rename compiler/{tests => otests}/input_files/program_registers/input/main.in (100%) rename compiler/{tests => otests}/input_files/program_registers/mod.rs (100%) rename compiler/{tests => otests}/input_files/program_registers/output/registers_array.out (100%) rename compiler/{tests => otests}/input_files/program_registers/output/registers_pass.out (100%) rename compiler/{tests => otests}/input_files/program_registers/registers_array.leo (100%) rename compiler/{tests => otests}/input_files/program_registers/registers_fail.leo (100%) rename compiler/{tests => otests}/input_files/program_registers/registers_pass.leo (100%) rename compiler/{tests => otests}/input_files/program_state/access_all.leo (100%) rename compiler/{tests => otests}/input_files/program_state/access_state.leo (100%) rename compiler/{tests => otests}/input_files/program_state/input/basic.state (100%) rename compiler/{tests => otests}/input_files/program_state/input/section_invalid.state (100%) rename compiler/{tests => otests}/input_files/program_state/input/section_undefined.state (100%) rename compiler/{tests => otests}/input_files/program_state/input/token_withdraw.state (100%) rename compiler/{tests => otests}/input_files/program_state/input/visibility_fail.state (100%) rename compiler/{tests => otests}/input_files/program_state/mod.rs (100%) rename compiler/{tests => otests}/integers/i128/add.leo (100%) rename compiler/{tests => otests}/integers/i128/console_assert.leo (100%) rename compiler/{tests => otests}/integers/i128/div.leo (100%) rename compiler/{tests => otests}/integers/i128/eq.leo (100%) rename compiler/{tests => otests}/integers/i128/ge.leo (100%) rename compiler/{tests => otests}/integers/i128/gt.leo (100%) rename compiler/{tests => otests}/integers/i128/input.leo (100%) rename compiler/{tests => otests}/integers/i128/le.leo (100%) rename compiler/{tests => otests}/integers/i128/lt.leo (100%) rename compiler/{tests => otests}/integers/i128/max.leo (100%) rename compiler/{tests => otests}/integers/i128/max_fail.leo (100%) rename compiler/{tests => otests}/integers/i128/min.leo (100%) rename compiler/{tests => otests}/integers/i128/min_fail.leo (100%) rename compiler/{tests => otests}/integers/i128/mod.rs (100%) rename compiler/{tests => otests}/integers/i128/mul.leo (100%) rename compiler/{tests => otests}/integers/i128/ne.leo (100%) rename compiler/{tests => otests}/integers/i128/negate.leo (100%) rename compiler/{tests => otests}/integers/i128/negate_min.leo (100%) rename compiler/{tests => otests}/integers/i128/negate_zero.leo (100%) rename compiler/{tests => otests}/integers/i128/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/i128/pow.leo (100%) rename compiler/{tests => otests}/integers/i128/sub.leo (100%) rename compiler/{tests => otests}/integers/i128/ternary.leo (100%) rename compiler/{tests => otests}/integers/i16/add.leo (100%) rename compiler/{tests => otests}/integers/i16/console_assert.leo (100%) rename compiler/{tests => otests}/integers/i16/div.leo (100%) rename compiler/{tests => otests}/integers/i16/eq.leo (100%) rename compiler/{tests => otests}/integers/i16/ge.leo (100%) rename compiler/{tests => otests}/integers/i16/gt.leo (100%) rename compiler/{tests => otests}/integers/i16/input.leo (100%) rename compiler/{tests => otests}/integers/i16/le.leo (100%) rename compiler/{tests => otests}/integers/i16/lt.leo (100%) rename compiler/{tests => otests}/integers/i16/max.leo (100%) rename compiler/{tests => otests}/integers/i16/max_fail.leo (100%) rename compiler/{tests => otests}/integers/i16/min.leo (100%) rename compiler/{tests => otests}/integers/i16/min_fail.leo (100%) rename compiler/{tests => otests}/integers/i16/mod.rs (100%) rename compiler/{tests => otests}/integers/i16/mul.leo (100%) rename compiler/{tests => otests}/integers/i16/ne.leo (100%) rename compiler/{tests => otests}/integers/i16/negate.leo (100%) rename compiler/{tests => otests}/integers/i16/negate_min.leo (100%) rename compiler/{tests => otests}/integers/i16/negate_zero.leo (100%) rename compiler/{tests => otests}/integers/i16/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/i16/pow.leo (100%) rename compiler/{tests => otests}/integers/i16/sub.leo (100%) rename compiler/{tests => otests}/integers/i16/ternary.leo (100%) rename compiler/{tests => otests}/integers/i32/add.leo (100%) rename compiler/{tests => otests}/integers/i32/console_assert.leo (100%) rename compiler/{tests => otests}/integers/i32/div.leo (100%) rename compiler/{tests => otests}/integers/i32/eq.leo (100%) rename compiler/{tests => otests}/integers/i32/ge.leo (100%) rename compiler/{tests => otests}/integers/i32/gt.leo (100%) rename compiler/{tests => otests}/integers/i32/input.leo (100%) rename compiler/{tests => otests}/integers/i32/le.leo (100%) rename compiler/{tests => otests}/integers/i32/lt.leo (100%) rename compiler/{tests => otests}/integers/i32/max.leo (100%) rename compiler/{tests => otests}/integers/i32/max_fail.leo (100%) rename compiler/{tests => otests}/integers/i32/min.leo (100%) rename compiler/{tests => otests}/integers/i32/min_fail.leo (100%) rename compiler/{tests => otests}/integers/i32/mod.rs (100%) rename compiler/{tests => otests}/integers/i32/mul.leo (100%) rename compiler/{tests => otests}/integers/i32/ne.leo (100%) rename compiler/{tests => otests}/integers/i32/negate.leo (100%) rename compiler/{tests => otests}/integers/i32/negate_min.leo (100%) rename compiler/{tests => otests}/integers/i32/negate_zero.leo (100%) rename compiler/{tests => otests}/integers/i32/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/i32/pow.leo (100%) rename compiler/{tests => otests}/integers/i32/sub.leo (100%) rename compiler/{tests => otests}/integers/i32/ternary.leo (100%) rename compiler/{tests => otests}/integers/i64/add.leo (100%) rename compiler/{tests => otests}/integers/i64/console_assert.leo (100%) rename compiler/{tests => otests}/integers/i64/div.leo (100%) rename compiler/{tests => otests}/integers/i64/eq.leo (100%) rename compiler/{tests => otests}/integers/i64/ge.leo (100%) rename compiler/{tests => otests}/integers/i64/gt.leo (100%) rename compiler/{tests => otests}/integers/i64/input.leo (100%) rename compiler/{tests => otests}/integers/i64/le.leo (100%) rename compiler/{tests => otests}/integers/i64/lt.leo (100%) rename compiler/{tests => otests}/integers/i64/max.leo (100%) rename compiler/{tests => otests}/integers/i64/max_fail.leo (100%) rename compiler/{tests => otests}/integers/i64/min.leo (100%) rename compiler/{tests => otests}/integers/i64/min_fail.leo (100%) rename compiler/{tests => otests}/integers/i64/mod.rs (100%) rename compiler/{tests => otests}/integers/i64/mul.leo (100%) rename compiler/{tests => otests}/integers/i64/ne.leo (100%) rename compiler/{tests => otests}/integers/i64/negate.leo (100%) rename compiler/{tests => otests}/integers/i64/negate_min.leo (100%) rename compiler/{tests => otests}/integers/i64/negate_zero.leo (100%) rename compiler/{tests => otests}/integers/i64/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/i64/pow.leo (100%) rename compiler/{tests => otests}/integers/i64/sub.leo (100%) rename compiler/{tests => otests}/integers/i64/ternary.leo (100%) rename compiler/{tests => otests}/integers/i8/add.leo (100%) rename compiler/{tests => otests}/integers/i8/console_assert.leo (100%) rename compiler/{tests => otests}/integers/i8/div.leo (100%) rename compiler/{tests => otests}/integers/i8/eq.leo (100%) rename compiler/{tests => otests}/integers/i8/ge.leo (100%) rename compiler/{tests => otests}/integers/i8/gt.leo (100%) rename compiler/{tests => otests}/integers/i8/input.leo (100%) rename compiler/{tests => otests}/integers/i8/le.leo (100%) rename compiler/{tests => otests}/integers/i8/lt.leo (100%) rename compiler/{tests => otests}/integers/i8/max.leo (100%) rename compiler/{tests => otests}/integers/i8/max_fail.leo (100%) rename compiler/{tests => otests}/integers/i8/min.leo (100%) rename compiler/{tests => otests}/integers/i8/min_fail.leo (100%) rename compiler/{tests => otests}/integers/i8/mod.rs (100%) rename compiler/{tests => otests}/integers/i8/mul.leo (100%) rename compiler/{tests => otests}/integers/i8/ne.leo (100%) rename compiler/{tests => otests}/integers/i8/negate.leo (100%) rename compiler/{tests => otests}/integers/i8/negate_min.leo (100%) rename compiler/{tests => otests}/integers/i8/negate_zero.leo (100%) rename compiler/{tests => otests}/integers/i8/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/i8/pow.leo (100%) rename compiler/{tests => otests}/integers/i8/sub.leo (100%) rename compiler/{tests => otests}/integers/i8/ternary.leo (100%) rename compiler/{tests => otests}/integers/int_macro.rs (100%) rename compiler/{tests => otests}/integers/integer_tester.rs (100%) rename compiler/{tests => otests}/integers/mod.rs (100%) rename compiler/{tests => otests}/integers/u128/add.leo (100%) rename compiler/{tests => otests}/integers/u128/console_assert.leo (100%) rename compiler/{tests => otests}/integers/u128/div.leo (100%) rename compiler/{tests => otests}/integers/u128/eq.leo (100%) rename compiler/{tests => otests}/integers/u128/ge.leo (100%) rename compiler/{tests => otests}/integers/u128/gt.leo (100%) rename compiler/{tests => otests}/integers/u128/input.leo (100%) rename compiler/{tests => otests}/integers/u128/le.leo (100%) rename compiler/{tests => otests}/integers/u128/lt.leo (100%) rename compiler/{tests => otests}/integers/u128/max.leo (100%) rename compiler/{tests => otests}/integers/u128/max_fail.leo (100%) rename compiler/{tests => otests}/integers/u128/min.leo (100%) rename compiler/{tests => otests}/integers/u128/min_fail.leo (100%) rename compiler/{tests => otests}/integers/u128/mod.rs (100%) rename compiler/{tests => otests}/integers/u128/mul.leo (100%) rename compiler/{tests => otests}/integers/u128/ne.leo (100%) rename compiler/{tests => otests}/integers/u128/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/u128/pow.leo (100%) rename compiler/{tests => otests}/integers/u128/sub.leo (100%) rename compiler/{tests => otests}/integers/u128/ternary.leo (100%) rename compiler/{tests => otests}/integers/u16/add.leo (100%) rename compiler/{tests => otests}/integers/u16/console_assert.leo (100%) rename compiler/{tests => otests}/integers/u16/div.leo (100%) rename compiler/{tests => otests}/integers/u16/eq.leo (100%) rename compiler/{tests => otests}/integers/u16/ge.leo (100%) rename compiler/{tests => otests}/integers/u16/gt.leo (100%) rename compiler/{tests => otests}/integers/u16/input.leo (100%) rename compiler/{tests => otests}/integers/u16/le.leo (100%) rename compiler/{tests => otests}/integers/u16/lt.leo (100%) rename compiler/{tests => otests}/integers/u16/max.leo (100%) rename compiler/{tests => otests}/integers/u16/max_fail.leo (100%) rename compiler/{tests => otests}/integers/u16/min.leo (100%) rename compiler/{tests => otests}/integers/u16/min_fail.leo (100%) rename compiler/{tests => otests}/integers/u16/mod.rs (100%) rename compiler/{tests => otests}/integers/u16/mul.leo (100%) rename compiler/{tests => otests}/integers/u16/ne.leo (100%) rename compiler/{tests => otests}/integers/u16/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/u16/pow.leo (100%) rename compiler/{tests => otests}/integers/u16/sub.leo (100%) rename compiler/{tests => otests}/integers/u16/ternary.leo (100%) rename compiler/{tests => otests}/integers/u32/add.leo (100%) rename compiler/{tests => otests}/integers/u32/console_assert.leo (100%) rename compiler/{tests => otests}/integers/u32/div.leo (100%) rename compiler/{tests => otests}/integers/u32/eq.leo (100%) rename compiler/{tests => otests}/integers/u32/ge.leo (100%) rename compiler/{tests => otests}/integers/u32/gt.leo (100%) rename compiler/{tests => otests}/integers/u32/input.leo (100%) rename compiler/{tests => otests}/integers/u32/le.leo (100%) rename compiler/{tests => otests}/integers/u32/lt.leo (100%) rename compiler/{tests => otests}/integers/u32/max.leo (100%) rename compiler/{tests => otests}/integers/u32/max_fail.leo (100%) rename compiler/{tests => otests}/integers/u32/min.leo (100%) rename compiler/{tests => otests}/integers/u32/min_fail.leo (100%) rename compiler/{tests => otests}/integers/u32/mod.rs (100%) rename compiler/{tests => otests}/integers/u32/mul.leo (100%) rename compiler/{tests => otests}/integers/u32/ne.leo (100%) rename compiler/{tests => otests}/integers/u32/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/u32/pow.leo (100%) rename compiler/{tests => otests}/integers/u32/sub.leo (100%) rename compiler/{tests => otests}/integers/u32/ternary.leo (100%) rename compiler/{tests => otests}/integers/u64/add.leo (100%) rename compiler/{tests => otests}/integers/u64/console_assert.leo (100%) rename compiler/{tests => otests}/integers/u64/div.leo (100%) rename compiler/{tests => otests}/integers/u64/eq.leo (100%) rename compiler/{tests => otests}/integers/u64/ge.leo (100%) rename compiler/{tests => otests}/integers/u64/gt.leo (100%) rename compiler/{tests => otests}/integers/u64/input.leo (100%) rename compiler/{tests => otests}/integers/u64/le.leo (100%) rename compiler/{tests => otests}/integers/u64/lt.leo (100%) rename compiler/{tests => otests}/integers/u64/max.leo (100%) rename compiler/{tests => otests}/integers/u64/max_fail.leo (100%) rename compiler/{tests => otests}/integers/u64/min.leo (100%) rename compiler/{tests => otests}/integers/u64/min_fail.leo (100%) rename compiler/{tests => otests}/integers/u64/mod.rs (100%) rename compiler/{tests => otests}/integers/u64/mul.leo (100%) rename compiler/{tests => otests}/integers/u64/ne.leo (100%) rename compiler/{tests => otests}/integers/u64/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/u64/pow.leo (100%) rename compiler/{tests => otests}/integers/u64/sub.leo (100%) rename compiler/{tests => otests}/integers/u64/ternary.leo (100%) rename compiler/{tests => otests}/integers/u8/add.leo (100%) rename compiler/{tests => otests}/integers/u8/console_assert.leo (100%) rename compiler/{tests => otests}/integers/u8/div.leo (100%) rename compiler/{tests => otests}/integers/u8/eq.leo (100%) rename compiler/{tests => otests}/integers/u8/ge.leo (100%) rename compiler/{tests => otests}/integers/u8/gt.leo (100%) rename compiler/{tests => otests}/integers/u8/input.leo (100%) rename compiler/{tests => otests}/integers/u8/le.leo (100%) rename compiler/{tests => otests}/integers/u8/lt.leo (100%) rename compiler/{tests => otests}/integers/u8/max.leo (100%) rename compiler/{tests => otests}/integers/u8/max_fail.leo (100%) rename compiler/{tests => otests}/integers/u8/min.leo (100%) rename compiler/{tests => otests}/integers/u8/min_fail.leo (100%) rename compiler/{tests => otests}/integers/u8/mod.rs (100%) rename compiler/{tests => otests}/integers/u8/mul.leo (100%) rename compiler/{tests => otests}/integers/u8/ne.leo (100%) rename compiler/{tests => otests}/integers/u8/no_space_between_literal.leo (100%) rename compiler/{tests => otests}/integers/u8/pow.leo (100%) rename compiler/{tests => otests}/integers/u8/sub.leo (100%) rename compiler/{tests => otests}/integers/u8/ternary.leo (100%) rename compiler/{tests => otests}/integers/uint_macro.rs (100%) rename compiler/{tests => otests}/mod.rs (100%) rename compiler/{tests => otests}/mutability/array.leo (100%) rename compiler/{tests => otests}/mutability/array_mut.leo (100%) rename compiler/{tests => otests}/mutability/array_splice_mut.leo (100%) rename compiler/{tests => otests}/mutability/array_tuple_mut.leo (100%) rename compiler/{tests => otests}/mutability/circuit.leo (100%) rename compiler/{tests => otests}/mutability/circuit_function_mut.leo (100%) rename compiler/{tests => otests}/mutability/circuit_mut.leo (100%) rename compiler/{tests => otests}/mutability/circuit_static_function_mut.leo (100%) rename compiler/{tests => otests}/mutability/circuit_variable_mut.leo (100%) rename compiler/{tests => otests}/mutability/cond_mut.leo (100%) rename compiler/{tests => otests}/mutability/const.leo (100%) rename compiler/{tests => otests}/mutability/function_input.leo (100%) rename compiler/{tests => otests}/mutability/function_input_mut.leo (100%) rename compiler/{tests => otests}/mutability/let.leo (100%) rename compiler/{tests => otests}/mutability/let_mut.leo (100%) rename compiler/{tests => otests}/mutability/let_mut_nested.leo (100%) rename compiler/{tests => otests}/mutability/mod.rs (100%) rename compiler/{tests => otests}/mutability/swap.leo (100%) rename compiler/{tests => otests}/statements/block.leo (100%) rename compiler/{tests => otests}/statements/conditional/assert.leo (100%) rename compiler/{tests => otests}/statements/conditional/chain.leo (100%) rename compiler/{tests => otests}/statements/conditional/cond_switch.leo (100%) rename compiler/{tests => otests}/statements/conditional/for_loop.leo (100%) rename compiler/{tests => otests}/statements/conditional/input/cond_switch.in (100%) rename compiler/{tests => otests}/statements/conditional/input/registers_one.in (100%) rename compiler/{tests => otests}/statements/conditional/input/registers_zero.in (100%) rename compiler/{tests => otests}/statements/conditional/mod.rs (100%) rename compiler/{tests => otests}/statements/conditional/multiple_returns.leo (100%) rename compiler/{tests => otests}/statements/conditional/mutate.leo (100%) rename compiler/{tests => otests}/statements/conditional/nested.leo (100%) rename compiler/{tests => otests}/statements/conditional/output/cond_switch.out (100%) rename compiler/{tests => otests}/statements/conditional/output/registers_one.out (100%) rename compiler/{tests => otests}/statements/conditional/output/registers_zero.out (100%) rename compiler/{tests => otests}/statements/iteration_basic.leo (100%) rename compiler/{tests => otests}/statements/iteration_input.in (100%) rename compiler/{tests => otests}/statements/iteration_input.leo (100%) rename compiler/{tests => otests}/statements/iteration_type_fail.leo (100%) rename compiler/{tests => otests}/statements/iteration_variable.leo (100%) rename compiler/{tests => otests}/statements/mod.rs (100%) rename compiler/{tests => otests}/statements/num_returns_fail.leo (100%) rename compiler/{tests => otests}/statements/ternary_basic.leo (100%) rename compiler/{tests => otests}/syntax/compare_mismatched_types.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/address_fail.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/console_fail.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/field_fail.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/group_fail.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/i8_fail.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/input_fail.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/mod.rs (100%) rename compiler/{tests => otests}/syntax/identifiers/self_keyword_fail.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/self_type_fail.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/true_fail.leo (100%) rename compiler/{tests => otests}/syntax/identifiers/u8_fail.leo (100%) rename compiler/{tests => otests}/syntax/input_semicolon.leo (100%) rename compiler/{tests => otests}/syntax/mod.rs (100%) rename compiler/{tests => otests}/syntax/semicolon.leo (100%) rename compiler/{tests => otests}/syntax/undefined.leo (100%) rename compiler/{tests => otests}/tuples/access.leo (100%) rename compiler/{tests => otests}/tuples/basic.leo (100%) rename compiler/{tests => otests}/tuples/function.leo (100%) rename compiler/{tests => otests}/tuples/function_multiple.leo (100%) rename compiler/{tests => otests}/tuples/function_typed.leo (100%) rename compiler/{tests => otests}/tuples/input.leo (100%) rename compiler/{tests => otests}/tuples/inputs/input.in (100%) rename compiler/{tests => otests}/tuples/mod.rs (100%) rename compiler/{tests => otests}/tuples/multiple.leo (100%) rename compiler/{tests => otests}/tuples/multiple_typed.leo (100%) rename compiler/{tests => otests}/tuples/nested.leo (100%) rename compiler/{tests => otests}/tuples/nested_access.leo (100%) rename compiler/{tests => otests}/tuples/nested_typed.leo (100%) rename compiler/{tests => otests}/tuples/typed.leo (100%) create mode 100644 compiler/src/test.rs create mode 100644 synthesizer/src/summarized_circuit.rs create mode 100644 tests/compiler/address/address1.in create mode 100644 tests/compiler/address/address2.in create mode 100644 tests/compiler/address/equal.leo create mode 100644 tests/compiler/address/ternary.leo create mode 100644 tests/compiler/array/equal_initializer.leo create mode 100644 tests/compiler/array/equal_initializer_2.leo create mode 100644 tests/compiler/array/input/count_to_6.in create mode 100644 tests/compiler/array/input/initializer_fail.in create mode 100644 tests/compiler/array/input/input_nested_3x2.in create mode 100644 tests/compiler/array/input/input_nested_3x2_fail.in create mode 100644 tests/compiler/array/input/input_tuple_3x2.in create mode 100644 tests/compiler/array/input/input_tuple_3x2_fail.in create mode 100644 tests/compiler/array/input/registers_ones.in create mode 100644 tests/compiler/array/input/registers_zeros.in create mode 100644 tests/compiler/array/input/six_zeros.in create mode 100644 tests/compiler/array/input/three_ones.in create mode 100644 tests/compiler/array/input/type_nested_value_nested_3x2.in create mode 100644 tests/compiler/array/input/type_nested_value_nested_3x2_fail.in create mode 100644 tests/compiler/array/input/type_nested_value_nested_4x3x2.in create mode 100644 tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in create mode 100644 tests/compiler/array/input/type_nested_value_tuple_3x2.in create mode 100644 tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in create mode 100644 tests/compiler/array/input/type_nested_value_tuple_4x3x2.in create mode 100644 tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in create mode 100644 tests/compiler/array/input/type_tuple_value_nested_3x2.in create mode 100644 tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in create mode 100644 tests/compiler/array/input/type_tuple_value_nested_4x3x2.in create mode 100644 tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in create mode 100644 tests/compiler/array/input/type_tuple_value_tuple_3x2.in create mode 100644 tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in create mode 100644 tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in create mode 100644 tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in create mode 100644 tests/compiler/array/input_nested_3x2.leo create mode 100644 tests/compiler/array/input_nested_3x2_fail.leo create mode 100644 tests/compiler/array/input_tuple_3x2.leo create mode 100644 tests/compiler/array/input_tuple_3x2_fail.leo create mode 100644 tests/compiler/array/mod.rs create mode 100644 tests/compiler/array/multi_fail_initializer.leo create mode 100644 tests/compiler/array/multi_fail_inline.leo create mode 100644 tests/compiler/array/multi_initializer.leo create mode 100644 tests/compiler/array/multi_initializer_fail.leo create mode 100644 tests/compiler/array/nested.leo create mode 100644 tests/compiler/array/nested_3x2_value.leo create mode 100644 tests/compiler/array/nested_3x2_value_fail.leo create mode 100644 tests/compiler/array/registers.leo create mode 100644 tests/compiler/array/slice.leo create mode 100644 tests/compiler/array/slice_lower.leo create mode 100644 tests/compiler/array/spread.leo create mode 100644 tests/compiler/array/tuple_3x2_value.leo create mode 100644 tests/compiler/array/tuple_3x2_value_fail.leo create mode 100644 tests/compiler/array/type_fail.leo create mode 100644 tests/compiler/array/type_input_3x2.leo create mode 100644 tests/compiler/array/type_input_4x3x2.leo create mode 100644 tests/compiler/array/type_nested_value_nested_3x2.leo create mode 100644 tests/compiler/array/type_nested_value_nested_3x2_fail.leo create mode 100644 tests/compiler/array/type_nested_value_nested_4x3x2.leo create mode 100644 tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo create mode 100644 tests/compiler/array/type_nested_value_tuple_3x2.leo create mode 100644 tests/compiler/array/type_nested_value_tuple_3x2_fail.leo create mode 100644 tests/compiler/array/type_nested_value_tuple_4x3x2.leo create mode 100644 tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo create mode 100644 tests/compiler/array/type_tuple_value_nested_3x2.leo create mode 100644 tests/compiler/array/type_tuple_value_nested_3x2_fail.leo create mode 100644 tests/compiler/array/type_tuple_value_nested_4x3x2.leo create mode 100644 tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo create mode 100644 tests/compiler/array/type_tuple_value_tuple_3x2.leo create mode 100644 tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo create mode 100644 tests/compiler/array/type_tuple_value_tuple_4x3x2.leo create mode 100644 tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo create mode 100644 tests/compiler/array/variable_slice_fail.leo create mode 100644 tests/compiler/boolean/and.leo create mode 100644 tests/compiler/boolean/conditional.leo create mode 100644 tests/compiler/boolean/equal.leo create mode 100644 tests/compiler/boolean/input/false_false.in create mode 100644 tests/compiler/boolean/input/false_true.in create mode 100644 tests/compiler/boolean/input/true_false.in create mode 100644 tests/compiler/boolean/input/true_true.in create mode 100644 tests/compiler/boolean/not_equal.leo create mode 100644 tests/compiler/boolean/or.leo create mode 100644 tests/compiler/circuits/const_self_variable.leo create mode 100644 tests/compiler/circuits/const_self_variable_fail.leo create mode 100644 tests/compiler/circuits/define_circuit_inside_circuit_function.leo create mode 100644 tests/compiler/circuits/duplicate_name_context.leo create mode 100644 tests/compiler/circuits/inline.leo create mode 100644 tests/compiler/circuits/inline_fail.leo create mode 100644 tests/compiler/circuits/inline_member_fail.leo create mode 100644 tests/compiler/circuits/inline_member_pass.leo create mode 100644 tests/compiler/circuits/inline_undefined.leo create mode 100644 tests/compiler/circuits/member_function.leo create mode 100644 tests/compiler/circuits/member_function_fail.leo create mode 100644 tests/compiler/circuits/member_function_invalid.leo create mode 100644 tests/compiler/circuits/member_function_nested.leo create mode 100644 tests/compiler/circuits/member_static_function.leo create mode 100644 tests/compiler/circuits/member_static_function_invalid.leo create mode 100644 tests/compiler/circuits/member_static_function_nested.leo create mode 100644 tests/compiler/circuits/member_static_function_undefined.leo create mode 100644 tests/compiler/circuits/member_variable.leo create mode 100644 tests/compiler/circuits/member_variable_and_function.leo create mode 100644 tests/compiler/circuits/member_variable_fail.leo create mode 100644 tests/compiler/circuits/mod.rs create mode 100644 tests/compiler/circuits/mut_function_fail.leo create mode 100644 tests/compiler/circuits/mut_self_function_fail.leo create mode 100644 tests/compiler/circuits/mut_self_static_function_fail.leo create mode 100644 tests/compiler/circuits/mut_self_variable.leo create mode 100644 tests/compiler/circuits/mut_self_variable_branch.leo create mode 100644 tests/compiler/circuits/mut_self_variable_conditional.leo create mode 100644 tests/compiler/circuits/mut_self_variable_fail.leo create mode 100644 tests/compiler/circuits/mut_static_function_fail.leo create mode 100644 tests/compiler/circuits/mut_variable.leo create mode 100644 tests/compiler/circuits/mut_variable_fail.leo create mode 100644 tests/compiler/circuits/mutable_call_immutable_context.leo create mode 100644 tests/compiler/circuits/pedersen_mock.leo create mode 100644 tests/compiler/circuits/self_circuit.leo create mode 100644 tests/compiler/circuits/self_fail.leo create mode 100644 tests/compiler/circuits/self_member.leo create mode 100644 tests/compiler/circuits/self_member_invalid.leo create mode 100644 tests/compiler/circuits/self_member_undefined.leo create mode 100644 tests/compiler/console/assert.leo create mode 100644 tests/compiler/console/conditional_assert.leo create mode 100644 tests/compiler/console/debug.leo create mode 100644 tests/compiler/console/error.leo create mode 100644 tests/compiler/console/input/input_equal.in create mode 100644 tests/compiler/console/input/input_unequal.in create mode 100644 tests/compiler/console/log.leo create mode 100644 tests/compiler/console/log_conditional.leo create mode 100644 tests/compiler/console/log_fail.leo create mode 100644 tests/compiler/console/log_input.leo create mode 100644 tests/compiler/console/log_parameter.leo create mode 100644 tests/compiler/console/log_parameter_fail_empty.leo create mode 100644 tests/compiler/console/log_parameter_fail_none.leo create mode 100644 tests/compiler/console/log_parameter_fail_unknown.leo create mode 100644 tests/compiler/console/log_parameter_many.leo create mode 100644 tests/compiler/console/mod.rs create mode 100644 tests/compiler/core/core_circuit_invalid.leo create mode 100644 tests/compiler/core/core_circuit_star_fail.leo create mode 100644 tests/compiler/core/core_package_invalid.leo create mode 100644 tests/compiler/core/core_unstable_package_invalid.leo create mode 100644 tests/compiler/core/mod.rs create mode 100644 tests/compiler/core/packages/mod.rs create mode 100644 tests/compiler/core/packages/unstable/blake2s/arguments_length_fail.leo create mode 100644 tests/compiler/core/packages/unstable/blake2s/arguments_type_fail.leo create mode 100644 tests/compiler/core/packages/unstable/blake2s/blake2s_input.leo create mode 100644 tests/compiler/core/packages/unstable/blake2s/blake2s_random.leo create mode 100644 tests/compiler/core/packages/unstable/blake2s/inputs/valid_input.in create mode 100644 tests/compiler/core/packages/unstable/blake2s/mod.rs create mode 100644 tests/compiler/core/packages/unstable/blake2s/outputs/valid_output.out create mode 100644 tests/compiler/core/packages/unstable/mod.rs create mode 100644 tests/compiler/core/unstable_blake2s.leo create mode 100644 tests/compiler/definition/mod.rs create mode 100644 tests/compiler/definition/out_of_order.leo create mode 100644 tests/compiler/definition/out_of_order_with_import.leo create mode 100644 tests/compiler/field/add.leo create mode 100644 tests/compiler/field/console_assert.leo create mode 100644 tests/compiler/field/div.leo create mode 100644 tests/compiler/field/eq.leo create mode 100644 tests/compiler/field/field.leo create mode 100644 tests/compiler/field/input/register_one.in create mode 100644 tests/compiler/field/input/register_zero.in create mode 100644 tests/compiler/field/mod.rs create mode 100644 tests/compiler/field/mul.leo create mode 100644 tests/compiler/field/negate.leo create mode 100644 tests/compiler/field/no_space_between_literal.leo create mode 100644 tests/compiler/field/output/register_one.out create mode 100644 tests/compiler/field/output/register_zero.out create mode 100644 tests/compiler/field/output_register.leo create mode 100644 tests/compiler/field/sub.leo create mode 100644 tests/compiler/field/ternary.leo create mode 100644 tests/compiler/function/array_input.leo create mode 100644 tests/compiler/function/array_params_direct_call.leo create mode 100644 tests/compiler/function/conditional_return.leo create mode 100644 tests/compiler/function/duplicate_definition.leo create mode 100644 tests/compiler/function/empty.leo create mode 100644 tests/compiler/function/input/conditional_return.in create mode 100644 tests/compiler/function/input/newlines.in create mode 100644 tests/compiler/function/input/registers.in create mode 100644 tests/compiler/function/iteration.leo create mode 100644 tests/compiler/function/iteration_repeated.leo create mode 100644 tests/compiler/function/mod.rs create mode 100644 tests/compiler/function/multiple_returns.leo create mode 100644 tests/compiler/function/multiple_returns_fail.leo create mode 100644 tests/compiler/function/multiple_returns_fail_conditional.leo create mode 100644 tests/compiler/function/multiple_returns_main.leo create mode 100644 tests/compiler/function/newlines.leo create mode 100644 tests/compiler/function/output/conditional_return.out create mode 100644 tests/compiler/function/output/newlines.out create mode 100644 tests/compiler/function/output/registers.out create mode 100644 tests/compiler/function/repeated.leo create mode 100644 tests/compiler/function/return.leo create mode 100644 tests/compiler/function/return_array_nested_fail.leo create mode 100644 tests/compiler/function/return_array_nested_pass.leo create mode 100644 tests/compiler/function/return_array_tuple_fail.leo create mode 100644 tests/compiler/function/return_array_tuple_pass.leo create mode 100644 tests/compiler/function/return_tuple.leo create mode 100644 tests/compiler/function/return_tuple_conditional.leo create mode 100644 tests/compiler/function/scope_fail.leo create mode 100644 tests/compiler/function/undefined.leo create mode 100644 tests/compiler/function/value_unchanged.leo create mode 100644 tests/compiler/group/add.leo create mode 100644 tests/compiler/group/assert_eq.leo create mode 100644 tests/compiler/group/both_sign_high.leo create mode 100644 tests/compiler/group/both_sign_inferred.leo create mode 100644 tests/compiler/group/both_sign_low.leo create mode 100644 tests/compiler/group/eq.leo create mode 100644 tests/compiler/group/input.leo create mode 100644 tests/compiler/group/input/invalid.in create mode 100644 tests/compiler/group/input/point.in create mode 100644 tests/compiler/group/input/valid.in create mode 100644 tests/compiler/group/mod.rs create mode 100644 tests/compiler/group/negate.leo create mode 100644 tests/compiler/group/no_space_between_literal.leo create mode 100644 tests/compiler/group/one.leo create mode 100644 tests/compiler/group/point.leo create mode 100644 tests/compiler/group/point_input.leo create mode 100644 tests/compiler/group/positive_and_negative.leo create mode 100644 tests/compiler/group/sub.leo create mode 100644 tests/compiler/group/ternary.leo create mode 100644 tests/compiler/group/x_and_y.leo create mode 100644 tests/compiler/group/x_sign_high.leo create mode 100644 tests/compiler/group/x_sign_inferred.leo create mode 100644 tests/compiler/group/x_sign_low.leo create mode 100644 tests/compiler/group/y_sign_high.leo create mode 100644 tests/compiler/group/y_sign_inferred.leo create mode 100644 tests/compiler/group/y_sign_low.leo create mode 100644 tests/compiler/group/zero.leo create mode 100644 tests/compiler/import/alias.leo create mode 100644 tests/compiler/import/basic.leo create mode 100755 tests/compiler/import/imports/bar/.gitignore create mode 100755 tests/compiler/import/imports/bar/Leo.toml create mode 100755 tests/compiler/import/imports/bar/src/bat/bat.leo create mode 100755 tests/compiler/import/imports/bar/src/baz.leo create mode 100755 tests/compiler/import/imports/bar/src/lib.leo create mode 100755 tests/compiler/import/imports/car/.gitignore create mode 100755 tests/compiler/import/imports/car/Leo.toml create mode 100755 tests/compiler/import/imports/car/src/lib.leo create mode 100644 tests/compiler/import/many_import.leo create mode 100644 tests/compiler/import/many_import_star.leo create mode 100644 tests/compiler/import/mod.rs create mode 100644 tests/compiler/import/multiple.leo create mode 100644 tests/compiler/import/names.leo create mode 100644 tests/compiler/import/names_a_dash.leo create mode 100644 tests/compiler/import/names_dash_a.leo create mode 100644 tests/compiler/import/names_dollar.leo create mode 100644 tests/compiler/import/names_underscore.leo create mode 100644 tests/compiler/import/src/a-9.leo create mode 100644 tests/compiler/import/src/a0-f.leo create mode 100644 tests/compiler/import/src/hello-world.leo create mode 100644 tests/compiler/import/src/test-import.leo create mode 100644 tests/compiler/import/star.leo create mode 100644 tests/compiler/import/star_fail.leo create mode 100644 tests/compiler/input_files/mod.rs create mode 100644 tests/compiler/input_files/program_input/input/main.in create mode 100644 tests/compiler/input_files/program_input/input/main_array.in create mode 100644 tests/compiler/input_files/program_input/input/main_array_fail.in create mode 100644 tests/compiler/input_files/program_input/input/main_fail_name.in create mode 100644 tests/compiler/input_files/program_input/input/main_fail_type.in create mode 100644 tests/compiler/input_files/program_input/input/main_field.in create mode 100644 tests/compiler/input_files/program_input/input/main_group.in create mode 100644 tests/compiler/input_files/program_input/input/main_multi_dimension_array.in create mode 100644 tests/compiler/input_files/program_input/input/main_multiple.in create mode 100644 tests/compiler/input_files/program_input/input/main_tuple_fail.in create mode 100644 tests/compiler/input_files/program_input/main.leo create mode 100644 tests/compiler/input_files/program_input/main_array.leo create mode 100644 tests/compiler/input_files/program_input/main_array_fail.leo create mode 100644 tests/compiler/input_files/program_input/main_field.leo create mode 100644 tests/compiler/input_files/program_input/main_group.leo create mode 100644 tests/compiler/input_files/program_input/main_multi_dimension_array.leo create mode 100644 tests/compiler/input_files/program_input/main_multiple.leo create mode 100644 tests/compiler/input_files/program_input/main_tuple_fail.leo create mode 100644 tests/compiler/input_files/program_input/mod.rs create mode 100644 tests/compiler/input_files/program_input_and_program_state/access.leo create mode 100644 tests/compiler/input_files/program_input_and_program_state/input/basic.in create mode 100644 tests/compiler/input_files/program_input_and_program_state/input/basic.state create mode 100644 tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in create mode 100644 tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state create mode 100644 tests/compiler/input_files/program_input_and_program_state/mod.rs create mode 100644 tests/compiler/input_files/program_input_constants/input/main.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_array.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_array_fail.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_double_declaration_fail.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_fail_name.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_fail_type.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_field.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_group.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_multiple.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_not_const_input_fail.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_type_mismatch.in create mode 100644 tests/compiler/input_files/program_input_constants/main.leo create mode 100644 tests/compiler/input_files/program_input_constants/main_array.leo create mode 100644 tests/compiler/input_files/program_input_constants/main_array_fail.leo create mode 100644 tests/compiler/input_files/program_input_constants/main_field.leo create mode 100644 tests/compiler/input_files/program_input_constants/main_group.leo create mode 100644 tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo create mode 100644 tests/compiler/input_files/program_input_constants/main_multiple.leo create mode 100644 tests/compiler/input_files/program_input_constants/main_tuple_fail.leo create mode 100644 tests/compiler/input_files/program_input_constants/mod.rs create mode 100644 tests/compiler/input_files/program_registers/input/array.in create mode 100644 tests/compiler/input_files/program_registers/input/main.in create mode 100644 tests/compiler/input_files/program_registers/mod.rs create mode 100644 tests/compiler/input_files/program_registers/output/registers_array.out create mode 100644 tests/compiler/input_files/program_registers/output/registers_pass.out create mode 100644 tests/compiler/input_files/program_registers/registers_array.leo create mode 100644 tests/compiler/input_files/program_registers/registers_fail.leo create mode 100644 tests/compiler/input_files/program_registers/registers_pass.leo create mode 100644 tests/compiler/input_files/program_state/access_all.leo create mode 100644 tests/compiler/input_files/program_state/access_state.leo create mode 100644 tests/compiler/input_files/program_state/input/basic.state create mode 100644 tests/compiler/input_files/program_state/input/section_invalid.state create mode 100644 tests/compiler/input_files/program_state/input/section_undefined.state create mode 100644 tests/compiler/input_files/program_state/input/token_withdraw.state create mode 100644 tests/compiler/input_files/program_state/input/visibility_fail.state create mode 100644 tests/compiler/input_files/program_state/mod.rs create mode 100644 tests/compiler/integers/i128/add.leo create mode 100644 tests/compiler/integers/i128/console_assert.leo create mode 100644 tests/compiler/integers/i128/div.leo create mode 100644 tests/compiler/integers/i128/eq.leo create mode 100644 tests/compiler/integers/i128/ge.leo create mode 100644 tests/compiler/integers/i128/gt.leo create mode 100644 tests/compiler/integers/i128/input.leo create mode 100644 tests/compiler/integers/i128/le.leo create mode 100644 tests/compiler/integers/i128/lt.leo create mode 100644 tests/compiler/integers/i128/max.leo create mode 100644 tests/compiler/integers/i128/max_fail.leo create mode 100644 tests/compiler/integers/i128/min.leo create mode 100644 tests/compiler/integers/i128/min_fail.leo create mode 100644 tests/compiler/integers/i128/mod.rs create mode 100644 tests/compiler/integers/i128/mul.leo create mode 100644 tests/compiler/integers/i128/ne.leo create mode 100644 tests/compiler/integers/i128/negate.leo create mode 100644 tests/compiler/integers/i128/negate_min.leo create mode 100644 tests/compiler/integers/i128/negate_zero.leo create mode 100644 tests/compiler/integers/i128/no_space_between_literal.leo create mode 100644 tests/compiler/integers/i128/pow.leo create mode 100644 tests/compiler/integers/i128/sub.leo create mode 100644 tests/compiler/integers/i128/ternary.leo create mode 100644 tests/compiler/integers/i16/add.leo create mode 100644 tests/compiler/integers/i16/console_assert.leo create mode 100644 tests/compiler/integers/i16/div.leo create mode 100644 tests/compiler/integers/i16/eq.leo create mode 100644 tests/compiler/integers/i16/ge.leo create mode 100644 tests/compiler/integers/i16/gt.leo create mode 100644 tests/compiler/integers/i16/input.leo create mode 100644 tests/compiler/integers/i16/le.leo create mode 100644 tests/compiler/integers/i16/lt.leo create mode 100644 tests/compiler/integers/i16/max.leo create mode 100644 tests/compiler/integers/i16/max_fail.leo create mode 100644 tests/compiler/integers/i16/min.leo create mode 100644 tests/compiler/integers/i16/min_fail.leo create mode 100644 tests/compiler/integers/i16/mod.rs create mode 100644 tests/compiler/integers/i16/mul.leo create mode 100644 tests/compiler/integers/i16/ne.leo create mode 100644 tests/compiler/integers/i16/negate.leo create mode 100644 tests/compiler/integers/i16/negate_min.leo create mode 100644 tests/compiler/integers/i16/negate_zero.leo create mode 100644 tests/compiler/integers/i16/no_space_between_literal.leo create mode 100644 tests/compiler/integers/i16/pow.leo create mode 100644 tests/compiler/integers/i16/sub.leo create mode 100644 tests/compiler/integers/i16/ternary.leo create mode 100644 tests/compiler/integers/i32/add.leo create mode 100644 tests/compiler/integers/i32/console_assert.leo create mode 100644 tests/compiler/integers/i32/div.leo create mode 100644 tests/compiler/integers/i32/eq.leo create mode 100644 tests/compiler/integers/i32/ge.leo create mode 100644 tests/compiler/integers/i32/gt.leo create mode 100644 tests/compiler/integers/i32/input.leo create mode 100644 tests/compiler/integers/i32/le.leo create mode 100644 tests/compiler/integers/i32/lt.leo create mode 100644 tests/compiler/integers/i32/max.leo create mode 100644 tests/compiler/integers/i32/max_fail.leo create mode 100644 tests/compiler/integers/i32/min.leo create mode 100644 tests/compiler/integers/i32/min_fail.leo create mode 100644 tests/compiler/integers/i32/mod.rs create mode 100644 tests/compiler/integers/i32/mul.leo create mode 100644 tests/compiler/integers/i32/ne.leo create mode 100644 tests/compiler/integers/i32/negate.leo create mode 100644 tests/compiler/integers/i32/negate_min.leo create mode 100644 tests/compiler/integers/i32/negate_zero.leo create mode 100644 tests/compiler/integers/i32/no_space_between_literal.leo create mode 100644 tests/compiler/integers/i32/pow.leo create mode 100644 tests/compiler/integers/i32/sub.leo create mode 100644 tests/compiler/integers/i32/ternary.leo create mode 100644 tests/compiler/integers/i64/add.leo create mode 100644 tests/compiler/integers/i64/console_assert.leo create mode 100644 tests/compiler/integers/i64/div.leo create mode 100644 tests/compiler/integers/i64/eq.leo create mode 100644 tests/compiler/integers/i64/ge.leo create mode 100644 tests/compiler/integers/i64/gt.leo create mode 100644 tests/compiler/integers/i64/input.leo create mode 100644 tests/compiler/integers/i64/le.leo create mode 100644 tests/compiler/integers/i64/lt.leo create mode 100644 tests/compiler/integers/i64/max.leo create mode 100644 tests/compiler/integers/i64/max_fail.leo create mode 100644 tests/compiler/integers/i64/min.leo create mode 100644 tests/compiler/integers/i64/min_fail.leo create mode 100644 tests/compiler/integers/i64/mod.rs create mode 100644 tests/compiler/integers/i64/mul.leo create mode 100644 tests/compiler/integers/i64/ne.leo create mode 100644 tests/compiler/integers/i64/negate.leo create mode 100644 tests/compiler/integers/i64/negate_min.leo create mode 100644 tests/compiler/integers/i64/negate_zero.leo create mode 100644 tests/compiler/integers/i64/no_space_between_literal.leo create mode 100644 tests/compiler/integers/i64/pow.leo create mode 100644 tests/compiler/integers/i64/sub.leo create mode 100644 tests/compiler/integers/i64/ternary.leo create mode 100644 tests/compiler/integers/i8/add.leo create mode 100644 tests/compiler/integers/i8/console_assert.leo create mode 100644 tests/compiler/integers/i8/div.leo create mode 100644 tests/compiler/integers/i8/eq.leo create mode 100644 tests/compiler/integers/i8/ge.leo create mode 100644 tests/compiler/integers/i8/gt.leo create mode 100644 tests/compiler/integers/i8/input.leo create mode 100644 tests/compiler/integers/i8/le.leo create mode 100644 tests/compiler/integers/i8/lt.leo create mode 100644 tests/compiler/integers/i8/max.leo create mode 100644 tests/compiler/integers/i8/max_fail.leo create mode 100644 tests/compiler/integers/i8/min.leo create mode 100644 tests/compiler/integers/i8/min_fail.leo create mode 100644 tests/compiler/integers/i8/mod.rs create mode 100644 tests/compiler/integers/i8/mul.leo create mode 100644 tests/compiler/integers/i8/ne.leo create mode 100644 tests/compiler/integers/i8/negate.leo create mode 100644 tests/compiler/integers/i8/negate_min.leo create mode 100644 tests/compiler/integers/i8/negate_zero.leo create mode 100644 tests/compiler/integers/i8/no_space_between_literal.leo create mode 100644 tests/compiler/integers/i8/pow.leo create mode 100644 tests/compiler/integers/i8/sub.leo create mode 100644 tests/compiler/integers/i8/ternary.leo create mode 100644 tests/compiler/integers/int_macro.rs create mode 100644 tests/compiler/integers/integer_tester.rs create mode 100644 tests/compiler/integers/mod.rs create mode 100644 tests/compiler/integers/u128/add.leo create mode 100644 tests/compiler/integers/u128/console_assert.leo create mode 100644 tests/compiler/integers/u128/div.leo create mode 100644 tests/compiler/integers/u128/eq.leo create mode 100644 tests/compiler/integers/u128/ge.leo create mode 100644 tests/compiler/integers/u128/gt.leo create mode 100644 tests/compiler/integers/u128/input.leo create mode 100644 tests/compiler/integers/u128/le.leo create mode 100644 tests/compiler/integers/u128/lt.leo create mode 100644 tests/compiler/integers/u128/max.leo create mode 100644 tests/compiler/integers/u128/max_fail.leo create mode 100644 tests/compiler/integers/u128/min.leo create mode 100644 tests/compiler/integers/u128/min_fail.leo create mode 100644 tests/compiler/integers/u128/mod.rs create mode 100644 tests/compiler/integers/u128/mul.leo create mode 100644 tests/compiler/integers/u128/ne.leo create mode 100644 tests/compiler/integers/u128/no_space_between_literal.leo create mode 100644 tests/compiler/integers/u128/pow.leo create mode 100644 tests/compiler/integers/u128/sub.leo create mode 100644 tests/compiler/integers/u128/ternary.leo create mode 100644 tests/compiler/integers/u16/add.leo create mode 100644 tests/compiler/integers/u16/console_assert.leo create mode 100644 tests/compiler/integers/u16/div.leo create mode 100644 tests/compiler/integers/u16/eq.leo create mode 100644 tests/compiler/integers/u16/ge.leo create mode 100644 tests/compiler/integers/u16/gt.leo create mode 100644 tests/compiler/integers/u16/input.leo create mode 100644 tests/compiler/integers/u16/le.leo create mode 100644 tests/compiler/integers/u16/lt.leo create mode 100644 tests/compiler/integers/u16/max.leo create mode 100644 tests/compiler/integers/u16/max_fail.leo create mode 100644 tests/compiler/integers/u16/min.leo create mode 100644 tests/compiler/integers/u16/min_fail.leo create mode 100644 tests/compiler/integers/u16/mod.rs create mode 100644 tests/compiler/integers/u16/mul.leo create mode 100644 tests/compiler/integers/u16/ne.leo create mode 100644 tests/compiler/integers/u16/no_space_between_literal.leo create mode 100644 tests/compiler/integers/u16/pow.leo create mode 100644 tests/compiler/integers/u16/sub.leo create mode 100644 tests/compiler/integers/u16/ternary.leo create mode 100644 tests/compiler/integers/u32/add.leo create mode 100644 tests/compiler/integers/u32/console_assert.leo create mode 100644 tests/compiler/integers/u32/div.leo create mode 100644 tests/compiler/integers/u32/eq.leo create mode 100644 tests/compiler/integers/u32/ge.leo create mode 100644 tests/compiler/integers/u32/gt.leo create mode 100644 tests/compiler/integers/u32/input.leo create mode 100644 tests/compiler/integers/u32/le.leo create mode 100644 tests/compiler/integers/u32/lt.leo create mode 100644 tests/compiler/integers/u32/max.leo create mode 100644 tests/compiler/integers/u32/max_fail.leo create mode 100644 tests/compiler/integers/u32/min.leo create mode 100644 tests/compiler/integers/u32/min_fail.leo create mode 100644 tests/compiler/integers/u32/mod.rs create mode 100644 tests/compiler/integers/u32/mul.leo create mode 100644 tests/compiler/integers/u32/ne.leo create mode 100644 tests/compiler/integers/u32/no_space_between_literal.leo create mode 100644 tests/compiler/integers/u32/pow.leo create mode 100644 tests/compiler/integers/u32/sub.leo create mode 100644 tests/compiler/integers/u32/ternary.leo create mode 100644 tests/compiler/integers/u64/add.leo create mode 100644 tests/compiler/integers/u64/console_assert.leo create mode 100644 tests/compiler/integers/u64/div.leo create mode 100644 tests/compiler/integers/u64/eq.leo create mode 100644 tests/compiler/integers/u64/ge.leo create mode 100644 tests/compiler/integers/u64/gt.leo create mode 100644 tests/compiler/integers/u64/input.leo create mode 100644 tests/compiler/integers/u64/le.leo create mode 100644 tests/compiler/integers/u64/lt.leo create mode 100644 tests/compiler/integers/u64/max.leo create mode 100644 tests/compiler/integers/u64/max_fail.leo create mode 100644 tests/compiler/integers/u64/min.leo create mode 100644 tests/compiler/integers/u64/min_fail.leo create mode 100644 tests/compiler/integers/u64/mod.rs create mode 100644 tests/compiler/integers/u64/mul.leo create mode 100644 tests/compiler/integers/u64/ne.leo create mode 100644 tests/compiler/integers/u64/no_space_between_literal.leo create mode 100644 tests/compiler/integers/u64/pow.leo create mode 100644 tests/compiler/integers/u64/sub.leo create mode 100644 tests/compiler/integers/u64/ternary.leo create mode 100644 tests/compiler/integers/u8/add.leo create mode 100644 tests/compiler/integers/u8/console_assert.leo create mode 100644 tests/compiler/integers/u8/div.leo create mode 100644 tests/compiler/integers/u8/eq.leo create mode 100644 tests/compiler/integers/u8/ge.leo create mode 100644 tests/compiler/integers/u8/gt.leo create mode 100644 tests/compiler/integers/u8/input.leo create mode 100644 tests/compiler/integers/u8/le.leo create mode 100644 tests/compiler/integers/u8/lt.leo create mode 100644 tests/compiler/integers/u8/max.leo create mode 100644 tests/compiler/integers/u8/max_fail.leo create mode 100644 tests/compiler/integers/u8/min.leo create mode 100644 tests/compiler/integers/u8/min_fail.leo create mode 100644 tests/compiler/integers/u8/mod.rs create mode 100644 tests/compiler/integers/u8/mul.leo create mode 100644 tests/compiler/integers/u8/ne.leo create mode 100644 tests/compiler/integers/u8/no_space_between_literal.leo create mode 100644 tests/compiler/integers/u8/pow.leo create mode 100644 tests/compiler/integers/u8/sub.leo create mode 100644 tests/compiler/integers/u8/ternary.leo create mode 100644 tests/compiler/integers/uint_macro.rs create mode 100644 tests/compiler/mutability/array.leo create mode 100644 tests/compiler/mutability/array_mut.leo create mode 100644 tests/compiler/mutability/array_splice_mut.leo create mode 100644 tests/compiler/mutability/array_tuple_mut.leo create mode 100644 tests/compiler/mutability/circuit.leo create mode 100644 tests/compiler/mutability/circuit_function_mut.leo create mode 100644 tests/compiler/mutability/circuit_mut.leo create mode 100644 tests/compiler/mutability/circuit_static_function_mut.leo create mode 100644 tests/compiler/mutability/circuit_variable_mut.leo create mode 100644 tests/compiler/mutability/cond_mut.leo create mode 100644 tests/compiler/mutability/const.leo create mode 100644 tests/compiler/mutability/function_input.leo create mode 100644 tests/compiler/mutability/function_input_mut.leo create mode 100644 tests/compiler/mutability/let.leo create mode 100644 tests/compiler/mutability/let_mut.leo create mode 100644 tests/compiler/mutability/let_mut_nested.leo create mode 100644 tests/compiler/mutability/mod.rs create mode 100644 tests/compiler/mutability/swap.leo create mode 100644 tests/compiler/statements/block.leo create mode 100644 tests/compiler/statements/chain.leo create mode 100644 tests/compiler/statements/for_loop.leo create mode 100644 tests/compiler/statements/iteration_basic.leo create mode 100644 tests/compiler/statements/iteration_variable.leo create mode 100644 tests/compiler/statements/multiple_returns.leo create mode 100644 tests/compiler/statements/mutate.leo create mode 100644 tests/compiler/statements/nested_mutate.leo create mode 100644 tests/compiler/statements/u32_3.in create mode 100644 tests/compiler/statements/u32_5.in create mode 100644 tests/compiler/statements/u32_6.in create mode 100644 tests/compiler/tuples/basic.leo create mode 100644 tests/compiler/tuples/dependent.leo create mode 100644 tests/compiler/tuples/destructured.leo create mode 100644 tests/compiler/tuples/inputs/true_true.in create mode 100644 tests/compiler/tuples/nested_access.leo create mode 100644 tests/expectations/compiler/compiler/address/equal.leo.out create mode 100644 tests/expectations/compiler/compiler/address/ternary.leo.out create mode 100644 tests/expectations/compiler/compiler/array/equal_initializer.leo.out create mode 100644 tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out create mode 100644 tests/expectations/compiler/compiler/boolean/and.leo.out create mode 100644 tests/expectations/compiler/compiler/boolean/conditional.leo.out create mode 100644 tests/expectations/compiler/compiler/boolean/equal.leo.out create mode 100644 tests/expectations/compiler/compiler/boolean/not_equal.leo.out create mode 100644 tests/expectations/compiler/compiler/boolean/or.leo.out create mode 100644 tests/expectations/compiler/compiler/statements/block.leo.out create mode 100644 tests/expectations/compiler/compiler/statements/chain.leo.out create mode 100644 tests/expectations/compiler/compiler/statements/for_loop.leo.out create mode 100644 tests/expectations/compiler/compiler/statements/iteration_basic.leo.out create mode 100644 tests/expectations/compiler/compiler/statements/iteration_variable.leo.out create mode 100644 tests/expectations/compiler/compiler/statements/multiple_returns.leo.out create mode 100644 tests/expectations/compiler/compiler/statements/mutate.leo.out create mode 100644 tests/expectations/compiler/compiler/statements/nested_mutate.leo.out create mode 100644 tests/expectations/compiler/compiler/tuples/basic.leo.out create mode 100644 tests/expectations/compiler/compiler/tuples/dependent.leo.out create mode 100644 tests/expectations/compiler/compiler/tuples/destructured.leo.out create mode 100644 tests/expectations/compiler/compiler/tuples/nested_access.leo.out diff --git a/Cargo.lock b/Cargo.lock index 3435febc32..23275b42f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1305,12 +1305,15 @@ dependencies = [ "leo-package", "leo-parser", "leo-state", + "leo-synthesizer", + "leo-test-framework", "num-bigint", "pest", "rand", "rand_core", "rand_xorshift", "serde", + "serde_yaml", "sha2", "snarkvm-algorithms", "snarkvm-curves", @@ -1444,9 +1447,11 @@ dependencies = [ name = "leo-synthesizer" version = "1.4.0" dependencies = [ + "hex", "num-bigint", "serde", "serde_json", + "sha2", "snarkvm-curves", "snarkvm-fields", "snarkvm-gadgets", diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index ab918e75ec..5fac72ec42 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -49,6 +49,10 @@ version = "1.4.0" path = "../asg-passes" version = "1.4.0" +[dependencies.leo-synthesizer] +path = "../synthesizer" +version = "1.4.0" + [dependencies.snarkvm-curves] version = "0.2.2" default-features = false @@ -117,6 +121,13 @@ default-features = false [dev-dependencies.tempfile] version = "3.0.4" +[dev-dependencies.serde_yaml] +version = "0.8" + +[dev-dependencies.leo-test-framework] +path = "../test-framework" +version = "1.4.0" + [features] default = [ ] ci_skip = [ "leo-ast/ci_skip" ] diff --git a/compiler/tests/address/console_assert_fail.leo b/compiler/otests/address/console_assert_fail.leo similarity index 100% rename from compiler/tests/address/console_assert_fail.leo rename to compiler/otests/address/console_assert_fail.leo diff --git a/compiler/tests/address/console_assert_pass.leo b/compiler/otests/address/console_assert_pass.leo similarity index 100% rename from compiler/tests/address/console_assert_pass.leo rename to compiler/otests/address/console_assert_pass.leo diff --git a/compiler/tests/address/empty.leo b/compiler/otests/address/empty.leo similarity index 100% rename from compiler/tests/address/empty.leo rename to compiler/otests/address/empty.leo diff --git a/compiler/tests/address/equal.leo b/compiler/otests/address/equal.leo similarity index 100% rename from compiler/tests/address/equal.leo rename to compiler/otests/address/equal.leo diff --git a/compiler/tests/address/implicit_invalid.leo b/compiler/otests/address/implicit_invalid.leo similarity index 100% rename from compiler/tests/address/implicit_invalid.leo rename to compiler/otests/address/implicit_invalid.leo diff --git a/compiler/tests/address/implicit_valid.leo b/compiler/otests/address/implicit_valid.leo similarity index 100% rename from compiler/tests/address/implicit_valid.leo rename to compiler/otests/address/implicit_valid.leo diff --git a/compiler/tests/address/input.leo b/compiler/otests/address/input.leo similarity index 100% rename from compiler/tests/address/input.leo rename to compiler/otests/address/input.leo diff --git a/compiler/tests/address/invalid_length.leo b/compiler/otests/address/invalid_length.leo similarity index 100% rename from compiler/tests/address/invalid_length.leo rename to compiler/otests/address/invalid_length.leo diff --git a/compiler/tests/address/invalid_prefix.leo b/compiler/otests/address/invalid_prefix.leo similarity index 100% rename from compiler/tests/address/invalid_prefix.leo rename to compiler/otests/address/invalid_prefix.leo diff --git a/compiler/tests/address/mod.rs b/compiler/otests/address/mod.rs similarity index 100% rename from compiler/tests/address/mod.rs rename to compiler/otests/address/mod.rs diff --git a/compiler/tests/address/ternary.leo b/compiler/otests/address/ternary.leo similarity index 100% rename from compiler/tests/address/ternary.leo rename to compiler/otests/address/ternary.leo diff --git a/compiler/tests/address/valid.leo b/compiler/otests/address/valid.leo similarity index 100% rename from compiler/tests/address/valid.leo rename to compiler/otests/address/valid.leo diff --git a/compiler/tests/array/initializer.leo b/compiler/otests/array/initializer.leo similarity index 100% rename from compiler/tests/array/initializer.leo rename to compiler/otests/array/initializer.leo diff --git a/compiler/tests/array/initializer_fail.leo b/compiler/otests/array/initializer_fail.leo similarity index 100% rename from compiler/tests/array/initializer_fail.leo rename to compiler/otests/array/initializer_fail.leo diff --git a/compiler/tests/array/initializer_input.leo b/compiler/otests/array/initializer_input.leo similarity index 100% rename from compiler/tests/array/initializer_input.leo rename to compiler/otests/array/initializer_input.leo diff --git a/compiler/tests/array/inline.leo b/compiler/otests/array/inline.leo similarity index 100% rename from compiler/tests/array/inline.leo rename to compiler/otests/array/inline.leo diff --git a/compiler/tests/array/input/initializer_fail.in b/compiler/otests/array/input/initializer_fail.in similarity index 100% rename from compiler/tests/array/input/initializer_fail.in rename to compiler/otests/array/input/initializer_fail.in diff --git a/compiler/tests/array/input/inline_fail.leo b/compiler/otests/array/input/inline_fail.leo similarity index 100% rename from compiler/tests/array/input/inline_fail.leo rename to compiler/otests/array/input/inline_fail.leo diff --git a/compiler/tests/array/input/input_nested_3x2.in b/compiler/otests/array/input/input_nested_3x2.in similarity index 100% rename from compiler/tests/array/input/input_nested_3x2.in rename to compiler/otests/array/input/input_nested_3x2.in diff --git a/compiler/tests/array/input/input_nested_3x2_fail.in b/compiler/otests/array/input/input_nested_3x2_fail.in similarity index 100% rename from compiler/tests/array/input/input_nested_3x2_fail.in rename to compiler/otests/array/input/input_nested_3x2_fail.in diff --git a/compiler/tests/array/input/input_tuple_3x2.in b/compiler/otests/array/input/input_tuple_3x2.in similarity index 100% rename from compiler/tests/array/input/input_tuple_3x2.in rename to compiler/otests/array/input/input_tuple_3x2.in diff --git a/compiler/tests/array/input/input_tuple_3x2_fail.in b/compiler/otests/array/input/input_tuple_3x2_fail.in similarity index 100% rename from compiler/tests/array/input/input_tuple_3x2_fail.in rename to compiler/otests/array/input/input_tuple_3x2_fail.in diff --git a/compiler/tests/array/input/registers_ones.in b/compiler/otests/array/input/registers_ones.in similarity index 100% rename from compiler/tests/array/input/registers_ones.in rename to compiler/otests/array/input/registers_ones.in diff --git a/compiler/tests/array/input/registers_zeros.in b/compiler/otests/array/input/registers_zeros.in similarity index 100% rename from compiler/tests/array/input/registers_zeros.in rename to compiler/otests/array/input/registers_zeros.in diff --git a/compiler/tests/array/input/six_zeros.in b/compiler/otests/array/input/six_zeros.in similarity index 100% rename from compiler/tests/array/input/six_zeros.in rename to compiler/otests/array/input/six_zeros.in diff --git a/compiler/tests/array/input/three_ones.in b/compiler/otests/array/input/three_ones.in similarity index 100% rename from compiler/tests/array/input/three_ones.in rename to compiler/otests/array/input/three_ones.in diff --git a/compiler/tests/array/input/type_nested_value_nested_3x2.in b/compiler/otests/array/input/type_nested_value_nested_3x2.in similarity index 100% rename from compiler/tests/array/input/type_nested_value_nested_3x2.in rename to compiler/otests/array/input/type_nested_value_nested_3x2.in diff --git a/compiler/tests/array/input/type_nested_value_nested_3x2_fail.in b/compiler/otests/array/input/type_nested_value_nested_3x2_fail.in similarity index 100% rename from compiler/tests/array/input/type_nested_value_nested_3x2_fail.in rename to compiler/otests/array/input/type_nested_value_nested_3x2_fail.in diff --git a/compiler/tests/array/input/type_nested_value_nested_4x3x2.in b/compiler/otests/array/input/type_nested_value_nested_4x3x2.in similarity index 100% rename from compiler/tests/array/input/type_nested_value_nested_4x3x2.in rename to compiler/otests/array/input/type_nested_value_nested_4x3x2.in diff --git a/compiler/tests/array/input/type_nested_value_nested_4x3x2_fail.in b/compiler/otests/array/input/type_nested_value_nested_4x3x2_fail.in similarity index 100% rename from compiler/tests/array/input/type_nested_value_nested_4x3x2_fail.in rename to compiler/otests/array/input/type_nested_value_nested_4x3x2_fail.in diff --git a/compiler/tests/array/input/type_nested_value_tuple_3x2.in b/compiler/otests/array/input/type_nested_value_tuple_3x2.in similarity index 100% rename from compiler/tests/array/input/type_nested_value_tuple_3x2.in rename to compiler/otests/array/input/type_nested_value_tuple_3x2.in diff --git a/compiler/tests/array/input/type_nested_value_tuple_3x2_fail.in b/compiler/otests/array/input/type_nested_value_tuple_3x2_fail.in similarity index 100% rename from compiler/tests/array/input/type_nested_value_tuple_3x2_fail.in rename to compiler/otests/array/input/type_nested_value_tuple_3x2_fail.in diff --git a/compiler/tests/array/input/type_nested_value_tuple_4x3x2.in b/compiler/otests/array/input/type_nested_value_tuple_4x3x2.in similarity index 100% rename from compiler/tests/array/input/type_nested_value_tuple_4x3x2.in rename to compiler/otests/array/input/type_nested_value_tuple_4x3x2.in diff --git a/compiler/tests/array/input/type_nested_value_tuple_4x3x2_fail.in b/compiler/otests/array/input/type_nested_value_tuple_4x3x2_fail.in similarity index 100% rename from compiler/tests/array/input/type_nested_value_tuple_4x3x2_fail.in rename to compiler/otests/array/input/type_nested_value_tuple_4x3x2_fail.in diff --git a/compiler/tests/array/input/type_tuple_value_nested_3x2.in b/compiler/otests/array/input/type_tuple_value_nested_3x2.in similarity index 100% rename from compiler/tests/array/input/type_tuple_value_nested_3x2.in rename to compiler/otests/array/input/type_tuple_value_nested_3x2.in diff --git a/compiler/tests/array/input/type_tuple_value_nested_3x2_fail.in b/compiler/otests/array/input/type_tuple_value_nested_3x2_fail.in similarity index 100% rename from compiler/tests/array/input/type_tuple_value_nested_3x2_fail.in rename to compiler/otests/array/input/type_tuple_value_nested_3x2_fail.in diff --git a/compiler/tests/array/input/type_tuple_value_nested_4x3x2.in b/compiler/otests/array/input/type_tuple_value_nested_4x3x2.in similarity index 100% rename from compiler/tests/array/input/type_tuple_value_nested_4x3x2.in rename to compiler/otests/array/input/type_tuple_value_nested_4x3x2.in diff --git a/compiler/tests/array/input/type_tuple_value_nested_4x3x2_fail.in b/compiler/otests/array/input/type_tuple_value_nested_4x3x2_fail.in similarity index 100% rename from compiler/tests/array/input/type_tuple_value_nested_4x3x2_fail.in rename to compiler/otests/array/input/type_tuple_value_nested_4x3x2_fail.in diff --git a/compiler/tests/array/input/type_tuple_value_tuple_3x2.in b/compiler/otests/array/input/type_tuple_value_tuple_3x2.in similarity index 100% rename from compiler/tests/array/input/type_tuple_value_tuple_3x2.in rename to compiler/otests/array/input/type_tuple_value_tuple_3x2.in diff --git a/compiler/tests/array/input/type_tuple_value_tuple_3x2_fail.in b/compiler/otests/array/input/type_tuple_value_tuple_3x2_fail.in similarity index 100% rename from compiler/tests/array/input/type_tuple_value_tuple_3x2_fail.in rename to compiler/otests/array/input/type_tuple_value_tuple_3x2_fail.in diff --git a/compiler/tests/array/input/type_tuple_value_tuple_4x3x2.in b/compiler/otests/array/input/type_tuple_value_tuple_4x3x2.in similarity index 100% rename from compiler/tests/array/input/type_tuple_value_tuple_4x3x2.in rename to compiler/otests/array/input/type_tuple_value_tuple_4x3x2.in diff --git a/compiler/tests/array/input/type_tuple_value_tuple_4x3x2_fail.in b/compiler/otests/array/input/type_tuple_value_tuple_4x3x2_fail.in similarity index 100% rename from compiler/tests/array/input/type_tuple_value_tuple_4x3x2_fail.in rename to compiler/otests/array/input/type_tuple_value_tuple_4x3x2_fail.in diff --git a/compiler/tests/array/input_nested_3x2.leo b/compiler/otests/array/input_nested_3x2.leo similarity index 100% rename from compiler/tests/array/input_nested_3x2.leo rename to compiler/otests/array/input_nested_3x2.leo diff --git a/compiler/tests/array/input_nested_3x2_fail.leo b/compiler/otests/array/input_nested_3x2_fail.leo similarity index 100% rename from compiler/tests/array/input_nested_3x2_fail.leo rename to compiler/otests/array/input_nested_3x2_fail.leo diff --git a/compiler/tests/array/input_tuple_3x2.leo b/compiler/otests/array/input_tuple_3x2.leo similarity index 100% rename from compiler/tests/array/input_tuple_3x2.leo rename to compiler/otests/array/input_tuple_3x2.leo diff --git a/compiler/tests/array/input_tuple_3x2_fail.leo b/compiler/otests/array/input_tuple_3x2_fail.leo similarity index 100% rename from compiler/tests/array/input_tuple_3x2_fail.leo rename to compiler/otests/array/input_tuple_3x2_fail.leo diff --git a/compiler/tests/array/mod.rs b/compiler/otests/array/mod.rs similarity index 100% rename from compiler/tests/array/mod.rs rename to compiler/otests/array/mod.rs diff --git a/compiler/tests/array/multi_fail_initializer.leo b/compiler/otests/array/multi_fail_initializer.leo similarity index 100% rename from compiler/tests/array/multi_fail_initializer.leo rename to compiler/otests/array/multi_fail_initializer.leo diff --git a/compiler/tests/array/multi_fail_inline.leo b/compiler/otests/array/multi_fail_inline.leo similarity index 100% rename from compiler/tests/array/multi_fail_inline.leo rename to compiler/otests/array/multi_fail_inline.leo diff --git a/compiler/tests/array/multi_initializer.leo b/compiler/otests/array/multi_initializer.leo similarity index 100% rename from compiler/tests/array/multi_initializer.leo rename to compiler/otests/array/multi_initializer.leo diff --git a/compiler/tests/array/multi_initializer_fail.leo b/compiler/otests/array/multi_initializer_fail.leo similarity index 100% rename from compiler/tests/array/multi_initializer_fail.leo rename to compiler/otests/array/multi_initializer_fail.leo diff --git a/compiler/tests/array/nested.leo b/compiler/otests/array/nested.leo similarity index 100% rename from compiler/tests/array/nested.leo rename to compiler/otests/array/nested.leo diff --git a/compiler/tests/array/nested_3x2_value.leo b/compiler/otests/array/nested_3x2_value.leo similarity index 100% rename from compiler/tests/array/nested_3x2_value.leo rename to compiler/otests/array/nested_3x2_value.leo diff --git a/compiler/tests/array/nested_3x2_value_fail.leo b/compiler/otests/array/nested_3x2_value_fail.leo similarity index 100% rename from compiler/tests/array/nested_3x2_value_fail.leo rename to compiler/otests/array/nested_3x2_value_fail.leo diff --git a/compiler/tests/array/output/registers_ones.out b/compiler/otests/array/output/registers_ones.out similarity index 100% rename from compiler/tests/array/output/registers_ones.out rename to compiler/otests/array/output/registers_ones.out diff --git a/compiler/tests/array/output/registers_zeros.out b/compiler/otests/array/output/registers_zeros.out similarity index 100% rename from compiler/tests/array/output/registers_zeros.out rename to compiler/otests/array/output/registers_zeros.out diff --git a/compiler/tests/array/registers.leo b/compiler/otests/array/registers.leo similarity index 100% rename from compiler/tests/array/registers.leo rename to compiler/otests/array/registers.leo diff --git a/compiler/tests/array/slice.leo b/compiler/otests/array/slice.leo similarity index 100% rename from compiler/tests/array/slice.leo rename to compiler/otests/array/slice.leo diff --git a/compiler/tests/array/slice_lower.leo b/compiler/otests/array/slice_lower.leo similarity index 100% rename from compiler/tests/array/slice_lower.leo rename to compiler/otests/array/slice_lower.leo diff --git a/compiler/tests/array/spread.leo b/compiler/otests/array/spread.leo similarity index 100% rename from compiler/tests/array/spread.leo rename to compiler/otests/array/spread.leo diff --git a/compiler/tests/array/tuple_3x2_value.leo b/compiler/otests/array/tuple_3x2_value.leo similarity index 100% rename from compiler/tests/array/tuple_3x2_value.leo rename to compiler/otests/array/tuple_3x2_value.leo diff --git a/compiler/tests/array/tuple_3x2_value_fail.leo b/compiler/otests/array/tuple_3x2_value_fail.leo similarity index 100% rename from compiler/tests/array/tuple_3x2_value_fail.leo rename to compiler/otests/array/tuple_3x2_value_fail.leo diff --git a/compiler/tests/array/type_fail.leo b/compiler/otests/array/type_fail.leo similarity index 100% rename from compiler/tests/array/type_fail.leo rename to compiler/otests/array/type_fail.leo diff --git a/compiler/tests/array/type_input_3x2.leo b/compiler/otests/array/type_input_3x2.leo similarity index 100% rename from compiler/tests/array/type_input_3x2.leo rename to compiler/otests/array/type_input_3x2.leo diff --git a/compiler/tests/array/type_input_4x3x2.leo b/compiler/otests/array/type_input_4x3x2.leo similarity index 100% rename from compiler/tests/array/type_input_4x3x2.leo rename to compiler/otests/array/type_input_4x3x2.leo diff --git a/compiler/tests/array/type_nested_value_nested_3x2.leo b/compiler/otests/array/type_nested_value_nested_3x2.leo similarity index 100% rename from compiler/tests/array/type_nested_value_nested_3x2.leo rename to compiler/otests/array/type_nested_value_nested_3x2.leo diff --git a/compiler/tests/array/type_nested_value_nested_3x2_fail.leo b/compiler/otests/array/type_nested_value_nested_3x2_fail.leo similarity index 100% rename from compiler/tests/array/type_nested_value_nested_3x2_fail.leo rename to compiler/otests/array/type_nested_value_nested_3x2_fail.leo diff --git a/compiler/tests/array/type_nested_value_nested_4x3x2.leo b/compiler/otests/array/type_nested_value_nested_4x3x2.leo similarity index 100% rename from compiler/tests/array/type_nested_value_nested_4x3x2.leo rename to compiler/otests/array/type_nested_value_nested_4x3x2.leo diff --git a/compiler/tests/array/type_nested_value_nested_4x3x2_fail.leo b/compiler/otests/array/type_nested_value_nested_4x3x2_fail.leo similarity index 100% rename from compiler/tests/array/type_nested_value_nested_4x3x2_fail.leo rename to compiler/otests/array/type_nested_value_nested_4x3x2_fail.leo diff --git a/compiler/tests/array/type_nested_value_tuple_3x2.leo b/compiler/otests/array/type_nested_value_tuple_3x2.leo similarity index 100% rename from compiler/tests/array/type_nested_value_tuple_3x2.leo rename to compiler/otests/array/type_nested_value_tuple_3x2.leo diff --git a/compiler/tests/array/type_nested_value_tuple_3x2_fail.leo b/compiler/otests/array/type_nested_value_tuple_3x2_fail.leo similarity index 100% rename from compiler/tests/array/type_nested_value_tuple_3x2_fail.leo rename to compiler/otests/array/type_nested_value_tuple_3x2_fail.leo diff --git a/compiler/tests/array/type_nested_value_tuple_4x3x2.leo b/compiler/otests/array/type_nested_value_tuple_4x3x2.leo similarity index 100% rename from compiler/tests/array/type_nested_value_tuple_4x3x2.leo rename to compiler/otests/array/type_nested_value_tuple_4x3x2.leo diff --git a/compiler/tests/array/type_nested_value_tuple_4x3x2_fail.leo b/compiler/otests/array/type_nested_value_tuple_4x3x2_fail.leo similarity index 100% rename from compiler/tests/array/type_nested_value_tuple_4x3x2_fail.leo rename to compiler/otests/array/type_nested_value_tuple_4x3x2_fail.leo diff --git a/compiler/tests/array/type_tuple_value_nested_3x2.leo b/compiler/otests/array/type_tuple_value_nested_3x2.leo similarity index 100% rename from compiler/tests/array/type_tuple_value_nested_3x2.leo rename to compiler/otests/array/type_tuple_value_nested_3x2.leo diff --git a/compiler/tests/array/type_tuple_value_nested_3x2_fail.leo b/compiler/otests/array/type_tuple_value_nested_3x2_fail.leo similarity index 100% rename from compiler/tests/array/type_tuple_value_nested_3x2_fail.leo rename to compiler/otests/array/type_tuple_value_nested_3x2_fail.leo diff --git a/compiler/tests/array/type_tuple_value_nested_4x3x2.leo b/compiler/otests/array/type_tuple_value_nested_4x3x2.leo similarity index 100% rename from compiler/tests/array/type_tuple_value_nested_4x3x2.leo rename to compiler/otests/array/type_tuple_value_nested_4x3x2.leo diff --git a/compiler/tests/array/type_tuple_value_nested_4x3x2_fail.leo b/compiler/otests/array/type_tuple_value_nested_4x3x2_fail.leo similarity index 100% rename from compiler/tests/array/type_tuple_value_nested_4x3x2_fail.leo rename to compiler/otests/array/type_tuple_value_nested_4x3x2_fail.leo diff --git a/compiler/tests/array/type_tuple_value_tuple_3x2.leo b/compiler/otests/array/type_tuple_value_tuple_3x2.leo similarity index 100% rename from compiler/tests/array/type_tuple_value_tuple_3x2.leo rename to compiler/otests/array/type_tuple_value_tuple_3x2.leo diff --git a/compiler/tests/array/type_tuple_value_tuple_3x2_fail.leo b/compiler/otests/array/type_tuple_value_tuple_3x2_fail.leo similarity index 100% rename from compiler/tests/array/type_tuple_value_tuple_3x2_fail.leo rename to compiler/otests/array/type_tuple_value_tuple_3x2_fail.leo diff --git a/compiler/tests/array/type_tuple_value_tuple_4x3x2.leo b/compiler/otests/array/type_tuple_value_tuple_4x3x2.leo similarity index 100% rename from compiler/tests/array/type_tuple_value_tuple_4x3x2.leo rename to compiler/otests/array/type_tuple_value_tuple_4x3x2.leo diff --git a/compiler/tests/array/type_tuple_value_tuple_4x3x2_fail.leo b/compiler/otests/array/type_tuple_value_tuple_4x3x2_fail.leo similarity index 100% rename from compiler/tests/array/type_tuple_value_tuple_4x3x2_fail.leo rename to compiler/otests/array/type_tuple_value_tuple_4x3x2_fail.leo diff --git a/compiler/tests/array/variable_slice_fail.leo b/compiler/otests/array/variable_slice_fail.leo similarity index 100% rename from compiler/tests/array/variable_slice_fail.leo rename to compiler/otests/array/variable_slice_fail.leo diff --git a/compiler/tests/boolean/all.leo b/compiler/otests/boolean/all.leo similarity index 100% rename from compiler/tests/boolean/all.leo rename to compiler/otests/boolean/all.leo diff --git a/compiler/tests/boolean/assert_eq_input.leo b/compiler/otests/boolean/assert_eq_input.leo similarity index 100% rename from compiler/tests/boolean/assert_eq_input.leo rename to compiler/otests/boolean/assert_eq_input.leo diff --git a/compiler/tests/boolean/conditional_mut.leo b/compiler/otests/boolean/conditional_mut.leo similarity index 100% rename from compiler/tests/boolean/conditional_mut.leo rename to compiler/otests/boolean/conditional_mut.leo diff --git a/compiler/tests/boolean/false_and_false.leo b/compiler/otests/boolean/false_and_false.leo similarity index 100% rename from compiler/tests/boolean/false_and_false.leo rename to compiler/otests/boolean/false_and_false.leo diff --git a/compiler/tests/boolean/false_or_false.leo b/compiler/otests/boolean/false_or_false.leo similarity index 100% rename from compiler/tests/boolean/false_or_false.leo rename to compiler/otests/boolean/false_or_false.leo diff --git a/compiler/tests/boolean/input/registers_false.in b/compiler/otests/boolean/input/registers_false.in similarity index 100% rename from compiler/tests/boolean/input/registers_false.in rename to compiler/otests/boolean/input/registers_false.in diff --git a/compiler/tests/boolean/input/registers_true.in b/compiler/otests/boolean/input/registers_true.in similarity index 100% rename from compiler/tests/boolean/input/registers_true.in rename to compiler/otests/boolean/input/registers_true.in diff --git a/compiler/tests/boolean/input/true_false.in b/compiler/otests/boolean/input/true_false.in similarity index 100% rename from compiler/tests/boolean/input/true_false.in rename to compiler/otests/boolean/input/true_false.in diff --git a/compiler/tests/boolean/input/true_true.in b/compiler/otests/boolean/input/true_true.in similarity index 100% rename from compiler/tests/boolean/input/true_true.in rename to compiler/otests/boolean/input/true_true.in diff --git a/compiler/tests/boolean/mod.rs b/compiler/otests/boolean/mod.rs similarity index 100% rename from compiler/tests/boolean/mod.rs rename to compiler/otests/boolean/mod.rs diff --git a/compiler/tests/boolean/not_false.leo b/compiler/otests/boolean/not_false.leo similarity index 100% rename from compiler/tests/boolean/not_false.leo rename to compiler/otests/boolean/not_false.leo diff --git a/compiler/tests/boolean/not_mutable.leo b/compiler/otests/boolean/not_mutable.leo similarity index 100% rename from compiler/tests/boolean/not_mutable.leo rename to compiler/otests/boolean/not_mutable.leo diff --git a/compiler/tests/boolean/not_true.leo b/compiler/otests/boolean/not_true.leo similarity index 100% rename from compiler/tests/boolean/not_true.leo rename to compiler/otests/boolean/not_true.leo diff --git a/compiler/tests/boolean/not_u32.leo b/compiler/otests/boolean/not_u32.leo similarity index 100% rename from compiler/tests/boolean/not_u32.leo rename to compiler/otests/boolean/not_u32.leo diff --git a/compiler/tests/boolean/output/registers_false.out b/compiler/otests/boolean/output/registers_false.out similarity index 100% rename from compiler/tests/boolean/output/registers_false.out rename to compiler/otests/boolean/output/registers_false.out diff --git a/compiler/tests/boolean/output/registers_true.out b/compiler/otests/boolean/output/registers_true.out similarity index 100% rename from compiler/tests/boolean/output/registers_true.out rename to compiler/otests/boolean/output/registers_true.out diff --git a/compiler/tests/boolean/output_register.leo b/compiler/otests/boolean/output_register.leo similarity index 100% rename from compiler/tests/boolean/output_register.leo rename to compiler/otests/boolean/output_register.leo diff --git a/compiler/tests/boolean/true_and_false.leo b/compiler/otests/boolean/true_and_false.leo similarity index 100% rename from compiler/tests/boolean/true_and_false.leo rename to compiler/otests/boolean/true_and_false.leo diff --git a/compiler/tests/boolean/true_and_true.leo b/compiler/otests/boolean/true_and_true.leo similarity index 100% rename from compiler/tests/boolean/true_and_true.leo rename to compiler/otests/boolean/true_and_true.leo diff --git a/compiler/tests/boolean/true_and_u32.leo b/compiler/otests/boolean/true_and_u32.leo similarity index 100% rename from compiler/tests/boolean/true_and_u32.leo rename to compiler/otests/boolean/true_and_u32.leo diff --git a/compiler/tests/boolean/true_or_false.leo b/compiler/otests/boolean/true_or_false.leo similarity index 100% rename from compiler/tests/boolean/true_or_false.leo rename to compiler/otests/boolean/true_or_false.leo diff --git a/compiler/tests/boolean/true_or_true.leo b/compiler/otests/boolean/true_or_true.leo similarity index 100% rename from compiler/tests/boolean/true_or_true.leo rename to compiler/otests/boolean/true_or_true.leo diff --git a/compiler/tests/boolean/true_or_u32.leo b/compiler/otests/boolean/true_or_u32.leo similarity index 100% rename from compiler/tests/boolean/true_or_u32.leo rename to compiler/otests/boolean/true_or_u32.leo diff --git a/compiler/tests/canonicalization/array_expansion.json b/compiler/otests/canonicalization/array_expansion.json similarity index 100% rename from compiler/tests/canonicalization/array_expansion.json rename to compiler/otests/canonicalization/array_expansion.json diff --git a/compiler/tests/canonicalization/array_expansion.leo b/compiler/otests/canonicalization/array_expansion.leo similarity index 100% rename from compiler/tests/canonicalization/array_expansion.leo rename to compiler/otests/canonicalization/array_expansion.leo diff --git a/compiler/tests/canonicalization/array_size_zero_fail.leo b/compiler/otests/canonicalization/array_size_zero_fail.leo similarity index 100% rename from compiler/tests/canonicalization/array_size_zero_fail.leo rename to compiler/otests/canonicalization/array_size_zero_fail.leo diff --git a/compiler/tests/canonicalization/big_self_in_circuit_replacement.json b/compiler/otests/canonicalization/big_self_in_circuit_replacement.json similarity index 100% rename from compiler/tests/canonicalization/big_self_in_circuit_replacement.json rename to compiler/otests/canonicalization/big_self_in_circuit_replacement.json diff --git a/compiler/tests/canonicalization/big_self_in_circuit_replacement.leo b/compiler/otests/canonicalization/big_self_in_circuit_replacement.leo similarity index 100% rename from compiler/tests/canonicalization/big_self_in_circuit_replacement.leo rename to compiler/otests/canonicalization/big_self_in_circuit_replacement.leo diff --git a/compiler/tests/canonicalization/big_self_outside_circuit_fail.leo b/compiler/otests/canonicalization/big_self_outside_circuit_fail.leo similarity index 100% rename from compiler/tests/canonicalization/big_self_outside_circuit_fail.leo rename to compiler/otests/canonicalization/big_self_outside_circuit_fail.leo diff --git a/compiler/tests/canonicalization/compound_assignment.json b/compiler/otests/canonicalization/compound_assignment.json similarity index 100% rename from compiler/tests/canonicalization/compound_assignment.json rename to compiler/otests/canonicalization/compound_assignment.json diff --git a/compiler/tests/canonicalization/compound_assignment.leo b/compiler/otests/canonicalization/compound_assignment.leo similarity index 100% rename from compiler/tests/canonicalization/compound_assignment.leo rename to compiler/otests/canonicalization/compound_assignment.leo diff --git a/compiler/tests/canonicalization/input/array_expansion.in b/compiler/otests/canonicalization/input/array_expansion.in similarity index 100% rename from compiler/tests/canonicalization/input/array_expansion.in rename to compiler/otests/canonicalization/input/array_expansion.in diff --git a/compiler/tests/canonicalization/mod.rs b/compiler/otests/canonicalization/mod.rs similarity index 100% rename from compiler/tests/canonicalization/mod.rs rename to compiler/otests/canonicalization/mod.rs diff --git a/compiler/tests/circuits/const_self_variable.leo b/compiler/otests/circuits/const_self_variable.leo similarity index 100% rename from compiler/tests/circuits/const_self_variable.leo rename to compiler/otests/circuits/const_self_variable.leo diff --git a/compiler/tests/circuits/const_self_variable_fail.leo b/compiler/otests/circuits/const_self_variable_fail.leo similarity index 100% rename from compiler/tests/circuits/const_self_variable_fail.leo rename to compiler/otests/circuits/const_self_variable_fail.leo diff --git a/compiler/tests/circuits/define_circuit_inside_circuit_function.leo b/compiler/otests/circuits/define_circuit_inside_circuit_function.leo similarity index 100% rename from compiler/tests/circuits/define_circuit_inside_circuit_function.leo rename to compiler/otests/circuits/define_circuit_inside_circuit_function.leo diff --git a/compiler/tests/circuits/duplicate_name_context.leo b/compiler/otests/circuits/duplicate_name_context.leo similarity index 100% rename from compiler/tests/circuits/duplicate_name_context.leo rename to compiler/otests/circuits/duplicate_name_context.leo diff --git a/compiler/tests/circuits/inline.leo b/compiler/otests/circuits/inline.leo similarity index 100% rename from compiler/tests/circuits/inline.leo rename to compiler/otests/circuits/inline.leo diff --git a/compiler/tests/circuits/inline_fail.leo b/compiler/otests/circuits/inline_fail.leo similarity index 100% rename from compiler/tests/circuits/inline_fail.leo rename to compiler/otests/circuits/inline_fail.leo diff --git a/compiler/tests/circuits/inline_member_fail.leo b/compiler/otests/circuits/inline_member_fail.leo similarity index 100% rename from compiler/tests/circuits/inline_member_fail.leo rename to compiler/otests/circuits/inline_member_fail.leo diff --git a/compiler/tests/circuits/inline_member_pass.leo b/compiler/otests/circuits/inline_member_pass.leo similarity index 100% rename from compiler/tests/circuits/inline_member_pass.leo rename to compiler/otests/circuits/inline_member_pass.leo diff --git a/compiler/tests/circuits/inline_undefined.leo b/compiler/otests/circuits/inline_undefined.leo similarity index 100% rename from compiler/tests/circuits/inline_undefined.leo rename to compiler/otests/circuits/inline_undefined.leo diff --git a/compiler/tests/circuits/member_function.leo b/compiler/otests/circuits/member_function.leo similarity index 100% rename from compiler/tests/circuits/member_function.leo rename to compiler/otests/circuits/member_function.leo diff --git a/compiler/tests/circuits/member_function_fail.leo b/compiler/otests/circuits/member_function_fail.leo similarity index 100% rename from compiler/tests/circuits/member_function_fail.leo rename to compiler/otests/circuits/member_function_fail.leo diff --git a/compiler/tests/circuits/member_function_invalid.leo b/compiler/otests/circuits/member_function_invalid.leo similarity index 100% rename from compiler/tests/circuits/member_function_invalid.leo rename to compiler/otests/circuits/member_function_invalid.leo diff --git a/compiler/tests/circuits/member_function_nested.leo b/compiler/otests/circuits/member_function_nested.leo similarity index 100% rename from compiler/tests/circuits/member_function_nested.leo rename to compiler/otests/circuits/member_function_nested.leo diff --git a/compiler/tests/circuits/member_static_function.leo b/compiler/otests/circuits/member_static_function.leo similarity index 100% rename from compiler/tests/circuits/member_static_function.leo rename to compiler/otests/circuits/member_static_function.leo diff --git a/compiler/tests/circuits/member_static_function_invalid.leo b/compiler/otests/circuits/member_static_function_invalid.leo similarity index 100% rename from compiler/tests/circuits/member_static_function_invalid.leo rename to compiler/otests/circuits/member_static_function_invalid.leo diff --git a/compiler/tests/circuits/member_static_function_nested.leo b/compiler/otests/circuits/member_static_function_nested.leo similarity index 100% rename from compiler/tests/circuits/member_static_function_nested.leo rename to compiler/otests/circuits/member_static_function_nested.leo diff --git a/compiler/tests/circuits/member_static_function_undefined.leo b/compiler/otests/circuits/member_static_function_undefined.leo similarity index 100% rename from compiler/tests/circuits/member_static_function_undefined.leo rename to compiler/otests/circuits/member_static_function_undefined.leo diff --git a/compiler/tests/circuits/member_variable.leo b/compiler/otests/circuits/member_variable.leo similarity index 100% rename from compiler/tests/circuits/member_variable.leo rename to compiler/otests/circuits/member_variable.leo diff --git a/compiler/tests/circuits/member_variable_and_function.leo b/compiler/otests/circuits/member_variable_and_function.leo similarity index 100% rename from compiler/tests/circuits/member_variable_and_function.leo rename to compiler/otests/circuits/member_variable_and_function.leo diff --git a/compiler/tests/circuits/member_variable_fail.leo b/compiler/otests/circuits/member_variable_fail.leo similarity index 100% rename from compiler/tests/circuits/member_variable_fail.leo rename to compiler/otests/circuits/member_variable_fail.leo diff --git a/compiler/tests/circuits/mod.rs b/compiler/otests/circuits/mod.rs similarity index 100% rename from compiler/tests/circuits/mod.rs rename to compiler/otests/circuits/mod.rs diff --git a/compiler/tests/circuits/mut_function_fail.leo b/compiler/otests/circuits/mut_function_fail.leo similarity index 100% rename from compiler/tests/circuits/mut_function_fail.leo rename to compiler/otests/circuits/mut_function_fail.leo diff --git a/compiler/tests/circuits/mut_self_function_fail.leo b/compiler/otests/circuits/mut_self_function_fail.leo similarity index 100% rename from compiler/tests/circuits/mut_self_function_fail.leo rename to compiler/otests/circuits/mut_self_function_fail.leo diff --git a/compiler/tests/circuits/mut_self_static_function_fail.leo b/compiler/otests/circuits/mut_self_static_function_fail.leo similarity index 100% rename from compiler/tests/circuits/mut_self_static_function_fail.leo rename to compiler/otests/circuits/mut_self_static_function_fail.leo diff --git a/compiler/tests/circuits/mut_self_variable.leo b/compiler/otests/circuits/mut_self_variable.leo similarity index 100% rename from compiler/tests/circuits/mut_self_variable.leo rename to compiler/otests/circuits/mut_self_variable.leo diff --git a/compiler/tests/circuits/mut_self_variable_branch.leo b/compiler/otests/circuits/mut_self_variable_branch.leo similarity index 100% rename from compiler/tests/circuits/mut_self_variable_branch.leo rename to compiler/otests/circuits/mut_self_variable_branch.leo diff --git a/compiler/tests/circuits/mut_self_variable_conditional.leo b/compiler/otests/circuits/mut_self_variable_conditional.leo similarity index 100% rename from compiler/tests/circuits/mut_self_variable_conditional.leo rename to compiler/otests/circuits/mut_self_variable_conditional.leo diff --git a/compiler/tests/circuits/mut_self_variable_fail.leo b/compiler/otests/circuits/mut_self_variable_fail.leo similarity index 100% rename from compiler/tests/circuits/mut_self_variable_fail.leo rename to compiler/otests/circuits/mut_self_variable_fail.leo diff --git a/compiler/tests/circuits/mut_static_function_fail.leo b/compiler/otests/circuits/mut_static_function_fail.leo similarity index 100% rename from compiler/tests/circuits/mut_static_function_fail.leo rename to compiler/otests/circuits/mut_static_function_fail.leo diff --git a/compiler/tests/circuits/mut_variable.leo b/compiler/otests/circuits/mut_variable.leo similarity index 100% rename from compiler/tests/circuits/mut_variable.leo rename to compiler/otests/circuits/mut_variable.leo diff --git a/compiler/tests/circuits/mut_variable_fail.leo b/compiler/otests/circuits/mut_variable_fail.leo similarity index 100% rename from compiler/tests/circuits/mut_variable_fail.leo rename to compiler/otests/circuits/mut_variable_fail.leo diff --git a/compiler/tests/circuits/mutable_call_immutable_context.leo b/compiler/otests/circuits/mutable_call_immutable_context.leo similarity index 100% rename from compiler/tests/circuits/mutable_call_immutable_context.leo rename to compiler/otests/circuits/mutable_call_immutable_context.leo diff --git a/compiler/tests/circuits/pedersen_mock.leo b/compiler/otests/circuits/pedersen_mock.leo similarity index 100% rename from compiler/tests/circuits/pedersen_mock.leo rename to compiler/otests/circuits/pedersen_mock.leo diff --git a/compiler/tests/circuits/self_circuit.leo b/compiler/otests/circuits/self_circuit.leo similarity index 100% rename from compiler/tests/circuits/self_circuit.leo rename to compiler/otests/circuits/self_circuit.leo diff --git a/compiler/tests/circuits/self_fail.leo b/compiler/otests/circuits/self_fail.leo similarity index 100% rename from compiler/tests/circuits/self_fail.leo rename to compiler/otests/circuits/self_fail.leo diff --git a/compiler/tests/circuits/self_member.leo b/compiler/otests/circuits/self_member.leo similarity index 100% rename from compiler/tests/circuits/self_member.leo rename to compiler/otests/circuits/self_member.leo diff --git a/compiler/tests/circuits/self_member_invalid.leo b/compiler/otests/circuits/self_member_invalid.leo similarity index 100% rename from compiler/tests/circuits/self_member_invalid.leo rename to compiler/otests/circuits/self_member_invalid.leo diff --git a/compiler/tests/circuits/self_member_undefined.leo b/compiler/otests/circuits/self_member_undefined.leo similarity index 100% rename from compiler/tests/circuits/self_member_undefined.leo rename to compiler/otests/circuits/self_member_undefined.leo diff --git a/compiler/tests/compiler/main.leo b/compiler/otests/compiler/main.leo similarity index 100% rename from compiler/tests/compiler/main.leo rename to compiler/otests/compiler/main.leo diff --git a/compiler/tests/compiler/mod.rs b/compiler/otests/compiler/mod.rs similarity index 100% rename from compiler/tests/compiler/mod.rs rename to compiler/otests/compiler/mod.rs diff --git a/compiler/tests/compiler_output/empty.out b/compiler/otests/compiler_output/empty.out similarity index 100% rename from compiler/tests/compiler_output/empty.out rename to compiler/otests/compiler_output/empty.out diff --git a/compiler/tests/console/assert.leo b/compiler/otests/console/assert.leo similarity index 100% rename from compiler/tests/console/assert.leo rename to compiler/otests/console/assert.leo diff --git a/compiler/tests/console/conditional_assert.leo b/compiler/otests/console/conditional_assert.leo similarity index 100% rename from compiler/tests/console/conditional_assert.leo rename to compiler/otests/console/conditional_assert.leo diff --git a/compiler/tests/console/debug.leo b/compiler/otests/console/debug.leo similarity index 100% rename from compiler/tests/console/debug.leo rename to compiler/otests/console/debug.leo diff --git a/compiler/tests/console/error.leo b/compiler/otests/console/error.leo similarity index 100% rename from compiler/tests/console/error.leo rename to compiler/otests/console/error.leo diff --git a/compiler/tests/console/input/input_equal.in b/compiler/otests/console/input/input_equal.in similarity index 100% rename from compiler/tests/console/input/input_equal.in rename to compiler/otests/console/input/input_equal.in diff --git a/compiler/tests/console/input/input_unequal.in b/compiler/otests/console/input/input_unequal.in similarity index 100% rename from compiler/tests/console/input/input_unequal.in rename to compiler/otests/console/input/input_unequal.in diff --git a/compiler/tests/console/log.leo b/compiler/otests/console/log.leo similarity index 100% rename from compiler/tests/console/log.leo rename to compiler/otests/console/log.leo diff --git a/compiler/tests/console/log_conditional.leo b/compiler/otests/console/log_conditional.leo similarity index 100% rename from compiler/tests/console/log_conditional.leo rename to compiler/otests/console/log_conditional.leo diff --git a/compiler/tests/console/log_fail.leo b/compiler/otests/console/log_fail.leo similarity index 100% rename from compiler/tests/console/log_fail.leo rename to compiler/otests/console/log_fail.leo diff --git a/compiler/tests/console/log_input.leo b/compiler/otests/console/log_input.leo similarity index 100% rename from compiler/tests/console/log_input.leo rename to compiler/otests/console/log_input.leo diff --git a/compiler/tests/console/log_parameter.leo b/compiler/otests/console/log_parameter.leo similarity index 100% rename from compiler/tests/console/log_parameter.leo rename to compiler/otests/console/log_parameter.leo diff --git a/compiler/tests/console/log_parameter_fail_empty.leo b/compiler/otests/console/log_parameter_fail_empty.leo similarity index 100% rename from compiler/tests/console/log_parameter_fail_empty.leo rename to compiler/otests/console/log_parameter_fail_empty.leo diff --git a/compiler/tests/console/log_parameter_fail_none.leo b/compiler/otests/console/log_parameter_fail_none.leo similarity index 100% rename from compiler/tests/console/log_parameter_fail_none.leo rename to compiler/otests/console/log_parameter_fail_none.leo diff --git a/compiler/tests/console/log_parameter_fail_unknown.leo b/compiler/otests/console/log_parameter_fail_unknown.leo similarity index 100% rename from compiler/tests/console/log_parameter_fail_unknown.leo rename to compiler/otests/console/log_parameter_fail_unknown.leo diff --git a/compiler/tests/console/log_parameter_many.leo b/compiler/otests/console/log_parameter_many.leo similarity index 100% rename from compiler/tests/console/log_parameter_many.leo rename to compiler/otests/console/log_parameter_many.leo diff --git a/compiler/tests/console/mod.rs b/compiler/otests/console/mod.rs similarity index 100% rename from compiler/tests/console/mod.rs rename to compiler/otests/console/mod.rs diff --git a/compiler/tests/core/core_circuit_invalid.leo b/compiler/otests/core/core_circuit_invalid.leo similarity index 100% rename from compiler/tests/core/core_circuit_invalid.leo rename to compiler/otests/core/core_circuit_invalid.leo diff --git a/compiler/tests/core/core_circuit_star_fail.leo b/compiler/otests/core/core_circuit_star_fail.leo similarity index 100% rename from compiler/tests/core/core_circuit_star_fail.leo rename to compiler/otests/core/core_circuit_star_fail.leo diff --git a/compiler/tests/core/core_package_invalid.leo b/compiler/otests/core/core_package_invalid.leo similarity index 100% rename from compiler/tests/core/core_package_invalid.leo rename to compiler/otests/core/core_package_invalid.leo diff --git a/compiler/tests/core/core_unstable_package_invalid.leo b/compiler/otests/core/core_unstable_package_invalid.leo similarity index 100% rename from compiler/tests/core/core_unstable_package_invalid.leo rename to compiler/otests/core/core_unstable_package_invalid.leo diff --git a/compiler/tests/core/mod.rs b/compiler/otests/core/mod.rs similarity index 100% rename from compiler/tests/core/mod.rs rename to compiler/otests/core/mod.rs diff --git a/compiler/tests/core/packages/mod.rs b/compiler/otests/core/packages/mod.rs similarity index 100% rename from compiler/tests/core/packages/mod.rs rename to compiler/otests/core/packages/mod.rs diff --git a/compiler/tests/core/packages/unstable/blake2s/arguments_length_fail.leo b/compiler/otests/core/packages/unstable/blake2s/arguments_length_fail.leo similarity index 100% rename from compiler/tests/core/packages/unstable/blake2s/arguments_length_fail.leo rename to compiler/otests/core/packages/unstable/blake2s/arguments_length_fail.leo diff --git a/compiler/tests/core/packages/unstable/blake2s/arguments_type_fail.leo b/compiler/otests/core/packages/unstable/blake2s/arguments_type_fail.leo similarity index 100% rename from compiler/tests/core/packages/unstable/blake2s/arguments_type_fail.leo rename to compiler/otests/core/packages/unstable/blake2s/arguments_type_fail.leo diff --git a/compiler/tests/core/packages/unstable/blake2s/blake2s_input.leo b/compiler/otests/core/packages/unstable/blake2s/blake2s_input.leo similarity index 100% rename from compiler/tests/core/packages/unstable/blake2s/blake2s_input.leo rename to compiler/otests/core/packages/unstable/blake2s/blake2s_input.leo diff --git a/compiler/tests/core/packages/unstable/blake2s/blake2s_random.leo b/compiler/otests/core/packages/unstable/blake2s/blake2s_random.leo similarity index 100% rename from compiler/tests/core/packages/unstable/blake2s/blake2s_random.leo rename to compiler/otests/core/packages/unstable/blake2s/blake2s_random.leo diff --git a/compiler/tests/core/packages/unstable/blake2s/inputs/valid_input.in b/compiler/otests/core/packages/unstable/blake2s/inputs/valid_input.in similarity index 100% rename from compiler/tests/core/packages/unstable/blake2s/inputs/valid_input.in rename to compiler/otests/core/packages/unstable/blake2s/inputs/valid_input.in diff --git a/compiler/tests/core/packages/unstable/blake2s/mod.rs b/compiler/otests/core/packages/unstable/blake2s/mod.rs similarity index 100% rename from compiler/tests/core/packages/unstable/blake2s/mod.rs rename to compiler/otests/core/packages/unstable/blake2s/mod.rs diff --git a/compiler/tests/core/packages/unstable/blake2s/outputs/valid_output.out b/compiler/otests/core/packages/unstable/blake2s/outputs/valid_output.out similarity index 100% rename from compiler/tests/core/packages/unstable/blake2s/outputs/valid_output.out rename to compiler/otests/core/packages/unstable/blake2s/outputs/valid_output.out diff --git a/compiler/tests/core/packages/unstable/mod.rs b/compiler/otests/core/packages/unstable/mod.rs similarity index 100% rename from compiler/tests/core/packages/unstable/mod.rs rename to compiler/otests/core/packages/unstable/mod.rs diff --git a/compiler/tests/core/unstable_blake2s.leo b/compiler/otests/core/unstable_blake2s.leo similarity index 100% rename from compiler/tests/core/unstable_blake2s.leo rename to compiler/otests/core/unstable_blake2s.leo diff --git a/compiler/tests/definition/mod.rs b/compiler/otests/definition/mod.rs similarity index 100% rename from compiler/tests/definition/mod.rs rename to compiler/otests/definition/mod.rs diff --git a/compiler/tests/definition/out_of_order.leo b/compiler/otests/definition/out_of_order.leo similarity index 100% rename from compiler/tests/definition/out_of_order.leo rename to compiler/otests/definition/out_of_order.leo diff --git a/compiler/tests/definition/out_of_order_with_import.leo b/compiler/otests/definition/out_of_order_with_import.leo similarity index 100% rename from compiler/tests/definition/out_of_order_with_import.leo rename to compiler/otests/definition/out_of_order_with_import.leo diff --git a/compiler/tests/field/add.leo b/compiler/otests/field/add.leo similarity index 100% rename from compiler/tests/field/add.leo rename to compiler/otests/field/add.leo diff --git a/compiler/tests/field/console_assert.leo b/compiler/otests/field/console_assert.leo similarity index 100% rename from compiler/tests/field/console_assert.leo rename to compiler/otests/field/console_assert.leo diff --git a/compiler/tests/field/div.leo b/compiler/otests/field/div.leo similarity index 100% rename from compiler/tests/field/div.leo rename to compiler/otests/field/div.leo diff --git a/compiler/tests/field/eq.leo b/compiler/otests/field/eq.leo similarity index 100% rename from compiler/tests/field/eq.leo rename to compiler/otests/field/eq.leo diff --git a/compiler/tests/field/field.leo b/compiler/otests/field/field.leo similarity index 100% rename from compiler/tests/field/field.leo rename to compiler/otests/field/field.leo diff --git a/compiler/tests/field/input/register_one.in b/compiler/otests/field/input/register_one.in similarity index 100% rename from compiler/tests/field/input/register_one.in rename to compiler/otests/field/input/register_one.in diff --git a/compiler/tests/field/input/register_zero.in b/compiler/otests/field/input/register_zero.in similarity index 100% rename from compiler/tests/field/input/register_zero.in rename to compiler/otests/field/input/register_zero.in diff --git a/compiler/tests/field/mod.rs b/compiler/otests/field/mod.rs similarity index 100% rename from compiler/tests/field/mod.rs rename to compiler/otests/field/mod.rs diff --git a/compiler/tests/field/mul.leo b/compiler/otests/field/mul.leo similarity index 100% rename from compiler/tests/field/mul.leo rename to compiler/otests/field/mul.leo diff --git a/compiler/tests/field/negate.leo b/compiler/otests/field/negate.leo similarity index 100% rename from compiler/tests/field/negate.leo rename to compiler/otests/field/negate.leo diff --git a/compiler/tests/field/no_space_between_literal.leo b/compiler/otests/field/no_space_between_literal.leo similarity index 100% rename from compiler/tests/field/no_space_between_literal.leo rename to compiler/otests/field/no_space_between_literal.leo diff --git a/compiler/tests/field/output/register_one.out b/compiler/otests/field/output/register_one.out similarity index 100% rename from compiler/tests/field/output/register_one.out rename to compiler/otests/field/output/register_one.out diff --git a/compiler/tests/field/output/register_zero.out b/compiler/otests/field/output/register_zero.out similarity index 100% rename from compiler/tests/field/output/register_zero.out rename to compiler/otests/field/output/register_zero.out diff --git a/compiler/tests/field/output_register.leo b/compiler/otests/field/output_register.leo similarity index 100% rename from compiler/tests/field/output_register.leo rename to compiler/otests/field/output_register.leo diff --git a/compiler/tests/field/sub.leo b/compiler/otests/field/sub.leo similarity index 100% rename from compiler/tests/field/sub.leo rename to compiler/otests/field/sub.leo diff --git a/compiler/tests/field/ternary.leo b/compiler/otests/field/ternary.leo similarity index 100% rename from compiler/tests/field/ternary.leo rename to compiler/otests/field/ternary.leo diff --git a/compiler/tests/function/array_input.leo b/compiler/otests/function/array_input.leo similarity index 100% rename from compiler/tests/function/array_input.leo rename to compiler/otests/function/array_input.leo diff --git a/compiler/tests/function/array_params_direct_call.leo b/compiler/otests/function/array_params_direct_call.leo similarity index 100% rename from compiler/tests/function/array_params_direct_call.leo rename to compiler/otests/function/array_params_direct_call.leo diff --git a/compiler/tests/function/conditional_return.leo b/compiler/otests/function/conditional_return.leo similarity index 100% rename from compiler/tests/function/conditional_return.leo rename to compiler/otests/function/conditional_return.leo diff --git a/compiler/tests/function/duplicate_definition.leo b/compiler/otests/function/duplicate_definition.leo similarity index 100% rename from compiler/tests/function/duplicate_definition.leo rename to compiler/otests/function/duplicate_definition.leo diff --git a/compiler/tests/function/empty.leo b/compiler/otests/function/empty.leo similarity index 100% rename from compiler/tests/function/empty.leo rename to compiler/otests/function/empty.leo diff --git a/compiler/tests/function/input/conditional_return.in b/compiler/otests/function/input/conditional_return.in similarity index 100% rename from compiler/tests/function/input/conditional_return.in rename to compiler/otests/function/input/conditional_return.in diff --git a/compiler/tests/function/input/newlines.in b/compiler/otests/function/input/newlines.in similarity index 100% rename from compiler/tests/function/input/newlines.in rename to compiler/otests/function/input/newlines.in diff --git a/compiler/tests/function/input/registers.in b/compiler/otests/function/input/registers.in similarity index 100% rename from compiler/tests/function/input/registers.in rename to compiler/otests/function/input/registers.in diff --git a/compiler/tests/function/iteration.leo b/compiler/otests/function/iteration.leo similarity index 100% rename from compiler/tests/function/iteration.leo rename to compiler/otests/function/iteration.leo diff --git a/compiler/tests/function/iteration_repeated.leo b/compiler/otests/function/iteration_repeated.leo similarity index 100% rename from compiler/tests/function/iteration_repeated.leo rename to compiler/otests/function/iteration_repeated.leo diff --git a/compiler/tests/function/mod.rs b/compiler/otests/function/mod.rs similarity index 100% rename from compiler/tests/function/mod.rs rename to compiler/otests/function/mod.rs diff --git a/compiler/tests/function/multiple_returns.leo b/compiler/otests/function/multiple_returns.leo similarity index 100% rename from compiler/tests/function/multiple_returns.leo rename to compiler/otests/function/multiple_returns.leo diff --git a/compiler/tests/function/multiple_returns_fail.leo b/compiler/otests/function/multiple_returns_fail.leo similarity index 100% rename from compiler/tests/function/multiple_returns_fail.leo rename to compiler/otests/function/multiple_returns_fail.leo diff --git a/compiler/tests/function/multiple_returns_fail_conditional.leo b/compiler/otests/function/multiple_returns_fail_conditional.leo similarity index 100% rename from compiler/tests/function/multiple_returns_fail_conditional.leo rename to compiler/otests/function/multiple_returns_fail_conditional.leo diff --git a/compiler/tests/function/multiple_returns_main.leo b/compiler/otests/function/multiple_returns_main.leo similarity index 100% rename from compiler/tests/function/multiple_returns_main.leo rename to compiler/otests/function/multiple_returns_main.leo diff --git a/compiler/tests/function/newlines.leo b/compiler/otests/function/newlines.leo similarity index 100% rename from compiler/tests/function/newlines.leo rename to compiler/otests/function/newlines.leo diff --git a/compiler/tests/function/output/conditional_return.out b/compiler/otests/function/output/conditional_return.out similarity index 100% rename from compiler/tests/function/output/conditional_return.out rename to compiler/otests/function/output/conditional_return.out diff --git a/compiler/tests/function/output/newlines.out b/compiler/otests/function/output/newlines.out similarity index 100% rename from compiler/tests/function/output/newlines.out rename to compiler/otests/function/output/newlines.out diff --git a/compiler/tests/function/output/registers.out b/compiler/otests/function/output/registers.out similarity index 100% rename from compiler/tests/function/output/registers.out rename to compiler/otests/function/output/registers.out diff --git a/compiler/tests/function/repeated.leo b/compiler/otests/function/repeated.leo similarity index 100% rename from compiler/tests/function/repeated.leo rename to compiler/otests/function/repeated.leo diff --git a/compiler/tests/function/return.leo b/compiler/otests/function/return.leo similarity index 100% rename from compiler/tests/function/return.leo rename to compiler/otests/function/return.leo diff --git a/compiler/tests/function/return_array_nested_fail.leo b/compiler/otests/function/return_array_nested_fail.leo similarity index 100% rename from compiler/tests/function/return_array_nested_fail.leo rename to compiler/otests/function/return_array_nested_fail.leo diff --git a/compiler/tests/function/return_array_nested_pass.leo b/compiler/otests/function/return_array_nested_pass.leo similarity index 100% rename from compiler/tests/function/return_array_nested_pass.leo rename to compiler/otests/function/return_array_nested_pass.leo diff --git a/compiler/tests/function/return_array_tuple_fail.leo b/compiler/otests/function/return_array_tuple_fail.leo similarity index 100% rename from compiler/tests/function/return_array_tuple_fail.leo rename to compiler/otests/function/return_array_tuple_fail.leo diff --git a/compiler/tests/function/return_array_tuple_pass.leo b/compiler/otests/function/return_array_tuple_pass.leo similarity index 100% rename from compiler/tests/function/return_array_tuple_pass.leo rename to compiler/otests/function/return_array_tuple_pass.leo diff --git a/compiler/tests/function/return_tuple.leo b/compiler/otests/function/return_tuple.leo similarity index 100% rename from compiler/tests/function/return_tuple.leo rename to compiler/otests/function/return_tuple.leo diff --git a/compiler/tests/function/return_tuple_conditional.leo b/compiler/otests/function/return_tuple_conditional.leo similarity index 100% rename from compiler/tests/function/return_tuple_conditional.leo rename to compiler/otests/function/return_tuple_conditional.leo diff --git a/compiler/tests/function/scope_fail.leo b/compiler/otests/function/scope_fail.leo similarity index 100% rename from compiler/tests/function/scope_fail.leo rename to compiler/otests/function/scope_fail.leo diff --git a/compiler/tests/function/undefined.leo b/compiler/otests/function/undefined.leo similarity index 100% rename from compiler/tests/function/undefined.leo rename to compiler/otests/function/undefined.leo diff --git a/compiler/tests/function/value_unchanged.leo b/compiler/otests/function/value_unchanged.leo similarity index 100% rename from compiler/tests/function/value_unchanged.leo rename to compiler/otests/function/value_unchanged.leo diff --git a/compiler/tests/group/add.leo b/compiler/otests/group/add.leo similarity index 100% rename from compiler/tests/group/add.leo rename to compiler/otests/group/add.leo diff --git a/compiler/tests/group/assert_eq.leo b/compiler/otests/group/assert_eq.leo similarity index 100% rename from compiler/tests/group/assert_eq.leo rename to compiler/otests/group/assert_eq.leo diff --git a/compiler/tests/group/both_sign_high.leo b/compiler/otests/group/both_sign_high.leo similarity index 100% rename from compiler/tests/group/both_sign_high.leo rename to compiler/otests/group/both_sign_high.leo diff --git a/compiler/tests/group/both_sign_inferred.leo b/compiler/otests/group/both_sign_inferred.leo similarity index 100% rename from compiler/tests/group/both_sign_inferred.leo rename to compiler/otests/group/both_sign_inferred.leo diff --git a/compiler/tests/group/both_sign_low.leo b/compiler/otests/group/both_sign_low.leo similarity index 100% rename from compiler/tests/group/both_sign_low.leo rename to compiler/otests/group/both_sign_low.leo diff --git a/compiler/tests/group/eq.leo b/compiler/otests/group/eq.leo similarity index 100% rename from compiler/tests/group/eq.leo rename to compiler/otests/group/eq.leo diff --git a/compiler/tests/group/input.leo b/compiler/otests/group/input.leo similarity index 100% rename from compiler/tests/group/input.leo rename to compiler/otests/group/input.leo diff --git a/compiler/tests/group/input/invalid.in b/compiler/otests/group/input/invalid.in similarity index 100% rename from compiler/tests/group/input/invalid.in rename to compiler/otests/group/input/invalid.in diff --git a/compiler/tests/group/input/point.in b/compiler/otests/group/input/point.in similarity index 100% rename from compiler/tests/group/input/point.in rename to compiler/otests/group/input/point.in diff --git a/compiler/tests/group/input/valid.in b/compiler/otests/group/input/valid.in similarity index 100% rename from compiler/tests/group/input/valid.in rename to compiler/otests/group/input/valid.in diff --git a/compiler/tests/group/mod.rs b/compiler/otests/group/mod.rs similarity index 100% rename from compiler/tests/group/mod.rs rename to compiler/otests/group/mod.rs diff --git a/compiler/tests/group/negate.leo b/compiler/otests/group/negate.leo similarity index 100% rename from compiler/tests/group/negate.leo rename to compiler/otests/group/negate.leo diff --git a/compiler/tests/group/no_space_between_literal.leo b/compiler/otests/group/no_space_between_literal.leo similarity index 100% rename from compiler/tests/group/no_space_between_literal.leo rename to compiler/otests/group/no_space_between_literal.leo diff --git a/compiler/tests/group/one.leo b/compiler/otests/group/one.leo similarity index 100% rename from compiler/tests/group/one.leo rename to compiler/otests/group/one.leo diff --git a/compiler/tests/group/point.leo b/compiler/otests/group/point.leo similarity index 100% rename from compiler/tests/group/point.leo rename to compiler/otests/group/point.leo diff --git a/compiler/tests/group/point_input.leo b/compiler/otests/group/point_input.leo similarity index 100% rename from compiler/tests/group/point_input.leo rename to compiler/otests/group/point_input.leo diff --git a/compiler/tests/group/positive_and_negative.leo b/compiler/otests/group/positive_and_negative.leo similarity index 100% rename from compiler/tests/group/positive_and_negative.leo rename to compiler/otests/group/positive_and_negative.leo diff --git a/compiler/tests/group/sub.leo b/compiler/otests/group/sub.leo similarity index 100% rename from compiler/tests/group/sub.leo rename to compiler/otests/group/sub.leo diff --git a/compiler/tests/group/ternary.leo b/compiler/otests/group/ternary.leo similarity index 100% rename from compiler/tests/group/ternary.leo rename to compiler/otests/group/ternary.leo diff --git a/compiler/tests/group/x_and_y.leo b/compiler/otests/group/x_and_y.leo similarity index 100% rename from compiler/tests/group/x_and_y.leo rename to compiler/otests/group/x_and_y.leo diff --git a/compiler/tests/group/x_sign_high.leo b/compiler/otests/group/x_sign_high.leo similarity index 100% rename from compiler/tests/group/x_sign_high.leo rename to compiler/otests/group/x_sign_high.leo diff --git a/compiler/tests/group/x_sign_inferred.leo b/compiler/otests/group/x_sign_inferred.leo similarity index 100% rename from compiler/tests/group/x_sign_inferred.leo rename to compiler/otests/group/x_sign_inferred.leo diff --git a/compiler/tests/group/x_sign_low.leo b/compiler/otests/group/x_sign_low.leo similarity index 100% rename from compiler/tests/group/x_sign_low.leo rename to compiler/otests/group/x_sign_low.leo diff --git a/compiler/tests/group/y_sign_high.leo b/compiler/otests/group/y_sign_high.leo similarity index 100% rename from compiler/tests/group/y_sign_high.leo rename to compiler/otests/group/y_sign_high.leo diff --git a/compiler/tests/group/y_sign_inferred.leo b/compiler/otests/group/y_sign_inferred.leo similarity index 100% rename from compiler/tests/group/y_sign_inferred.leo rename to compiler/otests/group/y_sign_inferred.leo diff --git a/compiler/tests/group/y_sign_low.leo b/compiler/otests/group/y_sign_low.leo similarity index 100% rename from compiler/tests/group/y_sign_low.leo rename to compiler/otests/group/y_sign_low.leo diff --git a/compiler/tests/group/zero.leo b/compiler/otests/group/zero.leo similarity index 100% rename from compiler/tests/group/zero.leo rename to compiler/otests/group/zero.leo diff --git a/compiler/tests/import/alias.leo b/compiler/otests/import/alias.leo similarity index 100% rename from compiler/tests/import/alias.leo rename to compiler/otests/import/alias.leo diff --git a/compiler/tests/import/basic.leo b/compiler/otests/import/basic.leo similarity index 100% rename from compiler/tests/import/basic.leo rename to compiler/otests/import/basic.leo diff --git a/compiler/tests/import/imports/bar/.gitignore b/compiler/otests/import/imports/bar/.gitignore similarity index 100% rename from compiler/tests/import/imports/bar/.gitignore rename to compiler/otests/import/imports/bar/.gitignore diff --git a/compiler/tests/import/imports/bar/Leo.toml b/compiler/otests/import/imports/bar/Leo.toml similarity index 100% rename from compiler/tests/import/imports/bar/Leo.toml rename to compiler/otests/import/imports/bar/Leo.toml diff --git a/compiler/tests/import/imports/bar/src/bat/bat.leo b/compiler/otests/import/imports/bar/src/bat/bat.leo similarity index 100% rename from compiler/tests/import/imports/bar/src/bat/bat.leo rename to compiler/otests/import/imports/bar/src/bat/bat.leo diff --git a/compiler/tests/import/imports/bar/src/baz.leo b/compiler/otests/import/imports/bar/src/baz.leo similarity index 100% rename from compiler/tests/import/imports/bar/src/baz.leo rename to compiler/otests/import/imports/bar/src/baz.leo diff --git a/compiler/tests/import/imports/bar/src/lib.leo b/compiler/otests/import/imports/bar/src/lib.leo similarity index 100% rename from compiler/tests/import/imports/bar/src/lib.leo rename to compiler/otests/import/imports/bar/src/lib.leo diff --git a/compiler/tests/import/imports/car/.gitignore b/compiler/otests/import/imports/car/.gitignore similarity index 100% rename from compiler/tests/import/imports/car/.gitignore rename to compiler/otests/import/imports/car/.gitignore diff --git a/compiler/tests/import/imports/car/Leo.toml b/compiler/otests/import/imports/car/Leo.toml similarity index 100% rename from compiler/tests/import/imports/car/Leo.toml rename to compiler/otests/import/imports/car/Leo.toml diff --git a/compiler/tests/import/imports/car/src/lib.leo b/compiler/otests/import/imports/car/src/lib.leo similarity index 100% rename from compiler/tests/import/imports/car/src/lib.leo rename to compiler/otests/import/imports/car/src/lib.leo diff --git a/compiler/tests/import/many_import.leo b/compiler/otests/import/many_import.leo similarity index 100% rename from compiler/tests/import/many_import.leo rename to compiler/otests/import/many_import.leo diff --git a/compiler/tests/import/many_import_star.leo b/compiler/otests/import/many_import_star.leo similarity index 100% rename from compiler/tests/import/many_import_star.leo rename to compiler/otests/import/many_import_star.leo diff --git a/compiler/tests/import/mod.rs b/compiler/otests/import/mod.rs similarity index 100% rename from compiler/tests/import/mod.rs rename to compiler/otests/import/mod.rs diff --git a/compiler/tests/import/multiple.leo b/compiler/otests/import/multiple.leo similarity index 100% rename from compiler/tests/import/multiple.leo rename to compiler/otests/import/multiple.leo diff --git a/compiler/tests/import/names.leo b/compiler/otests/import/names.leo similarity index 100% rename from compiler/tests/import/names.leo rename to compiler/otests/import/names.leo diff --git a/compiler/tests/import/names_a_dash.leo b/compiler/otests/import/names_a_dash.leo similarity index 100% rename from compiler/tests/import/names_a_dash.leo rename to compiler/otests/import/names_a_dash.leo diff --git a/compiler/tests/import/names_dash_a.leo b/compiler/otests/import/names_dash_a.leo similarity index 100% rename from compiler/tests/import/names_dash_a.leo rename to compiler/otests/import/names_dash_a.leo diff --git a/compiler/tests/import/names_dollar.leo b/compiler/otests/import/names_dollar.leo similarity index 100% rename from compiler/tests/import/names_dollar.leo rename to compiler/otests/import/names_dollar.leo diff --git a/compiler/tests/import/names_underscore.leo b/compiler/otests/import/names_underscore.leo similarity index 100% rename from compiler/tests/import/names_underscore.leo rename to compiler/otests/import/names_underscore.leo diff --git a/compiler/tests/import/src/a-9.leo b/compiler/otests/import/src/a-9.leo similarity index 100% rename from compiler/tests/import/src/a-9.leo rename to compiler/otests/import/src/a-9.leo diff --git a/compiler/tests/import/src/a0-f.leo b/compiler/otests/import/src/a0-f.leo similarity index 100% rename from compiler/tests/import/src/a0-f.leo rename to compiler/otests/import/src/a0-f.leo diff --git a/compiler/tests/import/src/hello-world.leo b/compiler/otests/import/src/hello-world.leo similarity index 100% rename from compiler/tests/import/src/hello-world.leo rename to compiler/otests/import/src/hello-world.leo diff --git a/compiler/tests/import/src/test-import.leo b/compiler/otests/import/src/test-import.leo similarity index 100% rename from compiler/tests/import/src/test-import.leo rename to compiler/otests/import/src/test-import.leo diff --git a/compiler/tests/import/star.leo b/compiler/otests/import/star.leo similarity index 100% rename from compiler/tests/import/star.leo rename to compiler/otests/import/star.leo diff --git a/compiler/tests/import/star_fail.leo b/compiler/otests/import/star_fail.leo similarity index 100% rename from compiler/tests/import/star_fail.leo rename to compiler/otests/import/star_fail.leo diff --git a/compiler/tests/input_files/mod.rs b/compiler/otests/input_files/mod.rs similarity index 100% rename from compiler/tests/input_files/mod.rs rename to compiler/otests/input_files/mod.rs diff --git a/compiler/tests/input_files/program_input/input/main.in b/compiler/otests/input_files/program_input/input/main.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main.in rename to compiler/otests/input_files/program_input/input/main.in diff --git a/compiler/tests/input_files/program_input/input/main_array.in b/compiler/otests/input_files/program_input/input/main_array.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main_array.in rename to compiler/otests/input_files/program_input/input/main_array.in diff --git a/compiler/tests/input_files/program_input/input/main_array_fail.in b/compiler/otests/input_files/program_input/input/main_array_fail.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main_array_fail.in rename to compiler/otests/input_files/program_input/input/main_array_fail.in diff --git a/compiler/tests/input_files/program_input/input/main_fail_name.in b/compiler/otests/input_files/program_input/input/main_fail_name.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main_fail_name.in rename to compiler/otests/input_files/program_input/input/main_fail_name.in diff --git a/compiler/tests/input_files/program_input/input/main_fail_type.in b/compiler/otests/input_files/program_input/input/main_fail_type.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main_fail_type.in rename to compiler/otests/input_files/program_input/input/main_fail_type.in diff --git a/compiler/tests/input_files/program_input/input/main_field.in b/compiler/otests/input_files/program_input/input/main_field.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main_field.in rename to compiler/otests/input_files/program_input/input/main_field.in diff --git a/compiler/tests/input_files/program_input/input/main_group.in b/compiler/otests/input_files/program_input/input/main_group.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main_group.in rename to compiler/otests/input_files/program_input/input/main_group.in diff --git a/compiler/tests/input_files/program_input/input/main_multi_dimension_array.in b/compiler/otests/input_files/program_input/input/main_multi_dimension_array.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main_multi_dimension_array.in rename to compiler/otests/input_files/program_input/input/main_multi_dimension_array.in diff --git a/compiler/tests/input_files/program_input/input/main_multiple.in b/compiler/otests/input_files/program_input/input/main_multiple.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main_multiple.in rename to compiler/otests/input_files/program_input/input/main_multiple.in diff --git a/compiler/tests/input_files/program_input/input/main_tuple_fail.in b/compiler/otests/input_files/program_input/input/main_tuple_fail.in similarity index 100% rename from compiler/tests/input_files/program_input/input/main_tuple_fail.in rename to compiler/otests/input_files/program_input/input/main_tuple_fail.in diff --git a/compiler/tests/input_files/program_input/main.leo b/compiler/otests/input_files/program_input/main.leo similarity index 100% rename from compiler/tests/input_files/program_input/main.leo rename to compiler/otests/input_files/program_input/main.leo diff --git a/compiler/tests/input_files/program_input/main_array.leo b/compiler/otests/input_files/program_input/main_array.leo similarity index 100% rename from compiler/tests/input_files/program_input/main_array.leo rename to compiler/otests/input_files/program_input/main_array.leo diff --git a/compiler/tests/input_files/program_input/main_array_fail.leo b/compiler/otests/input_files/program_input/main_array_fail.leo similarity index 100% rename from compiler/tests/input_files/program_input/main_array_fail.leo rename to compiler/otests/input_files/program_input/main_array_fail.leo diff --git a/compiler/tests/input_files/program_input/main_field.leo b/compiler/otests/input_files/program_input/main_field.leo similarity index 100% rename from compiler/tests/input_files/program_input/main_field.leo rename to compiler/otests/input_files/program_input/main_field.leo diff --git a/compiler/tests/input_files/program_input/main_group.leo b/compiler/otests/input_files/program_input/main_group.leo similarity index 100% rename from compiler/tests/input_files/program_input/main_group.leo rename to compiler/otests/input_files/program_input/main_group.leo diff --git a/compiler/tests/input_files/program_input/main_multi_dimension_array.leo b/compiler/otests/input_files/program_input/main_multi_dimension_array.leo similarity index 100% rename from compiler/tests/input_files/program_input/main_multi_dimension_array.leo rename to compiler/otests/input_files/program_input/main_multi_dimension_array.leo diff --git a/compiler/tests/input_files/program_input/main_multiple.leo b/compiler/otests/input_files/program_input/main_multiple.leo similarity index 100% rename from compiler/tests/input_files/program_input/main_multiple.leo rename to compiler/otests/input_files/program_input/main_multiple.leo diff --git a/compiler/tests/input_files/program_input/main_tuple_fail.leo b/compiler/otests/input_files/program_input/main_tuple_fail.leo similarity index 100% rename from compiler/tests/input_files/program_input/main_tuple_fail.leo rename to compiler/otests/input_files/program_input/main_tuple_fail.leo diff --git a/compiler/tests/input_files/program_input/mod.rs b/compiler/otests/input_files/program_input/mod.rs similarity index 100% rename from compiler/tests/input_files/program_input/mod.rs rename to compiler/otests/input_files/program_input/mod.rs diff --git a/compiler/tests/input_files/program_input_and_program_state/access.leo b/compiler/otests/input_files/program_input_and_program_state/access.leo similarity index 100% rename from compiler/tests/input_files/program_input_and_program_state/access.leo rename to compiler/otests/input_files/program_input_and_program_state/access.leo diff --git a/compiler/tests/input_files/program_input_and_program_state/input/basic.in b/compiler/otests/input_files/program_input_and_program_state/input/basic.in similarity index 100% rename from compiler/tests/input_files/program_input_and_program_state/input/basic.in rename to compiler/otests/input_files/program_input_and_program_state/input/basic.in diff --git a/compiler/tests/input_files/program_input_and_program_state/input/basic.state b/compiler/otests/input_files/program_input_and_program_state/input/basic.state similarity index 100% rename from compiler/tests/input_files/program_input_and_program_state/input/basic.state rename to compiler/otests/input_files/program_input_and_program_state/input/basic.state diff --git a/compiler/tests/input_files/program_input_and_program_state/input/token_withdraw.in b/compiler/otests/input_files/program_input_and_program_state/input/token_withdraw.in similarity index 100% rename from compiler/tests/input_files/program_input_and_program_state/input/token_withdraw.in rename to compiler/otests/input_files/program_input_and_program_state/input/token_withdraw.in diff --git a/compiler/tests/input_files/program_input_and_program_state/input/token_withdraw.state b/compiler/otests/input_files/program_input_and_program_state/input/token_withdraw.state similarity index 100% rename from compiler/tests/input_files/program_input_and_program_state/input/token_withdraw.state rename to compiler/otests/input_files/program_input_and_program_state/input/token_withdraw.state diff --git a/compiler/tests/input_files/program_input_and_program_state/mod.rs b/compiler/otests/input_files/program_input_and_program_state/mod.rs similarity index 100% rename from compiler/tests/input_files/program_input_and_program_state/mod.rs rename to compiler/otests/input_files/program_input_and_program_state/mod.rs diff --git a/compiler/tests/input_files/program_input_constants/input/main.in b/compiler/otests/input_files/program_input_constants/input/main.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main.in rename to compiler/otests/input_files/program_input_constants/input/main.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_array.in b/compiler/otests/input_files/program_input_constants/input/main_array.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_array.in rename to compiler/otests/input_files/program_input_constants/input/main_array.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_array_fail.in b/compiler/otests/input_files/program_input_constants/input/main_array_fail.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_array_fail.in rename to compiler/otests/input_files/program_input_constants/input/main_array_fail.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_double_declaration_fail.in b/compiler/otests/input_files/program_input_constants/input/main_double_declaration_fail.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_double_declaration_fail.in rename to compiler/otests/input_files/program_input_constants/input/main_double_declaration_fail.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_fail_name.in b/compiler/otests/input_files/program_input_constants/input/main_fail_name.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_fail_name.in rename to compiler/otests/input_files/program_input_constants/input/main_fail_name.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_fail_type.in b/compiler/otests/input_files/program_input_constants/input/main_fail_type.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_fail_type.in rename to compiler/otests/input_files/program_input_constants/input/main_fail_type.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_field.in b/compiler/otests/input_files/program_input_constants/input/main_field.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_field.in rename to compiler/otests/input_files/program_input_constants/input/main_field.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_group.in b/compiler/otests/input_files/program_input_constants/input/main_group.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_group.in rename to compiler/otests/input_files/program_input_constants/input/main_group.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_multi_dimension_array.in b/compiler/otests/input_files/program_input_constants/input/main_multi_dimension_array.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_multi_dimension_array.in rename to compiler/otests/input_files/program_input_constants/input/main_multi_dimension_array.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_multiple.in b/compiler/otests/input_files/program_input_constants/input/main_multiple.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_multiple.in rename to compiler/otests/input_files/program_input_constants/input/main_multiple.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_not_const_input_fail.in b/compiler/otests/input_files/program_input_constants/input/main_not_const_input_fail.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_not_const_input_fail.in rename to compiler/otests/input_files/program_input_constants/input/main_not_const_input_fail.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_tuple_fail.in b/compiler/otests/input_files/program_input_constants/input/main_tuple_fail.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_tuple_fail.in rename to compiler/otests/input_files/program_input_constants/input/main_tuple_fail.in diff --git a/compiler/tests/input_files/program_input_constants/input/main_type_mismatch.in b/compiler/otests/input_files/program_input_constants/input/main_type_mismatch.in similarity index 100% rename from compiler/tests/input_files/program_input_constants/input/main_type_mismatch.in rename to compiler/otests/input_files/program_input_constants/input/main_type_mismatch.in diff --git a/compiler/tests/input_files/program_input_constants/main.leo b/compiler/otests/input_files/program_input_constants/main.leo similarity index 100% rename from compiler/tests/input_files/program_input_constants/main.leo rename to compiler/otests/input_files/program_input_constants/main.leo diff --git a/compiler/tests/input_files/program_input_constants/main_array.leo b/compiler/otests/input_files/program_input_constants/main_array.leo similarity index 100% rename from compiler/tests/input_files/program_input_constants/main_array.leo rename to compiler/otests/input_files/program_input_constants/main_array.leo diff --git a/compiler/tests/input_files/program_input_constants/main_array_fail.leo b/compiler/otests/input_files/program_input_constants/main_array_fail.leo similarity index 100% rename from compiler/tests/input_files/program_input_constants/main_array_fail.leo rename to compiler/otests/input_files/program_input_constants/main_array_fail.leo diff --git a/compiler/tests/input_files/program_input_constants/main_field.leo b/compiler/otests/input_files/program_input_constants/main_field.leo similarity index 100% rename from compiler/tests/input_files/program_input_constants/main_field.leo rename to compiler/otests/input_files/program_input_constants/main_field.leo diff --git a/compiler/tests/input_files/program_input_constants/main_group.leo b/compiler/otests/input_files/program_input_constants/main_group.leo similarity index 100% rename from compiler/tests/input_files/program_input_constants/main_group.leo rename to compiler/otests/input_files/program_input_constants/main_group.leo diff --git a/compiler/tests/input_files/program_input_constants/main_multi_dimension_array.leo b/compiler/otests/input_files/program_input_constants/main_multi_dimension_array.leo similarity index 100% rename from compiler/tests/input_files/program_input_constants/main_multi_dimension_array.leo rename to compiler/otests/input_files/program_input_constants/main_multi_dimension_array.leo diff --git a/compiler/tests/input_files/program_input_constants/main_multiple.leo b/compiler/otests/input_files/program_input_constants/main_multiple.leo similarity index 100% rename from compiler/tests/input_files/program_input_constants/main_multiple.leo rename to compiler/otests/input_files/program_input_constants/main_multiple.leo diff --git a/compiler/tests/input_files/program_input_constants/main_tuple_fail.leo b/compiler/otests/input_files/program_input_constants/main_tuple_fail.leo similarity index 100% rename from compiler/tests/input_files/program_input_constants/main_tuple_fail.leo rename to compiler/otests/input_files/program_input_constants/main_tuple_fail.leo diff --git a/compiler/tests/input_files/program_input_constants/mod.rs b/compiler/otests/input_files/program_input_constants/mod.rs similarity index 100% rename from compiler/tests/input_files/program_input_constants/mod.rs rename to compiler/otests/input_files/program_input_constants/mod.rs diff --git a/compiler/tests/input_files/program_registers/input/array.in b/compiler/otests/input_files/program_registers/input/array.in similarity index 100% rename from compiler/tests/input_files/program_registers/input/array.in rename to compiler/otests/input_files/program_registers/input/array.in diff --git a/compiler/tests/input_files/program_registers/input/main.in b/compiler/otests/input_files/program_registers/input/main.in similarity index 100% rename from compiler/tests/input_files/program_registers/input/main.in rename to compiler/otests/input_files/program_registers/input/main.in diff --git a/compiler/tests/input_files/program_registers/mod.rs b/compiler/otests/input_files/program_registers/mod.rs similarity index 100% rename from compiler/tests/input_files/program_registers/mod.rs rename to compiler/otests/input_files/program_registers/mod.rs diff --git a/compiler/tests/input_files/program_registers/output/registers_array.out b/compiler/otests/input_files/program_registers/output/registers_array.out similarity index 100% rename from compiler/tests/input_files/program_registers/output/registers_array.out rename to compiler/otests/input_files/program_registers/output/registers_array.out diff --git a/compiler/tests/input_files/program_registers/output/registers_pass.out b/compiler/otests/input_files/program_registers/output/registers_pass.out similarity index 100% rename from compiler/tests/input_files/program_registers/output/registers_pass.out rename to compiler/otests/input_files/program_registers/output/registers_pass.out diff --git a/compiler/tests/input_files/program_registers/registers_array.leo b/compiler/otests/input_files/program_registers/registers_array.leo similarity index 100% rename from compiler/tests/input_files/program_registers/registers_array.leo rename to compiler/otests/input_files/program_registers/registers_array.leo diff --git a/compiler/tests/input_files/program_registers/registers_fail.leo b/compiler/otests/input_files/program_registers/registers_fail.leo similarity index 100% rename from compiler/tests/input_files/program_registers/registers_fail.leo rename to compiler/otests/input_files/program_registers/registers_fail.leo diff --git a/compiler/tests/input_files/program_registers/registers_pass.leo b/compiler/otests/input_files/program_registers/registers_pass.leo similarity index 100% rename from compiler/tests/input_files/program_registers/registers_pass.leo rename to compiler/otests/input_files/program_registers/registers_pass.leo diff --git a/compiler/tests/input_files/program_state/access_all.leo b/compiler/otests/input_files/program_state/access_all.leo similarity index 100% rename from compiler/tests/input_files/program_state/access_all.leo rename to compiler/otests/input_files/program_state/access_all.leo diff --git a/compiler/tests/input_files/program_state/access_state.leo b/compiler/otests/input_files/program_state/access_state.leo similarity index 100% rename from compiler/tests/input_files/program_state/access_state.leo rename to compiler/otests/input_files/program_state/access_state.leo diff --git a/compiler/tests/input_files/program_state/input/basic.state b/compiler/otests/input_files/program_state/input/basic.state similarity index 100% rename from compiler/tests/input_files/program_state/input/basic.state rename to compiler/otests/input_files/program_state/input/basic.state diff --git a/compiler/tests/input_files/program_state/input/section_invalid.state b/compiler/otests/input_files/program_state/input/section_invalid.state similarity index 100% rename from compiler/tests/input_files/program_state/input/section_invalid.state rename to compiler/otests/input_files/program_state/input/section_invalid.state diff --git a/compiler/tests/input_files/program_state/input/section_undefined.state b/compiler/otests/input_files/program_state/input/section_undefined.state similarity index 100% rename from compiler/tests/input_files/program_state/input/section_undefined.state rename to compiler/otests/input_files/program_state/input/section_undefined.state diff --git a/compiler/tests/input_files/program_state/input/token_withdraw.state b/compiler/otests/input_files/program_state/input/token_withdraw.state similarity index 100% rename from compiler/tests/input_files/program_state/input/token_withdraw.state rename to compiler/otests/input_files/program_state/input/token_withdraw.state diff --git a/compiler/tests/input_files/program_state/input/visibility_fail.state b/compiler/otests/input_files/program_state/input/visibility_fail.state similarity index 100% rename from compiler/tests/input_files/program_state/input/visibility_fail.state rename to compiler/otests/input_files/program_state/input/visibility_fail.state diff --git a/compiler/tests/input_files/program_state/mod.rs b/compiler/otests/input_files/program_state/mod.rs similarity index 100% rename from compiler/tests/input_files/program_state/mod.rs rename to compiler/otests/input_files/program_state/mod.rs diff --git a/compiler/tests/integers/i128/add.leo b/compiler/otests/integers/i128/add.leo similarity index 100% rename from compiler/tests/integers/i128/add.leo rename to compiler/otests/integers/i128/add.leo diff --git a/compiler/tests/integers/i128/console_assert.leo b/compiler/otests/integers/i128/console_assert.leo similarity index 100% rename from compiler/tests/integers/i128/console_assert.leo rename to compiler/otests/integers/i128/console_assert.leo diff --git a/compiler/tests/integers/i128/div.leo b/compiler/otests/integers/i128/div.leo similarity index 100% rename from compiler/tests/integers/i128/div.leo rename to compiler/otests/integers/i128/div.leo diff --git a/compiler/tests/integers/i128/eq.leo b/compiler/otests/integers/i128/eq.leo similarity index 100% rename from compiler/tests/integers/i128/eq.leo rename to compiler/otests/integers/i128/eq.leo diff --git a/compiler/tests/integers/i128/ge.leo b/compiler/otests/integers/i128/ge.leo similarity index 100% rename from compiler/tests/integers/i128/ge.leo rename to compiler/otests/integers/i128/ge.leo diff --git a/compiler/tests/integers/i128/gt.leo b/compiler/otests/integers/i128/gt.leo similarity index 100% rename from compiler/tests/integers/i128/gt.leo rename to compiler/otests/integers/i128/gt.leo diff --git a/compiler/tests/integers/i128/input.leo b/compiler/otests/integers/i128/input.leo similarity index 100% rename from compiler/tests/integers/i128/input.leo rename to compiler/otests/integers/i128/input.leo diff --git a/compiler/tests/integers/i128/le.leo b/compiler/otests/integers/i128/le.leo similarity index 100% rename from compiler/tests/integers/i128/le.leo rename to compiler/otests/integers/i128/le.leo diff --git a/compiler/tests/integers/i128/lt.leo b/compiler/otests/integers/i128/lt.leo similarity index 100% rename from compiler/tests/integers/i128/lt.leo rename to compiler/otests/integers/i128/lt.leo diff --git a/compiler/tests/integers/i128/max.leo b/compiler/otests/integers/i128/max.leo similarity index 100% rename from compiler/tests/integers/i128/max.leo rename to compiler/otests/integers/i128/max.leo diff --git a/compiler/tests/integers/i128/max_fail.leo b/compiler/otests/integers/i128/max_fail.leo similarity index 100% rename from compiler/tests/integers/i128/max_fail.leo rename to compiler/otests/integers/i128/max_fail.leo diff --git a/compiler/tests/integers/i128/min.leo b/compiler/otests/integers/i128/min.leo similarity index 100% rename from compiler/tests/integers/i128/min.leo rename to compiler/otests/integers/i128/min.leo diff --git a/compiler/tests/integers/i128/min_fail.leo b/compiler/otests/integers/i128/min_fail.leo similarity index 100% rename from compiler/tests/integers/i128/min_fail.leo rename to compiler/otests/integers/i128/min_fail.leo diff --git a/compiler/tests/integers/i128/mod.rs b/compiler/otests/integers/i128/mod.rs similarity index 100% rename from compiler/tests/integers/i128/mod.rs rename to compiler/otests/integers/i128/mod.rs diff --git a/compiler/tests/integers/i128/mul.leo b/compiler/otests/integers/i128/mul.leo similarity index 100% rename from compiler/tests/integers/i128/mul.leo rename to compiler/otests/integers/i128/mul.leo diff --git a/compiler/tests/integers/i128/ne.leo b/compiler/otests/integers/i128/ne.leo similarity index 100% rename from compiler/tests/integers/i128/ne.leo rename to compiler/otests/integers/i128/ne.leo diff --git a/compiler/tests/integers/i128/negate.leo b/compiler/otests/integers/i128/negate.leo similarity index 100% rename from compiler/tests/integers/i128/negate.leo rename to compiler/otests/integers/i128/negate.leo diff --git a/compiler/tests/integers/i128/negate_min.leo b/compiler/otests/integers/i128/negate_min.leo similarity index 100% rename from compiler/tests/integers/i128/negate_min.leo rename to compiler/otests/integers/i128/negate_min.leo diff --git a/compiler/tests/integers/i128/negate_zero.leo b/compiler/otests/integers/i128/negate_zero.leo similarity index 100% rename from compiler/tests/integers/i128/negate_zero.leo rename to compiler/otests/integers/i128/negate_zero.leo diff --git a/compiler/tests/integers/i128/no_space_between_literal.leo b/compiler/otests/integers/i128/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/i128/no_space_between_literal.leo rename to compiler/otests/integers/i128/no_space_between_literal.leo diff --git a/compiler/tests/integers/i128/pow.leo b/compiler/otests/integers/i128/pow.leo similarity index 100% rename from compiler/tests/integers/i128/pow.leo rename to compiler/otests/integers/i128/pow.leo diff --git a/compiler/tests/integers/i128/sub.leo b/compiler/otests/integers/i128/sub.leo similarity index 100% rename from compiler/tests/integers/i128/sub.leo rename to compiler/otests/integers/i128/sub.leo diff --git a/compiler/tests/integers/i128/ternary.leo b/compiler/otests/integers/i128/ternary.leo similarity index 100% rename from compiler/tests/integers/i128/ternary.leo rename to compiler/otests/integers/i128/ternary.leo diff --git a/compiler/tests/integers/i16/add.leo b/compiler/otests/integers/i16/add.leo similarity index 100% rename from compiler/tests/integers/i16/add.leo rename to compiler/otests/integers/i16/add.leo diff --git a/compiler/tests/integers/i16/console_assert.leo b/compiler/otests/integers/i16/console_assert.leo similarity index 100% rename from compiler/tests/integers/i16/console_assert.leo rename to compiler/otests/integers/i16/console_assert.leo diff --git a/compiler/tests/integers/i16/div.leo b/compiler/otests/integers/i16/div.leo similarity index 100% rename from compiler/tests/integers/i16/div.leo rename to compiler/otests/integers/i16/div.leo diff --git a/compiler/tests/integers/i16/eq.leo b/compiler/otests/integers/i16/eq.leo similarity index 100% rename from compiler/tests/integers/i16/eq.leo rename to compiler/otests/integers/i16/eq.leo diff --git a/compiler/tests/integers/i16/ge.leo b/compiler/otests/integers/i16/ge.leo similarity index 100% rename from compiler/tests/integers/i16/ge.leo rename to compiler/otests/integers/i16/ge.leo diff --git a/compiler/tests/integers/i16/gt.leo b/compiler/otests/integers/i16/gt.leo similarity index 100% rename from compiler/tests/integers/i16/gt.leo rename to compiler/otests/integers/i16/gt.leo diff --git a/compiler/tests/integers/i16/input.leo b/compiler/otests/integers/i16/input.leo similarity index 100% rename from compiler/tests/integers/i16/input.leo rename to compiler/otests/integers/i16/input.leo diff --git a/compiler/tests/integers/i16/le.leo b/compiler/otests/integers/i16/le.leo similarity index 100% rename from compiler/tests/integers/i16/le.leo rename to compiler/otests/integers/i16/le.leo diff --git a/compiler/tests/integers/i16/lt.leo b/compiler/otests/integers/i16/lt.leo similarity index 100% rename from compiler/tests/integers/i16/lt.leo rename to compiler/otests/integers/i16/lt.leo diff --git a/compiler/tests/integers/i16/max.leo b/compiler/otests/integers/i16/max.leo similarity index 100% rename from compiler/tests/integers/i16/max.leo rename to compiler/otests/integers/i16/max.leo diff --git a/compiler/tests/integers/i16/max_fail.leo b/compiler/otests/integers/i16/max_fail.leo similarity index 100% rename from compiler/tests/integers/i16/max_fail.leo rename to compiler/otests/integers/i16/max_fail.leo diff --git a/compiler/tests/integers/i16/min.leo b/compiler/otests/integers/i16/min.leo similarity index 100% rename from compiler/tests/integers/i16/min.leo rename to compiler/otests/integers/i16/min.leo diff --git a/compiler/tests/integers/i16/min_fail.leo b/compiler/otests/integers/i16/min_fail.leo similarity index 100% rename from compiler/tests/integers/i16/min_fail.leo rename to compiler/otests/integers/i16/min_fail.leo diff --git a/compiler/tests/integers/i16/mod.rs b/compiler/otests/integers/i16/mod.rs similarity index 100% rename from compiler/tests/integers/i16/mod.rs rename to compiler/otests/integers/i16/mod.rs diff --git a/compiler/tests/integers/i16/mul.leo b/compiler/otests/integers/i16/mul.leo similarity index 100% rename from compiler/tests/integers/i16/mul.leo rename to compiler/otests/integers/i16/mul.leo diff --git a/compiler/tests/integers/i16/ne.leo b/compiler/otests/integers/i16/ne.leo similarity index 100% rename from compiler/tests/integers/i16/ne.leo rename to compiler/otests/integers/i16/ne.leo diff --git a/compiler/tests/integers/i16/negate.leo b/compiler/otests/integers/i16/negate.leo similarity index 100% rename from compiler/tests/integers/i16/negate.leo rename to compiler/otests/integers/i16/negate.leo diff --git a/compiler/tests/integers/i16/negate_min.leo b/compiler/otests/integers/i16/negate_min.leo similarity index 100% rename from compiler/tests/integers/i16/negate_min.leo rename to compiler/otests/integers/i16/negate_min.leo diff --git a/compiler/tests/integers/i16/negate_zero.leo b/compiler/otests/integers/i16/negate_zero.leo similarity index 100% rename from compiler/tests/integers/i16/negate_zero.leo rename to compiler/otests/integers/i16/negate_zero.leo diff --git a/compiler/tests/integers/i16/no_space_between_literal.leo b/compiler/otests/integers/i16/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/i16/no_space_between_literal.leo rename to compiler/otests/integers/i16/no_space_between_literal.leo diff --git a/compiler/tests/integers/i16/pow.leo b/compiler/otests/integers/i16/pow.leo similarity index 100% rename from compiler/tests/integers/i16/pow.leo rename to compiler/otests/integers/i16/pow.leo diff --git a/compiler/tests/integers/i16/sub.leo b/compiler/otests/integers/i16/sub.leo similarity index 100% rename from compiler/tests/integers/i16/sub.leo rename to compiler/otests/integers/i16/sub.leo diff --git a/compiler/tests/integers/i16/ternary.leo b/compiler/otests/integers/i16/ternary.leo similarity index 100% rename from compiler/tests/integers/i16/ternary.leo rename to compiler/otests/integers/i16/ternary.leo diff --git a/compiler/tests/integers/i32/add.leo b/compiler/otests/integers/i32/add.leo similarity index 100% rename from compiler/tests/integers/i32/add.leo rename to compiler/otests/integers/i32/add.leo diff --git a/compiler/tests/integers/i32/console_assert.leo b/compiler/otests/integers/i32/console_assert.leo similarity index 100% rename from compiler/tests/integers/i32/console_assert.leo rename to compiler/otests/integers/i32/console_assert.leo diff --git a/compiler/tests/integers/i32/div.leo b/compiler/otests/integers/i32/div.leo similarity index 100% rename from compiler/tests/integers/i32/div.leo rename to compiler/otests/integers/i32/div.leo diff --git a/compiler/tests/integers/i32/eq.leo b/compiler/otests/integers/i32/eq.leo similarity index 100% rename from compiler/tests/integers/i32/eq.leo rename to compiler/otests/integers/i32/eq.leo diff --git a/compiler/tests/integers/i32/ge.leo b/compiler/otests/integers/i32/ge.leo similarity index 100% rename from compiler/tests/integers/i32/ge.leo rename to compiler/otests/integers/i32/ge.leo diff --git a/compiler/tests/integers/i32/gt.leo b/compiler/otests/integers/i32/gt.leo similarity index 100% rename from compiler/tests/integers/i32/gt.leo rename to compiler/otests/integers/i32/gt.leo diff --git a/compiler/tests/integers/i32/input.leo b/compiler/otests/integers/i32/input.leo similarity index 100% rename from compiler/tests/integers/i32/input.leo rename to compiler/otests/integers/i32/input.leo diff --git a/compiler/tests/integers/i32/le.leo b/compiler/otests/integers/i32/le.leo similarity index 100% rename from compiler/tests/integers/i32/le.leo rename to compiler/otests/integers/i32/le.leo diff --git a/compiler/tests/integers/i32/lt.leo b/compiler/otests/integers/i32/lt.leo similarity index 100% rename from compiler/tests/integers/i32/lt.leo rename to compiler/otests/integers/i32/lt.leo diff --git a/compiler/tests/integers/i32/max.leo b/compiler/otests/integers/i32/max.leo similarity index 100% rename from compiler/tests/integers/i32/max.leo rename to compiler/otests/integers/i32/max.leo diff --git a/compiler/tests/integers/i32/max_fail.leo b/compiler/otests/integers/i32/max_fail.leo similarity index 100% rename from compiler/tests/integers/i32/max_fail.leo rename to compiler/otests/integers/i32/max_fail.leo diff --git a/compiler/tests/integers/i32/min.leo b/compiler/otests/integers/i32/min.leo similarity index 100% rename from compiler/tests/integers/i32/min.leo rename to compiler/otests/integers/i32/min.leo diff --git a/compiler/tests/integers/i32/min_fail.leo b/compiler/otests/integers/i32/min_fail.leo similarity index 100% rename from compiler/tests/integers/i32/min_fail.leo rename to compiler/otests/integers/i32/min_fail.leo diff --git a/compiler/tests/integers/i32/mod.rs b/compiler/otests/integers/i32/mod.rs similarity index 100% rename from compiler/tests/integers/i32/mod.rs rename to compiler/otests/integers/i32/mod.rs diff --git a/compiler/tests/integers/i32/mul.leo b/compiler/otests/integers/i32/mul.leo similarity index 100% rename from compiler/tests/integers/i32/mul.leo rename to compiler/otests/integers/i32/mul.leo diff --git a/compiler/tests/integers/i32/ne.leo b/compiler/otests/integers/i32/ne.leo similarity index 100% rename from compiler/tests/integers/i32/ne.leo rename to compiler/otests/integers/i32/ne.leo diff --git a/compiler/tests/integers/i32/negate.leo b/compiler/otests/integers/i32/negate.leo similarity index 100% rename from compiler/tests/integers/i32/negate.leo rename to compiler/otests/integers/i32/negate.leo diff --git a/compiler/tests/integers/i32/negate_min.leo b/compiler/otests/integers/i32/negate_min.leo similarity index 100% rename from compiler/tests/integers/i32/negate_min.leo rename to compiler/otests/integers/i32/negate_min.leo diff --git a/compiler/tests/integers/i32/negate_zero.leo b/compiler/otests/integers/i32/negate_zero.leo similarity index 100% rename from compiler/tests/integers/i32/negate_zero.leo rename to compiler/otests/integers/i32/negate_zero.leo diff --git a/compiler/tests/integers/i32/no_space_between_literal.leo b/compiler/otests/integers/i32/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/i32/no_space_between_literal.leo rename to compiler/otests/integers/i32/no_space_between_literal.leo diff --git a/compiler/tests/integers/i32/pow.leo b/compiler/otests/integers/i32/pow.leo similarity index 100% rename from compiler/tests/integers/i32/pow.leo rename to compiler/otests/integers/i32/pow.leo diff --git a/compiler/tests/integers/i32/sub.leo b/compiler/otests/integers/i32/sub.leo similarity index 100% rename from compiler/tests/integers/i32/sub.leo rename to compiler/otests/integers/i32/sub.leo diff --git a/compiler/tests/integers/i32/ternary.leo b/compiler/otests/integers/i32/ternary.leo similarity index 100% rename from compiler/tests/integers/i32/ternary.leo rename to compiler/otests/integers/i32/ternary.leo diff --git a/compiler/tests/integers/i64/add.leo b/compiler/otests/integers/i64/add.leo similarity index 100% rename from compiler/tests/integers/i64/add.leo rename to compiler/otests/integers/i64/add.leo diff --git a/compiler/tests/integers/i64/console_assert.leo b/compiler/otests/integers/i64/console_assert.leo similarity index 100% rename from compiler/tests/integers/i64/console_assert.leo rename to compiler/otests/integers/i64/console_assert.leo diff --git a/compiler/tests/integers/i64/div.leo b/compiler/otests/integers/i64/div.leo similarity index 100% rename from compiler/tests/integers/i64/div.leo rename to compiler/otests/integers/i64/div.leo diff --git a/compiler/tests/integers/i64/eq.leo b/compiler/otests/integers/i64/eq.leo similarity index 100% rename from compiler/tests/integers/i64/eq.leo rename to compiler/otests/integers/i64/eq.leo diff --git a/compiler/tests/integers/i64/ge.leo b/compiler/otests/integers/i64/ge.leo similarity index 100% rename from compiler/tests/integers/i64/ge.leo rename to compiler/otests/integers/i64/ge.leo diff --git a/compiler/tests/integers/i64/gt.leo b/compiler/otests/integers/i64/gt.leo similarity index 100% rename from compiler/tests/integers/i64/gt.leo rename to compiler/otests/integers/i64/gt.leo diff --git a/compiler/tests/integers/i64/input.leo b/compiler/otests/integers/i64/input.leo similarity index 100% rename from compiler/tests/integers/i64/input.leo rename to compiler/otests/integers/i64/input.leo diff --git a/compiler/tests/integers/i64/le.leo b/compiler/otests/integers/i64/le.leo similarity index 100% rename from compiler/tests/integers/i64/le.leo rename to compiler/otests/integers/i64/le.leo diff --git a/compiler/tests/integers/i64/lt.leo b/compiler/otests/integers/i64/lt.leo similarity index 100% rename from compiler/tests/integers/i64/lt.leo rename to compiler/otests/integers/i64/lt.leo diff --git a/compiler/tests/integers/i64/max.leo b/compiler/otests/integers/i64/max.leo similarity index 100% rename from compiler/tests/integers/i64/max.leo rename to compiler/otests/integers/i64/max.leo diff --git a/compiler/tests/integers/i64/max_fail.leo b/compiler/otests/integers/i64/max_fail.leo similarity index 100% rename from compiler/tests/integers/i64/max_fail.leo rename to compiler/otests/integers/i64/max_fail.leo diff --git a/compiler/tests/integers/i64/min.leo b/compiler/otests/integers/i64/min.leo similarity index 100% rename from compiler/tests/integers/i64/min.leo rename to compiler/otests/integers/i64/min.leo diff --git a/compiler/tests/integers/i64/min_fail.leo b/compiler/otests/integers/i64/min_fail.leo similarity index 100% rename from compiler/tests/integers/i64/min_fail.leo rename to compiler/otests/integers/i64/min_fail.leo diff --git a/compiler/tests/integers/i64/mod.rs b/compiler/otests/integers/i64/mod.rs similarity index 100% rename from compiler/tests/integers/i64/mod.rs rename to compiler/otests/integers/i64/mod.rs diff --git a/compiler/tests/integers/i64/mul.leo b/compiler/otests/integers/i64/mul.leo similarity index 100% rename from compiler/tests/integers/i64/mul.leo rename to compiler/otests/integers/i64/mul.leo diff --git a/compiler/tests/integers/i64/ne.leo b/compiler/otests/integers/i64/ne.leo similarity index 100% rename from compiler/tests/integers/i64/ne.leo rename to compiler/otests/integers/i64/ne.leo diff --git a/compiler/tests/integers/i64/negate.leo b/compiler/otests/integers/i64/negate.leo similarity index 100% rename from compiler/tests/integers/i64/negate.leo rename to compiler/otests/integers/i64/negate.leo diff --git a/compiler/tests/integers/i64/negate_min.leo b/compiler/otests/integers/i64/negate_min.leo similarity index 100% rename from compiler/tests/integers/i64/negate_min.leo rename to compiler/otests/integers/i64/negate_min.leo diff --git a/compiler/tests/integers/i64/negate_zero.leo b/compiler/otests/integers/i64/negate_zero.leo similarity index 100% rename from compiler/tests/integers/i64/negate_zero.leo rename to compiler/otests/integers/i64/negate_zero.leo diff --git a/compiler/tests/integers/i64/no_space_between_literal.leo b/compiler/otests/integers/i64/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/i64/no_space_between_literal.leo rename to compiler/otests/integers/i64/no_space_between_literal.leo diff --git a/compiler/tests/integers/i64/pow.leo b/compiler/otests/integers/i64/pow.leo similarity index 100% rename from compiler/tests/integers/i64/pow.leo rename to compiler/otests/integers/i64/pow.leo diff --git a/compiler/tests/integers/i64/sub.leo b/compiler/otests/integers/i64/sub.leo similarity index 100% rename from compiler/tests/integers/i64/sub.leo rename to compiler/otests/integers/i64/sub.leo diff --git a/compiler/tests/integers/i64/ternary.leo b/compiler/otests/integers/i64/ternary.leo similarity index 100% rename from compiler/tests/integers/i64/ternary.leo rename to compiler/otests/integers/i64/ternary.leo diff --git a/compiler/tests/integers/i8/add.leo b/compiler/otests/integers/i8/add.leo similarity index 100% rename from compiler/tests/integers/i8/add.leo rename to compiler/otests/integers/i8/add.leo diff --git a/compiler/tests/integers/i8/console_assert.leo b/compiler/otests/integers/i8/console_assert.leo similarity index 100% rename from compiler/tests/integers/i8/console_assert.leo rename to compiler/otests/integers/i8/console_assert.leo diff --git a/compiler/tests/integers/i8/div.leo b/compiler/otests/integers/i8/div.leo similarity index 100% rename from compiler/tests/integers/i8/div.leo rename to compiler/otests/integers/i8/div.leo diff --git a/compiler/tests/integers/i8/eq.leo b/compiler/otests/integers/i8/eq.leo similarity index 100% rename from compiler/tests/integers/i8/eq.leo rename to compiler/otests/integers/i8/eq.leo diff --git a/compiler/tests/integers/i8/ge.leo b/compiler/otests/integers/i8/ge.leo similarity index 100% rename from compiler/tests/integers/i8/ge.leo rename to compiler/otests/integers/i8/ge.leo diff --git a/compiler/tests/integers/i8/gt.leo b/compiler/otests/integers/i8/gt.leo similarity index 100% rename from compiler/tests/integers/i8/gt.leo rename to compiler/otests/integers/i8/gt.leo diff --git a/compiler/tests/integers/i8/input.leo b/compiler/otests/integers/i8/input.leo similarity index 100% rename from compiler/tests/integers/i8/input.leo rename to compiler/otests/integers/i8/input.leo diff --git a/compiler/tests/integers/i8/le.leo b/compiler/otests/integers/i8/le.leo similarity index 100% rename from compiler/tests/integers/i8/le.leo rename to compiler/otests/integers/i8/le.leo diff --git a/compiler/tests/integers/i8/lt.leo b/compiler/otests/integers/i8/lt.leo similarity index 100% rename from compiler/tests/integers/i8/lt.leo rename to compiler/otests/integers/i8/lt.leo diff --git a/compiler/tests/integers/i8/max.leo b/compiler/otests/integers/i8/max.leo similarity index 100% rename from compiler/tests/integers/i8/max.leo rename to compiler/otests/integers/i8/max.leo diff --git a/compiler/tests/integers/i8/max_fail.leo b/compiler/otests/integers/i8/max_fail.leo similarity index 100% rename from compiler/tests/integers/i8/max_fail.leo rename to compiler/otests/integers/i8/max_fail.leo diff --git a/compiler/tests/integers/i8/min.leo b/compiler/otests/integers/i8/min.leo similarity index 100% rename from compiler/tests/integers/i8/min.leo rename to compiler/otests/integers/i8/min.leo diff --git a/compiler/tests/integers/i8/min_fail.leo b/compiler/otests/integers/i8/min_fail.leo similarity index 100% rename from compiler/tests/integers/i8/min_fail.leo rename to compiler/otests/integers/i8/min_fail.leo diff --git a/compiler/tests/integers/i8/mod.rs b/compiler/otests/integers/i8/mod.rs similarity index 100% rename from compiler/tests/integers/i8/mod.rs rename to compiler/otests/integers/i8/mod.rs diff --git a/compiler/tests/integers/i8/mul.leo b/compiler/otests/integers/i8/mul.leo similarity index 100% rename from compiler/tests/integers/i8/mul.leo rename to compiler/otests/integers/i8/mul.leo diff --git a/compiler/tests/integers/i8/ne.leo b/compiler/otests/integers/i8/ne.leo similarity index 100% rename from compiler/tests/integers/i8/ne.leo rename to compiler/otests/integers/i8/ne.leo diff --git a/compiler/tests/integers/i8/negate.leo b/compiler/otests/integers/i8/negate.leo similarity index 100% rename from compiler/tests/integers/i8/negate.leo rename to compiler/otests/integers/i8/negate.leo diff --git a/compiler/tests/integers/i8/negate_min.leo b/compiler/otests/integers/i8/negate_min.leo similarity index 100% rename from compiler/tests/integers/i8/negate_min.leo rename to compiler/otests/integers/i8/negate_min.leo diff --git a/compiler/tests/integers/i8/negate_zero.leo b/compiler/otests/integers/i8/negate_zero.leo similarity index 100% rename from compiler/tests/integers/i8/negate_zero.leo rename to compiler/otests/integers/i8/negate_zero.leo diff --git a/compiler/tests/integers/i8/no_space_between_literal.leo b/compiler/otests/integers/i8/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/i8/no_space_between_literal.leo rename to compiler/otests/integers/i8/no_space_between_literal.leo diff --git a/compiler/tests/integers/i8/pow.leo b/compiler/otests/integers/i8/pow.leo similarity index 100% rename from compiler/tests/integers/i8/pow.leo rename to compiler/otests/integers/i8/pow.leo diff --git a/compiler/tests/integers/i8/sub.leo b/compiler/otests/integers/i8/sub.leo similarity index 100% rename from compiler/tests/integers/i8/sub.leo rename to compiler/otests/integers/i8/sub.leo diff --git a/compiler/tests/integers/i8/ternary.leo b/compiler/otests/integers/i8/ternary.leo similarity index 100% rename from compiler/tests/integers/i8/ternary.leo rename to compiler/otests/integers/i8/ternary.leo diff --git a/compiler/tests/integers/int_macro.rs b/compiler/otests/integers/int_macro.rs similarity index 100% rename from compiler/tests/integers/int_macro.rs rename to compiler/otests/integers/int_macro.rs diff --git a/compiler/tests/integers/integer_tester.rs b/compiler/otests/integers/integer_tester.rs similarity index 100% rename from compiler/tests/integers/integer_tester.rs rename to compiler/otests/integers/integer_tester.rs diff --git a/compiler/tests/integers/mod.rs b/compiler/otests/integers/mod.rs similarity index 100% rename from compiler/tests/integers/mod.rs rename to compiler/otests/integers/mod.rs diff --git a/compiler/tests/integers/u128/add.leo b/compiler/otests/integers/u128/add.leo similarity index 100% rename from compiler/tests/integers/u128/add.leo rename to compiler/otests/integers/u128/add.leo diff --git a/compiler/tests/integers/u128/console_assert.leo b/compiler/otests/integers/u128/console_assert.leo similarity index 100% rename from compiler/tests/integers/u128/console_assert.leo rename to compiler/otests/integers/u128/console_assert.leo diff --git a/compiler/tests/integers/u128/div.leo b/compiler/otests/integers/u128/div.leo similarity index 100% rename from compiler/tests/integers/u128/div.leo rename to compiler/otests/integers/u128/div.leo diff --git a/compiler/tests/integers/u128/eq.leo b/compiler/otests/integers/u128/eq.leo similarity index 100% rename from compiler/tests/integers/u128/eq.leo rename to compiler/otests/integers/u128/eq.leo diff --git a/compiler/tests/integers/u128/ge.leo b/compiler/otests/integers/u128/ge.leo similarity index 100% rename from compiler/tests/integers/u128/ge.leo rename to compiler/otests/integers/u128/ge.leo diff --git a/compiler/tests/integers/u128/gt.leo b/compiler/otests/integers/u128/gt.leo similarity index 100% rename from compiler/tests/integers/u128/gt.leo rename to compiler/otests/integers/u128/gt.leo diff --git a/compiler/tests/integers/u128/input.leo b/compiler/otests/integers/u128/input.leo similarity index 100% rename from compiler/tests/integers/u128/input.leo rename to compiler/otests/integers/u128/input.leo diff --git a/compiler/tests/integers/u128/le.leo b/compiler/otests/integers/u128/le.leo similarity index 100% rename from compiler/tests/integers/u128/le.leo rename to compiler/otests/integers/u128/le.leo diff --git a/compiler/tests/integers/u128/lt.leo b/compiler/otests/integers/u128/lt.leo similarity index 100% rename from compiler/tests/integers/u128/lt.leo rename to compiler/otests/integers/u128/lt.leo diff --git a/compiler/tests/integers/u128/max.leo b/compiler/otests/integers/u128/max.leo similarity index 100% rename from compiler/tests/integers/u128/max.leo rename to compiler/otests/integers/u128/max.leo diff --git a/compiler/tests/integers/u128/max_fail.leo b/compiler/otests/integers/u128/max_fail.leo similarity index 100% rename from compiler/tests/integers/u128/max_fail.leo rename to compiler/otests/integers/u128/max_fail.leo diff --git a/compiler/tests/integers/u128/min.leo b/compiler/otests/integers/u128/min.leo similarity index 100% rename from compiler/tests/integers/u128/min.leo rename to compiler/otests/integers/u128/min.leo diff --git a/compiler/tests/integers/u128/min_fail.leo b/compiler/otests/integers/u128/min_fail.leo similarity index 100% rename from compiler/tests/integers/u128/min_fail.leo rename to compiler/otests/integers/u128/min_fail.leo diff --git a/compiler/tests/integers/u128/mod.rs b/compiler/otests/integers/u128/mod.rs similarity index 100% rename from compiler/tests/integers/u128/mod.rs rename to compiler/otests/integers/u128/mod.rs diff --git a/compiler/tests/integers/u128/mul.leo b/compiler/otests/integers/u128/mul.leo similarity index 100% rename from compiler/tests/integers/u128/mul.leo rename to compiler/otests/integers/u128/mul.leo diff --git a/compiler/tests/integers/u128/ne.leo b/compiler/otests/integers/u128/ne.leo similarity index 100% rename from compiler/tests/integers/u128/ne.leo rename to compiler/otests/integers/u128/ne.leo diff --git a/compiler/tests/integers/u128/no_space_between_literal.leo b/compiler/otests/integers/u128/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/u128/no_space_between_literal.leo rename to compiler/otests/integers/u128/no_space_between_literal.leo diff --git a/compiler/tests/integers/u128/pow.leo b/compiler/otests/integers/u128/pow.leo similarity index 100% rename from compiler/tests/integers/u128/pow.leo rename to compiler/otests/integers/u128/pow.leo diff --git a/compiler/tests/integers/u128/sub.leo b/compiler/otests/integers/u128/sub.leo similarity index 100% rename from compiler/tests/integers/u128/sub.leo rename to compiler/otests/integers/u128/sub.leo diff --git a/compiler/tests/integers/u128/ternary.leo b/compiler/otests/integers/u128/ternary.leo similarity index 100% rename from compiler/tests/integers/u128/ternary.leo rename to compiler/otests/integers/u128/ternary.leo diff --git a/compiler/tests/integers/u16/add.leo b/compiler/otests/integers/u16/add.leo similarity index 100% rename from compiler/tests/integers/u16/add.leo rename to compiler/otests/integers/u16/add.leo diff --git a/compiler/tests/integers/u16/console_assert.leo b/compiler/otests/integers/u16/console_assert.leo similarity index 100% rename from compiler/tests/integers/u16/console_assert.leo rename to compiler/otests/integers/u16/console_assert.leo diff --git a/compiler/tests/integers/u16/div.leo b/compiler/otests/integers/u16/div.leo similarity index 100% rename from compiler/tests/integers/u16/div.leo rename to compiler/otests/integers/u16/div.leo diff --git a/compiler/tests/integers/u16/eq.leo b/compiler/otests/integers/u16/eq.leo similarity index 100% rename from compiler/tests/integers/u16/eq.leo rename to compiler/otests/integers/u16/eq.leo diff --git a/compiler/tests/integers/u16/ge.leo b/compiler/otests/integers/u16/ge.leo similarity index 100% rename from compiler/tests/integers/u16/ge.leo rename to compiler/otests/integers/u16/ge.leo diff --git a/compiler/tests/integers/u16/gt.leo b/compiler/otests/integers/u16/gt.leo similarity index 100% rename from compiler/tests/integers/u16/gt.leo rename to compiler/otests/integers/u16/gt.leo diff --git a/compiler/tests/integers/u16/input.leo b/compiler/otests/integers/u16/input.leo similarity index 100% rename from compiler/tests/integers/u16/input.leo rename to compiler/otests/integers/u16/input.leo diff --git a/compiler/tests/integers/u16/le.leo b/compiler/otests/integers/u16/le.leo similarity index 100% rename from compiler/tests/integers/u16/le.leo rename to compiler/otests/integers/u16/le.leo diff --git a/compiler/tests/integers/u16/lt.leo b/compiler/otests/integers/u16/lt.leo similarity index 100% rename from compiler/tests/integers/u16/lt.leo rename to compiler/otests/integers/u16/lt.leo diff --git a/compiler/tests/integers/u16/max.leo b/compiler/otests/integers/u16/max.leo similarity index 100% rename from compiler/tests/integers/u16/max.leo rename to compiler/otests/integers/u16/max.leo diff --git a/compiler/tests/integers/u16/max_fail.leo b/compiler/otests/integers/u16/max_fail.leo similarity index 100% rename from compiler/tests/integers/u16/max_fail.leo rename to compiler/otests/integers/u16/max_fail.leo diff --git a/compiler/tests/integers/u16/min.leo b/compiler/otests/integers/u16/min.leo similarity index 100% rename from compiler/tests/integers/u16/min.leo rename to compiler/otests/integers/u16/min.leo diff --git a/compiler/tests/integers/u16/min_fail.leo b/compiler/otests/integers/u16/min_fail.leo similarity index 100% rename from compiler/tests/integers/u16/min_fail.leo rename to compiler/otests/integers/u16/min_fail.leo diff --git a/compiler/tests/integers/u16/mod.rs b/compiler/otests/integers/u16/mod.rs similarity index 100% rename from compiler/tests/integers/u16/mod.rs rename to compiler/otests/integers/u16/mod.rs diff --git a/compiler/tests/integers/u16/mul.leo b/compiler/otests/integers/u16/mul.leo similarity index 100% rename from compiler/tests/integers/u16/mul.leo rename to compiler/otests/integers/u16/mul.leo diff --git a/compiler/tests/integers/u16/ne.leo b/compiler/otests/integers/u16/ne.leo similarity index 100% rename from compiler/tests/integers/u16/ne.leo rename to compiler/otests/integers/u16/ne.leo diff --git a/compiler/tests/integers/u16/no_space_between_literal.leo b/compiler/otests/integers/u16/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/u16/no_space_between_literal.leo rename to compiler/otests/integers/u16/no_space_between_literal.leo diff --git a/compiler/tests/integers/u16/pow.leo b/compiler/otests/integers/u16/pow.leo similarity index 100% rename from compiler/tests/integers/u16/pow.leo rename to compiler/otests/integers/u16/pow.leo diff --git a/compiler/tests/integers/u16/sub.leo b/compiler/otests/integers/u16/sub.leo similarity index 100% rename from compiler/tests/integers/u16/sub.leo rename to compiler/otests/integers/u16/sub.leo diff --git a/compiler/tests/integers/u16/ternary.leo b/compiler/otests/integers/u16/ternary.leo similarity index 100% rename from compiler/tests/integers/u16/ternary.leo rename to compiler/otests/integers/u16/ternary.leo diff --git a/compiler/tests/integers/u32/add.leo b/compiler/otests/integers/u32/add.leo similarity index 100% rename from compiler/tests/integers/u32/add.leo rename to compiler/otests/integers/u32/add.leo diff --git a/compiler/tests/integers/u32/console_assert.leo b/compiler/otests/integers/u32/console_assert.leo similarity index 100% rename from compiler/tests/integers/u32/console_assert.leo rename to compiler/otests/integers/u32/console_assert.leo diff --git a/compiler/tests/integers/u32/div.leo b/compiler/otests/integers/u32/div.leo similarity index 100% rename from compiler/tests/integers/u32/div.leo rename to compiler/otests/integers/u32/div.leo diff --git a/compiler/tests/integers/u32/eq.leo b/compiler/otests/integers/u32/eq.leo similarity index 100% rename from compiler/tests/integers/u32/eq.leo rename to compiler/otests/integers/u32/eq.leo diff --git a/compiler/tests/integers/u32/ge.leo b/compiler/otests/integers/u32/ge.leo similarity index 100% rename from compiler/tests/integers/u32/ge.leo rename to compiler/otests/integers/u32/ge.leo diff --git a/compiler/tests/integers/u32/gt.leo b/compiler/otests/integers/u32/gt.leo similarity index 100% rename from compiler/tests/integers/u32/gt.leo rename to compiler/otests/integers/u32/gt.leo diff --git a/compiler/tests/integers/u32/input.leo b/compiler/otests/integers/u32/input.leo similarity index 100% rename from compiler/tests/integers/u32/input.leo rename to compiler/otests/integers/u32/input.leo diff --git a/compiler/tests/integers/u32/le.leo b/compiler/otests/integers/u32/le.leo similarity index 100% rename from compiler/tests/integers/u32/le.leo rename to compiler/otests/integers/u32/le.leo diff --git a/compiler/tests/integers/u32/lt.leo b/compiler/otests/integers/u32/lt.leo similarity index 100% rename from compiler/tests/integers/u32/lt.leo rename to compiler/otests/integers/u32/lt.leo diff --git a/compiler/tests/integers/u32/max.leo b/compiler/otests/integers/u32/max.leo similarity index 100% rename from compiler/tests/integers/u32/max.leo rename to compiler/otests/integers/u32/max.leo diff --git a/compiler/tests/integers/u32/max_fail.leo b/compiler/otests/integers/u32/max_fail.leo similarity index 100% rename from compiler/tests/integers/u32/max_fail.leo rename to compiler/otests/integers/u32/max_fail.leo diff --git a/compiler/tests/integers/u32/min.leo b/compiler/otests/integers/u32/min.leo similarity index 100% rename from compiler/tests/integers/u32/min.leo rename to compiler/otests/integers/u32/min.leo diff --git a/compiler/tests/integers/u32/min_fail.leo b/compiler/otests/integers/u32/min_fail.leo similarity index 100% rename from compiler/tests/integers/u32/min_fail.leo rename to compiler/otests/integers/u32/min_fail.leo diff --git a/compiler/tests/integers/u32/mod.rs b/compiler/otests/integers/u32/mod.rs similarity index 100% rename from compiler/tests/integers/u32/mod.rs rename to compiler/otests/integers/u32/mod.rs diff --git a/compiler/tests/integers/u32/mul.leo b/compiler/otests/integers/u32/mul.leo similarity index 100% rename from compiler/tests/integers/u32/mul.leo rename to compiler/otests/integers/u32/mul.leo diff --git a/compiler/tests/integers/u32/ne.leo b/compiler/otests/integers/u32/ne.leo similarity index 100% rename from compiler/tests/integers/u32/ne.leo rename to compiler/otests/integers/u32/ne.leo diff --git a/compiler/tests/integers/u32/no_space_between_literal.leo b/compiler/otests/integers/u32/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/u32/no_space_between_literal.leo rename to compiler/otests/integers/u32/no_space_between_literal.leo diff --git a/compiler/tests/integers/u32/pow.leo b/compiler/otests/integers/u32/pow.leo similarity index 100% rename from compiler/tests/integers/u32/pow.leo rename to compiler/otests/integers/u32/pow.leo diff --git a/compiler/tests/integers/u32/sub.leo b/compiler/otests/integers/u32/sub.leo similarity index 100% rename from compiler/tests/integers/u32/sub.leo rename to compiler/otests/integers/u32/sub.leo diff --git a/compiler/tests/integers/u32/ternary.leo b/compiler/otests/integers/u32/ternary.leo similarity index 100% rename from compiler/tests/integers/u32/ternary.leo rename to compiler/otests/integers/u32/ternary.leo diff --git a/compiler/tests/integers/u64/add.leo b/compiler/otests/integers/u64/add.leo similarity index 100% rename from compiler/tests/integers/u64/add.leo rename to compiler/otests/integers/u64/add.leo diff --git a/compiler/tests/integers/u64/console_assert.leo b/compiler/otests/integers/u64/console_assert.leo similarity index 100% rename from compiler/tests/integers/u64/console_assert.leo rename to compiler/otests/integers/u64/console_assert.leo diff --git a/compiler/tests/integers/u64/div.leo b/compiler/otests/integers/u64/div.leo similarity index 100% rename from compiler/tests/integers/u64/div.leo rename to compiler/otests/integers/u64/div.leo diff --git a/compiler/tests/integers/u64/eq.leo b/compiler/otests/integers/u64/eq.leo similarity index 100% rename from compiler/tests/integers/u64/eq.leo rename to compiler/otests/integers/u64/eq.leo diff --git a/compiler/tests/integers/u64/ge.leo b/compiler/otests/integers/u64/ge.leo similarity index 100% rename from compiler/tests/integers/u64/ge.leo rename to compiler/otests/integers/u64/ge.leo diff --git a/compiler/tests/integers/u64/gt.leo b/compiler/otests/integers/u64/gt.leo similarity index 100% rename from compiler/tests/integers/u64/gt.leo rename to compiler/otests/integers/u64/gt.leo diff --git a/compiler/tests/integers/u64/input.leo b/compiler/otests/integers/u64/input.leo similarity index 100% rename from compiler/tests/integers/u64/input.leo rename to compiler/otests/integers/u64/input.leo diff --git a/compiler/tests/integers/u64/le.leo b/compiler/otests/integers/u64/le.leo similarity index 100% rename from compiler/tests/integers/u64/le.leo rename to compiler/otests/integers/u64/le.leo diff --git a/compiler/tests/integers/u64/lt.leo b/compiler/otests/integers/u64/lt.leo similarity index 100% rename from compiler/tests/integers/u64/lt.leo rename to compiler/otests/integers/u64/lt.leo diff --git a/compiler/tests/integers/u64/max.leo b/compiler/otests/integers/u64/max.leo similarity index 100% rename from compiler/tests/integers/u64/max.leo rename to compiler/otests/integers/u64/max.leo diff --git a/compiler/tests/integers/u64/max_fail.leo b/compiler/otests/integers/u64/max_fail.leo similarity index 100% rename from compiler/tests/integers/u64/max_fail.leo rename to compiler/otests/integers/u64/max_fail.leo diff --git a/compiler/tests/integers/u64/min.leo b/compiler/otests/integers/u64/min.leo similarity index 100% rename from compiler/tests/integers/u64/min.leo rename to compiler/otests/integers/u64/min.leo diff --git a/compiler/tests/integers/u64/min_fail.leo b/compiler/otests/integers/u64/min_fail.leo similarity index 100% rename from compiler/tests/integers/u64/min_fail.leo rename to compiler/otests/integers/u64/min_fail.leo diff --git a/compiler/tests/integers/u64/mod.rs b/compiler/otests/integers/u64/mod.rs similarity index 100% rename from compiler/tests/integers/u64/mod.rs rename to compiler/otests/integers/u64/mod.rs diff --git a/compiler/tests/integers/u64/mul.leo b/compiler/otests/integers/u64/mul.leo similarity index 100% rename from compiler/tests/integers/u64/mul.leo rename to compiler/otests/integers/u64/mul.leo diff --git a/compiler/tests/integers/u64/ne.leo b/compiler/otests/integers/u64/ne.leo similarity index 100% rename from compiler/tests/integers/u64/ne.leo rename to compiler/otests/integers/u64/ne.leo diff --git a/compiler/tests/integers/u64/no_space_between_literal.leo b/compiler/otests/integers/u64/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/u64/no_space_between_literal.leo rename to compiler/otests/integers/u64/no_space_between_literal.leo diff --git a/compiler/tests/integers/u64/pow.leo b/compiler/otests/integers/u64/pow.leo similarity index 100% rename from compiler/tests/integers/u64/pow.leo rename to compiler/otests/integers/u64/pow.leo diff --git a/compiler/tests/integers/u64/sub.leo b/compiler/otests/integers/u64/sub.leo similarity index 100% rename from compiler/tests/integers/u64/sub.leo rename to compiler/otests/integers/u64/sub.leo diff --git a/compiler/tests/integers/u64/ternary.leo b/compiler/otests/integers/u64/ternary.leo similarity index 100% rename from compiler/tests/integers/u64/ternary.leo rename to compiler/otests/integers/u64/ternary.leo diff --git a/compiler/tests/integers/u8/add.leo b/compiler/otests/integers/u8/add.leo similarity index 100% rename from compiler/tests/integers/u8/add.leo rename to compiler/otests/integers/u8/add.leo diff --git a/compiler/tests/integers/u8/console_assert.leo b/compiler/otests/integers/u8/console_assert.leo similarity index 100% rename from compiler/tests/integers/u8/console_assert.leo rename to compiler/otests/integers/u8/console_assert.leo diff --git a/compiler/tests/integers/u8/div.leo b/compiler/otests/integers/u8/div.leo similarity index 100% rename from compiler/tests/integers/u8/div.leo rename to compiler/otests/integers/u8/div.leo diff --git a/compiler/tests/integers/u8/eq.leo b/compiler/otests/integers/u8/eq.leo similarity index 100% rename from compiler/tests/integers/u8/eq.leo rename to compiler/otests/integers/u8/eq.leo diff --git a/compiler/tests/integers/u8/ge.leo b/compiler/otests/integers/u8/ge.leo similarity index 100% rename from compiler/tests/integers/u8/ge.leo rename to compiler/otests/integers/u8/ge.leo diff --git a/compiler/tests/integers/u8/gt.leo b/compiler/otests/integers/u8/gt.leo similarity index 100% rename from compiler/tests/integers/u8/gt.leo rename to compiler/otests/integers/u8/gt.leo diff --git a/compiler/tests/integers/u8/input.leo b/compiler/otests/integers/u8/input.leo similarity index 100% rename from compiler/tests/integers/u8/input.leo rename to compiler/otests/integers/u8/input.leo diff --git a/compiler/tests/integers/u8/le.leo b/compiler/otests/integers/u8/le.leo similarity index 100% rename from compiler/tests/integers/u8/le.leo rename to compiler/otests/integers/u8/le.leo diff --git a/compiler/tests/integers/u8/lt.leo b/compiler/otests/integers/u8/lt.leo similarity index 100% rename from compiler/tests/integers/u8/lt.leo rename to compiler/otests/integers/u8/lt.leo diff --git a/compiler/tests/integers/u8/max.leo b/compiler/otests/integers/u8/max.leo similarity index 100% rename from compiler/tests/integers/u8/max.leo rename to compiler/otests/integers/u8/max.leo diff --git a/compiler/tests/integers/u8/max_fail.leo b/compiler/otests/integers/u8/max_fail.leo similarity index 100% rename from compiler/tests/integers/u8/max_fail.leo rename to compiler/otests/integers/u8/max_fail.leo diff --git a/compiler/tests/integers/u8/min.leo b/compiler/otests/integers/u8/min.leo similarity index 100% rename from compiler/tests/integers/u8/min.leo rename to compiler/otests/integers/u8/min.leo diff --git a/compiler/tests/integers/u8/min_fail.leo b/compiler/otests/integers/u8/min_fail.leo similarity index 100% rename from compiler/tests/integers/u8/min_fail.leo rename to compiler/otests/integers/u8/min_fail.leo diff --git a/compiler/tests/integers/u8/mod.rs b/compiler/otests/integers/u8/mod.rs similarity index 100% rename from compiler/tests/integers/u8/mod.rs rename to compiler/otests/integers/u8/mod.rs diff --git a/compiler/tests/integers/u8/mul.leo b/compiler/otests/integers/u8/mul.leo similarity index 100% rename from compiler/tests/integers/u8/mul.leo rename to compiler/otests/integers/u8/mul.leo diff --git a/compiler/tests/integers/u8/ne.leo b/compiler/otests/integers/u8/ne.leo similarity index 100% rename from compiler/tests/integers/u8/ne.leo rename to compiler/otests/integers/u8/ne.leo diff --git a/compiler/tests/integers/u8/no_space_between_literal.leo b/compiler/otests/integers/u8/no_space_between_literal.leo similarity index 100% rename from compiler/tests/integers/u8/no_space_between_literal.leo rename to compiler/otests/integers/u8/no_space_between_literal.leo diff --git a/compiler/tests/integers/u8/pow.leo b/compiler/otests/integers/u8/pow.leo similarity index 100% rename from compiler/tests/integers/u8/pow.leo rename to compiler/otests/integers/u8/pow.leo diff --git a/compiler/tests/integers/u8/sub.leo b/compiler/otests/integers/u8/sub.leo similarity index 100% rename from compiler/tests/integers/u8/sub.leo rename to compiler/otests/integers/u8/sub.leo diff --git a/compiler/tests/integers/u8/ternary.leo b/compiler/otests/integers/u8/ternary.leo similarity index 100% rename from compiler/tests/integers/u8/ternary.leo rename to compiler/otests/integers/u8/ternary.leo diff --git a/compiler/tests/integers/uint_macro.rs b/compiler/otests/integers/uint_macro.rs similarity index 100% rename from compiler/tests/integers/uint_macro.rs rename to compiler/otests/integers/uint_macro.rs diff --git a/compiler/tests/mod.rs b/compiler/otests/mod.rs similarity index 100% rename from compiler/tests/mod.rs rename to compiler/otests/mod.rs diff --git a/compiler/tests/mutability/array.leo b/compiler/otests/mutability/array.leo similarity index 100% rename from compiler/tests/mutability/array.leo rename to compiler/otests/mutability/array.leo diff --git a/compiler/tests/mutability/array_mut.leo b/compiler/otests/mutability/array_mut.leo similarity index 100% rename from compiler/tests/mutability/array_mut.leo rename to compiler/otests/mutability/array_mut.leo diff --git a/compiler/tests/mutability/array_splice_mut.leo b/compiler/otests/mutability/array_splice_mut.leo similarity index 100% rename from compiler/tests/mutability/array_splice_mut.leo rename to compiler/otests/mutability/array_splice_mut.leo diff --git a/compiler/tests/mutability/array_tuple_mut.leo b/compiler/otests/mutability/array_tuple_mut.leo similarity index 100% rename from compiler/tests/mutability/array_tuple_mut.leo rename to compiler/otests/mutability/array_tuple_mut.leo diff --git a/compiler/tests/mutability/circuit.leo b/compiler/otests/mutability/circuit.leo similarity index 100% rename from compiler/tests/mutability/circuit.leo rename to compiler/otests/mutability/circuit.leo diff --git a/compiler/tests/mutability/circuit_function_mut.leo b/compiler/otests/mutability/circuit_function_mut.leo similarity index 100% rename from compiler/tests/mutability/circuit_function_mut.leo rename to compiler/otests/mutability/circuit_function_mut.leo diff --git a/compiler/tests/mutability/circuit_mut.leo b/compiler/otests/mutability/circuit_mut.leo similarity index 100% rename from compiler/tests/mutability/circuit_mut.leo rename to compiler/otests/mutability/circuit_mut.leo diff --git a/compiler/tests/mutability/circuit_static_function_mut.leo b/compiler/otests/mutability/circuit_static_function_mut.leo similarity index 100% rename from compiler/tests/mutability/circuit_static_function_mut.leo rename to compiler/otests/mutability/circuit_static_function_mut.leo diff --git a/compiler/tests/mutability/circuit_variable_mut.leo b/compiler/otests/mutability/circuit_variable_mut.leo similarity index 100% rename from compiler/tests/mutability/circuit_variable_mut.leo rename to compiler/otests/mutability/circuit_variable_mut.leo diff --git a/compiler/tests/mutability/cond_mut.leo b/compiler/otests/mutability/cond_mut.leo similarity index 100% rename from compiler/tests/mutability/cond_mut.leo rename to compiler/otests/mutability/cond_mut.leo diff --git a/compiler/tests/mutability/const.leo b/compiler/otests/mutability/const.leo similarity index 100% rename from compiler/tests/mutability/const.leo rename to compiler/otests/mutability/const.leo diff --git a/compiler/tests/mutability/function_input.leo b/compiler/otests/mutability/function_input.leo similarity index 100% rename from compiler/tests/mutability/function_input.leo rename to compiler/otests/mutability/function_input.leo diff --git a/compiler/tests/mutability/function_input_mut.leo b/compiler/otests/mutability/function_input_mut.leo similarity index 100% rename from compiler/tests/mutability/function_input_mut.leo rename to compiler/otests/mutability/function_input_mut.leo diff --git a/compiler/tests/mutability/let.leo b/compiler/otests/mutability/let.leo similarity index 100% rename from compiler/tests/mutability/let.leo rename to compiler/otests/mutability/let.leo diff --git a/compiler/tests/mutability/let_mut.leo b/compiler/otests/mutability/let_mut.leo similarity index 100% rename from compiler/tests/mutability/let_mut.leo rename to compiler/otests/mutability/let_mut.leo diff --git a/compiler/tests/mutability/let_mut_nested.leo b/compiler/otests/mutability/let_mut_nested.leo similarity index 100% rename from compiler/tests/mutability/let_mut_nested.leo rename to compiler/otests/mutability/let_mut_nested.leo diff --git a/compiler/tests/mutability/mod.rs b/compiler/otests/mutability/mod.rs similarity index 100% rename from compiler/tests/mutability/mod.rs rename to compiler/otests/mutability/mod.rs diff --git a/compiler/tests/mutability/swap.leo b/compiler/otests/mutability/swap.leo similarity index 100% rename from compiler/tests/mutability/swap.leo rename to compiler/otests/mutability/swap.leo diff --git a/compiler/tests/statements/block.leo b/compiler/otests/statements/block.leo similarity index 100% rename from compiler/tests/statements/block.leo rename to compiler/otests/statements/block.leo diff --git a/compiler/tests/statements/conditional/assert.leo b/compiler/otests/statements/conditional/assert.leo similarity index 100% rename from compiler/tests/statements/conditional/assert.leo rename to compiler/otests/statements/conditional/assert.leo diff --git a/compiler/tests/statements/conditional/chain.leo b/compiler/otests/statements/conditional/chain.leo similarity index 100% rename from compiler/tests/statements/conditional/chain.leo rename to compiler/otests/statements/conditional/chain.leo diff --git a/compiler/tests/statements/conditional/cond_switch.leo b/compiler/otests/statements/conditional/cond_switch.leo similarity index 100% rename from compiler/tests/statements/conditional/cond_switch.leo rename to compiler/otests/statements/conditional/cond_switch.leo diff --git a/compiler/tests/statements/conditional/for_loop.leo b/compiler/otests/statements/conditional/for_loop.leo similarity index 100% rename from compiler/tests/statements/conditional/for_loop.leo rename to compiler/otests/statements/conditional/for_loop.leo diff --git a/compiler/tests/statements/conditional/input/cond_switch.in b/compiler/otests/statements/conditional/input/cond_switch.in similarity index 100% rename from compiler/tests/statements/conditional/input/cond_switch.in rename to compiler/otests/statements/conditional/input/cond_switch.in diff --git a/compiler/tests/statements/conditional/input/registers_one.in b/compiler/otests/statements/conditional/input/registers_one.in similarity index 100% rename from compiler/tests/statements/conditional/input/registers_one.in rename to compiler/otests/statements/conditional/input/registers_one.in diff --git a/compiler/tests/statements/conditional/input/registers_zero.in b/compiler/otests/statements/conditional/input/registers_zero.in similarity index 100% rename from compiler/tests/statements/conditional/input/registers_zero.in rename to compiler/otests/statements/conditional/input/registers_zero.in diff --git a/compiler/tests/statements/conditional/mod.rs b/compiler/otests/statements/conditional/mod.rs similarity index 100% rename from compiler/tests/statements/conditional/mod.rs rename to compiler/otests/statements/conditional/mod.rs diff --git a/compiler/tests/statements/conditional/multiple_returns.leo b/compiler/otests/statements/conditional/multiple_returns.leo similarity index 100% rename from compiler/tests/statements/conditional/multiple_returns.leo rename to compiler/otests/statements/conditional/multiple_returns.leo diff --git a/compiler/tests/statements/conditional/mutate.leo b/compiler/otests/statements/conditional/mutate.leo similarity index 100% rename from compiler/tests/statements/conditional/mutate.leo rename to compiler/otests/statements/conditional/mutate.leo diff --git a/compiler/tests/statements/conditional/nested.leo b/compiler/otests/statements/conditional/nested.leo similarity index 100% rename from compiler/tests/statements/conditional/nested.leo rename to compiler/otests/statements/conditional/nested.leo diff --git a/compiler/tests/statements/conditional/output/cond_switch.out b/compiler/otests/statements/conditional/output/cond_switch.out similarity index 100% rename from compiler/tests/statements/conditional/output/cond_switch.out rename to compiler/otests/statements/conditional/output/cond_switch.out diff --git a/compiler/tests/statements/conditional/output/registers_one.out b/compiler/otests/statements/conditional/output/registers_one.out similarity index 100% rename from compiler/tests/statements/conditional/output/registers_one.out rename to compiler/otests/statements/conditional/output/registers_one.out diff --git a/compiler/tests/statements/conditional/output/registers_zero.out b/compiler/otests/statements/conditional/output/registers_zero.out similarity index 100% rename from compiler/tests/statements/conditional/output/registers_zero.out rename to compiler/otests/statements/conditional/output/registers_zero.out diff --git a/compiler/tests/statements/iteration_basic.leo b/compiler/otests/statements/iteration_basic.leo similarity index 100% rename from compiler/tests/statements/iteration_basic.leo rename to compiler/otests/statements/iteration_basic.leo diff --git a/compiler/tests/statements/iteration_input.in b/compiler/otests/statements/iteration_input.in similarity index 100% rename from compiler/tests/statements/iteration_input.in rename to compiler/otests/statements/iteration_input.in diff --git a/compiler/tests/statements/iteration_input.leo b/compiler/otests/statements/iteration_input.leo similarity index 100% rename from compiler/tests/statements/iteration_input.leo rename to compiler/otests/statements/iteration_input.leo diff --git a/compiler/tests/statements/iteration_type_fail.leo b/compiler/otests/statements/iteration_type_fail.leo similarity index 100% rename from compiler/tests/statements/iteration_type_fail.leo rename to compiler/otests/statements/iteration_type_fail.leo diff --git a/compiler/tests/statements/iteration_variable.leo b/compiler/otests/statements/iteration_variable.leo similarity index 100% rename from compiler/tests/statements/iteration_variable.leo rename to compiler/otests/statements/iteration_variable.leo diff --git a/compiler/tests/statements/mod.rs b/compiler/otests/statements/mod.rs similarity index 100% rename from compiler/tests/statements/mod.rs rename to compiler/otests/statements/mod.rs diff --git a/compiler/tests/statements/num_returns_fail.leo b/compiler/otests/statements/num_returns_fail.leo similarity index 100% rename from compiler/tests/statements/num_returns_fail.leo rename to compiler/otests/statements/num_returns_fail.leo diff --git a/compiler/tests/statements/ternary_basic.leo b/compiler/otests/statements/ternary_basic.leo similarity index 100% rename from compiler/tests/statements/ternary_basic.leo rename to compiler/otests/statements/ternary_basic.leo diff --git a/compiler/tests/syntax/compare_mismatched_types.leo b/compiler/otests/syntax/compare_mismatched_types.leo similarity index 100% rename from compiler/tests/syntax/compare_mismatched_types.leo rename to compiler/otests/syntax/compare_mismatched_types.leo diff --git a/compiler/tests/syntax/identifiers/address_fail.leo b/compiler/otests/syntax/identifiers/address_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/address_fail.leo rename to compiler/otests/syntax/identifiers/address_fail.leo diff --git a/compiler/tests/syntax/identifiers/console_fail.leo b/compiler/otests/syntax/identifiers/console_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/console_fail.leo rename to compiler/otests/syntax/identifiers/console_fail.leo diff --git a/compiler/tests/syntax/identifiers/field_fail.leo b/compiler/otests/syntax/identifiers/field_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/field_fail.leo rename to compiler/otests/syntax/identifiers/field_fail.leo diff --git a/compiler/tests/syntax/identifiers/group_fail.leo b/compiler/otests/syntax/identifiers/group_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/group_fail.leo rename to compiler/otests/syntax/identifiers/group_fail.leo diff --git a/compiler/tests/syntax/identifiers/i8_fail.leo b/compiler/otests/syntax/identifiers/i8_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/i8_fail.leo rename to compiler/otests/syntax/identifiers/i8_fail.leo diff --git a/compiler/tests/syntax/identifiers/input_fail.leo b/compiler/otests/syntax/identifiers/input_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/input_fail.leo rename to compiler/otests/syntax/identifiers/input_fail.leo diff --git a/compiler/tests/syntax/identifiers/mod.rs b/compiler/otests/syntax/identifiers/mod.rs similarity index 100% rename from compiler/tests/syntax/identifiers/mod.rs rename to compiler/otests/syntax/identifiers/mod.rs diff --git a/compiler/tests/syntax/identifiers/self_keyword_fail.leo b/compiler/otests/syntax/identifiers/self_keyword_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/self_keyword_fail.leo rename to compiler/otests/syntax/identifiers/self_keyword_fail.leo diff --git a/compiler/tests/syntax/identifiers/self_type_fail.leo b/compiler/otests/syntax/identifiers/self_type_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/self_type_fail.leo rename to compiler/otests/syntax/identifiers/self_type_fail.leo diff --git a/compiler/tests/syntax/identifiers/true_fail.leo b/compiler/otests/syntax/identifiers/true_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/true_fail.leo rename to compiler/otests/syntax/identifiers/true_fail.leo diff --git a/compiler/tests/syntax/identifiers/u8_fail.leo b/compiler/otests/syntax/identifiers/u8_fail.leo similarity index 100% rename from compiler/tests/syntax/identifiers/u8_fail.leo rename to compiler/otests/syntax/identifiers/u8_fail.leo diff --git a/compiler/tests/syntax/input_semicolon.leo b/compiler/otests/syntax/input_semicolon.leo similarity index 100% rename from compiler/tests/syntax/input_semicolon.leo rename to compiler/otests/syntax/input_semicolon.leo diff --git a/compiler/tests/syntax/mod.rs b/compiler/otests/syntax/mod.rs similarity index 100% rename from compiler/tests/syntax/mod.rs rename to compiler/otests/syntax/mod.rs diff --git a/compiler/tests/syntax/semicolon.leo b/compiler/otests/syntax/semicolon.leo similarity index 100% rename from compiler/tests/syntax/semicolon.leo rename to compiler/otests/syntax/semicolon.leo diff --git a/compiler/tests/syntax/undefined.leo b/compiler/otests/syntax/undefined.leo similarity index 100% rename from compiler/tests/syntax/undefined.leo rename to compiler/otests/syntax/undefined.leo diff --git a/compiler/tests/tuples/access.leo b/compiler/otests/tuples/access.leo similarity index 100% rename from compiler/tests/tuples/access.leo rename to compiler/otests/tuples/access.leo diff --git a/compiler/tests/tuples/basic.leo b/compiler/otests/tuples/basic.leo similarity index 100% rename from compiler/tests/tuples/basic.leo rename to compiler/otests/tuples/basic.leo diff --git a/compiler/tests/tuples/function.leo b/compiler/otests/tuples/function.leo similarity index 100% rename from compiler/tests/tuples/function.leo rename to compiler/otests/tuples/function.leo diff --git a/compiler/tests/tuples/function_multiple.leo b/compiler/otests/tuples/function_multiple.leo similarity index 100% rename from compiler/tests/tuples/function_multiple.leo rename to compiler/otests/tuples/function_multiple.leo diff --git a/compiler/tests/tuples/function_typed.leo b/compiler/otests/tuples/function_typed.leo similarity index 100% rename from compiler/tests/tuples/function_typed.leo rename to compiler/otests/tuples/function_typed.leo diff --git a/compiler/tests/tuples/input.leo b/compiler/otests/tuples/input.leo similarity index 100% rename from compiler/tests/tuples/input.leo rename to compiler/otests/tuples/input.leo diff --git a/compiler/tests/tuples/inputs/input.in b/compiler/otests/tuples/inputs/input.in similarity index 100% rename from compiler/tests/tuples/inputs/input.in rename to compiler/otests/tuples/inputs/input.in diff --git a/compiler/tests/tuples/mod.rs b/compiler/otests/tuples/mod.rs similarity index 100% rename from compiler/tests/tuples/mod.rs rename to compiler/otests/tuples/mod.rs diff --git a/compiler/tests/tuples/multiple.leo b/compiler/otests/tuples/multiple.leo similarity index 100% rename from compiler/tests/tuples/multiple.leo rename to compiler/otests/tuples/multiple.leo diff --git a/compiler/tests/tuples/multiple_typed.leo b/compiler/otests/tuples/multiple_typed.leo similarity index 100% rename from compiler/tests/tuples/multiple_typed.leo rename to compiler/otests/tuples/multiple_typed.leo diff --git a/compiler/tests/tuples/nested.leo b/compiler/otests/tuples/nested.leo similarity index 100% rename from compiler/tests/tuples/nested.leo rename to compiler/otests/tuples/nested.leo diff --git a/compiler/tests/tuples/nested_access.leo b/compiler/otests/tuples/nested_access.leo similarity index 100% rename from compiler/tests/tuples/nested_access.leo rename to compiler/otests/tuples/nested_access.leo diff --git a/compiler/tests/tuples/nested_typed.leo b/compiler/otests/tuples/nested_typed.leo similarity index 100% rename from compiler/tests/tuples/nested_typed.leo rename to compiler/otests/tuples/nested_typed.leo diff --git a/compiler/tests/tuples/typed.leo b/compiler/otests/tuples/typed.leo similarity index 100% rename from compiler/tests/tuples/typed.leo rename to compiler/otests/tuples/typed.leo diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index 0b19ea3b77..fe86c87749 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -16,14 +16,7 @@ //! Compiles a Leo program from a file path. -use crate::{ - constraints::{generate_constraints, generate_test_constraints}, - errors::CompilerError, - CompilerOptions, - GroupType, - OutputBytes, - OutputFile, -}; +use crate::{CompilerOptions, GroupType, Output, OutputFile, constraints::{generate_constraints, generate_test_constraints}, errors::CompilerError}; pub use leo_asg::{new_context, AsgContext as Context, AsgContext}; use leo_asg::{Asg, AsgPass, FormattedError, Program as AsgProgram}; use leo_ast::{Input, MainInput, Program as AstProgram}; @@ -264,7 +257,7 @@ impl<'a, F: PrimeField, G: GroupType> Compiler<'a, F, G> { /// /// Synthesizes the circuit with program input to verify correctness. /// - pub fn compile_constraints>(&self, cs: &mut CS) -> Result { + pub fn compile_constraints>(&self, cs: &mut CS) -> Result { generate_constraints::(cs, &self.asg.as_ref().unwrap(), &self.program_input) } @@ -329,7 +322,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstraintSynthesizer for Compiler<' // Write results to file let output_file = OutputFile::new(&package_name); - output_file.write(&output_directory, result.bytes()).unwrap(); + output_file.write(&output_directory, result.to_string().as_bytes()).unwrap(); Ok(()) } diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index 5931d7a080..ba6c84ba75 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -16,7 +16,7 @@ //! Generates R1CS constraints for a compiled Leo program. -use crate::{errors::CompilerError, ConstrainedProgram, GroupType, OutputBytes, OutputFile}; +use crate::{errors::CompilerError, ConstrainedProgram, GroupType, Output, OutputFile}; use leo_asg::Program; use leo_ast::Input; use leo_input::LeoInputParser; @@ -30,7 +30,7 @@ pub fn generate_constraints<'a, F: PrimeField, G: GroupType, CS: ConstraintSy cs: &mut CS, program: &Program<'a>, input: &Input, -) -> Result { +) -> Result { let mut resolved_program = ConstrainedProgram::::new(program.clone()); let main = { @@ -121,7 +121,7 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( let output = result?; let output_file = OutputFile::new(&output_file_name); - output_file.write(output_directory, output.bytes()).unwrap(); + output_file.write(output_directory, output.to_string().as_bytes()).unwrap(); // increment passed tests passed += 1; diff --git a/compiler/src/function/main_function.rs b/compiler/src/function/main_function.rs index 3a2eb27e13..942cfc62c6 100644 --- a/compiler/src/function/main_function.rs +++ b/compiler/src/function/main_function.rs @@ -16,7 +16,7 @@ //! Enforces constraints on the main function of a compiled Leo program. -use crate::{errors::FunctionError, program::ConstrainedProgram, GroupType, OutputBytes}; +use crate::{errors::FunctionError, program::ConstrainedProgram, GroupType, Output}; use leo_asg::{Expression, Function, FunctionQualifier}; use leo_ast::Input; @@ -31,7 +31,7 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { cs: &mut CS, function: &'a Function<'a>, input: &Input, - ) -> Result { + ) -> Result { let registers = input.get_registers(); // Iterate over main function input variables and allocate new values @@ -123,8 +123,8 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { let span = function.span.clone().unwrap_or_default(); let result_value = self.enforce_function(cs, function, None, &arguments)?; - let output_bytes = OutputBytes::new_from_constrained_value(&self.asg, registers, result_value, &span)?; + let output = Output::new(&self.asg, registers, result_value, &span)?; - Ok(output_bytes) + Ok(output) } } diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index 6b36c3d356..2c64bb668a 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -62,3 +62,6 @@ pub use stage::*; pub mod option; pub use option::*; + +#[cfg(test)] +mod test; \ No newline at end of file diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index a5c2e0951b..a952c78b9c 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -15,7 +15,103 @@ // along with the Leo library. If not, see . pub mod output_file; +use std::{collections::BTreeMap, fmt}; + pub use self::output_file::*; pub mod output_bytes; pub use self::output_bytes::*; + +use crate::{errors::OutputBytesError, ConstrainedValue, GroupType, REGISTERS_VARIABLE_NAME}; +use leo_asg::Program; +use leo_ast::{Parameter, Registers, Span}; + +use snarkvm_fields::PrimeField; + +use serde::{Deserialize, Serialize}; + +#[derive(Deserialize, Serialize, Debug)] +pub struct OutputRegister { + #[serde(rename = "type")] + pub type_: String, + pub value: String, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct Output { + pub registers: BTreeMap, +} + +impl fmt::Display for Output { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "[{}]\n", REGISTERS_VARIABLE_NAME)?; + // format: "token_id: u64 = 1u64;" + for (name, register) in self.registers.iter() { + write!(f, "{}: {} = {};\n", name, register.type_, register.value)?; + } + Ok(()) + } +} + +impl Into for Output { + fn into(self) -> OutputBytes { + OutputBytes::from(self.to_string().into_bytes()) + } +} + +impl Output { + pub fn new<'a, F: PrimeField, G: GroupType>( + program: &Program<'a>, + registers: &Registers, + value: ConstrainedValue<'a, F, G>, + span: &Span, + ) -> Result { + let return_values = match value { + ConstrainedValue::Tuple(values) => values, + value => vec![value], + }; + let register_hashmap = registers.values(); + + // Create vector of parameter values in alphabetical order + let mut register_values = register_hashmap + .into_iter() + .map(|register| register.0) + .collect::>(); + + register_values.sort_by(|a, b| a.variable.name.cmp(&b.variable.name)); + + // Return an error if we do not have enough return registers + if register_values.len() < return_values.len() { + return Err(OutputBytesError::not_enough_registers(span)); + } + + let mut registers = BTreeMap::new(); + + for (parameter, value) in register_values.into_iter().zip(return_values.into_iter()) { + let name = parameter.variable.name; + + // Check register type == return value type. + let register_type = program.scope.resolve_ast_type(¶meter.type_)?; + let return_value_type = value.to_type(span)?; + + if !register_type.is_assignable_from(&return_value_type) { + return Err(OutputBytesError::mismatched_output_types( + ®ister_type, + &return_value_type, + span, + )); + } + + let value = value.to_string(); + + registers.insert(name.to_string(), OutputRegister { + type_: register_type.to_string(), + value, + }); + } + + Ok(Output { + registers, + }) + } +} \ No newline at end of file diff --git a/compiler/src/test.rs b/compiler/src/test.rs new file mode 100644 index 0000000000..7a8ae4907c --- /dev/null +++ b/compiler/src/test.rs @@ -0,0 +1,151 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use std::{path::{Path, PathBuf}}; + +use leo_asg::*; +use leo_synthesizer::{CircuitSynthesizer, SerializedCircuit, SummarizedCircuit}; +use leo_test_framework::{Test, runner::{Namespace, ParseType, Runner}}; +use serde_yaml::Value; +use snarkvm_curves::{bls12_377::Bls12_377, edwards_bls12::Fq}; + +use crate::{ConstrainedValue, Output, compiler::Compiler, errors::CompilerError, targets::edwards_bls12::EdwardsGroupType}; + +pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; +pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; + +//convenience function for tests, leaks memory +pub(crate) fn make_test_context() -> AsgContext<'static> { + let allocator = Box::leak(Box::new(new_alloc_context())); + new_context(allocator) +} + +fn new_compiler() -> EdwardsTestCompiler { + let program_name = "test".to_string(); + let path = PathBuf::from("/test/src/main.leo"); + let output_dir = PathBuf::from("/output/"); + + EdwardsTestCompiler::new(program_name, path, output_dir, make_test_context()) +} + +pub(crate) fn parse_program(program_string: &str) -> Result { + let mut compiler = new_compiler(); + + compiler.parse_program_from_string(program_string)?; + + Ok(compiler) +} + +struct CompileNamespace; + +#[derive(serde::Deserialize, serde::Serialize)] +struct OutputItem { + pub input_file: String, + pub output: Output, +} + +#[derive(serde::Deserialize, serde::Serialize)] +struct CompileOutput { + pub circuit: SummarizedCircuit, + pub output: Vec, +} + +impl Namespace for CompileNamespace { + fn parse_type(&self) -> ParseType { + ParseType::Whole + } + + fn run_test(&self, test: Test) -> Result { + let parsed = parse_program(&test.content).map_err(|x| x.to_string())?; + + // (name, content) + let mut inputs = vec![]; + + if let Some(input) = test.config.get("input_file") { + let input_file: PathBuf = test.path.parent().expect("no test parent dir").into(); + if let Some(name) = input.as_str() { + let mut input_file = input_file; + input_file.push(input.as_str().expect("input_file was not a string or array")); + inputs.push((name.to_string(), std::fs::read_to_string(&input_file).expect("failed to read test input file"))); + } else if let Some(seq) = input.as_sequence() { + for name in seq { + let mut input_file = input_file.clone(); + input_file.push(name.as_str().expect("input_file was not a string")); + inputs.push((name.as_str().expect("input_file item was not a string").to_string(), std::fs::read_to_string(&input_file).expect("failed to read test input file"))); + } + } + } + if inputs.is_empty() { + inputs.push(("empty".to_string(), "".to_string())); + } + + let state = if let Some(input) = test.config.get("state_file") { + let mut input_file: PathBuf = test.path.parent().expect("no test parent dir").into(); + input_file.push(input.as_str().expect("state_file was not a string")); + std::fs::read_to_string(&input_file).expect("failed to read test state file") + } else { + "".to_string() + }; + + let mut output_items = vec![]; + + let mut last_circuit = None; + for input in inputs { + let mut parsed = parsed.clone(); + parsed.parse_input(&input.1, Path::new("input"), &state, Path::new("state")).map_err(|x| x.to_string())?; + let mut cs: CircuitSynthesizer = Default::default(); + let output = parsed.compile_constraints(&mut cs).map_err(|x| x.to_string())?; + let circuit: SummarizedCircuit = SerializedCircuit::from(cs).into(); + if let Some(last_circuit) = last_circuit.as_ref() { + if last_circuit != &circuit { + eprintln!("{}\n{}", serde_yaml::to_string(last_circuit).unwrap(), serde_yaml::to_string(&circuit).unwrap()); + return Err("circuit changed on different input files".to_string()); + } + } else { + last_circuit = Some(circuit); + } + output_items.push(OutputItem { + input_file: input.0, + output, + }); + } + + + + + let final_output = CompileOutput { + circuit: last_circuit.unwrap(), + output: output_items, + }; + Ok(serde_yaml::to_value(&final_output).expect("serialization failed")) + } +} + +struct TestRunner; + +impl Runner for TestRunner { + fn resolve_namespace(&self, name: &str) -> Option> { + Some(match name { + "Compile" => Box::new(CompileNamespace), + _ => return None, + }) + } +} + +#[test] +pub fn compiler_tests() { + leo_test_framework::run_tests(&TestRunner, "compiler"); +} diff --git a/parser/src/test.rs b/parser/src/test.rs index b6dbf7ae49..cd1fad285d 100644 --- a/parser/src/test.rs +++ b/parser/src/test.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use leo_ast::{Expression, ExpressionStatement, Span, Statement, ValueExpression}; -use leo_test_framework::runner::{Namespace, ParseType, Runner}; +use leo_test_framework::{Test, runner::{Namespace, ParseType, Runner}}; use serde_yaml::Value; use tokenizer::Token; @@ -28,8 +28,8 @@ impl Namespace for TokenNamespace { ParseType::Line } - fn run_test(&self, test: &str) -> Result { - let output = tokenizer::tokenize("test", test.into()); + fn run_test(&self, test: Test) -> Result { + let output = tokenizer::tokenize("test", test.content.into()); output .map(|tokens| { Value::String( @@ -63,8 +63,8 @@ impl Namespace for ParseExpressionNamespace { ParseType::Line } - fn run_test(&self, test: &str) -> Result { - let tokenizer = tokenizer::tokenize("test", test.into()).map_err(|x| x.to_string())?; + fn run_test(&self, test: Test) -> Result { + let tokenizer = tokenizer::tokenize("test", test.content.into()).map_err(|x| x.to_string())?; if tokenizer .iter() .all(|x| matches!(x.token, Token::CommentLine(_) | Token::CommentBlock(_))) @@ -91,8 +91,8 @@ impl Namespace for ParseStatementNamespace { ParseType::ContinuousLines } - fn run_test(&self, test: &str) -> Result { - let tokenizer = tokenizer::tokenize("test", test.into()).map_err(|x| x.to_string())?; + fn run_test(&self, test: Test) -> Result { + let tokenizer = tokenizer::tokenize("test", test.content.into()).map_err(|x| x.to_string())?; if tokenizer .iter() .all(|x| matches!(x.token, Token::CommentLine(_) | Token::CommentBlock(_))) @@ -119,8 +119,8 @@ impl Namespace for ParseNamespace { ParseType::Whole } - fn run_test(&self, test: &str) -> Result { - let tokenizer = tokenizer::tokenize("test", test.into()).map_err(|x| x.to_string())?; + fn run_test(&self, test: Test) -> Result { + let tokenizer = tokenizer::tokenize("test", test.content.into()).map_err(|x| x.to_string())?; let mut tokens = ParserContext::new(tokenizer); let parsed = tokens.parse_program().map_err(|x| x.to_string())?; diff --git a/synthesizer/Cargo.toml b/synthesizer/Cargo.toml index 8a0f57fece..b78dbf1860 100644 --- a/synthesizer/Cargo.toml +++ b/synthesizer/Cargo.toml @@ -41,3 +41,9 @@ features = [ "derive" ] [dependencies.serde_json] version = "1.0" + +[dependencies.sha2] +version = "0.9" + +[dependencies.hex] +version = "0.4" diff --git a/synthesizer/src/circuit_synthesizer.rs b/synthesizer/src/circuit_synthesizer.rs index ed9361ca7d..2433869d30 100644 --- a/synthesizer/src/circuit_synthesizer.rs +++ b/synthesizer/src/circuit_synthesizer.rs @@ -20,9 +20,9 @@ use snarkvm_r1cs::{ConstraintSystem, Index, LinearCombination, OptionalVec, Synt #[derive(Default)] pub struct Namespace { - constraint_indices: Vec, - public_var_indices: Vec, - private_var_indices: Vec, + pub constraint_indices: Vec, + pub public_var_indices: Vec, + pub private_var_indices: Vec, } pub struct ConstraintSet { @@ -53,6 +53,17 @@ pub struct CircuitSynthesizer { pub namespaces: Vec, } +impl Default for CircuitSynthesizer { + fn default() -> Self { + Self { + constraints: Default::default(), + public_variables: Default::default(), + private_variables: Default::default(), + namespaces: Default::default(), + } + } +} + impl ConstraintSystem for CircuitSynthesizer { type Root = Self; diff --git a/synthesizer/src/lib.rs b/synthesizer/src/lib.rs index a220def1fe..80dbc44a44 100644 --- a/synthesizer/src/lib.rs +++ b/synthesizer/src/lib.rs @@ -20,6 +20,9 @@ pub use self::circuit_synthesizer::*; pub mod serialized_circuit; pub use self::serialized_circuit::*; +pub mod summarized_circuit; +pub use self::summarized_circuit::*; + pub mod serialized_field; pub use self::serialized_field::*; diff --git a/synthesizer/src/summarized_circuit.rs b/synthesizer/src/summarized_circuit.rs new file mode 100644 index 0000000000..77ee96b87d --- /dev/null +++ b/synthesizer/src/summarized_circuit.rs @@ -0,0 +1,45 @@ +use serde::{Deserialize, Serialize}; +use sha2::{Digest, Sha256}; + +use crate::SerializedCircuit; + +#[derive(Serialize, Deserialize, PartialEq)] +pub struct SummarizedCircuit { + pub num_public_variables: usize, + pub num_private_variables: usize, + pub num_constraints: usize, + + // pub public_variables: String, + // pub private_variables: String, + + pub at: String, + pub bt: String, + pub ct: String, +} + +fn hash_field(input: &str) -> String { + let mut hasher = Sha256::new(); + hasher.update(input.as_bytes()); + let output = hasher.finalize(); + hex::encode(&output[..]) +} + +impl From for SummarizedCircuit { + fn from(other: SerializedCircuit) -> Self { + Self { + num_public_variables: other.num_public_variables, + num_private_variables: other.num_private_variables, + num_constraints: other.num_constraints, + // public_variables: hash_field(&serde_json::to_string(&other.public_variables) + // .expect("failed to serialize public_variables")), + // private_variables: hash_field(&serde_json::to_string(&other.private_variables) + // .expect("failed to serialize private_variables")), + at: hash_field(&serde_json::to_string(&other.at) + .expect("failed to serialize at")), + bt: hash_field(&serde_json::to_string(&other.bt) + .expect("failed to serialize bt")), + ct: hash_field(&serde_json::to_string(&other.ct) + .expect("failed to serialize ct")), + } + } +} \ No newline at end of file diff --git a/test-framework/src/error.rs b/test-framework/src/error.rs index c49ebe75f1..fbf8f8dadd 100644 --- a/test-framework/src/error.rs +++ b/test-framework/src/error.rs @@ -45,6 +45,7 @@ pub enum TestError { output: String, }, MismatchedTestExpectationLength, + MissingTestConfig, } impl fmt::Display for TestError { @@ -75,6 +76,7 @@ impl fmt::Display for TestError { write!(f, "test #{} expected error\n{}\ngot\n{}", index + 1, expected, output) } TestError::MismatchedTestExpectationLength => write!(f, "invalid number of test expectations"), + TestError::MissingTestConfig => write!(f, "missing test config"), } } } diff --git a/test-framework/src/runner.rs b/test-framework/src/runner.rs index 0a473e73b5..94990c1735 100644 --- a/test-framework/src/runner.rs +++ b/test-framework/src/runner.rs @@ -15,7 +15,7 @@ // along with the Leo library. If not, see . use serde_yaml::Value; -use std::path::{Path, PathBuf}; +use std::{collections::BTreeMap, path::{Path, PathBuf}}; use crate::{error::*, fetch::find_tests, output::TestExpectation, test::*}; @@ -26,10 +26,17 @@ pub enum ParseType { Whole, } +pub struct Test { + pub name: String, + pub content: String, + pub path: PathBuf, + pub config: BTreeMap, +} + pub trait Namespace { fn parse_type(&self) -> ParseType; - fn run_test(&self, test: &str) -> Result; + fn run_test(&self, test: Test) -> Result; } pub trait Runner { @@ -55,7 +62,12 @@ pub fn run_tests(runner: &T, expectation_category: &str) { for (path, content) in tests.into_iter() { let config = extract_test_config(&content); if config.is_none() { - panic!("missing configuration for {}", path); + //panic!("missing configuration for {}", path); + // fail_categories.push(TestFailure { + // path, + // errors: vec![TestError::MissingTestConfig], + // }); + continue; } let config = config.unwrap(); let namespace = runner.resolve_namespace(&config.namespace); @@ -69,14 +81,21 @@ pub fn run_tests(runner: &T, expectation_category: &str) { let mut expectation_path = expectation_dir.clone(); expectation_path.push(expectation_category); expectation_path.push(relative_path.parent().expect("no parent dir for test")); - let mut test_name = relative_path + let mut expectation_name = relative_path .file_name() .expect("no file name for test") .to_str() .unwrap() .to_string(); - test_name += ".out"; - expectation_path.push(&test_name); + expectation_name += ".out"; + expectation_path.push(&expectation_name); + + let test_name = relative_path + .file_stem() + .expect("no file name for test") + .to_str() + .unwrap() + .to_string(); let expectations: Option = if expectation_path.exists() { if !std::env::var("CLEAR_LEO_TEST_EXPECTATIONS") @@ -120,13 +139,17 @@ pub fn run_tests(runner: &T, expectation_category: &str) { .as_mut() .map(|x| x.next()) .flatten() - .map(|x| x.as_str()) - .flatten(); - let output = namespace.run_test(&test); + .cloned(); + let output = namespace.run_test(Test { + name: test_name.clone(), + content: test.clone(), + path: path.into(), + config: config.extra.clone(), + }); if let Some(error) = emit_errors( output.as_ref().map_err(|x| &**x), &config.expectation, - expected_output.map(|x| Value::String(x.to_string())), + expected_output, i, ) { fail_tests += 1; diff --git a/test-framework/src/test.rs b/test-framework/src/test.rs index 3e1f64694b..13845f896c 100644 --- a/test-framework/src/test.rs +++ b/test-framework/src/test.rs @@ -1,3 +1,5 @@ +use std::collections::BTreeMap; + // Copyright (C) 2019-2021 Aleo Systems Inc. // This file is part of the Leo library. @@ -24,6 +26,8 @@ pub enum TestExpectationMode { pub struct TestConfig { pub namespace: String, pub expectation: TestExpectationMode, + #[serde(flatten)] + pub extra: BTreeMap, } pub fn extract_test_config(source: &str) -> Option { diff --git a/tests/compiler/address/address1.in b/tests/compiler/address/address1.in new file mode 100644 index 0000000000..1f1fd1870c --- /dev/null +++ b/tests/compiler/address/address1.in @@ -0,0 +1,5 @@ +[main] +x: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; + +[registers] +a: bool = false; \ No newline at end of file diff --git a/tests/compiler/address/address2.in b/tests/compiler/address/address2.in new file mode 100644 index 0000000000..8ee7606602 --- /dev/null +++ b/tests/compiler/address/address2.in @@ -0,0 +1,5 @@ +[main] +x: address = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r; + +[registers] +a: bool = false; \ No newline at end of file diff --git a/tests/compiler/address/equal.leo b/tests/compiler/address/equal.leo new file mode 100644 index 0000000000..db5189b4ec --- /dev/null +++ b/tests/compiler/address/equal.leo @@ -0,0 +1,13 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - address1.in + - address2.in +*/ + +function main(x: address) -> bool { + const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; + + return x == sender; +} \ No newline at end of file diff --git a/tests/compiler/address/ternary.leo b/tests/compiler/address/ternary.leo new file mode 100644 index 0000000000..5df233efa2 --- /dev/null +++ b/tests/compiler/address/ternary.leo @@ -0,0 +1,14 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - address1.in + - address2.in +*/ + +function main(x: address) -> bool { + const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; + const receiver = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r; + + return x == sender ? receiver == x : sender == x; +} \ No newline at end of file diff --git a/tests/compiler/array/equal_initializer.leo b/tests/compiler/array/equal_initializer.leo new file mode 100644 index 0000000000..dda9dfc250 --- /dev/null +++ b/tests/compiler/array/equal_initializer.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - input/six_zeros.in + - input/count_to_6.in +*/ + +function main(a: [u8; (3, 2)]) -> bool { + return a == [0u8; (3, 2)]; +} \ No newline at end of file diff --git a/tests/compiler/array/equal_initializer_2.leo b/tests/compiler/array/equal_initializer_2.leo new file mode 100644 index 0000000000..db7b7be89c --- /dev/null +++ b/tests/compiler/array/equal_initializer_2.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - input/six_zeros.in + - input/count_to_6.in +*/ + +function main(a: [u8; (3, 2)]) -> bool { + return a == [[1u8, 2], [3, 4], [5, 6]]; +} \ No newline at end of file diff --git a/tests/compiler/array/input/count_to_6.in b/tests/compiler/array/input/count_to_6.in new file mode 100644 index 0000000000..64ae8f82f6 --- /dev/null +++ b/tests/compiler/array/input/count_to_6.in @@ -0,0 +1,5 @@ +[main] +a: [[u8; 2]; 3] = [[1, 2], [3, 4], [5, 6]]; + +[registers] +x: bool = false; \ No newline at end of file diff --git a/tests/compiler/array/input/initializer_fail.in b/tests/compiler/array/input/initializer_fail.in new file mode 100644 index 0000000000..0ff699aa13 --- /dev/null +++ b/tests/compiler/array/input/initializer_fail.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (3, 2)] = [0u8; (2, 2)]; diff --git a/tests/compiler/array/input/input_nested_3x2.in b/tests/compiler/array/input/input_nested_3x2.in new file mode 100644 index 0000000000..9eaafe9bdd --- /dev/null +++ b/tests/compiler/array/input/input_nested_3x2.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (3, 2)] = [[0u8; 2]; 3]; diff --git a/tests/compiler/array/input/input_nested_3x2_fail.in b/tests/compiler/array/input/input_nested_3x2_fail.in new file mode 100644 index 0000000000..d1c114a08b --- /dev/null +++ b/tests/compiler/array/input/input_nested_3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (3, 2)] = [[0u8; 3]; 2)]; diff --git a/tests/compiler/array/input/input_tuple_3x2.in b/tests/compiler/array/input/input_tuple_3x2.in new file mode 100644 index 0000000000..1c0bd495ec --- /dev/null +++ b/tests/compiler/array/input/input_tuple_3x2.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (3, 2)] = [0u8; (3, 2)]; diff --git a/tests/compiler/array/input/input_tuple_3x2_fail.in b/tests/compiler/array/input/input_tuple_3x2_fail.in new file mode 100644 index 0000000000..c281d9d464 --- /dev/null +++ b/tests/compiler/array/input/input_tuple_3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (3, 2)] = [0u8; (2, 3)]; diff --git a/tests/compiler/array/input/registers_ones.in b/tests/compiler/array/input/registers_ones.in new file mode 100644 index 0000000000..fab79f69a0 --- /dev/null +++ b/tests/compiler/array/input/registers_ones.in @@ -0,0 +1,2 @@ +[registers] +r: [u8; 3] = [1u8, 1u8, 1u8]; diff --git a/tests/compiler/array/input/registers_zeros.in b/tests/compiler/array/input/registers_zeros.in new file mode 100644 index 0000000000..e9aa65cf9b --- /dev/null +++ b/tests/compiler/array/input/registers_zeros.in @@ -0,0 +1,2 @@ +[registers] +r: [u8; 3] = [0u8, 0u8, 0u8]; diff --git a/tests/compiler/array/input/six_zeros.in b/tests/compiler/array/input/six_zeros.in new file mode 100644 index 0000000000..1f46c17666 --- /dev/null +++ b/tests/compiler/array/input/six_zeros.in @@ -0,0 +1,5 @@ +[main] +a: [u8; (3, 2)] = [0; (3, 2)]; + +[registers] +x: bool = false; \ No newline at end of file diff --git a/tests/compiler/array/input/three_ones.in b/tests/compiler/array/input/three_ones.in new file mode 100644 index 0000000000..80d095f864 --- /dev/null +++ b/tests/compiler/array/input/three_ones.in @@ -0,0 +1,2 @@ +[main] +a: [u8; 3] = [1, 1, 1]; \ No newline at end of file diff --git a/tests/compiler/array/input/type_nested_value_nested_3x2.in b/tests/compiler/array/input/type_nested_value_nested_3x2.in new file mode 100644 index 0000000000..21fc9b953f --- /dev/null +++ b/tests/compiler/array/input/type_nested_value_nested_3x2.in @@ -0,0 +1,2 @@ +[main] +a: [[u8; 2]; 3] = [[0; 2]; 3]; diff --git a/tests/compiler/array/input/type_nested_value_nested_3x2_fail.in b/tests/compiler/array/input/type_nested_value_nested_3x2_fail.in new file mode 100644 index 0000000000..280b38b909 --- /dev/null +++ b/tests/compiler/array/input/type_nested_value_nested_3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) diff --git a/tests/compiler/array/input/type_nested_value_nested_4x3x2.in b/tests/compiler/array/input/type_nested_value_nested_4x3x2.in new file mode 100644 index 0000000000..53ca13b024 --- /dev/null +++ b/tests/compiler/array/input/type_nested_value_nested_4x3x2.in @@ -0,0 +1,2 @@ +[main] +a: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; diff --git a/tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in b/tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in new file mode 100644 index 0000000000..11f44a76a4 --- /dev/null +++ b/tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) diff --git a/tests/compiler/array/input/type_nested_value_tuple_3x2.in b/tests/compiler/array/input/type_nested_value_tuple_3x2.in new file mode 100644 index 0000000000..689e164b73 --- /dev/null +++ b/tests/compiler/array/input/type_nested_value_tuple_3x2.in @@ -0,0 +1,2 @@ +[main] +a: [[u8; 2]; 3] = [0; (3, 2)]; diff --git a/tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in b/tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in new file mode 100644 index 0000000000..4a43d7d816 --- /dev/null +++ b/tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) diff --git a/tests/compiler/array/input/type_nested_value_tuple_4x3x2.in b/tests/compiler/array/input/type_nested_value_tuple_4x3x2.in new file mode 100644 index 0000000000..649a7154ad --- /dev/null +++ b/tests/compiler/array/input/type_nested_value_tuple_4x3x2.in @@ -0,0 +1,2 @@ +[main] +a: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; diff --git a/tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in b/tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in new file mode 100644 index 0000000000..eed469d6ac --- /dev/null +++ b/tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) diff --git a/tests/compiler/array/input/type_tuple_value_nested_3x2.in b/tests/compiler/array/input/type_tuple_value_nested_3x2.in new file mode 100644 index 0000000000..cb3943365b --- /dev/null +++ b/tests/compiler/array/input/type_tuple_value_nested_3x2.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (3, 2)] = [[0; 2]; 3]; diff --git a/tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in b/tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in new file mode 100644 index 0000000000..c787cbffd9 --- /dev/null +++ b/tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) diff --git a/tests/compiler/array/input/type_tuple_value_nested_4x3x2.in b/tests/compiler/array/input/type_tuple_value_nested_4x3x2.in new file mode 100644 index 0000000000..8105eae543 --- /dev/null +++ b/tests/compiler/array/input/type_tuple_value_nested_4x3x2.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; diff --git a/tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in b/tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in new file mode 100644 index 0000000000..3e194e590d --- /dev/null +++ b/tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) diff --git a/tests/compiler/array/input/type_tuple_value_tuple_3x2.in b/tests/compiler/array/input/type_tuple_value_tuple_3x2.in new file mode 100644 index 0000000000..cbfeb6d5f1 --- /dev/null +++ b/tests/compiler/array/input/type_tuple_value_tuple_3x2.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (3, 2)] = [0; (3, 2)]; diff --git a/tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in b/tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in new file mode 100644 index 0000000000..3409e8aaa9 --- /dev/null +++ b/tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) diff --git a/tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in b/tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in new file mode 100644 index 0000000000..6fd97ee2d2 --- /dev/null +++ b/tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; diff --git a/tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in b/tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in new file mode 100644 index 0000000000..d6de4af3c5 --- /dev/null +++ b/tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in @@ -0,0 +1,2 @@ +[main] +a: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) diff --git a/tests/compiler/array/input_nested_3x2.leo b/tests/compiler/array/input_nested_3x2.leo new file mode 100644 index 0000000000..b7e59a5dc0 --- /dev/null +++ b/tests/compiler/array/input_nested_3x2.leo @@ -0,0 +1,3 @@ +function main(a: [u8; (3, 2)]) { + console.assert(a == [[0u8; 2]; 3]); +} diff --git a/tests/compiler/array/input_nested_3x2_fail.leo b/tests/compiler/array/input_nested_3x2_fail.leo new file mode 100644 index 0000000000..1f5bf7b334 --- /dev/null +++ b/tests/compiler/array/input_nested_3x2_fail.leo @@ -0,0 +1,3 @@ +function main(a: [u8; (3, 2)]) { + console.assert(a == [[0u8; 2]; 3)]); // This should be written the right way as this test is for the input file. +} diff --git a/tests/compiler/array/input_tuple_3x2.leo b/tests/compiler/array/input_tuple_3x2.leo new file mode 100644 index 0000000000..4c3c001f41 --- /dev/null +++ b/tests/compiler/array/input_tuple_3x2.leo @@ -0,0 +1,3 @@ +function main(a: [u8; (3, 2)]) { + console.assert(a == [0u8; (3, 2)]); +} diff --git a/tests/compiler/array/input_tuple_3x2_fail.leo b/tests/compiler/array/input_tuple_3x2_fail.leo new file mode 100644 index 0000000000..4c3c001f41 --- /dev/null +++ b/tests/compiler/array/input_tuple_3x2_fail.leo @@ -0,0 +1,3 @@ +function main(a: [u8; (3, 2)]) { + console.assert(a == [0u8; (3, 2)]); +} diff --git a/tests/compiler/array/mod.rs b/tests/compiler/array/mod.rs new file mode 100644 index 0000000000..7acbd1af2f --- /dev/null +++ b/tests/compiler/array/mod.rs @@ -0,0 +1,716 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + get_output, + parse_program, + parse_program_with_input, + EdwardsTestCompiler, +}; + +pub fn output_ones(program: EdwardsTestCompiler) { + 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 actual = get_output(program); + + assert!(expected.eq(actual.bytes().as_slice())); +} + +// Registers + +#[test] +fn test_registers() { + let program_string = include_str!("registers.leo"); + let ones_input_string = include_str!("input/registers_ones.in"); + let zeros_input_string = include_str!("input/registers_zeros.in"); + + // test ones input register => ones output register + let program = parse_program_with_input(program_string, ones_input_string).unwrap(); + + output_ones(program); + + // test zeros input register => zeros output register + let program = parse_program_with_input(program_string, zeros_input_string).unwrap(); + + output_zeros(program); +} + +// Expressions + +#[test] +fn test_inline() { + let program_string = include_str!("inline.leo"); + let input_string = include_str!("input/three_ones.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_nested() { + let program_string = include_str!("nested.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_inline_fail() { + let program_string = include_str!("inline.leo"); + let program = parse_program(program_string).unwrap(); + + let _err = expect_compiler_error(program); +} + +#[test] +fn test_initializer() { + let program_string = include_str!("initializer.leo"); + let input_string = include_str!("input/three_ones.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_initializer_fail() { + let program_string = include_str!("initializer_fail.leo"); + let input_string = include_str!("input/three_ones.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_initializer_input() { + let program_string = include_str!("initializer_input.leo"); + let input_string = include_str!("input/six_zeros.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_initializer_input_fail() { + let program_string = include_str!("initializer_input.leo"); + let input_string = include_str!("input/initializer_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_input_nested_3x2() { + let program_string = include_str!("input_nested_3x2.leo"); + let input_string = include_str!("input/input_nested_3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_nested_3x2_fail() { + let program_string = include_str!("input_nested_3x2_fail.leo"); + let input_string = include_str!("input/input_nested_3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_input_tuple_3x2() { + let program_string = include_str!("input_tuple_3x2.leo"); + let input_string = include_str!("input/input_tuple_3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_tuple_3x2_fail() { + let program_string = include_str!("input_tuple_3x2_fail.leo"); + let input_string = include_str!("input/input_tuple_3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_multi_fail_initializer() { + let program_string = include_str!("multi_fail_initializer.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_multi_inline_fail() { + let program_string = include_str!("multi_fail_inline.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_multi_initializer() { + let program_string = include_str!("multi_initializer.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_multi_initializer_fail() { + let program_string = include_str!("multi_initializer_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_nested_3x2_value() { + let program_string = include_str!("nested_3x2_value.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_nested_3x2_value_fail() { + let program_string = include_str!("nested_3x2_value_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_tuple_3x2_value() { + let program_string = include_str!("tuple_3x2_value.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_tuple_3x2_value_fail() { + let program_string = include_str!("tuple_3x2_value_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_spread() { + let program_string = include_str!("spread.leo"); + let input_string = include_str!("input/three_ones.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_slice() { + let program_string = include_str!("slice.leo"); + let input_string = include_str!("input/three_ones.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_slice_lower() { + let program_string = include_str!("slice_lower.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +// Array type tests + +#[test] +fn test_type_fail() { + let program_string = include_str!("type_fail.leo"); + let syntax_error = parse_program(program_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_type_nested_value_nested_3x2() { + let program_string = include_str!("type_nested_value_nested_3x2.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_type_nested_value_nested_3x2_fail() { + let program_string = include_str!("type_nested_value_nested_3x2_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_type_nested_value_nested_4x3x2() { + let program_string = include_str!("type_nested_value_nested_4x3x2.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_type_nested_value_nested_4x3x2_fail() { + let program_string = include_str!("type_nested_value_nested_4x3x2_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_type_nested_value_tuple_3x2() { + let program_string = include_str!("type_nested_value_tuple_3x2.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_type_nested_value_tuple_3x2_fail() { + let program_string = include_str!("type_nested_value_tuple_3x2_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_type_nested_value_tuple_4x3x2() { + let program_string = include_str!("type_nested_value_tuple_4x3x2.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_type_nested_value_tuple_4x3x2_fail() { + let program_string = include_str!("type_nested_value_tuple_4x3x2_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_type_tuple_value_nested_3x2() { + let program_string = include_str!("type_tuple_value_nested_3x2.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_type_tuple_value_nested_3x2_fail() { + let program_string = include_str!("type_tuple_value_nested_3x2_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_type_tuple_value_nested_4x3x2() { + let program_string = include_str!("type_tuple_value_nested_4x3x2.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_type_tuple_value_nested_4x3x2_fail() { + let program_string = include_str!("type_tuple_value_nested_4x3x2_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_type_tuple_value_tuple_3x2() { + let program_string = include_str!("type_tuple_value_tuple_3x2.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_type_tuple_value_tuple_3x2_fail() { + let program_string = include_str!("type_tuple_value_tuple_3x2_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_type_tuple_value_tuple_4x3x2() { + let program_string = include_str!("type_tuple_value_tuple_4x3x2.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_type_tuple_value_tuple_4x3x2_fail() { + let program_string = include_str!("type_tuple_value_tuple_4x3x2_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +// Tests for nested multi-dimensional arrays as input to the program + +#[test] +fn test_input_type_nested_value_nested_3x2() { + let program_string = include_str!("type_input_3x2.leo"); + let input_string = include_str!("input/type_nested_value_nested_3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_type_nested_value_nested_3x2_fail() { + let program_string = include_str!("type_input_3x2.leo"); + let input_string = include_str!("input/type_nested_value_nested_3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_input_type_nested_value_nested_4x3x2() { + let program_string = include_str!("type_input_4x3x2.leo"); + let input_string = include_str!("input/type_nested_value_nested_4x3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_type_nested_value_nested_4x3x2_fail() { + let program_string = include_str!("type_input_4x3x2.leo"); + let input_string = include_str!("input/type_nested_value_nested_4x3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_input_type_nested_value_tuple_3x2() { + let program_string = include_str!("type_input_3x2.leo"); + let input_string = include_str!("input/type_nested_value_tuple_3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_type_nested_value_tuple_3x2_fail() { + let program_string = include_str!("type_input_3x2.leo"); + let input_string = include_str!("input/type_nested_value_tuple_3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_input_type_nested_value_tuple_4x3x2() { + let program_string = include_str!("type_input_4x3x2.leo"); + let input_string = include_str!("input/type_nested_value_tuple_4x3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program) +} + +#[test] +fn test_input_type_nested_value_tuple_4x3x2_fail() { + let program_string = include_str!("type_input_4x3x2.leo"); + let input_string = include_str!("input/type_nested_value_tuple_4x3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +// Tests for multi-dimensional arrays using tuple syntax as input to the program + +#[test] +fn test_input_type_tuple_value_nested_3x2() { + let program_string = include_str!("type_input_3x2.leo"); + let input_string = include_str!("input/type_tuple_value_nested_3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_type_tuple_value_nested_3x2_fail() { + let program_string = include_str!("type_input_3x2.leo"); + let input_string = include_str!("input/type_tuple_value_nested_3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_input_type_tuple_value_nested_4x3x2() { + let program_string = include_str!("type_input_4x3x2.leo"); + let input_string = include_str!("input/type_tuple_value_nested_4x3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_type_tuple_value_nested_4x3x2_fail() { + let program_string = include_str!("type_input_4x3x2.leo"); + let input_string = include_str!("input/type_tuple_value_nested_4x3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_input_type_tuple_value_tuple_3x2() { + let program_string = include_str!("type_input_3x2.leo"); + let input_string = include_str!("input/type_tuple_value_tuple_3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_type_tuple_value_tuple_3x2_fail() { + let program_string = include_str!("type_input_3x2.leo"); + let input_string = include_str!("input/type_tuple_value_tuple_3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_input_type_tuple_value_tuple_4x3x2() { + let program_string = include_str!("type_input_4x3x2.leo"); + let input_string = include_str!("input/type_tuple_value_tuple_4x3x2.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_type_tuple_value_tuple_4x3x2_fail() { + let program_string = include_str!("type_input_4x3x2.leo"); + let input_string = include_str!("input/type_tuple_value_tuple_4x3x2_fail.in"); + let syntax_error = parse_program_with_input(program_string, input_string).is_err(); + + assert!(syntax_error); +} + +#[test] +fn test_variable_slice_fail() { + let program_string = include_str!("variable_slice_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_array_index() { + let program_string = r#" + function main(i: u32) { + let b = [1u8, 2, 3, 4]; + + console.assert(2 == b[i]); + console.assert(3 == b[2]); + } + "#; + let input_string = r#" + [main] + i: u32 = 1; + "#; + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_array_index_bounds_fail() { + let program_string = r#" + function main(i: u32) { + let b = [1u8, 2, 3, 4]; + + console.assert(2 == b[i]); + } + "#; + let input_string = r#" + [main] + i: u32 = 4; + "#; + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_compiler_error(program); +} + +#[test] +fn test_const_array_index_bounds_fail() { + let program_string = r#" + function main() { + let b = [1u8, 2, 3, 4]; + const i: u32 = 4; + + console.assert(2 == b[i]); + } + "#; + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_array_range_index() { + let program_string = r#" + function main(i: u32) { + let b = [1u8, 2, 3, 4]; + + console.assert([1u8, 2] == b[0..i]); + console.assert([3u8, 4] == b[i..4]); + } + "#; + let input_string = r#" + [main] + i: u32 = 2; + "#; + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_array_range_index_dyn() { + let program_string = r#" + function main(i: u32) { + let b = [1u8, 2, 3, 4]; + + console.assert([1u8, 2] == b[..i]); + console.assert([3u8, 4] == b[i..]); + } + "#; + let input_string = r#" + [main] + i: u32 = 2; + "#; + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_array_range_index_full_dyn() { + let program_string = r#" + function main(i: u32, y: u32) { + let b = [1u8, 2, 3, 4]; + + console.assert([3u8, 4] == b[i..y]); + } + "#; + let input_string = r#" + [main] + i: u32 = 2; + y: u32 = 4; + "#; + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_array_range_index_out_of_bounds_fail() { + let program_string = r#" + function main() { + let b = [1u8, 2, 3, 4]; + + console.assert([1, 2] == b[3..5]); + } + "#; + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_array_range_index_invalid_bounds_fail() { + let program_string = r#" + function main() { + let b = [1u8, 2, 3, 4]; + + console.assert([1, 2] == b[2..1]); + } + "#; + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_array_range_index_full_dyn_resized_fail() { + let program_string = r#" + function main(i: u32, y: u32) { + let b = [1u8, 2, 3, 4]; + + console.assert([3u8, 4] == b[i..y]); + } + "#; + let input_string = r#" + [main] + i: u32 = 1; + y: u32 = 4; + "#; + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_compiler_error(program); +} + +#[test] +fn test_array_range_index_full_dyn_bounds_fail() { + let program_string = r#" + function main(i: u32, y: u32) { + let b = [1u8, 2, 3, 4]; + + console.assert([3u8, 4] == b[i..y]); + } + "#; + let input_string = r#" + [main] + i: u32 = 3; + y: u32 = 5; + "#; + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_compiler_error(program); +} diff --git a/tests/compiler/array/multi_fail_initializer.leo b/tests/compiler/array/multi_fail_initializer.leo new file mode 100644 index 0000000000..be1ab315bd --- /dev/null +++ b/tests/compiler/array/multi_fail_initializer.leo @@ -0,0 +1,3 @@ +function main() { + const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions +} \ No newline at end of file diff --git a/tests/compiler/array/multi_fail_inline.leo b/tests/compiler/array/multi_fail_inline.leo new file mode 100644 index 0000000000..49c9296798 --- /dev/null +++ b/tests/compiler/array/multi_fail_inline.leo @@ -0,0 +1,4 @@ +function main() { + const arr: [u8; (2, 2)] = [[1u8, 1u8], + [1u8]]; // incorrect dimensions +} \ No newline at end of file diff --git a/tests/compiler/array/multi_initializer.leo b/tests/compiler/array/multi_initializer.leo new file mode 100644 index 0000000000..6133542ef0 --- /dev/null +++ b/tests/compiler/array/multi_initializer.leo @@ -0,0 +1,7 @@ +function main() { + const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)]; + + const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2]; + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/multi_initializer_fail.leo b/tests/compiler/array/multi_initializer_fail.leo new file mode 100644 index 0000000000..e38a8fdaee --- /dev/null +++ b/tests/compiler/array/multi_initializer_fail.leo @@ -0,0 +1,3 @@ +function main() { + const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions +} \ No newline at end of file diff --git a/tests/compiler/array/nested.leo b/tests/compiler/array/nested.leo new file mode 100644 index 0000000000..80fc5511bf --- /dev/null +++ b/tests/compiler/array/nested.leo @@ -0,0 +1,4 @@ +function main () { + const x = [false; (2, 2)]; + const y: bool = x[0][0]; +} diff --git a/tests/compiler/array/nested_3x2_value.leo b/tests/compiler/array/nested_3x2_value.leo new file mode 100644 index 0000000000..c5f64c997e --- /dev/null +++ b/tests/compiler/array/nested_3x2_value.leo @@ -0,0 +1,8 @@ +// Multidimensional array syntax in leo +function main() { + const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline + + const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/nested_3x2_value_fail.leo b/tests/compiler/array/nested_3x2_value_fail.leo new file mode 100644 index 0000000000..a187a51991 --- /dev/null +++ b/tests/compiler/array/nested_3x2_value_fail.leo @@ -0,0 +1,4 @@ +// Multidimensional array syntax in leo +function main() { + const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) +} diff --git a/tests/compiler/array/registers.leo b/tests/compiler/array/registers.leo new file mode 100644 index 0000000000..98d129207f --- /dev/null +++ b/tests/compiler/array/registers.leo @@ -0,0 +1,3 @@ +function main() -> [u8; 3] { + return input.registers.r; +} diff --git a/tests/compiler/array/slice.leo b/tests/compiler/array/slice.leo new file mode 100644 index 0000000000..9ff83dbbb8 --- /dev/null +++ b/tests/compiler/array/slice.leo @@ -0,0 +1,6 @@ +// `{from}..{to}` copies the elements of one array into another exclusively +function main(a: [u8; 3]) { + const b = [1u8; 4]; + + console.assert(a == b[0..3]); +} diff --git a/tests/compiler/array/slice_lower.leo b/tests/compiler/array/slice_lower.leo new file mode 100644 index 0000000000..0af6fbd937 --- /dev/null +++ b/tests/compiler/array/slice_lower.leo @@ -0,0 +1,8 @@ +function main() { + const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8]; + const expected: [u32; 2] = [0, 1]; + + const actual = arr[..2]; // Should produce [0, 1] + + console.assert(expected == actual); +} \ No newline at end of file diff --git a/tests/compiler/array/spread.leo b/tests/compiler/array/spread.leo new file mode 100644 index 0000000000..8bd2861aae --- /dev/null +++ b/tests/compiler/array/spread.leo @@ -0,0 +1,7 @@ +// A spread operator `...` copies the elements of one array into another +function main(a: [u8; 3]) { + const b = [1u8, 1u8]; + const c = [1u8, ...b]; + + console.assert(a == c); +} \ No newline at end of file diff --git a/tests/compiler/array/tuple_3x2_value.leo b/tests/compiler/array/tuple_3x2_value.leo new file mode 100644 index 0000000000..b6659539d5 --- /dev/null +++ b/tests/compiler/array/tuple_3x2_value.leo @@ -0,0 +1,8 @@ +// Multidimensional array syntax in leo +function main() { + const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline + + const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/tuple_3x2_value_fail.leo b/tests/compiler/array/tuple_3x2_value_fail.leo new file mode 100644 index 0000000000..78593ab696 --- /dev/null +++ b/tests/compiler/array/tuple_3x2_value_fail.leo @@ -0,0 +1,4 @@ +// Multidimensional array syntax in leo +function main() { + const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) +} diff --git a/tests/compiler/array/type_fail.leo b/tests/compiler/array/type_fail.leo new file mode 100644 index 0000000000..356bba976a --- /dev/null +++ b/tests/compiler/array/type_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: [u8; -2] = [0u32; 2]; +} \ No newline at end of file diff --git a/tests/compiler/array/type_input_3x2.leo b/tests/compiler/array/type_input_3x2.leo new file mode 100644 index 0000000000..ea60a0cc24 --- /dev/null +++ b/tests/compiler/array/type_input_3x2.leo @@ -0,0 +1,5 @@ +function main(a: [[u8; 2]; 3]) { + const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_input_4x3x2.leo b/tests/compiler/array/type_input_4x3x2.leo new file mode 100644 index 0000000000..2d9c4cff22 --- /dev/null +++ b/tests/compiler/array/type_input_4x3x2.leo @@ -0,0 +1,8 @@ +function main(a: [[[u8; 2]; 3]; 4]) { + const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_nested_value_nested_3x2.leo b/tests/compiler/array/type_nested_value_nested_3x2.leo new file mode 100644 index 0000000000..bcf5bae674 --- /dev/null +++ b/tests/compiler/array/type_nested_value_nested_3x2.leo @@ -0,0 +1,7 @@ +function main() { + const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline + + const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_nested_value_nested_3x2_fail.leo b/tests/compiler/array/type_nested_value_nested_3x2_fail.leo new file mode 100644 index 0000000000..56c8916fb0 --- /dev/null +++ b/tests/compiler/array/type_nested_value_nested_3x2_fail.leo @@ -0,0 +1,3 @@ +function main() { + const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) +} \ No newline at end of file diff --git a/tests/compiler/array/type_nested_value_nested_4x3x2.leo b/tests/compiler/array/type_nested_value_nested_4x3x2.leo new file mode 100644 index 0000000000..1691fa26c7 --- /dev/null +++ b/tests/compiler/array/type_nested_value_nested_4x3x2.leo @@ -0,0 +1,10 @@ +function main() { + const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline + + const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo b/tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo new file mode 100644 index 0000000000..480327a91d --- /dev/null +++ b/tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo @@ -0,0 +1,3 @@ +function main() { + const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) +} \ No newline at end of file diff --git a/tests/compiler/array/type_nested_value_tuple_3x2.leo b/tests/compiler/array/type_nested_value_tuple_3x2.leo new file mode 100644 index 0000000000..5f14084d55 --- /dev/null +++ b/tests/compiler/array/type_nested_value_tuple_3x2.leo @@ -0,0 +1,7 @@ +function main() { + const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline + + const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_nested_value_tuple_3x2_fail.leo b/tests/compiler/array/type_nested_value_tuple_3x2_fail.leo new file mode 100644 index 0000000000..3bfb559615 --- /dev/null +++ b/tests/compiler/array/type_nested_value_tuple_3x2_fail.leo @@ -0,0 +1,3 @@ +function main() { + const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) +} \ No newline at end of file diff --git a/tests/compiler/array/type_nested_value_tuple_4x3x2.leo b/tests/compiler/array/type_nested_value_tuple_4x3x2.leo new file mode 100644 index 0000000000..88a5143bd2 --- /dev/null +++ b/tests/compiler/array/type_nested_value_tuple_4x3x2.leo @@ -0,0 +1,10 @@ +function main() { + const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline + + const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo b/tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo new file mode 100644 index 0000000000..ce1219a37b --- /dev/null +++ b/tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo @@ -0,0 +1,3 @@ +function main() { + const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) +} \ No newline at end of file diff --git a/tests/compiler/array/type_tuple_value_nested_3x2.leo b/tests/compiler/array/type_tuple_value_nested_3x2.leo new file mode 100644 index 0000000000..81195e03a1 --- /dev/null +++ b/tests/compiler/array/type_tuple_value_nested_3x2.leo @@ -0,0 +1,7 @@ +function main() { + const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline + + const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_tuple_value_nested_3x2_fail.leo b/tests/compiler/array/type_tuple_value_nested_3x2_fail.leo new file mode 100644 index 0000000000..e84f025a9f --- /dev/null +++ b/tests/compiler/array/type_tuple_value_nested_3x2_fail.leo @@ -0,0 +1,3 @@ +function main() { + const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering) +} \ No newline at end of file diff --git a/tests/compiler/array/type_tuple_value_nested_4x3x2.leo b/tests/compiler/array/type_tuple_value_nested_4x3x2.leo new file mode 100644 index 0000000000..322a6f7601 --- /dev/null +++ b/tests/compiler/array/type_tuple_value_nested_4x3x2.leo @@ -0,0 +1,10 @@ +function main() { + const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline + + const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo b/tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo new file mode 100644 index 0000000000..cbb7ccbf76 --- /dev/null +++ b/tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo @@ -0,0 +1,3 @@ +function main() { + const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) +} \ No newline at end of file diff --git a/tests/compiler/array/type_tuple_value_tuple_3x2.leo b/tests/compiler/array/type_tuple_value_tuple_3x2.leo new file mode 100644 index 0000000000..d451a9c1a8 --- /dev/null +++ b/tests/compiler/array/type_tuple_value_tuple_3x2.leo @@ -0,0 +1,7 @@ +function main() { + const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline + + const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo b/tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo new file mode 100644 index 0000000000..884a75db9d --- /dev/null +++ b/tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo @@ -0,0 +1,3 @@ +function main() { + const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering) +} \ No newline at end of file diff --git a/tests/compiler/array/type_tuple_value_tuple_4x3x2.leo b/tests/compiler/array/type_tuple_value_tuple_4x3x2.leo new file mode 100644 index 0000000000..1205b1dc9c --- /dev/null +++ b/tests/compiler/array/type_tuple_value_tuple_4x3x2.leo @@ -0,0 +1,10 @@ +function main() { + const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], + [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline + + const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer + + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo b/tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo new file mode 100644 index 0000000000..31e2a5e552 --- /dev/null +++ b/tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo @@ -0,0 +1,3 @@ +function main() { + const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order) +} \ No newline at end of file diff --git a/tests/compiler/array/variable_slice_fail.leo b/tests/compiler/array/variable_slice_fail.leo new file mode 100644 index 0000000000..e79d64112f --- /dev/null +++ b/tests/compiler/array/variable_slice_fail.leo @@ -0,0 +1,7 @@ +function main() { + const a = [1u8; 10]; + for i in 0..10 { + const x = a[i..10]; + console.debug("{}", x); + } +} \ No newline at end of file diff --git a/tests/compiler/boolean/and.leo b/tests/compiler/boolean/and.leo new file mode 100644 index 0000000000..738d413251 --- /dev/null +++ b/tests/compiler/boolean/and.leo @@ -0,0 +1,13 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - input/false_false.in + - input/false_true.in + - input/true_false.in + - input/true_true.in +*/ + +function main(a: bool, b: bool) -> bool { + return a && b; +} \ No newline at end of file diff --git a/tests/compiler/boolean/conditional.leo b/tests/compiler/boolean/conditional.leo new file mode 100644 index 0000000000..c1e9d23606 --- /dev/null +++ b/tests/compiler/boolean/conditional.leo @@ -0,0 +1,13 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - input/false_false.in + - input/false_true.in + - input/true_false.in + - input/true_true.in +*/ + +function main(a: bool, b: bool) -> bool { + return a ? b : false; +} \ No newline at end of file diff --git a/tests/compiler/boolean/equal.leo b/tests/compiler/boolean/equal.leo new file mode 100644 index 0000000000..f31f34de9b --- /dev/null +++ b/tests/compiler/boolean/equal.leo @@ -0,0 +1,13 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - input/false_false.in + - input/false_true.in + - input/true_false.in + - input/true_true.in +*/ + +function main(a: bool, b: bool) -> bool { + return a == b; +} \ No newline at end of file diff --git a/tests/compiler/boolean/input/false_false.in b/tests/compiler/boolean/input/false_false.in new file mode 100644 index 0000000000..c00c52afd9 --- /dev/null +++ b/tests/compiler/boolean/input/false_false.in @@ -0,0 +1,6 @@ +[main] +a: bool = false; +b: bool = false; + +[registers] +x: bool = false; \ No newline at end of file diff --git a/tests/compiler/boolean/input/false_true.in b/tests/compiler/boolean/input/false_true.in new file mode 100644 index 0000000000..a5b8e98d4d --- /dev/null +++ b/tests/compiler/boolean/input/false_true.in @@ -0,0 +1,6 @@ +[main] +a: bool = false; +b: bool = true; + +[registers] +x: bool = false; \ No newline at end of file diff --git a/tests/compiler/boolean/input/true_false.in b/tests/compiler/boolean/input/true_false.in new file mode 100644 index 0000000000..5713d072da --- /dev/null +++ b/tests/compiler/boolean/input/true_false.in @@ -0,0 +1,6 @@ +[main] +a: bool = true; +b: bool = false; + +[registers] +x: bool = false; \ No newline at end of file diff --git a/tests/compiler/boolean/input/true_true.in b/tests/compiler/boolean/input/true_true.in new file mode 100644 index 0000000000..5e8c2ba4ec --- /dev/null +++ b/tests/compiler/boolean/input/true_true.in @@ -0,0 +1,6 @@ +[main] +a: bool = true; +b: bool = true; + +[registers] +x: bool = false; \ No newline at end of file diff --git a/tests/compiler/boolean/not_equal.leo b/tests/compiler/boolean/not_equal.leo new file mode 100644 index 0000000000..62a1bef945 --- /dev/null +++ b/tests/compiler/boolean/not_equal.leo @@ -0,0 +1,13 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - input/false_false.in + - input/false_true.in + - input/true_false.in + - input/true_true.in +*/ + +function main(a: bool, b: bool) -> bool { + return a != b; +} \ No newline at end of file diff --git a/tests/compiler/boolean/or.leo b/tests/compiler/boolean/or.leo new file mode 100644 index 0000000000..59488b6d98 --- /dev/null +++ b/tests/compiler/boolean/or.leo @@ -0,0 +1,13 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - input/false_false.in + - input/false_true.in + - input/true_false.in + - input/true_true.in +*/ + +function main(a: bool, b: bool) -> bool { + return a || b; +} \ No newline at end of file diff --git a/tests/compiler/circuits/const_self_variable.leo b/tests/compiler/circuits/const_self_variable.leo new file mode 100644 index 0000000000..8ba32ba0df --- /dev/null +++ b/tests/compiler/circuits/const_self_variable.leo @@ -0,0 +1,13 @@ +circuit Foo { + a: u8, + + function use_a(const self) -> u8 { + return self.a + 1; + } +} + +function main() { + let f = Foo { a: 0u8 }; + + console.assert(1u8 == f.use_a()); +} \ No newline at end of file diff --git a/tests/compiler/circuits/const_self_variable_fail.leo b/tests/compiler/circuits/const_self_variable_fail.leo new file mode 100644 index 0000000000..fca9620946 --- /dev/null +++ b/tests/compiler/circuits/const_self_variable_fail.leo @@ -0,0 +1,13 @@ +circuit Foo { + a: u8, + + function set_a(const self, new: u8) { + self.a = new; + } +} + +function main() { + let f = Foo { a: 0u8 }; + + f.set_a(1u8); +} \ No newline at end of file diff --git a/tests/compiler/circuits/define_circuit_inside_circuit_function.leo b/tests/compiler/circuits/define_circuit_inside_circuit_function.leo new file mode 100644 index 0000000000..cedabf2185 --- /dev/null +++ b/tests/compiler/circuits/define_circuit_inside_circuit_function.leo @@ -0,0 +1,13 @@ +circuit Foo { + a: u32, +} + +circuit Bar { + function bar() { + const f = Foo { a: 0u32 }; + } +} + +function main() { + const b = Bar::bar(); +} \ No newline at end of file diff --git a/tests/compiler/circuits/duplicate_name_context.leo b/tests/compiler/circuits/duplicate_name_context.leo new file mode 100644 index 0000000000..8644d27fcb --- /dev/null +++ b/tests/compiler/circuits/duplicate_name_context.leo @@ -0,0 +1,13 @@ +circuit Bar { + b2: u32 + + function add_five(z:u32) -> u32 { + return z+5u32; + } +} + +function main () { + const Bar = 66u32; + const k1 = Bar{ b2: 30u32 }; + const k2 = Bar::add_five(55u32); +} \ No newline at end of file diff --git a/tests/compiler/circuits/inline.leo b/tests/compiler/circuits/inline.leo new file mode 100644 index 0000000000..9ba06f4191 --- /dev/null +++ b/tests/compiler/circuits/inline.leo @@ -0,0 +1,7 @@ +circuit Foo { + x: u32 +} + +function main() { + const a = Foo { x: 1u32 }; +} \ No newline at end of file diff --git a/tests/compiler/circuits/inline_fail.leo b/tests/compiler/circuits/inline_fail.leo new file mode 100644 index 0000000000..01597005fb --- /dev/null +++ b/tests/compiler/circuits/inline_fail.leo @@ -0,0 +1,7 @@ +circuit Foo { + x: u32 +} + +function main() { + const a = Foo { y: 0u32 }; +} \ No newline at end of file diff --git a/tests/compiler/circuits/inline_member_fail.leo b/tests/compiler/circuits/inline_member_fail.leo new file mode 100644 index 0000000000..59f6d7992b --- /dev/null +++ b/tests/compiler/circuits/inline_member_fail.leo @@ -0,0 +1,8 @@ +circuit Foo { + x: u8 +} + +function main() { + const y: u8 = 1; + const a = Foo { y }; +} \ No newline at end of file diff --git a/tests/compiler/circuits/inline_member_pass.leo b/tests/compiler/circuits/inline_member_pass.leo new file mode 100644 index 0000000000..6fd7f7dff7 --- /dev/null +++ b/tests/compiler/circuits/inline_member_pass.leo @@ -0,0 +1,13 @@ +circuit Foo { + x: u8 + + function new(x: u8) -> Self { + return Self { x }; + } +} + +function main() { + const x: u8 = 1; + const a = Foo { x }; + const b = Foo::new(x); +} \ No newline at end of file diff --git a/tests/compiler/circuits/inline_undefined.leo b/tests/compiler/circuits/inline_undefined.leo new file mode 100644 index 0000000000..40c4cf722c --- /dev/null +++ b/tests/compiler/circuits/inline_undefined.leo @@ -0,0 +1,3 @@ +function main() { + const a = Foo { }; +} \ No newline at end of file diff --git a/tests/compiler/circuits/member_function.leo b/tests/compiler/circuits/member_function.leo new file mode 100644 index 0000000000..eee44be448 --- /dev/null +++ b/tests/compiler/circuits/member_function.leo @@ -0,0 +1,13 @@ +circuit Foo { + x: u32, + + function echo(self) -> u32 { + return self.x; + } +} + +function main() { + const a = Foo { x: 1u32 }; + + console.assert(a.echo() == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/circuits/member_function_fail.leo b/tests/compiler/circuits/member_function_fail.leo new file mode 100644 index 0000000000..57b15383a3 --- /dev/null +++ b/tests/compiler/circuits/member_function_fail.leo @@ -0,0 +1,10 @@ +circuit Foo { + function echo(x: u32) -> u32 { + return x; + } +} + +function main() { + const a = Foo { }; + const err = a.echoed(1u32); +} \ No newline at end of file diff --git a/tests/compiler/circuits/member_function_invalid.leo b/tests/compiler/circuits/member_function_invalid.leo new file mode 100644 index 0000000000..7283cf144d --- /dev/null +++ b/tests/compiler/circuits/member_function_invalid.leo @@ -0,0 +1,10 @@ +circuit Foo { + function echo(x: u32) -> u32 { + return x; + } +} + +function main() { + const a = Foo { }; + const err = a.echo(1u32); // echo is a static function and must be accessed using `::` +} \ No newline at end of file diff --git a/tests/compiler/circuits/member_function_nested.leo b/tests/compiler/circuits/member_function_nested.leo new file mode 100644 index 0000000000..b8bf172947 --- /dev/null +++ b/tests/compiler/circuits/member_function_nested.leo @@ -0,0 +1,18 @@ +circuit Foo { + x: u32, + + function add_x(self, y: u32) -> u32 { + return self.x + y; + } + + function call_add_x(self, y: u32) -> u32 { + return self.add_x(y); + } +} + +function main() { + const a = Foo { x: 1u32 }; + const b = a.add_x(1u32); + + console.assert(b == 2u32); +} diff --git a/tests/compiler/circuits/member_static_function.leo b/tests/compiler/circuits/member_static_function.leo new file mode 100644 index 0000000000..68f6065754 --- /dev/null +++ b/tests/compiler/circuits/member_static_function.leo @@ -0,0 +1,11 @@ +circuit Foo { + function echo(x: u32) -> u32 { + return x; + } +} + +function main() { + const a = Foo::echo(1u32); + + console.assert(a == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/circuits/member_static_function_invalid.leo b/tests/compiler/circuits/member_static_function_invalid.leo new file mode 100644 index 0000000000..b886cff8fa --- /dev/null +++ b/tests/compiler/circuits/member_static_function_invalid.leo @@ -0,0 +1,9 @@ +circuit Foo { + function echo(x: u32) -> u32 { + return x; + } +} + +function main() { + const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::` +} \ No newline at end of file diff --git a/tests/compiler/circuits/member_static_function_nested.leo b/tests/compiler/circuits/member_static_function_nested.leo new file mode 100644 index 0000000000..ef536e3f6e --- /dev/null +++ b/tests/compiler/circuits/member_static_function_nested.leo @@ -0,0 +1,15 @@ +circuit Foo { + function qux() {} + + function bar() { + Self::qux(); + } + + function baz() { + Self::bar(); + } +} + +function main() { + Foo::baz(); +} \ No newline at end of file diff --git a/tests/compiler/circuits/member_static_function_undefined.leo b/tests/compiler/circuits/member_static_function_undefined.leo new file mode 100644 index 0000000000..121c80e34c --- /dev/null +++ b/tests/compiler/circuits/member_static_function_undefined.leo @@ -0,0 +1,9 @@ +circuit Foo { + function echo(x: u32) -> u32 { + return x; + } +} + +function main() { + const err = Foo::echoed(1u32); +} \ No newline at end of file diff --git a/tests/compiler/circuits/member_variable.leo b/tests/compiler/circuits/member_variable.leo new file mode 100644 index 0000000000..a3f3fbe7e6 --- /dev/null +++ b/tests/compiler/circuits/member_variable.leo @@ -0,0 +1,9 @@ +circuit Foo { + x: u32, +} + +function main() { + const a = Foo { x: 1u32 }; + + console.assert(a.x == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/circuits/member_variable_and_function.leo b/tests/compiler/circuits/member_variable_and_function.leo new file mode 100644 index 0000000000..f90cdca072 --- /dev/null +++ b/tests/compiler/circuits/member_variable_and_function.leo @@ -0,0 +1,15 @@ +circuit Foo { + foo: u32, + + function bar() -> u32 { + return 1u32; + } +} + +function main() { + const a = Foo { foo: 1 }; + + const b = a.foo + Foo::bar(); + + console.assert(b == 2u32); +} diff --git a/tests/compiler/circuits/member_variable_fail.leo b/tests/compiler/circuits/member_variable_fail.leo new file mode 100644 index 0000000000..fdf42068d5 --- /dev/null +++ b/tests/compiler/circuits/member_variable_fail.leo @@ -0,0 +1,9 @@ +circuit Foo { + x: u32 +} + +function main() { + const a = Foo { x: 1u32 }; + + const err = a.y; +} \ No newline at end of file diff --git a/tests/compiler/circuits/mod.rs b/tests/compiler/circuits/mod.rs new file mode 100644 index 0000000000..093e2263e1 --- /dev/null +++ b/tests/compiler/circuits/mod.rs @@ -0,0 +1,318 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, expect_asg_error, parse_program}; + +// Expressions + +#[test] +fn test_inline() { + let program_string = include_str!("inline.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_inline_fail() { + let program_string = include_str!("inline_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_inline_undefined() { + let program_string = include_str!("inline_undefined.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +// Members + +#[test] +fn test_member_variable() { + let program_string = include_str!("member_variable.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_member_variable_fail() { + let program_string = include_str!("member_variable_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_member_variable_and_function() { + let program_string = include_str!("member_variable_and_function.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_member_function() { + let program_string = include_str!("member_function.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_member_function_fail() { + let program_string = include_str!("member_function_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_member_function_invalid() { + let program_string = include_str!("member_function_invalid.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_member_function_nested() { + let program_string = include_str!("member_function_nested.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_member_static_function() { + let program_string = include_str!("member_static_function.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_member_static_function_nested() { + let program_string = include_str!("member_static_function_nested.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_member_static_function_invalid() { + let program_string = include_str!("member_static_function_invalid.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error) +} + +#[test] +fn test_member_static_function_undefined() { + let program_string = include_str!("member_static_function_undefined.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error) +} + +// Constant +#[test] +fn test_const_self_variable() { + let program_string = include_str!("const_self_variable.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_const_self_variable_fail() { + let program_string = include_str!("const_self_variable_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +// Mutability + +#[test] +fn test_mutate_function_fail() { + let program_string = include_str!("mut_function_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_mutate_self_variable() { + let program_string = include_str!("mut_self_variable.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_mutate_self_variable_branch() { + let program_string = include_str!("mut_self_variable_branch.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_mutate_self_variable_conditional() { + let program_string = include_str!("mut_self_variable_conditional.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_mutate_self_variable_fail() { + let program_string = include_str!("mut_self_variable_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_mutate_self_function_fail() { + let program_string = include_str!("mut_self_function_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_mutate_self_static_function_fail() { + let program_string = include_str!("mut_self_static_function_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_mutate_static_function_fail() { + let program_string = include_str!("mut_static_function_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_mutate_variable() { + let program_string = include_str!("mut_variable.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_mutate_variable_fail() { + let program_string = include_str!("mut_variable_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +// Self + +#[test] +fn test_self_fail() { + let program_string = include_str!("self_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_self_member_pass() { + let program_string = include_str!("self_member.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_self_member_invalid() { + let program_string = include_str!("self_member_invalid.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_self_member_undefined() { + let program_string = include_str!("self_member_undefined.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +// Inline circuit member + +#[test] +fn test_inline_member_pass() { + let program_string = include_str!("inline_member_pass.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_inline_member_fail() { + let program_string = include_str!("inline_member_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +// All + +#[test] +fn test_pedersen_mock() { + let program_string = include_str!("pedersen_mock.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_define_circuit_inside_circuit_function() { + let program_string = include_str!("define_circuit_inside_circuit_function.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_duplicate_name_context() { + let program_string = include_str!("duplicate_name_context.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_mutable_call_immutable_context() { + let program_string = include_str!("mutable_call_immutable_context.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} diff --git a/tests/compiler/circuits/mut_function_fail.leo b/tests/compiler/circuits/mut_function_fail.leo new file mode 100644 index 0000000000..44583810dd --- /dev/null +++ b/tests/compiler/circuits/mut_function_fail.leo @@ -0,0 +1,11 @@ +circuit Foo { + a: u8, + + function bar() {} +} + +function main() { + let f = Foo { a: 0u8 }; + + f.bar = 1u8; +} \ No newline at end of file diff --git a/tests/compiler/circuits/mut_self_function_fail.leo b/tests/compiler/circuits/mut_self_function_fail.leo new file mode 100644 index 0000000000..b81b18e743 --- /dev/null +++ b/tests/compiler/circuits/mut_self_function_fail.leo @@ -0,0 +1,15 @@ +circuit Foo { + a: u8, + + function bar() {} + + function set_a(mut self, new: u8) { + self.bar = new; + } +} + +function main() { + let f = Foo { a: 0u8 }; + + f.set_a(1u8); +} \ No newline at end of file diff --git a/tests/compiler/circuits/mut_self_static_function_fail.leo b/tests/compiler/circuits/mut_self_static_function_fail.leo new file mode 100644 index 0000000000..b81b18e743 --- /dev/null +++ b/tests/compiler/circuits/mut_self_static_function_fail.leo @@ -0,0 +1,15 @@ +circuit Foo { + a: u8, + + function bar() {} + + function set_a(mut self, new: u8) { + self.bar = new; + } +} + +function main() { + let f = Foo { a: 0u8 }; + + f.set_a(1u8); +} \ No newline at end of file diff --git a/tests/compiler/circuits/mut_self_variable.leo b/tests/compiler/circuits/mut_self_variable.leo new file mode 100644 index 0000000000..dc2047d872 --- /dev/null +++ b/tests/compiler/circuits/mut_self_variable.leo @@ -0,0 +1,22 @@ +circuit Foo { + a: u8, + + function set_a(mut self, new: u8) { + self.a = new; + console.assert(self.a == new); + } +} + +function main() { + let f = Foo { a: 0u8 }; + + console.assert(f.a == 0u8); + + f.set_a(1u8); + + console.assert(f.a == 1u8); + + f.set_a(2u8); + + console.assert(f.a == 2u8); +} \ No newline at end of file diff --git a/tests/compiler/circuits/mut_self_variable_branch.leo b/tests/compiler/circuits/mut_self_variable_branch.leo new file mode 100644 index 0000000000..1c2f126f08 --- /dev/null +++ b/tests/compiler/circuits/mut_self_variable_branch.leo @@ -0,0 +1,32 @@ +circuit Foo { + a: u8, + + function set_a(mut self, condition: bool, new: u8) { + if condition { + self.a = new; + console.assert(self.a == new); + } + } +} + +function main() { + let f = Foo { a: 0u8 }; + + console.assert(f.a == 0u8); + + f.set_a(false, 1u8); + + console.assert(f.a == 0u8); + + f.set_a(true, 1u8); + + console.assert(f.a == 1u8); + + f.set_a(false, 2u8); + + console.assert(f.a == 1u8); + + f.set_a(true, 2u8); + + console.assert(f.a == 2u8); +} \ No newline at end of file diff --git a/tests/compiler/circuits/mut_self_variable_conditional.leo b/tests/compiler/circuits/mut_self_variable_conditional.leo new file mode 100644 index 0000000000..61a5e354dc --- /dev/null +++ b/tests/compiler/circuits/mut_self_variable_conditional.leo @@ -0,0 +1,15 @@ +function main() { + let f = Foo { a: 0u32 }; + + f.bar(); +} + +circuit Foo { + a: u32 + + function bar(mut self) { + if true { + self.a = 5u32; // Mutating a variable inside a conditional statement should work. + } + } +} \ No newline at end of file diff --git a/tests/compiler/circuits/mut_self_variable_fail.leo b/tests/compiler/circuits/mut_self_variable_fail.leo new file mode 100644 index 0000000000..4db62a4d3e --- /dev/null +++ b/tests/compiler/circuits/mut_self_variable_fail.leo @@ -0,0 +1,13 @@ +circuit Foo { + a: u8, + + function set_a(self, new: u8) { + self.a = new; + } +} + +function main() { + let f = Foo { a: 0u8 }; + + f.set_a(1u8); +} \ No newline at end of file diff --git a/tests/compiler/circuits/mut_static_function_fail.leo b/tests/compiler/circuits/mut_static_function_fail.leo new file mode 100644 index 0000000000..e7db3a1df9 --- /dev/null +++ b/tests/compiler/circuits/mut_static_function_fail.leo @@ -0,0 +1,9 @@ +circuit Foo { + function bar() {} +} + +function main() { + let f = Foo { a: 0u8 }; + + f.bar = 1u8; +} \ No newline at end of file diff --git a/tests/compiler/circuits/mut_variable.leo b/tests/compiler/circuits/mut_variable.leo new file mode 100644 index 0000000000..ddc7412038 --- /dev/null +++ b/tests/compiler/circuits/mut_variable.leo @@ -0,0 +1,17 @@ +circuit Foo { + a: u8, +} + +function main() { + let f = Foo { a: 0u8 }; + + console.assert(f.a == 0u8); + + f.a = 1u8; + + console.assert(f.a == 1u8); + + f.a = 2u8; + + console.assert(f.a == 2u8); +} \ No newline at end of file diff --git a/tests/compiler/circuits/mut_variable_fail.leo b/tests/compiler/circuits/mut_variable_fail.leo new file mode 100644 index 0000000000..e116b33d5c --- /dev/null +++ b/tests/compiler/circuits/mut_variable_fail.leo @@ -0,0 +1,9 @@ +circuit Foo { + a: u8, +} + +function main() { + const f = Foo { a: 0u8 }; + + f.a = 1u8; +} \ No newline at end of file diff --git a/tests/compiler/circuits/mutable_call_immutable_context.leo b/tests/compiler/circuits/mutable_call_immutable_context.leo new file mode 100644 index 0000000000..d235d11cb7 --- /dev/null +++ b/tests/compiler/circuits/mutable_call_immutable_context.leo @@ -0,0 +1,25 @@ +circuit TestMe { + x: u8, + + function test_me(mut self) -> u8 { + self.x += 1; + return self.x; + } + + function new() -> Self { + return Self { x: 1u8 }; + } +} + +function my_fn() -> TestMe { + return TestMe { x: 0u8 }; +} + +function main () { + const t = TestMe {x: 6u8}.test_me(); + console.assert(t == 7u8); + const u = my_fn().test_me(); + console.assert(u == 1u8); + const v = TestMe::new().test_me(); + console.assert(v == 2u8); +} \ No newline at end of file diff --git a/tests/compiler/circuits/pedersen_mock.leo b/tests/compiler/circuits/pedersen_mock.leo new file mode 100644 index 0000000000..0fc6752f2f --- /dev/null +++ b/tests/compiler/circuits/pedersen_mock.leo @@ -0,0 +1,27 @@ +circuit PedersenHash { + parameters: [u32; 512] + + function new(parameters: [u32; 512]) -> Self { + return Self { parameters: parameters }; + } + + function hash(self, bits: [bool; 512]) -> u32 { + let digest: u32 = 0; + for i in 0..512 { + const base = bits[i] ? self.parameters[i] : 0u32; + digest += base; + } + return digest; + } +} + +// The 'pedersen_hash' main function. +function main() { + const parameters = [0u32; 512]; + const pedersen = PedersenHash::new(parameters); + const hash_input: [bool; 512] = [true; 512]; + + const res = pedersen.hash(hash_input); + + console.assert(res == 0u32); +} diff --git a/tests/compiler/circuits/self_circuit.leo b/tests/compiler/circuits/self_circuit.leo new file mode 100644 index 0000000000..6faa42278b --- /dev/null +++ b/tests/compiler/circuits/self_circuit.leo @@ -0,0 +1,9 @@ +circuit Foo { + static function new() -> Self { + return Self { }; + } +} + +function main() { + const a = Foo::new(); +} \ No newline at end of file diff --git a/tests/compiler/circuits/self_fail.leo b/tests/compiler/circuits/self_fail.leo new file mode 100644 index 0000000000..e4e878dc89 --- /dev/null +++ b/tests/compiler/circuits/self_fail.leo @@ -0,0 +1,3 @@ +function main() { + Self::main(); +} \ No newline at end of file diff --git a/tests/compiler/circuits/self_member.leo b/tests/compiler/circuits/self_member.leo new file mode 100644 index 0000000000..237baac9de --- /dev/null +++ b/tests/compiler/circuits/self_member.leo @@ -0,0 +1,14 @@ +circuit Foo { + f: u32, + + function bar(self) -> u32 { + return self.f; + } +} + +function main() { + const a = Foo { f: 1u32 }; + const b = a.bar(); + + console.assert(b == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/circuits/self_member_invalid.leo b/tests/compiler/circuits/self_member_invalid.leo new file mode 100644 index 0000000000..7283b3260a --- /dev/null +++ b/tests/compiler/circuits/self_member_invalid.leo @@ -0,0 +1,12 @@ +circuit Foo { + f: u32, + + function bar() -> u32 { + return f; + } +} + +function main() -> u32 { + const foo = Foo { f: 1u32 }; + const err = foo.bar(); +} \ No newline at end of file diff --git a/tests/compiler/circuits/self_member_undefined.leo b/tests/compiler/circuits/self_member_undefined.leo new file mode 100644 index 0000000000..8b52d305a3 --- /dev/null +++ b/tests/compiler/circuits/self_member_undefined.leo @@ -0,0 +1,10 @@ +circuit Foo { + function bar() -> u32 { + return self.f; + } +} + +function main() { + const foo = Foo { }; + const err = foo.bar(); +} \ No newline at end of file diff --git a/tests/compiler/console/assert.leo b/tests/compiler/console/assert.leo new file mode 100644 index 0000000000..ba6be77256 --- /dev/null +++ b/tests/compiler/console/assert.leo @@ -0,0 +1,3 @@ +function main(a: bool) { + console.assert(a == true); +} \ No newline at end of file diff --git a/tests/compiler/console/conditional_assert.leo b/tests/compiler/console/conditional_assert.leo new file mode 100644 index 0000000000..f2c1591e9c --- /dev/null +++ b/tests/compiler/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/tests/compiler/console/debug.leo b/tests/compiler/console/debug.leo new file mode 100644 index 0000000000..54e6eb539f --- /dev/null +++ b/tests/compiler/console/debug.leo @@ -0,0 +1,3 @@ +function main() { + console.debug("hello debug"); +} \ No newline at end of file diff --git a/tests/compiler/console/error.leo b/tests/compiler/console/error.leo new file mode 100644 index 0000000000..86d13f8cee --- /dev/null +++ b/tests/compiler/console/error.leo @@ -0,0 +1,3 @@ +function main() { + console.error("hello error"); +} \ No newline at end of file diff --git a/tests/compiler/console/input/input_equal.in b/tests/compiler/console/input/input_equal.in new file mode 100644 index 0000000000..c147902071 --- /dev/null +++ b/tests/compiler/console/input/input_equal.in @@ -0,0 +1,3 @@ +[main] +a: u32 = 1; +b: u32 = 1; diff --git a/tests/compiler/console/input/input_unequal.in b/tests/compiler/console/input/input_unequal.in new file mode 100644 index 0000000000..37e9e6a578 --- /dev/null +++ b/tests/compiler/console/input/input_unequal.in @@ -0,0 +1,3 @@ +[main] +a: u32 = 1; +b: u32 = 0; diff --git a/tests/compiler/console/log.leo b/tests/compiler/console/log.leo new file mode 100644 index 0000000000..a190ca4ba9 --- /dev/null +++ b/tests/compiler/console/log.leo @@ -0,0 +1,3 @@ +function main() { + console.log("hello world"); +} \ No newline at end of file diff --git a/tests/compiler/console/log_conditional.leo b/tests/compiler/console/log_conditional.leo new file mode 100644 index 0000000000..a9fdb6e698 --- /dev/null +++ b/tests/compiler/console/log_conditional.leo @@ -0,0 +1,6 @@ +// Conditionally add two u32 integers and log the result to the console. +function main(a: u32, b: u32) { + if a == b { + console.log("{}=={}",a,b); // This line should not fail. + } +} \ No newline at end of file diff --git a/tests/compiler/console/log_fail.leo b/tests/compiler/console/log_fail.leo new file mode 100644 index 0000000000..dafa6bea8e --- /dev/null +++ b/tests/compiler/console/log_fail.leo @@ -0,0 +1,3 @@ +function main() { + console.log( hello ); +} \ No newline at end of file diff --git a/tests/compiler/console/log_input.leo b/tests/compiler/console/log_input.leo new file mode 100644 index 0000000000..c4fd0a8b12 --- /dev/null +++ b/tests/compiler/console/log_input.leo @@ -0,0 +1,3 @@ +function main(a: bool) { + console.log("a = {}", a); +} \ No newline at end of file diff --git a/tests/compiler/console/log_parameter.leo b/tests/compiler/console/log_parameter.leo new file mode 100644 index 0000000000..ebcb931a2b --- /dev/null +++ b/tests/compiler/console/log_parameter.leo @@ -0,0 +1,3 @@ +function main() { + console.log("{}", 1u32); +} \ No newline at end of file diff --git a/tests/compiler/console/log_parameter_fail_empty.leo b/tests/compiler/console/log_parameter_fail_empty.leo new file mode 100644 index 0000000000..81b42c0919 --- /dev/null +++ b/tests/compiler/console/log_parameter_fail_empty.leo @@ -0,0 +1,3 @@ +function main() { + console.log("{}"); +} \ No newline at end of file diff --git a/tests/compiler/console/log_parameter_fail_none.leo b/tests/compiler/console/log_parameter_fail_none.leo new file mode 100644 index 0000000000..c92fdfbb2d --- /dev/null +++ b/tests/compiler/console/log_parameter_fail_none.leo @@ -0,0 +1,3 @@ +function main() { + console.log("", 1u32); +} \ No newline at end of file diff --git a/tests/compiler/console/log_parameter_fail_unknown.leo b/tests/compiler/console/log_parameter_fail_unknown.leo new file mode 100644 index 0000000000..757f4c27c3 --- /dev/null +++ b/tests/compiler/console/log_parameter_fail_unknown.leo @@ -0,0 +1,3 @@ +function main() { + console.log("{}", a); +} \ No newline at end of file diff --git a/tests/compiler/console/log_parameter_many.leo b/tests/compiler/console/log_parameter_many.leo new file mode 100644 index 0000000000..60455ebbb0 --- /dev/null +++ b/tests/compiler/console/log_parameter_many.leo @@ -0,0 +1,3 @@ +function main() { + console.log("{} {}", 1u32, true); +} \ No newline at end of file diff --git a/tests/compiler/console/mod.rs b/tests/compiler/console/mod.rs new file mode 100644 index 0000000000..d3ce931675 --- /dev/null +++ b/tests/compiler/console/mod.rs @@ -0,0 +1,169 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + parse_program, + parse_program_with_input, +}; +use leo_ast::InputValue; + +#[test] +fn test_log() { + let program_string = include_str!("log.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_log_fail() { + let program_string = include_str!("log_fail.leo"); + + assert!(parse_program(program_string).is_err()); +} + +#[test] +fn test_log_parameter() { + let program_string = include_str!("log_parameter.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_log_parameter_many() { + let program_string = include_str!("log_parameter_many.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_log_parameter_fail_empty() { + let program_string = include_str!("log_parameter_fail_empty.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_log_parameter_fail_none() { + let program_string = include_str!("log_parameter_fail_empty.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_log_parameter_fail_unknown() { + let program_string = include_str!("log_parameter_fail_unknown.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_log_input() { + let program_string = include_str!("log_input.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(true)))]); + + program.set_main_input(main_input); + + assert_satisfied(program); +} + +#[test] +fn test_log_conditional() { + let program_string = include_str!("log_conditional.leo"); + let input_equal_string = include_str!("input/input_equal.in"); + + let program = parse_program_with_input(program_string, input_equal_string).unwrap(); + + assert_satisfied(program); + + let input_unequal_string = include_str!("input/input_unequal.in"); + + let program = parse_program_with_input(program_string, input_unequal_string).unwrap(); + + assert_satisfied(program); +} + +// Debug + +#[test] +fn test_debug() { + let program_string = include_str!("debug.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +// Error + +#[test] +fn test_error() { + let program_string = include_str!("error.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +// Assertion + +#[test] +fn test_assert() { + let program_string = include_str!("assert.leo"); + let mut program = parse_program(program_string).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(program_string).unwrap(); + + let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(false)))]); + + program.set_main_input(main_input); + + expect_compiler_error(program); +} + +#[test] +fn test_conditional_assert() { + let program_string = include_str!("conditional_assert.leo"); + let mut program = parse_program(program_string).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(program_string).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/tests/compiler/core/core_circuit_invalid.leo b/tests/compiler/core/core_circuit_invalid.leo new file mode 100644 index 0000000000..4a42bda032 --- /dev/null +++ b/tests/compiler/core/core_circuit_invalid.leo @@ -0,0 +1,3 @@ +import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package + +function main() {} diff --git a/tests/compiler/core/core_circuit_star_fail.leo b/tests/compiler/core/core_circuit_star_fail.leo new file mode 100644 index 0000000000..14b54b0d69 --- /dev/null +++ b/tests/compiler/core/core_circuit_star_fail.leo @@ -0,0 +1,3 @@ +import core.*; // You cannot import all dependencies from core at once + +function main() {} diff --git a/tests/compiler/core/core_package_invalid.leo b/tests/compiler/core/core_package_invalid.leo new file mode 100644 index 0000000000..7cbcf93ecc --- /dev/null +++ b/tests/compiler/core/core_package_invalid.leo @@ -0,0 +1,3 @@ +import core.bad_circuit; // `bad_circuit` is not a core package + +function main() {} diff --git a/tests/compiler/core/core_unstable_package_invalid.leo b/tests/compiler/core/core_unstable_package_invalid.leo new file mode 100644 index 0000000000..35e6c0d1ba --- /dev/null +++ b/tests/compiler/core/core_unstable_package_invalid.leo @@ -0,0 +1,3 @@ +import core.unstable.bad_circuit; // `bad_circuit` is not a core unstable package + +function main() {} diff --git a/tests/compiler/core/mod.rs b/tests/compiler/core/mod.rs new file mode 100644 index 0000000000..c4a6bb48a5 --- /dev/null +++ b/tests/compiler/core/mod.rs @@ -0,0 +1,59 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod packages; + +use crate::{assert_satisfied, expect_asg_error, parse_program}; + +#[test] +fn test_core_circuit_invalid() { + let program_string = include_str!("core_package_invalid.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_core_circuit_star_fail() { + let program_string = include_str!("core_circuit_star_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_core_package_invalid() { + let program_string = include_str!("core_package_invalid.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_core_unstable_package_invalid() { + let program_string = include_str!("core_unstable_package_invalid.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_unstable_blake2s_sanity() { + let program_string = include_str!("unstable_blake2s.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} diff --git a/tests/compiler/core/packages/mod.rs b/tests/compiler/core/packages/mod.rs new file mode 100644 index 0000000000..6093aa3391 --- /dev/null +++ b/tests/compiler/core/packages/mod.rs @@ -0,0 +1,17 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod unstable; diff --git a/tests/compiler/core/packages/unstable/blake2s/arguments_length_fail.leo b/tests/compiler/core/packages/unstable/blake2s/arguments_length_fail.leo new file mode 100644 index 0000000000..614490432d --- /dev/null +++ b/tests/compiler/core/packages/unstable/blake2s/arguments_length_fail.leo @@ -0,0 +1,9 @@ +import core.unstable.blake2s.Blake2s; + +function main() { + const seed: [u8; 32] = [0; 32]; + + const result = Blake2s::hash(seed); // function `hash` takes 2 arguments + + console.log("Result: {}", result); +} diff --git a/tests/compiler/core/packages/unstable/blake2s/arguments_type_fail.leo b/tests/compiler/core/packages/unstable/blake2s/arguments_type_fail.leo new file mode 100644 index 0000000000..f80e7b0205 --- /dev/null +++ b/tests/compiler/core/packages/unstable/blake2s/arguments_type_fail.leo @@ -0,0 +1,10 @@ +import core.unstable.blake2s.Blake2s; + +function main() { + const seed: [u8; 32] = [0; 32]; + const message: [u16; 32] = [0; 32]; // message should be type [u8; 32] + + const result = Blake2s::hash(seed, message); + + console.log("Result: {}", result); +} diff --git a/tests/compiler/core/packages/unstable/blake2s/blake2s_input.leo b/tests/compiler/core/packages/unstable/blake2s/blake2s_input.leo new file mode 100644 index 0000000000..51de777341 --- /dev/null +++ b/tests/compiler/core/packages/unstable/blake2s/blake2s_input.leo @@ -0,0 +1,5 @@ +import core.unstable.blake2s.Blake2s; + +function main(seed: [u8; 32], message: [u8; 32]) -> [u8; 32] { + return Blake2s::hash(seed, message); +} diff --git a/tests/compiler/core/packages/unstable/blake2s/blake2s_random.leo b/tests/compiler/core/packages/unstable/blake2s/blake2s_random.leo new file mode 100644 index 0000000000..c9592fcbf8 --- /dev/null +++ b/tests/compiler/core/packages/unstable/blake2s/blake2s_random.leo @@ -0,0 +1,7 @@ +import core.unstable.blake2s.Blake2s; + +function main(seed: [u8; 32], message: [u8; 32], expected: [u8; 32]) { + const actual = Blake2s::hash(seed, message); + + console.assert(expected == actual); +} diff --git a/tests/compiler/core/packages/unstable/blake2s/inputs/valid_input.in b/tests/compiler/core/packages/unstable/blake2s/inputs/valid_input.in new file mode 100644 index 0000000000..6f5064f41d --- /dev/null +++ b/tests/compiler/core/packages/unstable/blake2s/inputs/valid_input.in @@ -0,0 +1,6 @@ +[main] +seed: [u8; 32] = [0; 32]; +message: [u8; 32] = [0; 32]; + +[registers] +r0: [u8; 32] = [0; 32]; \ No newline at end of file diff --git a/tests/compiler/core/packages/unstable/blake2s/mod.rs b/tests/compiler/core/packages/unstable/blake2s/mod.rs new file mode 100644 index 0000000000..ce9a23b2f3 --- /dev/null +++ b/tests/compiler/core/packages/unstable/blake2s/mod.rs @@ -0,0 +1,106 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + generate_main_input, + get_output, + parse_program, + parse_program_with_input, +}; + +use leo_ast::InputValue; +use leo_input::types::{IntegerType, U8Type, UnsignedIntegerType}; +use rand::Rng; +use rand_core::SeedableRng; +use rand_xorshift::XorShiftRng; +use snarkvm_algorithms::{prf::blake2s::Blake2s as B2SPRF, traits::PRF}; + +#[test] +fn test_arguments_length_fail() { + let program_string = include_str!("arguments_length_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_arguments_type_fail() { + let program_string = include_str!("arguments_type_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_blake2s_input() { + let input_string = include_str!("inputs/valid_input.in"); + let program_string = include_str!("blake2s_input.leo"); + let expected_string = include_str!("outputs/valid_output.out"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + let actual_bytes = get_output(program); + let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); + + assert_eq!(expected_string, actual_string) +} + +#[test] +fn test_blake2s_random() { + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + let mut seed = [0u8; 32]; + rng.fill(&mut seed); + + let mut message = [0u8; 32]; + rng.fill(&mut message); + + // Use snarkvm-algorithms blake2s evaluate to get expected value + let expected = B2SPRF::evaluate(&seed, &message).unwrap().to_vec(); + + // Create program input values for seed, message, and expected values + let seed_input_value = bytes_gadget_to_input(seed.to_vec()); + let message_input_value = bytes_gadget_to_input(message.to_vec()); + let expected_value = bytes_gadget_to_input(expected); + + // The `blake2s_random.leo` program will compute a blake2s hash digest and compare it against + // the expected value + let bytes = include_str!("blake2s_random.leo"); + let mut program = parse_program(bytes).unwrap(); + + let main_input = generate_main_input(vec![ + ("seed", Some(seed_input_value)), + ("message", Some(message_input_value)), + ("expected", Some(expected_value)), + ]); + + // Load input values into Leo program + program.set_main_input(main_input); + + assert_satisfied(program); +} + +fn bytes_gadget_to_input(bytes: Vec) -> InputValue { + let u8_type = IntegerType::Unsigned(UnsignedIntegerType::U8Type(U8Type {})); + let bytes = bytes + .into_iter() + .map(|byte| InputValue::Integer(u8_type.clone(), byte.to_string())) + .collect::>(); + + InputValue::Array(bytes) +} diff --git a/tests/compiler/core/packages/unstable/blake2s/outputs/valid_output.out b/tests/compiler/core/packages/unstable/blake2s/outputs/valid_output.out new file mode 100644 index 0000000000..f8f60f3e4e --- /dev/null +++ b/tests/compiler/core/packages/unstable/blake2s/outputs/valid_output.out @@ -0,0 +1,2 @@ +[registers] +r0: [u8; 32] = [174, 9, 219, 124, 213, 79, 66, 180, 144, 239, 9, 182, 188, 84, 26, 246, 136, 228, 149, 155, 184, 197, 63, 53, 154, 111, 86, 227, 138, 180, 84, 163]; diff --git a/tests/compiler/core/packages/unstable/mod.rs b/tests/compiler/core/packages/unstable/mod.rs new file mode 100644 index 0000000000..16304197fe --- /dev/null +++ b/tests/compiler/core/packages/unstable/mod.rs @@ -0,0 +1,17 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +pub mod blake2s; diff --git a/tests/compiler/core/unstable_blake2s.leo b/tests/compiler/core/unstable_blake2s.leo new file mode 100644 index 0000000000..c430d9a837 --- /dev/null +++ b/tests/compiler/core/unstable_blake2s.leo @@ -0,0 +1,10 @@ +import core.unstable.blake2s.Blake2s; + +function main() { + const seed: [u8; 32] = [0; 32]; + const message: [u8; 32] = [0; 32]; + + const result = Blake2s::hash(seed, message); + + console.log("Result: {}", result); +} diff --git a/tests/compiler/definition/mod.rs b/tests/compiler/definition/mod.rs new file mode 100644 index 0000000000..e5faf8b2de --- /dev/null +++ b/tests/compiler/definition/mod.rs @@ -0,0 +1,38 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, import::set_local_dir, parse_program}; + +#[test] +fn test_out_of_order() { + let program_string = include_str!("out_of_order.leo"); + + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +#[ignore] +fn test_out_of_order_with_import() { + set_local_dir(); + + let program_string = include_str!("out_of_order_with_import.leo"); + + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} diff --git a/tests/compiler/definition/out_of_order.leo b/tests/compiler/definition/out_of_order.leo new file mode 100644 index 0000000000..69d46d0e74 --- /dev/null +++ b/tests/compiler/definition/out_of_order.leo @@ -0,0 +1,6 @@ +@test +function fake_test() {} + +function main() {} + +circuit Foo {} \ No newline at end of file diff --git a/tests/compiler/definition/out_of_order_with_import.leo b/tests/compiler/definition/out_of_order_with_import.leo new file mode 100644 index 0000000000..04e5ddf12b --- /dev/null +++ b/tests/compiler/definition/out_of_order_with_import.leo @@ -0,0 +1,7 @@ +test function fake_test() {} + +function main() {} + +import test_import.foo; + +circuit Foo {} \ No newline at end of file diff --git a/tests/compiler/field/add.leo b/tests/compiler/field/add.leo new file mode 100644 index 0000000000..8dc2c7df4e --- /dev/null +++ b/tests/compiler/field/add.leo @@ -0,0 +1,3 @@ +function main(a: field, b: field, c: field) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/field/console_assert.leo b/tests/compiler/field/console_assert.leo new file mode 100644 index 0000000000..c7224bcea5 --- /dev/null +++ b/tests/compiler/field/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: field, b: field) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/field/div.leo b/tests/compiler/field/div.leo new file mode 100644 index 0000000000..028b06fad2 --- /dev/null +++ b/tests/compiler/field/div.leo @@ -0,0 +1,3 @@ +function main(a: field, b: field, c: field) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/field/eq.leo b/tests/compiler/field/eq.leo new file mode 100644 index 0000000000..e64307d8de --- /dev/null +++ b/tests/compiler/field/eq.leo @@ -0,0 +1,3 @@ +function main(a: field, b: field, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/field/field.leo b/tests/compiler/field/field.leo new file mode 100644 index 0000000000..5d5732e906 --- /dev/null +++ b/tests/compiler/field/field.leo @@ -0,0 +1,4 @@ +function main() { + const negOneField: field = -1field; + const oneField = 1field; +} \ No newline at end of file diff --git a/tests/compiler/field/input/register_one.in b/tests/compiler/field/input/register_one.in new file mode 100644 index 0000000000..50ca7c02dd --- /dev/null +++ b/tests/compiler/field/input/register_one.in @@ -0,0 +1,2 @@ +[registers] +r: field = 1; \ No newline at end of file diff --git a/tests/compiler/field/input/register_zero.in b/tests/compiler/field/input/register_zero.in new file mode 100644 index 0000000000..15d3fe0c68 --- /dev/null +++ b/tests/compiler/field/input/register_zero.in @@ -0,0 +1,2 @@ +[registers] +r: field = 0; \ No newline at end of file diff --git a/tests/compiler/field/mod.rs b/tests/compiler/field/mod.rs new file mode 100644 index 0000000000..f5ccb6c116 --- /dev/null +++ b/tests/compiler/field/mod.rs @@ -0,0 +1,369 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, expect_compiler_error, generate_main_input, parse_program}; +use leo_ast::InputValue; + +use snarkvm_curves::edwards_bls12::Fq; +use snarkvm_utilities::bytes::ToBytes; + +use num_bigint::BigUint; +use rand::{Rng, SeedableRng}; +use rand_xorshift::XorShiftRng; + +// Helper function to convert field element into decimal base 10 string +pub fn field_to_decimal_string(f: Fq) -> String { + // write field to buffer + + let mut buf = Vec::new(); + + f.write(&mut buf).unwrap(); + + // convert to big integer + + let f_bigint = BigUint::from_bytes_le(&buf); + + f_bigint.to_str_radix(10) +} + +#[test] +fn test_negate() { + use std::ops::Neg; + + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: Fq = rng.gen(); + let b = a.neg(); + + let a_string = field_to_decimal_string(a); + let b_string = field_to_decimal_string(b); + + let program_string = include_str!("negate.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Field(a_string))), + ("b", Some(InputValue::Field(b_string))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program) + } +} + +#[test] +fn test_field() { + let program_string = include_str!("field.leo"); + let mut program = parse_program(program_string).unwrap(); + + assert_satisfied(program) +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let mut program = parse_program(program_string).unwrap(); + + expect_compiler_error(program) +} + +#[test] +fn test_add() { + use std::ops::Add; + + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: Fq = rng.gen(); + let b: Fq = rng.gen(); + let c = a.add(&b); + + let a_string = field_to_decimal_string(a); + let b_string = field_to_decimal_string(b); + let c_string = field_to_decimal_string(c); + + let program_string = include_str!("add.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Field(a_string))), + ("b", Some(InputValue::Field(b_string))), + ("c", Some(InputValue::Field(c_string))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program) + } +} + +#[test] +fn test_sub() { + use std::ops::Sub; + + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: Fq = rng.gen(); + let b: Fq = rng.gen(); + let c = a.sub(&b); + + let a_string = field_to_decimal_string(a); + let b_string = field_to_decimal_string(b); + let c_string = field_to_decimal_string(c); + + let program_string = include_str!("sub.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Field(a_string))), + ("b", Some(InputValue::Field(b_string))), + ("c", Some(InputValue::Field(c_string))), + ]); + program.set_main_input(main_input); + + assert_satisfied(program) + } +} + +#[test] +fn test_div() { + use std::ops::Div; + + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: Fq = rng.gen(); + let b: Fq = rng.gen(); + let c = a.div(&b); + + let a_string = field_to_decimal_string(a); + let b_string = field_to_decimal_string(b); + let c_string = field_to_decimal_string(c); + + let program_string = include_str!("div.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Field(a_string))), + ("b", Some(InputValue::Field(b_string))), + ("c", Some(InputValue::Field(c_string))), + ]); + program.set_main_input(main_input); + + assert_satisfied(program) + } +} + +#[test] +fn test_mul() { + use std::ops::Mul; + + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: Fq = rng.gen(); + let b: Fq = rng.gen(); + let c = a.mul(&b); + + let a_string = field_to_decimal_string(a); + let b_string = field_to_decimal_string(b); + let c_string = field_to_decimal_string(c); + + let program_string = include_str!("mul.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Field(a_string))), + ("b", Some(InputValue::Field(b_string))), + ("c", Some(InputValue::Field(c_string))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program) + } +} + +#[test] +fn test_eq() { + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: Fq = rng.gen(); + let b: Fq = rng.gen(); + + let a_string = field_to_decimal_string(a); + let b_string = field_to_decimal_string(b); + + // test equal + + let program_string = include_str!("eq.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Field(a_string.clone()))), + ("b", Some(InputValue::Field(a_string.clone()))), + ("c", Some(InputValue::Boolean(true))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test not equal + + let c = a.eq(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Field(a_string))), + ("b", Some(InputValue::Field(b_string))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } +} + +#[test] +fn test_console_assert_pass() { + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: Fq = rng.gen(); + + let a_string = field_to_decimal_string(a); + + let program_string = include_str!("console_assert.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Field(a_string.clone()))), + ("b", Some(InputValue::Field(a_string))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } +} + +#[test] +fn test_console_assert_fail() { + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: Fq = rng.gen(); + let b: Fq = rng.gen(); + + if a == b { + continue; + } + + let a_string = field_to_decimal_string(a); + let b_string = field_to_decimal_string(b); + + let program_string = include_str!("console_assert.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Field(a_string))), + ("b", Some(InputValue::Field(b_string))), + ]); + + program.set_main_input(main_input); + + expect_compiler_error(program); + } +} + +#[test] +fn test_ternary() { + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + let a: Fq = rng.gen(); + let b: Fq = rng.gen(); + + let a_string = field_to_decimal_string(a); + let b_string = field_to_decimal_string(b); + + let program_string = include_str!("ternary.leo"); + let mut program = parse_program(program_string).unwrap(); + + // true -> field a + let main_input = generate_main_input(vec![ + ("s", Some(InputValue::Boolean(true))), + ("a", Some(InputValue::Field(a_string.clone()))), + ("b", Some(InputValue::Field(b_string.clone()))), + ("c", Some(InputValue::Field(a_string.clone()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + let mut program = parse_program(program_string).unwrap(); + + // false -> field b + let main_input = generate_main_input(vec![ + ("s", Some(InputValue::Boolean(false))), + ("a", Some(InputValue::Field(a_string))), + ("b", Some(InputValue::Field(b_string.clone()))), + ("c", Some(InputValue::Field(b_string))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); +} + +// +// pub fn output_one(program: EdwardsTestCompiler) { +// let expected = include_str!("output_/register_one.out"); +// let actual = get_output(program); +// +// assert_eq!(expected, actual.program_string().as_slice()); +// } +// +// pub fn output_zero(program: EdwardsTestCompiler) { +// let expected = include_str!("output_/register_zero.out"); +// let actual = get_output(program); +// +// assert_eq!(expected, actual.program_string().as_slice()); +// } +// +// #[test] +// fn test_registers() { +// let program_bytes = include_str!("output_register.leo"); +// let one_input_bytes = include_str!("input/register_one.in"); +// let zero_input_bytes = include_str!("input/register_zero.in"); +// +// // test 1field input register => 1field output register +// let program = parse_program_with_input(program_bytes, one_input_bytes).unwrap(); +// +// output_one(program); +// +// // test 0field input register => 0field output register +// let program = parse_program_with_input(program_bytes, zero_input_bytes).unwrap(); +// +// output_zero(program); +// } diff --git a/tests/compiler/field/mul.leo b/tests/compiler/field/mul.leo new file mode 100644 index 0000000000..7df7c83830 --- /dev/null +++ b/tests/compiler/field/mul.leo @@ -0,0 +1,3 @@ +function main(a: field, b: field, c: field) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/field/negate.leo b/tests/compiler/field/negate.leo new file mode 100644 index 0000000000..94c730207a --- /dev/null +++ b/tests/compiler/field/negate.leo @@ -0,0 +1,3 @@ +function main(a: field, b: field) { + console.assert(-a == b); +} \ No newline at end of file diff --git a/tests/compiler/field/no_space_between_literal.leo b/tests/compiler/field/no_space_between_literal.leo new file mode 100644 index 0000000000..9ac9dcd5db --- /dev/null +++ b/tests/compiler/field/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const f = 1 field; +} \ No newline at end of file diff --git a/tests/compiler/field/output/register_one.out b/tests/compiler/field/output/register_one.out new file mode 100644 index 0000000000..16556c1c51 --- /dev/null +++ b/tests/compiler/field/output/register_one.out @@ -0,0 +1,2 @@ +[registers] +r: field = 1; diff --git a/tests/compiler/field/output/register_zero.out b/tests/compiler/field/output/register_zero.out new file mode 100644 index 0000000000..2ba759ffc8 --- /dev/null +++ b/tests/compiler/field/output/register_zero.out @@ -0,0 +1,2 @@ +[registers] +r: field = 0; diff --git a/tests/compiler/field/output_register.leo b/tests/compiler/field/output_register.leo new file mode 100644 index 0000000000..e27a3947bd --- /dev/null +++ b/tests/compiler/field/output_register.leo @@ -0,0 +1,3 @@ +function main(registers) -> field { + return registers.r; +} \ No newline at end of file diff --git a/tests/compiler/field/sub.leo b/tests/compiler/field/sub.leo new file mode 100644 index 0000000000..2c84b24647 --- /dev/null +++ b/tests/compiler/field/sub.leo @@ -0,0 +1,3 @@ +function main(a: field, b: field, c: field) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/field/ternary.leo b/tests/compiler/field/ternary.leo new file mode 100644 index 0000000000..05cb161b46 --- /dev/null +++ b/tests/compiler/field/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: field, b: field, c: field) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/function/array_input.leo b/tests/compiler/function/array_input.leo new file mode 100644 index 0000000000..899c0e4af6 --- /dev/null +++ b/tests/compiler/function/array_input.leo @@ -0,0 +1,6 @@ +function foo(a: [u8; 1]) {} + +function main() { + const a: [u16; 1] = [1; 1]; + foo(a); +} \ No newline at end of file diff --git a/tests/compiler/function/array_params_direct_call.leo b/tests/compiler/function/array_params_direct_call.leo new file mode 100644 index 0000000000..86762aabc7 --- /dev/null +++ b/tests/compiler/function/array_params_direct_call.leo @@ -0,0 +1,9 @@ +function do_nothing(arr: [u32; 2]) {} + +function main() { + const arr: [u32; 2] = [0; 2]; + + do_nothing(arr); + do_nothing([...arr]); + do_nothing(arr[0u32..]); +} \ No newline at end of file diff --git a/tests/compiler/function/conditional_return.leo b/tests/compiler/function/conditional_return.leo new file mode 100644 index 0000000000..e27dd7aea5 --- /dev/null +++ b/tests/compiler/function/conditional_return.leo @@ -0,0 +1,7 @@ +function main(x: u8) -> u8 { + if x == 2u8 { + return 3u8; + } else { + return 4u8; + } +} \ No newline at end of file diff --git a/tests/compiler/function/duplicate_definition.leo b/tests/compiler/function/duplicate_definition.leo new file mode 100644 index 0000000000..cddc9ce7f2 --- /dev/null +++ b/tests/compiler/function/duplicate_definition.leo @@ -0,0 +1,7 @@ +function main() { + console.log("{}", 1u8); +} + +function main() { + console.log("{}", 2u8); +} \ No newline at end of file diff --git a/tests/compiler/function/empty.leo b/tests/compiler/function/empty.leo new file mode 100644 index 0000000000..f06c976158 --- /dev/null +++ b/tests/compiler/function/empty.leo @@ -0,0 +1,5 @@ +function empty() { } + +function main() { + empty(); +} \ No newline at end of file diff --git a/tests/compiler/function/input/conditional_return.in b/tests/compiler/function/input/conditional_return.in new file mode 100644 index 0000000000..d2d57dc93c --- /dev/null +++ b/tests/compiler/function/input/conditional_return.in @@ -0,0 +1,5 @@ +[main] +x: u8 = 1u8; + +[registers] +x: u8 = 0; diff --git a/tests/compiler/function/input/newlines.in b/tests/compiler/function/input/newlines.in new file mode 100644 index 0000000000..fbd23658c0 --- /dev/null +++ b/tests/compiler/function/input/newlines.in @@ -0,0 +1,7 @@ +[main] +a: u32 = 0; +b: u32 = 0; + +[registers] +a: u32 = 0; +b: u32 = 0; \ No newline at end of file diff --git a/tests/compiler/function/input/registers.in b/tests/compiler/function/input/registers.in new file mode 100644 index 0000000000..306191c516 --- /dev/null +++ b/tests/compiler/function/input/registers.in @@ -0,0 +1,3 @@ +[registers] +a: bool = true; +b: bool = false; diff --git a/tests/compiler/function/iteration.leo b/tests/compiler/function/iteration.leo new file mode 100644 index 0000000000..9be86b5a7c --- /dev/null +++ b/tests/compiler/function/iteration.leo @@ -0,0 +1,13 @@ +function one() -> u32 { + return 1u32; +} + +function main() { + let a = 0u32; + + for i in 0..10 { + a += one(); + } + + console.assert(a == 10u32); +} \ No newline at end of file diff --git a/tests/compiler/function/iteration_repeated.leo b/tests/compiler/function/iteration_repeated.leo new file mode 100644 index 0000000000..ef4f992d96 --- /dev/null +++ b/tests/compiler/function/iteration_repeated.leo @@ -0,0 +1,15 @@ +function iteration() -> u32 { + let a = 0u32; + + for i in 0..10 { + a += 1; + } + + return a; +} + +function main() { + const total = iteration() + iteration(); + + console.assert(total == 20); +} \ No newline at end of file diff --git a/tests/compiler/function/mod.rs b/tests/compiler/function/mod.rs new file mode 100644 index 0000000000..8dfb865d90 --- /dev/null +++ b/tests/compiler/function/mod.rs @@ -0,0 +1,221 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, expect_asg_error, get_output, parse_program, parse_program_with_input}; + +#[test] +fn test_conditional_return() { + let input_string = include_str!("input/conditional_return.in"); + let program_string = include_str!("conditional_return.leo"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + let expected_string = include_str!("output/conditional_return.out"); + let actual_bytes = get_output(program); + let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); + + assert_eq!(expected_string, actual_string); +} + +#[test] +fn test_empty() { + let program_string = include_str!("empty.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_iteration() { + let program_string = include_str!("iteration.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_iteration_repeated() { + let program_string = include_str!("iteration_repeated.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_newlines() { + let input_string = include_str!("input/newlines.in"); + let program_string = include_str!("newlines.leo"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + + let expected_string = include_str!("output/newlines.out"); + let actual_bytes = get_output(program); + let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); + + assert_eq!(expected_string, actual_string); +} + +#[test] +fn test_multiple_returns() { + let program_string = include_str!("multiple_returns.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_multiple_returns_fail() { + let program_string = include_str!("multiple_returns_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_multiple_returns_fail_conditional() { + let program_string = include_str!("multiple_returns_fail_conditional.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_multiple_returns_main() { + let program_string = include_str!("multiple_returns_main.leo"); + let input_string = include_str!("input/registers.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + let expected_string = include_str!("output/registers.out"); + let actual_bytes = get_output(program); + let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); + + assert_eq!(expected_string, actual_string); +} + +#[test] +fn test_repeated_function_call() { + let program_string = include_str!("repeated.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_return() { + let program_string = include_str!("return.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_scope_fail() { + let program_string = include_str!("scope_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_undefined() { + let program_string = include_str!("undefined.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_value_unchanged() { + let program_string = include_str!("value_unchanged.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_array_input() { + let program_string = include_str!("array_input.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error) +} + +// Test return multidimensional arrays + +#[test] +fn test_return_array_nested_fail() { + let program_string = include_str!("return_array_nested_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_return_array_nested_pass() { + let program_string = include_str!("return_array_nested_pass.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_return_array_tuple_fail() { + let program_string = include_str!("return_array_tuple_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_return_array_tuple_pass() { + let program_string = include_str!("return_array_tuple_pass.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +// Test return tuples + +#[test] +fn test_return_tuple() { + let program_string = include_str!("return_tuple.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_return_tuple_conditional() { + let program_string = include_str!("return_tuple_conditional.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_array_params_direct_call() { + let program_string = include_str!("array_params_direct_call.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_duplicate_function_definition() { + let program_string = include_str!("duplicate_definition.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} diff --git a/tests/compiler/function/multiple_returns.leo b/tests/compiler/function/multiple_returns.leo new file mode 100644 index 0000000000..73797c6ca3 --- /dev/null +++ b/tests/compiler/function/multiple_returns.leo @@ -0,0 +1,10 @@ +function tuple() -> (bool, bool) { + return (true, false); +} + +function main() { + const (a, b) = tuple(); + + console.assert(a == true); + console.assert(b == false); +} \ No newline at end of file diff --git a/tests/compiler/function/multiple_returns_fail.leo b/tests/compiler/function/multiple_returns_fail.leo new file mode 100644 index 0000000000..c4539bb1a0 --- /dev/null +++ b/tests/compiler/function/multiple_returns_fail.leo @@ -0,0 +1,7 @@ +function main () -> i8 { + if true { + return 1i8; //ignored + } + return 2i8; //ignored + return 3i8; //returns +} diff --git a/tests/compiler/function/multiple_returns_fail_conditional.leo b/tests/compiler/function/multiple_returns_fail_conditional.leo new file mode 100644 index 0000000000..ded39534a4 --- /dev/null +++ b/tests/compiler/function/multiple_returns_fail_conditional.leo @@ -0,0 +1,9 @@ +function main () -> u16 { + if false { + const a = 1u16; + const b = a + 1u16; + return b; + } else if false { + return 0u16; + } +} \ No newline at end of file diff --git a/tests/compiler/function/multiple_returns_main.leo b/tests/compiler/function/multiple_returns_main.leo new file mode 100644 index 0000000000..8590cdd71e --- /dev/null +++ b/tests/compiler/function/multiple_returns_main.leo @@ -0,0 +1,3 @@ +function main() -> (bool, bool) { + return (input.registers.a, input.registers.b); +} diff --git a/tests/compiler/function/newlines.leo b/tests/compiler/function/newlines.leo new file mode 100644 index 0000000000..e0b10dead1 --- /dev/null +++ b/tests/compiler/function/newlines.leo @@ -0,0 +1,9 @@ +function main( + a: u32, + b: u32, +) -> ( + u32, + u32, +) { + return (a, b); +} \ No newline at end of file diff --git a/tests/compiler/function/output/conditional_return.out b/tests/compiler/function/output/conditional_return.out new file mode 100644 index 0000000000..29d80c1cfc --- /dev/null +++ b/tests/compiler/function/output/conditional_return.out @@ -0,0 +1,2 @@ +[registers] +x: u8 = 4; diff --git a/tests/compiler/function/output/newlines.out b/tests/compiler/function/output/newlines.out new file mode 100644 index 0000000000..197a64cc63 --- /dev/null +++ b/tests/compiler/function/output/newlines.out @@ -0,0 +1,3 @@ +[registers] +a: u32 = 0; +b: u32 = 0; diff --git a/tests/compiler/function/output/registers.out b/tests/compiler/function/output/registers.out new file mode 100644 index 0000000000..306191c516 --- /dev/null +++ b/tests/compiler/function/output/registers.out @@ -0,0 +1,3 @@ +[registers] +a: bool = true; +b: bool = false; diff --git a/tests/compiler/function/repeated.leo b/tests/compiler/function/repeated.leo new file mode 100644 index 0000000000..2f9bc43d77 --- /dev/null +++ b/tests/compiler/function/repeated.leo @@ -0,0 +1,9 @@ +function one() -> bool { + return true; +} + +function main() { + const a = one() && one(); + + console.assert(a == true); +} \ No newline at end of file diff --git a/tests/compiler/function/return.leo b/tests/compiler/function/return.leo new file mode 100644 index 0000000000..e839700ee3 --- /dev/null +++ b/tests/compiler/function/return.leo @@ -0,0 +1,7 @@ +function one() -> u32 { + return 1u32; +} + +function main() { + console.assert(one() == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/function/return_array_nested_fail.leo b/tests/compiler/function/return_array_nested_fail.leo new file mode 100644 index 0000000000..0db89a09e3 --- /dev/null +++ b/tests/compiler/function/return_array_nested_fail.leo @@ -0,0 +1,7 @@ +function array_3x2_tuple() -> [[u8; 2]; 3] { + return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]` +} + +function main() { + const b = array_3x2_tuple(); +} \ No newline at end of file diff --git a/tests/compiler/function/return_array_nested_pass.leo b/tests/compiler/function/return_array_nested_pass.leo new file mode 100644 index 0000000000..c7586f3f08 --- /dev/null +++ b/tests/compiler/function/return_array_nested_pass.leo @@ -0,0 +1,12 @@ +function array_3x2_nested() -> [[u8; 2]; 3] { + return [[0u8; 2]; 3]; +} + +function array_3x2_tuple() -> [[u8; 2]; 3] { + return [0u8; (3, 2)]; +} + +function main() { + const a = array_3x2_nested(); + const b = array_3x2_tuple(); +} \ No newline at end of file diff --git a/tests/compiler/function/return_array_tuple_fail.leo b/tests/compiler/function/return_array_tuple_fail.leo new file mode 100644 index 0000000000..d2afcd2790 --- /dev/null +++ b/tests/compiler/function/return_array_tuple_fail.leo @@ -0,0 +1,7 @@ +function array_3x2_nested() -> [u8; (3, 2)] { + return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]` +} + +function main() { + const a = array_3x2_nested(); +} \ No newline at end of file diff --git a/tests/compiler/function/return_array_tuple_pass.leo b/tests/compiler/function/return_array_tuple_pass.leo new file mode 100644 index 0000000000..6f5a63e806 --- /dev/null +++ b/tests/compiler/function/return_array_tuple_pass.leo @@ -0,0 +1,12 @@ +function array_3x2_nested() -> [u8; (3, 2)] { + return [[0u8; 2]; 3]; +} + +function array_3x2_tuple() -> [u8; (3, 2)] { + return [0u8; (3, 2)]; +} + +function main() { + const a = array_3x2_nested(); + const b = array_3x2_tuple(); +} \ No newline at end of file diff --git a/tests/compiler/function/return_tuple.leo b/tests/compiler/function/return_tuple.leo new file mode 100644 index 0000000000..24328aeaaa --- /dev/null +++ b/tests/compiler/function/return_tuple.leo @@ -0,0 +1,11 @@ +// Returns a tuple of tuples. +function tuples() -> ((u8, u8), u32) { + const a: (u8, u8) = (1, 2); + const b: u32 = 3; + + return (a, b); +} + +function main() { + const t = tuples(); +} \ No newline at end of file diff --git a/tests/compiler/function/return_tuple_conditional.leo b/tests/compiler/function/return_tuple_conditional.leo new file mode 100644 index 0000000000..b8040d47ec --- /dev/null +++ b/tests/compiler/function/return_tuple_conditional.leo @@ -0,0 +1,15 @@ +// Returns a tuple using a conditional "if" statement. +function tuple_conditional () -> ( + i64, + i64 +) { + if true { + return (1, 1); + } else { + return (2, 2); + } +} + +function main() { + const t = tuple_conditional(); +} \ No newline at end of file diff --git a/tests/compiler/function/scope_fail.leo b/tests/compiler/function/scope_fail.leo new file mode 100644 index 0000000000..693682d297 --- /dev/null +++ b/tests/compiler/function/scope_fail.leo @@ -0,0 +1,8 @@ +function foo() -> field { + return myGlobal; +} + +function main() { + const myGlobal = 42field; + const err = foo(); +} \ No newline at end of file diff --git a/tests/compiler/function/undefined.leo b/tests/compiler/function/undefined.leo new file mode 100644 index 0000000000..e1db3b9f09 --- /dev/null +++ b/tests/compiler/function/undefined.leo @@ -0,0 +1,3 @@ +function main() { + my_function(); +} \ No newline at end of file diff --git a/tests/compiler/function/value_unchanged.leo b/tests/compiler/function/value_unchanged.leo new file mode 100644 index 0000000000..e116736316 --- /dev/null +++ b/tests/compiler/function/value_unchanged.leo @@ -0,0 +1,19 @@ +// Functions input in leo are pass-by-value. +// +// Program execution: +// line 15: variable `a` is defined with value `1`. +// line 16: value `1` is copied and passed into function `bad_mutate()`. +// line 10: variable `x` is defined with value `1`. +// line 11: variable `x` is set to value `0`. +// line 18: program returns the value of `a`. + +function bad_mutate(x: u32) { + x = 0; // <- does not change `a` +} + +function main() { + const a = 1u32; + bad_mutate(a); + + console.assert(a == 1u32); // <- value `a` is still `1u32` +} \ 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..bb84df2d6c --- /dev/null +++ b/tests/compiler/group/add.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..3886a07bbf --- /dev/null +++ b/tests/compiler/group/assert_eq.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..4c93573e1e --- /dev/null +++ b/tests/compiler/group/both_sign_high.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..0bbd360ba0 --- /dev/null +++ b/tests/compiler/group/both_sign_inferred.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..1cb4f46c55 --- /dev/null +++ b/tests/compiler/group/both_sign_low.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..89701d9c99 --- /dev/null +++ b/tests/compiler/group/eq.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..3886a07bbf --- /dev/null +++ b/tests/compiler/group/input.leo @@ -0,0 +1,3 @@ +function main(a: group, b: group) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/group/input/invalid.in b/tests/compiler/group/input/invalid.in new file mode 100644 index 0000000000..d55c096738 --- /dev/null +++ b/tests/compiler/group/input/invalid.in @@ -0,0 +1,3 @@ +[main] +a: group = (1, 0)group; +b: group = (+, +)group; diff --git a/tests/compiler/group/input/point.in b/tests/compiler/group/input/point.in new file mode 100644 index 0000000000..9d49d9d847 --- /dev/null +++ b/tests/compiler/group/input/point.in @@ -0,0 +1,2 @@ +[main] +a: group = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group; \ No newline at end of file diff --git a/tests/compiler/group/input/valid.in b/tests/compiler/group/input/valid.in new file mode 100644 index 0000000000..651a28bea6 --- /dev/null +++ b/tests/compiler/group/input/valid.in @@ -0,0 +1,3 @@ +[main] +a: group = (0, -)group; +b: group = (0, _)group; diff --git a/tests/compiler/group/mod.rs b/tests/compiler/group/mod.rs new file mode 100644 index 0000000000..f4cf84448c --- /dev/null +++ b/tests/compiler/group/mod.rs @@ -0,0 +1,407 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, expect_compiler_error, expect_synthesis_error, field::field_to_decimal_string, + generate_main_input, parse_program, parse_program_with_input, +}; +use leo_ast::{GroupCoordinate, GroupTuple, GroupValue, InputValue, Span}; + +use snarkvm_curves::edwards_bls12::EdwardsAffine; + +use rand::{Rng, SeedableRng}; +use rand_xorshift::XorShiftRng; + +pub fn group_element_to_input_value(g: EdwardsAffine) -> GroupValue { + let x = field_to_decimal_string(g.x); + let y = field_to_decimal_string(g.y); + + format!("({}, {})", x, y); + + let fake_span = Span { + text: "".to_string(), + line: 0, + start: 0, + end: 0, + }; + + GroupValue::Tuple(GroupTuple { + x: GroupCoordinate::Number(x, fake_span), + y: GroupCoordinate::Number(y, fake_span), + span: fake_span, + }) +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let mut program = parse_program(program_string).unwrap(); + + expect_compiler_error(program) +} + +#[test] +fn test_one() { + let program_string = include_str!("one.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_zero() { + let program_string = include_str!("zero.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_point() { + let program_string = include_str!("point.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_x_sign_high() { + let program_string = include_str!("x_sign_high.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_x_sign_low() { + let program_string = include_str!("x_sign_low.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_x_sign_inferred() { + let program_string = include_str!("x_sign_inferred.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_y_sign_high() { + let program_string = include_str!("y_sign_high.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_y_sign_low() { + let program_string = include_str!("y_sign_low.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_y_sign_inferred() { + let program_string = include_str!("y_sign_inferred.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_both_sign_high() { + let program_string = include_str!("both_sign_high.leo"); + + let program = parse_program(program_string).unwrap(); + + expect_compiler_error(program); +} + +#[test] +fn test_both_sign_low() { + let program_string = include_str!("both_sign_low.leo"); + + let program = parse_program(program_string).unwrap(); + + expect_compiler_error(program); +} + +#[test] +fn test_both_sign_inferred() { + let program_string = include_str!("both_sign_inferred.leo"); + + let program = parse_program(program_string).unwrap(); + + expect_compiler_error(program); +} + +#[test] +fn test_point_input() { + let program_string = include_str!("point_input.leo"); + let input_bytes = include_str!("input/point.in"); + + let program = parse_program_with_input(program_string, input_bytes).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input() { + let program_string = include_str!("input.leo"); + let input_string_pass = include_str!("input/valid.in"); + let input_string_fail = include_str!("input/invalid.in"); + + let program = parse_program_with_input(program_string, input_string_pass).unwrap(); + + assert_satisfied(program); + + let program = parse_program_with_input(program_string, input_string_fail).unwrap(); + + expect_compiler_error(program); +} + +#[test] +fn test_negate() { + use std::ops::Neg; + + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: EdwardsAffine = rng.gen(); + let b = a.neg(); + + let a_element = group_element_to_input_value(a); + let b_element = group_element_to_input_value(b); + + let program_string = include_str!("negate.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Group(a_element))), + ("b", Some(InputValue::Group(b_element))), + ]); + program.set_main_input(main_input); + + assert_satisfied(program) + } +} + +#[test] +fn test_add() { + use std::ops::Add; + + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: EdwardsAffine = rng.gen(); + let b: EdwardsAffine = rng.gen(); + let c = a.add(&b); + + let a_element = group_element_to_input_value(a); + let b_element = group_element_to_input_value(b); + let c_element = group_element_to_input_value(c); + + let program_string = include_str!("add.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Group(a_element))), + ("b", Some(InputValue::Group(b_element))), + ("c", Some(InputValue::Group(c_element))), + ]); + program.set_main_input(main_input); + + assert_satisfied(program) + } +} + +#[test] +fn test_sub() { + use std::ops::Sub; + + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: EdwardsAffine = rng.gen(); + let b: EdwardsAffine = rng.gen(); + let c = a.sub(&b); + + let a_element = group_element_to_input_value(a); + let b_element = group_element_to_input_value(b); + let c_element = group_element_to_input_value(c); + + let program_string = include_str!("sub.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Group(a_element))), + ("b", Some(InputValue::Group(b_element))), + ("c", Some(InputValue::Group(c_element))), + ]); + program.set_main_input(main_input); + + assert_satisfied(program) + } +} + +#[test] +fn test_console_assert_pass() { + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: EdwardsAffine = rng.gen(); + + let a_element = group_element_to_input_value(a); + + let program_string = include_str!("assert_eq.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Group(a_element.clone()))), + ("b", Some(InputValue::Group(a_element))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } +} + +#[test] +fn test_console_assert_fail() { + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: EdwardsAffine = rng.gen(); + let b: EdwardsAffine = rng.gen(); + + if a == b { + continue; + } + + let a_element = group_element_to_input_value(a); + let b_element = group_element_to_input_value(b); + + let program_string = include_str!("assert_eq.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Group(a_element))), + ("b", Some(InputValue::Group(b_element))), + ]); + + program.set_main_input(main_input); + + expect_compiler_error(program); + } +} + +#[test] +fn test_eq() { + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + for _ in 0..10 { + let a: EdwardsAffine = rng.gen(); + let b: EdwardsAffine = rng.gen(); + + let a_element = group_element_to_input_value(a); + let b_element = group_element_to_input_value(b); + + // test equal + + let program_string = include_str!("eq.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Group(a_element.clone()))), + ("b", Some(InputValue::Group(a_element.clone()))), + ("c", Some(InputValue::Boolean(true))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test not equal + + let c = a.eq(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Group(a_element))), + ("b", Some(InputValue::Group(b_element))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } +} + +#[test] +fn test_ternary() { + let mut rng = XorShiftRng::seed_from_u64(1231275789u64); + + let a: EdwardsAffine = rng.gen(); + let b: EdwardsAffine = rng.gen(); + + let a_element = group_element_to_input_value(a); + let b_element = group_element_to_input_value(b); + + let program_string = include_str!("ternary.leo"); + let mut program = parse_program(program_string).unwrap(); + + // true -> field a + let main_input = generate_main_input(vec![ + ("s", Some(InputValue::Boolean(true))), + ("a", Some(InputValue::Group(a_element.clone()))), + ("b", Some(InputValue::Group(b_element.clone()))), + ("c", Some(InputValue::Group(a_element.clone()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + let mut program = parse_program(program_string).unwrap(); + + // false -> field b + let main_input = generate_main_input(vec![ + ("s", Some(InputValue::Boolean(false))), + ("a", Some(InputValue::Group(a_element))), + ("b", Some(InputValue::Group(b_element.clone()))), + ("c", Some(InputValue::Group(b_element))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); +} + +#[test] +fn test_positive_and_negative() { + let program_string = include_str!("positive_and_negative.leo"); + + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} diff --git a/tests/compiler/group/negate.leo b/tests/compiler/group/negate.leo new file mode 100644 index 0000000000..506d8d73ce --- /dev/null +++ b/tests/compiler/group/negate.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..af53e5dffe --- /dev/null +++ b/tests/compiler/group/no_space_between_literal.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..510110150b --- /dev/null +++ b/tests/compiler/group/one.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..5e68415a0d --- /dev/null +++ b/tests/compiler/group/point.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..a3a8e63bd3 --- /dev/null +++ b/tests/compiler/group/point_input.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..5d29e36ef2 --- /dev/null +++ b/tests/compiler/group/positive_and_negative.leo @@ -0,0 +1,10 @@ +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 new file mode 100644 index 0000000000..dfe82d8e31 --- /dev/null +++ b/tests/compiler/group/sub.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..97fba1f5b6 --- /dev/null +++ b/tests/compiler/group/ternary.leo @@ -0,0 +1,5 @@ +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_and_y.leo b/tests/compiler/group/x_and_y.leo new file mode 100644 index 0000000000..a350a7ad6b --- /dev/null +++ b/tests/compiler/group/x_and_y.leo @@ -0,0 +1,3 @@ +function main(element: group) { + const b = element; +} \ No newline at end of file diff --git a/tests/compiler/group/x_sign_high.leo b/tests/compiler/group/x_sign_high.leo new file mode 100644 index 0000000000..f38b54ad9a --- /dev/null +++ b/tests/compiler/group/x_sign_high.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..02c5ac988b --- /dev/null +++ b/tests/compiler/group/x_sign_inferred.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..ad74d18b64 --- /dev/null +++ b/tests/compiler/group/x_sign_low.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..af2a20149d --- /dev/null +++ b/tests/compiler/group/y_sign_high.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..a4efa6a982 --- /dev/null +++ b/tests/compiler/group/y_sign_inferred.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..f557ed0d35 --- /dev/null +++ b/tests/compiler/group/y_sign_low.leo @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..6cdd4c960e --- /dev/null +++ b/tests/compiler/group/zero.leo @@ -0,0 +1,3 @@ +function main() { + const element = 0group; +} \ No newline at end of file diff --git a/tests/compiler/import/alias.leo b/tests/compiler/import/alias.leo new file mode 100644 index 0000000000..f153b5a128 --- /dev/null +++ b/tests/compiler/import/alias.leo @@ -0,0 +1,5 @@ +import test-import.foo as bar; + +function main() { + console.assert(bar() == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/import/basic.leo b/tests/compiler/import/basic.leo new file mode 100644 index 0000000000..53d243efaa --- /dev/null +++ b/tests/compiler/import/basic.leo @@ -0,0 +1,5 @@ +import test-import.foo; + +function main() { + console.assert(foo() == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/import/imports/bar/.gitignore b/tests/compiler/import/imports/bar/.gitignore new file mode 100755 index 0000000000..ea1472ec1f --- /dev/null +++ b/tests/compiler/import/imports/bar/.gitignore @@ -0,0 +1 @@ +output/ diff --git a/tests/compiler/import/imports/bar/Leo.toml b/tests/compiler/import/imports/bar/Leo.toml new file mode 100755 index 0000000000..8e22d51a95 --- /dev/null +++ b/tests/compiler/import/imports/bar/Leo.toml @@ -0,0 +1,3 @@ +[package] +name = "bar" +version = "0.1.0" diff --git a/tests/compiler/import/imports/bar/src/bat/bat.leo b/tests/compiler/import/imports/bar/src/bat/bat.leo new file mode 100755 index 0000000000..a7d2fc83d4 --- /dev/null +++ b/tests/compiler/import/imports/bar/src/bat/bat.leo @@ -0,0 +1,3 @@ +circuit Bat { + t: u32 +} \ No newline at end of file diff --git a/tests/compiler/import/imports/bar/src/baz.leo b/tests/compiler/import/imports/bar/src/baz.leo new file mode 100755 index 0000000000..1bb268a84c --- /dev/null +++ b/tests/compiler/import/imports/bar/src/baz.leo @@ -0,0 +1,7 @@ +circuit Baz { + z: u32 +} + +circuit Bazzar { + a: u32 +} \ No newline at end of file diff --git a/tests/compiler/import/imports/bar/src/lib.leo b/tests/compiler/import/imports/bar/src/lib.leo new file mode 100755 index 0000000000..c169f5935e --- /dev/null +++ b/tests/compiler/import/imports/bar/src/lib.leo @@ -0,0 +1,3 @@ +circuit Bar { + r: u32 +} \ No newline at end of file diff --git a/tests/compiler/import/imports/car/.gitignore b/tests/compiler/import/imports/car/.gitignore new file mode 100755 index 0000000000..ea1472ec1f --- /dev/null +++ b/tests/compiler/import/imports/car/.gitignore @@ -0,0 +1 @@ +output/ diff --git a/tests/compiler/import/imports/car/Leo.toml b/tests/compiler/import/imports/car/Leo.toml new file mode 100755 index 0000000000..15b76f1d76 --- /dev/null +++ b/tests/compiler/import/imports/car/Leo.toml @@ -0,0 +1,3 @@ +[package] +name = "car" +version = "0.1.0" diff --git a/tests/compiler/import/imports/car/src/lib.leo b/tests/compiler/import/imports/car/src/lib.leo new file mode 100755 index 0000000000..b1e037fd38 --- /dev/null +++ b/tests/compiler/import/imports/car/src/lib.leo @@ -0,0 +1,3 @@ +circuit Car { + c: u32 +} \ No newline at end of file diff --git a/tests/compiler/import/many_import.leo b/tests/compiler/import/many_import.leo new file mode 100644 index 0000000000..08ae494c4f --- /dev/null +++ b/tests/compiler/import/many_import.leo @@ -0,0 +1,26 @@ +import test-import.( // local import + Point, + foo, +); + +import bar.( // imports directory import + Bar, + baz.(Baz, Bazzar), + bat.bat.Bat, +); + +import car.Car; // imports directory import + +function main() { + const point = Point { x: 1u32, y: 1u32 }; + const foo = foo(); + + const bar = Bar { r: 1u32 }; + const baz = Baz { z: 1u32 }; + const bazzar = Bazzar { a: 1u32 }; + const bat = Bat { t: 1u32 }; + + const car = Car { c: 1u32 }; + + console.assert(car.c == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/import/many_import_star.leo b/tests/compiler/import/many_import_star.leo new file mode 100644 index 0000000000..575487a929 --- /dev/null +++ b/tests/compiler/import/many_import_star.leo @@ -0,0 +1,19 @@ +import test-import.*; // local import + +import bar.*; // imports directory import +import bar.baz.*; // imports directory import +import bar.bat.bat.*; // imports directory import +import car.*; // imports directory import + +function main() { + const point = Point { x: 1u32, y: 1u32 }; + const foo = foo(); + + const bar = Bar { r: 1u32 }; + const bat = Bat { t: 1u32 }; + const baz = Baz { z: 1u32 }; + + const car = Car { c: 1u32 }; + + console.assert(car.c == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/import/mod.rs b/tests/compiler/import/mod.rs new file mode 100644 index 0000000000..1a3440b577 --- /dev/null +++ b/tests/compiler/import/mod.rs @@ -0,0 +1,154 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, parse_program}; + +use std::env::{current_dir, set_current_dir}; + +static TEST_SOURCE_DIRECTORY: &str = "tests/import"; + +// Import tests rely on knowledge of local directories. They should be run locally only. + +pub fn set_local_dir() { + let mut local = current_dir().unwrap(); + local.push(TEST_SOURCE_DIRECTORY); + + set_current_dir(local).unwrap(); +} + +#[test] +#[ignore] +fn test_basic() { + set_local_dir(); + + let program_string = include_str!("basic.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +#[ignore] +fn test_multiple() { + set_local_dir(); + + let program_string = include_str!("multiple.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +#[ignore] +fn test_star() { + set_local_dir(); + + let program_string = include_str!("star.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +#[ignore] +fn test_star_fail() { + set_local_dir(); + + let program_string = include_str!("star_fail.leo"); + assert!(parse_program(program_string).is_err()); +} + +#[test] +#[ignore] +fn test_alias() { + set_local_dir(); + + let program_string = include_str!("alias.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +// naming tests +#[test] +#[ignore] +fn test_names_pass() { + set_local_dir(); + + let program_string = include_str!("names.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +#[ignore] +fn test_names_fail_1() { + set_local_dir(); + + let program_string = include_str!("names_dash_a.leo"); + assert!(parse_program(program_string).is_err()); +} + +#[test] +#[ignore] +fn test_names_fail_2() { + set_local_dir(); + + let program_string = include_str!("names_a_dash.leo"); + assert!(parse_program(program_string).is_err()); +} + +#[test] +#[ignore] +fn test_names_fail_3() { + set_local_dir(); + + let program_string = include_str!("names_underscore.leo"); + assert!(parse_program(program_string).is_err()); +} + +#[test] +#[ignore] +fn test_names_fail_4() { + set_local_dir(); + + let program_string = include_str!("names_dollar.leo"); + assert!(parse_program(program_string).is_err()); +} + +// more complex tests +#[test] +#[ignore] +fn test_many_import() { + set_local_dir(); + + let program_string = include_str!("many_import.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +#[ignore] +fn test_many_import_star() { + set_local_dir(); + + let program_string = include_str!("many_import_star.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} diff --git a/tests/compiler/import/multiple.leo b/tests/compiler/import/multiple.leo new file mode 100644 index 0000000000..4bd181c02d --- /dev/null +++ b/tests/compiler/import/multiple.leo @@ -0,0 +1,10 @@ +import test-import.( + Point, + foo +); + +function main() { + const a = Point { x: 1u32, y: 0u32 }; + + console.assert(a.x == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/import/names.leo b/tests/compiler/import/names.leo new file mode 100644 index 0000000000..d3ce50829a --- /dev/null +++ b/tests/compiler/import/names.leo @@ -0,0 +1,5 @@ +import a0-f.foo; +import a-9.bar; +import hello-world.hello; + +function main() {} \ No newline at end of file diff --git a/tests/compiler/import/names_a_dash.leo b/tests/compiler/import/names_a_dash.leo new file mode 100644 index 0000000000..ec136176b2 --- /dev/null +++ b/tests/compiler/import/names_a_dash.leo @@ -0,0 +1,3 @@ +import a-.foo; + +function main() {} \ No newline at end of file diff --git a/tests/compiler/import/names_dash_a.leo b/tests/compiler/import/names_dash_a.leo new file mode 100644 index 0000000000..95ccb7e4a5 --- /dev/null +++ b/tests/compiler/import/names_dash_a.leo @@ -0,0 +1,3 @@ +import -a.foo; + +function main() {} \ No newline at end of file diff --git a/tests/compiler/import/names_dollar.leo b/tests/compiler/import/names_dollar.leo new file mode 100644 index 0000000000..e4eaec3719 --- /dev/null +++ b/tests/compiler/import/names_dollar.leo @@ -0,0 +1,3 @@ +import money$.foo; + +function main() {} \ No newline at end of file diff --git a/tests/compiler/import/names_underscore.leo b/tests/compiler/import/names_underscore.leo new file mode 100644 index 0000000000..c5822ebadd --- /dev/null +++ b/tests/compiler/import/names_underscore.leo @@ -0,0 +1,3 @@ +import hello_world.foo; + +function main() {} \ No newline at end of file diff --git a/tests/compiler/import/src/a-9.leo b/tests/compiler/import/src/a-9.leo new file mode 100644 index 0000000000..8cd9f87f14 --- /dev/null +++ b/tests/compiler/import/src/a-9.leo @@ -0,0 +1 @@ +function bar() {} \ No newline at end of file diff --git a/tests/compiler/import/src/a0-f.leo b/tests/compiler/import/src/a0-f.leo new file mode 100644 index 0000000000..c99ad3b713 --- /dev/null +++ b/tests/compiler/import/src/a0-f.leo @@ -0,0 +1 @@ +function foo() {} \ No newline at end of file diff --git a/tests/compiler/import/src/hello-world.leo b/tests/compiler/import/src/hello-world.leo new file mode 100644 index 0000000000..2d96e74c4c --- /dev/null +++ b/tests/compiler/import/src/hello-world.leo @@ -0,0 +1 @@ +function hello() {} \ No newline at end of file diff --git a/tests/compiler/import/src/test-import.leo b/tests/compiler/import/src/test-import.leo new file mode 100644 index 0000000000..9a57d433f4 --- /dev/null +++ b/tests/compiler/import/src/test-import.leo @@ -0,0 +1,8 @@ +circuit Point { + x: u32 + y: u32 +} + +function foo() -> u32 { + return 1u32; +} \ No newline at end of file diff --git a/tests/compiler/import/star.leo b/tests/compiler/import/star.leo new file mode 100644 index 0000000000..69d0791627 --- /dev/null +++ b/tests/compiler/import/star.leo @@ -0,0 +1,7 @@ +import test-import.*; + +function main() { + const a = Point { x: 1u32, y: 0u32 }; + + console.assert(foo() == 1u32); +} \ No newline at end of file diff --git a/tests/compiler/import/star_fail.leo b/tests/compiler/import/star_fail.leo new file mode 100644 index 0000000000..47f2efeda7 --- /dev/null +++ b/tests/compiler/import/star_fail.leo @@ -0,0 +1,4 @@ +// importing `*` from a directory is illegal +import bar.bat.*; + +function main() {} \ No newline at end of file diff --git a/tests/compiler/input_files/mod.rs b/tests/compiler/input_files/mod.rs new file mode 100644 index 0000000000..af220752b8 --- /dev/null +++ b/tests/compiler/input_files/mod.rs @@ -0,0 +1,21 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +mod program_input; +mod program_input_and_program_state; +mod program_input_constants; +mod program_registers; +mod program_state; diff --git a/tests/compiler/input_files/program_input/input/main.in b/tests/compiler/input_files/program_input/input/main.in new file mode 100644 index 0000000000..16ba5231af --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main.in @@ -0,0 +1,2 @@ +[main] +a: bool = true; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/input/main_array.in b/tests/compiler/input_files/program_input/input/main_array.in new file mode 100644 index 0000000000..34db280b2e --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_array.in @@ -0,0 +1,2 @@ +[main] +x: [i16; 1] = [0i16; 1]; diff --git a/tests/compiler/input_files/program_input/input/main_array_fail.in b/tests/compiler/input_files/program_input/input/main_array_fail.in new file mode 100644 index 0000000000..efdc161ee4 --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_array_fail.in @@ -0,0 +1,2 @@ +[main] +x: [i16; 1] = [0i16; 1]; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/input/main_fail_name.in b/tests/compiler/input_files/program_input/input/main_fail_name.in new file mode 100644 index 0000000000..411529499c --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_fail_name.in @@ -0,0 +1,2 @@ +[main] +bad_name: bool = true; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/input/main_fail_type.in b/tests/compiler/input_files/program_input/input/main_fail_type.in new file mode 100644 index 0000000000..a5cf30c8cc --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_fail_type.in @@ -0,0 +1,2 @@ +[main] +a: u8 = 1; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/input/main_field.in b/tests/compiler/input_files/program_input/input/main_field.in new file mode 100644 index 0000000000..fe9eebbd56 --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_field.in @@ -0,0 +1,3 @@ +[main] +a: field = 1; +b: field = -1; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/input/main_group.in b/tests/compiler/input_files/program_input/input/main_group.in new file mode 100644 index 0000000000..2a7aecd0ad --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_group.in @@ -0,0 +1,4 @@ +[main] +a: group = 1group; +b: group = -1group; +c: group = (0, -1)group; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/input/main_multi_dimension_array.in b/tests/compiler/input_files/program_input/input/main_multi_dimension_array.in new file mode 100644 index 0000000000..e62ec2f232 --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_multi_dimension_array.in @@ -0,0 +1,2 @@ +[main] +x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/input/main_multiple.in b/tests/compiler/input_files/program_input/input/main_multiple.in new file mode 100644 index 0000000000..546c971bf8 --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_multiple.in @@ -0,0 +1,3 @@ +[main] +a: bool = true; +b: bool = false; diff --git a/tests/compiler/input_files/program_input/input/main_tuple_fail.in b/tests/compiler/input_files/program_input/input/main_tuple_fail.in new file mode 100644 index 0000000000..aada924c29 --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_tuple_fail.in @@ -0,0 +1,2 @@ +[main] +x: (u8, bool) = (10, true); // wrong size here; main expects (u8, bool, u8) \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/main.leo b/tests/compiler/input_files/program_input/main.leo new file mode 100644 index 0000000000..ba6be77256 --- /dev/null +++ b/tests/compiler/input_files/program_input/main.leo @@ -0,0 +1,3 @@ +function main(a: bool) { + console.assert(a == true); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/main_array.leo b/tests/compiler/input_files/program_input/main_array.leo new file mode 100644 index 0000000000..dd7f265457 --- /dev/null +++ b/tests/compiler/input_files/program_input/main_array.leo @@ -0,0 +1,4 @@ +function main (x: [i16; 1]) { + console.log("{}", x); + console.assert(x[0] == 0); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/main_array_fail.leo b/tests/compiler/input_files/program_input/main_array_fail.leo new file mode 100644 index 0000000000..d8c6f301d8 --- /dev/null +++ b/tests/compiler/input_files/program_input/main_array_fail.leo @@ -0,0 +1,3 @@ +function main(x: [i16; 2]){ + console.log("x: {}", x); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/main_field.leo b/tests/compiler/input_files/program_input/main_field.leo new file mode 100644 index 0000000000..19bf456ee7 --- /dev/null +++ b/tests/compiler/input_files/program_input/main_field.leo @@ -0,0 +1,5 @@ +function main(a: field, b: field) { + // Change to assert when == is implemented for field. + console.log("a: {}", a); + console.log("b: {}", b); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/main_group.leo b/tests/compiler/input_files/program_input/main_group.leo new file mode 100644 index 0000000000..b7795ac7e7 --- /dev/null +++ b/tests/compiler/input_files/program_input/main_group.leo @@ -0,0 +1,6 @@ +function main(a: group, b: group, c: group) { + // Change to assert when == is implemented for group. + console.log("a: {}", a); + console.log("b: {}", b); + console.log("c: {}", c); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/main_multi_dimension_array.leo b/tests/compiler/input_files/program_input/main_multi_dimension_array.leo new file mode 100644 index 0000000000..7c89cc1082 --- /dev/null +++ b/tests/compiler/input_files/program_input/main_multi_dimension_array.leo @@ -0,0 +1,9 @@ +function main(x: [i16; (2, 2, 3)]){ + console.log("x: {}", x); + + const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; + console.log("y: {}", y); + + console.assert(x[0][0][0] == y[0][0][0]); + console.assert(x[1][1][2] == y[1][1][2]); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/main_multiple.leo b/tests/compiler/input_files/program_input/main_multiple.leo new file mode 100644 index 0000000000..eb5ef8d1f6 --- /dev/null +++ b/tests/compiler/input_files/program_input/main_multiple.leo @@ -0,0 +1,4 @@ +function main(a: bool, b: bool) { + console.assert(a == true); + console.assert(b == false); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/main_tuple_fail.leo b/tests/compiler/input_files/program_input/main_tuple_fail.leo new file mode 100644 index 0000000000..7874773eff --- /dev/null +++ b/tests/compiler/input_files/program_input/main_tuple_fail.leo @@ -0,0 +1,3 @@ +function main(x: (u8, bool, u8)) { + console.log("x: {}", x); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input/mod.rs b/tests/compiler/input_files/program_input/mod.rs new file mode 100644 index 0000000000..9fa79b9790 --- /dev/null +++ b/tests/compiler/input_files/program_input/mod.rs @@ -0,0 +1,125 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, expect_compiler_error, parse_program_with_input, EdwardsTestCompiler}; +use leo_compiler::errors::CompilerError; + +fn expect_fail(program: EdwardsTestCompiler) { + match expect_compiler_error(program) { + CompilerError::FunctionError(_) => {} + err => panic!("expected input parser error, got {:?}", err), + } +} + +#[test] +fn test_input_pass() { + let program_string = include_str!("main.leo"); + let input_string = include_str!("input/main.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_array_fail() { + let program_string = include_str!("main_array.leo"); + let input_string = include_str!("input/main_array.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_multi_dimension_array() { + let program_string = include_str!("main_multi_dimension_array.leo"); + let input_string = include_str!("input/main_multi_dimension_array.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_fail_name() { + let program_string = include_str!("main.leo"); + let input_string = include_str!("input/main_fail_name.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_input_fail_type() { + let program_string = include_str!("main.leo"); + let input_string = include_str!("input/main_fail_type.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_input_multiple() { + let program_string = include_str!("main_multiple.leo"); + let input_string = include_str!("input/main_multiple.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_array_dimensions_mismatch() { + let program_string = include_str!("main_array_fail.leo"); + let input_string = include_str!("input/main_array_fail.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_tuple_size_mismatch() { + let program_string = include_str!("main_tuple_fail.leo"); + let input_string = include_str!("input/main_tuple_fail.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_field_input() { + let program_string = include_str!("main_field.leo"); + let input_string = include_str!("input/main_field.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_group_input() { + let program_string = include_str!("main_group.leo"); + let input_string = include_str!("input/main_group.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} diff --git a/tests/compiler/input_files/program_input_and_program_state/access.leo b/tests/compiler/input_files/program_input_and_program_state/access.leo new file mode 100644 index 0000000000..819f6c6c1e --- /dev/null +++ b/tests/compiler/input_files/program_input_and_program_state/access.leo @@ -0,0 +1,11 @@ +function main(data: [u8; 32]) { + console.assert(input.registers.value_balance == 0u64); + + console.assert(input.state.leaf_index == 0u32); + + console.assert(input.record.value == 5u64); + + console.assert(input.state_leaf.network_id == 0u8); + + console.assert(data == [0u8; 32]); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_and_program_state/input/basic.in b/tests/compiler/input_files/program_input_and_program_state/input/basic.in new file mode 100644 index 0000000000..b62eee0443 --- /dev/null +++ b/tests/compiler/input_files/program_input_and_program_state/input/basic.in @@ -0,0 +1,5 @@ +[main] +a: bool = true; + +[registers] +b: bool = true; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_and_program_state/input/basic.state b/tests/compiler/input_files/program_input_and_program_state/input/basic.state new file mode 100644 index 0000000000..78706190fe --- /dev/null +++ b/tests/compiler/input_files/program_input_and_program_state/input/basic.state @@ -0,0 +1,12 @@ +[[public]] + +[state] +a: bool = true; + +[[private]] + +[record] +a: bool = true; + +[state_leaf] +a: bool = true; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in b/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in new file mode 100644 index 0000000000..0d4ece3b1c --- /dev/null +++ b/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in @@ -0,0 +1,6 @@ +[main] +data: [u8; 32] = [0u8; 32]; + +[registers] +token_id: [u8; 32] = [0u8; 32]; +value_balance: u64 = 0; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state b/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state new file mode 100644 index 0000000000..219fc44776 --- /dev/null +++ b/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state @@ -0,0 +1,24 @@ +[[public]] + +[state] +leaf_index: u32 = 0; +root: [u8; 32] = [0u8; 32]; + +[[private]] + +[record] +serial_number: [u8; 32] = [0u8; 32]; +commitment: [u8; 32] = [0u8; 32]; +owner: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; +value: u64 = 5; +payload: [u8; 32] = [0u8; 32]; +birth_program_id: [u8; 32] = [0u8; 32]; +death_program_id: [u8; 32] = [0u8; 32]; +serial_number_nonce: [u8; 32] = [0u8; 32]; +commitment_randomness: [u8; 32] = [0u8; 32]; + +[state_leaf] +path: [u8; 128] = [0u8; 128]; +memo: [u8; 32] = [0u8; 32]; +network_id: u8 = 0; +leaf_randomness: [u8; 32] = [0u8; 32]; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_and_program_state/mod.rs b/tests/compiler/input_files/program_input_and_program_state/mod.rs new file mode 100644 index 0000000000..25541030ab --- /dev/null +++ b/tests/compiler/input_files/program_input_and_program_state/mod.rs @@ -0,0 +1,44 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, parse_input_and_state, parse_program_with_input_and_state}; + +#[test] +fn test_basic() { + let input_string = include_str!("input/basic.in"); + let state_string = include_str!("input/basic.state"); + + parse_input_and_state(input_string, state_string).unwrap(); +} + +#[test] +fn test_full() { + let input_string = include_str!("input/token_withdraw.in"); + let state_string = include_str!("input/token_withdraw.state"); + + parse_input_and_state(input_string, state_string).unwrap(); +} + +#[test] +fn test_access() { + let program_string = include_str!("access.leo"); + let input_string = include_str!("input/token_withdraw.in"); + let state_string = include_str!("input/token_withdraw.state"); + + let program = parse_program_with_input_and_state(program_string, input_string, state_string).unwrap(); + + assert_satisfied(program); +} diff --git a/tests/compiler/input_files/program_input_constants/input/main.in b/tests/compiler/input_files/program_input_constants/input/main.in new file mode 100644 index 0000000000..625ffc1ffb --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main.in @@ -0,0 +1,2 @@ +[constants] +a: bool = true; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_array.in b/tests/compiler/input_files/program_input_constants/input/main_array.in new file mode 100644 index 0000000000..3fe6502e8f --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_array.in @@ -0,0 +1,2 @@ +[constants] +x: [i16; 1] = [0i16; 1]; diff --git a/tests/compiler/input_files/program_input_constants/input/main_array_fail.in b/tests/compiler/input_files/program_input_constants/input/main_array_fail.in new file mode 100644 index 0000000000..e63331af22 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_array_fail.in @@ -0,0 +1,2 @@ +[constants] +x: [i16; 1] = [0i16; 1]; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_double_declaration_fail.in b/tests/compiler/input_files/program_input_constants/input/main_double_declaration_fail.in new file mode 100644 index 0000000000..fcc95402a3 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_double_declaration_fail.in @@ -0,0 +1,5 @@ +[main] +a: bool = true; + +[constants] +a: bool = false; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_fail_name.in b/tests/compiler/input_files/program_input_constants/input/main_fail_name.in new file mode 100644 index 0000000000..0cae21cc28 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_fail_name.in @@ -0,0 +1,2 @@ +[constants] +bad_name: bool = true; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_fail_type.in b/tests/compiler/input_files/program_input_constants/input/main_fail_type.in new file mode 100644 index 0000000000..0bb8f694fd --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_fail_type.in @@ -0,0 +1,2 @@ +[constants] +a: u8 = 1; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_field.in b/tests/compiler/input_files/program_input_constants/input/main_field.in new file mode 100644 index 0000000000..deea2a01a3 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_field.in @@ -0,0 +1,3 @@ +[constants] +a: field = 1; +b: field = -1; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_group.in b/tests/compiler/input_files/program_input_constants/input/main_group.in new file mode 100644 index 0000000000..52e52dc6a8 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_group.in @@ -0,0 +1,4 @@ +[constants] +a: group = 1group; +b: group = -1group; +c: group = (0, -1)group; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in b/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in new file mode 100644 index 0000000000..0d052ae99b --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in @@ -0,0 +1,2 @@ +[constants] +x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_multiple.in b/tests/compiler/input_files/program_input_constants/input/main_multiple.in new file mode 100644 index 0000000000..3e61056b7b --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_multiple.in @@ -0,0 +1,3 @@ +[constants] +a: bool = true; +b: bool = false; diff --git a/tests/compiler/input_files/program_input_constants/input/main_not_const_input_fail.in b/tests/compiler/input_files/program_input_constants/input/main_not_const_input_fail.in new file mode 100644 index 0000000000..b2aaee854e --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_not_const_input_fail.in @@ -0,0 +1,2 @@ +[main] +a: bool = true; // expecting const a, not main a \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in b/tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in new file mode 100644 index 0000000000..4341911fba --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in @@ -0,0 +1,2 @@ +[constants] +x: (u8, bool) = (10, true); // wrong size here; main expects (u8, bool, u8) \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_type_mismatch.in b/tests/compiler/input_files/program_input_constants/input/main_type_mismatch.in new file mode 100644 index 0000000000..d50f65428d --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_type_mismatch.in @@ -0,0 +1,2 @@ +[constants] +a: u8 = 10; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/main.leo b/tests/compiler/input_files/program_input_constants/main.leo new file mode 100644 index 0000000000..0c33516ba8 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/main.leo @@ -0,0 +1,3 @@ +function main(const a: bool) { + console.assert(a == true); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/main_array.leo b/tests/compiler/input_files/program_input_constants/main_array.leo new file mode 100644 index 0000000000..aa592183da --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/main_array.leo @@ -0,0 +1,4 @@ +function main (const x: [i16; 1]) { + console.log("{}", x); + console.assert(x[0] == 0); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/main_array_fail.leo b/tests/compiler/input_files/program_input_constants/main_array_fail.leo new file mode 100644 index 0000000000..6e7656f9b9 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/main_array_fail.leo @@ -0,0 +1,3 @@ +function main(const x: [i16; 2]){ + console.log("x: {}", x); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/main_field.leo b/tests/compiler/input_files/program_input_constants/main_field.leo new file mode 100644 index 0000000000..60fc67fc74 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/main_field.leo @@ -0,0 +1,5 @@ +function main(const a: field, const b: field) { + // Change to assert when == is implemented for field. + console.log("a: {}", a); + console.log("b: {}", b); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/main_group.leo b/tests/compiler/input_files/program_input_constants/main_group.leo new file mode 100644 index 0000000000..93accf710d --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/main_group.leo @@ -0,0 +1,6 @@ +function main(const a: group, const b: group, const c: group) { + // Change to assert when == is implemented for group. + console.log("a: {}", a); + console.log("b: {}", b); + console.log("c: {}", c); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo b/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo new file mode 100644 index 0000000000..56a1b3c7cf --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo @@ -0,0 +1,9 @@ +function main(const x: [i16; (2, 2, 3)]){ + console.log("x: {}", x); + + let y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; + console.log("y: {}", y); + + console.assert(x[0][0][0] == y[0][0][0]); + console.assert(x[1][1][2] == y[1][1][2]); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/main_multiple.leo b/tests/compiler/input_files/program_input_constants/main_multiple.leo new file mode 100644 index 0000000000..2c2179cc3d --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/main_multiple.leo @@ -0,0 +1,4 @@ +function main(const a: bool, const b: bool) { + console.assert(a == true); + console.assert(b == false); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/main_tuple_fail.leo b/tests/compiler/input_files/program_input_constants/main_tuple_fail.leo new file mode 100644 index 0000000000..639ec42835 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/main_tuple_fail.leo @@ -0,0 +1,3 @@ +function main(const x: (u8, bool, u8)) { + console.log("x: {}", x); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/mod.rs b/tests/compiler/input_files/program_input_constants/mod.rs new file mode 100644 index 0000000000..284aef6312 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/mod.rs @@ -0,0 +1,145 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, expect_compiler_error, parse_program_with_input, EdwardsTestCompiler}; +use leo_compiler::errors::CompilerError; + +fn expect_fail(program: EdwardsTestCompiler) { + match expect_compiler_error(program) { + CompilerError::FunctionError(_) => {} + err => panic!("expected input parser error, got {:?}", err), + } +} + +#[test] +fn test_input_pass() { + let program_string = include_str!("main.leo"); + let input_string = include_str!("input/main.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_array_fail() { + let program_string = include_str!("main_array.leo"); + let input_string = include_str!("input/main_array.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_multi_dimension_array() { + let program_string = include_str!("main_multi_dimension_array.leo"); + let input_string = include_str!("input/main_multi_dimension_array.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_fail_name() { + let program_string = include_str!("main.leo"); + let input_string = include_str!("input/main_fail_name.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_input_fail_type() { + let program_string = include_str!("main.leo"); + let input_string = include_str!("input/main_fail_type.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_input_multiple() { + let program_string = include_str!("main_multiple.leo"); + let input_string = include_str!("input/main_multiple.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_input_array_dimensions_mismatch() { + let program_string = include_str!("main_array_fail.leo"); + let input_string = include_str!("input/main_array_fail.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_input_double_declaration() { + let program_string = include_str!("main.leo"); + let input_string = include_str!("input/main_double_declaration_fail.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_non_constant_input() { + let program_string = include_str!("main.leo"); + let input_string = include_str!("input/main_not_const_input_fail.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_tuple_size_mismatch() { + let program_string = include_str!("main_tuple_fail.leo"); + let input_string = include_str!("input/main_tuple_fail.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_fail(program); +} + +#[test] +fn test_field_input() { + let program_string = include_str!("main_field.leo"); + let input_string = include_str!("input/main_field.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_group_input() { + let program_string = include_str!("main_group.leo"); + let input_string = include_str!("input/main_group.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + assert_satisfied(program); +} diff --git a/tests/compiler/input_files/program_registers/input/array.in b/tests/compiler/input_files/program_registers/input/array.in new file mode 100644 index 0000000000..a952dda5a6 --- /dev/null +++ b/tests/compiler/input_files/program_registers/input/array.in @@ -0,0 +1,2 @@ +[registers] +r2: [[u8; 4]; 2] = [[0u64, 0u64, 0u64, 0u64], [0u64, 0u64, 0u64, 0u64]]; \ No newline at end of file diff --git a/tests/compiler/input_files/program_registers/input/main.in b/tests/compiler/input_files/program_registers/input/main.in new file mode 100644 index 0000000000..1bff5e584f --- /dev/null +++ b/tests/compiler/input_files/program_registers/input/main.in @@ -0,0 +1,4 @@ +[main] + +[registers] +r: u8 = 0u8; \ No newline at end of file diff --git a/tests/compiler/input_files/program_registers/mod.rs b/tests/compiler/input_files/program_registers/mod.rs new file mode 100644 index 0000000000..b172c141e0 --- /dev/null +++ b/tests/compiler/input_files/program_registers/mod.rs @@ -0,0 +1,53 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{expect_compiler_error, get_output, parse_program_with_input}; + +#[test] +fn test_registers_pass() { + let program_string = include_str!("registers_pass.leo"); + let input_string = include_str!("input/main.in"); + let expected = include_bytes!("output/registers_pass.out"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + let actual = get_output(program); + + assert!(expected.eq(actual.bytes().as_slice())); +} + +#[test] +fn test_registers_fail() { + let program_string = include_str!("registers_fail.leo"); + let input_string = include_str!("input/main.in"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + expect_compiler_error(program); +} + +#[test] +fn test_registers_array() { + let program_string = include_str!("registers_array.leo"); + let input_string = include_str!("input/array.in"); + let expected = include_bytes!("output/registers_array.out"); + + let program = parse_program_with_input(program_string, input_string).unwrap(); + + let actual = get_output(program); + + assert!(expected.eq(actual.bytes().as_slice())); +} diff --git a/tests/compiler/input_files/program_registers/output/registers_array.out b/tests/compiler/input_files/program_registers/output/registers_array.out new file mode 100644 index 0000000000..20294ac107 --- /dev/null +++ b/tests/compiler/input_files/program_registers/output/registers_array.out @@ -0,0 +1,2 @@ +[registers] +r2: [[u8; 4]; 2] = [[1, 2, 3, 4], [5, 6, 7, 8]]; diff --git a/tests/compiler/input_files/program_registers/output/registers_pass.out b/tests/compiler/input_files/program_registers/output/registers_pass.out new file mode 100644 index 0000000000..e26ba9195e --- /dev/null +++ b/tests/compiler/input_files/program_registers/output/registers_pass.out @@ -0,0 +1,2 @@ +[registers] +r: u8 = 1; diff --git a/tests/compiler/input_files/program_registers/registers_array.leo b/tests/compiler/input_files/program_registers/registers_array.leo new file mode 100644 index 0000000000..324515c13f --- /dev/null +++ b/tests/compiler/input_files/program_registers/registers_array.leo @@ -0,0 +1,3 @@ +function main () -> [[u8; 4]; 2] { + return [[1u8, 2u8, 3u8, 4u8], [5u8, 6u8, 7u8, 8u8]]; +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_registers/registers_fail.leo b/tests/compiler/input_files/program_registers/registers_fail.leo new file mode 100644 index 0000000000..78af2bb5d8 --- /dev/null +++ b/tests/compiler/input_files/program_registers/registers_fail.leo @@ -0,0 +1,3 @@ +function main() -> bool { + return false; +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_registers/registers_pass.leo b/tests/compiler/input_files/program_registers/registers_pass.leo new file mode 100644 index 0000000000..ff5ef4a0cd --- /dev/null +++ b/tests/compiler/input_files/program_registers/registers_pass.leo @@ -0,0 +1,3 @@ +function main() -> u8 { + return 1u8; +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_state/access_all.leo b/tests/compiler/input_files/program_state/access_all.leo new file mode 100644 index 0000000000..bf85a3f722 --- /dev/null +++ b/tests/compiler/input_files/program_state/access_all.leo @@ -0,0 +1,8 @@ +function main() { + console.assert(input.state.root == [0u8; 32]); + + const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; + //console.assert(input.record.owner, expected); + + console.assert(input.state_leaf.network_id == 0u8); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_state/access_state.leo b/tests/compiler/input_files/program_state/access_state.leo new file mode 100644 index 0000000000..a7afe50a5f --- /dev/null +++ b/tests/compiler/input_files/program_state/access_state.leo @@ -0,0 +1,3 @@ +function main() { + console.assert(input.state.root == [0u8; 32]); +} \ No newline at end of file diff --git a/tests/compiler/input_files/program_state/input/basic.state b/tests/compiler/input_files/program_state/input/basic.state new file mode 100644 index 0000000000..2f40f7f1c4 --- /dev/null +++ b/tests/compiler/input_files/program_state/input/basic.state @@ -0,0 +1,10 @@ +[[public]] +[state] +root: bool = true; + +[[private]] +[record] +id: bool = false; + +[state_leaf] +leaf: bool = true; \ No newline at end of file diff --git a/tests/compiler/input_files/program_state/input/section_invalid.state b/tests/compiler/input_files/program_state/input/section_invalid.state new file mode 100644 index 0000000000..955b881192 --- /dev/null +++ b/tests/compiler/input_files/program_state/input/section_invalid.state @@ -0,0 +1,4 @@ +[[public]] + +[record] +a: bool = true; \ No newline at end of file diff --git a/tests/compiler/input_files/program_state/input/section_undefined.state b/tests/compiler/input_files/program_state/input/section_undefined.state new file mode 100644 index 0000000000..5f881cbb29 --- /dev/null +++ b/tests/compiler/input_files/program_state/input/section_undefined.state @@ -0,0 +1,4 @@ +[[public]] + +[invalid] +a: bool = true; \ No newline at end of file diff --git a/tests/compiler/input_files/program_state/input/token_withdraw.state b/tests/compiler/input_files/program_state/input/token_withdraw.state new file mode 100644 index 0000000000..219fc44776 --- /dev/null +++ b/tests/compiler/input_files/program_state/input/token_withdraw.state @@ -0,0 +1,24 @@ +[[public]] + +[state] +leaf_index: u32 = 0; +root: [u8; 32] = [0u8; 32]; + +[[private]] + +[record] +serial_number: [u8; 32] = [0u8; 32]; +commitment: [u8; 32] = [0u8; 32]; +owner: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; +value: u64 = 5; +payload: [u8; 32] = [0u8; 32]; +birth_program_id: [u8; 32] = [0u8; 32]; +death_program_id: [u8; 32] = [0u8; 32]; +serial_number_nonce: [u8; 32] = [0u8; 32]; +commitment_randomness: [u8; 32] = [0u8; 32]; + +[state_leaf] +path: [u8; 128] = [0u8; 128]; +memo: [u8; 32] = [0u8; 32]; +network_id: u8 = 0; +leaf_randomness: [u8; 32] = [0u8; 32]; \ No newline at end of file diff --git a/tests/compiler/input_files/program_state/input/visibility_fail.state b/tests/compiler/input_files/program_state/input/visibility_fail.state new file mode 100644 index 0000000000..c5928ddcbd --- /dev/null +++ b/tests/compiler/input_files/program_state/input/visibility_fail.state @@ -0,0 +1 @@ +[[pure]] \ No newline at end of file diff --git a/tests/compiler/input_files/program_state/mod.rs b/tests/compiler/input_files/program_state/mod.rs new file mode 100644 index 0000000000..c5959196f5 --- /dev/null +++ b/tests/compiler/input_files/program_state/mod.rs @@ -0,0 +1,78 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, parse_program_with_state, parse_state}; + +#[test] +fn test_basic() { + let state_string = include_str!("input/basic.state"); + + parse_state(state_string).unwrap(); +} + +#[test] +fn test_token_withdraw() { + let state_string = include_str!("input/token_withdraw.state"); + + parse_state(state_string).unwrap(); +} + +#[test] +fn test_access_state() { + let program_string = include_str!("access_state.leo"); + let state_string = include_str!("input/token_withdraw.state"); + + let program = parse_program_with_state(program_string, state_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_access_all() { + let program_string = include_str!("access_all.leo"); + let state_string = include_str!("input/token_withdraw.state"); + + let program = parse_program_with_state(program_string, state_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_visibility_fail() { + let state_string = include_str!("input/visibility_fail.state"); + + let is_err = parse_state(state_string).is_err(); + + assert!(is_err); +} + +#[test] +fn test_section_undefined() { + let state_string = include_str!("input/section_undefined.state"); + + let is_err = parse_state(state_string).is_err(); + + assert!(is_err); +} + +#[test] +fn test_section_invalid() { + let state_string = include_str!("input/section_invalid.state"); + + let is_err = parse_state(state_string).is_err(); + + assert!(is_err); +} diff --git a/tests/compiler/integers/i128/add.leo b/tests/compiler/integers/i128/add.leo new file mode 100644 index 0000000000..e35648f545 --- /dev/null +++ b/tests/compiler/integers/i128/add.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: i128) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/console_assert.leo b/tests/compiler/integers/i128/console_assert.leo new file mode 100644 index 0000000000..c89021f609 --- /dev/null +++ b/tests/compiler/integers/i128/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/div.leo b/tests/compiler/integers/i128/div.leo new file mode 100644 index 0000000000..ffaeae19a8 --- /dev/null +++ b/tests/compiler/integers/i128/div.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: i128) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/eq.leo b/tests/compiler/integers/i128/eq.leo new file mode 100644 index 0000000000..f4beddc8fc --- /dev/null +++ b/tests/compiler/integers/i128/eq.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/ge.leo b/tests/compiler/integers/i128/ge.leo new file mode 100644 index 0000000000..1fbbd68073 --- /dev/null +++ b/tests/compiler/integers/i128/ge.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/gt.leo b/tests/compiler/integers/i128/gt.leo new file mode 100644 index 0000000000..27849afbe8 --- /dev/null +++ b/tests/compiler/integers/i128/gt.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/input.leo b/tests/compiler/integers/i128/input.leo new file mode 100644 index 0000000000..c89021f609 --- /dev/null +++ b/tests/compiler/integers/i128/input.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/le.leo b/tests/compiler/integers/i128/le.leo new file mode 100644 index 0000000000..ea0c3c9e1d --- /dev/null +++ b/tests/compiler/integers/i128/le.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/lt.leo b/tests/compiler/integers/i128/lt.leo new file mode 100644 index 0000000000..bde4def85c --- /dev/null +++ b/tests/compiler/integers/i128/lt.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/max.leo b/tests/compiler/integers/i128/max.leo new file mode 100644 index 0000000000..5ba44213e1 --- /dev/null +++ b/tests/compiler/integers/i128/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: i128 = 170141183460469231731687303715884105727; +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/max_fail.leo b/tests/compiler/integers/i128/max_fail.leo new file mode 100644 index 0000000000..a9a46afd7f --- /dev/null +++ b/tests/compiler/integers/i128/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i128 = 170141183460469231731687303715884105728; +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/min.leo b/tests/compiler/integers/i128/min.leo new file mode 100644 index 0000000000..19509a3fb0 --- /dev/null +++ b/tests/compiler/integers/i128/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: i128 = -170141183460469231731687303715884105728; +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/min_fail.leo b/tests/compiler/integers/i128/min_fail.leo new file mode 100644 index 0000000000..918f0e439d --- /dev/null +++ b/tests/compiler/integers/i128/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i128 = -170141183460469231731687303715884105729; +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/mod.rs b/tests/compiler/integers/i128/mod.rs new file mode 100644 index 0000000000..ead011f14e --- /dev/null +++ b/tests/compiler/integers/i128/mod.rs @@ -0,0 +1,142 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::{expect_computation_error, IntegerTester}, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{I128Type, IntegerType, SignedIntegerType}; + +test_int!( + TestI128, + i128, + IntegerType::Signed(SignedIntegerType::I128Type(I128Type {})), + Int128 +); + +#[test] +fn test_i128_min() { + TestI128::test_min(); +} + +#[test] +fn test_i128_min_fail() { + TestI128::test_min_fail(); +} + +#[test] +fn test_i128_max() { + TestI128::test_max(); +} + +#[test] +fn test_i128_max_fail() { + TestI128::test_max_fail(); +} + +#[test] +fn test_i128_neg() { + TestI128::test_negate(); +} + +#[test] +fn test_i128_neg_max_fail() { + TestI128::test_negate_min_fail(); +} + +#[test] +fn test_i128_neg_zero() { + TestI128::test_negate_zero(); +} + +#[test] +fn test_i128_add() { + TestI128::test_add(); +} + +#[test] +fn test_i128_sub() { + TestI128::test_sub(); +} + +#[test] +fn test_i128_mul() { + TestI128::test_mul(); +} + +#[test] +#[ignore] // takes several minutes +fn test_i128_div() { + TestI128::test_div(); +} + +#[test] +fn test_i128_pow() { + TestI128::test_pow(); +} + +#[test] +fn test_i128_eq() { + TestI128::test_eq(); +} + +#[test] +fn test_i128_ne() { + TestI128::test_ne(); +} + +#[test] +fn test_i128_ge() { + TestI128::test_ge(); +} + +#[test] +fn test_i128_gt() { + TestI128::test_gt(); +} + +#[test] +fn test_i128_le() { + TestI128::test_le(); +} + +#[test] +fn test_i128_lt() { + TestI128::test_lt(); +} + +#[test] +fn test_i128_assert_eq() { + TestI128::test_console_assert(); +} + +#[test] +fn test_i128_ternary() { + TestI128::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/i128/mul.leo b/tests/compiler/integers/i128/mul.leo new file mode 100644 index 0000000000..25b902d53c --- /dev/null +++ b/tests/compiler/integers/i128/mul.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: i128) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/ne.leo b/tests/compiler/integers/i128/ne.leo new file mode 100644 index 0000000000..dae148b49c --- /dev/null +++ b/tests/compiler/integers/i128/ne.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/negate.leo b/tests/compiler/integers/i128/negate.leo new file mode 100644 index 0000000000..437ee06390 --- /dev/null +++ b/tests/compiler/integers/i128/negate.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128) { + console.assert(-a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/negate_min.leo b/tests/compiler/integers/i128/negate_min.leo new file mode 100644 index 0000000000..c9de272960 --- /dev/null +++ b/tests/compiler/integers/i128/negate_min.leo @@ -0,0 +1,4 @@ +function main() { + const a: i128 = -170141183460469231731687303715884105728; + const b = -a; +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/negate_zero.leo b/tests/compiler/integers/i128/negate_zero.leo new file mode 100644 index 0000000000..e079baf393 --- /dev/null +++ b/tests/compiler/integers/i128/negate_zero.leo @@ -0,0 +1,5 @@ +function main() { + const a = 0i128; + + console.assert(-a == 0i128); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/no_space_between_literal.leo b/tests/compiler/integers/i128/no_space_between_literal.leo new file mode 100644 index 0000000000..3142fb5724 --- /dev/null +++ b/tests/compiler/integers/i128/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 i128; +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/pow.leo b/tests/compiler/integers/i128/pow.leo new file mode 100644 index 0000000000..05536aad51 --- /dev/null +++ b/tests/compiler/integers/i128/pow.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: i128) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/sub.leo b/tests/compiler/integers/i128/sub.leo new file mode 100644 index 0000000000..3a723eec49 --- /dev/null +++ b/tests/compiler/integers/i128/sub.leo @@ -0,0 +1,3 @@ +function main(a: i128, b: i128, c: i128) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i128/ternary.leo b/tests/compiler/integers/i128/ternary.leo new file mode 100644 index 0000000000..3783463b22 --- /dev/null +++ b/tests/compiler/integers/i128/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: i128, b: i128, c: i128) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/add.leo b/tests/compiler/integers/i16/add.leo new file mode 100644 index 0000000000..556ae65c3a --- /dev/null +++ b/tests/compiler/integers/i16/add.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: i16) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/console_assert.leo b/tests/compiler/integers/i16/console_assert.leo new file mode 100644 index 0000000000..3afb25b207 --- /dev/null +++ b/tests/compiler/integers/i16/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/div.leo b/tests/compiler/integers/i16/div.leo new file mode 100644 index 0000000000..6d0c8f4614 --- /dev/null +++ b/tests/compiler/integers/i16/div.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: i16) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/eq.leo b/tests/compiler/integers/i16/eq.leo new file mode 100644 index 0000000000..338e3e50f6 --- /dev/null +++ b/tests/compiler/integers/i16/eq.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/ge.leo b/tests/compiler/integers/i16/ge.leo new file mode 100644 index 0000000000..68a4d40bf8 --- /dev/null +++ b/tests/compiler/integers/i16/ge.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/gt.leo b/tests/compiler/integers/i16/gt.leo new file mode 100644 index 0000000000..75d9bfb612 --- /dev/null +++ b/tests/compiler/integers/i16/gt.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/input.leo b/tests/compiler/integers/i16/input.leo new file mode 100644 index 0000000000..3afb25b207 --- /dev/null +++ b/tests/compiler/integers/i16/input.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/le.leo b/tests/compiler/integers/i16/le.leo new file mode 100644 index 0000000000..ff112c7fbc --- /dev/null +++ b/tests/compiler/integers/i16/le.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/lt.leo b/tests/compiler/integers/i16/lt.leo new file mode 100644 index 0000000000..46c57aabe6 --- /dev/null +++ b/tests/compiler/integers/i16/lt.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/max.leo b/tests/compiler/integers/i16/max.leo new file mode 100644 index 0000000000..2b70b3cc56 --- /dev/null +++ b/tests/compiler/integers/i16/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: i16 = 32767; +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/max_fail.leo b/tests/compiler/integers/i16/max_fail.leo new file mode 100644 index 0000000000..209bcc6518 --- /dev/null +++ b/tests/compiler/integers/i16/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i16 = 32768; +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/min.leo b/tests/compiler/integers/i16/min.leo new file mode 100644 index 0000000000..3d05bef95a --- /dev/null +++ b/tests/compiler/integers/i16/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: i16 = -32768; +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/min_fail.leo b/tests/compiler/integers/i16/min_fail.leo new file mode 100644 index 0000000000..13d7c8b7f2 --- /dev/null +++ b/tests/compiler/integers/i16/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i16 = -32769; +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/mod.rs b/tests/compiler/integers/i16/mod.rs new file mode 100644 index 0000000000..6f415a0877 --- /dev/null +++ b/tests/compiler/integers/i16/mod.rs @@ -0,0 +1,141 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::{expect_computation_error, IntegerTester}, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{I16Type, IntegerType, SignedIntegerType}; + +test_int!( + TestI16, + i16, + IntegerType::Signed(SignedIntegerType::I16Type(I16Type {})), + Int16 +); + +#[test] +fn test_i16_min() { + TestI16::test_min(); +} + +#[test] +fn test_i16_min_fail() { + TestI16::test_min_fail(); +} + +#[test] +fn test_i16_max() { + TestI16::test_max(); +} + +#[test] +fn test_i16_max_fail() { + TestI16::test_max_fail(); +} + +#[test] +fn test_i16_neg() { + TestI16::test_negate(); +} + +#[test] +fn test_i16_neg_max_fail() { + TestI16::test_negate_min_fail(); +} + +#[test] +fn test_i16_neg_zero() { + TestI16::test_negate_zero(); +} + +#[test] +fn test_i16_add() { + TestI16::test_add(); +} + +#[test] +fn test_i16_sub() { + TestI16::test_sub(); +} + +#[test] +fn test_i16_mul() { + TestI16::test_mul(); +} + +#[test] +fn test_i16_div() { + TestI16::test_div(); +} + +#[test] +fn test_i16_pow() { + TestI16::test_pow(); +} + +#[test] +fn test_i16_eq() { + TestI16::test_eq(); +} + +#[test] +fn test_i16_ne() { + TestI16::test_ne(); +} + +#[test] +fn test_i16_ge() { + TestI16::test_ge(); +} + +#[test] +fn test_i16_gt() { + TestI16::test_gt(); +} + +#[test] +fn test_i16_le() { + TestI16::test_le(); +} + +#[test] +fn test_i16_lt() { + TestI16::test_lt(); +} + +#[test] +fn test_i16_console_assert() { + TestI16::test_console_assert(); +} + +#[test] +fn test_i16_ternary() { + TestI16::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/i16/mul.leo b/tests/compiler/integers/i16/mul.leo new file mode 100644 index 0000000000..6fd19b703a --- /dev/null +++ b/tests/compiler/integers/i16/mul.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: i16) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/ne.leo b/tests/compiler/integers/i16/ne.leo new file mode 100644 index 0000000000..f0a9472678 --- /dev/null +++ b/tests/compiler/integers/i16/ne.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/negate.leo b/tests/compiler/integers/i16/negate.leo new file mode 100644 index 0000000000..1d2644dce7 --- /dev/null +++ b/tests/compiler/integers/i16/negate.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16) { + console.assert(-a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/negate_min.leo b/tests/compiler/integers/i16/negate_min.leo new file mode 100644 index 0000000000..d52a356396 --- /dev/null +++ b/tests/compiler/integers/i16/negate_min.leo @@ -0,0 +1,4 @@ +function main() { + const a = -32768i16; + const b = -a; +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/negate_zero.leo b/tests/compiler/integers/i16/negate_zero.leo new file mode 100644 index 0000000000..20f8a4fba7 --- /dev/null +++ b/tests/compiler/integers/i16/negate_zero.leo @@ -0,0 +1,5 @@ +function main() { + const a = 0i16; + + console.assert(-a == 0i16); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/no_space_between_literal.leo b/tests/compiler/integers/i16/no_space_between_literal.leo new file mode 100644 index 0000000000..96c6b2a914 --- /dev/null +++ b/tests/compiler/integers/i16/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 i16; +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/pow.leo b/tests/compiler/integers/i16/pow.leo new file mode 100644 index 0000000000..769d2d2fbb --- /dev/null +++ b/tests/compiler/integers/i16/pow.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: i16) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/sub.leo b/tests/compiler/integers/i16/sub.leo new file mode 100644 index 0000000000..e935935187 --- /dev/null +++ b/tests/compiler/integers/i16/sub.leo @@ -0,0 +1,3 @@ +function main(a: i16, b: i16, c: i16) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i16/ternary.leo b/tests/compiler/integers/i16/ternary.leo new file mode 100644 index 0000000000..d66c73cb93 --- /dev/null +++ b/tests/compiler/integers/i16/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: i16, b: i16, c: i16) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/add.leo b/tests/compiler/integers/i32/add.leo new file mode 100644 index 0000000000..3d8fb1b1d2 --- /dev/null +++ b/tests/compiler/integers/i32/add.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: i32) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/console_assert.leo b/tests/compiler/integers/i32/console_assert.leo new file mode 100644 index 0000000000..a2d6980e9a --- /dev/null +++ b/tests/compiler/integers/i32/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/div.leo b/tests/compiler/integers/i32/div.leo new file mode 100644 index 0000000000..3189a354f0 --- /dev/null +++ b/tests/compiler/integers/i32/div.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: i32) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/eq.leo b/tests/compiler/integers/i32/eq.leo new file mode 100644 index 0000000000..bac7af0be0 --- /dev/null +++ b/tests/compiler/integers/i32/eq.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/ge.leo b/tests/compiler/integers/i32/ge.leo new file mode 100644 index 0000000000..362521fc82 --- /dev/null +++ b/tests/compiler/integers/i32/ge.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/gt.leo b/tests/compiler/integers/i32/gt.leo new file mode 100644 index 0000000000..63ddcaa85c --- /dev/null +++ b/tests/compiler/integers/i32/gt.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/input.leo b/tests/compiler/integers/i32/input.leo new file mode 100644 index 0000000000..a2d6980e9a --- /dev/null +++ b/tests/compiler/integers/i32/input.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/le.leo b/tests/compiler/integers/i32/le.leo new file mode 100644 index 0000000000..948c66b1fc --- /dev/null +++ b/tests/compiler/integers/i32/le.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/lt.leo b/tests/compiler/integers/i32/lt.leo new file mode 100644 index 0000000000..72a8fb0d53 --- /dev/null +++ b/tests/compiler/integers/i32/lt.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/max.leo b/tests/compiler/integers/i32/max.leo new file mode 100644 index 0000000000..074c75f1a6 --- /dev/null +++ b/tests/compiler/integers/i32/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: i32 = 2147483647; +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/max_fail.leo b/tests/compiler/integers/i32/max_fail.leo new file mode 100644 index 0000000000..af2877ff5e --- /dev/null +++ b/tests/compiler/integers/i32/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i32 = 2147483648; +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/min.leo b/tests/compiler/integers/i32/min.leo new file mode 100644 index 0000000000..8436268ce6 --- /dev/null +++ b/tests/compiler/integers/i32/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: i32 = -2147483648; +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/min_fail.leo b/tests/compiler/integers/i32/min_fail.leo new file mode 100644 index 0000000000..11a683b087 --- /dev/null +++ b/tests/compiler/integers/i32/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i32 = -2147483649; +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/mod.rs b/tests/compiler/integers/i32/mod.rs new file mode 100644 index 0000000000..b8a6925ac2 --- /dev/null +++ b/tests/compiler/integers/i32/mod.rs @@ -0,0 +1,141 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::{expect_computation_error, IntegerTester}, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{I32Type, IntegerType, SignedIntegerType}; + +test_int!( + TestI32, + i32, + IntegerType::Signed(SignedIntegerType::I32Type(I32Type {})), + Int32 +); + +#[test] +fn test_i32_min() { + TestI32::test_min(); +} + +#[test] +fn test_i32_min_fail() { + TestI32::test_min_fail(); +} + +#[test] +fn test_i32_max() { + TestI32::test_max(); +} + +#[test] +fn test_i32_max_fail() { + TestI32::test_max_fail(); +} + +#[test] +fn test_i32_neg() { + TestI32::test_negate(); +} + +#[test] +fn test_i32_neg_max_fail() { + TestI32::test_negate_min_fail(); +} + +#[test] +fn test_i32_neg_zero() { + TestI32::test_negate_zero(); +} + +#[test] +fn test_i32_add() { + TestI32::test_add(); +} + +#[test] +fn test_i32_sub() { + TestI32::test_sub(); +} + +#[test] +fn test_i32_mul() { + TestI32::test_mul(); +} + +#[test] +fn test_i32_div() { + TestI32::test_div(); +} + +#[test] +fn test_i32_pow() { + TestI32::test_pow(); +} + +#[test] +fn test_i32_eq() { + TestI32::test_eq(); +} + +#[test] +fn test_i32_ne() { + TestI32::test_ne(); +} + +#[test] +fn test_i32_ge() { + TestI32::test_ge(); +} + +#[test] +fn test_i32_gt() { + TestI32::test_gt(); +} + +#[test] +fn test_i32_le() { + TestI32::test_le(); +} + +#[test] +fn test_i32_lt() { + TestI32::test_lt(); +} + +#[test] +fn test_i32_console_assert() { + TestI32::test_console_assert(); +} + +#[test] +fn test_i32_ternary() { + TestI32::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/i32/mul.leo b/tests/compiler/integers/i32/mul.leo new file mode 100644 index 0000000000..50ba5b4128 --- /dev/null +++ b/tests/compiler/integers/i32/mul.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: i32) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/ne.leo b/tests/compiler/integers/i32/ne.leo new file mode 100644 index 0000000000..dcc1a185d1 --- /dev/null +++ b/tests/compiler/integers/i32/ne.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/negate.leo b/tests/compiler/integers/i32/negate.leo new file mode 100644 index 0000000000..eef94c934f --- /dev/null +++ b/tests/compiler/integers/i32/negate.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32) { + console.assert(-a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/negate_min.leo b/tests/compiler/integers/i32/negate_min.leo new file mode 100644 index 0000000000..a96455d57a --- /dev/null +++ b/tests/compiler/integers/i32/negate_min.leo @@ -0,0 +1,4 @@ +function main() { + const a = -2147483648i32; + const b = -a; +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/negate_zero.leo b/tests/compiler/integers/i32/negate_zero.leo new file mode 100644 index 0000000000..a3807b1f8a --- /dev/null +++ b/tests/compiler/integers/i32/negate_zero.leo @@ -0,0 +1,5 @@ +function main() { + const a = 0i32; + + console.assert(-a == 0i32); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/no_space_between_literal.leo b/tests/compiler/integers/i32/no_space_between_literal.leo new file mode 100644 index 0000000000..845a7f403e --- /dev/null +++ b/tests/compiler/integers/i32/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 i32; +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/pow.leo b/tests/compiler/integers/i32/pow.leo new file mode 100644 index 0000000000..ebb131e30b --- /dev/null +++ b/tests/compiler/integers/i32/pow.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: i32) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/sub.leo b/tests/compiler/integers/i32/sub.leo new file mode 100644 index 0000000000..1f054a5ddf --- /dev/null +++ b/tests/compiler/integers/i32/sub.leo @@ -0,0 +1,3 @@ +function main(a: i32, b: i32, c: i32) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i32/ternary.leo b/tests/compiler/integers/i32/ternary.leo new file mode 100644 index 0000000000..790769d62f --- /dev/null +++ b/tests/compiler/integers/i32/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: i32, b: i32, c: i32) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/add.leo b/tests/compiler/integers/i64/add.leo new file mode 100644 index 0000000000..aefdbb178f --- /dev/null +++ b/tests/compiler/integers/i64/add.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: i64) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/console_assert.leo b/tests/compiler/integers/i64/console_assert.leo new file mode 100644 index 0000000000..ab9a5d6e91 --- /dev/null +++ b/tests/compiler/integers/i64/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/div.leo b/tests/compiler/integers/i64/div.leo new file mode 100644 index 0000000000..142e4ab801 --- /dev/null +++ b/tests/compiler/integers/i64/div.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: i64) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/eq.leo b/tests/compiler/integers/i64/eq.leo new file mode 100644 index 0000000000..86a234c834 --- /dev/null +++ b/tests/compiler/integers/i64/eq.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/ge.leo b/tests/compiler/integers/i64/ge.leo new file mode 100644 index 0000000000..e7b453c5dc --- /dev/null +++ b/tests/compiler/integers/i64/ge.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/gt.leo b/tests/compiler/integers/i64/gt.leo new file mode 100644 index 0000000000..9709bad012 --- /dev/null +++ b/tests/compiler/integers/i64/gt.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/input.leo b/tests/compiler/integers/i64/input.leo new file mode 100644 index 0000000000..ab9a5d6e91 --- /dev/null +++ b/tests/compiler/integers/i64/input.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/le.leo b/tests/compiler/integers/i64/le.leo new file mode 100644 index 0000000000..3e2cfcb711 --- /dev/null +++ b/tests/compiler/integers/i64/le.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/lt.leo b/tests/compiler/integers/i64/lt.leo new file mode 100644 index 0000000000..ef4e38eb76 --- /dev/null +++ b/tests/compiler/integers/i64/lt.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/max.leo b/tests/compiler/integers/i64/max.leo new file mode 100644 index 0000000000..593f91e110 --- /dev/null +++ b/tests/compiler/integers/i64/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: i64 = 9223372036854775807; +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/max_fail.leo b/tests/compiler/integers/i64/max_fail.leo new file mode 100644 index 0000000000..362b794a2c --- /dev/null +++ b/tests/compiler/integers/i64/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i64 = 9223372036854775808; +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/min.leo b/tests/compiler/integers/i64/min.leo new file mode 100644 index 0000000000..794d8fbfac --- /dev/null +++ b/tests/compiler/integers/i64/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: i64 = -9223372036854775808; +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/min_fail.leo b/tests/compiler/integers/i64/min_fail.leo new file mode 100644 index 0000000000..bb260ecc3f --- /dev/null +++ b/tests/compiler/integers/i64/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i64 = -9223372036854775809; +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/mod.rs b/tests/compiler/integers/i64/mod.rs new file mode 100644 index 0000000000..ccfb06ce68 --- /dev/null +++ b/tests/compiler/integers/i64/mod.rs @@ -0,0 +1,142 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::{expect_computation_error, IntegerTester}, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{I64Type, IntegerType, SignedIntegerType}; + +test_int!( + TestI64, + i64, + IntegerType::Signed(SignedIntegerType::I64Type(I64Type {})), + Int64 +); + +#[test] +fn test_i64_min() { + TestI64::test_min(); +} + +#[test] +fn test_i64_min_fail() { + TestI64::test_min_fail(); +} + +#[test] +fn test_i64_max() { + TestI64::test_max(); +} + +#[test] +fn test_i64_max_fail() { + TestI64::test_max_fail(); +} + +#[test] +fn test_i64_neg() { + TestI64::test_negate(); +} + +#[test] +fn test_i64_neg_max_fail() { + TestI64::test_negate_min_fail(); +} + +#[test] +fn test_i64_neg_zero() { + TestI64::test_negate_zero(); +} + +#[test] +fn test_i64_add() { + TestI64::test_add(); +} + +#[test] +fn test_i64_sub() { + TestI64::test_sub(); +} + +#[test] +fn test_i64_mul() { + TestI64::test_mul(); +} + +#[test] +#[ignore] // takes 2 minutes +fn test_i64_div() { + TestI64::test_div(); +} + +#[test] +fn test_i64_pow() { + TestI64::test_pow(); +} + +#[test] +fn test_i64_eq() { + TestI64::test_eq(); +} + +#[test] +fn test_i64_ne() { + TestI64::test_ne(); +} + +#[test] +fn test_i64_ge() { + TestI64::test_ge(); +} + +#[test] +fn test_i64_gt() { + TestI64::test_gt(); +} + +#[test] +fn test_i64_le() { + TestI64::test_le(); +} + +#[test] +fn test_i64_lt() { + TestI64::test_lt(); +} + +#[test] +fn test_i64_console_assert() { + TestI64::test_console_assert(); +} + +#[test] +fn test_i64_ternary() { + TestI64::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/i64/mul.leo b/tests/compiler/integers/i64/mul.leo new file mode 100644 index 0000000000..a3b8bd1da5 --- /dev/null +++ b/tests/compiler/integers/i64/mul.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: i64) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/ne.leo b/tests/compiler/integers/i64/ne.leo new file mode 100644 index 0000000000..a2642bb479 --- /dev/null +++ b/tests/compiler/integers/i64/ne.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/negate.leo b/tests/compiler/integers/i64/negate.leo new file mode 100644 index 0000000000..fe0cdc4d97 --- /dev/null +++ b/tests/compiler/integers/i64/negate.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64) { + console.assert(-a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/negate_min.leo b/tests/compiler/integers/i64/negate_min.leo new file mode 100644 index 0000000000..daf694491b --- /dev/null +++ b/tests/compiler/integers/i64/negate_min.leo @@ -0,0 +1,4 @@ +function main() { + const a: i64 = -9223372036854775808; + const b = -a; +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/negate_zero.leo b/tests/compiler/integers/i64/negate_zero.leo new file mode 100644 index 0000000000..81f09c19a3 --- /dev/null +++ b/tests/compiler/integers/i64/negate_zero.leo @@ -0,0 +1,5 @@ +function main() { + const a = 0i64; + + console.assert(-a == 0i64); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/no_space_between_literal.leo b/tests/compiler/integers/i64/no_space_between_literal.leo new file mode 100644 index 0000000000..7fb6ea9e62 --- /dev/null +++ b/tests/compiler/integers/i64/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 i64; +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/pow.leo b/tests/compiler/integers/i64/pow.leo new file mode 100644 index 0000000000..dca2dace74 --- /dev/null +++ b/tests/compiler/integers/i64/pow.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: i64) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/sub.leo b/tests/compiler/integers/i64/sub.leo new file mode 100644 index 0000000000..4d335e504b --- /dev/null +++ b/tests/compiler/integers/i64/sub.leo @@ -0,0 +1,3 @@ +function main(a: i64, b: i64, c: i64) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i64/ternary.leo b/tests/compiler/integers/i64/ternary.leo new file mode 100644 index 0000000000..df63b3ad6a --- /dev/null +++ b/tests/compiler/integers/i64/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: i64, b: i64, c: i64) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/add.leo b/tests/compiler/integers/i8/add.leo new file mode 100644 index 0000000000..dd71bc7f53 --- /dev/null +++ b/tests/compiler/integers/i8/add.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: i8) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/console_assert.leo b/tests/compiler/integers/i8/console_assert.leo new file mode 100644 index 0000000000..1fc09cb57d --- /dev/null +++ b/tests/compiler/integers/i8/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/div.leo b/tests/compiler/integers/i8/div.leo new file mode 100644 index 0000000000..a80d8e6319 --- /dev/null +++ b/tests/compiler/integers/i8/div.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: i8) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/eq.leo b/tests/compiler/integers/i8/eq.leo new file mode 100644 index 0000000000..130cc64b89 --- /dev/null +++ b/tests/compiler/integers/i8/eq.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/ge.leo b/tests/compiler/integers/i8/ge.leo new file mode 100644 index 0000000000..3084692c0c --- /dev/null +++ b/tests/compiler/integers/i8/ge.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/gt.leo b/tests/compiler/integers/i8/gt.leo new file mode 100644 index 0000000000..d3913b8b24 --- /dev/null +++ b/tests/compiler/integers/i8/gt.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/input.leo b/tests/compiler/integers/i8/input.leo new file mode 100644 index 0000000000..1fc09cb57d --- /dev/null +++ b/tests/compiler/integers/i8/input.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/le.leo b/tests/compiler/integers/i8/le.leo new file mode 100644 index 0000000000..92e011f206 --- /dev/null +++ b/tests/compiler/integers/i8/le.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/lt.leo b/tests/compiler/integers/i8/lt.leo new file mode 100644 index 0000000000..eb34b7148e --- /dev/null +++ b/tests/compiler/integers/i8/lt.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/max.leo b/tests/compiler/integers/i8/max.leo new file mode 100644 index 0000000000..f20d59ddf4 --- /dev/null +++ b/tests/compiler/integers/i8/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: i8 = 127; +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/max_fail.leo b/tests/compiler/integers/i8/max_fail.leo new file mode 100644 index 0000000000..9e1956024a --- /dev/null +++ b/tests/compiler/integers/i8/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i8 = 128; +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/min.leo b/tests/compiler/integers/i8/min.leo new file mode 100644 index 0000000000..7b6db025ea --- /dev/null +++ b/tests/compiler/integers/i8/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: i8 = -128; +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/min_fail.leo b/tests/compiler/integers/i8/min_fail.leo new file mode 100644 index 0000000000..41170e9b93 --- /dev/null +++ b/tests/compiler/integers/i8/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: i8 = -129; +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/mod.rs b/tests/compiler/integers/i8/mod.rs new file mode 100644 index 0000000000..5073dda460 --- /dev/null +++ b/tests/compiler/integers/i8/mod.rs @@ -0,0 +1,141 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::{expect_computation_error, IntegerTester}, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{I8Type, IntegerType, SignedIntegerType}; + +test_int!( + TestI8, + i8, + IntegerType::Signed(SignedIntegerType::I8Type(I8Type {})), + Int8 +); + +#[test] +fn test_i8_min() { + TestI8::test_min(); +} + +#[test] +fn test_i8_min_fail() { + TestI8::test_min_fail(); +} + +#[test] +fn test_i8_max() { + TestI8::test_max(); +} + +#[test] +fn test_i8_max_fail() { + TestI8::test_max_fail(); +} + +#[test] +fn test_i8_neg() { + TestI8::test_negate(); +} + +#[test] +fn test_i8_neg_max_fail() { + TestI8::test_negate_min_fail(); +} + +#[test] +fn test_i8_neg_zero() { + TestI8::test_negate_zero(); +} + +#[test] +fn test_i8_add() { + TestI8::test_add(); +} + +#[test] +fn test_i8_sub() { + TestI8::test_sub(); +} + +#[test] +fn test_i8_mul() { + TestI8::test_mul(); +} + +#[test] +fn test_i8_div() { + TestI8::test_div(); +} + +#[test] +fn test_i8_pow() { + TestI8::test_pow(); +} + +#[test] +fn test_i8_eq() { + TestI8::test_eq(); +} + +#[test] +fn test_i8_ne() { + TestI8::test_ne(); +} + +#[test] +fn test_i8_ge() { + TestI8::test_ge(); +} + +#[test] +fn test_i8_gt() { + TestI8::test_gt(); +} + +#[test] +fn test_i8_le() { + TestI8::test_le(); +} + +#[test] +fn test_i8_lt() { + TestI8::test_lt(); +} + +#[test] +fn test_i8_console_assert() { + TestI8::test_console_assert(); +} + +#[test] +fn test_i8_ternary() { + TestI8::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/i8/mul.leo b/tests/compiler/integers/i8/mul.leo new file mode 100644 index 0000000000..34726fff92 --- /dev/null +++ b/tests/compiler/integers/i8/mul.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: i8) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/ne.leo b/tests/compiler/integers/i8/ne.leo new file mode 100644 index 0000000000..e5028d404a --- /dev/null +++ b/tests/compiler/integers/i8/ne.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/negate.leo b/tests/compiler/integers/i8/negate.leo new file mode 100644 index 0000000000..2a2266bc56 --- /dev/null +++ b/tests/compiler/integers/i8/negate.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8) { + console.assert(-a == b); +} \ 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..7f664a1b78 --- /dev/null +++ b/tests/compiler/integers/i8/negate_min.leo @@ -0,0 +1,4 @@ +function main() { + const a = -128i8; + const b = -a; +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/negate_zero.leo b/tests/compiler/integers/i8/negate_zero.leo new file mode 100644 index 0000000000..cc3f4a0828 --- /dev/null +++ b/tests/compiler/integers/i8/negate_zero.leo @@ -0,0 +1,5 @@ +function main() { + const a = 0i8; + + console.assert(-a == 0i8); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/no_space_between_literal.leo b/tests/compiler/integers/i8/no_space_between_literal.leo new file mode 100644 index 0000000000..7a8eda7ef9 --- /dev/null +++ b/tests/compiler/integers/i8/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 i8; +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/pow.leo b/tests/compiler/integers/i8/pow.leo new file mode 100644 index 0000000000..18aeb44b46 --- /dev/null +++ b/tests/compiler/integers/i8/pow.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: i8) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/sub.leo b/tests/compiler/integers/i8/sub.leo new file mode 100644 index 0000000000..a795bed153 --- /dev/null +++ b/tests/compiler/integers/i8/sub.leo @@ -0,0 +1,3 @@ +function main(a: i8, b: i8, c: i8) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/i8/ternary.leo b/tests/compiler/integers/i8/ternary.leo new file mode 100644 index 0000000000..0956a9cd39 --- /dev/null +++ b/tests/compiler/integers/i8/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: i8, b: i8, c: i8) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/int_macro.rs b/tests/compiler/integers/int_macro.rs new file mode 100644 index 0000000000..7867961fc4 --- /dev/null +++ b/tests/compiler/integers/int_macro.rs @@ -0,0 +1,538 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +macro_rules! test_int { + ($name: ident, $type_: ty, $integer_type: expr, $gadget: ty) => { + pub struct $name {} + + impl $name { + fn test_negate() { + for _ in 0..10 { + let a: $type_ = rand::random(); + + let b = match a.checked_neg() { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("negate.leo"); + let mut program = parse_program(program_string).unwrap(); + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_negate_min_fail() { + let program_string = include_str!("negate_min.leo"); + let program = parse_program(program_string).unwrap(); + + expect_computation_error(program); + } + + fn test_negate_zero() { + let program_string = include_str!("negate_zero.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); + } + } + + impl IntegerTester for $name { + fn test_min() { + let program_string = include_str!("min.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); + } + + fn test_min_fail() { + let program_string = include_str!("min_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); + } + + fn test_max() { + let program_string = include_str!("max.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); + } + + fn test_max_fail() { + let program_string = include_str!("max_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); + } + + fn test_add() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + let c = match a.checked_add(b) { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("add.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_sub() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + if b.checked_neg().is_none() { + continue; + } + + let c = match a.checked_sub(b) { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("sub.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_mul() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + let c = match a.checked_mul(b) { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("mul.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_div() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // make sure that we can calculate the inverse of each number + // Leo signed integer division is non-wrapping. Thus attempting to calculate a + // division result that wraps should be ignored here. + if a.checked_neg().is_none() { + continue; + } + + let program_string = include_str!("div.leo"); + let mut program = parse_program(program_string).unwrap(); + + // expect an error when dividing by zero + if b == 0 { + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, b.to_string()))), + ]); + + program.set_main_input(main_input); + + expect_compiler_error(program); + } else { + let c = match a.checked_div(b) { + Some(valid) => valid, + None => continue, + }; + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + } + + fn test_pow() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // rust specific conversion see https://doc.rust-lang.org/std/primitive.u8.html#method.checked_pow + let c = match a.checked_pow(b as u32) { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("pow.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_eq() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("eq.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(true))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test not equal + + let c = a.eq(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_ne() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test a != a == false + + let program_string = include_str!("ne.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(false))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test not equal + + let c = a.ne(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_ge() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("ge.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(true))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test greater or equal + + let c = a.ge(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_gt() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("gt.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(false))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test greater than + + let c = a.gt(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_le() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("le.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(true))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test less or equal + + let c = a.le(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_lt() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("lt.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(false))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test less or equal + + let c = a.lt(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_console_assert() { + for _ in 0..10 { + let a: $type_ = rand::random(); + + // test equal + let program_string = include_str!("console_assert.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test not equal + let b: $type_ = rand::random(); + + if a == b { + continue; + } + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ]); + + program.set_main_input(main_input); + + expect_compiler_error(program); + } + } + + fn test_ternary() { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + let program_string = include_str!("ternary.leo"); + let mut program = parse_program(program_string).unwrap(); + + // true -> field 1 + let main_input = generate_main_input(vec![ + ("s", Some(InputValue::Boolean(true))), + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, a.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // false -> field 2 + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("s", Some(InputValue::Boolean(false))), + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, b.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + }; +} diff --git a/tests/compiler/integers/integer_tester.rs b/tests/compiler/integers/integer_tester.rs new file mode 100644 index 0000000000..23085d5aac --- /dev/null +++ b/tests/compiler/integers/integer_tester.rs @@ -0,0 +1,83 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{expect_compiler_error, EdwardsTestCompiler}; +use leo_compiler::errors::{CompilerError, ExpressionError, FunctionError, IntegerError, StatementError}; + +pub trait IntegerTester { + /// Tests defining the smalled value that can be represented by the integer type + fn test_min(); + + /// Tests defining the smallest value - 1 + fn test_min_fail(); + + /// Tests defining the largest value that can be represented by the integer type + fn test_max(); + + /// Tests defining the largest value + 1 + fn test_max_fail(); + + /// Tests a non-wrapping addition + fn test_add(); + + /// Tests a non-wrapping subtraction + fn test_sub(); + + /// Tests a non-wrapping multiplication + fn test_mul(); + + /// Tests a non-wrapping division + fn test_div(); + + /// Tests a non-wrapping exponentiation + fn test_pow(); + + /// Tests == evaluation + fn test_eq(); + + /// Tests != evaluation + fn test_ne(); + + /// Tests >= evaluation + fn test_ge(); + + /// Tests > evaluation + fn test_gt(); + + /// Tests <= evaluation + fn test_le(); + + /// Tests < evaluation + fn test_lt(); + + /// Test assert equals constraint keyword + fn test_console_assert(); + + /// Test ternary if bool ? num_1 : num_2; + fn test_ternary(); +} + +pub(crate) fn expect_computation_error(program: EdwardsTestCompiler) { + match expect_compiler_error(program) { + CompilerError::FunctionError(FunctionError::StatementError(StatementError::ExpressionError( + ExpressionError::IntegerError(IntegerError::Error(_)), + ))) => {} + error => panic!( + "Expected integer computation error such as `DivisionByZero`, found {:?}", + error + ), + } +} diff --git a/tests/compiler/integers/mod.rs b/tests/compiler/integers/mod.rs new file mode 100644 index 0000000000..0cfd4f643c --- /dev/null +++ b/tests/compiler/integers/mod.rs @@ -0,0 +1,37 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +#[macro_use] +pub mod int_macro; + +#[macro_use] +pub mod uint_macro; + +pub mod integer_tester; +pub use self::integer_tester::*; + +// must be below macro definitions! +pub mod u128; +pub mod u16; +pub mod u32; +pub mod u64; +pub mod u8; + +pub mod i128; +pub mod i16; +pub mod i32; +pub mod i64; +pub mod i8; diff --git a/tests/compiler/integers/u128/add.leo b/tests/compiler/integers/u128/add.leo new file mode 100644 index 0000000000..6b32042fd5 --- /dev/null +++ b/tests/compiler/integers/u128/add.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: u128) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/console_assert.leo b/tests/compiler/integers/u128/console_assert.leo new file mode 100644 index 0000000000..adab295385 --- /dev/null +++ b/tests/compiler/integers/u128/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/div.leo b/tests/compiler/integers/u128/div.leo new file mode 100644 index 0000000000..0d62054eca --- /dev/null +++ b/tests/compiler/integers/u128/div.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: u128) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/eq.leo b/tests/compiler/integers/u128/eq.leo new file mode 100644 index 0000000000..2c2acd923a --- /dev/null +++ b/tests/compiler/integers/u128/eq.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/ge.leo b/tests/compiler/integers/u128/ge.leo new file mode 100644 index 0000000000..bff7cd321b --- /dev/null +++ b/tests/compiler/integers/u128/ge.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/gt.leo b/tests/compiler/integers/u128/gt.leo new file mode 100644 index 0000000000..e8aec0faf2 --- /dev/null +++ b/tests/compiler/integers/u128/gt.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/input.leo b/tests/compiler/integers/u128/input.leo new file mode 100644 index 0000000000..adab295385 --- /dev/null +++ b/tests/compiler/integers/u128/input.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/le.leo b/tests/compiler/integers/u128/le.leo new file mode 100644 index 0000000000..c9e4609136 --- /dev/null +++ b/tests/compiler/integers/u128/le.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/lt.leo b/tests/compiler/integers/u128/lt.leo new file mode 100644 index 0000000000..b37057c895 --- /dev/null +++ b/tests/compiler/integers/u128/lt.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/max.leo b/tests/compiler/integers/u128/max.leo new file mode 100644 index 0000000000..b166ede06b --- /dev/null +++ b/tests/compiler/integers/u128/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: u128 = 340282366920938463463374607431768211455; +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/max_fail.leo b/tests/compiler/integers/u128/max_fail.leo new file mode 100644 index 0000000000..f51c967925 --- /dev/null +++ b/tests/compiler/integers/u128/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u128 = 340282366920938463463374607431768211456; +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/min.leo b/tests/compiler/integers/u128/min.leo new file mode 100644 index 0000000000..41fbf1a2fe --- /dev/null +++ b/tests/compiler/integers/u128/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: u128 = 0; +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/min_fail.leo b/tests/compiler/integers/u128/min_fail.leo new file mode 100644 index 0000000000..b0d17191ff --- /dev/null +++ b/tests/compiler/integers/u128/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u128 = -1; +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/mod.rs b/tests/compiler/integers/u128/mod.rs new file mode 100644 index 0000000000..38677dcb29 --- /dev/null +++ b/tests/compiler/integers/u128/mod.rs @@ -0,0 +1,126 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::IntegerTester, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{IntegerType, U128Type, UnsignedIntegerType}; + +test_uint!( + TestU128, + u128, + IntegerType::Unsigned(UnsignedIntegerType::U128Type(U128Type {})), + UInt128 +); + +#[test] +fn test_u128_min() { + TestU128::test_min(); +} + +#[test] +fn test_u128_min_fail() { + TestU128::test_min_fail(); +} + +#[test] +fn test_u128_max() { + TestU128::test_max(); +} + +#[test] +fn test_u128_max_fail() { + TestU128::test_max_fail(); +} + +#[test] +fn test_u128_add() { + TestU128::test_add(); +} + +#[test] +fn test_u128_sub() { + TestU128::test_sub(); +} + +#[test] +fn test_u128_mul() { + TestU128::test_mul(); +} + +#[test] +fn test_u128_div() { + TestU128::test_div(); +} + +#[test] +fn test_u128_pow() { + TestU128::test_pow(); +} + +#[test] +fn test_u128_eq() { + TestU128::test_eq(); +} + +#[test] +fn test_u128_ne() { + TestU128::test_ne(); +} + +#[test] +fn test_u128_ge() { + TestU128::test_ge(); +} + +#[test] +fn test_u128_gt() { + TestU128::test_gt(); +} + +#[test] +fn test_u128_le() { + TestU128::test_le(); +} + +#[test] +fn test_u128_lt() { + TestU128::test_lt(); +} + +#[test] +fn test_u128_console_assert() { + TestU128::test_console_assert(); +} + +#[test] +fn test_u128_ternary() { + TestU128::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/u128/mul.leo b/tests/compiler/integers/u128/mul.leo new file mode 100644 index 0000000000..c7fdc1530c --- /dev/null +++ b/tests/compiler/integers/u128/mul.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: u128) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/ne.leo b/tests/compiler/integers/u128/ne.leo new file mode 100644 index 0000000000..da3467d01e --- /dev/null +++ b/tests/compiler/integers/u128/ne.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/no_space_between_literal.leo b/tests/compiler/integers/u128/no_space_between_literal.leo new file mode 100644 index 0000000000..fc48e7f1ae --- /dev/null +++ b/tests/compiler/integers/u128/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 u128; +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/pow.leo b/tests/compiler/integers/u128/pow.leo new file mode 100644 index 0000000000..27614bfa56 --- /dev/null +++ b/tests/compiler/integers/u128/pow.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: u128) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/sub.leo b/tests/compiler/integers/u128/sub.leo new file mode 100644 index 0000000000..2374413505 --- /dev/null +++ b/tests/compiler/integers/u128/sub.leo @@ -0,0 +1,3 @@ +function main(a: u128, b: u128, c: u128) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u128/ternary.leo b/tests/compiler/integers/u128/ternary.leo new file mode 100644 index 0000000000..99a6b997e0 --- /dev/null +++ b/tests/compiler/integers/u128/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: u128, b: u128, c: u128) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/add.leo b/tests/compiler/integers/u16/add.leo new file mode 100644 index 0000000000..f00701181b --- /dev/null +++ b/tests/compiler/integers/u16/add.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: u16) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/console_assert.leo b/tests/compiler/integers/u16/console_assert.leo new file mode 100644 index 0000000000..761f0639d0 --- /dev/null +++ b/tests/compiler/integers/u16/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/div.leo b/tests/compiler/integers/u16/div.leo new file mode 100644 index 0000000000..f1dd3fa463 --- /dev/null +++ b/tests/compiler/integers/u16/div.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: u16) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/eq.leo b/tests/compiler/integers/u16/eq.leo new file mode 100644 index 0000000000..a4b4e78b49 --- /dev/null +++ b/tests/compiler/integers/u16/eq.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/ge.leo b/tests/compiler/integers/u16/ge.leo new file mode 100644 index 0000000000..4b1da1b27b --- /dev/null +++ b/tests/compiler/integers/u16/ge.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/gt.leo b/tests/compiler/integers/u16/gt.leo new file mode 100644 index 0000000000..2c5ffbe8eb --- /dev/null +++ b/tests/compiler/integers/u16/gt.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/input.leo b/tests/compiler/integers/u16/input.leo new file mode 100644 index 0000000000..761f0639d0 --- /dev/null +++ b/tests/compiler/integers/u16/input.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/le.leo b/tests/compiler/integers/u16/le.leo new file mode 100644 index 0000000000..49713482d0 --- /dev/null +++ b/tests/compiler/integers/u16/le.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/lt.leo b/tests/compiler/integers/u16/lt.leo new file mode 100644 index 0000000000..dae1951231 --- /dev/null +++ b/tests/compiler/integers/u16/lt.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/max.leo b/tests/compiler/integers/u16/max.leo new file mode 100644 index 0000000000..56cb2af18d --- /dev/null +++ b/tests/compiler/integers/u16/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: u16 = 65535; +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/max_fail.leo b/tests/compiler/integers/u16/max_fail.leo new file mode 100644 index 0000000000..bb703210e3 --- /dev/null +++ b/tests/compiler/integers/u16/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u16 = 65536; +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/min.leo b/tests/compiler/integers/u16/min.leo new file mode 100644 index 0000000000..4dee94a1a4 --- /dev/null +++ b/tests/compiler/integers/u16/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: u16 = 0; +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/min_fail.leo b/tests/compiler/integers/u16/min_fail.leo new file mode 100644 index 0000000000..0c61dd7ddf --- /dev/null +++ b/tests/compiler/integers/u16/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u16 = -1; +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/mod.rs b/tests/compiler/integers/u16/mod.rs new file mode 100644 index 0000000000..33f88452c1 --- /dev/null +++ b/tests/compiler/integers/u16/mod.rs @@ -0,0 +1,126 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::IntegerTester, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{IntegerType, U16Type, UnsignedIntegerType}; + +test_uint!( + TestU16, + u16, + IntegerType::Unsigned(UnsignedIntegerType::U16Type(U16Type {})), + UInt16 +); + +#[test] +fn test_u16_min() { + TestU16::test_min(); +} + +#[test] +fn test_u16_min_fail() { + TestU16::test_min_fail(); +} + +#[test] +fn test_u16_max() { + TestU16::test_max(); +} + +#[test] +fn test_u16_max_fail() { + TestU16::test_max_fail(); +} + +#[test] +fn test_u16_add() { + TestU16::test_add(); +} + +#[test] +fn test_u16_sub() { + TestU16::test_sub(); +} + +#[test] +fn test_u16_mul() { + TestU16::test_mul(); +} + +#[test] +fn test_u16_div() { + TestU16::test_div(); +} + +#[test] +fn test_u16_pow() { + TestU16::test_pow(); +} + +#[test] +fn test_u16_eq() { + TestU16::test_eq(); +} + +#[test] +fn test_u16_ne() { + TestU16::test_ne(); +} + +#[test] +fn test_u16_ge() { + TestU16::test_ge(); +} + +#[test] +fn test_u16_gt() { + TestU16::test_gt(); +} + +#[test] +fn test_u16_le() { + TestU16::test_le(); +} + +#[test] +fn test_u16_lt() { + TestU16::test_lt(); +} + +#[test] +fn test_u16_console_assert() { + TestU16::test_console_assert(); +} + +#[test] +fn test_u16_ternary() { + TestU16::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/u16/mul.leo b/tests/compiler/integers/u16/mul.leo new file mode 100644 index 0000000000..f2c6f0aac8 --- /dev/null +++ b/tests/compiler/integers/u16/mul.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: u16) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/ne.leo b/tests/compiler/integers/u16/ne.leo new file mode 100644 index 0000000000..e90a304cfe --- /dev/null +++ b/tests/compiler/integers/u16/ne.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/no_space_between_literal.leo b/tests/compiler/integers/u16/no_space_between_literal.leo new file mode 100644 index 0000000000..34e125cfc6 --- /dev/null +++ b/tests/compiler/integers/u16/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 u16; +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/pow.leo b/tests/compiler/integers/u16/pow.leo new file mode 100644 index 0000000000..564c1c51fe --- /dev/null +++ b/tests/compiler/integers/u16/pow.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: u16) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/sub.leo b/tests/compiler/integers/u16/sub.leo new file mode 100644 index 0000000000..92aae9ac2c --- /dev/null +++ b/tests/compiler/integers/u16/sub.leo @@ -0,0 +1,3 @@ +function main(a: u16, b: u16, c: u16) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u16/ternary.leo b/tests/compiler/integers/u16/ternary.leo new file mode 100644 index 0000000000..d6131f9f4f --- /dev/null +++ b/tests/compiler/integers/u16/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: u16, b: u16, c: u16) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/add.leo b/tests/compiler/integers/u32/add.leo new file mode 100644 index 0000000000..6f6a2454b4 --- /dev/null +++ b/tests/compiler/integers/u32/add.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: u32) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/console_assert.leo b/tests/compiler/integers/u32/console_assert.leo new file mode 100644 index 0000000000..32604eb3b8 --- /dev/null +++ b/tests/compiler/integers/u32/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/div.leo b/tests/compiler/integers/u32/div.leo new file mode 100644 index 0000000000..ed689bd408 --- /dev/null +++ b/tests/compiler/integers/u32/div.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: u32) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/eq.leo b/tests/compiler/integers/u32/eq.leo new file mode 100644 index 0000000000..ca427b3c42 --- /dev/null +++ b/tests/compiler/integers/u32/eq.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/ge.leo b/tests/compiler/integers/u32/ge.leo new file mode 100644 index 0000000000..35c1c71829 --- /dev/null +++ b/tests/compiler/integers/u32/ge.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/gt.leo b/tests/compiler/integers/u32/gt.leo new file mode 100644 index 0000000000..f76df415c4 --- /dev/null +++ b/tests/compiler/integers/u32/gt.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/input.leo b/tests/compiler/integers/u32/input.leo new file mode 100644 index 0000000000..32604eb3b8 --- /dev/null +++ b/tests/compiler/integers/u32/input.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/le.leo b/tests/compiler/integers/u32/le.leo new file mode 100644 index 0000000000..9a802f896d --- /dev/null +++ b/tests/compiler/integers/u32/le.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/lt.leo b/tests/compiler/integers/u32/lt.leo new file mode 100644 index 0000000000..73e5654470 --- /dev/null +++ b/tests/compiler/integers/u32/lt.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/max.leo b/tests/compiler/integers/u32/max.leo new file mode 100644 index 0000000000..4a07281b5d --- /dev/null +++ b/tests/compiler/integers/u32/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: u32 = 4294967295; +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/max_fail.leo b/tests/compiler/integers/u32/max_fail.leo new file mode 100644 index 0000000000..6b1631876e --- /dev/null +++ b/tests/compiler/integers/u32/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u32 = 4294967296; +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/min.leo b/tests/compiler/integers/u32/min.leo new file mode 100644 index 0000000000..8077e0ec02 --- /dev/null +++ b/tests/compiler/integers/u32/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: u32 = 0; +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/min_fail.leo b/tests/compiler/integers/u32/min_fail.leo new file mode 100644 index 0000000000..c3e3f33225 --- /dev/null +++ b/tests/compiler/integers/u32/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u32 = -1; +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/mod.rs b/tests/compiler/integers/u32/mod.rs new file mode 100644 index 0000000000..7f2d76d198 --- /dev/null +++ b/tests/compiler/integers/u32/mod.rs @@ -0,0 +1,126 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::IntegerTester, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{IntegerType, U32Type, UnsignedIntegerType}; + +test_uint!( + TestU32, + u32, + IntegerType::Unsigned(UnsignedIntegerType::U32Type(U32Type {})), + UInt32 +); + +#[test] +fn test_u32_min() { + TestU32::test_min(); +} + +#[test] +fn test_u32_min_fail() { + TestU32::test_min_fail(); +} + +#[test] +fn test_u32_max() { + TestU32::test_max(); +} + +#[test] +fn test_u32_max_fail() { + TestU32::test_max_fail(); +} + +#[test] +fn test_u32_add() { + TestU32::test_add(); +} + +#[test] +fn test_u32_sub() { + TestU32::test_sub(); +} + +#[test] +fn test_u32_mul() { + TestU32::test_mul(); +} + +#[test] +fn test_u32_div() { + TestU32::test_div(); +} + +#[test] +fn test_u32_pow() { + TestU32::test_pow(); +} + +#[test] +fn test_u32_eq() { + TestU32::test_eq(); +} + +#[test] +fn test_u32_ne() { + TestU32::test_ne(); +} + +#[test] +fn test_u32_ge() { + TestU32::test_ge(); +} + +#[test] +fn test_u32_gt() { + TestU32::test_gt(); +} + +#[test] +fn test_u32_le() { + TestU32::test_le(); +} + +#[test] +fn test_u32_lt() { + TestU32::test_lt(); +} + +#[test] +fn test_u32_console_assert() { + TestU32::test_console_assert(); +} + +#[test] +fn test_u32_ternary() { + TestU32::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/u32/mul.leo b/tests/compiler/integers/u32/mul.leo new file mode 100644 index 0000000000..a77a85477b --- /dev/null +++ b/tests/compiler/integers/u32/mul.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: u32) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/ne.leo b/tests/compiler/integers/u32/ne.leo new file mode 100644 index 0000000000..00ee1a9989 --- /dev/null +++ b/tests/compiler/integers/u32/ne.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/no_space_between_literal.leo b/tests/compiler/integers/u32/no_space_between_literal.leo new file mode 100644 index 0000000000..83b3caca55 --- /dev/null +++ b/tests/compiler/integers/u32/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 u32; +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/pow.leo b/tests/compiler/integers/u32/pow.leo new file mode 100644 index 0000000000..b82496ff77 --- /dev/null +++ b/tests/compiler/integers/u32/pow.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: u32) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/sub.leo b/tests/compiler/integers/u32/sub.leo new file mode 100644 index 0000000000..54480bd4bc --- /dev/null +++ b/tests/compiler/integers/u32/sub.leo @@ -0,0 +1,3 @@ +function main(a: u32, b: u32, c: u32) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u32/ternary.leo b/tests/compiler/integers/u32/ternary.leo new file mode 100644 index 0000000000..f32ffc29fe --- /dev/null +++ b/tests/compiler/integers/u32/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: u32, b: u32, c: u32) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/add.leo b/tests/compiler/integers/u64/add.leo new file mode 100644 index 0000000000..28abe51201 --- /dev/null +++ b/tests/compiler/integers/u64/add.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: u64) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/console_assert.leo b/tests/compiler/integers/u64/console_assert.leo new file mode 100644 index 0000000000..ac1d6d40c3 --- /dev/null +++ b/tests/compiler/integers/u64/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/div.leo b/tests/compiler/integers/u64/div.leo new file mode 100644 index 0000000000..059da236bb --- /dev/null +++ b/tests/compiler/integers/u64/div.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: u64) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/eq.leo b/tests/compiler/integers/u64/eq.leo new file mode 100644 index 0000000000..990b2dad2d --- /dev/null +++ b/tests/compiler/integers/u64/eq.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/ge.leo b/tests/compiler/integers/u64/ge.leo new file mode 100644 index 0000000000..46ba36ceff --- /dev/null +++ b/tests/compiler/integers/u64/ge.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/gt.leo b/tests/compiler/integers/u64/gt.leo new file mode 100644 index 0000000000..7d3032c7f5 --- /dev/null +++ b/tests/compiler/integers/u64/gt.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/input.leo b/tests/compiler/integers/u64/input.leo new file mode 100644 index 0000000000..ac1d6d40c3 --- /dev/null +++ b/tests/compiler/integers/u64/input.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/le.leo b/tests/compiler/integers/u64/le.leo new file mode 100644 index 0000000000..625b38d2d9 --- /dev/null +++ b/tests/compiler/integers/u64/le.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/lt.leo b/tests/compiler/integers/u64/lt.leo new file mode 100644 index 0000000000..ed379f7341 --- /dev/null +++ b/tests/compiler/integers/u64/lt.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/max.leo b/tests/compiler/integers/u64/max.leo new file mode 100644 index 0000000000..f14ac7ce64 --- /dev/null +++ b/tests/compiler/integers/u64/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: u64 = 18446744073709551615; +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/max_fail.leo b/tests/compiler/integers/u64/max_fail.leo new file mode 100644 index 0000000000..d606c83585 --- /dev/null +++ b/tests/compiler/integers/u64/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u64 = 18446744073709551616; +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/min.leo b/tests/compiler/integers/u64/min.leo new file mode 100644 index 0000000000..b1da40b14c --- /dev/null +++ b/tests/compiler/integers/u64/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: u64 = 0; +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/min_fail.leo b/tests/compiler/integers/u64/min_fail.leo new file mode 100644 index 0000000000..e58f1897e6 --- /dev/null +++ b/tests/compiler/integers/u64/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u64 = -1; +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/mod.rs b/tests/compiler/integers/u64/mod.rs new file mode 100644 index 0000000000..1a2af24ddd --- /dev/null +++ b/tests/compiler/integers/u64/mod.rs @@ -0,0 +1,126 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::IntegerTester, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{IntegerType, U64Type, UnsignedIntegerType}; + +test_uint!( + TestU64, + u64, + IntegerType::Unsigned(UnsignedIntegerType::U64Type(U64Type {})), + UInt64 +); + +#[test] +fn test_u64_min() { + TestU64::test_min(); +} + +#[test] +fn test_u64_min_fail() { + TestU64::test_min_fail(); +} + +#[test] +fn test_u64_max() { + TestU64::test_max(); +} + +#[test] +fn test_u64_max_fail() { + TestU64::test_max_fail(); +} + +#[test] +fn test_u64_add() { + TestU64::test_add(); +} + +#[test] +fn test_u64_sub() { + TestU64::test_sub(); +} + +#[test] +fn test_u64_mul() { + TestU64::test_mul(); +} + +#[test] +fn test_u64_div() { + TestU64::test_div(); +} + +#[test] +fn test_u64_pow() { + TestU64::test_pow(); +} + +#[test] +fn test_u64_eq() { + TestU64::test_eq(); +} + +#[test] +fn test_u64_ne() { + TestU64::test_ne(); +} + +#[test] +fn test_u64_ge() { + TestU64::test_ge(); +} + +#[test] +fn test_u64_gt() { + TestU64::test_gt(); +} + +#[test] +fn test_u64_le() { + TestU64::test_le(); +} + +#[test] +fn test_u64_lt() { + TestU64::test_lt(); +} + +#[test] +fn test_u64_console_assert() { + TestU64::test_console_assert(); +} + +#[test] +fn test_u64_ternary() { + TestU64::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/u64/mul.leo b/tests/compiler/integers/u64/mul.leo new file mode 100644 index 0000000000..2633e6780c --- /dev/null +++ b/tests/compiler/integers/u64/mul.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: u64) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/ne.leo b/tests/compiler/integers/u64/ne.leo new file mode 100644 index 0000000000..e47acbb1de --- /dev/null +++ b/tests/compiler/integers/u64/ne.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/no_space_between_literal.leo b/tests/compiler/integers/u64/no_space_between_literal.leo new file mode 100644 index 0000000000..852fd5c2aa --- /dev/null +++ b/tests/compiler/integers/u64/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 u64; +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/pow.leo b/tests/compiler/integers/u64/pow.leo new file mode 100644 index 0000000000..64f0694ed1 --- /dev/null +++ b/tests/compiler/integers/u64/pow.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: u64) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/sub.leo b/tests/compiler/integers/u64/sub.leo new file mode 100644 index 0000000000..9961f0f7b7 --- /dev/null +++ b/tests/compiler/integers/u64/sub.leo @@ -0,0 +1,3 @@ +function main(a: u64, b: u64, c: u64) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u64/ternary.leo b/tests/compiler/integers/u64/ternary.leo new file mode 100644 index 0000000000..4427cd0466 --- /dev/null +++ b/tests/compiler/integers/u64/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: u64, b: u64, c: u64) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/add.leo b/tests/compiler/integers/u8/add.leo new file mode 100644 index 0000000000..1b40e304d2 --- /dev/null +++ b/tests/compiler/integers/u8/add.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: u8) { + console.assert(a + b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/console_assert.leo b/tests/compiler/integers/u8/console_assert.leo new file mode 100644 index 0000000000..4d99dc106c --- /dev/null +++ b/tests/compiler/integers/u8/console_assert.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/div.leo b/tests/compiler/integers/u8/div.leo new file mode 100644 index 0000000000..945aa94c30 --- /dev/null +++ b/tests/compiler/integers/u8/div.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: u8) { + console.assert(a / b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/eq.leo b/tests/compiler/integers/u8/eq.leo new file mode 100644 index 0000000000..c2a487b0e7 --- /dev/null +++ b/tests/compiler/integers/u8/eq.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: bool) { + console.assert(a == b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/ge.leo b/tests/compiler/integers/u8/ge.leo new file mode 100644 index 0000000000..d819422276 --- /dev/null +++ b/tests/compiler/integers/u8/ge.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: bool) { + console.assert(a >= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/gt.leo b/tests/compiler/integers/u8/gt.leo new file mode 100644 index 0000000000..87843f575f --- /dev/null +++ b/tests/compiler/integers/u8/gt.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: bool) { + console.assert(a > b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/input.leo b/tests/compiler/integers/u8/input.leo new file mode 100644 index 0000000000..4d99dc106c --- /dev/null +++ b/tests/compiler/integers/u8/input.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8) { + console.assert(a == b); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/le.leo b/tests/compiler/integers/u8/le.leo new file mode 100644 index 0000000000..2607b7f3d1 --- /dev/null +++ b/tests/compiler/integers/u8/le.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: bool) { + console.assert(a <= b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/lt.leo b/tests/compiler/integers/u8/lt.leo new file mode 100644 index 0000000000..7495d0fe37 --- /dev/null +++ b/tests/compiler/integers/u8/lt.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: bool) { + console.assert(a < b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/max.leo b/tests/compiler/integers/u8/max.leo new file mode 100644 index 0000000000..03e82c9a5e --- /dev/null +++ b/tests/compiler/integers/u8/max.leo @@ -0,0 +1,3 @@ +function main() { + const a: u8 = 255; +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/max_fail.leo b/tests/compiler/integers/u8/max_fail.leo new file mode 100644 index 0000000000..01bb544601 --- /dev/null +++ b/tests/compiler/integers/u8/max_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u8 = 256; +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/min.leo b/tests/compiler/integers/u8/min.leo new file mode 100644 index 0000000000..1db08a07b5 --- /dev/null +++ b/tests/compiler/integers/u8/min.leo @@ -0,0 +1,3 @@ +function main() { + const a: u8 = 0; +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/min_fail.leo b/tests/compiler/integers/u8/min_fail.leo new file mode 100644 index 0000000000..3cd8d46de7 --- /dev/null +++ b/tests/compiler/integers/u8/min_fail.leo @@ -0,0 +1,3 @@ +function main() { + const a: u8 = -1; +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/mod.rs b/tests/compiler/integers/u8/mod.rs new file mode 100644 index 0000000000..f1fb2b0fab --- /dev/null +++ b/tests/compiler/integers/u8/mod.rs @@ -0,0 +1,126 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{ + assert_satisfied, + expect_asg_error, + expect_compiler_error, + generate_main_input, + integers::IntegerTester, + parse_program, +}; +use leo_ast::InputValue; +use leo_input::types::{IntegerType, U8Type, UnsignedIntegerType}; + +test_uint!( + TestU8, + u8, + IntegerType::Unsigned(UnsignedIntegerType::U8Type(U8Type {})), + UInt8 +); + +#[test] +fn test_u8_min() { + TestU8::test_min(); +} + +#[test] +fn test_u8_min_fail() { + TestU8::test_min_fail(); +} + +#[test] +fn test_u8_max() { + TestU8::test_max(); +} + +#[test] +fn test_u8_max_fail() { + TestU8::test_max_fail(); +} + +#[test] +fn test_u8_add() { + TestU8::test_add(); +} + +#[test] +fn test_u8_sub() { + TestU8::test_sub(); +} + +#[test] +fn test_u8_mul() { + TestU8::test_mul(); +} + +#[test] +fn test_u8_div() { + TestU8::test_div(); +} + +#[test] +fn test_u8_pow() { + TestU8::test_pow(); +} + +#[test] +fn test_u8_eq() { + TestU8::test_eq(); +} + +#[test] +fn test_u8_ne() { + TestU8::test_ne(); +} + +#[test] +fn test_u8_ge() { + TestU8::test_ge(); +} + +#[test] +fn test_u8_gt() { + TestU8::test_gt(); +} + +#[test] +fn test_u8_le() { + TestU8::test_le(); +} + +#[test] +fn test_u8_lt() { + TestU8::test_lt(); +} + +#[test] +fn test_u8_console_assert() { + TestU8::test_console_assert(); +} + +#[test] +fn test_u8_ternary() { + TestU8::test_ternary(); +} + +#[test] +fn test_no_space_between_literal() { + let program_string = include_str!("no_space_between_literal.leo"); + let program = parse_program(program_string); + + assert!(program.is_err()); +} diff --git a/tests/compiler/integers/u8/mul.leo b/tests/compiler/integers/u8/mul.leo new file mode 100644 index 0000000000..11acf4688b --- /dev/null +++ b/tests/compiler/integers/u8/mul.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: u8) { + console.assert(a * b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/ne.leo b/tests/compiler/integers/u8/ne.leo new file mode 100644 index 0000000000..e75194a2f2 --- /dev/null +++ b/tests/compiler/integers/u8/ne.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: bool) { + console.assert(a != b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/no_space_between_literal.leo b/tests/compiler/integers/u8/no_space_between_literal.leo new file mode 100644 index 0000000000..64eba2a083 --- /dev/null +++ b/tests/compiler/integers/u8/no_space_between_literal.leo @@ -0,0 +1,3 @@ +function main() { + const i = 1 u8; +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/pow.leo b/tests/compiler/integers/u8/pow.leo new file mode 100644 index 0000000000..928ab73b0d --- /dev/null +++ b/tests/compiler/integers/u8/pow.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: u8) { + console.assert(a ** b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/sub.leo b/tests/compiler/integers/u8/sub.leo new file mode 100644 index 0000000000..1335409c29 --- /dev/null +++ b/tests/compiler/integers/u8/sub.leo @@ -0,0 +1,3 @@ +function main(a: u8, b: u8, c: u8) { + console.assert(a - b == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/u8/ternary.leo b/tests/compiler/integers/u8/ternary.leo new file mode 100644 index 0000000000..5123a511cd --- /dev/null +++ b/tests/compiler/integers/u8/ternary.leo @@ -0,0 +1,5 @@ +function main(s: bool, a: u8, b: u8, c: u8) { + const r = s ? a : b; + + console.assert(r == c); +} \ No newline at end of file diff --git a/tests/compiler/integers/uint_macro.rs b/tests/compiler/integers/uint_macro.rs new file mode 100644 index 0000000000..393ed1c7a6 --- /dev/null +++ b/tests/compiler/integers/uint_macro.rs @@ -0,0 +1,476 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +macro_rules! test_uint { + ($name: ident, $type_: ty, $integer_type: expr, $gadget: ty) => { + pub struct $name {} + + impl IntegerTester for $name { + fn test_min() { + let program_string = include_str!("min.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); + } + + fn test_min_fail() { + let program_string = include_str!("min_fail.leo"); + let program = parse_program(program_string).err().unwrap(); + + expect_asg_error(program); + } + + fn test_max() { + let program_string = include_str!("max.leo"); + let error = parse_program(program_string).unwrap(); + + assert_satisfied(error); + } + + fn test_max_fail() { + let program_string = include_str!("max_fail.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); + } + + fn test_add() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + let c = match a.checked_add(b) { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("add.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_sub() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + let c = match a.checked_sub(b) { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("sub.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_mul() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + let c = match a.checked_mul(b) { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("mul.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_div() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + let c = match a.checked_div(b) { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("div.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_pow() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // rust specific conversion see https://doc.rust-lang.org/std/primitive.u8.html#method.checked_pow + let c = match a.checked_pow(b as u32) { + Some(valid) => valid, + None => continue, + }; + + let program_string = include_str!("pow.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, c.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_eq() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("eq.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(true))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test not equal + + let c = a.eq(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_ne() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test a != a == false + + let program_string = include_str!("ne.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(false))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test not equal + + let c = a.ne(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_ge() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("ge.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(true))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test greater or equal + + let c = a.ge(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_gt() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("gt.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(false))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test greater than + + let c = a.gt(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_le() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("le.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(true))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test less or equal + + let c = a.le(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_lt() { + for _ in 0..10 { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + // test equal + + let program_string = include_str!("lt.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ("c", Some(InputValue::Boolean(false))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test less or equal + + let c = a.lt(&b); + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Boolean(c))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + + fn test_console_assert() { + for _ in 0..10 { + let a: $type_ = rand::random(); + + // test equal + let program_string = include_str!("console_assert.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, a.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // test not equal + let b: $type_ = rand::random(); + + if a == b { + continue; + } + + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ]); + + program.set_main_input(main_input); + + expect_compiler_error(program); + } + } + + fn test_ternary() { + let a: $type_ = rand::random(); + let b: $type_ = rand::random(); + + let program_string = include_str!("ternary.leo"); + let mut program = parse_program(program_string).unwrap(); + + // true -> field 1 + let main_input = generate_main_input(vec![ + ("s", Some(InputValue::Boolean(true))), + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, a.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + + // false -> field 2 + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![ + ("s", Some(InputValue::Boolean(false))), + ("a", Some(InputValue::Integer($integer_type, a.to_string()))), + ("b", Some(InputValue::Integer($integer_type, b.to_string()))), + ("c", Some(InputValue::Integer($integer_type, b.to_string()))), + ]); + + program.set_main_input(main_input); + + assert_satisfied(program); + } + } + }; +} diff --git a/tests/compiler/mutability/array.leo b/tests/compiler/mutability/array.leo new file mode 100644 index 0000000000..ea63baaad2 --- /dev/null +++ b/tests/compiler/mutability/array.leo @@ -0,0 +1,5 @@ +// Arrays are immutable by default. +function main() { + const a = [1u32]; + a[0] = 0; +} \ No newline at end of file diff --git a/tests/compiler/mutability/array_mut.leo b/tests/compiler/mutability/array_mut.leo new file mode 100644 index 0000000000..5d4db3b68a --- /dev/null +++ b/tests/compiler/mutability/array_mut.leo @@ -0,0 +1,7 @@ +// Adding the `mut` keyword makes an array variable mutable. +function main() { + let a = [1u32]; + a[0] = 0; + + console.assert(a[0] == 0u32); +} \ No newline at end of file diff --git a/tests/compiler/mutability/array_splice_mut.leo b/tests/compiler/mutability/array_splice_mut.leo new file mode 100644 index 0000000000..d13216600a --- /dev/null +++ b/tests/compiler/mutability/array_splice_mut.leo @@ -0,0 +1,9 @@ +// Adding the `mut` keyword makes an array variable mutable. +function main() { + let a = [1u32, 2u32, 3u32]; + a[0u32..2u32] = [4u32, 5u32]; + + console.assert(a[0] == 4u32); + console.assert(a[1] == 5u32); + console.assert(a[2] == 3u32); +} \ No newline at end of file diff --git a/tests/compiler/mutability/array_tuple_mut.leo b/tests/compiler/mutability/array_tuple_mut.leo new file mode 100644 index 0000000000..ed323d46da --- /dev/null +++ b/tests/compiler/mutability/array_tuple_mut.leo @@ -0,0 +1,8 @@ +// Adding the `mut` keyword makes an array variable mutable. +function main() { + let a = [(1u32, 2u32)]; + a[0u32].1 = 3u32; + + console.assert(a[0u32].0 == 1u32); + console.assert(a[0u32].1 == 3u32); +} \ No newline at end of file diff --git a/tests/compiler/mutability/circuit.leo b/tests/compiler/mutability/circuit.leo new file mode 100644 index 0000000000..508595ef16 --- /dev/null +++ b/tests/compiler/mutability/circuit.leo @@ -0,0 +1,9 @@ +// Circuits are immutable by default. +circuit Foo { + x: u32 +} + +function main() { + const a = Foo { x: 1 }; + a.x = 0; +} \ No newline at end of file diff --git a/tests/compiler/mutability/circuit_function_mut.leo b/tests/compiler/mutability/circuit_function_mut.leo new file mode 100644 index 0000000000..c1bc941c94 --- /dev/null +++ b/tests/compiler/mutability/circuit_function_mut.leo @@ -0,0 +1,9 @@ +// Adding the `mut` keyword makes a circuit variable mutable. +circuit Foo { + function bar() {} +} + +function main() { + let a = Foo { x: 1 }; + a.bar = 0; +} \ No newline at end of file diff --git a/tests/compiler/mutability/circuit_mut.leo b/tests/compiler/mutability/circuit_mut.leo new file mode 100644 index 0000000000..f7067db11e --- /dev/null +++ b/tests/compiler/mutability/circuit_mut.leo @@ -0,0 +1,11 @@ +// Adding the `mut` keyword makes a circuit variable mutable. +circuit Foo { + x: u32 +} + +function main() { + let a = Foo { x: 1 }; + a.x = 0; + + console.assert(a.x == 0u32); +} \ No newline at end of file diff --git a/tests/compiler/mutability/circuit_static_function_mut.leo b/tests/compiler/mutability/circuit_static_function_mut.leo new file mode 100644 index 0000000000..c1bc941c94 --- /dev/null +++ b/tests/compiler/mutability/circuit_static_function_mut.leo @@ -0,0 +1,9 @@ +// Adding the `mut` keyword makes a circuit variable mutable. +circuit Foo { + function bar() {} +} + +function main() { + let a = Foo { x: 1 }; + a.bar = 0; +} \ No newline at end of file diff --git a/tests/compiler/mutability/circuit_variable_mut.leo b/tests/compiler/mutability/circuit_variable_mut.leo new file mode 100644 index 0000000000..f7067db11e --- /dev/null +++ b/tests/compiler/mutability/circuit_variable_mut.leo @@ -0,0 +1,11 @@ +// Adding the `mut` keyword makes a circuit variable mutable. +circuit Foo { + x: u32 +} + +function main() { + let a = Foo { x: 1 }; + a.x = 0; + + console.assert(a.x == 0u32); +} \ No newline at end of file diff --git a/tests/compiler/mutability/cond_mut.leo b/tests/compiler/mutability/cond_mut.leo new file mode 100644 index 0000000000..11e19b2645 --- /dev/null +++ b/tests/compiler/mutability/cond_mut.leo @@ -0,0 +1,7 @@ +function main () { + let x = 100i8; + if false { + x = 1i8; + x *= 100i8; + } +} \ No newline at end of file diff --git a/tests/compiler/mutability/const.leo b/tests/compiler/mutability/const.leo new file mode 100644 index 0000000000..6201e7c5af --- /dev/null +++ b/tests/compiler/mutability/const.leo @@ -0,0 +1,5 @@ +// Let variables are immutable by default. +function main() { + const a = 1u32; + a = 0; +} \ No newline at end of file diff --git a/tests/compiler/mutability/function_input.leo b/tests/compiler/mutability/function_input.leo new file mode 100644 index 0000000000..18d035574b --- /dev/null +++ b/tests/compiler/mutability/function_input.leo @@ -0,0 +1,4 @@ +// Const function input are immutable. +function main(const a: bool) { + a = false; +} \ No newline at end of file diff --git a/tests/compiler/mutability/function_input_mut.leo b/tests/compiler/mutability/function_input_mut.leo new file mode 100644 index 0000000000..98739d78c7 --- /dev/null +++ b/tests/compiler/mutability/function_input_mut.leo @@ -0,0 +1,6 @@ +// Function input are mutable by default. +function main(a: bool) { + a = true; + + console.assert(a == true); +} \ No newline at end of file diff --git a/tests/compiler/mutability/let.leo b/tests/compiler/mutability/let.leo new file mode 100644 index 0000000000..105730adb7 --- /dev/null +++ b/tests/compiler/mutability/let.leo @@ -0,0 +1,5 @@ +// Variables are immutable by default. +function main() { + const a = 1u32; + a = 0; +} \ No newline at end of file diff --git a/tests/compiler/mutability/let_mut.leo b/tests/compiler/mutability/let_mut.leo new file mode 100644 index 0000000000..cd1060d0d2 --- /dev/null +++ b/tests/compiler/mutability/let_mut.leo @@ -0,0 +1,7 @@ +// Adding the `mut` keyword makes a variable mutable. +function main() { + let a = 1u32; + a = 0; + + console.assert(a == 0u32); +} \ No newline at end of file diff --git a/tests/compiler/mutability/let_mut_nested.leo b/tests/compiler/mutability/let_mut_nested.leo new file mode 100644 index 0000000000..93236ef4c6 --- /dev/null +++ b/tests/compiler/mutability/let_mut_nested.leo @@ -0,0 +1,5 @@ +function main () { + let x = 2u8; + let y = x; + const z = y / 2u8; +} \ No newline at end of file diff --git a/tests/compiler/mutability/mod.rs b/tests/compiler/mutability/mod.rs new file mode 100644 index 0000000000..e0df21fb4e --- /dev/null +++ b/tests/compiler/mutability/mod.rs @@ -0,0 +1,157 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, expect_asg_error, generate_main_input, parse_program}; +use leo_ast::InputValue; + +#[test] +fn test_let() { + let program_string = include_str!("let.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_let_mut() { + let program_string = include_str!("let_mut.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_let_mut_nested() { + let program_string = include_str!("let_mut_nested.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_const_fail() { + let program_string = include_str!("const.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_cond_mut() { + let program_string = include_str!("cond_mut.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_array() { + let program_string = include_str!("array.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_array_mut() { + let program_string = include_str!("array_mut.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_array_tuple_mut() { + let bytes = include_str!("array_tuple_mut.leo"); + let program = parse_program(bytes).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_array_splice_mut() { + let bytes = include_str!("array_splice_mut.leo"); + let program = parse_program(bytes).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_circuit() { + let program_string = include_str!("circuit.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_circuit_mut() { + let program_string = include_str!("circuit_mut.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_circuit_variable_mut() { + let program_string = include_str!("circuit_variable_mut.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} + +#[test] +fn test_circuit_function_mut() { + let program_string = include_str!("circuit_function_mut.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_circuit_static_function_mut() { + let program_string = include_str!("circuit_static_function_mut.leo"); + let error = parse_program(program_string).err().unwrap(); + + expect_asg_error(error); +} + +#[test] +fn test_function_input() { + let program_string = include_str!("function_input.leo"); + let error = parse_program(program_string).err().unwrap(); + expect_asg_error(error); +} + +#[test] +fn test_function_input_mut() { + let program_string = include_str!("function_input_mut.leo"); + let mut program = parse_program(program_string).unwrap(); + + let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(true)))]); + + program.set_main_input(main_input); + + assert_satisfied(program); +} + +#[test] +fn test_swap() { + let program_string = include_str!("swap.leo"); + let program = parse_program(program_string).unwrap(); + + assert_satisfied(program); +} diff --git a/tests/compiler/mutability/swap.leo b/tests/compiler/mutability/swap.leo new file mode 100644 index 0000000000..d0d663ea1a --- /dev/null +++ b/tests/compiler/mutability/swap.leo @@ -0,0 +1,20 @@ +// Swap two elements of an array. +function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] { + const t = a[i]; + a[i] = a[j]; + a[j] = t; + return a; +} + +function main() { + let arr: [u32; 2] = [0, 1]; + const expected: [u32; 2] = [1, 0]; + + // Do swap. + const actual = swap(arr, 0, 1); + + // Check result. + for i in 0..2 { + console.assert(expected[i] == actual[i]); + } +} \ No newline at end of file diff --git a/tests/compiler/statements/block.leo b/tests/compiler/statements/block.leo new file mode 100644 index 0000000000..4891a44827 --- /dev/null +++ b/tests/compiler/statements/block.leo @@ -0,0 +1,15 @@ +/* +namespace: Compile +expectation: Pass +input_file: u32_3.in +*/ + +function main(x: u32) -> bool { + let y = x; + + { + y += 5u32; + } + + return y == 8; +} \ No newline at end of file diff --git a/tests/compiler/statements/chain.leo b/tests/compiler/statements/chain.leo new file mode 100644 index 0000000000..ab79ae4647 --- /dev/null +++ b/tests/compiler/statements/chain.leo @@ -0,0 +1,21 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - u32_3.in + - u32_5.in + - u32_6.in +*/ + +function main(x: u32) -> bool { + let c = 0u32; + + if x == 1 { + c = 1; + } else if x == 2 { + c = 2; + } else { + c = 3; + } + return c == x; +} diff --git a/tests/compiler/statements/for_loop.leo b/tests/compiler/statements/for_loop.leo new file mode 100644 index 0000000000..5baba77b5d --- /dev/null +++ b/tests/compiler/statements/for_loop.leo @@ -0,0 +1,19 @@ +/* +namespace: Compile +expectation: Pass +input_file: u32_3.in +*/ + +function main(x: u32) -> bool { + let b = 0u32; + + if x == 3 { + for i in 0..4 { + b += i; + } + } + + const r: u32 = x == 3 ? 6 : 0; + + return r == b; +} diff --git a/tests/compiler/statements/iteration_basic.leo b/tests/compiler/statements/iteration_basic.leo new file mode 100644 index 0000000000..5de135bba2 --- /dev/null +++ b/tests/compiler/statements/iteration_basic.leo @@ -0,0 +1,15 @@ +/* +namespace: Compile +expectation: Pass +input_file: u32_3.in +*/ + +function main(x: u32) -> bool { + let y = x; + + for i in 0..3 { + y -= 1; + } + + return y == 0; +} diff --git a/tests/compiler/statements/iteration_variable.leo b/tests/compiler/statements/iteration_variable.leo new file mode 100644 index 0000000000..34aa827afc --- /dev/null +++ b/tests/compiler/statements/iteration_variable.leo @@ -0,0 +1,16 @@ +/* +namespace: Compile +expectation: Pass +input_file: 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/statements/multiple_returns.leo b/tests/compiler/statements/multiple_returns.leo new file mode 100644 index 0000000000..14b70341c0 --- /dev/null +++ b/tests/compiler/statements/multiple_returns.leo @@ -0,0 +1,15 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - u32_3.in + - u32_5.in +*/ + +function main(x: u32) -> bool { + if x == 3 { + return true; + } else { + return false; + } +} diff --git a/tests/compiler/statements/mutate.leo b/tests/compiler/statements/mutate.leo new file mode 100644 index 0000000000..dc337ac723 --- /dev/null +++ b/tests/compiler/statements/mutate.leo @@ -0,0 +1,23 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - u32_3.in + - u32_5.in +*/ + +function main(x: u32) -> bool { + let b = 5u32; + + if x == 3 { + b = 1; + } else { + b = 0; + } + + if x == 3 { + return (b == 1); + } else { + return (b == 0); + } +} diff --git a/tests/compiler/statements/nested_mutate.leo b/tests/compiler/statements/nested_mutate.leo new file mode 100644 index 0000000000..2b3cac1a9e --- /dev/null +++ b/tests/compiler/statements/nested_mutate.leo @@ -0,0 +1,21 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - u32_3.in + - u32_5.in + - u32_6.in +*/ + +function main(x: u32) -> bool { + let d = x; + + if x == 3 || x == 5 { + d += 1; + if x == 3 { + d += 2; + } + } + + return d > x; +} \ No newline at end of file diff --git a/tests/compiler/statements/u32_3.in b/tests/compiler/statements/u32_3.in new file mode 100644 index 0000000000..f187dd41f7 --- /dev/null +++ b/tests/compiler/statements/u32_3.in @@ -0,0 +1,5 @@ +[main] +x: u32 = 3; + +[registers] +a: bool = false; \ No newline at end of file diff --git a/tests/compiler/statements/u32_5.in b/tests/compiler/statements/u32_5.in new file mode 100644 index 0000000000..e62a4b58db --- /dev/null +++ b/tests/compiler/statements/u32_5.in @@ -0,0 +1,5 @@ +[main] +x: u32 = 5; + +[registers] +a: bool = false; \ No newline at end of file diff --git a/tests/compiler/statements/u32_6.in b/tests/compiler/statements/u32_6.in new file mode 100644 index 0000000000..1f8c86d85a --- /dev/null +++ b/tests/compiler/statements/u32_6.in @@ -0,0 +1,5 @@ +[main] +x: u32 = 6; + +[registers] +a: bool = false; \ No newline at end of file diff --git a/tests/compiler/tuples/basic.leo b/tests/compiler/tuples/basic.leo new file mode 100644 index 0000000000..3a9b0e414c --- /dev/null +++ b/tests/compiler/tuples/basic.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/true_true.in +*/ + +function main(a: (bool, bool)) -> (bool, bool) { + const a = (true, false); + + return (a.0, a.1); +} \ No newline at end of file diff --git a/tests/compiler/tuples/dependent.leo b/tests/compiler/tuples/dependent.leo new file mode 100644 index 0000000000..37bcbb738b --- /dev/null +++ b/tests/compiler/tuples/dependent.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/true_true.in +*/ + +function main(a: (bool, bool)) -> (bool, bool) { + const a = (a.0 ? false : true, a.1 ? false : true); + + return (a.0, a.1); +} \ No newline at end of file diff --git a/tests/compiler/tuples/destructured.leo b/tests/compiler/tuples/destructured.leo new file mode 100644 index 0000000000..d3780b496e --- /dev/null +++ b/tests/compiler/tuples/destructured.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/true_true.in +*/ + +function main(a: (bool, bool)) -> (bool, bool) { + const (a, b) = (a.0 ? false : true, a.1 ? false : true); + + return (b, a); +} \ No newline at end of file diff --git a/tests/compiler/tuples/inputs/true_true.in b/tests/compiler/tuples/inputs/true_true.in new file mode 100644 index 0000000000..f8671a956f --- /dev/null +++ b/tests/compiler/tuples/inputs/true_true.in @@ -0,0 +1,6 @@ +[main] +a: (bool, bool) = (false, true); + +[registers] +b: bool = true; +c: bool = false; \ No newline at end of file diff --git a/tests/compiler/tuples/nested_access.leo b/tests/compiler/tuples/nested_access.leo new file mode 100644 index 0000000000..424ba47822 --- /dev/null +++ b/tests/compiler/tuples/nested_access.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: inputs/true_true.in +*/ + +function main(a: (bool, bool)) -> (bool, bool) { + const b = (a, false); + + return (b.1 || b.0.0, b.1 && b.0.1); +} \ No newline at end of file diff --git a/tests/expectations/compiler/compiler/address/equal.leo.out b/tests/expectations/compiler/compiler/address/equal.leo.out new file mode 100644 index 0000000000..6a14ab2a43 --- /dev/null +++ b/tests/expectations/compiler/compiler/address/equal.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 511 + num_constraints: 511 + at: 61e8ee994e9e7edc1f84fa3cbe8c421ade231189b9ddf6a9a75eeef9915c20f7 + bt: 2194515882da93c79fa24d47c40fddc44f0284da25da7b89efb935c0ea7382f8 + ct: a0736e8c8f3bb1c39a147348754e53dfd31fd76a1df9cd9960472841bcc531df + output: + - input_file: address1.in + output: + registers: + a: + type: bool + value: "true" + - input_file: address2.in + output: + registers: + a: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/address/ternary.leo.out b/tests/expectations/compiler/compiler/address/ternary.leo.out new file mode 100644 index 0000000000..d257950701 --- /dev/null +++ b/tests/expectations/compiler/compiler/address/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1022 + num_constraints: 1022 + at: 1b42ef63a212d2ea51cab07171c8fb1438112afdbd14501470c2477b9eeb4c99 + bt: 15054154626f1ae748008fc4ed9a650c3873b608988ff31312fe4049957dfffb + ct: dbda9de51fe9897456cbbcc3b450ed7d66185fb6018c7a0c72414784f29b2ad4 + output: + - input_file: address1.in + output: + registers: + a: + type: bool + value: "false" + - input_file: address2.in + output: + registers: + a: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/array/equal_initializer.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out new file mode 100644 index 0000000000..6f0788716e --- /dev/null +++ b/tests/expectations/compiler/compiler/array/equal_initializer.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 95 + num_constraints: 95 + at: 5884e806c47756fa1d12f47e5cc5249843d8de4e2fafcb373c5a0d67dfe22d69 + bt: 983c734b40e342144d6b4d52e315da9ff9f97580f019f606403924bb977a5be7 + ct: 49f0db71bd29b80dbe5f2f96573a5959b1df339c92350e16f111bade214037aa + output: + - input_file: input/six_zeros.in + output: + registers: + x: + type: bool + value: "true" + - input_file: input/count_to_6.in + output: + registers: + x: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out new file mode 100644 index 0000000000..7807e58816 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/equal_initializer_2.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 95 + num_constraints: 95 + at: 9273b9ab94dee8605c4f1e49fe99910f674468f5026b8d2c48ecaa4d8c006f3a + bt: a3614a9ddd1ae0fde16a61336aba5a02b44816b3e43e23c7b9663976319bcb8a + ct: 49f0db71bd29b80dbe5f2f96573a5959b1df339c92350e16f111bade214037aa + output: + - input_file: input/six_zeros.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/count_to_6.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/boolean/and.leo.out b/tests/expectations/compiler/compiler/boolean/and.leo.out new file mode 100644 index 0000000000..ff5f7b11f7 --- /dev/null +++ b/tests/expectations/compiler/compiler/boolean/and.leo.out @@ -0,0 +1,36 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3 + num_constraints: 3 + at: bbd0722c65502a4b903833f9ff9e614e877f9b5c58c670593e2aa290d0457b2f + bt: 49e8fa1fd3f85b0f486c49f194e4fff3da5e8039685fca1f3327389cbe9fc180 + ct: ae5c1ab4ec8811a2ec2efb38b91ab4a8b6fb80bd914b31f9a70559531aeb6a46 + output: + - input_file: input/false_false.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/false_true.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/true_false.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/true_true.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/boolean/conditional.leo.out b/tests/expectations/compiler/compiler/boolean/conditional.leo.out new file mode 100644 index 0000000000..ff5f7b11f7 --- /dev/null +++ b/tests/expectations/compiler/compiler/boolean/conditional.leo.out @@ -0,0 +1,36 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3 + num_constraints: 3 + at: bbd0722c65502a4b903833f9ff9e614e877f9b5c58c670593e2aa290d0457b2f + bt: 49e8fa1fd3f85b0f486c49f194e4fff3da5e8039685fca1f3327389cbe9fc180 + ct: ae5c1ab4ec8811a2ec2efb38b91ab4a8b6fb80bd914b31f9a70559531aeb6a46 + output: + - input_file: input/false_false.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/false_true.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/true_false.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/true_true.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/boolean/equal.leo.out b/tests/expectations/compiler/compiler/boolean/equal.leo.out new file mode 100644 index 0000000000..76953125e0 --- /dev/null +++ b/tests/expectations/compiler/compiler/boolean/equal.leo.out @@ -0,0 +1,36 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3 + num_constraints: 3 + at: d4e77c2cd10c964fbbc4ad4f374dc36b3a6bc7d6865b87ec5234076348308c2c + bt: 49e8fa1fd3f85b0f486c49f194e4fff3da5e8039685fca1f3327389cbe9fc180 + ct: 7ca43d5c34997f3c866631161cb33186cc016972238c07771ae105ca1b05320d + output: + - input_file: input/false_false.in + output: + registers: + x: + type: bool + value: "true" + - input_file: input/false_true.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/true_false.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/true_true.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/boolean/not_equal.leo.out b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out new file mode 100644 index 0000000000..0192013865 --- /dev/null +++ b/tests/expectations/compiler/compiler/boolean/not_equal.leo.out @@ -0,0 +1,36 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3 + num_constraints: 3 + at: d4e77c2cd10c964fbbc4ad4f374dc36b3a6bc7d6865b87ec5234076348308c2c + bt: 49e8fa1fd3f85b0f486c49f194e4fff3da5e8039685fca1f3327389cbe9fc180 + ct: 7ca43d5c34997f3c866631161cb33186cc016972238c07771ae105ca1b05320d + output: + - input_file: input/false_false.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/false_true.in + output: + registers: + x: + type: bool + value: "true" + - input_file: input/true_false.in + output: + registers: + x: + type: bool + value: "true" + - input_file: input/true_true.in + output: + registers: + x: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/boolean/or.leo.out b/tests/expectations/compiler/compiler/boolean/or.leo.out new file mode 100644 index 0000000000..06f1cbad2f --- /dev/null +++ b/tests/expectations/compiler/compiler/boolean/or.leo.out @@ -0,0 +1,36 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3 + num_constraints: 3 + at: 1df8316bf2fa59a7a92242252ec3c26a425f07212a4c716b2fefd4ddabc2d773 + bt: b95daadce52bb9a3b59565f7078664afbebde46b9b5d6a187e4877926e7a506c + ct: fc07ea064122a2b3be5414ded4cd1e51e3aef7240ad33c8888d757909e9c2c07 + output: + - input_file: input/false_false.in + output: + registers: + x: + type: bool + value: "false" + - input_file: input/false_true.in + output: + registers: + x: + type: bool + value: "true" + - input_file: input/true_false.in + output: + registers: + x: + type: bool + value: "true" + - input_file: input/true_true.in + output: + registers: + x: + type: bool + value: "true" 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..8d06221d84 --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/block.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 96 + num_constraints: 97 + at: 82703e2aa614d0f54a1c321e06edd2e79a9574a91d0984d6f5e98926710962f2 + bt: 54bbc6eb42c38f8bbb12360c98b483e782f47c2875d6b88b6ae2b7cd70220cf8 + ct: 52022ccbdc5119e02384f852f21e0ed0b6d729cb1cd18aea031f73037e467755 + output: + - input_file: u32_3.in + output: + registers: + a: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/statements/chain.leo.out b/tests/expectations/compiler/compiler/statements/chain.leo.out new file mode 100644 index 0000000000..20454e0595 --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/chain.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 319 + num_constraints: 415 + at: 7758de8b887d66c54fef4affc72141544bcc9762eaabe77639dcbb72d02aaa67 + bt: 3ae01a0af5534bca6ad67bd2609a5370a4982c7f6d17fb8c285054c3d08f9c4f + ct: 67836f65a02c595fcbf6d6a6d223a15e138d99a542390693ac4f582d073869e6 + output: + - input_file: u32_3.in + output: + registers: + a: + type: bool + value: "true" + - input_file: u32_5.in + output: + registers: + a: + type: bool + value: "false" + - input_file: u32_6.in + output: + registers: + a: + type: bool + value: "false" 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..2ebe1ba7f1 --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/for_loop.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 512 + num_constraints: 675 + at: da107701a842d40fe2af68152622ca69aa3496c7952cdbeb1b5f4fe69b2661ab + bt: 192ca0dd8a20d69b443b952a7226e8c82936fedd2c9735d2b792883a01e46e3b + ct: 04609638ad65317edb75529646b34f10a846b39b3ddb783e4aeceddde17b79f9 + output: + - input_file: u32_3.in + output: + registers: + a: + type: bool + value: "true" 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..e9b75968ed --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 162 + num_constraints: 165 + at: 5b2ee97bca1c978a9cb40345a5358b6da05b06c94ef08ade726f32a8d0840c4e + bt: 9dc810c17c3ede695558cbade305db754bfc9de90c983ab114557f2cc9bb3631 + ct: 16ed7b0c9d703be9a60d4b2e0da9a52403de8b03c35a545db7c05b698eddcdfd + output: + - input_file: u32_3.in + output: + registers: + a: + type: bool + value: "true" 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..4b90bb7aee --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 129 + num_constraints: 131 + at: 3ce06ba8c0b8ed0af6941d5d0a487cfb836053b5f7098525dbc159dbbca3508a + bt: d0528d867b40b0642b9b93a6b7f6d64ceb8d7e97799848ccd6b7fecfb86e2889 + ct: 638bf6e71b08cf88ff8fc38ff7594880102164a51a452dec39b42c10f6f36c35 + output: + - input_file: u32_3.in + output: + registers: + a: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out new file mode 100644 index 0000000000..9b967dc59e --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 63 + num_constraints: 63 + at: 37a483a8d794b0cd2f37b20c69eb00e2d9a3d950319dd18ead861dd505d84ce9 + bt: 6c9fd7d4b3947c363bdb576b2c2c827c3ebfe4c3b56eda2abb8a37e436b69638 + ct: c0d39de2b3b1c321288b265a4f0e72c13da3b07b0f5d61d14b66215440c56a42 + output: + - input_file: u32_3.in + output: + registers: + a: + type: bool + value: "true" + - input_file: u32_5.in + output: + registers: + a: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/statements/mutate.leo.out b/tests/expectations/compiler/compiler/statements/mutate.leo.out new file mode 100644 index 0000000000..52a657ffd3 --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/mutate.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 253 + num_constraints: 317 + at: 30a9d7ef92bc14334cf2058df46dd513d99b7d21712c6c8bedfce9c48bc0f402 + bt: eaddc0804e3047ae886466758455accba906f9ae990696f12c17a3237a9c9688 + ct: e60851ccedd572c63dbcec5e0d84ddf45d76423dcf08fe0c9761fe17ce2bdd4e + output: + - input_file: u32_3.in + output: + registers: + a: + type: bool + value: "true" + - input_file: u32_5.in + output: + registers: + a: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out new file mode 100644 index 0000000000..1b1071da2f --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 481 + num_constraints: 547 + at: b23dee30e3d6dc6d95933170ea18b5680aa3f859e808328599c3de9027bdbc5f + bt: 86e567b4b178b61f7a2ae29ac78c6f60fc1b6c9cdfdbb6c896c8b059b68a90b6 + ct: eb4c6eaa123567ee0a5b12a2812f90b4f532e657b59249aaad97092bd32cdbe9 + output: + - input_file: u32_3.in + output: + registers: + a: + type: bool + value: "true" + - input_file: u32_5.in + output: + registers: + a: + type: bool + value: "true" + - input_file: u32_6.in + output: + registers: + a: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/tuples/basic.leo.out b/tests/expectations/compiler/compiler/tuples/basic.leo.out new file mode 100644 index 0000000000..06cacdebe4 --- /dev/null +++ b/tests/expectations/compiler/compiler/tuples/basic.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 2 + num_constraints: 2 + at: 401937c524c61a28b4fab76d7a1f85bb628850012af62362a0922610372faf92 + bt: cdf9a9cee4f2edf55111a95ae60bde9801080f6bde638a5c79273a39a2f9f7f5 + ct: 643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726 + output: + - input_file: inputs/true_true.in + output: + registers: + b: + type: bool + value: "true" + c: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/tuples/dependent.leo.out b/tests/expectations/compiler/compiler/tuples/dependent.leo.out new file mode 100644 index 0000000000..06cacdebe4 --- /dev/null +++ b/tests/expectations/compiler/compiler/tuples/dependent.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 2 + num_constraints: 2 + at: 401937c524c61a28b4fab76d7a1f85bb628850012af62362a0922610372faf92 + bt: cdf9a9cee4f2edf55111a95ae60bde9801080f6bde638a5c79273a39a2f9f7f5 + ct: 643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726 + output: + - input_file: inputs/true_true.in + output: + registers: + b: + type: bool + value: "true" + c: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/tuples/destructured.leo.out b/tests/expectations/compiler/compiler/tuples/destructured.leo.out new file mode 100644 index 0000000000..c7a4802ab8 --- /dev/null +++ b/tests/expectations/compiler/compiler/tuples/destructured.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 2 + num_constraints: 2 + at: 401937c524c61a28b4fab76d7a1f85bb628850012af62362a0922610372faf92 + bt: cdf9a9cee4f2edf55111a95ae60bde9801080f6bde638a5c79273a39a2f9f7f5 + ct: 643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726 + output: + - input_file: inputs/true_true.in + output: + registers: + b: + type: bool + value: "false" + c: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/tuples/nested_access.leo.out b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out new file mode 100644 index 0000000000..045f791989 --- /dev/null +++ b/tests/expectations/compiler/compiler/tuples/nested_access.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 2 + num_constraints: 2 + at: 401937c524c61a28b4fab76d7a1f85bb628850012af62362a0922610372faf92 + bt: cdf9a9cee4f2edf55111a95ae60bde9801080f6bde638a5c79273a39a2f9f7f5 + ct: 643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726 + output: + - input_file: inputs/true_true.in + output: + registers: + b: + type: bool + value: "false" + c: + type: bool + value: "false" From 0b798dc950343294e7336d8fe6534c6ef638805d Mon Sep 17 00:00:00 2001 From: damirka Date: Mon, 3 May 2021 16:47:33 +0300 Subject: [PATCH 02/26] console + definition + core --- compiler/src/compiler.rs | 13 +- compiler/src/constraints/constraints.rs | 4 +- compiler/src/lib.rs | 2 +- compiler/src/output/mod.rs | 6 +- compiler/src/test.rs | 57 +++++-- parser/src/test.rs | 5 +- synthesizer/src/summarized_circuit.rs | 28 +++- test-framework/src/runner.rs | 13 +- test-framework/src/test.rs | 4 +- tests/compiler/address/equal.leo | 4 +- .../compiler/address/{ => inputs}/address1.in | 0 .../compiler/address/{ => inputs}/address2.in | 0 tests/compiler/address/ternary.leo | 4 +- .../circuits/const_self_variable_fail.leo | 5 + tests/compiler/console/assert.leo | 15 +- tests/compiler/console/conditional_assert.leo | 12 ++ tests/compiler/console/debug.leo | 5 + tests/compiler/console/error.leo | 5 + .../console/{input => inputs}/input_equal.in | 0 .../{input => inputs}/input_unequal.in | 0 tests/compiler/console/log_conditional.leo | 10 +- tests/compiler/console/log_fail.leo | 5 + tests/compiler/console/log_input.leo | 9 + tests/compiler/console/log_parameter.leo | 5 + .../console/log_parameter_fail_empty.leo | 5 + .../console/log_parameter_fail_none.leo | 5 + .../console/log_parameter_fail_unknown.leo | 5 + tests/compiler/console/log_parameter_many.leo | 5 + tests/compiler/core/blake2s.leo | 12 ++ tests/compiler/core/core_circuit_invalid.leo | 5 + .../compiler/core/core_circuit_star_fail.leo | 5 + tests/compiler/core/core_package_invalid.leo | 5 + .../core/core_unstable_package_invalid.leo | 5 + tests/compiler/core/mod.rs | 59 ------- tests/compiler/core/packages/mod.rs | 17 -- .../arguments_length_fail.leo | 0 .../arguments_type_fail.leo | 0 .../{blake2s => _blake2s}/blake2s_input.leo | 0 .../{blake2s => _blake2s}/blake2s_random.leo | 0 .../inputs/valid_input.in | 0 .../unstable/{blake2s => _blake2s}/mod.rs | 0 .../outputs/valid_output.out | 0 tests/compiler/core/packages/unstable/mod.rs | 17 -- tests/compiler/core/unstable_blake2s.leo | 20 ++- tests/compiler/definition/mod.rs | 38 ----- tests/compiler/definition/out_of_order.leo | 5 + .../definition/out_of_order_with_import.leo | 11 +- tests/compiler/mutability/let.leo | 5 + tests/compiler/mutability/let_mut.leo | 7 +- tests/compiler/mutability/mod.rs | 157 ------------------ tests/compiler/mutability/swap.leo | 25 ++- .../compiler/compiler/address/equal.leo.out | 4 +- .../compiler/compiler/address/ternary.leo.out | 4 +- .../circuits/const_self_variable_fail.leo.out | 5 + .../compiler/compiler/console/assert.leo.out | 18 ++ .../console/conditional_assert.leo.out | 18 ++ .../compiler/compiler/console/debug.leo.out | 15 ++ .../compiler/compiler/console/error.leo.out | 15 ++ .../compiler/console/log_conditional.leo.out | 18 ++ .../compiler/console/log_fail.leo.out | 5 + .../compiler/console/log_input.leo.out | 15 ++ .../compiler/console/log_parameter.leo.out | 15 ++ .../console/log_parameter_fail_empty.leo.out | 5 + .../console/log_parameter_fail_none.leo.out | 5 + .../log_parameter_fail_unknown.leo.out | 5 + .../console/log_parameter_many.leo.out | 15 ++ .../compiler/compiler/core/blake2s.leo.out | 5 + .../core/core_circuit_invalid.leo.out | 5 + .../core/core_circuit_star_fail.leo.out | 5 + .../core/core_package_invalid.leo.out | 5 + .../core_unstable_package_invalid.leo.out | 5 + .../compiler/core/unstable_blake2s.leo.out | 18 ++ .../compiler/definition/out_of_order.leo.out | 15 ++ .../out_of_order_with_import.leo.out | 15 ++ .../compiler/compiler/mutability/let.leo.out | 5 + .../compiler/mutability/let_mut.leo.out | 5 + .../compiler/compiler/mutability/swap.leo.out | 18 ++ 77 files changed, 533 insertions(+), 354 deletions(-) rename tests/compiler/address/{ => inputs}/address1.in (100%) rename tests/compiler/address/{ => inputs}/address2.in (100%) rename tests/compiler/console/{input => inputs}/input_equal.in (100%) rename tests/compiler/console/{input => inputs}/input_unequal.in (100%) create mode 100644 tests/compiler/core/blake2s.leo delete mode 100644 tests/compiler/core/mod.rs delete mode 100644 tests/compiler/core/packages/mod.rs rename tests/compiler/core/packages/unstable/{blake2s => _blake2s}/arguments_length_fail.leo (100%) rename tests/compiler/core/packages/unstable/{blake2s => _blake2s}/arguments_type_fail.leo (100%) rename tests/compiler/core/packages/unstable/{blake2s => _blake2s}/blake2s_input.leo (100%) rename tests/compiler/core/packages/unstable/{blake2s => _blake2s}/blake2s_random.leo (100%) rename tests/compiler/core/packages/unstable/{blake2s => _blake2s}/inputs/valid_input.in (100%) rename tests/compiler/core/packages/unstable/{blake2s => _blake2s}/mod.rs (100%) rename tests/compiler/core/packages/unstable/{blake2s => _blake2s}/outputs/valid_output.out (100%) delete mode 100644 tests/compiler/core/packages/unstable/mod.rs delete mode 100644 tests/compiler/definition/mod.rs delete mode 100644 tests/compiler/mutability/mod.rs create mode 100644 tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/console/assert.leo.out create mode 100644 tests/expectations/compiler/compiler/console/conditional_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/console/debug.leo.out create mode 100644 tests/expectations/compiler/compiler/console/error.leo.out create mode 100644 tests/expectations/compiler/compiler/console/log_conditional.leo.out create mode 100644 tests/expectations/compiler/compiler/console/log_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/console/log_input.leo.out create mode 100644 tests/expectations/compiler/compiler/console/log_parameter.leo.out create mode 100644 tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out create mode 100644 tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out create mode 100644 tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out create mode 100644 tests/expectations/compiler/compiler/console/log_parameter_many.leo.out create mode 100644 tests/expectations/compiler/compiler/core/blake2s.leo.out create mode 100644 tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out create mode 100644 tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/core/core_package_invalid.leo.out create mode 100644 tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out create mode 100644 tests/expectations/compiler/compiler/core/unstable_blake2s.leo.out create mode 100644 tests/expectations/compiler/compiler/definition/out_of_order.leo.out create mode 100644 tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/let.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/let_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/swap.leo.out diff --git a/compiler/src/compiler.rs b/compiler/src/compiler.rs index fe86c87749..03775966a2 100644 --- a/compiler/src/compiler.rs +++ b/compiler/src/compiler.rs @@ -16,7 +16,14 @@ //! Compiles a Leo program from a file path. -use crate::{CompilerOptions, GroupType, Output, OutputFile, constraints::{generate_constraints, generate_test_constraints}, errors::CompilerError}; +use crate::{ + constraints::{generate_constraints, generate_test_constraints}, + errors::CompilerError, + CompilerOptions, + GroupType, + Output, + OutputFile, +}; pub use leo_asg::{new_context, AsgContext as Context, AsgContext}; use leo_asg::{Asg, AsgPass, FormattedError, Program as AsgProgram}; use leo_ast::{Input, MainInput, Program as AstProgram}; @@ -322,7 +329,9 @@ impl<'a, F: PrimeField, G: GroupType> ConstraintSynthesizer for Compiler<' // Write results to file let output_file = OutputFile::new(&package_name); - output_file.write(&output_directory, result.to_string().as_bytes()).unwrap(); + output_file + .write(&output_directory, result.to_string().as_bytes()) + .unwrap(); Ok(()) } diff --git a/compiler/src/constraints/constraints.rs b/compiler/src/constraints/constraints.rs index ba6c84ba75..34db4a8bbd 100644 --- a/compiler/src/constraints/constraints.rs +++ b/compiler/src/constraints/constraints.rs @@ -121,7 +121,9 @@ pub fn generate_test_constraints<'a, F: PrimeField, G: GroupType>( let output = result?; let output_file = OutputFile::new(&output_file_name); - output_file.write(output_directory, output.to_string().as_bytes()).unwrap(); + output_file + .write(output_directory, output.to_string().as_bytes()) + .unwrap(); // increment passed tests passed += 1; diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index 2c64bb668a..9b703f65d0 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -64,4 +64,4 @@ pub mod option; pub use option::*; #[cfg(test)] -mod test; \ No newline at end of file +mod test; diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index a952c78b9c..6e698187b2 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -110,8 +110,6 @@ impl Output { }); } - Ok(Output { - registers, - }) + Ok(Output { registers }) } -} \ No newline at end of file +} diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 7a8ae4907c..4d2ea3c4b6 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -14,18 +14,21 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . -use std::{path::{Path, PathBuf}}; +use std::path::{Path, PathBuf}; use leo_asg::*; use leo_synthesizer::{CircuitSynthesizer, SerializedCircuit, SummarizedCircuit}; -use leo_test_framework::{Test, runner::{Namespace, ParseType, Runner}}; +use leo_test_framework::{ + runner::{Namespace, ParseType, Runner}, + Test, +}; use serde_yaml::Value; use snarkvm_curves::{bls12_377::Bls12_377, edwards_bls12::Fq}; -use crate::{ConstrainedValue, Output, compiler::Compiler, errors::CompilerError, targets::edwards_bls12::EdwardsGroupType}; +use crate::{compiler::Compiler, errors::CompilerError, targets::edwards_bls12::EdwardsGroupType, Output}; pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; -pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; +// pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; //convenience function for tests, leaks memory pub(crate) fn make_test_context() -> AsgContext<'static> { @@ -74,24 +77,47 @@ impl Namespace for CompileNamespace { // (name, content) let mut inputs = vec![]; + if let Some(input) = test.config.get("inputs") { + if let Value::Sequence(field) = input { + for map in field { + for (name, value) in map.as_mapping().unwrap().iter() { + // Try to parse string from 'inputs' map, else fail + let value = if let serde_yaml::Value::String(value) = value { + value + } else { + return Err("Expected string in 'inputs' map".to_string()); + }; + + inputs.push((name.as_str().unwrap().to_string(), value.clone())); + } + } + } + } + if let Some(input) = test.config.get("input_file") { let input_file: PathBuf = test.path.parent().expect("no test parent dir").into(); if let Some(name) = input.as_str() { let mut input_file = input_file; input_file.push(input.as_str().expect("input_file was not a string or array")); - inputs.push((name.to_string(), std::fs::read_to_string(&input_file).expect("failed to read test input file"))); + inputs.push(( + name.to_string(), + std::fs::read_to_string(&input_file).expect("failed to read test input file"), + )); } else if let Some(seq) = input.as_sequence() { for name in seq { let mut input_file = input_file.clone(); input_file.push(name.as_str().expect("input_file was not a string")); - inputs.push((name.as_str().expect("input_file item was not a string").to_string(), std::fs::read_to_string(&input_file).expect("failed to read test input file"))); + inputs.push(( + name.as_str().expect("input_file item was not a string").to_string(), + std::fs::read_to_string(&input_file).expect("failed to read test input file"), + )); } } } if inputs.is_empty() { inputs.push(("empty".to_string(), "".to_string())); } - + let state = if let Some(input) = test.config.get("state_file") { let mut input_file: PathBuf = test.path.parent().expect("no test parent dir").into(); input_file.push(input.as_str().expect("state_file was not a string")); @@ -99,19 +125,25 @@ impl Namespace for CompileNamespace { } else { "".to_string() }; - + let mut output_items = vec![]; - + let mut last_circuit = None; for input in inputs { let mut parsed = parsed.clone(); - parsed.parse_input(&input.1, Path::new("input"), &state, Path::new("state")).map_err(|x| x.to_string())?; + parsed + .parse_input(&input.1, Path::new("input"), &state, Path::new("state")) + .map_err(|x| x.to_string())?; let mut cs: CircuitSynthesizer = Default::default(); let output = parsed.compile_constraints(&mut cs).map_err(|x| x.to_string())?; let circuit: SummarizedCircuit = SerializedCircuit::from(cs).into(); if let Some(last_circuit) = last_circuit.as_ref() { if last_circuit != &circuit { - eprintln!("{}\n{}", serde_yaml::to_string(last_circuit).unwrap(), serde_yaml::to_string(&circuit).unwrap()); + eprintln!( + "{}\n{}", + serde_yaml::to_string(last_circuit).unwrap(), + serde_yaml::to_string(&circuit).unwrap() + ); return Err("circuit changed on different input files".to_string()); } } else { @@ -122,10 +154,7 @@ impl Namespace for CompileNamespace { output, }); } - - - let final_output = CompileOutput { circuit: last_circuit.unwrap(), output: output_items, diff --git a/parser/src/test.rs b/parser/src/test.rs index cd1fad285d..26d5f9a7d0 100644 --- a/parser/src/test.rs +++ b/parser/src/test.rs @@ -15,7 +15,10 @@ // along with the Leo library. If not, see . use leo_ast::{Expression, ExpressionStatement, Span, Statement, ValueExpression}; -use leo_test_framework::{Test, runner::{Namespace, ParseType, Runner}}; +use leo_test_framework::{ + runner::{Namespace, ParseType, Runner}, + Test, +}; use serde_yaml::Value; use tokenizer::Token; diff --git a/synthesizer/src/summarized_circuit.rs b/synthesizer/src/summarized_circuit.rs index 77ee96b87d..0d083585fc 100644 --- a/synthesizer/src/summarized_circuit.rs +++ b/synthesizer/src/summarized_circuit.rs @@ -1,3 +1,19 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; @@ -11,7 +27,6 @@ pub struct SummarizedCircuit { // pub public_variables: String, // pub private_variables: String, - pub at: String, pub bt: String, pub ct: String, @@ -34,12 +49,9 @@ impl From for SummarizedCircuit { // .expect("failed to serialize public_variables")), // private_variables: hash_field(&serde_json::to_string(&other.private_variables) // .expect("failed to serialize private_variables")), - at: hash_field(&serde_json::to_string(&other.at) - .expect("failed to serialize at")), - bt: hash_field(&serde_json::to_string(&other.bt) - .expect("failed to serialize bt")), - ct: hash_field(&serde_json::to_string(&other.ct) - .expect("failed to serialize ct")), + at: hash_field(&serde_json::to_string(&other.at).expect("failed to serialize at")), + bt: hash_field(&serde_json::to_string(&other.bt).expect("failed to serialize bt")), + ct: hash_field(&serde_json::to_string(&other.ct).expect("failed to serialize ct")), } } -} \ No newline at end of file +} diff --git a/test-framework/src/runner.rs b/test-framework/src/runner.rs index 94990c1735..19143c8eb1 100644 --- a/test-framework/src/runner.rs +++ b/test-framework/src/runner.rs @@ -15,7 +15,10 @@ // along with the Leo library. If not, see . use serde_yaml::Value; -use std::{collections::BTreeMap, path::{Path, PathBuf}}; +use std::{ + collections::BTreeMap, + path::{Path, PathBuf}, +}; use crate::{error::*, fetch::find_tests, output::TestExpectation, test::*}; @@ -87,7 +90,7 @@ pub fn run_tests(runner: &T, expectation_category: &str) { .to_str() .unwrap() .to_string(); - expectation_name += ".out"; + expectation_name += ".out"; expectation_path.push(&expectation_name); let test_name = relative_path @@ -135,11 +138,7 @@ pub fn run_tests(runner: &T, expectation_category: &str) { let mut expected_output = expectations.as_ref().map(|x| x.outputs.iter()); for (i, test) in tests.into_iter().enumerate() { - let expected_output = expected_output - .as_mut() - .map(|x| x.next()) - .flatten() - .cloned(); + let expected_output = expected_output.as_mut().map(|x| x.next()).flatten().cloned(); let output = namespace.run_test(Test { name: test_name.clone(), content: test.clone(), diff --git a/test-framework/src/test.rs b/test-framework/src/test.rs index 13845f896c..ba129c39ab 100644 --- a/test-framework/src/test.rs +++ b/test-framework/src/test.rs @@ -1,5 +1,3 @@ -use std::collections::BTreeMap; - // Copyright (C) 2019-2021 Aleo Systems Inc. // This file is part of the Leo library. @@ -16,6 +14,8 @@ use std::collections::BTreeMap; // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +use std::collections::BTreeMap; + #[derive(serde::Serialize, serde::Deserialize, PartialEq, Debug, Clone)] pub enum TestExpectationMode { Pass, diff --git a/tests/compiler/address/equal.leo b/tests/compiler/address/equal.leo index db5189b4ec..7c42b01792 100644 --- a/tests/compiler/address/equal.leo +++ b/tests/compiler/address/equal.leo @@ -2,8 +2,8 @@ namespace: Compile expectation: Pass input_file: - - address1.in - - address2.in + - inputs/address1.in + - inputs/address2.in */ function main(x: address) -> bool { diff --git a/tests/compiler/address/address1.in b/tests/compiler/address/inputs/address1.in similarity index 100% rename from tests/compiler/address/address1.in rename to tests/compiler/address/inputs/address1.in diff --git a/tests/compiler/address/address2.in b/tests/compiler/address/inputs/address2.in similarity index 100% rename from tests/compiler/address/address2.in rename to tests/compiler/address/inputs/address2.in diff --git a/tests/compiler/address/ternary.leo b/tests/compiler/address/ternary.leo index 5df233efa2..9f863b7450 100644 --- a/tests/compiler/address/ternary.leo +++ b/tests/compiler/address/ternary.leo @@ -2,8 +2,8 @@ namespace: Compile expectation: Pass input_file: - - address1.in - - address2.in + - inputs/address1.in + - inputs/address2.in */ function main(x: address) -> bool { diff --git a/tests/compiler/circuits/const_self_variable_fail.leo b/tests/compiler/circuits/const_self_variable_fail.leo index fca9620946..2a1e633ab6 100644 --- a/tests/compiler/circuits/const_self_variable_fail.leo +++ b/tests/compiler/circuits/const_self_variable_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { a: u8, diff --git a/tests/compiler/console/assert.leo b/tests/compiler/console/assert.leo index ba6be77256..870ca70b18 100644 --- a/tests/compiler/console/assert.leo +++ b/tests/compiler/console/assert.leo @@ -1,3 +1,16 @@ -function main(a: bool) { +/* +namespace: Compile +expectation: Pass +inputs: + - assert.in: | + [main] + a: bool = true; + + [registers] + r0: bool = false; +*/ + +function main(a: bool) -> bool { console.assert(a == true); + return a == true; } \ No newline at end of file diff --git a/tests/compiler/console/conditional_assert.leo b/tests/compiler/console/conditional_assert.leo index f2c1591e9c..71bf6ae5ee 100644 --- a/tests/compiler/console/conditional_assert.leo +++ b/tests/compiler/console/conditional_assert.leo @@ -1,3 +1,15 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - cond.in: | + [main] + a: bool = true; + - cond_2.in: | + [main] + a: bool = false; +*/ + function main(a: bool) { if a { console.assert(a == true); diff --git a/tests/compiler/console/debug.leo b/tests/compiler/console/debug.leo index 54e6eb539f..27e44a0df6 100644 --- a/tests/compiler/console/debug.leo +++ b/tests/compiler/console/debug.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { console.debug("hello debug"); } \ No newline at end of file diff --git a/tests/compiler/console/error.leo b/tests/compiler/console/error.leo index 86d13f8cee..c654b1070a 100644 --- a/tests/compiler/console/error.leo +++ b/tests/compiler/console/error.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { console.error("hello error"); } \ No newline at end of file diff --git a/tests/compiler/console/input/input_equal.in b/tests/compiler/console/inputs/input_equal.in similarity index 100% rename from tests/compiler/console/input/input_equal.in rename to tests/compiler/console/inputs/input_equal.in diff --git a/tests/compiler/console/input/input_unequal.in b/tests/compiler/console/inputs/input_unequal.in similarity index 100% rename from tests/compiler/console/input/input_unequal.in rename to tests/compiler/console/inputs/input_unequal.in diff --git a/tests/compiler/console/log_conditional.leo b/tests/compiler/console/log_conditional.leo index a9fdb6e698..47fdb496c4 100644 --- a/tests/compiler/console/log_conditional.leo +++ b/tests/compiler/console/log_conditional.leo @@ -1,6 +1,14 @@ +/* +namespace: Compile +expectation: Pass +input_file: + - inputs/input_unequal.in + - inputs/input_equal.in +*/ + // Conditionally add two u32 integers and log the result to the console. function main(a: u32, b: u32) { if a == b { - console.log("{}=={}",a,b); // This line should not fail. + console.log("{}=={}", a, b); // This line should not fail. } } \ No newline at end of file diff --git a/tests/compiler/console/log_fail.leo b/tests/compiler/console/log_fail.leo index dafa6bea8e..c98ffa3cb0 100644 --- a/tests/compiler/console/log_fail.leo +++ b/tests/compiler/console/log_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { console.log( hello ); } \ No newline at end of file diff --git a/tests/compiler/console/log_input.leo b/tests/compiler/console/log_input.leo index c4fd0a8b12..531571f55d 100644 --- a/tests/compiler/console/log_input.leo +++ b/tests/compiler/console/log_input.leo @@ -1,3 +1,12 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - log.in: | + [main] + a: bool = true; +*/ + function main(a: bool) { console.log("a = {}", a); } \ No newline at end of file diff --git a/tests/compiler/console/log_parameter.leo b/tests/compiler/console/log_parameter.leo index ebcb931a2b..a601800592 100644 --- a/tests/compiler/console/log_parameter.leo +++ b/tests/compiler/console/log_parameter.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { console.log("{}", 1u32); } \ No newline at end of file diff --git a/tests/compiler/console/log_parameter_fail_empty.leo b/tests/compiler/console/log_parameter_fail_empty.leo index 81b42c0919..663431bd24 100644 --- a/tests/compiler/console/log_parameter_fail_empty.leo +++ b/tests/compiler/console/log_parameter_fail_empty.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { console.log("{}"); } \ No newline at end of file diff --git a/tests/compiler/console/log_parameter_fail_none.leo b/tests/compiler/console/log_parameter_fail_none.leo index c92fdfbb2d..70b2710388 100644 --- a/tests/compiler/console/log_parameter_fail_none.leo +++ b/tests/compiler/console/log_parameter_fail_none.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { console.log("", 1u32); } \ No newline at end of file diff --git a/tests/compiler/console/log_parameter_fail_unknown.leo b/tests/compiler/console/log_parameter_fail_unknown.leo index 757f4c27c3..de294227fe 100644 --- a/tests/compiler/console/log_parameter_fail_unknown.leo +++ b/tests/compiler/console/log_parameter_fail_unknown.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { console.log("{}", a); } \ No newline at end of file diff --git a/tests/compiler/console/log_parameter_many.leo b/tests/compiler/console/log_parameter_many.leo index 60455ebbb0..87e5cf42c7 100644 --- a/tests/compiler/console/log_parameter_many.leo +++ b/tests/compiler/console/log_parameter_many.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { console.log("{} {}", 1u32, true); } \ No newline at end of file diff --git a/tests/compiler/core/blake2s.leo b/tests/compiler/core/blake2s.leo new file mode 100644 index 0000000000..8286c68fdd --- /dev/null +++ b/tests/compiler/core/blake2s.leo @@ -0,0 +1,12 @@ +/* +namespace: Compile +expectation: Fail +input_files: + - input/dummy.in +*/ + +import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package + +function main() -> bool { + return false; +} diff --git a/tests/compiler/core/core_circuit_invalid.leo b/tests/compiler/core/core_circuit_invalid.leo index 4a42bda032..f5c6762e8b 100644 --- a/tests/compiler/core/core_circuit_invalid.leo +++ b/tests/compiler/core/core_circuit_invalid.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package function main() {} diff --git a/tests/compiler/core/core_circuit_star_fail.leo b/tests/compiler/core/core_circuit_star_fail.leo index 14b54b0d69..f0831b33e3 100644 --- a/tests/compiler/core/core_circuit_star_fail.leo +++ b/tests/compiler/core/core_circuit_star_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + import core.*; // You cannot import all dependencies from core at once function main() {} diff --git a/tests/compiler/core/core_package_invalid.leo b/tests/compiler/core/core_package_invalid.leo index 7cbcf93ecc..d4ef2e220e 100644 --- a/tests/compiler/core/core_package_invalid.leo +++ b/tests/compiler/core/core_package_invalid.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + import core.bad_circuit; // `bad_circuit` is not a core package function main() {} diff --git a/tests/compiler/core/core_unstable_package_invalid.leo b/tests/compiler/core/core_unstable_package_invalid.leo index 35e6c0d1ba..6c22b34fa7 100644 --- a/tests/compiler/core/core_unstable_package_invalid.leo +++ b/tests/compiler/core/core_unstable_package_invalid.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + import core.unstable.bad_circuit; // `bad_circuit` is not a core unstable package function main() {} diff --git a/tests/compiler/core/mod.rs b/tests/compiler/core/mod.rs deleted file mode 100644 index c4a6bb48a5..0000000000 --- a/tests/compiler/core/mod.rs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod packages; - -use crate::{assert_satisfied, expect_asg_error, parse_program}; - -#[test] -fn test_core_circuit_invalid() { - let program_string = include_str!("core_package_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_core_circuit_star_fail() { - let program_string = include_str!("core_circuit_star_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_core_package_invalid() { - let program_string = include_str!("core_package_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_core_unstable_package_invalid() { - let program_string = include_str!("core_unstable_package_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_unstable_blake2s_sanity() { - let program_string = include_str!("unstable_blake2s.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/tests/compiler/core/packages/mod.rs b/tests/compiler/core/packages/mod.rs deleted file mode 100644 index 6093aa3391..0000000000 --- a/tests/compiler/core/packages/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod unstable; diff --git a/tests/compiler/core/packages/unstable/blake2s/arguments_length_fail.leo b/tests/compiler/core/packages/unstable/_blake2s/arguments_length_fail.leo similarity index 100% rename from tests/compiler/core/packages/unstable/blake2s/arguments_length_fail.leo rename to tests/compiler/core/packages/unstable/_blake2s/arguments_length_fail.leo diff --git a/tests/compiler/core/packages/unstable/blake2s/arguments_type_fail.leo b/tests/compiler/core/packages/unstable/_blake2s/arguments_type_fail.leo similarity index 100% rename from tests/compiler/core/packages/unstable/blake2s/arguments_type_fail.leo rename to tests/compiler/core/packages/unstable/_blake2s/arguments_type_fail.leo diff --git a/tests/compiler/core/packages/unstable/blake2s/blake2s_input.leo b/tests/compiler/core/packages/unstable/_blake2s/blake2s_input.leo similarity index 100% rename from tests/compiler/core/packages/unstable/blake2s/blake2s_input.leo rename to tests/compiler/core/packages/unstable/_blake2s/blake2s_input.leo diff --git a/tests/compiler/core/packages/unstable/blake2s/blake2s_random.leo b/tests/compiler/core/packages/unstable/_blake2s/blake2s_random.leo similarity index 100% rename from tests/compiler/core/packages/unstable/blake2s/blake2s_random.leo rename to tests/compiler/core/packages/unstable/_blake2s/blake2s_random.leo diff --git a/tests/compiler/core/packages/unstable/blake2s/inputs/valid_input.in b/tests/compiler/core/packages/unstable/_blake2s/inputs/valid_input.in similarity index 100% rename from tests/compiler/core/packages/unstable/blake2s/inputs/valid_input.in rename to tests/compiler/core/packages/unstable/_blake2s/inputs/valid_input.in diff --git a/tests/compiler/core/packages/unstable/blake2s/mod.rs b/tests/compiler/core/packages/unstable/_blake2s/mod.rs similarity index 100% rename from tests/compiler/core/packages/unstable/blake2s/mod.rs rename to tests/compiler/core/packages/unstable/_blake2s/mod.rs diff --git a/tests/compiler/core/packages/unstable/blake2s/outputs/valid_output.out b/tests/compiler/core/packages/unstable/_blake2s/outputs/valid_output.out similarity index 100% rename from tests/compiler/core/packages/unstable/blake2s/outputs/valid_output.out rename to tests/compiler/core/packages/unstable/_blake2s/outputs/valid_output.out diff --git a/tests/compiler/core/packages/unstable/mod.rs b/tests/compiler/core/packages/unstable/mod.rs deleted file mode 100644 index 16304197fe..0000000000 --- a/tests/compiler/core/packages/unstable/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod blake2s; diff --git a/tests/compiler/core/unstable_blake2s.leo b/tests/compiler/core/unstable_blake2s.leo index c430d9a837..5dffb6a34b 100644 --- a/tests/compiler/core/unstable_blake2s.leo +++ b/tests/compiler/core/unstable_blake2s.leo @@ -1,10 +1,22 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - blake.in: | + [constants] + message: [u8; 32] = [0; 32]; + + [registers] + r0: [u8; 32] = [0; 32]; +*/ + import core.unstable.blake2s.Blake2s; -function main() { - const seed: [u8; 32] = [0; 32]; - const message: [u8; 32] = [0; 32]; - +function main(const message: [u8; 32]) -> [u8; 32] { + const seed: [u8; 32] = [1; 32]; const result = Blake2s::hash(seed, message); console.log("Result: {}", result); + + return result; } diff --git a/tests/compiler/definition/mod.rs b/tests/compiler/definition/mod.rs deleted file mode 100644 index e5faf8b2de..0000000000 --- a/tests/compiler/definition/mod.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, import::set_local_dir, parse_program}; - -#[test] -fn test_out_of_order() { - let program_string = include_str!("out_of_order.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_out_of_order_with_import() { - set_local_dir(); - - let program_string = include_str!("out_of_order_with_import.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/tests/compiler/definition/out_of_order.leo b/tests/compiler/definition/out_of_order.leo index 69d46d0e74..84886a6023 100644 --- a/tests/compiler/definition/out_of_order.leo +++ b/tests/compiler/definition/out_of_order.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + @test function fake_test() {} diff --git a/tests/compiler/definition/out_of_order_with_import.leo b/tests/compiler/definition/out_of_order_with_import.leo index 04e5ddf12b..384e6b701c 100644 --- a/tests/compiler/definition/out_of_order_with_import.leo +++ b/tests/compiler/definition/out_of_order_with_import.leo @@ -1,7 +1,14 @@ -test function fake_test() {} +/* +namespace: Compile +expectation: Pass +*/ + +@test +function fake_test() {} function main() {} -import test_import.foo; +// use core import to test import order +import core.unstable.blake2s.Blake2s; circuit Foo {} \ No newline at end of file diff --git a/tests/compiler/mutability/let.leo b/tests/compiler/mutability/let.leo index 105730adb7..7e0c2d6520 100644 --- a/tests/compiler/mutability/let.leo +++ b/tests/compiler/mutability/let.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + // Variables are immutable by default. function main() { const a = 1u32; diff --git a/tests/compiler/mutability/let_mut.leo b/tests/compiler/mutability/let_mut.leo index cd1060d0d2..7a3f3d7107 100644 --- a/tests/compiler/mutability/let_mut.leo +++ b/tests/compiler/mutability/let_mut.leo @@ -1,7 +1,12 @@ +/* +namespace: Compile +expectation: Fail +*/ + // Adding the `mut` keyword makes a variable mutable. function main() { let a = 1u32; a = 0; - console.assert(a == 0u32); + return a == 0u32; } \ No newline at end of file diff --git a/tests/compiler/mutability/mod.rs b/tests/compiler/mutability/mod.rs deleted file mode 100644 index e0df21fb4e..0000000000 --- a/tests/compiler/mutability/mod.rs +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_asg_error, generate_main_input, parse_program}; -use leo_ast::InputValue; - -#[test] -fn test_let() { - let program_string = include_str!("let.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_let_mut() { - let program_string = include_str!("let_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_let_mut_nested() { - let program_string = include_str!("let_mut_nested.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_const_fail() { - let program_string = include_str!("const.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_cond_mut() { - let program_string = include_str!("cond_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array() { - let program_string = include_str!("array.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_mut() { - let program_string = include_str!("array_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_tuple_mut() { - let bytes = include_str!("array_tuple_mut.leo"); - let program = parse_program(bytes).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_splice_mut() { - let bytes = include_str!("array_splice_mut.leo"); - let program = parse_program(bytes).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_circuit() { - let program_string = include_str!("circuit.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_circuit_mut() { - let program_string = include_str!("circuit_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_circuit_variable_mut() { - let program_string = include_str!("circuit_variable_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_circuit_function_mut() { - let program_string = include_str!("circuit_function_mut.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_circuit_static_function_mut() { - let program_string = include_str!("circuit_static_function_mut.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_function_input() { - let program_string = include_str!("function_input.leo"); - let error = parse_program(program_string).err().unwrap(); - expect_asg_error(error); -} - -#[test] -fn test_function_input_mut() { - let program_string = include_str!("function_input_mut.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(true)))]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -#[test] -fn test_swap() { - let program_string = include_str!("swap.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/tests/compiler/mutability/swap.leo b/tests/compiler/mutability/swap.leo index d0d663ea1a..f37ad53390 100644 --- a/tests/compiler/mutability/swap.leo +++ b/tests/compiler/mutability/swap.leo @@ -1,3 +1,15 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - swap.in: | + [main] + arr: [u32; 2] = [10, 8]; + + [registers] + r0: bool = false; +*/ + // Swap two elements of an array. function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] { const t = a[i]; @@ -6,15 +18,10 @@ function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] { return a; } -function main() { - let arr: [u32; 2] = [0, 1]; +function main(arr: [u32; 2]) -> bool { const expected: [u32; 2] = [1, 0]; - - // Do swap. const actual = swap(arr, 0, 1); - - // Check result. - for i in 0..2 { - console.assert(expected[i] == actual[i]); - } + + // Do swap. + return expected[0] == actual[0] && expected[1] == actual[1]; } \ No newline at end of file diff --git a/tests/expectations/compiler/compiler/address/equal.leo.out b/tests/expectations/compiler/compiler/address/equal.leo.out index 6a14ab2a43..0afdf2f075 100644 --- a/tests/expectations/compiler/compiler/address/equal.leo.out +++ b/tests/expectations/compiler/compiler/address/equal.leo.out @@ -10,13 +10,13 @@ outputs: bt: 2194515882da93c79fa24d47c40fddc44f0284da25da7b89efb935c0ea7382f8 ct: a0736e8c8f3bb1c39a147348754e53dfd31fd76a1df9cd9960472841bcc531df output: - - input_file: address1.in + - input_file: inputs/address1.in output: registers: a: type: bool value: "true" - - input_file: address2.in + - input_file: inputs/address2.in output: registers: a: diff --git a/tests/expectations/compiler/compiler/address/ternary.leo.out b/tests/expectations/compiler/compiler/address/ternary.leo.out index d257950701..0f5714f99b 100644 --- a/tests/expectations/compiler/compiler/address/ternary.leo.out +++ b/tests/expectations/compiler/compiler/address/ternary.leo.out @@ -10,13 +10,13 @@ outputs: bt: 15054154626f1ae748008fc4ed9a650c3873b608988ff31312fe4049957dfffb ct: dbda9de51fe9897456cbbcc3b450ed7d66185fb6018c7a0c72414784f29b2ad4 output: - - input_file: address1.in + - input_file: inputs/address1.in output: registers: a: type: bool value: "false" - - input_file: address2.in + - input_file: inputs/address2.in output: registers: a: diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out new file mode 100644 index 0000000000..48f3614d62 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" 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..d7bb5b5651 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/assert.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: assert.in + output: + registers: + r0: + type: bool + value: "true" 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..042b72aef2 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/conditional_assert.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: cond.in + output: + registers: {} + - input_file: cond_2.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/console/debug.leo.out b/tests/expectations/compiler/compiler/console/debug.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/console/debug.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/console/error.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..4097972d60 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_conditional.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 127 + num_constraints: 127 + at: e0e639bf48906da80759e2f98e3205a68a63ae175dcd7c198fe3bf6b1650a84e + bt: 6b92443726163ac0fc32f7c9edace0ec8369e793d24105d93d121cb0bd5c3128 + ct: 7cb2d3f0ccfb9a2e747c6a05bdb52812c4539c836ff62c4e555fac13ef2084d4 + output: + - input_file: inputs/input_unequal.in + output: + registers: {} + - input_file: inputs/input_equal.in + output: + registers: {} 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..f89f222493 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n = expected 'formatted string', got 'hello'" 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..ec335aa9df --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_input.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: log.in + output: + registers: {} 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..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_parameter.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out new file mode 100644 index 0000000000..3c425bcad2 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n = function call expected 2 arguments, got 1" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out new file mode 100644 index 0000000000..203c74bf00 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n = function call expected 1 arguments, got 2" 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..bb56f577f2 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n = failed to resolve variable reference 'a'" 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..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/core/blake2s.leo.out b/tests/expectations/compiler/compiler/core/blake2s.leo.out new file mode 100644 index 0000000000..8f9c175e48 --- /dev/null +++ b/tests/expectations/compiler/compiler/core/blake2s.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out new file mode 100644 index 0000000000..8f9c175e48 --- /dev/null +++ b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out new file mode 100644 index 0000000000..104faae420 --- /dev/null +++ b/tests/expectations/compiler/compiler/core/core_circuit_star_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> :0:0\n |\n |\n |\n = failed to resolve import: 'core'" diff --git a/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out new file mode 100644 index 0000000000..104faae420 --- /dev/null +++ b/tests/expectations/compiler/compiler/core/core_package_invalid.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> :0:0\n |\n |\n |\n = failed to resolve import: 'core'" diff --git a/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out new file mode 100644 index 0000000000..4fb07b9d05 --- /dev/null +++ b/tests/expectations/compiler/compiler/core/core_unstable_package_invalid.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> :0:0\n |\n |\n |\n = failed to resolve import: 'core.unstable'" diff --git a/tests/expectations/compiler/compiler/core/unstable_blake2s.leo.out b/tests/expectations/compiler/compiler/core/unstable_blake2s.leo.out new file mode 100644 index 0000000000..f74c2b44f3 --- /dev/null +++ b/tests/expectations/compiler/compiler/core/unstable_blake2s.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: blake.in + output: + registers: + r0: + type: "[u8; 32]" + value: "[213, 24, 235, 180, 216, 116, 28, 65, 88, 162, 204, 6, 23, 8, 66, 112, 214, 239, 242, 134, 165, 39, 172, 247, 65, 130, 155, 2, 97, 147, 14, 57]" diff --git a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/let.leo.out b/tests/expectations/compiler/compiler/mutability/let.leo.out new file mode 100644 index 0000000000..eb7ad1607b --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/let.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out new file mode 100644 index 0000000000..c1aaa53b96 --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:8:12\n |\n 8 | return a == 0u32;\n | ^^^^^^^^^\n |\n = unexpected type, expected: '()', received: 'bool'" diff --git a/tests/expectations/compiler/compiler/mutability/swap.leo.out b/tests/expectations/compiler/compiler/mutability/swap.leo.out new file mode 100644 index 0000000000..767d8df3ca --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/swap.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 127 + num_constraints: 127 + at: e89e71bb78cba20472e8ebfaeb36e6a9564861cf2b14846eb695a5937149dbfb + bt: 16d04f802c27d778734e07a0126cae3f096bc4e2e0b4362fe5687a338f1dece5 + ct: acfbc6fdb7a3696d43be3cd62939a9731cb8b11c215564c52b3c67343cbda41f + output: + - input_file: swap.in + output: + registers: + r0: + type: bool + value: "false" From 8464c5b9d2c126387821c15b793c369518d58968 Mon Sep 17 00:00:00 2001 From: damirka Date: Mon, 3 May 2021 17:28:53 +0300 Subject: [PATCH 03/26] i8 + mutability --- .../compiler/array/input_nested_3x2_fail.leo | 8 + tests/compiler/integers/i16/add.leo | 11 ++ .../compiler/integers/i16/console_assert.leo | 10 ++ tests/compiler/integers/i16/div.leo | 11 ++ tests/compiler/integers/i16/eq.leo | 16 ++ tests/compiler/integers/i16/ge.leo | 16 ++ tests/compiler/integers/i16/gt.leo | 16 ++ tests/compiler/integers/i16/input.leo | 10 ++ tests/compiler/integers/i16/le.leo | 16 ++ tests/compiler/integers/i16/lt.leo | 16 ++ tests/compiler/integers/i16/max.leo | 5 + tests/compiler/integers/i16/max_fail.leo | 5 + tests/compiler/integers/i16/min.leo | 5 + tests/compiler/integers/i16/min_fail.leo | 5 + tests/compiler/integers/i16/mod.rs | 141 ------------------ tests/compiler/integers/i8/add.leo | 11 ++ tests/compiler/integers/i8/console_assert.leo | 10 ++ tests/compiler/integers/i8/div.leo | 11 ++ tests/compiler/integers/i8/eq.leo | 11 ++ tests/compiler/integers/i8/ge.leo | 11 ++ tests/compiler/integers/i8/gt.leo | 11 ++ tests/compiler/integers/i8/input.leo | 3 - tests/compiler/integers/i8/inputs/abc_bool.in | 0 tests/compiler/integers/i8/inputs/abc_int.in | 4 + tests/compiler/integers/i8/le.leo | 11 ++ tests/compiler/integers/i8/lt.leo | 11 ++ tests/compiler/integers/i8/max.leo | 5 + tests/compiler/integers/i8/max_fail.leo | 5 + tests/compiler/integers/i8/min.leo | 5 + tests/compiler/integers/i8/min_fail.leo | 5 + tests/compiler/integers/i8/mod.rs | 141 ------------------ tests/compiler/integers/i8/mul.leo | 11 ++ tests/compiler/integers/i8/ne.leo | 11 ++ tests/compiler/integers/i8/negate.leo | 10 ++ tests/compiler/integers/i8/negate_min.leo | 5 + tests/compiler/integers/i8/negate_zero.leo | 5 + .../integers/i8/no_space_between_literal.leo | 5 + tests/compiler/integers/i8/pow.leo | 11 ++ tests/compiler/integers/i8/sub.leo | 11 ++ tests/compiler/integers/i8/ternary.leo | 18 +++ tests/compiler/mutability/array.leo | 5 + tests/compiler/mutability/array_mut.leo | 6 +- .../compiler/mutability/array_splice_mut.leo | 6 +- tests/compiler/mutability/array_tuple_mut.leo | 6 +- tests/compiler/mutability/circuit.leo | 7 +- .../mutability/circuit_function_const.leo | 21 +++ .../mutability/circuit_function_mut.leo | 18 ++- tests/compiler/mutability/circuit_mut.leo | 11 -- .../circuit_static_function_mut.leo | 6 +- .../mutability/circuit_variable_mut.leo | 7 +- tests/compiler/mutability/cond_mut.leo | 5 + tests/compiler/mutability/const.leo | 5 + tests/compiler/mutability/function_input.leo | 9 ++ .../mutability/function_input_mut.leo | 9 ++ tests/compiler/mutability/let_mut_nested.leo | 5 + tests/compiler/statements/block.leo | 2 +- tests/compiler/statements/chain.leo | 6 +- tests/compiler/statements/for_loop.leo | 2 +- .../compiler/statements/{ => inputs}/u32_3.in | 0 .../compiler/statements/{ => inputs}/u32_5.in | 0 .../compiler/statements/{ => inputs}/u32_6.in | 0 tests/compiler/statements/iteration_basic.leo | 2 +- .../statements/iteration_variable.leo | 2 +- .../compiler/statements/multiple_returns.leo | 4 +- tests/compiler/statements/mutate.leo | 4 +- tests/compiler/statements/nested_mutate.leo | 6 +- .../array/input_nested_3x2_fail.leo.out | 5 + .../compiler/integers/i16/add.leo.out | 15 ++ .../integers/i16/console_assert.leo.out | 15 ++ .../compiler/integers/i16/div.leo.out | 15 ++ .../compiler/compiler/integers/i16/eq.leo.out | 18 +++ .../compiler/compiler/integers/i16/ge.leo.out | 18 +++ .../compiler/compiler/integers/i16/gt.leo.out | 18 +++ .../compiler/integers/i16/input.leo.out | 15 ++ .../compiler/compiler/integers/i16/le.leo.out | 18 +++ .../compiler/compiler/integers/i16/lt.leo.out | 18 +++ .../compiler/integers/i16/max.leo.out | 15 ++ .../compiler/integers/i16/max_fail.leo.out | 5 + .../compiler/integers/i16/min.leo.out | 15 ++ .../compiler/integers/i16/min_fail.leo.out | 5 + .../compiler/compiler/integers/i8/add.leo.out | 15 ++ .../integers/i8/console_assert.leo.out | 15 ++ .../compiler/compiler/integers/i8/div.leo.out | 15 ++ .../compiler/compiler/integers/i8/eq.leo.out | 15 ++ .../compiler/compiler/integers/i8/ge.leo.out | 15 ++ .../compiler/compiler/integers/i8/gt.leo.out | 15 ++ .../compiler/compiler/integers/i8/le.leo.out | 15 ++ .../compiler/compiler/integers/i8/lt.leo.out | 15 ++ .../compiler/compiler/integers/i8/max.leo.out | 15 ++ .../compiler/integers/i8/max_fail.leo.out | 5 + .../compiler/compiler/integers/i8/min.leo.out | 15 ++ .../compiler/integers/i8/min_fail.leo.out | 5 + .../compiler/compiler/integers/i8/mul.leo.out | 15 ++ .../compiler/compiler/integers/i8/ne.leo.out | 15 ++ .../compiler/integers/i8/negate.leo.out | 15 ++ .../compiler/integers/i8/negate_min.leo.out | 5 + .../compiler/integers/i8/negate_zero.leo.out | 15 ++ .../i8/no_space_between_literal.leo.out | 5 + .../compiler/compiler/integers/i8/pow.leo.out | 15 ++ .../compiler/compiler/integers/i8/sub.leo.out | 15 ++ .../compiler/integers/i8/ternary.leo.out | 15 ++ .../compiler/mutability/array.leo.out | 5 + .../compiler/mutability/array_mut.leo.out | 15 ++ .../mutability/array_splice_mut.leo.out | 15 ++ .../mutability/array_tuple_mut.leo.out | 15 ++ .../compiler/mutability/circuit.leo.out | 5 + .../mutability/circuit_function_const.leo.out | 5 + .../mutability/circuit_function_mut.leo.out | 15 ++ .../compiler/mutability/circuit_mut.leo.out | 15 ++ .../circuit_static_function_mut.leo.out | 5 + .../mutability/circuit_variable_mut.leo.out | 15 ++ .../compiler/mutability/cond_mut.leo.out | 15 ++ .../compiler/mutability/const.leo.out | 5 + .../mutability/function_input.leo.out | 5 + .../mutability/function_input_mut.leo.out | 15 ++ .../mutability/let_mut_nested.leo.out | 15 ++ .../compiler/statements/block.leo.out | 2 +- .../compiler/statements/chain.leo.out | 6 +- .../compiler/statements/for_loop.leo.out | 2 +- .../statements/iteration_basic.leo.out | 2 +- .../statements/iteration_variable.leo.out | 2 +- .../statements/multiple_returns.leo.out | 4 +- .../compiler/statements/mutate.leo.out | 4 +- .../compiler/statements/nested_mutate.leo.out | 6 +- 124 files changed, 1117 insertions(+), 333 deletions(-) delete mode 100644 tests/compiler/integers/i16/mod.rs delete mode 100644 tests/compiler/integers/i8/input.leo create mode 100644 tests/compiler/integers/i8/inputs/abc_bool.in create mode 100644 tests/compiler/integers/i8/inputs/abc_int.in delete mode 100644 tests/compiler/integers/i8/mod.rs create mode 100644 tests/compiler/mutability/circuit_function_const.leo delete mode 100644 tests/compiler/mutability/circuit_mut.leo rename tests/compiler/statements/{ => inputs}/u32_3.in (100%) rename tests/compiler/statements/{ => inputs}/u32_5.in (100%) rename tests/compiler/statements/{ => inputs}/u32_6.in (100%) create mode 100644 tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/input.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/negate.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/pow.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i8/ternary.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/array.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/array_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/circuit.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/circuit_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/circuit_static_function_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/cond_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/const.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/function_input.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out diff --git a/tests/compiler/array/input_nested_3x2_fail.leo b/tests/compiler/array/input_nested_3x2_fail.leo index 1f5bf7b334..eeb602faa1 100644 --- a/tests/compiler/array/input_nested_3x2_fail.leo +++ b/tests/compiler/array/input_nested_3x2_fail.leo @@ -1,3 +1,11 @@ +/* +namespace: Compile +expectation: Fail +input_file: + - input/six_zeros.in + - input/count_to_6.in +*/ + function main(a: [u8; (3, 2)]) { console.assert(a == [[0u8; 2]; 3)]); // This should be written the right way as this test is for the input file. } diff --git a/tests/compiler/integers/i16/add.leo b/tests/compiler/integers/i16/add.leo index 556ae65c3a..7ee0d2cf2b 100644 --- a/tests/compiler/integers/i16/add.leo +++ b/tests/compiler/integers/i16/add.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 2; + b: i16 = 3; + c: i16 = 5; +*/ + function main(a: i16, b: i16, c: i16) { console.assert(a + b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i16/console_assert.leo b/tests/compiler/integers/i16/console_assert.leo index 3afb25b207..dd7dfa48d0 100644 --- a/tests/compiler/integers/i16/console_assert.leo +++ b/tests/compiler/integers/i16/console_assert.leo @@ -1,3 +1,13 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 2; + b: i16 = 2; +*/ + function main(a: i16, b: i16) { console.assert(a == b); } \ No newline at end of file diff --git a/tests/compiler/integers/i16/div.leo b/tests/compiler/integers/i16/div.leo index 6d0c8f4614..4526d19c6e 100644 --- a/tests/compiler/integers/i16/div.leo +++ b/tests/compiler/integers/i16/div.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 6; + b: i16 = 3; + c: i16 = 2; +*/ + function main(a: i16, b: i16, c: i16) { console.assert(a / b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i16/eq.leo b/tests/compiler/integers/i16/eq.leo index 338e3e50f6..5fabe04551 100644 --- a/tests/compiler/integers/i16/eq.leo +++ b/tests/compiler/integers/i16/eq.leo @@ -1,3 +1,19 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 3; + b: i16 = 3; + c: bool = true; + - i16_false: | + [main] + a: i16 = 4; + b: i16 = 3; + c: bool = false; +*/ + function main(a: i16, b: i16, c: bool) { console.assert(a == b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i16/ge.leo b/tests/compiler/integers/i16/ge.leo index 68a4d40bf8..6946663e55 100644 --- a/tests/compiler/integers/i16/ge.leo +++ b/tests/compiler/integers/i16/ge.leo @@ -1,3 +1,19 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 4; + b: i16 = 4; + c: bool = true; + - i16_false: | + [main] + a: i16 = 3; + b: i16 = 6; + c: bool = false; +*/ + function main(a: i16, b: i16, c: bool) { console.assert(a >= b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i16/gt.leo b/tests/compiler/integers/i16/gt.leo index 75d9bfb612..f0d31edde0 100644 --- a/tests/compiler/integers/i16/gt.leo +++ b/tests/compiler/integers/i16/gt.leo @@ -1,3 +1,19 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 4; + b: i16 = 1; + c: bool = true; + - i16_false: | + [main] + a: i16 = 1; + b: i16 = 2; + c: bool = false; +*/ + function main(a: i16, b: i16, c: bool) { console.assert(a > b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i16/input.leo b/tests/compiler/integers/i16/input.leo index 3afb25b207..a912b48e27 100644 --- a/tests/compiler/integers/i16/input.leo +++ b/tests/compiler/integers/i16/input.leo @@ -1,3 +1,13 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 3; + b: i16 = 3; +*/ + function main(a: i16, b: i16) { console.assert(a == b); } \ No newline at end of file diff --git a/tests/compiler/integers/i16/le.leo b/tests/compiler/integers/i16/le.leo index ff112c7fbc..56edaefd66 100644 --- a/tests/compiler/integers/i16/le.leo +++ b/tests/compiler/integers/i16/le.leo @@ -1,3 +1,19 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 3; + b: i16 = 3; + c: bool = true; + - i16_false: | + [main] + a: i16 = 4; + b: i16 = 3; + c: bool = false; +*/ + function main(a: i16, b: i16, c: bool) { console.assert(a <= b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i16/lt.leo b/tests/compiler/integers/i16/lt.leo index 46c57aabe6..14195a74d6 100644 --- a/tests/compiler/integers/i16/lt.leo +++ b/tests/compiler/integers/i16/lt.leo @@ -1,3 +1,19 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 1; + b: i16 = 5; + c: bool = true; + - i16_false: | + [main] + a: i16 = 4; + b: i16 = 3; + c: bool = false; +*/ + function main(a: i16, b: i16, c: bool) { console.assert(a < b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i16/max.leo b/tests/compiler/integers/i16/max.leo index 2b70b3cc56..d4ad70fe6b 100644 --- a/tests/compiler/integers/i16/max.leo +++ b/tests/compiler/integers/i16/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i16 = 32767; } \ No newline at end of file diff --git a/tests/compiler/integers/i16/max_fail.leo b/tests/compiler/integers/i16/max_fail.leo index 209bcc6518..d16dae260d 100644 --- a/tests/compiler/integers/i16/max_fail.leo +++ b/tests/compiler/integers/i16/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i16 = 32768; } \ No newline at end of file diff --git a/tests/compiler/integers/i16/min.leo b/tests/compiler/integers/i16/min.leo index 3d05bef95a..046a073c1c 100644 --- a/tests/compiler/integers/i16/min.leo +++ b/tests/compiler/integers/i16/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i16 = -32768; } \ No newline at end of file diff --git a/tests/compiler/integers/i16/min_fail.leo b/tests/compiler/integers/i16/min_fail.leo index 13d7c8b7f2..52551ece05 100644 --- a/tests/compiler/integers/i16/min_fail.leo +++ b/tests/compiler/integers/i16/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i16 = -32769; } \ No newline at end of file diff --git a/tests/compiler/integers/i16/mod.rs b/tests/compiler/integers/i16/mod.rs deleted file mode 100644 index 6f415a0877..0000000000 --- a/tests/compiler/integers/i16/mod.rs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I16Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI16, - i16, - IntegerType::Signed(SignedIntegerType::I16Type(I16Type {})), - Int16 -); - -#[test] -fn test_i16_min() { - TestI16::test_min(); -} - -#[test] -fn test_i16_min_fail() { - TestI16::test_min_fail(); -} - -#[test] -fn test_i16_max() { - TestI16::test_max(); -} - -#[test] -fn test_i16_max_fail() { - TestI16::test_max_fail(); -} - -#[test] -fn test_i16_neg() { - TestI16::test_negate(); -} - -#[test] -fn test_i16_neg_max_fail() { - TestI16::test_negate_min_fail(); -} - -#[test] -fn test_i16_neg_zero() { - TestI16::test_negate_zero(); -} - -#[test] -fn test_i16_add() { - TestI16::test_add(); -} - -#[test] -fn test_i16_sub() { - TestI16::test_sub(); -} - -#[test] -fn test_i16_mul() { - TestI16::test_mul(); -} - -#[test] -fn test_i16_div() { - TestI16::test_div(); -} - -#[test] -fn test_i16_pow() { - TestI16::test_pow(); -} - -#[test] -fn test_i16_eq() { - TestI16::test_eq(); -} - -#[test] -fn test_i16_ne() { - TestI16::test_ne(); -} - -#[test] -fn test_i16_ge() { - TestI16::test_ge(); -} - -#[test] -fn test_i16_gt() { - TestI16::test_gt(); -} - -#[test] -fn test_i16_le() { - TestI16::test_le(); -} - -#[test] -fn test_i16_lt() { - TestI16::test_lt(); -} - -#[test] -fn test_i16_console_assert() { - TestI16::test_console_assert(); -} - -#[test] -fn test_i16_ternary() { - TestI16::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/i8/add.leo b/tests/compiler/integers/i8/add.leo index dd71bc7f53..e98daba07f 100644 --- a/tests/compiler/integers/i8/add.leo +++ b/tests/compiler/integers/i8/add.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 1; + b: i8 = 2; + c: i8 = 3; +*/ + function main(a: i8, b: i8, c: i8) { console.assert(a + b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/console_assert.leo b/tests/compiler/integers/i8/console_assert.leo index 1fc09cb57d..97716d55b8 100644 --- a/tests/compiler/integers/i8/console_assert.leo +++ b/tests/compiler/integers/i8/console_assert.leo @@ -1,3 +1,13 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 1; + b: i8 = 1; +*/ + function main(a: i8, b: i8) { console.assert(a == b); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/div.leo b/tests/compiler/integers/i8/div.leo index a80d8e6319..801897199b 100644 --- a/tests/compiler/integers/i8/div.leo +++ b/tests/compiler/integers/i8/div.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 4; + b: i8 = 2; + c: i8 = 2; +*/ + function main(a: i8, b: i8, c: i8) { console.assert(a / b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/eq.leo b/tests/compiler/integers/i8/eq.leo index 130cc64b89..fb457b22f7 100644 --- a/tests/compiler/integers/i8/eq.leo +++ b/tests/compiler/integers/i8/eq.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 2; + b: i8 = 2; + c: bool = true; +*/ + function main(a: i8, b: i8, c: bool) { console.assert(a == b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/ge.leo b/tests/compiler/integers/i8/ge.leo index 3084692c0c..8311c497a8 100644 --- a/tests/compiler/integers/i8/ge.leo +++ b/tests/compiler/integers/i8/ge.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 4; + b: i8 = 4; + c: bool = true; +*/ + function main(a: i8, b: i8, c: bool) { console.assert(a >= b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/gt.leo b/tests/compiler/integers/i8/gt.leo index d3913b8b24..c9f02290c6 100644 --- a/tests/compiler/integers/i8/gt.leo +++ b/tests/compiler/integers/i8/gt.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 4; + b: i8 = 2; + c: bool = true; +*/ + function main(a: i8, b: i8, c: bool) { console.assert(a > b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/input.leo b/tests/compiler/integers/i8/input.leo deleted file mode 100644 index 1fc09cb57d..0000000000 --- a/tests/compiler/integers/i8/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8) { - console.assert(a == b); -} \ No newline at end of file diff --git a/tests/compiler/integers/i8/inputs/abc_bool.in b/tests/compiler/integers/i8/inputs/abc_bool.in new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/compiler/integers/i8/inputs/abc_int.in b/tests/compiler/integers/i8/inputs/abc_int.in new file mode 100644 index 0000000000..77660df494 --- /dev/null +++ b/tests/compiler/integers/i8/inputs/abc_int.in @@ -0,0 +1,4 @@ +[main] +a: i8 = 1; +b: i8 = 2; +c: bool = true; \ No newline at end of file diff --git a/tests/compiler/integers/i8/le.leo b/tests/compiler/integers/i8/le.leo index 92e011f206..a95914cb18 100644 --- a/tests/compiler/integers/i8/le.leo +++ b/tests/compiler/integers/i8/le.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 2; + b: i8 = 2; + c: bool = true; +*/ + function main(a: i8, b: i8, c: bool) { console.assert(a <= b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/lt.leo b/tests/compiler/integers/i8/lt.leo index eb34b7148e..49aa80ee9c 100644 --- a/tests/compiler/integers/i8/lt.leo +++ b/tests/compiler/integers/i8/lt.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 2; + b: i8 = 4; + c: bool = true; +*/ + function main(a: i8, b: i8, c: bool) { console.assert(a < b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/max.leo b/tests/compiler/integers/i8/max.leo index f20d59ddf4..7fbe3c9771 100644 --- a/tests/compiler/integers/i8/max.leo +++ b/tests/compiler/integers/i8/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i8 = 127; } \ No newline at end of file diff --git a/tests/compiler/integers/i8/max_fail.leo b/tests/compiler/integers/i8/max_fail.leo index 9e1956024a..be2922f4fd 100644 --- a/tests/compiler/integers/i8/max_fail.leo +++ b/tests/compiler/integers/i8/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i8 = 128; } \ No newline at end of file diff --git a/tests/compiler/integers/i8/min.leo b/tests/compiler/integers/i8/min.leo index 7b6db025ea..5c012ffc3a 100644 --- a/tests/compiler/integers/i8/min.leo +++ b/tests/compiler/integers/i8/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i8 = -128; } \ No newline at end of file diff --git a/tests/compiler/integers/i8/min_fail.leo b/tests/compiler/integers/i8/min_fail.leo index 41170e9b93..6a1c58fe00 100644 --- a/tests/compiler/integers/i8/min_fail.leo +++ b/tests/compiler/integers/i8/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i8 = -129; } \ No newline at end of file diff --git a/tests/compiler/integers/i8/mod.rs b/tests/compiler/integers/i8/mod.rs deleted file mode 100644 index 5073dda460..0000000000 --- a/tests/compiler/integers/i8/mod.rs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I8Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI8, - i8, - IntegerType::Signed(SignedIntegerType::I8Type(I8Type {})), - Int8 -); - -#[test] -fn test_i8_min() { - TestI8::test_min(); -} - -#[test] -fn test_i8_min_fail() { - TestI8::test_min_fail(); -} - -#[test] -fn test_i8_max() { - TestI8::test_max(); -} - -#[test] -fn test_i8_max_fail() { - TestI8::test_max_fail(); -} - -#[test] -fn test_i8_neg() { - TestI8::test_negate(); -} - -#[test] -fn test_i8_neg_max_fail() { - TestI8::test_negate_min_fail(); -} - -#[test] -fn test_i8_neg_zero() { - TestI8::test_negate_zero(); -} - -#[test] -fn test_i8_add() { - TestI8::test_add(); -} - -#[test] -fn test_i8_sub() { - TestI8::test_sub(); -} - -#[test] -fn test_i8_mul() { - TestI8::test_mul(); -} - -#[test] -fn test_i8_div() { - TestI8::test_div(); -} - -#[test] -fn test_i8_pow() { - TestI8::test_pow(); -} - -#[test] -fn test_i8_eq() { - TestI8::test_eq(); -} - -#[test] -fn test_i8_ne() { - TestI8::test_ne(); -} - -#[test] -fn test_i8_ge() { - TestI8::test_ge(); -} - -#[test] -fn test_i8_gt() { - TestI8::test_gt(); -} - -#[test] -fn test_i8_le() { - TestI8::test_le(); -} - -#[test] -fn test_i8_lt() { - TestI8::test_lt(); -} - -#[test] -fn test_i8_console_assert() { - TestI8::test_console_assert(); -} - -#[test] -fn test_i8_ternary() { - TestI8::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/i8/mul.leo b/tests/compiler/integers/i8/mul.leo index 34726fff92..aa01cac3df 100644 --- a/tests/compiler/integers/i8/mul.leo +++ b/tests/compiler/integers/i8/mul.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 2; + b: i8 = 5; + c: i8 = 10; +*/ + function main(a: i8, b: i8, c: i8) { console.assert(a * b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/ne.leo b/tests/compiler/integers/i8/ne.leo index e5028d404a..27805d113f 100644 --- a/tests/compiler/integers/i8/ne.leo +++ b/tests/compiler/integers/i8/ne.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 2; + b: i8 = 5; + c: bool = true; +*/ + function main(a: i8, b: i8, c: bool) { console.assert(a != b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/negate.leo b/tests/compiler/integers/i8/negate.leo index 2a2266bc56..25b0c38b12 100644 --- a/tests/compiler/integers/i8/negate.leo +++ b/tests/compiler/integers/i8/negate.leo @@ -1,3 +1,13 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 5; + b: i8 = -5; +*/ + function main(a: i8, b: i8) { console.assert(-a == b); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/negate_min.leo b/tests/compiler/integers/i8/negate_min.leo index 7f664a1b78..e6a7ff1417 100644 --- a/tests/compiler/integers/i8/negate_min.leo +++ b/tests/compiler/integers/i8/negate_min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a = -128i8; const b = -a; diff --git a/tests/compiler/integers/i8/negate_zero.leo b/tests/compiler/integers/i8/negate_zero.leo index cc3f4a0828..f4f6d38592 100644 --- a/tests/compiler/integers/i8/negate_zero.leo +++ b/tests/compiler/integers/i8/negate_zero.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a = 0i8; diff --git a/tests/compiler/integers/i8/no_space_between_literal.leo b/tests/compiler/integers/i8/no_space_between_literal.leo index 7a8eda7ef9..333cdbbf59 100644 --- a/tests/compiler/integers/i8/no_space_between_literal.leo +++ b/tests/compiler/integers/i8/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const i = 1 i8; } \ No newline at end of file diff --git a/tests/compiler/integers/i8/pow.leo b/tests/compiler/integers/i8/pow.leo index 18aeb44b46..7b65f691e4 100644 --- a/tests/compiler/integers/i8/pow.leo +++ b/tests/compiler/integers/i8/pow.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 2; + b: i8 = 2; + c: i8 = 4; +*/ + function main(a: i8, b: i8, c: i8) { console.assert(a ** b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/sub.leo b/tests/compiler/integers/i8/sub.leo index a795bed153..2e2de982fa 100644 --- a/tests/compiler/integers/i8/sub.leo +++ b/tests/compiler/integers/i8/sub.leo @@ -1,3 +1,14 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + a: i8 = 100; + b: i8 = 50; + c: i8 = 50; +*/ + function main(a: i8, b: i8, c: i8) { console.assert(a - b == c); } \ No newline at end of file diff --git a/tests/compiler/integers/i8/ternary.leo b/tests/compiler/integers/i8/ternary.leo index 0956a9cd39..4c489b78bc 100644 --- a/tests/compiler/integers/i8/ternary.leo +++ b/tests/compiler/integers/i8/ternary.leo @@ -1,3 +1,21 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i8.in: | + [main] + s: bool = true; + a: i8 = 10; + b: i8 = 5; + c: i8 = 10; + - i8_rev.in: | + [main] + s: bool = false; + a: i8 = 10; + b: i8 = 5; + c: i8 = 5; +*/ + function main(s: bool, a: i8, b: i8, c: i8) { const r = s ? a : b; diff --git a/tests/compiler/mutability/array.leo b/tests/compiler/mutability/array.leo index ea63baaad2..8c31a30157 100644 --- a/tests/compiler/mutability/array.leo +++ b/tests/compiler/mutability/array.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + // Arrays are immutable by default. function main() { const a = [1u32]; diff --git a/tests/compiler/mutability/array_mut.leo b/tests/compiler/mutability/array_mut.leo index 5d4db3b68a..a7e5a01a49 100644 --- a/tests/compiler/mutability/array_mut.leo +++ b/tests/compiler/mutability/array_mut.leo @@ -1,4 +1,8 @@ -// Adding the `mut` keyword makes an array variable mutable. +/* +namespace: Compile +expectation: Pass +*/ + function main() { let a = [1u32]; a[0] = 0; diff --git a/tests/compiler/mutability/array_splice_mut.leo b/tests/compiler/mutability/array_splice_mut.leo index d13216600a..c6a928e799 100644 --- a/tests/compiler/mutability/array_splice_mut.leo +++ b/tests/compiler/mutability/array_splice_mut.leo @@ -1,4 +1,8 @@ -// Adding the `mut` keyword makes an array variable mutable. +/* +namespace: Compile +expectation: Pass +*/ + function main() { let a = [1u32, 2u32, 3u32]; a[0u32..2u32] = [4u32, 5u32]; diff --git a/tests/compiler/mutability/array_tuple_mut.leo b/tests/compiler/mutability/array_tuple_mut.leo index ed323d46da..efa87c544b 100644 --- a/tests/compiler/mutability/array_tuple_mut.leo +++ b/tests/compiler/mutability/array_tuple_mut.leo @@ -1,4 +1,8 @@ -// Adding the `mut` keyword makes an array variable mutable. +/* +namespace: Compile +expectation: Pass +*/ + function main() { let a = [(1u32, 2u32)]; a[0u32].1 = 3u32; diff --git a/tests/compiler/mutability/circuit.leo b/tests/compiler/mutability/circuit.leo index 508595ef16..00168dbf66 100644 --- a/tests/compiler/mutability/circuit.leo +++ b/tests/compiler/mutability/circuit.leo @@ -1,8 +1,13 @@ -// Circuits are immutable by default. +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { x: u32 } +// const variable is immutable function main() { const a = Foo { x: 1 }; a.x = 0; diff --git a/tests/compiler/mutability/circuit_function_const.leo b/tests/compiler/mutability/circuit_function_const.leo new file mode 100644 index 0000000000..29d93ee775 --- /dev/null +++ b/tests/compiler/mutability/circuit_function_const.leo @@ -0,0 +1,21 @@ +/* +namespace: Compile +expectation: Fail +*/ + +circuit Foo { + x: u32 + + function foo(mut self) { + self.x = 10; + } +} + +// cannot call mutable member function 'foo' of circuit 'Foo' from immutable context +function main() { + const a = Foo { x: 1 }; + + a.foo(); + + console.assert(a.x == 10u32); +} \ No newline at end of file diff --git a/tests/compiler/mutability/circuit_function_mut.leo b/tests/compiler/mutability/circuit_function_mut.leo index c1bc941c94..1fbb23baae 100644 --- a/tests/compiler/mutability/circuit_function_mut.leo +++ b/tests/compiler/mutability/circuit_function_mut.leo @@ -1,9 +1,21 @@ -// Adding the `mut` keyword makes a circuit variable mutable. +/* +namespace: Compile +expectation: Pass +*/ + circuit Foo { - function bar() {} + x: u32 + + function foo(mut self) { + self.x = 10; + } } + function main() { let a = Foo { x: 1 }; - a.bar = 0; + + a.foo(); + + console.assert(a.x == 10u32); } \ No newline at end of file diff --git a/tests/compiler/mutability/circuit_mut.leo b/tests/compiler/mutability/circuit_mut.leo deleted file mode 100644 index f7067db11e..0000000000 --- a/tests/compiler/mutability/circuit_mut.leo +++ /dev/null @@ -1,11 +0,0 @@ -// Adding the `mut` keyword makes a circuit variable mutable. -circuit Foo { - x: u32 -} - -function main() { - let a = Foo { x: 1 }; - a.x = 0; - - console.assert(a.x == 0u32); -} \ No newline at end of file diff --git a/tests/compiler/mutability/circuit_static_function_mut.leo b/tests/compiler/mutability/circuit_static_function_mut.leo index c1bc941c94..4af33040ea 100644 --- a/tests/compiler/mutability/circuit_static_function_mut.leo +++ b/tests/compiler/mutability/circuit_static_function_mut.leo @@ -1,4 +1,8 @@ -// Adding the `mut` keyword makes a circuit variable mutable. +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { function bar() {} } diff --git a/tests/compiler/mutability/circuit_variable_mut.leo b/tests/compiler/mutability/circuit_variable_mut.leo index f7067db11e..f15f00047a 100644 --- a/tests/compiler/mutability/circuit_variable_mut.leo +++ b/tests/compiler/mutability/circuit_variable_mut.leo @@ -1,8 +1,13 @@ -// Adding the `mut` keyword makes a circuit variable mutable. +/* +namespace: Compile +expectation: Pass +*/ + circuit Foo { x: u32 } +// Using let makes a circuit variable mutable. function main() { let a = Foo { x: 1 }; a.x = 0; diff --git a/tests/compiler/mutability/cond_mut.leo b/tests/compiler/mutability/cond_mut.leo index 11e19b2645..b5187ce928 100644 --- a/tests/compiler/mutability/cond_mut.leo +++ b/tests/compiler/mutability/cond_mut.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main () { let x = 100i8; if false { diff --git a/tests/compiler/mutability/const.leo b/tests/compiler/mutability/const.leo index 6201e7c5af..59de930123 100644 --- a/tests/compiler/mutability/const.leo +++ b/tests/compiler/mutability/const.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + // Let variables are immutable by default. function main() { const a = 1u32; diff --git a/tests/compiler/mutability/function_input.leo b/tests/compiler/mutability/function_input.leo index 18d035574b..30fb853f0f 100644 --- a/tests/compiler/mutability/function_input.leo +++ b/tests/compiler/mutability/function_input.leo @@ -1,3 +1,12 @@ +/* +namespace: Compile +expectation: Fail +inputs: + - const.in: | + [constants] + a: bool = true; +*/ + // Const function input are immutable. function main(const a: bool) { a = false; diff --git a/tests/compiler/mutability/function_input_mut.leo b/tests/compiler/mutability/function_input_mut.leo index 98739d78c7..9d0d1c2dd5 100644 --- a/tests/compiler/mutability/function_input_mut.leo +++ b/tests/compiler/mutability/function_input_mut.leo @@ -1,3 +1,12 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - mut.in: | + [main] + a: bool = false; +*/ + // Function input are mutable by default. function main(a: bool) { a = true; diff --git a/tests/compiler/mutability/let_mut_nested.leo b/tests/compiler/mutability/let_mut_nested.leo index 93236ef4c6..7d26239222 100644 --- a/tests/compiler/mutability/let_mut_nested.leo +++ b/tests/compiler/mutability/let_mut_nested.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main () { let x = 2u8; let y = x; diff --git a/tests/compiler/statements/block.leo b/tests/compiler/statements/block.leo index 4891a44827..ca1a1abe89 100644 --- a/tests/compiler/statements/block.leo +++ b/tests/compiler/statements/block.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: u32_3.in +input_file: inputs/u32_3.in */ function main(x: u32) -> bool { diff --git a/tests/compiler/statements/chain.leo b/tests/compiler/statements/chain.leo index ab79ae4647..b085440bb0 100644 --- a/tests/compiler/statements/chain.leo +++ b/tests/compiler/statements/chain.leo @@ -2,9 +2,9 @@ namespace: Compile expectation: Pass input_file: - - u32_3.in - - u32_5.in - - u32_6.in + - inputs/u32_3.in + - inputs/u32_5.in + - inputs/u32_6.in */ function main(x: u32) -> bool { diff --git a/tests/compiler/statements/for_loop.leo b/tests/compiler/statements/for_loop.leo index 5baba77b5d..9c0f79d057 100644 --- a/tests/compiler/statements/for_loop.leo +++ b/tests/compiler/statements/for_loop.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: u32_3.in +input_file: inputs/u32_3.in */ function main(x: u32) -> bool { diff --git a/tests/compiler/statements/u32_3.in b/tests/compiler/statements/inputs/u32_3.in similarity index 100% rename from tests/compiler/statements/u32_3.in rename to tests/compiler/statements/inputs/u32_3.in diff --git a/tests/compiler/statements/u32_5.in b/tests/compiler/statements/inputs/u32_5.in similarity index 100% rename from tests/compiler/statements/u32_5.in rename to tests/compiler/statements/inputs/u32_5.in diff --git a/tests/compiler/statements/u32_6.in b/tests/compiler/statements/inputs/u32_6.in similarity index 100% rename from tests/compiler/statements/u32_6.in rename to tests/compiler/statements/inputs/u32_6.in diff --git a/tests/compiler/statements/iteration_basic.leo b/tests/compiler/statements/iteration_basic.leo index 5de135bba2..20ca8f6c5c 100644 --- a/tests/compiler/statements/iteration_basic.leo +++ b/tests/compiler/statements/iteration_basic.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: u32_3.in +input_file: inputs/u32_3.in */ function main(x: u32) -> bool { diff --git a/tests/compiler/statements/iteration_variable.leo b/tests/compiler/statements/iteration_variable.leo index 34aa827afc..1726525f91 100644 --- a/tests/compiler/statements/iteration_variable.leo +++ b/tests/compiler/statements/iteration_variable.leo @@ -1,7 +1,7 @@ /* namespace: Compile expectation: Pass -input_file: u32_3.in +input_file: inputs/u32_3.in */ function main(x: u32) -> bool { diff --git a/tests/compiler/statements/multiple_returns.leo b/tests/compiler/statements/multiple_returns.leo index 14b70341c0..2746ccd3c4 100644 --- a/tests/compiler/statements/multiple_returns.leo +++ b/tests/compiler/statements/multiple_returns.leo @@ -2,8 +2,8 @@ namespace: Compile expectation: Pass input_file: - - u32_3.in - - u32_5.in + - inputs/u32_3.in + - inputs/u32_5.in */ function main(x: u32) -> bool { diff --git a/tests/compiler/statements/mutate.leo b/tests/compiler/statements/mutate.leo index dc337ac723..7607cebbc5 100644 --- a/tests/compiler/statements/mutate.leo +++ b/tests/compiler/statements/mutate.leo @@ -2,8 +2,8 @@ namespace: Compile expectation: Pass input_file: - - u32_3.in - - u32_5.in + - inputs/u32_3.in + - inputs/u32_5.in */ function main(x: u32) -> bool { diff --git a/tests/compiler/statements/nested_mutate.leo b/tests/compiler/statements/nested_mutate.leo index 2b3cac1a9e..1a5b7475ed 100644 --- a/tests/compiler/statements/nested_mutate.leo +++ b/tests/compiler/statements/nested_mutate.leo @@ -2,9 +2,9 @@ namespace: Compile expectation: Pass input_file: - - u32_3.in - - u32_5.in - - u32_6.in + - inputs/u32_3.in + - inputs/u32_5.in + - inputs/u32_6.in */ function main(x: u32) -> bool { diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out new file mode 100644 index 0000000000..de8607964a --- /dev/null +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:37\n |\n 4 | console.assert(a == [[0u8; 2]; 3)]); // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" diff --git a/tests/expectations/compiler/compiler/integers/i16/add.leo.out b/tests/expectations/compiler/compiler/integers/i16/add.leo.out new file mode 100644 index 0000000000..2f277eb56e --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/add.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 172 + num_constraints: 173 + at: 723a4a49b4ef8819a93abd262d8ee19904417d6f8b6e9820cbc923e6953ce77c + bt: 3685748e2150def12598827c6d3217b7665ad912fcf517afafed7dd933dd68a2 + ct: acefb38d2e822ba8454f989fcdcfad22e9c15b0115cebecf3ec7f842412b0812 + output: + - input_file: i16.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out new file mode 100644 index 0000000000..90b869d10b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/console_assert.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 63 + num_constraints: 63 + at: 4cac6455a624606970ebe776412ee9b9d5800577aea1fad0677b866e991b6181 + bt: abee7b67c55170fc3341444203a9a70e68690dce751aa36d3e91f1cf7ceef73d + ct: 51c18ee4216feeb01d0b0d661dfeb294e7e100873586edf79be89c8b54d9e168 + output: + - input_file: i16.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/div.leo.out b/tests/expectations/compiler/compiler/integers/i16/div.leo.out new file mode 100644 index 0000000000..5e93941061 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/div.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 7764 + num_constraints: 8642 + at: 7ca6ba5e059aec2fb7bd4f8b0f6e37d6de7fbfa1f71ef7447f10a667aea9f7ca + bt: eadd8a53b4c1d8efbd2015f9e358120b022061fc46b548fdab054b5a75a79757 + ct: 5df37aa184759798530f98a25acc5b096300451053e7165286e3956c0d90c449 + output: + - input_file: i16.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out new file mode 100644 index 0000000000..928bfb9a09 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 65 + num_constraints: 65 + at: d1e727ca124b8a409ccaa2404651441e669134e272d9d6635564d4e2509b7ebb + bt: eba2113bdda3d667d9e8c87f545fe4e2a0143b18a3fff0c1aaa46dd376ed1735 + ct: f037d279ccea3ca689e05801ec3ba0053b5ce66a1763d4620262ea9b69873008 + output: + - input_file: i16.in + output: + registers: {} + - input_file: i16_false + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out new file mode 100644 index 0000000000..e726ead169 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 113 + num_constraints: 113 + at: 692a1e97a27ff41538ae2636fbc61e80056a629462752ec88e9992fe6c985b62 + bt: dc20f75204b1fb858e1971441f24a4aa1780e545581c55ff3d52cec41be65b79 + ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 + output: + - input_file: i16.in + output: + registers: {} + - input_file: i16_false + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out new file mode 100644 index 0000000000..786a7cbde1 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 113 + num_constraints: 113 + at: 0f2769e8c910d59c929dc4ad4ef8599892ff8b1562de13a8440763e58d66bba5 + bt: 07da85fcfccc58758d043e27b0aab5a749760c644824684c13befde258deb78c + ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 + output: + - input_file: i16.in + output: + registers: {} + - input_file: i16_false + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/input.leo.out b/tests/expectations/compiler/compiler/integers/i16/input.leo.out new file mode 100644 index 0000000000..90b869d10b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/input.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 63 + num_constraints: 63 + at: 4cac6455a624606970ebe776412ee9b9d5800577aea1fad0677b866e991b6181 + bt: abee7b67c55170fc3341444203a9a70e68690dce751aa36d3e91f1cf7ceef73d + ct: 51c18ee4216feeb01d0b0d661dfeb294e7e100873586edf79be89c8b54d9e168 + output: + - input_file: i16.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/le.leo.out b/tests/expectations/compiler/compiler/integers/i16/le.leo.out new file mode 100644 index 0000000000..bb748be517 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/le.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 113 + num_constraints: 113 + at: 52b091c77b6309726784221787aaf2a03110e4951a3f05e99f29d4f9b55f650c + bt: 34c1c5f1fd258fc5f18137e0cd367a6c3149958ec8b92123518e293db31afbe3 + ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 + output: + - input_file: i16.in + output: + registers: {} + - input_file: i16_false + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out new file mode 100644 index 0000000000..af932fab79 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 113 + num_constraints: 113 + at: 47043c58e00ec824b11a140b997e8346345dfd7dbbada1f6b4ea6cbd87474881 + bt: 564588048812d9300963caf70148f154c231faa3209aed2ee5f9dd51a31af0ef + ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 + output: + - input_file: i16.in + output: + registers: {} + - input_file: i16_false + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/max.leo.out b/tests/expectations/compiler/compiler/integers/i16/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..c634052dbd --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n = failed to parse int value '32768'" diff --git a/tests/expectations/compiler/compiler/integers/i16/min.leo.out b/tests/expectations/compiler/compiler/integers/i16/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..eec1ebd3ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n = failed to parse int value '-32769'" diff --git a/tests/expectations/compiler/compiler/integers/i8/add.leo.out b/tests/expectations/compiler/compiler/integers/i8/add.leo.out new file mode 100644 index 0000000000..e88041f83e --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/add.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 84 + num_constraints: 85 + at: ba62118a12c05f58b2123b680ac6ae62e348ecc5f6f05bf7a280aa2f0227568a + bt: 85916f4efb04caeb618ad35bc96528d6aeffd742b574cb93ed22ffcd46c87751 + ct: 846591a223fd860defb812adf90d4d103f16e168465e64986ac960819b4fae52 + output: + - input_file: i8.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out new file mode 100644 index 0000000000..6eb6ffd44e --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/console_assert.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 31 + num_constraints: 31 + at: fc632b7c29294f7348e0fd778b0e144743a047f35498f3ab5cc30be48469100a + bt: c2cfac5aa6e125cb6cde720b0598fef7933c4aa62926fe99405bf1c2829dd4ce + ct: a3fa97a403ebea95a47d7ded7c01cee45af74afbfa876c203e4e96f6054b8815 + output: + - input_file: i8.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/div.leo.out b/tests/expectations/compiler/compiler/integers/i8/div.leo.out new file mode 100644 index 0000000000..276ae8c818 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/div.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1900 + num_constraints: 2146 + at: 41ed658cf94f79b70013f1f5a1919d528ce2e6e2a7a1b0282408fcf95cd146ff + bt: b857cea12f4b3716495ef7dffecf8cc30b26e4f560fa0464c4a04df43a1f18ef + ct: a3fb8f79411957360225b45151a3f8f0d164bbcac2724d2fee23eb694e1c3bbc + output: + - input_file: i8.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out new file mode 100644 index 0000000000..0dfbf49db7 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 33 + num_constraints: 33 + at: 4560e85454c127fff9bff0d813b7598022e740537151444c2dca8fae4996c3b0 + bt: 03d1b6a8fdf9f73f595cf97261f1bae81000c89364c7af58f4f7f04aba7bac30 + ct: 2aae7d6631260dcaafbfe9709ade84e75f5172a9baad48e108e7264d5fc17cf6 + output: + - input_file: i8.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out new file mode 100644 index 0000000000..f0666523a7 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 57 + num_constraints: 57 + at: 6def83ea22fb24fa8fca853bf170cf10a43ebe020a2ee7c752c67d876c967b4b + bt: a55f11270f22104142bcee90897c9d9a8463b2fa9043957f85d82725f4bb075e + ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 + output: + - input_file: i8.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out new file mode 100644 index 0000000000..8dfd598ad5 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 57 + num_constraints: 57 + at: 3c9089f44c96a904e368955385f3dc6a9218496a94c075c3539e19affe9ff650 + bt: 4a959c05229442ca476ef20cfe1988fab90d5ca1b8f1c75f75719d475030c086 + ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 + output: + - input_file: i8.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/le.leo.out b/tests/expectations/compiler/compiler/integers/i8/le.leo.out new file mode 100644 index 0000000000..0dd7ae182b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/le.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 57 + num_constraints: 57 + at: 9098a9ff52eec6aa462e8c597e9960c76ef9cd120c991be323536dd15425dc11 + bt: 13756f3827f4f5f9c3d57ac57364366b9716cd3474416861f9aa9fe7a79206d0 + ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 + output: + - input_file: i8.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out new file mode 100644 index 0000000000..5e26082c7c --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 57 + num_constraints: 57 + at: 5ff97534b183c8eebdb2f94075cc246845fa5ee32d17e8e317c1fabeaa0fed7e + bt: 2edb58dffc1fb55bd54dd589b8fb4cf15292f14cc2e9d478bb372b57c958ead9 + ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 + output: + - input_file: i8.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/max.leo.out b/tests/expectations/compiler/compiler/integers/i8/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..e7800e5925 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n = failed to parse int value '128'" diff --git a/tests/expectations/compiler/compiler/integers/i8/min.leo.out b/tests/expectations/compiler/compiler/integers/i8/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..7a373b2d02 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n = failed to parse int value '-129'" diff --git a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out new file mode 100644 index 0000000000..2816652491 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1536 + num_constraints: 1537 + at: 1b30f80430b27c3c9351fe58228246d6165079707117c819357c380f24bfa5b7 + bt: 0b017985fe9a0650c67351f1cc247871e9cc9e8c907f2cb47791c5ae1a5b324a + ct: 3fb41ccb74d402bc413944e9eb543a7333552052b7781eb257d2b861659d5a09 + output: + - input_file: i16.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out new file mode 100644 index 0000000000..e2b3ec4e41 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 33 + num_constraints: 33 + at: cea5a73507043981fb288f2b6ab49a8b860029156ad1e126894c522207d53c02 + bt: 10b52342f8c44eb9b3335b4df9ca4136de3ad35d5b580b2ab32ae5e10bcdf3b4 + ct: 2aae7d6631260dcaafbfe9709ade84e75f5172a9baad48e108e7264d5fc17cf6 + output: + - input_file: i16.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out new file mode 100644 index 0000000000..3a58aed4be --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 45 + num_constraints: 45 + at: 283e78462191d2c9a2855672a8a724df585a52240010455e1b84ed8376436d1e + bt: 43214e3563d9bc921ffc9079215a945f8450cf3c02506bd6e23144b2e18944d3 + ct: a2352ad3a95bc4b0d0ca56ac5b1bcec0cc3b62077d2c3d883f90f8bf014a8e28 + output: + - input_file: i16.in + output: + registers: {} 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..d307d7bcf7 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n = integer operation failed due to the signed integer error `Overflow`" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out new file mode 100644 index 0000000000..d280bc7fbe --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:13\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" diff --git a/tests/expectations/compiler/compiler/integers/i8/pow.leo.out b/tests/expectations/compiler/compiler/integers/i8/pow.leo.out new file mode 100644 index 0000000000..905b5aa8b7 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/pow.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 24127 + num_constraints: 24207 + at: 49a5b48f981cfd19732f3438a154250200ab1b349dd1d930731d736e32d95532 + bt: b8979c4494b630792fad6a0b29a53293c7649f3d5fcd45b8c1d2396f970ca0dd + ct: 1acbdb8598982e7bf38d0a531f67d6937a6bd98418c6d382e4201c4a8285df55 + output: + - input_file: i16.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out new file mode 100644 index 0000000000..1c57c96986 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 98 + num_constraints: 99 + at: c86be150a5e08105db4ff033a70e55b82dccb76deed638930953bdbb7842f441 + bt: 35a61219fd7bf101cf1a1a66ad2f71df661d6dc9dda2ed9df12c7650164559aa + ct: 50f1a63551e44fb1f2ef29982d5b1580340dcda67d8d8caaa9c837353a950d8f + output: + - input_file: i16.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out new file mode 100644 index 0000000000..e10d3f99c7 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 56 + num_constraints: 64 + at: 74bc7b90c80770131152d547d67464f326973f075c0dc65ebc94d13fbeb2effa + bt: 90a2489533355ee3e27d5cf485612441ec10e21923eb78e6be21633ce11fa8f1 + ct: 4c2d67fc6e1c4ad44f323c1b958ed94313153573aa72a3c0f0d25b17b54e63bc + output: + - input_file: i16.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/array.leo.out b/tests/expectations/compiler/compiler/mutability/array.leo.out new file mode 100644 index 0000000000..2565a98cd2 --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/array.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:6:5\n |\n 6 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/circuit.leo.out b/tests/expectations/compiler/compiler/mutability/circuit.leo.out new file mode 100644 index 0000000000..fe83538093 --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/circuit.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out new file mode 100644 index 0000000000..3c52156846 --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n = cannot call mutable member function 'foo' of circuit 'Foo' from immutable context" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/circuit_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_mut.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/circuit_mut.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut.leo.out new file mode 100644 index 0000000000..671031ca81 --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n = extra circuit member 'x' for initialization of circuit 'Foo' is not allowed" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/const.leo.out b/tests/expectations/compiler/compiler/mutability/const.leo.out new file mode 100644 index 0000000000..eb7ad1607b --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/const.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out new file mode 100644 index 0000000000..b725cf1c03 --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:5:5\n |\n 5 | a = false;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out new file mode 100644 index 0000000000..122d7448a1 --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: mut.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out new file mode 100644 index 0000000000..4d5e30c17d --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 17 + num_constraints: 17 + at: 62f2cd41f4b590978ffd9db8160c28a4aa29dc3386880a1c83192adaa60930c8 + bt: 3402e051d99a4c5be395811da2585d8a57577a0e8307aff01ddfe38b238e03ec + ct: d5dcfd364897254307770e70351a0fba77b2db59351d48fedfaa02aff5307e50 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/statements/block.leo.out b/tests/expectations/compiler/compiler/statements/block.leo.out index 8d06221d84..5a713d9994 100644 --- a/tests/expectations/compiler/compiler/statements/block.leo.out +++ b/tests/expectations/compiler/compiler/statements/block.leo.out @@ -10,7 +10,7 @@ outputs: bt: 54bbc6eb42c38f8bbb12360c98b483e782f47c2875d6b88b6ae2b7cd70220cf8 ct: 52022ccbdc5119e02384f852f21e0ed0b6d729cb1cd18aea031f73037e467755 output: - - input_file: u32_3.in + - input_file: inputs/u32_3.in output: registers: a: diff --git a/tests/expectations/compiler/compiler/statements/chain.leo.out b/tests/expectations/compiler/compiler/statements/chain.leo.out index 20454e0595..185eed3db8 100644 --- a/tests/expectations/compiler/compiler/statements/chain.leo.out +++ b/tests/expectations/compiler/compiler/statements/chain.leo.out @@ -10,19 +10,19 @@ outputs: bt: 3ae01a0af5534bca6ad67bd2609a5370a4982c7f6d17fb8c285054c3d08f9c4f ct: 67836f65a02c595fcbf6d6a6d223a15e138d99a542390693ac4f582d073869e6 output: - - input_file: u32_3.in + - input_file: inputs/u32_3.in output: registers: a: type: bool value: "true" - - input_file: u32_5.in + - input_file: inputs/u32_5.in output: registers: a: type: bool value: "false" - - input_file: u32_6.in + - input_file: inputs/u32_6.in output: registers: a: diff --git a/tests/expectations/compiler/compiler/statements/for_loop.leo.out b/tests/expectations/compiler/compiler/statements/for_loop.leo.out index 2ebe1ba7f1..77ecad0e1b 100644 --- a/tests/expectations/compiler/compiler/statements/for_loop.leo.out +++ b/tests/expectations/compiler/compiler/statements/for_loop.leo.out @@ -10,7 +10,7 @@ outputs: bt: 192ca0dd8a20d69b443b952a7226e8c82936fedd2c9735d2b792883a01e46e3b ct: 04609638ad65317edb75529646b34f10a846b39b3ddb783e4aeceddde17b79f9 output: - - input_file: u32_3.in + - input_file: inputs/u32_3.in output: registers: a: diff --git a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out index e9b75968ed..12d2bda188 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_basic.leo.out @@ -10,7 +10,7 @@ outputs: bt: 9dc810c17c3ede695558cbade305db754bfc9de90c983ab114557f2cc9bb3631 ct: 16ed7b0c9d703be9a60d4b2e0da9a52403de8b03c35a545db7c05b698eddcdfd output: - - input_file: u32_3.in + - input_file: inputs/u32_3.in output: registers: a: diff --git a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out index 4b90bb7aee..4301500a16 100644 --- a/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out +++ b/tests/expectations/compiler/compiler/statements/iteration_variable.leo.out @@ -10,7 +10,7 @@ outputs: bt: d0528d867b40b0642b9b93a6b7f6d64ceb8d7e97799848ccd6b7fecfb86e2889 ct: 638bf6e71b08cf88ff8fc38ff7594880102164a51a452dec39b42c10f6f36c35 output: - - input_file: u32_3.in + - input_file: inputs/u32_3.in output: registers: a: diff --git a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out index 9b967dc59e..9fc84c54c3 100644 --- a/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/statements/multiple_returns.leo.out @@ -10,13 +10,13 @@ outputs: bt: 6c9fd7d4b3947c363bdb576b2c2c827c3ebfe4c3b56eda2abb8a37e436b69638 ct: c0d39de2b3b1c321288b265a4f0e72c13da3b07b0f5d61d14b66215440c56a42 output: - - input_file: u32_3.in + - input_file: inputs/u32_3.in output: registers: a: type: bool value: "true" - - input_file: u32_5.in + - input_file: inputs/u32_5.in output: registers: a: diff --git a/tests/expectations/compiler/compiler/statements/mutate.leo.out b/tests/expectations/compiler/compiler/statements/mutate.leo.out index 52a657ffd3..96b9e1ff2f 100644 --- a/tests/expectations/compiler/compiler/statements/mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/mutate.leo.out @@ -10,13 +10,13 @@ outputs: bt: eaddc0804e3047ae886466758455accba906f9ae990696f12c17a3237a9c9688 ct: e60851ccedd572c63dbcec5e0d84ddf45d76423dcf08fe0c9761fe17ce2bdd4e output: - - input_file: u32_3.in + - input_file: inputs/u32_3.in output: registers: a: type: bool value: "true" - - input_file: u32_5.in + - input_file: inputs/u32_5.in output: registers: a: diff --git a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out index 1b1071da2f..24307bb102 100644 --- a/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out +++ b/tests/expectations/compiler/compiler/statements/nested_mutate.leo.out @@ -10,19 +10,19 @@ outputs: bt: 86e567b4b178b61f7a2ae29ac78c6f60fc1b6c9cdfdbb6c896c8b059b68a90b6 ct: eb4c6eaa123567ee0a5b12a2812f90b4f532e657b59249aaad97092bd32cdbe9 output: - - input_file: u32_3.in + - input_file: inputs/u32_3.in output: registers: a: type: bool value: "true" - - input_file: u32_5.in + - input_file: inputs/u32_5.in output: registers: a: type: bool value: "true" - - input_file: u32_6.in + - input_file: inputs/u32_6.in output: registers: a: From 71486fb6281daf5f5c4cb50e73db9dce995cc2c7 Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 5 May 2021 11:37:51 +0300 Subject: [PATCH 04/26] circuits --- .../compiler/circuits/const_self_variable.leo | 7 +- .../circuits/const_self_variable_fail.leo | 2 +- ...define_circuit_inside_circuit_function.leo | 24 +- .../circuits/duplicate_name_context.leo | 13 +- tests/compiler/circuits/inline.leo | 19 +- tests/compiler/circuits/inline_fail.leo | 8 +- .../compiler/circuits/inline_member_fail.leo | 7 +- .../compiler/circuits/inline_member_pass.leo | 19 +- tests/compiler/circuits/inline_undefined.leo | 7 +- tests/compiler/circuits/member_function.leo | 15 +- .../circuits/member_function_fail.leo | 7 +- .../circuits/member_function_invalid.leo | 7 +- .../circuits/member_function_nested.leo | 18 +- .../circuits/member_static_function.leo | 15 +- .../member_static_function_invalid.leo | 7 +- .../member_static_function_nested.leo | 7 +- .../member_static_function_undefined.leo | 7 +- tests/compiler/circuits/member_variable.leo | 15 +- .../circuits/member_variable_and_function.leo | 14 +- .../circuits/member_variable_fail.leo | 8 +- tests/compiler/circuits/mod.rs | 318 ------------------ tests/compiler/circuits/mut_function_fail.leo | 7 +- .../circuits/mut_self_function_fail.leo | 7 +- .../mut_self_static_function_fail.leo | 7 +- tests/compiler/circuits/mut_self_variable.leo | 7 +- .../circuits/mut_self_variable_branch.leo | 7 +- .../mut_self_variable_conditional.leo | 7 +- .../circuits/mut_self_variable_fail.leo | 7 +- .../circuits/mut_static_function_fail.leo | 7 +- tests/compiler/circuits/mut_variable.leo | 7 +- tests/compiler/circuits/mut_variable_fail.leo | 7 +- .../mutable_call_immutable_context.leo | 7 +- tests/compiler/circuits/pedersen_mock.leo | 17 +- tests/compiler/circuits/self_circuit.leo | 6 + tests/compiler/circuits/self_fail.leo | 5 + tests/compiler/circuits/self_member.leo | 5 + .../compiler/circuits/self_member_invalid.leo | 5 + .../circuits/self_member_undefined.leo | 5 + .../const_self_variable.leo.out} | 0 ...ne_circuit_inside_circuit_function.leo.out | 18 + .../circuits/duplicate_name_context.leo.out | 15 + .../compiler/compiler/circuits/inline.leo.out | 18 + .../compiler/circuits/inline_fail.leo.out | 5 + .../circuits/inline_member_fail.leo.out | 5 + .../circuits/inline_member_pass.leo.out | 18 + .../circuits/inline_undefined.leo.out | 5 + .../compiler/circuits/member_function.leo.out | 18 + .../circuits/member_function_fail.leo.out | 5 + .../circuits/member_function_invalid.leo.out | 5 + .../circuits/member_function_nested.leo.out | 18 + .../circuits/member_static_function.leo.out | 18 + .../member_static_function_invalid.leo.out | 5 + .../member_static_function_nested.leo.out | 15 + .../member_static_function_undefined.leo.out | 5 + .../compiler/circuits/member_variable.leo.out | 18 + .../member_variable_and_function.leo.out | 18 + .../circuits/member_variable_fail.leo.out | 5 + .../circuits/mut_function_fail.leo.out | 5 + .../circuits/mut_self_function_fail.leo.out | 5 + .../mut_self_static_function_fail.leo.out | 5 + .../circuits/mut_self_variable.leo.out | 15 + .../circuits/mut_self_variable_branch.leo.out | 15 + .../mut_self_variable_conditional.leo.out | 15 + .../circuits/mut_self_variable_fail.leo.out | 5 + .../circuits/mut_static_function_fail.leo.out | 5 + .../compiler/circuits/mut_variable.leo.out | 15 + .../circuits/mut_variable_fail.leo.out | 5 + .../mutable_call_immutable_context.leo.out | 15 + .../compiler/circuits/pedersen_mock.leo.out | 18 + .../compiler/circuits/self_circuit.leo.out | 5 + .../compiler/circuits/self_fail.leo.out | 5 + .../compiler/circuits/self_member.leo.out | 15 + .../circuits/self_member_invalid.leo.out | 5 + .../circuits/self_member_undefined.leo.out | 5 + .../compiler/compiler/integers/i8/mul.leo.out | 2 +- .../compiler/compiler/integers/i8/ne.leo.out | 2 +- .../compiler/integers/i8/negate.leo.out | 2 +- .../compiler/compiler/integers/i8/pow.leo.out | 2 +- .../compiler/compiler/integers/i8/sub.leo.out | 2 +- .../compiler/integers/i8/ternary.leo.out | 5 +- 80 files changed, 671 insertions(+), 380 deletions(-) delete mode 100644 tests/compiler/circuits/mod.rs rename tests/expectations/compiler/compiler/{mutability/circuit_mut.leo.out => circuits/const_self_variable.leo.out} (100%) create mode 100644 tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/inline.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/inline_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_function.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_static_function.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_variable.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_variable.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/self_circuit.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/self_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/self_member.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out create mode 100644 tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out diff --git a/tests/compiler/circuits/const_self_variable.leo b/tests/compiler/circuits/const_self_variable.leo index 8ba32ba0df..f614a18c55 100644 --- a/tests/compiler/circuits/const_self_variable.leo +++ b/tests/compiler/circuits/const_self_variable.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + circuit Foo { a: u8, @@ -10,4 +15,4 @@ function main() { let f = Foo { a: 0u8 }; console.assert(1u8 == f.use_a()); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/const_self_variable_fail.leo b/tests/compiler/circuits/const_self_variable_fail.leo index 2a1e633ab6..d59d7cec48 100644 --- a/tests/compiler/circuits/const_self_variable_fail.leo +++ b/tests/compiler/circuits/const_self_variable_fail.leo @@ -15,4 +15,4 @@ function main() { let f = Foo { a: 0u8 }; f.set_a(1u8); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/define_circuit_inside_circuit_function.leo b/tests/compiler/circuits/define_circuit_inside_circuit_function.leo index cedabf2185..e3eb425f54 100644 --- a/tests/compiler/circuits/define_circuit_inside_circuit_function.leo +++ b/tests/compiler/circuits/define_circuit_inside_circuit_function.leo @@ -1,13 +1,27 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - func_circ.in: | + [main] + a: u32 = 100; + + [registers] + r0: bool = false; +*/ + circuit Foo { a: u32, } circuit Bar { - function bar() { - const f = Foo { a: 0u32 }; + function bar(a: u32) -> u32 { + const f = Foo { a: a }; + return f.a; } } -function main() { - const b = Bar::bar(); -} \ No newline at end of file +function main(a: u32) -> bool { + const b = Bar::bar(a); + return a == b; +} diff --git a/tests/compiler/circuits/duplicate_name_context.leo b/tests/compiler/circuits/duplicate_name_context.leo index 8644d27fcb..5173956d6d 100644 --- a/tests/compiler/circuits/duplicate_name_context.leo +++ b/tests/compiler/circuits/duplicate_name_context.leo @@ -1,13 +1,18 @@ +/* +namespace: Compile +expectation: Pass +*/ + circuit Bar { b2: u32 - function add_five(z:u32) -> u32 { - return z+5u32; + function add_five(z: u32) -> u32 { + return z + 5u32; } } function main () { const Bar = 66u32; - const k1 = Bar{ b2: 30u32 }; + const k1 = Bar { b2: 30u32 }; const k2 = Bar::add_five(55u32); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/inline.leo b/tests/compiler/circuits/inline.leo index 9ba06f4191..0d15894e68 100644 --- a/tests/compiler/circuits/inline.leo +++ b/tests/compiler/circuits/inline.leo @@ -1,7 +1,20 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - inline.in: | + [main] + x: u32 = 100; + + [registers] + r0: u32 = 0; +*/ + circuit Foo { x: u32 } -function main() { - const a = Foo { x: 1u32 }; -} \ No newline at end of file +function main(x: u32) -> u32 { + const a = Foo { x: x }; + return a.x; +} diff --git a/tests/compiler/circuits/inline_fail.leo b/tests/compiler/circuits/inline_fail.leo index 01597005fb..cca4779ba4 100644 --- a/tests/compiler/circuits/inline_fail.leo +++ b/tests/compiler/circuits/inline_fail.leo @@ -1,7 +1,13 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { x: u32 } function main() { + // no member y in Foo const a = Foo { y: 0u32 }; -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/inline_member_fail.leo b/tests/compiler/circuits/inline_member_fail.leo index 59f6d7992b..91dc1c3ab4 100644 --- a/tests/compiler/circuits/inline_member_fail.leo +++ b/tests/compiler/circuits/inline_member_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { x: u8 } @@ -5,4 +10,4 @@ circuit Foo { function main() { const y: u8 = 1; const a = Foo { y }; -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/inline_member_pass.leo b/tests/compiler/circuits/inline_member_pass.leo index 6fd7f7dff7..e966c9b0fb 100644 --- a/tests/compiler/circuits/inline_member_pass.leo +++ b/tests/compiler/circuits/inline_member_pass.leo @@ -1,3 +1,15 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - inline.in: | + [main] + x: u8 = 10; + + [registers] + r0: bool = false; +*/ + circuit Foo { x: u8 @@ -6,8 +18,9 @@ circuit Foo { } } -function main() { - const x: u8 = 1; +function main(x: u8) -> bool { const a = Foo { x }; const b = Foo::new(x); -} \ No newline at end of file + + return b.x == a.x; +} diff --git a/tests/compiler/circuits/inline_undefined.leo b/tests/compiler/circuits/inline_undefined.leo index 40c4cf722c..f7b9e40eaa 100644 --- a/tests/compiler/circuits/inline_undefined.leo +++ b/tests/compiler/circuits/inline_undefined.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a = Foo { }; -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/member_function.leo b/tests/compiler/circuits/member_function.leo index eee44be448..f5b64e8e19 100644 --- a/tests/compiler/circuits/member_function.leo +++ b/tests/compiler/circuits/member_function.leo @@ -1,3 +1,12 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - member.in: | + [registers] + r0: bool = false; +*/ + circuit Foo { x: u32, @@ -6,8 +15,8 @@ circuit Foo { } } -function main() { +function main() -> bool { const a = Foo { x: 1u32 }; - console.assert(a.echo() == 1u32); -} \ No newline at end of file + return a.echo() == 1u32; +} diff --git a/tests/compiler/circuits/member_function_fail.leo b/tests/compiler/circuits/member_function_fail.leo index 57b15383a3..4409fa88bb 100644 --- a/tests/compiler/circuits/member_function_fail.leo +++ b/tests/compiler/circuits/member_function_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { function echo(x: u32) -> u32 { return x; @@ -7,4 +12,4 @@ circuit Foo { function main() { const a = Foo { }; const err = a.echoed(1u32); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/member_function_invalid.leo b/tests/compiler/circuits/member_function_invalid.leo index 7283cf144d..d116dc3b6c 100644 --- a/tests/compiler/circuits/member_function_invalid.leo +++ b/tests/compiler/circuits/member_function_invalid.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { function echo(x: u32) -> u32 { return x; @@ -7,4 +12,4 @@ circuit Foo { function main() { const a = Foo { }; const err = a.echo(1u32); // echo is a static function and must be accessed using `::` -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/member_function_nested.leo b/tests/compiler/circuits/member_function_nested.leo index b8bf172947..888cd69d11 100644 --- a/tests/compiler/circuits/member_function_nested.leo +++ b/tests/compiler/circuits/member_function_nested.leo @@ -1,3 +1,15 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - inline.in: | + [main] + x: u32 = 10; + + [registers] + r0: bool = false; +*/ + circuit Foo { x: u32, @@ -10,9 +22,9 @@ circuit Foo { } } -function main() { - const a = Foo { x: 1u32 }; +function main(x: u32) -> bool { + const a = Foo { x }; const b = a.add_x(1u32); - console.assert(b == 2u32); + return b == x + 1; } diff --git a/tests/compiler/circuits/member_static_function.leo b/tests/compiler/circuits/member_static_function.leo index 68f6065754..ab78b0bbc0 100644 --- a/tests/compiler/circuits/member_static_function.leo +++ b/tests/compiler/circuits/member_static_function.leo @@ -1,11 +1,20 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - static.in: | + [registers] + r0: bool = false; +*/ + circuit Foo { function echo(x: u32) -> u32 { return x; } } -function main() { +function main() -> bool { const a = Foo::echo(1u32); - console.assert(a == 1u32); -} \ No newline at end of file + return a == 1u32; +} diff --git a/tests/compiler/circuits/member_static_function_invalid.leo b/tests/compiler/circuits/member_static_function_invalid.leo index b886cff8fa..c7f3efea3a 100644 --- a/tests/compiler/circuits/member_static_function_invalid.leo +++ b/tests/compiler/circuits/member_static_function_invalid.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { function echo(x: u32) -> u32 { return x; @@ -6,4 +11,4 @@ circuit Foo { function main() { const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::` -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/member_static_function_nested.leo b/tests/compiler/circuits/member_static_function_nested.leo index ef536e3f6e..52e3d0900f 100644 --- a/tests/compiler/circuits/member_static_function_nested.leo +++ b/tests/compiler/circuits/member_static_function_nested.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + circuit Foo { function qux() {} @@ -12,4 +17,4 @@ circuit Foo { function main() { Foo::baz(); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/member_static_function_undefined.leo b/tests/compiler/circuits/member_static_function_undefined.leo index 121c80e34c..11e33b4166 100644 --- a/tests/compiler/circuits/member_static_function_undefined.leo +++ b/tests/compiler/circuits/member_static_function_undefined.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { function echo(x: u32) -> u32 { return x; @@ -6,4 +11,4 @@ circuit Foo { function main() { const err = Foo::echoed(1u32); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/member_variable.leo b/tests/compiler/circuits/member_variable.leo index a3f3fbe7e6..f14178bf6b 100644 --- a/tests/compiler/circuits/member_variable.leo +++ b/tests/compiler/circuits/member_variable.leo @@ -1,9 +1,18 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - member.in: | + [registers] + r0: bool = false; +*/ + circuit Foo { x: u32, } -function main() { +function main() -> bool { const a = Foo { x: 1u32 }; - console.assert(a.x == 1u32); -} \ No newline at end of file + return a.x == 1u32; +} diff --git a/tests/compiler/circuits/member_variable_and_function.leo b/tests/compiler/circuits/member_variable_and_function.leo index f90cdca072..f6f179a61f 100644 --- a/tests/compiler/circuits/member_variable_and_function.leo +++ b/tests/compiler/circuits/member_variable_and_function.leo @@ -1,3 +1,12 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - member.in: | + [registers] + r0: bool = false; +*/ + circuit Foo { foo: u32, @@ -6,10 +15,9 @@ circuit Foo { } } -function main() { +function main() -> bool { const a = Foo { foo: 1 }; - const b = a.foo + Foo::bar(); - console.assert(b == 2u32); + return b == 2u32; } diff --git a/tests/compiler/circuits/member_variable_fail.leo b/tests/compiler/circuits/member_variable_fail.leo index fdf42068d5..d2c899baa0 100644 --- a/tests/compiler/circuits/member_variable_fail.leo +++ b/tests/compiler/circuits/member_variable_fail.leo @@ -1,9 +1,13 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { x: u32 } function main() { const a = Foo { x: 1u32 }; - const err = a.y; -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mod.rs b/tests/compiler/circuits/mod.rs deleted file mode 100644 index 093e2263e1..0000000000 --- a/tests/compiler/circuits/mod.rs +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_asg_error, parse_program}; - -// Expressions - -#[test] -fn test_inline() { - let program_string = include_str!("inline.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_inline_fail() { - let program_string = include_str!("inline_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_inline_undefined() { - let program_string = include_str!("inline_undefined.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Members - -#[test] -fn test_member_variable() { - let program_string = include_str!("member_variable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_variable_fail() { - let program_string = include_str!("member_variable_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_member_variable_and_function() { - let program_string = include_str!("member_variable_and_function.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_function() { - let program_string = include_str!("member_function.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_function_fail() { - let program_string = include_str!("member_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_member_function_invalid() { - let program_string = include_str!("member_function_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_member_function_nested() { - let program_string = include_str!("member_function_nested.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_static_function() { - let program_string = include_str!("member_static_function.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_static_function_nested() { - let program_string = include_str!("member_static_function_nested.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_static_function_invalid() { - let program_string = include_str!("member_static_function_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error) -} - -#[test] -fn test_member_static_function_undefined() { - let program_string = include_str!("member_static_function_undefined.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error) -} - -// Constant -#[test] -fn test_const_self_variable() { - let program_string = include_str!("const_self_variable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_const_self_variable_fail() { - let program_string = include_str!("const_self_variable_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Mutability - -#[test] -fn test_mutate_function_fail() { - let program_string = include_str!("mut_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_self_variable() { - let program_string = include_str!("mut_self_variable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutate_self_variable_branch() { - let program_string = include_str!("mut_self_variable_branch.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutate_self_variable_conditional() { - let program_string = include_str!("mut_self_variable_conditional.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutate_self_variable_fail() { - let program_string = include_str!("mut_self_variable_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_self_function_fail() { - let program_string = include_str!("mut_self_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_self_static_function_fail() { - let program_string = include_str!("mut_self_static_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_static_function_fail() { - let program_string = include_str!("mut_static_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_variable() { - let program_string = include_str!("mut_variable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutate_variable_fail() { - let program_string = include_str!("mut_variable_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Self - -#[test] -fn test_self_fail() { - let program_string = include_str!("self_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_self_member_pass() { - let program_string = include_str!("self_member.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_self_member_invalid() { - let program_string = include_str!("self_member_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_self_member_undefined() { - let program_string = include_str!("self_member_undefined.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Inline circuit member - -#[test] -fn test_inline_member_pass() { - let program_string = include_str!("inline_member_pass.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_inline_member_fail() { - let program_string = include_str!("inline_member_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// All - -#[test] -fn test_pedersen_mock() { - let program_string = include_str!("pedersen_mock.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_define_circuit_inside_circuit_function() { - let program_string = include_str!("define_circuit_inside_circuit_function.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_duplicate_name_context() { - let program_string = include_str!("duplicate_name_context.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutable_call_immutable_context() { - let program_string = include_str!("mutable_call_immutable_context.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/tests/compiler/circuits/mut_function_fail.leo b/tests/compiler/circuits/mut_function_fail.leo index 44583810dd..9f4971fd60 100644 --- a/tests/compiler/circuits/mut_function_fail.leo +++ b/tests/compiler/circuits/mut_function_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { a: u8, @@ -8,4 +13,4 @@ function main() { let f = Foo { a: 0u8 }; f.bar = 1u8; -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mut_self_function_fail.leo b/tests/compiler/circuits/mut_self_function_fail.leo index b81b18e743..a5b4427474 100644 --- a/tests/compiler/circuits/mut_self_function_fail.leo +++ b/tests/compiler/circuits/mut_self_function_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { a: u8, @@ -12,4 +17,4 @@ function main() { let f = Foo { a: 0u8 }; f.set_a(1u8); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mut_self_static_function_fail.leo b/tests/compiler/circuits/mut_self_static_function_fail.leo index b81b18e743..a5b4427474 100644 --- a/tests/compiler/circuits/mut_self_static_function_fail.leo +++ b/tests/compiler/circuits/mut_self_static_function_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { a: u8, @@ -12,4 +17,4 @@ function main() { let f = Foo { a: 0u8 }; f.set_a(1u8); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mut_self_variable.leo b/tests/compiler/circuits/mut_self_variable.leo index dc2047d872..cb25448ffa 100644 --- a/tests/compiler/circuits/mut_self_variable.leo +++ b/tests/compiler/circuits/mut_self_variable.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + circuit Foo { a: u8, @@ -19,4 +24,4 @@ function main() { f.set_a(2u8); console.assert(f.a == 2u8); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mut_self_variable_branch.leo b/tests/compiler/circuits/mut_self_variable_branch.leo index 1c2f126f08..5ed2e5e1d4 100644 --- a/tests/compiler/circuits/mut_self_variable_branch.leo +++ b/tests/compiler/circuits/mut_self_variable_branch.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + circuit Foo { a: u8, @@ -29,4 +34,4 @@ function main() { f.set_a(true, 2u8); console.assert(f.a == 2u8); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mut_self_variable_conditional.leo b/tests/compiler/circuits/mut_self_variable_conditional.leo index 61a5e354dc..f9b8550b79 100644 --- a/tests/compiler/circuits/mut_self_variable_conditional.leo +++ b/tests/compiler/circuits/mut_self_variable_conditional.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { let f = Foo { a: 0u32 }; @@ -12,4 +17,4 @@ circuit Foo { self.a = 5u32; // Mutating a variable inside a conditional statement should work. } } -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mut_self_variable_fail.leo b/tests/compiler/circuits/mut_self_variable_fail.leo index 4db62a4d3e..c974433045 100644 --- a/tests/compiler/circuits/mut_self_variable_fail.leo +++ b/tests/compiler/circuits/mut_self_variable_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { a: u8, @@ -10,4 +15,4 @@ function main() { let f = Foo { a: 0u8 }; f.set_a(1u8); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mut_static_function_fail.leo b/tests/compiler/circuits/mut_static_function_fail.leo index e7db3a1df9..8e70eb1ca0 100644 --- a/tests/compiler/circuits/mut_static_function_fail.leo +++ b/tests/compiler/circuits/mut_static_function_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { function bar() {} } @@ -6,4 +11,4 @@ function main() { let f = Foo { a: 0u8 }; f.bar = 1u8; -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mut_variable.leo b/tests/compiler/circuits/mut_variable.leo index ddc7412038..4ef68f03bd 100644 --- a/tests/compiler/circuits/mut_variable.leo +++ b/tests/compiler/circuits/mut_variable.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + circuit Foo { a: u8, } @@ -14,4 +19,4 @@ function main() { f.a = 2u8; console.assert(f.a == 2u8); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mut_variable_fail.leo b/tests/compiler/circuits/mut_variable_fail.leo index e116b33d5c..d4c7ac6d26 100644 --- a/tests/compiler/circuits/mut_variable_fail.leo +++ b/tests/compiler/circuits/mut_variable_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { a: u8, } @@ -6,4 +11,4 @@ function main() { const f = Foo { a: 0u8 }; f.a = 1u8; -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/mutable_call_immutable_context.leo b/tests/compiler/circuits/mutable_call_immutable_context.leo index d235d11cb7..ec5c3fbc44 100644 --- a/tests/compiler/circuits/mutable_call_immutable_context.leo +++ b/tests/compiler/circuits/mutable_call_immutable_context.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + circuit TestMe { x: u8, @@ -22,4 +27,4 @@ function main () { console.assert(u == 1u8); const v = TestMe::new().test_me(); console.assert(v == 2u8); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/pedersen_mock.leo b/tests/compiler/circuits/pedersen_mock.leo index 0fc6752f2f..ee001de4f3 100644 --- a/tests/compiler/circuits/pedersen_mock.leo +++ b/tests/compiler/circuits/pedersen_mock.leo @@ -1,3 +1,15 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - pedersen.in: | + [main] + hash_input: [bool; 512] = [true; 512]; + + [registers] + r0: bool = false; +*/ + circuit PedersenHash { parameters: [u32; 512] @@ -16,12 +28,11 @@ circuit PedersenHash { } // The 'pedersen_hash' main function. -function main() { +function main(hash_input: [bool; 512]) -> bool { const parameters = [0u32; 512]; const pedersen = PedersenHash::new(parameters); - const hash_input: [bool; 512] = [true; 512]; - const res = pedersen.hash(hash_input); console.assert(res == 0u32); + return res == 0u32; } diff --git a/tests/compiler/circuits/self_circuit.leo b/tests/compiler/circuits/self_circuit.leo index 6faa42278b..097712f94e 100644 --- a/tests/compiler/circuits/self_circuit.leo +++ b/tests/compiler/circuits/self_circuit.leo @@ -1,4 +1,10 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { + // static is deprecated static function new() -> Self { return Self { }; } diff --git a/tests/compiler/circuits/self_fail.leo b/tests/compiler/circuits/self_fail.leo index e4e878dc89..8cc50d3aae 100644 --- a/tests/compiler/circuits/self_fail.leo +++ b/tests/compiler/circuits/self_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { Self::main(); } \ No newline at end of file diff --git a/tests/compiler/circuits/self_member.leo b/tests/compiler/circuits/self_member.leo index 237baac9de..86b24053ee 100644 --- a/tests/compiler/circuits/self_member.leo +++ b/tests/compiler/circuits/self_member.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + circuit Foo { f: u32, diff --git a/tests/compiler/circuits/self_member_invalid.leo b/tests/compiler/circuits/self_member_invalid.leo index 7283b3260a..0b14bcf7e6 100644 --- a/tests/compiler/circuits/self_member_invalid.leo +++ b/tests/compiler/circuits/self_member_invalid.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { f: u32, diff --git a/tests/compiler/circuits/self_member_undefined.leo b/tests/compiler/circuits/self_member_undefined.leo index 8b52d305a3..5674da414b 100644 --- a/tests/compiler/circuits/self_member_undefined.leo +++ b/tests/compiler/circuits/self_member_undefined.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + circuit Foo { function bar() -> u32 { return self.f; diff --git a/tests/expectations/compiler/compiler/mutability/circuit_mut.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out similarity index 100% rename from tests/expectations/compiler/compiler/mutability/circuit_mut.leo.out rename to tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out diff --git a/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out new file mode 100644 index 0000000000..19a426b72e --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/define_circuit_inside_circuit_function.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 95 + num_constraints: 95 + at: 5267486d9db0d5d95b248da00196e1a6e5c6e165f8580eae4fbf20d8e1560fd7 + bt: e0a9aa0cab882fb690b28137d24f271ccaa334521934a3badc07592a31b7be7f + ct: 5983ee7f60c1fc1ad4aaece7815002040cd4b5a7e019b3967f948d30f5d7ec96 + output: + - input_file: func_circ.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/circuits/inline.leo.out b/tests/expectations/compiler/compiler/circuits/inline.leo.out new file mode 100644 index 0000000000..3f39906b02 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/inline.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 32 + num_constraints: 32 + at: 4f36fe54f989d60bb9c279120800f4f44596c2efb7ba703669d4c4d591569780 + bt: d378030968a64801f66d95699329086ca17e676d8bffcf73f6b431cbda7c7005 + ct: dbd098af6556ed79650d149b1691be336a46f8bad6f327e942508dd11342575e + output: + - input_file: inline.in + output: + registers: + r0: + type: u32 + value: "100" diff --git a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out new file mode 100644 index 0000000000..6ac648a3e6 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out new file mode 100644 index 0000000000..ca83db6796 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out new file mode 100644 index 0000000000..76eda84c48 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 23 + num_constraints: 23 + at: 1b2521e1b6fa3c84507b93ff0c68d463de22e8fcf6e750ff11dbf856494e9851 + bt: e07261c391194324de6c9bb8706ff09c30ce64dfc55ce30bd8aa4b19f7b1443a + ct: f053ce5b6adb30f5c4f21f4c4c4001a77517d9c0ca3d113cece2585b22e56635 + output: + - input_file: inline.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out new file mode 100644 index 0000000000..8b7a0be7d5 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n = failed to resolve circuit: 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_function.leo.out new file mode 100644 index 0000000000..f54cdfaa9c --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_function.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: member.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out new file mode 100644 index 0000000000..cfd7656f46 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out new file mode 100644 index 0000000000..16fa915b96 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n = cannot call static function 'echo' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out new file mode 100644 index 0000000000..966431934e --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_function_nested.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 161 + num_constraints: 163 + at: e35800570ea5a58f3587ffba2b1be2a1df1c5790a6cbe215083e3d5d5a13b2bf + bt: 799dc824f6ba6a51959a395a3b5ebf05629aa241dbca9550190f32380b91ae1c + ct: 2aa6128cdf932752c8864c26a6a3d4991f3e6a75b22c1261a3389efa67375b01 + output: + - input_file: inline.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out new file mode 100644 index 0000000000..be68ef6293 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: static.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out new file mode 100644 index 0000000000..a518cb4078 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n = failed to resolve variable reference 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out new file mode 100644 index 0000000000..6b68a9ab05 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out new file mode 100644 index 0000000000..f54cdfaa9c --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: member.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out new file mode 100644 index 0000000000..f54cdfaa9c --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: member.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out new file mode 100644 index 0000000000..952e3fdacb --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n = illegal reference to non-existant member 'y' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out new file mode 100644 index 0000000000..1d236af849 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out new file mode 100644 index 0000000000..165ac66fac --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out new file mode 100644 index 0000000000..165ac66fac --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out new file mode 100644 index 0000000000..48f3614d62 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out new file mode 100644 index 0000000000..ebae3568f6 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n = extra circuit member 'a' for initialization of circuit 'Foo' is not allowed" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out new file mode 100644 index 0000000000..ae22229256 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'f'" diff --git a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out new file mode 100644 index 0000000000..93b1d0d42a --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 33854 + num_constraints: 50750 + at: ef530d618c6915bbff2137e7f057b1135dacbdd02e8d4be420320999724633ad + bt: 4ec9fd3915bf2762cb32a7f7805918c1b976ca6c59852f505089fd23c0f321b7 + ct: e13fb652749582faae780837f6de4900f3b6c7202289d2219a543bfdd4f6836e + output: + - input_file: pedersen.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out new file mode 100644 index 0000000000..8c69b77e46 --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n = expected 'ident', got 'static'" diff --git a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out new file mode 100644 index 0000000000..8ef345f61a --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n = failed to resolve circuit: 'Self'" diff --git a/tests/expectations/compiler/compiler/circuits/self_member.leo.out b/tests/expectations/compiler/compiler/circuits/self_member.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/self_member.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out new file mode 100644 index 0000000000..6ad055c2fe --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out new file mode 100644 index 0000000000..f00cd79c2d --- /dev/null +++ b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out index 2816652491..1b213ebb13 100644 --- a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out @@ -10,6 +10,6 @@ outputs: bt: 0b017985fe9a0650c67351f1cc247871e9cc9e8c907f2cb47791c5ae1a5b324a ct: 3fb41ccb74d402bc413944e9eb543a7333552052b7781eb257d2b861659d5a09 output: - - input_file: i16.in + - input_file: i8.in output: registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out index e2b3ec4e41..dabe909afa 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out @@ -10,6 +10,6 @@ outputs: bt: 10b52342f8c44eb9b3335b4df9ca4136de3ad35d5b580b2ab32ae5e10bcdf3b4 ct: 2aae7d6631260dcaafbfe9709ade84e75f5172a9baad48e108e7264d5fc17cf6 output: - - input_file: i16.in + - input_file: i8.in output: registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out index 3a58aed4be..210b46a3a5 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out @@ -10,6 +10,6 @@ outputs: bt: 43214e3563d9bc921ffc9079215a945f8450cf3c02506bd6e23144b2e18944d3 ct: a2352ad3a95bc4b0d0ca56ac5b1bcec0cc3b62077d2c3d883f90f8bf014a8e28 output: - - input_file: i16.in + - input_file: i8.in output: registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/pow.leo.out b/tests/expectations/compiler/compiler/integers/i8/pow.leo.out index 905b5aa8b7..3052caf6f5 100644 --- a/tests/expectations/compiler/compiler/integers/i8/pow.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/pow.leo.out @@ -10,6 +10,6 @@ outputs: bt: b8979c4494b630792fad6a0b29a53293c7649f3d5fcd45b8c1d2396f970ca0dd ct: 1acbdb8598982e7bf38d0a531f67d6937a6bd98418c6d382e4201c4a8285df55 output: - - input_file: i16.in + - input_file: i8.in output: registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out index 1c57c96986..2009bad971 100644 --- a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out @@ -10,6 +10,6 @@ outputs: bt: 35a61219fd7bf101cf1a1a66ad2f71df661d6dc9dda2ed9df12c7650164559aa ct: 50f1a63551e44fb1f2ef29982d5b1580340dcda67d8d8caaa9c837353a950d8f output: - - input_file: i16.in + - input_file: i8.in output: registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out index e10d3f99c7..e4b884a40d 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out @@ -10,6 +10,9 @@ outputs: bt: 90a2489533355ee3e27d5cf485612441ec10e21923eb78e6be21633ce11fa8f1 ct: 4c2d67fc6e1c4ad44f323c1b958ed94313153573aa72a3c0f0d25b17b54e63bc output: - - input_file: i16.in + - input_file: i8.in + output: + registers: {} + - input_file: i8_rev.in output: registers: {} From 2ac3468d18a70b30407d8b7c3943fc32f6df8c6a Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 5 May 2021 15:58:26 +0300 Subject: [PATCH 05/26] fixes constant tuples in inputs --- compiler/src/function/input/main_function_input.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/src/function/input/main_function_input.rs b/compiler/src/function/input/main_function_input.rs index 5eab3a9a7c..6183851ee0 100644 --- a/compiler/src/function/input/main_function_input.rs +++ b/compiler/src/function/input/main_function_input.rs @@ -109,7 +109,10 @@ impl<'a, F: PrimeField, G: GroupType> ConstrainedProgram<'a, F, G> { Ok(ConstrainedValue::Tuple( values .iter() - .map(|x| self.constant_main_function_input(_cs, type_, name, Some(x.clone()), span)) + .enumerate() + .map(|(i, x)| { + self.constant_main_function_input(_cs, types.get(i).unwrap(), name, Some(x.clone()), span) + }) .collect::, _>>()?, )) } From 72648c993c7e328648389cf1def1304f11f7bbd9 Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 5 May 2021 17:35:34 +0300 Subject: [PATCH 06/26] program inputs --- tests/compiler/input_files/mod.rs | 21 - .../input_files/program_input/input/main.in | 5 +- .../program_input/input/main_array_fail.in | 2 +- .../program_input/input/main_fail_name.in | 2 +- .../program_input/input/main_fail_type.in | 2 +- .../program_input/input/main_field.in | 2 +- .../program_input/input/main_group.in | 2 +- .../input/main_multi_dimension_array.in | 5 +- .../program_input/input/main_multiple.in | 3 + .../program_input/input/main_tuple.in | 5 + .../program_input/input/main_tuple_fail.in | 2 +- .../input_files/program_input/main.leo | 12 +- .../input_files/program_input/main_array.leo | 10 +- .../program_input/main_array_fail.leo | 12 +- .../input_files/program_input/main_field.leo | 8 +- .../input_files/program_input/main_group.leo | 8 +- .../main_multi_dimension_array.leo | 19 +- .../program_input/main_multiple.leo | 13 +- .../input_files/program_input/main_tuple.leo | 9 + .../program_input/main_tuple_fail.leo | 8 +- .../compiler/input_files/program_input/mod.rs | 125 -- .../access.leo | 11 - .../program_input_and_program_state/basic.leo | 10 + .../input/basic.in | 2 +- .../input/basic.state | 2 +- .../input/token_withdraw.in | 3 +- .../input/token_withdraw.state | 2 +- .../program_input_and_program_state/mod.rs | 44 - .../token_withdraw.leo | 14 + .../program_input_constants/input/main.in | 5 +- .../input/main_array_fail.in | 2 +- .../input/main_double_declaration_fail.in | 5 - .../input/main_fail_name.in | 2 +- .../input/main_fail_type.in | 2 +- .../input/main_field.in | 2 +- .../input/main_group.in | 2 +- .../input/main_multi_dimension_array.in | 5 +- .../input/main_multiple.in | 3 + .../input/main_not_const_input_fail.in | 2 - .../input/main_tuple.in | 5 + .../input/main_tuple_fail.in | 2 +- .../input/main_type_mismatch.in | 2 - .../program_input_constants/main.leo | 12 +- .../program_input_constants/main_array.leo | 10 +- .../main_array_fail.leo | 12 +- .../program_input_constants/main_field.leo | 8 +- .../program_input_constants/main_group.leo | 8 +- .../main_multi_dimension_array.leo | 19 +- .../program_input_constants/main_multiple.leo | 13 +- .../program_input_constants/main_tuple.leo | 9 + .../main_tuple_fail.leo | 8 +- .../program_input_constants/mod.rs | 145 -- .../input_files/program_input/main.leo.out | 18 + .../program_input/main_array.leo.out | 15 + .../program_input/main_array_fail.leo.out | 5 + .../program_input/main_field.leo.out | 15 + .../program_input/main_group.leo.out | 15 + .../main_multi_dimension_array.leo.out | 18 + .../program_input/main_multiple.leo.out | 18 + .../program_input/main_tuple.leo.out | 18 + .../program_input/main_tuple_fail.leo.out | 5 + .../basic.leo.out | 18 + .../token_withdraw.leo.out | 18 + .../program_input_constants/main.leo.out | 18 + .../main_array.leo.out | 15 + .../main_array_fail.leo.out | 5 + .../main_field.leo.out | 15 + .../main_group.leo.out | 15 + .../main_multi_dimension_array.leo.out | 18 + .../main_multiple.leo.out | 18 + .../main_tuple.leo.out | 18 + .../main_tuple_fail.leo.out | 5 + .../parser/parser/circuits/big_self.leo.out | 53 - .../parser/parser/circuits/empty.leo.out | 13 - .../circuits/field_and_functions.leo.out | 97 -- .../parser/parser/circuits/fields.leo.out | 19 - .../parser/parser/circuits/functions.leo.out | 91 - .../parser/parser/circuits/mut_self.leo.out | 53 - .../parser/parser/circuits/self.leo.out | 53 - .../expression/access/array_access.leo.out | 267 --- .../access/array_range_access.leo.out | 401 ----- .../parser/expression/access/call.leo.out | 162 -- .../parser/expression/access/circuit.leo.out | 120 -- .../expression/access/circuit_static.leo.out | 120 -- .../parser/expression/access/tuple.leo.out | 109 -- .../parser/expression/array_init.leo.out | 150 -- .../parser/expression/array_init_fail.leo.out | 6 - .../parser/expression/array_inline.leo.out | 317 ---- .../expression/array_inline_fail.leo.out | 9 - .../parser/expression/binary/add.leo.out | 338 ---- .../parser/expression/binary/and.leo.out | 111 -- .../parser/expression/binary/div.leo.out | 180 -- .../parser/expression/binary/eq.leo.out | 338 ---- .../parser/expression/binary/exp.leo.out | 244 --- .../parser/expression/binary/gt.leo.out | 338 ---- .../parser/expression/binary/gte.leo.out | 338 ---- .../parser/expression/binary/lt.leo.out | 338 ---- .../parser/expression/binary/lte.leo.out | 338 ---- .../parser/expression/binary/mul.leo.out | 289 ---- .../parser/expression/binary/ne.leo.out | 338 ---- .../parser/expression/binary/or.leo.out | 338 ---- .../parser/expression/binary/sub.leo.out | 180 -- .../parser/parser/expression/cast.leo.out | 186 --- .../parser/expression/circuit_init.leo.out | 113 -- .../expression/circuit_init_fail.leo.out | 16 - .../parser/parser/expression/ident.leo.out | 23 - .../parser/expression/literal/address.leo.out | 13 - .../expression/literal/address_fail.leo.out | 13 - .../expression/literal/address_parse.leo.out | 40 - .../parser/expression/literal/bool.leo.out | 12 - .../expression/literal/bool_parse.leo.out | 22 - .../parser/expression/literal/comment.leo.out | 22 - .../literal/formatted_string.leo.out | 24 - .../parser/expression/literal/group.leo.out | 648 -------- .../expression/literal/group_fail.leo.out | 13 - .../parser/expression/literal/int.leo.out | 111 -- .../literal/int_parse/field.leo.out | 949 ----------- .../expression/literal/int_parse/i128.leo.out | 1053 ------------ .../expression/literal/int_parse/i16.leo.out | 1053 ------------ .../expression/literal/int_parse/i32.leo.out | 1053 ------------ .../expression/literal/int_parse/i64.leo.out | 1053 ------------ .../expression/literal/int_parse/i8.leo.out | 1053 ------------ .../literal/int_parse/implicit.leo.out | 949 ----------- .../literal/int_parse/mono_group.leo.out | 1053 ------------ .../expression/literal/int_parse/u128.leo.out | 1053 ------------ .../expression/literal/int_parse/u16.leo.out | 1053 ------------ .../expression/literal/int_parse/u32.leo.out | 1053 ------------ .../expression/literal/int_parse/u64.leo.out | 1053 ------------ .../expression/literal/int_parse/u8.leo.out | 1053 ------------ .../expression/literal/postfix_types.leo.out | 62 - .../parser/parser/expression/ternary.leo.out | 72 - .../parser/parser/expression/tuple.leo.out | 94 -- .../parser/expression/unary/negate.leo.out | 120 -- .../parser/expression/unary/not.leo.out | 120 -- .../parser/parser/functions/annotated.leo.out | 58 - .../parser/functions/annotated_param.leo.out | 59 - .../parser/functions/annotated_twice.leo.out | 67 - .../parser/functions/const_input_fail.leo.out | 5 - .../parser/functions/const_param.leo.out | 140 -- .../parser/functions/const_self_bad.leo.out | 50 - .../parser/parser/functions/empty.leo.out | 49 - .../parser/parser/functions/empty2.leo.out | 31 - .../parser/functions/param_array.leo.out | 64 - .../parser/functions/param_circuit.leo.out | 62 - .../parser/functions/param_tuple.leo.out | 64 - .../parser/parser/functions/params.leo.out | 75 - .../parser/functions/params_return.leo.out | 76 - .../parser/parser/functions/return.leo.out | 50 - .../parser/functions/return_tuple.leo.out | 52 - .../parser/parser/import/alias.leo.out | 38 - .../parser/parser/import/basic.leo.out | 38 - .../parser/parser/import/many_import.leo.out | 136 -- .../parser/import/many_import_star.leo.out | 165 -- .../parser/parser/import/names.leo.out | 94 -- .../parser/import/names_underscore.leo.out | 38 - .../parser/parser/import/star.leo.out | 35 - .../parser/parser/statement/assign.leo.out | 411 ----- .../parser/parser/statement/block.leo.out | 141 -- .../parser/statement/conditional.leo.out | 230 --- .../parser/parser/statement/console.leo.out | 207 --- .../parser/statement/definition.leo.out | 1473 ----------------- .../parser/statement/definition_fail.leo.out | 27 - .../parser/statement/expression.leo.out | 94 -- .../parser/parser/statement/iteration.leo.out | 203 --- .../parser/parser/statement/return.leo.out | 110 -- .../parser/statement/return_fail.leo.out | 7 - 166 files changed, 517 insertions(+), 25721 deletions(-) delete mode 100644 tests/compiler/input_files/mod.rs create mode 100644 tests/compiler/input_files/program_input/input/main_tuple.in create mode 100644 tests/compiler/input_files/program_input/main_tuple.leo delete mode 100644 tests/compiler/input_files/program_input/mod.rs delete mode 100644 tests/compiler/input_files/program_input_and_program_state/access.leo create mode 100644 tests/compiler/input_files/program_input_and_program_state/basic.leo delete mode 100644 tests/compiler/input_files/program_input_and_program_state/mod.rs create mode 100644 tests/compiler/input_files/program_input_and_program_state/token_withdraw.leo delete mode 100644 tests/compiler/input_files/program_input_constants/input/main_double_declaration_fail.in delete mode 100644 tests/compiler/input_files/program_input_constants/input/main_not_const_input_fail.in create mode 100644 tests/compiler/input_files/program_input_constants/input/main_tuple.in delete mode 100644 tests/compiler/input_files/program_input_constants/input/main_type_mismatch.in create mode 100644 tests/compiler/input_files/program_input_constants/main_tuple.leo delete mode 100644 tests/compiler/input_files/program_input_constants/mod.rs create mode 100644 tests/expectations/compiler/compiler/input_files/program_input/main.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/big_self.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/empty.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/field_and_functions.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/fields.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/functions.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/mut_self.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/self.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/array_access.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/array_range_access.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/call.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/circuit.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/circuit_static.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/tuple.leo.out delete mode 100644 tests/expectations/parser/parser/expression/array_init.leo.out delete mode 100644 tests/expectations/parser/parser/expression/array_init_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/array_inline.leo.out delete mode 100644 tests/expectations/parser/parser/expression/array_inline_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/add.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/and.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/div.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/eq.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/exp.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/gt.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/gte.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/lt.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/lte.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/mul.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/ne.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/or.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/sub.leo.out delete mode 100644 tests/expectations/parser/parser/expression/cast.leo.out delete mode 100644 tests/expectations/parser/parser/expression/circuit_init.leo.out delete mode 100644 tests/expectations/parser/parser/expression/circuit_init_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/ident.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/address.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/address_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/address_parse.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/bool.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/bool_parse.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/comment.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/formatted_string.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/group.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/group_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/postfix_types.leo.out delete mode 100644 tests/expectations/parser/parser/expression/ternary.leo.out delete mode 100644 tests/expectations/parser/parser/expression/tuple.leo.out delete mode 100644 tests/expectations/parser/parser/expression/unary/negate.leo.out delete mode 100644 tests/expectations/parser/parser/expression/unary/not.leo.out delete mode 100644 tests/expectations/parser/parser/functions/annotated.leo.out delete mode 100644 tests/expectations/parser/parser/functions/annotated_param.leo.out delete mode 100644 tests/expectations/parser/parser/functions/annotated_twice.leo.out delete mode 100644 tests/expectations/parser/parser/functions/const_input_fail.leo.out delete mode 100644 tests/expectations/parser/parser/functions/const_param.leo.out delete mode 100644 tests/expectations/parser/parser/functions/const_self_bad.leo.out delete mode 100644 tests/expectations/parser/parser/functions/empty.leo.out delete mode 100644 tests/expectations/parser/parser/functions/empty2.leo.out delete mode 100644 tests/expectations/parser/parser/functions/param_array.leo.out delete mode 100644 tests/expectations/parser/parser/functions/param_circuit.leo.out delete mode 100644 tests/expectations/parser/parser/functions/param_tuple.leo.out delete mode 100644 tests/expectations/parser/parser/functions/params.leo.out delete mode 100644 tests/expectations/parser/parser/functions/params_return.leo.out delete mode 100644 tests/expectations/parser/parser/functions/return.leo.out delete mode 100644 tests/expectations/parser/parser/functions/return_tuple.leo.out delete mode 100644 tests/expectations/parser/parser/import/alias.leo.out delete mode 100644 tests/expectations/parser/parser/import/basic.leo.out delete mode 100644 tests/expectations/parser/parser/import/many_import.leo.out delete mode 100644 tests/expectations/parser/parser/import/many_import_star.leo.out delete mode 100644 tests/expectations/parser/parser/import/names.leo.out delete mode 100644 tests/expectations/parser/parser/import/names_underscore.leo.out delete mode 100644 tests/expectations/parser/parser/import/star.leo.out delete mode 100644 tests/expectations/parser/parser/statement/assign.leo.out delete mode 100644 tests/expectations/parser/parser/statement/block.leo.out delete mode 100644 tests/expectations/parser/parser/statement/conditional.leo.out delete mode 100644 tests/expectations/parser/parser/statement/console.leo.out delete mode 100644 tests/expectations/parser/parser/statement/definition.leo.out delete mode 100644 tests/expectations/parser/parser/statement/definition_fail.leo.out delete mode 100644 tests/expectations/parser/parser/statement/expression.leo.out delete mode 100644 tests/expectations/parser/parser/statement/iteration.leo.out delete mode 100644 tests/expectations/parser/parser/statement/return.leo.out delete mode 100644 tests/expectations/parser/parser/statement/return_fail.leo.out diff --git a/tests/compiler/input_files/mod.rs b/tests/compiler/input_files/mod.rs deleted file mode 100644 index af220752b8..0000000000 --- a/tests/compiler/input_files/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -mod program_input; -mod program_input_and_program_state; -mod program_input_constants; -mod program_registers; -mod program_state; diff --git a/tests/compiler/input_files/program_input/input/main.in b/tests/compiler/input_files/program_input/input/main.in index 16ba5231af..0daac95b9a 100644 --- a/tests/compiler/input_files/program_input/input/main.in +++ b/tests/compiler/input_files/program_input/input/main.in @@ -1,2 +1,5 @@ [main] -a: bool = true; \ No newline at end of file +a: bool = true; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input/input/main_array_fail.in b/tests/compiler/input_files/program_input/input/main_array_fail.in index efdc161ee4..34db280b2e 100644 --- a/tests/compiler/input_files/program_input/input/main_array_fail.in +++ b/tests/compiler/input_files/program_input/input/main_array_fail.in @@ -1,2 +1,2 @@ [main] -x: [i16; 1] = [0i16; 1]; \ No newline at end of file +x: [i16; 1] = [0i16; 1]; diff --git a/tests/compiler/input_files/program_input/input/main_fail_name.in b/tests/compiler/input_files/program_input/input/main_fail_name.in index 411529499c..a07ee79fc9 100644 --- a/tests/compiler/input_files/program_input/input/main_fail_name.in +++ b/tests/compiler/input_files/program_input/input/main_fail_name.in @@ -1,2 +1,2 @@ [main] -bad_name: bool = true; \ No newline at end of file +bad_name: bool = true; diff --git a/tests/compiler/input_files/program_input/input/main_fail_type.in b/tests/compiler/input_files/program_input/input/main_fail_type.in index a5cf30c8cc..9bee0dc857 100644 --- a/tests/compiler/input_files/program_input/input/main_fail_type.in +++ b/tests/compiler/input_files/program_input/input/main_fail_type.in @@ -1,2 +1,2 @@ [main] -a: u8 = 1; \ No newline at end of file +a: u8 = 1; diff --git a/tests/compiler/input_files/program_input/input/main_field.in b/tests/compiler/input_files/program_input/input/main_field.in index fe9eebbd56..e626fd1b96 100644 --- a/tests/compiler/input_files/program_input/input/main_field.in +++ b/tests/compiler/input_files/program_input/input/main_field.in @@ -1,3 +1,3 @@ [main] a: field = 1; -b: field = -1; \ No newline at end of file +b: field = -1; diff --git a/tests/compiler/input_files/program_input/input/main_group.in b/tests/compiler/input_files/program_input/input/main_group.in index 2a7aecd0ad..cb785ee904 100644 --- a/tests/compiler/input_files/program_input/input/main_group.in +++ b/tests/compiler/input_files/program_input/input/main_group.in @@ -1,4 +1,4 @@ [main] a: group = 1group; b: group = -1group; -c: group = (0, -1)group; \ No newline at end of file +c: group = (0, -1)group; diff --git a/tests/compiler/input_files/program_input/input/main_multi_dimension_array.in b/tests/compiler/input_files/program_input/input/main_multi_dimension_array.in index e62ec2f232..b8755fce73 100644 --- a/tests/compiler/input_files/program_input/input/main_multi_dimension_array.in +++ b/tests/compiler/input_files/program_input/input/main_multi_dimension_array.in @@ -1,2 +1,5 @@ [main] -x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; \ No newline at end of file +x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input/input/main_multiple.in b/tests/compiler/input_files/program_input/input/main_multiple.in index 546c971bf8..7ac70d0aa7 100644 --- a/tests/compiler/input_files/program_input/input/main_multiple.in +++ b/tests/compiler/input_files/program_input/input/main_multiple.in @@ -1,3 +1,6 @@ [main] a: bool = true; b: bool = false; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input/input/main_tuple.in b/tests/compiler/input_files/program_input/input/main_tuple.in new file mode 100644 index 0000000000..f01d9f7c7b --- /dev/null +++ b/tests/compiler/input_files/program_input/input/main_tuple.in @@ -0,0 +1,5 @@ +[main] +x: (u8, bool, u8) = (10, true, 10); + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input/input/main_tuple_fail.in b/tests/compiler/input_files/program_input/input/main_tuple_fail.in index aada924c29..a9fac77664 100644 --- a/tests/compiler/input_files/program_input/input/main_tuple_fail.in +++ b/tests/compiler/input_files/program_input/input/main_tuple_fail.in @@ -1,2 +1,2 @@ [main] -x: (u8, bool) = (10, true); // wrong size here; main expects (u8, bool, u8) \ No newline at end of file +x: (u8, bool) = (10, true); // wrong size here; main expects (u8, bool, u8) diff --git a/tests/compiler/input_files/program_input/main.leo b/tests/compiler/input_files/program_input/main.leo index ba6be77256..3a87ed310e 100644 --- a/tests/compiler/input_files/program_input/main.leo +++ b/tests/compiler/input_files/program_input/main.leo @@ -1,3 +1,9 @@ -function main(a: bool) { - console.assert(a == true); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +input_file: input/main.in +*/ + +function main(a: bool) -> bool { + return a == true; +} diff --git a/tests/compiler/input_files/program_input/main_array.leo b/tests/compiler/input_files/program_input/main_array.leo index dd7f265457..bd38e94cc8 100644 --- a/tests/compiler/input_files/program_input/main_array.leo +++ b/tests/compiler/input_files/program_input/main_array.leo @@ -1,4 +1,10 @@ -function main (x: [i16; 1]) { +/* +namespace: Compile +expectation: Pass +input_file: input/main_array.in +*/ + +function main(x: [i16; 1]) { console.log("{}", x); console.assert(x[0] == 0); -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_input/main_array_fail.leo b/tests/compiler/input_files/program_input/main_array_fail.leo index d8c6f301d8..569f0d1ba9 100644 --- a/tests/compiler/input_files/program_input/main_array_fail.leo +++ b/tests/compiler/input_files/program_input/main_array_fail.leo @@ -1,3 +1,9 @@ -function main(x: [i16; 2]){ - console.log("x: {}", x); -} \ No newline at end of file +/* +namespace: Compile +expectation: Fail +input_file: input/main_array_fail.in +*/ + +function main(x: [i16; 2]) { + console.log("x: {}", x); +} diff --git a/tests/compiler/input_files/program_input/main_field.leo b/tests/compiler/input_files/program_input/main_field.leo index 19bf456ee7..fbc1a60132 100644 --- a/tests/compiler/input_files/program_input/main_field.leo +++ b/tests/compiler/input_files/program_input/main_field.leo @@ -1,5 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/main_field.in +*/ + function main(a: field, b: field) { // Change to assert when == is implemented for field. console.log("a: {}", a); console.log("b: {}", b); -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_input/main_group.leo b/tests/compiler/input_files/program_input/main_group.leo index b7795ac7e7..635eae1d81 100644 --- a/tests/compiler/input_files/program_input/main_group.leo +++ b/tests/compiler/input_files/program_input/main_group.leo @@ -1,6 +1,12 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/main_group.in +*/ + function main(a: group, b: group, c: group) { // Change to assert when == is implemented for group. console.log("a: {}", a); console.log("b: {}", b); console.log("c: {}", c); -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_input/main_multi_dimension_array.leo b/tests/compiler/input_files/program_input/main_multi_dimension_array.leo index 7c89cc1082..78d35029ee 100644 --- a/tests/compiler/input_files/program_input/main_multi_dimension_array.leo +++ b/tests/compiler/input_files/program_input/main_multi_dimension_array.leo @@ -1,9 +1,14 @@ -function main(x: [i16; (2, 2, 3)]){ - console.log("x: {}", x); +/* +namespace: Compile +expectation: Pass +input_file: input/main_multi_dimension_array.in +*/ - const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; - console.log("y: {}", y); +function main(x: [i16; (2, 2, 3)]) -> bool { + console.log("x: {}", x); - console.assert(x[0][0][0] == y[0][0][0]); - console.assert(x[1][1][2] == y[1][1][2]); -} \ No newline at end of file + const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; + console.log("y: {}", y); + + return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2]; +} diff --git a/tests/compiler/input_files/program_input/main_multiple.leo b/tests/compiler/input_files/program_input/main_multiple.leo index eb5ef8d1f6..2360bc99ec 100644 --- a/tests/compiler/input_files/program_input/main_multiple.leo +++ b/tests/compiler/input_files/program_input/main_multiple.leo @@ -1,4 +1,9 @@ -function main(a: bool, b: bool) { - console.assert(a == true); - console.assert(b == false); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +input_file: input/main_multiple.in +*/ + +function main(a: bool, b: bool) -> bool { + return a != b; +} diff --git a/tests/compiler/input_files/program_input/main_tuple.leo b/tests/compiler/input_files/program_input/main_tuple.leo new file mode 100644 index 0000000000..dece56e532 --- /dev/null +++ b/tests/compiler/input_files/program_input/main_tuple.leo @@ -0,0 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/main_tuple.in +*/ + +function main(x: (u8, bool, u8)) -> bool { + return x.0 == 10 && x.1 == true && x.2 == 10; +} diff --git a/tests/compiler/input_files/program_input/main_tuple_fail.leo b/tests/compiler/input_files/program_input/main_tuple_fail.leo index 7874773eff..06d55e925e 100644 --- a/tests/compiler/input_files/program_input/main_tuple_fail.leo +++ b/tests/compiler/input_files/program_input/main_tuple_fail.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/main_tuple_fail.in +*/ + function main(x: (u8, bool, u8)) { console.log("x: {}", x); -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_input/mod.rs b/tests/compiler/input_files/program_input/mod.rs deleted file mode 100644 index 9fa79b9790..0000000000 --- a/tests/compiler/input_files/program_input/mod.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_compiler_error, parse_program_with_input, EdwardsTestCompiler}; -use leo_compiler::errors::CompilerError; - -fn expect_fail(program: EdwardsTestCompiler) { - match expect_compiler_error(program) { - CompilerError::FunctionError(_) => {} - err => panic!("expected input parser error, got {:?}", err), - } -} - -#[test] -fn test_input_pass() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_array_fail() { - let program_string = include_str!("main_array.leo"); - let input_string = include_str!("input/main_array.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_multi_dimension_array() { - let program_string = include_str!("main_multi_dimension_array.leo"); - let input_string = include_str!("input/main_multi_dimension_array.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_fail_name() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_fail_name.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_fail_type() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_fail_type.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_multiple() { - let program_string = include_str!("main_multiple.leo"); - let input_string = include_str!("input/main_multiple.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_array_dimensions_mismatch() { - let program_string = include_str!("main_array_fail.leo"); - let input_string = include_str!("input/main_array_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_tuple_size_mismatch() { - let program_string = include_str!("main_tuple_fail.leo"); - let input_string = include_str!("input/main_tuple_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_field_input() { - let program_string = include_str!("main_field.leo"); - let input_string = include_str!("input/main_field.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_group_input() { - let program_string = include_str!("main_group.leo"); - let input_string = include_str!("input/main_group.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} diff --git a/tests/compiler/input_files/program_input_and_program_state/access.leo b/tests/compiler/input_files/program_input_and_program_state/access.leo deleted file mode 100644 index 819f6c6c1e..0000000000 --- a/tests/compiler/input_files/program_input_and_program_state/access.leo +++ /dev/null @@ -1,11 +0,0 @@ -function main(data: [u8; 32]) { - console.assert(input.registers.value_balance == 0u64); - - console.assert(input.state.leaf_index == 0u32); - - console.assert(input.record.value == 5u64); - - console.assert(input.state_leaf.network_id == 0u8); - - console.assert(data == [0u8; 32]); -} \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_and_program_state/basic.leo b/tests/compiler/input_files/program_input_and_program_state/basic.leo new file mode 100644 index 0000000000..a2c57486eb --- /dev/null +++ b/tests/compiler/input_files/program_input_and_program_state/basic.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +state_file: input/basic.state +input_file: input/basic.in +*/ + +function main(a: bool) -> bool { + return a == input.registers.b; +} diff --git a/tests/compiler/input_files/program_input_and_program_state/input/basic.in b/tests/compiler/input_files/program_input_and_program_state/input/basic.in index b62eee0443..18a27f2ea4 100644 --- a/tests/compiler/input_files/program_input_and_program_state/input/basic.in +++ b/tests/compiler/input_files/program_input_and_program_state/input/basic.in @@ -2,4 +2,4 @@ a: bool = true; [registers] -b: bool = true; \ No newline at end of file +b: bool = true; diff --git a/tests/compiler/input_files/program_input_and_program_state/input/basic.state b/tests/compiler/input_files/program_input_and_program_state/input/basic.state index 78706190fe..6482a905c8 100644 --- a/tests/compiler/input_files/program_input_and_program_state/input/basic.state +++ b/tests/compiler/input_files/program_input_and_program_state/input/basic.state @@ -9,4 +9,4 @@ a: bool = true; a: bool = true; [state_leaf] -a: bool = true; \ No newline at end of file +a: bool = true; diff --git a/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in b/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in index 0d4ece3b1c..498c587ec9 100644 --- a/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in +++ b/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.in @@ -2,5 +2,6 @@ data: [u8; 32] = [0u8; 32]; [registers] +r0: bool = true; token_id: [u8; 32] = [0u8; 32]; -value_balance: u64 = 0; \ No newline at end of file +value_balance: u64 = 0; diff --git a/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state b/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state index 219fc44776..71f115d4d9 100644 --- a/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state +++ b/tests/compiler/input_files/program_input_and_program_state/input/token_withdraw.state @@ -21,4 +21,4 @@ commitment_randomness: [u8; 32] = [0u8; 32]; path: [u8; 128] = [0u8; 128]; memo: [u8; 32] = [0u8; 32]; network_id: u8 = 0; -leaf_randomness: [u8; 32] = [0u8; 32]; \ No newline at end of file +leaf_randomness: [u8; 32] = [0u8; 32]; diff --git a/tests/compiler/input_files/program_input_and_program_state/mod.rs b/tests/compiler/input_files/program_input_and_program_state/mod.rs deleted file mode 100644 index 25541030ab..0000000000 --- a/tests/compiler/input_files/program_input_and_program_state/mod.rs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_input_and_state, parse_program_with_input_and_state}; - -#[test] -fn test_basic() { - let input_string = include_str!("input/basic.in"); - let state_string = include_str!("input/basic.state"); - - parse_input_and_state(input_string, state_string).unwrap(); -} - -#[test] -fn test_full() { - let input_string = include_str!("input/token_withdraw.in"); - let state_string = include_str!("input/token_withdraw.state"); - - parse_input_and_state(input_string, state_string).unwrap(); -} - -#[test] -fn test_access() { - let program_string = include_str!("access.leo"); - let input_string = include_str!("input/token_withdraw.in"); - let state_string = include_str!("input/token_withdraw.state"); - - let program = parse_program_with_input_and_state(program_string, input_string, state_string).unwrap(); - - assert_satisfied(program); -} diff --git a/tests/compiler/input_files/program_input_and_program_state/token_withdraw.leo b/tests/compiler/input_files/program_input_and_program_state/token_withdraw.leo new file mode 100644 index 0000000000..6374554308 --- /dev/null +++ b/tests/compiler/input_files/program_input_and_program_state/token_withdraw.leo @@ -0,0 +1,14 @@ +/* +namespace: Compile +expectation: Pass +state_file: input/token_withdraw.state +input_file: input/token_withdraw.in +*/ + +function main(data: [u8; 32]) -> bool { + return input.registers.value_balance == 0u64 + && input.state.leaf_index == 0u32 + && input.record.value == 5u64 + && input.state_leaf.network_id == 0u8 + && data == [0u8; 32]; +} diff --git a/tests/compiler/input_files/program_input_constants/input/main.in b/tests/compiler/input_files/program_input_constants/input/main.in index 625ffc1ffb..ba6c1850b3 100644 --- a/tests/compiler/input_files/program_input_constants/input/main.in +++ b/tests/compiler/input_files/program_input_constants/input/main.in @@ -1,2 +1,5 @@ [constants] -a: bool = true; \ No newline at end of file +a: bool = true; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input_constants/input/main_array_fail.in b/tests/compiler/input_files/program_input_constants/input/main_array_fail.in index e63331af22..3fe6502e8f 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_array_fail.in +++ b/tests/compiler/input_files/program_input_constants/input/main_array_fail.in @@ -1,2 +1,2 @@ [constants] -x: [i16; 1] = [0i16; 1]; \ No newline at end of file +x: [i16; 1] = [0i16; 1]; diff --git a/tests/compiler/input_files/program_input_constants/input/main_double_declaration_fail.in b/tests/compiler/input_files/program_input_constants/input/main_double_declaration_fail.in deleted file mode 100644 index fcc95402a3..0000000000 --- a/tests/compiler/input_files/program_input_constants/input/main_double_declaration_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: bool = true; - -[constants] -a: bool = false; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_fail_name.in b/tests/compiler/input_files/program_input_constants/input/main_fail_name.in index 0cae21cc28..5c7bcd0957 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_fail_name.in +++ b/tests/compiler/input_files/program_input_constants/input/main_fail_name.in @@ -1,2 +1,2 @@ [constants] -bad_name: bool = true; \ No newline at end of file +bad_name: bool = true; diff --git a/tests/compiler/input_files/program_input_constants/input/main_fail_type.in b/tests/compiler/input_files/program_input_constants/input/main_fail_type.in index 0bb8f694fd..8ea9b7fbf5 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_fail_type.in +++ b/tests/compiler/input_files/program_input_constants/input/main_fail_type.in @@ -1,2 +1,2 @@ [constants] -a: u8 = 1; \ No newline at end of file +a: u8 = 1; diff --git a/tests/compiler/input_files/program_input_constants/input/main_field.in b/tests/compiler/input_files/program_input_constants/input/main_field.in index deea2a01a3..cc7b62e237 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_field.in +++ b/tests/compiler/input_files/program_input_constants/input/main_field.in @@ -1,3 +1,3 @@ [constants] a: field = 1; -b: field = -1; \ No newline at end of file +b: field = -1; diff --git a/tests/compiler/input_files/program_input_constants/input/main_group.in b/tests/compiler/input_files/program_input_constants/input/main_group.in index 52e52dc6a8..51b14d842a 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_group.in +++ b/tests/compiler/input_files/program_input_constants/input/main_group.in @@ -1,4 +1,4 @@ [constants] a: group = 1group; b: group = -1group; -c: group = (0, -1)group; \ No newline at end of file +c: group = (0, -1)group; diff --git a/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in b/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in index 0d052ae99b..70a12110fd 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in +++ b/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in @@ -1,2 +1,5 @@ [constants] -x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; \ No newline at end of file +x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input_constants/input/main_multiple.in b/tests/compiler/input_files/program_input_constants/input/main_multiple.in index 3e61056b7b..70d7afa103 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_multiple.in +++ b/tests/compiler/input_files/program_input_constants/input/main_multiple.in @@ -1,3 +1,6 @@ [constants] a: bool = true; b: bool = false; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input_constants/input/main_not_const_input_fail.in b/tests/compiler/input_files/program_input_constants/input/main_not_const_input_fail.in deleted file mode 100644 index b2aaee854e..0000000000 --- a/tests/compiler/input_files/program_input_constants/input/main_not_const_input_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: bool = true; // expecting const a, not main a \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/input/main_tuple.in b/tests/compiler/input_files/program_input_constants/input/main_tuple.in new file mode 100644 index 0000000000..b6c685dd93 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/input/main_tuple.in @@ -0,0 +1,5 @@ +[constants] +x: (u8, bool, u8) = (10, true, 10); + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in b/tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in index 4341911fba..0c1cad5312 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in +++ b/tests/compiler/input_files/program_input_constants/input/main_tuple_fail.in @@ -1,2 +1,2 @@ [constants] -x: (u8, bool) = (10, true); // wrong size here; main expects (u8, bool, u8) \ No newline at end of file +x: (u8, bool) = (10, true); // wrong size here; main expects (u8, bool, u8) diff --git a/tests/compiler/input_files/program_input_constants/input/main_type_mismatch.in b/tests/compiler/input_files/program_input_constants/input/main_type_mismatch.in deleted file mode 100644 index d50f65428d..0000000000 --- a/tests/compiler/input_files/program_input_constants/input/main_type_mismatch.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -a: u8 = 10; \ No newline at end of file diff --git a/tests/compiler/input_files/program_input_constants/main.leo b/tests/compiler/input_files/program_input_constants/main.leo index 0c33516ba8..c8edc4a9ca 100644 --- a/tests/compiler/input_files/program_input_constants/main.leo +++ b/tests/compiler/input_files/program_input_constants/main.leo @@ -1,3 +1,9 @@ -function main(const a: bool) { - console.assert(a == true); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +input_file: ../program_input_constants/input/main.in +*/ + +function main(const a: bool) -> bool { + return a == true; +} diff --git a/tests/compiler/input_files/program_input_constants/main_array.leo b/tests/compiler/input_files/program_input_constants/main_array.leo index aa592183da..b00d7b942c 100644 --- a/tests/compiler/input_files/program_input_constants/main_array.leo +++ b/tests/compiler/input_files/program_input_constants/main_array.leo @@ -1,4 +1,10 @@ -function main (const x: [i16; 1]) { +/* +namespace: Compile +expectation: Pass +input_file: input/main_array.in +*/ + +function main(const x: [i16; 1]) { console.log("{}", x); console.assert(x[0] == 0); -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_input_constants/main_array_fail.leo b/tests/compiler/input_files/program_input_constants/main_array_fail.leo index 6e7656f9b9..ccf9fab94d 100644 --- a/tests/compiler/input_files/program_input_constants/main_array_fail.leo +++ b/tests/compiler/input_files/program_input_constants/main_array_fail.leo @@ -1,3 +1,9 @@ -function main(const x: [i16; 2]){ - console.log("x: {}", x); -} \ No newline at end of file +/* +namespace: Compile +expectation: Fail +input_file: input/main_array_fail.in +*/ + +function main(const x: [i16; 2]) { + console.log("x: {}", x); +} 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 60fc67fc74..915ff04e63 100644 --- a/tests/compiler/input_files/program_input_constants/main_field.leo +++ b/tests/compiler/input_files/program_input_constants/main_field.leo @@ -1,5 +1,11 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/main_field.in +*/ + function main(const a: field, const b: field) { // Change to assert when == is implemented for field. console.log("a: {}", a); console.log("b: {}", b); -} \ No newline at end of file +} 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 93accf710d..a1a4359304 100644 --- a/tests/compiler/input_files/program_input_constants/main_group.leo +++ b/tests/compiler/input_files/program_input_constants/main_group.leo @@ -1,6 +1,12 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/main_group.in +*/ + function main(const a: group, const b: group, const c: group) { // Change to assert when == is implemented for group. console.log("a: {}", a); console.log("b: {}", b); console.log("c: {}", c); -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo b/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo index 56a1b3c7cf..0719646360 100644 --- a/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo +++ b/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo @@ -1,9 +1,14 @@ -function main(const x: [i16; (2, 2, 3)]){ - console.log("x: {}", x); +/* +namespace: Compile +expectation: Pass +input_file: input/main_multi_dimension_array.in +*/ - let y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; - console.log("y: {}", y); +function main(const x: [i16; (2, 2, 3)]) -> bool { + console.log("x: {}", x); - console.assert(x[0][0][0] == y[0][0][0]); - console.assert(x[1][1][2] == y[1][1][2]); -} \ No newline at end of file + const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; + console.log("y: {}", y); + + return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2]; +} 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 2c2179cc3d..e84853577e 100644 --- a/tests/compiler/input_files/program_input_constants/main_multiple.leo +++ b/tests/compiler/input_files/program_input_constants/main_multiple.leo @@ -1,4 +1,9 @@ -function main(const a: bool, const b: bool) { - console.assert(a == true); - console.assert(b == false); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +input_file: input/main_multiple.in +*/ + +function main(const a: bool, const b: bool) -> bool { + return a != b; +} diff --git a/tests/compiler/input_files/program_input_constants/main_tuple.leo b/tests/compiler/input_files/program_input_constants/main_tuple.leo new file mode 100644 index 0000000000..1a20e38890 --- /dev/null +++ b/tests/compiler/input_files/program_input_constants/main_tuple.leo @@ -0,0 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/main_tuple.in +*/ + +function main(const x: (u8, bool, u8)) -> bool { + return x.0 == 10 && x.1 == true && x.2 == 10; +} diff --git a/tests/compiler/input_files/program_input_constants/main_tuple_fail.leo b/tests/compiler/input_files/program_input_constants/main_tuple_fail.leo index 639ec42835..08e9b93d1c 100644 --- a/tests/compiler/input_files/program_input_constants/main_tuple_fail.leo +++ b/tests/compiler/input_files/program_input_constants/main_tuple_fail.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/main_tuple_fail.in +*/ + function main(const x: (u8, bool, u8)) { console.log("x: {}", x); -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_input_constants/mod.rs b/tests/compiler/input_files/program_input_constants/mod.rs deleted file mode 100644 index 284aef6312..0000000000 --- a/tests/compiler/input_files/program_input_constants/mod.rs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_compiler_error, parse_program_with_input, EdwardsTestCompiler}; -use leo_compiler::errors::CompilerError; - -fn expect_fail(program: EdwardsTestCompiler) { - match expect_compiler_error(program) { - CompilerError::FunctionError(_) => {} - err => panic!("expected input parser error, got {:?}", err), - } -} - -#[test] -fn test_input_pass() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_array_fail() { - let program_string = include_str!("main_array.leo"); - let input_string = include_str!("input/main_array.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_multi_dimension_array() { - let program_string = include_str!("main_multi_dimension_array.leo"); - let input_string = include_str!("input/main_multi_dimension_array.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_fail_name() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_fail_name.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_fail_type() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_fail_type.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_multiple() { - let program_string = include_str!("main_multiple.leo"); - let input_string = include_str!("input/main_multiple.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_array_dimensions_mismatch() { - let program_string = include_str!("main_array_fail.leo"); - let input_string = include_str!("input/main_array_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_double_declaration() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_double_declaration_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_non_constant_input() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_not_const_input_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_tuple_size_mismatch() { - let program_string = include_str!("main_tuple_fail.leo"); - let input_string = include_str!("input/main_tuple_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_field_input() { - let program_string = include_str!("main_field.leo"); - let input_string = include_str!("input/main_field.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_group_input() { - let program_string = include_str!("main_group.leo"); - let input_string = include_str!("input/main_group.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out new file mode 100644 index 0000000000..d78efc7c73 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input/main.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/main.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out new file mode 100644 index 0000000000..9ef270002c --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 31 + num_constraints: 31 + at: 9dbf37472d7a01111bf49d73870895e1669fce2d7c86d19fa1cd9bf97102c34a + bt: 51c5020146972aaa76ab053686ae5364f63ce6185620eba3780cf86581f29cfe + ct: e02be0defc1d4e9bfd935093780a8693b624228f7dc2501ac1f065af2eee9bc8 + output: + - input_file: input/main_array.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out new file mode 100644 index 0000000000..041ef90457 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:3:1\n |\n 3 | function main(x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 1, found array dimensions 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out new file mode 100644 index 0000000000..d7a82496b8 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 2 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/main_field.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out new file mode 100644 index 0000000000..cb46b9203e --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_group.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 12 + num_constraints: 9 + at: df88b362955f00b8c41afd9e31c9e41e4b8254a71ea0f3f2f97d5b6b8b767415 + bt: df58aff07b131c34e977ffb5657bbd21852f59fd7e059117c419c3c6070a7053 + ct: 335cdfb09b13172262042abccf4560511666deaa63cc1b3f30dd35dcb554840f + output: + - input_file: input/main_group.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out new file mode 100644 index 0000000000..b7dec511c8 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multi_dimension_array.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 223 + num_constraints: 223 + at: 87fe022f8971e90450cc219824d04ea84f08040429143393193aa2de0321759f + bt: 65e18f4e1e32d72f87d238401f8397b5d8ba20e7da7d50cc5930faa5673cdb77 + ct: 389354117abccc4ef9f4822705889f64f1d16b7e0d2adae52005c7b91b0ccabb + output: + - input_file: input/main_multi_dimension_array.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out new file mode 100644 index 0000000000..cfe64b65b2 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_multiple.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3 + num_constraints: 3 + at: d4e77c2cd10c964fbbc4ad4f374dc36b3a6bc7d6865b87ec5234076348308c2c + bt: 49e8fa1fd3f85b0f486c49f194e4fff3da5e8039685fca1f3327389cbe9fc180 + ct: 7ca43d5c34997f3c866631161cb33186cc016972238c07771ae105ca1b05320d + output: + - input_file: input/main_multiple.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out new file mode 100644 index 0000000000..9326008186 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 33 + num_constraints: 33 + at: 16cd2aaf51f97f0d967f934facd55d3da0f128b5548ca7d9033099dabb8755aa + bt: 13ce6219d223223b0e2a5b8bab43bda704fb2509e20143c1c8dc28238c65a0c3 + ct: 1a2cc6ebebf9b0d70351fb54db6ab269bfec125b7d84dea8450ee1566d937a38 + output: + - input_file: input/main_tuple.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out new file mode 100644 index 0000000000..c7b025f3b1 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:3:1\n |\n 3 | function main(x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out new file mode 100644 index 0000000000..77912f4fdb --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/basic.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3 + num_constraints: 3 + at: c5f99f3b350445cd2709c7f76cda7a2ff158e972c58dc1294b346ab21b5c9100 + bt: 5a01b0726c5b948a3b336179b77081865f51dc2f1de630ce95b03424a5ae7998 + ct: 7ca43d5c34997f3c866631161cb33186cc016972238c07771ae105ca1b05320d + output: + - input_file: input/basic.in + output: + registers: + b: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out new file mode 100644 index 0000000000..187b24114a --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_and_program_state/token_withdraw.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 847 + num_constraints: 847 + at: 7a173ccf91016726958e205fb7a60e954c826a7d8f3dbfba86417c4dad8a8809 + bt: ef390629424c3ec765f6759eba6be4285e92bbb34e1fdb083ea723021fda1a83 + ct: 048882f78f795732711ba34cb6892495a782c2573a1358a9c679b97fa5ea5fe7 + output: + - input_file: input/token_withdraw.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out new file mode 100644 index 0000000000..2c44a3fa29 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: "../program_input_constants/input/main.in" + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out new file mode 100644 index 0000000000..ff0fd97799 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/main_array.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out new file mode 100644 index 0000000000..5088df2b5f --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:3:1\n |\n 3 | function main(const x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 2, found array dimensions 1" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out new file mode 100644 index 0000000000..213567a511 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/main_field.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out new file mode 100644 index 0000000000..fa74af2029 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/main_group.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out new file mode 100644 index 0000000000..214c553e6e --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/main_multi_dimension_array.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out new file mode 100644 index 0000000000..37cef1b382 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/main_multiple.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out new file mode 100644 index 0000000000..ce6ad15cdd --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/main_tuple.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out new file mode 100644 index 0000000000..f1b289f53f --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:3:1\n |\n 3 | function main(const x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" diff --git a/tests/expectations/parser/parser/circuits/big_self.leo.out b/tests/expectations/parser/parser/circuits/big_self.leo.out deleted file mode 100644 index abdced08ca..0000000000 --- a/tests/expectations/parser/parser/circuits/big_self.leo.out +++ /dev/null @@ -1,53 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() -> Self {\\\"}\"}" - input: [] - output: SelfType - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return Self {};\\\"}\"}" - members: [] - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 23 - path: test - content: " return Self {};" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 23 - path: test - content: " return Self {};" - span: - line_start: 4 - line_stop: 6 - col_start: 26 - col_stop: 6 - path: test - content: " function x() -> Self {\n...\n }" - span: - line_start: 4 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: test - content: " function x() -> Self {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/empty.leo.out b/tests/expectations/parser/parser/circuits/empty.leo.out deleted file mode 100644 index e826c4097d..0000000000 --- a/tests/expectations/parser/parser/circuits/empty.leo.out +++ /dev/null @@ -1,13 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: [] - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out deleted file mode 100644 index 039d525028..0000000000 --- a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out +++ /dev/null @@ -1,97 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}" - - IntegerType: U32 - - CircuitVariable: - - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32,\\\"}\"}" - - IntegerType: U32 - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 6 - line_stop: 8 - col_start: 18 - col_stop: 6 - path: test - content: " function x() {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: test - content: " function x() {\n...\n }" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 10 - line_stop: 10 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 10 - line_stop: 10 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 9 - line_stop: 11 - col_start: 18 - col_stop: 6 - path: test - content: " function y() {\n...\n }" - span: - line_start: 9 - line_stop: 11 - col_start: 5 - col_stop: 6 - path: test - content: " function y() {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/fields.leo.out b/tests/expectations/parser/parser/circuits/fields.leo.out deleted file mode 100644 index 851d2945c7..0000000000 --- a/tests/expectations/parser/parser/circuits/fields.leo.out +++ /dev/null @@ -1,19 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}" - - IntegerType: U32 - - CircuitVariable: - - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32,\\\"}\"}" - - IntegerType: U32 - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/functions.leo.out b/tests/expectations/parser/parser/circuits/functions.leo.out deleted file mode 100644 index aebda6c4e5..0000000000 --- a/tests/expectations/parser/parser/circuits/functions.leo.out +++ /dev/null @@ -1,91 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 18 - col_stop: 6 - path: test - content: " function x() {\n...\n }" - span: - line_start: 4 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: test - content: " function x() {\n...\n }" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 8 - line_stop: 8 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 7 - line_stop: 9 - col_start: 18 - col_stop: 6 - path: test - content: " function y() {\n...\n }" - span: - line_start: 7 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: test - content: " function y() {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/mut_self.leo.out b/tests/expectations/parser/parser/circuits/mut_self.leo.out deleted file mode 100644 index 03997801dc..0000000000 --- a/tests/expectations/parser/parser/circuits/mut_self.leo.out +++ /dev/null @@ -1,53 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" - input: - - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 26 - col_stop: 6 - path: test - content: " function x(mut self) {\n...\n }" - span: - line_start: 4 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: test - content: " function x(mut self) {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/self.leo.out b/tests/expectations/parser/parser/circuits/self.leo.out deleted file mode 100644 index 65785a36b6..0000000000 --- a/tests/expectations/parser/parser/circuits/self.leo.out +++ /dev/null @@ -1,53 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" - input: - - SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 22 - col_stop: 6 - path: test - content: " function x(self) {\n...\n }" - span: - line_start: 4 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: test - content: " function x(self) {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/expression/access/array_access.leo.out b/tests/expectations/parser/parser/expression/access/array_access.leo.out deleted file mode 100644 index 5c820cc814..0000000000 --- a/tests/expectations/parser/parser/expression/access/array_access.leo.out +++ /dev/null @@ -1,267 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[0]" - - ArrayAccess: - array: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X[1]\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "X[1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "X[1]" - - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8]\\\"}\"}" - index: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[0u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[0u8]" - - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1u8][2u8]\\\"}\"}" - index: - Value: - Integer: - - U8 - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[1u8][2u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[1u8][2u8]" - index: - Value: - Integer: - - U8 - - "2" - - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 11 - path: test - content: "x[1u8][2u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[1u8][2u8]" - - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" - index: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[x][y][z]" - index: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[x][y][z]" - index: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x[x][y][z]" - - Call: - function: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]()\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0]()" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[0]()" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[0]()" - - ArrayAccess: - array: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()[0]\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "x()[0]" - index: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x()[0]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x()[0]" - - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x(y)::y(x)" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x(y)::y(x)" - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x(y)::y(x)" - - ArrayAccess: - array: - TupleAccess: - tuple: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" - index: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[x].0[x]" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[x].0[x]" - index: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x[x].0[x]" diff --git a/tests/expectations/parser/parser/expression/access/array_range_access.leo.out b/tests/expectations/parser/parser/expression/access/array_range_access.leo.out deleted file mode 100644 index 10b02e133d..0000000000 --- a/tests/expectations/parser/parser/expression/access/array_range_access.leo.out +++ /dev/null @@ -1,401 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" - left: ~ - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "x[..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..]\\\"}\"}" - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[1..]" - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[1..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..1]\\\"}\"}" - left: ~ - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x[..1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[..1]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..1]\\\"}\"}" - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[1..1]" - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "x[1..1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[1..1]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0..100]\\\"}\"}" - left: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0..100]" - right: - Value: - Implicit: - - "100" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 9 - path: test - content: "x[0..100]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x[0..100]" - - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[323452345.2345234523453453][323452345.2345234523453453]\\\"}\"}" - index: - TupleAccess: - tuple: - Value: - Implicit: - - "323452345" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 12 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - index: - value: "2345234523453453" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 29 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 30 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - index: - TupleAccess: - tuple: - Value: - Implicit: - - "323452345" - - line_start: 1 - line_stop: 1 - col_start: 31 - col_stop: 40 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - index: - value: "2345234523453453" - span: - line_start: 1 - line_stop: 1 - col_start: 31 - col_stop: 57 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 58 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..1u8]\\\"}\"}" - left: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[0u8..1u8]" - right: - Value: - Integer: - - U8 - - "1" - - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 11 - path: test - content: "x[0u8..1u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[0u8..1u8]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..]\\\"}\"}" - left: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[0u8..]" - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[0u8..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..0u8]\\\"}\"}" - left: ~ - right: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "x[..0u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[..0u8]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" - left: ~ - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "x[..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[x.y..]" - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[x.y..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" - left: ~ - right: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "x[..y.x]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[..y.x]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[x.y..y.x]" - right: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 11 - path: test - content: "x[x.y..y.x]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[x.y..y.x]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - left: - CircuitMemberAccess: - circuit: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[x.y.x..y.x.y]" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 8 - path: test - content: "x[x.y.x..y.x.y]" - right: - CircuitMemberAccess: - circuit: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 13 - path: test - content: "x[x.y.x..y.x.y]" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: "x[x.y.x..y.x.y]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "x[x.y.x..y.x.y]" diff --git a/tests/expectations/parser/parser/expression/access/call.leo.out b/tests/expectations/parser/parser/expression/access/call.leo.out deleted file mode 100644 index ed9e9058da..0000000000 --- a/tests/expectations/parser/parser/expression/access/call.leo.out +++ /dev/null @@ -1,162 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x() - - Call: - function: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X()\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: X() - - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: x(y) - - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x(y, z)" - - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x(x, y, z)" - - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y()" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x::y()" - - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y(x)" - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x::y(x)" - - Call: - function: - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0(x) - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: x.0(x) - - Call: - function: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0](x)" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[0](x)" - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[0](x)" diff --git a/tests/expectations/parser/parser/expression/access/circuit.leo.out b/tests/expectations/parser/parser/expression/access/circuit.leo.out deleted file mode 100644 index e10176179c..0000000000 --- a/tests/expectations/parser/parser/expression/access/circuit.leo.out +++ /dev/null @@ -1,120 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.y - - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" - name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: X.Y - - CircuitMemberAccess: - circuit: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.y.z - name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.y.z - - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.y() - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.y() - - TupleAccess: - tuple: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.y.0 - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.y.0 - - ArrayAccess: - array: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "x.y[1]" - index: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x.y[1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x.y[1]" diff --git a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out deleted file mode 100644 index eed96329a1..0000000000 --- a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out +++ /dev/null @@ -1,120 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y" - - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" - name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "X::Y" - - CircuitStaticFunctionAccess: - circuit: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y::z" - name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x::y::z" - - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y()" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x::y()" - - TupleAccess: - tuple: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y.0" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x::y.0" - - ArrayAccess: - array: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y[1]" - index: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "x::y[1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x::y[1]" diff --git a/tests/expectations/parser/parser/expression/access/tuple.leo.out b/tests/expectations/parser/parser/expression/access/tuple.leo.out deleted file mode 100644 index c4089a4522..0000000000 --- a/tests/expectations/parser/parser/expression/access/tuple.leo.out +++ /dev/null @@ -1,109 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0\\\"}\"}" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0 - - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1\\\"}\"}" - index: - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.1 - - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2\\\"}\"}" - index: - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.2 - - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0.0\\\"}\"}" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0.0 - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.0.0 - - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1.1\\\"}\"}" - index: - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.1.1 - index: - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.1.1 - - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2.2\\\"}\"}" - index: - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.2.2 - index: - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.2.2 diff --git a/tests/expectations/parser/parser/expression/array_init.leo.out b/tests/expectations/parser/parser/expression/array_init.leo.out deleted file mode 100644 index c8ee3bfb32..0000000000 --- a/tests/expectations/parser/parser/expression/array_init.leo.out +++ /dev/null @@ -1,150 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "[0u8; 1]" - dimensions: - - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "[0u8; 1]" - - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0; 1]" - dimensions: - - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "[0; 1]" - - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0; (1)]" - dimensions: - - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "[0; (1)]" - - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0; (1, 2)]" - dimensions: - - value: "1" - - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "[0; (1, 2)]" - - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0; (1, 2, 3)]" - dimensions: - - value: "1" - - value: "2" - - value: "3" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: "[0; (1, 2, 3)]" - - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: "[[[0; 3]; 2]; 1]" - dimensions: - - value: "3" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 9 - path: test - content: "[[[0; 3]; 2]; 1]" - dimensions: - - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 13 - path: test - content: "[[[0; 3]; 2]; 1]" - dimensions: - - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "[[[0; 3]; 2]; 1]" diff --git a/tests/expectations/parser/parser/expression/array_init_fail.leo.out b/tests/expectations/parser/parser/expression/array_init_fail.leo.out deleted file mode 100644 index 3e6e920477..0000000000 --- a/tests/expectations/parser/parser/expression/array_init_fail.leo.out +++ /dev/null @@ -1,6 +0,0 @@ ---- -namespace: ParseExpression -expectation: Fail -outputs: - - " --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^\n |\n = illegal spread in array initializer" - - " --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^\n |\n = illegal spread in array initializer" diff --git a/tests/expectations/parser/parser/expression/array_inline.leo.out b/tests/expectations/parser/parser/expression/array_inline.leo.out deleted file mode 100644 index ae4ccf624f..0000000000 --- a/tests/expectations/parser/parser/expression/array_inline.leo.out +++ /dev/null @@ -1,317 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "[0u8, 1, 2, 3]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "[0u8, 1, 2, 3]" - - Expression: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "[0u8, 1, 2, 3]" - - Expression: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: "[0u8, 1, 2, 3]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: "[0u8, 1, 2, 3]" - - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "[1]" - - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "1" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "[1u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "[1u8]" - - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "1" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "[1u8,]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "[1u8,]" - - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0, 1,]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "[0, 1,]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "[0, 1,]" - - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0,1,]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: "[0,1,]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "[0,1,]" - - ArrayInline: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "[]" - - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "[[1,2,3],[1,2,3]]" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 9 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 16 - path: test - content: "[[1,2,3],[1,2,3]]" - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 17 - path: test - content: "[[1,2,3],[1,2,3]]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "[[1,2,3],[1,2,3]]" - - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "[[]]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "[[]]" - - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "[[], []]" - - Expression: - ArrayInline: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 8 - path: test - content: "[[], []]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "[[], []]" diff --git a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out deleted file mode 100644 index 3565e3e59c..0000000000 --- a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out +++ /dev/null @@ -1,9 +0,0 @@ ---- -namespace: ParseExpression -expectation: Fail -outputs: - - " --> test:1:2\n |\n 1 | [,]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | [,,]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:4\n |\n 1 | [0,,]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | [,0]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | [,0,]\n | ^\n |\n = expected 'expression', got ','" diff --git a/tests/expectations/parser/parser/expression/binary/add.leo.out b/tests/expectations/parser/parser/expression/binary/add.leo.out deleted file mode 100644 index 72d244dd8d..0000000000 --- a/tests/expectations/parser/parser/expression/binary/add.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 1 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2+3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2+3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2+3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 + 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 + 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 + 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 + 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 + 2 + 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 + 3 * 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 + 3 * 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 - 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 - 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 - 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 - 3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 + 2 - 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 18 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/and.leo.out b/tests/expectations/parser/parser/expression/binary/and.leo.out deleted file mode 100644 index b6f8de5d72..0000000000 --- a/tests/expectations/parser/parser/expression/binary/and.leo.out +++ /dev/null @@ -1,111 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: true && false - right: - Value: - Boolean: - - "false" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: true && false - op: And - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: true && false - - Binary: - left: - Value: - Boolean: - - "false" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: false&&true - right: - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 12 - path: test - content: false&&true - op: And - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: false&&true - - Binary: - left: - Binary: - left: - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: true&&false&&true - right: - Value: - Boolean: - - "false" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 12 - path: test - content: true&&false&&true - op: And - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: true&&false&&true - right: - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 18 - path: test - content: true&&false&&true - op: And - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: true&&false&&true diff --git a/tests/expectations/parser/parser/expression/binary/div.leo.out b/tests/expectations/parser/parser/expression/binary/div.leo.out deleted file mode 100644 index 45684cd859..0000000000 --- a/tests/expectations/parser/parser/expression/binary/div.leo.out +++ /dev/null @@ -1,180 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 / 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 / 1 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 / 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2/3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2/3 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2/3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 / 2 / 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 / 2 / 3 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 / 2 / 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 / 2 / 3 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 / 2 / 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 2 / 3 ** 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 2 / 3 ** 4 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 ** 2 / 3 ** 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 ** 2 / 3 ** 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 16 - path: test - content: 1 ** 2 / 3 ** 4 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 16 - path: test - content: 1 ** 2 / 3 ** 4 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: 1 ** 2 / 3 ** 4 diff --git a/tests/expectations/parser/parser/expression/binary/eq.leo.out b/tests/expectations/parser/parser/expression/binary/eq.leo.out deleted file mode 100644 index 56f7df069c..0000000000 --- a/tests/expectations/parser/parser/expression/binary/eq.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 == 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 == 1 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 == 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2==3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: 2==3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: 2==3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 == 2 == 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 == 2 == 3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 == 2 == 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 == 2 == 3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 == 2 == 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 == 3 < 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 == 3 < 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 == 3 < 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 < 2 == 3 < 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 == 2 == 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 == 2 == 3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 == 2 == 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 == 2 == 3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 == 2 == 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/exp.leo.out b/tests/expectations/parser/parser/expression/binary/exp.leo.out deleted file mode 100644 index b0c39a877f..0000000000 --- a/tests/expectations/parser/parser/expression/binary/exp.leo.out +++ /dev/null @@ -1,244 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 1 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 ** 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2**3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: 2**3 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: 2**3 - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 2 ** 3 - right: - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 2 ** 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 ** 2 ** 3 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 12 - path: test - content: 1 ** 2 ** 3 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 ** 2 ** 3 - - Binary: - left: - Cast: - inner: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 as i8 ** 3 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 1 as i8 ** 3 as i8 - right: - Cast: - inner: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 13 - path: test - content: 1 as i8 ** 3 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 19 - path: test - content: 1 as i8 ** 3 as i8 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: 1 as i8 ** 3 as i8 - - Binary: - left: - Cast: - inner: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - right: - Binary: - left: - Cast: - inner: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 13 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 19 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - right: - Cast: - inner: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 30 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 30 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 30 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 diff --git a/tests/expectations/parser/parser/expression/binary/gt.leo.out b/tests/expectations/parser/parser/expression/binary/gt.leo.out deleted file mode 100644 index b9d5cfd72d..0000000000 --- a/tests/expectations/parser/parser/expression/binary/gt.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 > 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 > 1 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 > 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2>3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2>3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2>3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 > 2 > 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 > 2 > 3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 > 2 > 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 > 2 > 3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 > 2 > 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 > 3 + 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 > 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 > 3 + 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 > 3 + 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 > 2 > 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 > 2 > 3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 > 2 > 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 > 2 > 3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 > 2 > 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 18 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 22 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 22 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/gte.leo.out b/tests/expectations/parser/parser/expression/binary/gte.leo.out deleted file mode 100644 index 9ab526f71c..0000000000 --- a/tests/expectations/parser/parser/expression/binary/gte.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 >= 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 >= 1 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 >= 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2 >= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 2 >= 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 >= 2 >= 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 >= 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 >= 2 >= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 >= 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 >= 2 >= 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 >= 3 + 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 >= 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 >= 3 + 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 + 2 >= 3 + 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 >= 2 >= 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 >= 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 >= 2 >= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 >= 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 >= 2 >= 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lt.leo.out b/tests/expectations/parser/parser/expression/binary/lt.leo.out deleted file mode 100644 index 9879afc9d3..0000000000 --- a/tests/expectations/parser/parser/expression/binary/lt.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 1 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2<3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2<3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2<3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 < 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 < 3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 < 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 < 2 < 3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 < 2 < 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 < 3 + 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 < 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 < 3 + 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 < 3 + 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 < 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 < 3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 < 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 < 2 < 3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 < 2 < 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 18 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 22 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 22 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lte.leo.out b/tests/expectations/parser/parser/expression/binary/lte.leo.out deleted file mode 100644 index f40df4bddb..0000000000 --- a/tests/expectations/parser/parser/expression/binary/lte.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 <= 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 <= 1 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 <= 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2 <= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 2 <= 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 <= 2 <= 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 <= 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 <= 2 <= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 <= 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 <= 2 <= 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 <= 3 + 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 <= 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 <= 3 + 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 + 2 <= 3 + 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 <= 2 <= 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 <= 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 <= 2 <= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 <= 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 <= 2 <= 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/mul.leo.out b/tests/expectations/parser/parser/expression/binary/mul.leo.out deleted file mode 100644 index c146eeee15..0000000000 --- a/tests/expectations/parser/parser/expression/binary/mul.leo.out +++ /dev/null @@ -1,289 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 1 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2*3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2*3 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2*3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 * 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 * 3 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 * 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 * 3 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 * 2 * 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 2 * 3 ** 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 2 * 3 ** 4 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 ** 2 * 3 ** 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 ** 2 * 3 ** 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 24 - col_stop: 25 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 25 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 25 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 diff --git a/tests/expectations/parser/parser/expression/binary/ne.leo.out b/tests/expectations/parser/parser/expression/binary/ne.leo.out deleted file mode 100644 index 65fb6e2298..0000000000 --- a/tests/expectations/parser/parser/expression/binary/ne.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 != 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 != 1 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 != 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2!=3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: 2!=3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: 2!=3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 != 2 != 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 != 2 != 3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 != 2 != 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 != 2 != 3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 != 2 != 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 != 3 < 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 != 3 < 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 != 3 < 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 < 2 != 3 < 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 != 2 != 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 != 2 != 3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 != 2 != 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 != 2 != 3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 != 2 != 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/or.leo.out b/tests/expectations/parser/parser/expression/binary/or.leo.out deleted file mode 100644 index 72d244dd8d..0000000000 --- a/tests/expectations/parser/parser/expression/binary/or.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 1 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2+3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2+3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2+3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 + 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 + 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 + 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 + 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 + 2 + 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 + 3 * 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 + 3 * 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 - 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 - 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 - 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 - 3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 + 2 - 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 18 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/sub.leo.out b/tests/expectations/parser/parser/expression/binary/sub.leo.out deleted file mode 100644 index 4e39639fe2..0000000000 --- a/tests/expectations/parser/parser/expression/binary/sub.leo.out +++ /dev/null @@ -1,180 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 - 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 - 1 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 - 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2-3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2-3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2-3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 - 2 - 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 - 2 - 3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 - 2 - 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 - 2 - 3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 - 2 - 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 - 3 * 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 - 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 - 3 * 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 - 3 * 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 - 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 - 3 * 4 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 - 3 * 4 diff --git a/tests/expectations/parser/parser/expression/cast.leo.out b/tests/expectations/parser/parser/expression/cast.leo.out deleted file mode 100644 index 25ace32c14..0000000000 --- a/tests/expectations/parser/parser/expression/cast.leo.out +++ /dev/null @@ -1,186 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8\\\"}\"}" - target_type: - IntegerType: U8 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x as u8 - - Cast: - inner: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" - target_type: - Circuit: "{\"name\":\"id\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: y as id - - Cast: - inner: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"z as u32\\\"}\"}" - target_type: - IntegerType: U32 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: z as u32 - - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as i128\\\"}\"}" - target_type: - IntegerType: I128 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: x as i128 - - Cast: - inner: - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8 as u128\\\"}\"}" - target_type: - IntegerType: U8 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x as u8 as u128 - target_type: - IntegerType: U128 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: x as u8 as u128 - - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as field\\\"}\"}" - target_type: Field - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: x as field - - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as group\\\"}\"}" - target_type: Group - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: x as group - - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" - right: - Binary: - left: - Cast: - inner: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" - target_type: - IntegerType: U32 - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 14 - path: test - content: x ** y as u32 ** z - right: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 19 - path: test - content: x ** y as u32 ** z - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: x ** y as u32 ** z - - Value: - Implicit: - - "" - - line_start: 0 - line_stop: 0 - col_start: 0 - col_stop: 0 - path: "" - content: "" - - Cast: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x as u32\\\"}\"}" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "!x as u32" - target_type: - IntegerType: U32 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "!x as u32" - - Cast: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x as u32\\\"}\"}" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "-x as u32" - target_type: - IntegerType: U32 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "-x as u32" diff --git a/tests/expectations/parser/parser/expression/circuit_init.leo.out b/tests/expectations/parser/parser/expression/circuit_init.leo.out deleted file mode 100644 index 4295420d95..0000000000 --- a/tests/expectations/parser/parser/expression/circuit_init.leo.out +++ /dev/null @@ -1,113 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {}\\\"}\"}" - members: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x {}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" - expression: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "x {y}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" - expression: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x{y}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{}\\\"}\"}" - members: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "x{}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" - expression: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x{y: y}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" - expression: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x{y: x}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" - expression: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x{y: x,}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - expression: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - expression: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: "x{y:x, x:y,}" - - CircuitInit: - name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self {}\\\"}\"}" - members: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "Self {}" diff --git a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out deleted file mode 100644 index 3aae92971f..0000000000 --- a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out +++ /dev/null @@ -1,16 +0,0 @@ ---- -namespace: ParseExpression -expectation: Fail -outputs: - - " --> test:1:3\n |\n 1 | x {\n | ^\n |\n = unexpected EOF" - - "did not consume all input: '}' @ 1:3-4\n" - - " --> test:1:4\n |\n 1 | x {,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:5\n |\n 1 | x { , }\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,,,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:6\n |\n 1 | x {x,,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,,x}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,x}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:8\n |\n 1 | x {x:y,,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,,x:y}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,x:y}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:6\n |\n 1 | x {x:}\n | ^\n |\n = expected 'expression', got '}'" diff --git a/tests/expectations/parser/parser/expression/ident.leo.out b/tests/expectations/parser/parser/expression/ident.leo.out deleted file mode 100644 index a92fc0c1c8..0000000000 --- a/tests/expectations/parser/parser/expression/ident.leo.out +++ /dev/null @@ -1,23 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x\\\"}\"}" - - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X\\\"}\"}" - - Identifier: "{\"name\":\"xxx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xxx\\\"}\"}" - - Identifier: "{\"name\":\"XXX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"XXX\\\"}\"}" - - Identifier: "{\"name\":\"x1\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x1\\\"}\"}" - - Identifier: "{\"name\":\"xu32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xu32\\\"}\"}" - - Identifier: "{\"name\":\"testx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testx\\\"}\"}" - - Identifier: "{\"name\":\"truex\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"truex\\\"}\"}" - - Identifier: "{\"name\":\"TRUE\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"TRUE\\\"}\"}" - - Identifier: "{\"name\":\"testX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testX\\\"}\"}" - - Identifier: "{\"name\":\"letX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"letX\\\"}\"}" - - Identifier: "{\"name\":\"constX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"constX\\\"}\"}" - - Identifier: "{\"name\":\"test_test\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"test_test\\\"}\"}" - - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"self\\\"}\"}" - - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self\\\"}\"}" - - Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"input\\\"}\"}" - - Identifier: "{\"name\":\"selfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"selfX\\\"}\"}" - - Identifier: "{\"name\":\"SelfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"SelfX\\\"}\"}" - - Identifier: "{\"name\":\"inputX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"inputX\\\"}\"}" diff --git a/tests/expectations/parser/parser/expression/literal/address.leo.out b/tests/expectations/parser/parser/expression/literal/address.leo.out deleted file mode 100644 index 04610e6ead..0000000000 --- a/tests/expectations/parser/parser/expression/literal/address.leo.out +++ /dev/null @@ -1,13 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8' @ 1:1-64" - - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9' @ 1:1-64" - - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" - - "'aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st' @ 1:1-64" - - "'ALEO1' @ 1:1-6" - - "'Aleo1' @ 1:1-6" - - "'aleO1' @ 1:1-6" - - "'aleo2qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" - - "'bleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" diff --git a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out deleted file mode 100644 index c0fc912fd4..0000000000 --- a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out +++ /dev/null @@ -1,13 +0,0 @@ ---- -namespace: Token -expectation: Fail -outputs: - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'" - - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'" - - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'" diff --git a/tests/expectations/parser/parser/expression/literal/address_parse.leo.out b/tests/expectations/parser/parser/expression/literal/address_parse.leo.out deleted file mode 100644 index ce2e019189..0000000000 --- a/tests/expectations/parser/parser/expression/literal/address_parse.leo.out +++ /dev/null @@ -1,40 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Address: - - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 64 - path: test - content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 - - Value: - Address: - - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9 - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 64 - path: test - content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9 - - Value: - Address: - - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9 - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 64 - path: test - content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9 - - Value: - Address: - - aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 64 - path: test - content: aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st diff --git a/tests/expectations/parser/parser/expression/literal/bool.leo.out b/tests/expectations/parser/parser/expression/literal/bool.leo.out deleted file mode 100644 index 9222f3dd49..0000000000 --- a/tests/expectations/parser/parser/expression/literal/bool.leo.out +++ /dev/null @@ -1,12 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'true' @ 1:1-5" - - "'True' @ 1:1-5" - - "'TRUE' @ 1:1-5" - - "'truE' @ 1:1-5" - - "'false' @ 1:1-6" - - "'False' @ 1:1-6" - - "'FALSE' @ 1:1-6" - - "'falsE' @ 1:1-6" diff --git a/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out b/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out deleted file mode 100644 index 85b9453e0b..0000000000 --- a/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out +++ /dev/null @@ -1,22 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "true" - - Value: - Boolean: - - "false" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "false" diff --git a/tests/expectations/parser/parser/expression/literal/comment.leo.out b/tests/expectations/parser/parser/expression/literal/comment.leo.out deleted file mode 100644 index 9f4cc8a518..0000000000 --- a/tests/expectations/parser/parser/expression/literal/comment.leo.out +++ /dev/null @@ -1,22 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'// test1' @ 1:1-9" - - "'// test2' @ 1:1-9" - - "'//test3' @ 1:1-8" - - "'/' @ 1:1-2,'/' @ 1:3-4,'test4' @ 1:5-10" - - "'/* test5 */' @ 1:1-12" - - "'/*' @ 1:1-3" - - "'test' @ 1:1-5,'6' @ 1:6-7,'*' @ 1:8-9,'/' @ 1:9-10" - - "'/* test 7' @ 1:1-10" - - "'*' @ 1:1-2,'/' @ 1:2-3" - - "'/*test8 */' @ 1:1-11" - - "'/* test9*/' @ 1:1-11" - - "'/*test10*/' @ 1:1-11" - - "'/*/**/' @ 1:1-7" - - "'/**/' @ 1:1-5" - - "'/*//*/' @ 1:1-7" - - "'/** /*/' @ 1:1-8" - - "'/** **/' @ 1:1-8" - - "'/*' @ 1:1-3" diff --git a/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out b/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out deleted file mode 100644 index 47fddf9292..0000000000 --- a/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out +++ /dev/null @@ -1,24 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'\"{}\"' @ 1:1-5" - - "'\" {} \"' @ 1:1-7" - - "'\"{}d\"' @ 1:1-6" - - "'\"{}D\"' @ 1:1-6" - - "'\"d{}\"' @ 1:1-6" - - "'\"D{}\"' @ 1:1-6" - - "'\"D{}D\"' @ 1:1-7" - - "'\"{}{}\"' @ 1:1-7" - - "'\"D{}{}D\"' @ 1:1-9" - - "'\"D{}{}\"' @ 1:1-8" - - "'\"{}{}D\"' @ 1:1-8" - - "'\"D{}D{}D\"' @ 1:1-10" - - "'\"{{}}\"' @ 1:1-7" - - "'\"}}\"' @ 1:1-5" - - "'\"{{\"' @ 1:1-5" - - "'\"}}{{\"' @ 1:1-7" - - "'\"{{}\"' @ 1:1-6" - - "'\"{}}\"' @ 1:1-6" - - "'\"{\"' @ 1:1-4" - - "'\"}\"' @ 1:1-4" diff --git a/tests/expectations/parser/parser/expression/literal/group.leo.out b/tests/expectations/parser/parser/expression/literal/group.leo.out deleted file mode 100644 index 2a4389526e..0000000000 --- a/tests/expectations/parser/parser/expression/literal/group.leo.out +++ /dev/null @@ -1,648 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Group: - Tuple: - x: SignHigh - y: Inferred - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(+, _)group" - - Value: - Group: - Tuple: - x: Inferred - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(_, -)group" - - Value: - Group: - Tuple: - x: SignHigh - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(+, -)group" - - Value: - Group: - Tuple: - x: SignLow - y: SignHigh - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(-, +)group" - - Value: - Group: - Tuple: - x: SignHigh - y: SignHigh - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(+, +)group" - - Value: - Group: - Tuple: - x: SignLow - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(-, -)group" - - Value: - Group: - Tuple: - x: Inferred - y: Inferred - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(_, _)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123,-456)group" - y: - Number: - - "-456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123,-456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123,-456)group" - - Value: - Group: - Tuple: - x: - Number: - - "-123" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "(-123,456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(-123,456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(-123,456)group" - - Value: - Group: - Tuple: - x: - Number: - - "-123" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "(-123,456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(-123,456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(-123,456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, _)group" - y: Inferred - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, _)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, -)group" - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, -)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, -)group" - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, -)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, +)group" - y: SignHigh - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, +)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, +)group" - y: SignHigh - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, +)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, -)group" - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, -)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, _)group" - y: Inferred - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, _)group" - - Value: - Group: - Tuple: - x: SignHigh - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(+, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(+, 345)group" - - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(_, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(_, 345)group" - - Value: - Group: - Tuple: - x: SignHigh - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(+, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(+, 345)group" - - Value: - Group: - Tuple: - x: SignLow - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(-, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(-, 345)group" - - Value: - Group: - Tuple: - x: SignHigh - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(+, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(+, 345)group" - - Value: - Group: - Tuple: - x: SignLow - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(-, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(-, 345)group" - - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(_, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(_, 345)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out deleted file mode 100644 index da65de24fa..0000000000 --- a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out +++ /dev/null @@ -1,13 +0,0 @@ ---- -namespace: ParseExpression -expectation: Fail -outputs: - - " --> test:1:1\n |\n 1 | group\n | ^^^^^\n |\n = expected 'expression', got 'group'" - - "did not consume all input: 'group' @ 1:3-8\n" - - "did not consume all input: 'group' @ 1:6-11\n" - - " --> test:1:2\n |\n 1 | (,)group\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | (+, -,)group\n | ^\n |\n = expected 'expression', got '+'" - - " --> test:1:2\n |\n 1 | (,+, -)group\n | ^\n |\n = expected 'expression', got ','" - - "did not consume all input: 'group' @ 1:6-11\n" - - "did not consume all input: 'group' @ 1:12-17\n" - - "did not consume all input: 'group' @ 1:15-20\n" diff --git a/tests/expectations/parser/parser/expression/literal/int.leo.out b/tests/expectations/parser/parser/expression/literal/int.leo.out deleted file mode 100644 index ccac03f213..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int.leo.out +++ /dev/null @@ -1,111 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'123' @ 1:1-4,'abc123' @ 1:4-10" - - "'123' @ 1:1-4,'abc' @ 1:4-7" - - "'123' @ 1:1-4" - - "'456' @ 1:1-4" - - "'123' @ 1:1-4,'456' @ 1:5-8" - - "'87377802873778028737780287377802873778028737780287377802873778028737780287377802' @ 1:1-81" - - "'8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802' @ 1:1-401" - - "'340130024' @ 1:1-10" - - "'158951116' @ 1:1-10" - - "'155529659' @ 1:1-10" - - "'642023166' @ 1:1-10" - - "'228481736' @ 1:1-10" - - "'469712960' @ 1:1-10" - - "'929437719' @ 1:1-10" - - "'721072814' @ 1:1-10" - - "'363254789' @ 1:1-10" - - "'906732565' @ 1:1-10" - - "'288246391' @ 1:1-10" - - "'724940549' @ 1:1-10" - - "'487101620' @ 1:1-10" - - "'261373583' @ 1:1-10" - - "'891163927' @ 1:1-10" - - "'743967544' @ 1:1-10" - - "'8372586' @ 1:1-8" - - "'461793278' @ 1:1-10" - - "'806307045' @ 1:1-10" - - "'122764546' @ 1:1-10" - - "'356336181' @ 1:1-10" - - "'158370903' @ 1:1-10" - - "'774460877' @ 1:1-10" - - "'557174131' @ 1:1-10" - - "'492401267' @ 1:1-10" - - "'893445620' @ 1:1-10" - - "'957757048' @ 1:1-10" - - "'721540649' @ 1:1-10" - - "'390746493' @ 1:1-10" - - "'211251725' @ 1:1-10" - - "'938266114' @ 1:1-10" - - "'156985870' @ 1:1-10" - - "'703831126' @ 1:1-10" - - "'729964155' @ 1:1-10" - - "'988151305' @ 1:1-10" - - "'320872435' @ 1:1-10" - - "'719287167' @ 1:1-10" - - "'152289486' @ 1:1-10" - - "'740067975' @ 1:1-10" - - "'728627816' @ 1:1-10" - - "'385008978' @ 1:1-10" - - "'553967635' @ 1:1-10" - - "'71980713' @ 1:1-9" - - "'519444716' @ 1:1-10" - - "'116499965' @ 1:1-10" - - "'717422268' @ 1:1-10" - - "'18966279' @ 1:1-9" - - "'22458638' @ 1:1-9" - - "'857282620' @ 1:1-10" - - "'920675898' @ 1:1-10" - - "'762235516' @ 1:1-10" - - "'469018377' @ 1:1-10" - - "'199986521' @ 1:1-10" - - "'536679358' @ 1:1-10" - - "'591399452' @ 1:1-10" - - "'83083158' @ 1:1-9" - - "'599449051' @ 1:1-10" - - "'445442318' @ 1:1-10" - - "'585486590' @ 1:1-10" - - "'209278800' @ 1:1-10" - - "'873568117' @ 1:1-10" - - "'664470940' @ 1:1-10" - - "'465262783' @ 1:1-10" - - "'605652874' @ 1:1-10" - - "'376803940' @ 1:1-10" - - "'965247040' @ 1:1-10" - - "'598474509' @ 1:1-10" - - "'845119918' @ 1:1-10" - - "'648159133' @ 1:1-10" - - "'669051032' @ 1:1-10" - - "'800600261' @ 1:1-10" - - "'434689764' @ 1:1-10" - - "'520060080' @ 1:1-10" - - "'804659385' @ 1:1-10" - - "'537828058' @ 1:1-10" - - "'716600292' @ 1:1-10" - - "'387020273' @ 1:1-10" - - "'199375617' @ 1:1-10" - - "'680337189' @ 1:1-10" - - "'818479931' @ 1:1-10" - - "'893693281' @ 1:1-10" - - "'87377802' @ 1:1-9" - - "'84699261' @ 1:1-9" - - "'292826090' @ 1:1-10" - - "'569171405' @ 1:1-10" - - "'387436237' @ 1:1-10" - - "'150682190' @ 1:1-10" - - "'888770419' @ 1:1-10" - - "'824696431' @ 1:1-10" - - "'765659803' @ 1:1-10" - - "'270163693' @ 1:1-10" - - "'427940240' @ 1:1-10" - - "'504997332' @ 1:1-10" - - "'337808338' @ 1:1-10" - - "'907200008' @ 1:1-10" - - "'757177889' @ 1:1-10" - - "'696697188' @ 1:1-10" - - "'41376051' @ 1:1-9" - - "'496293518' @ 1:1-10" - - "'251218820' @ 1:1-10" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out deleted file mode 100644 index c7f5f3576f..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out +++ /dev/null @@ -1,949 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Field: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: 123field - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Field: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: 456field - - Value: - Field: - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 86 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802field - - Value: - Field: - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 406 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802field - - Value: - Field: - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 340130024field - - Value: - Field: - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 158951116field - - Value: - Field: - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 155529659field - - Value: - Field: - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 642023166field - - Value: - Field: - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 228481736field - - Value: - Field: - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 469712960field - - Value: - Field: - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 929437719field - - Value: - Field: - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 721072814field - - Value: - Field: - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 363254789field - - Value: - Field: - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 906732565field - - Value: - Field: - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 288246391field - - Value: - Field: - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 724940549field - - Value: - Field: - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 487101620field - - Value: - Field: - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 261373583field - - Value: - Field: - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 891163927field - - Value: - Field: - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 743967544field - - Value: - Field: - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 8372586field - - Value: - Field: - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 461793278field - - Value: - Field: - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 806307045field - - Value: - Field: - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 122764546field - - Value: - Field: - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 356336181field - - Value: - Field: - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 158370903field - - Value: - Field: - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 774460877field - - Value: - Field: - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 557174131field - - Value: - Field: - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 492401267field - - Value: - Field: - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 893445620field - - Value: - Field: - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 957757048field - - Value: - Field: - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 721540649field - - Value: - Field: - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 390746493field - - Value: - Field: - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 211251725field - - Value: - Field: - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 938266114field - - Value: - Field: - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 156985870field - - Value: - Field: - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 703831126field - - Value: - Field: - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 729964155field - - Value: - Field: - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 988151305field - - Value: - Field: - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 320872435field - - Value: - Field: - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 719287167field - - Value: - Field: - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 152289486field - - Value: - Field: - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 740067975field - - Value: - Field: - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 728627816field - - Value: - Field: - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 385008978field - - Value: - Field: - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 553967635field - - Value: - Field: - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 71980713field - - Value: - Field: - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 519444716field - - Value: - Field: - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 116499965field - - Value: - Field: - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 717422268field - - Value: - Field: - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 18966279field - - Value: - Field: - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 22458638field - - Value: - Field: - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 857282620field - - Value: - Field: - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 920675898field - - Value: - Field: - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 762235516field - - Value: - Field: - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 469018377field - - Value: - Field: - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 199986521field - - Value: - Field: - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 536679358field - - Value: - Field: - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 591399452field - - Value: - Field: - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 83083158field - - Value: - Field: - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 599449051field - - Value: - Field: - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 445442318field - - Value: - Field: - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 585486590field - - Value: - Field: - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 209278800field - - Value: - Field: - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 873568117field - - Value: - Field: - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 664470940field - - Value: - Field: - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 465262783field - - Value: - Field: - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 605652874field - - Value: - Field: - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 376803940field - - Value: - Field: - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 965247040field - - Value: - Field: - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 598474509field - - Value: - Field: - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 845119918field - - Value: - Field: - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 648159133field - - Value: - Field: - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 669051032field - - Value: - Field: - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 800600261field - - Value: - Field: - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 434689764field - - Value: - Field: - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 520060080field - - Value: - Field: - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 804659385field - - Value: - Field: - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 537828058field - - Value: - Field: - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 716600292field - - Value: - Field: - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 387020273field - - Value: - Field: - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 199375617field - - Value: - Field: - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 680337189field - - Value: - Field: - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 818479931field - - Value: - Field: - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 893693281field - - Value: - Field: - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 87377802field - - Value: - Field: - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 84699261field - - Value: - Field: - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 292826090field - - Value: - Field: - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 569171405field - - Value: - Field: - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 387436237field - - Value: - Field: - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 150682190field - - Value: - Field: - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 888770419field - - Value: - Field: - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 824696431field - - Value: - Field: - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 765659803field - - Value: - Field: - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 270163693field - - Value: - Field: - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 427940240field - - Value: - Field: - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 504997332field - - Value: - Field: - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 337808338field - - Value: - Field: - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 907200008field - - Value: - Field: - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 757177889field - - Value: - Field: - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 696697188field - - Value: - Field: - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 41376051field - - Value: - Field: - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 496293518field - - Value: - Field: - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 251218820field diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out deleted file mode 100644 index f0d886348f..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I128 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 123i128 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I128 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 456i128 - - Value: - Integer: - - I128 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 85 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i128 - - Value: - Integer: - - I128 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 405 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i128 - - Value: - Integer: - - I128 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 340130024i128 - - Value: - Integer: - - I128 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 158951116i128 - - Value: - Integer: - - I128 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 155529659i128 - - Value: - Integer: - - I128 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 642023166i128 - - Value: - Integer: - - I128 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 228481736i128 - - Value: - Integer: - - I128 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 469712960i128 - - Value: - Integer: - - I128 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 929437719i128 - - Value: - Integer: - - I128 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 721072814i128 - - Value: - Integer: - - I128 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 363254789i128 - - Value: - Integer: - - I128 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 906732565i128 - - Value: - Integer: - - I128 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 288246391i128 - - Value: - Integer: - - I128 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 724940549i128 - - Value: - Integer: - - I128 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 487101620i128 - - Value: - Integer: - - I128 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 261373583i128 - - Value: - Integer: - - I128 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 891163927i128 - - Value: - Integer: - - I128 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 743967544i128 - - Value: - Integer: - - I128 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 8372586i128 - - Value: - Integer: - - I128 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 461793278i128 - - Value: - Integer: - - I128 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 806307045i128 - - Value: - Integer: - - I128 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 122764546i128 - - Value: - Integer: - - I128 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 356336181i128 - - Value: - Integer: - - I128 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 158370903i128 - - Value: - Integer: - - I128 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 774460877i128 - - Value: - Integer: - - I128 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 557174131i128 - - Value: - Integer: - - I128 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 492401267i128 - - Value: - Integer: - - I128 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 893445620i128 - - Value: - Integer: - - I128 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 957757048i128 - - Value: - Integer: - - I128 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 721540649i128 - - Value: - Integer: - - I128 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 390746493i128 - - Value: - Integer: - - I128 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 211251725i128 - - Value: - Integer: - - I128 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 938266114i128 - - Value: - Integer: - - I128 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 156985870i128 - - Value: - Integer: - - I128 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 703831126i128 - - Value: - Integer: - - I128 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 729964155i128 - - Value: - Integer: - - I128 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 988151305i128 - - Value: - Integer: - - I128 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 320872435i128 - - Value: - Integer: - - I128 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 719287167i128 - - Value: - Integer: - - I128 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 152289486i128 - - Value: - Integer: - - I128 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 740067975i128 - - Value: - Integer: - - I128 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 728627816i128 - - Value: - Integer: - - I128 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 385008978i128 - - Value: - Integer: - - I128 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 553967635i128 - - Value: - Integer: - - I128 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 71980713i128 - - Value: - Integer: - - I128 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 519444716i128 - - Value: - Integer: - - I128 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 116499965i128 - - Value: - Integer: - - I128 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 717422268i128 - - Value: - Integer: - - I128 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 18966279i128 - - Value: - Integer: - - I128 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 22458638i128 - - Value: - Integer: - - I128 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 857282620i128 - - Value: - Integer: - - I128 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 920675898i128 - - Value: - Integer: - - I128 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 762235516i128 - - Value: - Integer: - - I128 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 469018377i128 - - Value: - Integer: - - I128 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 199986521i128 - - Value: - Integer: - - I128 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 536679358i128 - - Value: - Integer: - - I128 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 591399452i128 - - Value: - Integer: - - I128 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 83083158i128 - - Value: - Integer: - - I128 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 599449051i128 - - Value: - Integer: - - I128 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 445442318i128 - - Value: - Integer: - - I128 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 585486590i128 - - Value: - Integer: - - I128 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 209278800i128 - - Value: - Integer: - - I128 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 873568117i128 - - Value: - Integer: - - I128 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 664470940i128 - - Value: - Integer: - - I128 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 465262783i128 - - Value: - Integer: - - I128 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 605652874i128 - - Value: - Integer: - - I128 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 376803940i128 - - Value: - Integer: - - I128 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 965247040i128 - - Value: - Integer: - - I128 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 598474509i128 - - Value: - Integer: - - I128 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 845119918i128 - - Value: - Integer: - - I128 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 648159133i128 - - Value: - Integer: - - I128 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 669051032i128 - - Value: - Integer: - - I128 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 800600261i128 - - Value: - Integer: - - I128 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 434689764i128 - - Value: - Integer: - - I128 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 520060080i128 - - Value: - Integer: - - I128 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 804659385i128 - - Value: - Integer: - - I128 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 537828058i128 - - Value: - Integer: - - I128 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 716600292i128 - - Value: - Integer: - - I128 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 387020273i128 - - Value: - Integer: - - I128 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 199375617i128 - - Value: - Integer: - - I128 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 680337189i128 - - Value: - Integer: - - I128 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 818479931i128 - - Value: - Integer: - - I128 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 893693281i128 - - Value: - Integer: - - I128 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 87377802i128 - - Value: - Integer: - - I128 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 84699261i128 - - Value: - Integer: - - I128 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 292826090i128 - - Value: - Integer: - - I128 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 569171405i128 - - Value: - Integer: - - I128 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 387436237i128 - - Value: - Integer: - - I128 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 150682190i128 - - Value: - Integer: - - I128 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 888770419i128 - - Value: - Integer: - - I128 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 824696431i128 - - Value: - Integer: - - I128 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 765659803i128 - - Value: - Integer: - - I128 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 270163693i128 - - Value: - Integer: - - I128 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 427940240i128 - - Value: - Integer: - - I128 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 504997332i128 - - Value: - Integer: - - I128 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 337808338i128 - - Value: - Integer: - - I128 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 907200008i128 - - Value: - Integer: - - I128 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 757177889i128 - - Value: - Integer: - - I128 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 696697188i128 - - Value: - Integer: - - I128 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 41376051i128 - - Value: - Integer: - - I128 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 496293518i128 - - Value: - Integer: - - I128 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 251218820i128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out deleted file mode 100644 index 82a8fc8b1b..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I16 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123i16 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I16 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456i16 - - Value: - Integer: - - I16 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i16 - - Value: - Integer: - - I16 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i16 - - Value: - Integer: - - I16 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024i16 - - Value: - Integer: - - I16 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116i16 - - Value: - Integer: - - I16 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659i16 - - Value: - Integer: - - I16 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166i16 - - Value: - Integer: - - I16 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736i16 - - Value: - Integer: - - I16 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960i16 - - Value: - Integer: - - I16 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719i16 - - Value: - Integer: - - I16 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814i16 - - Value: - Integer: - - I16 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789i16 - - Value: - Integer: - - I16 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565i16 - - Value: - Integer: - - I16 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391i16 - - Value: - Integer: - - I16 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549i16 - - Value: - Integer: - - I16 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620i16 - - Value: - Integer: - - I16 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583i16 - - Value: - Integer: - - I16 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927i16 - - Value: - Integer: - - I16 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544i16 - - Value: - Integer: - - I16 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586i16 - - Value: - Integer: - - I16 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278i16 - - Value: - Integer: - - I16 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045i16 - - Value: - Integer: - - I16 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546i16 - - Value: - Integer: - - I16 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181i16 - - Value: - Integer: - - I16 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903i16 - - Value: - Integer: - - I16 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877i16 - - Value: - Integer: - - I16 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131i16 - - Value: - Integer: - - I16 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267i16 - - Value: - Integer: - - I16 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620i16 - - Value: - Integer: - - I16 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048i16 - - Value: - Integer: - - I16 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649i16 - - Value: - Integer: - - I16 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493i16 - - Value: - Integer: - - I16 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725i16 - - Value: - Integer: - - I16 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114i16 - - Value: - Integer: - - I16 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870i16 - - Value: - Integer: - - I16 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126i16 - - Value: - Integer: - - I16 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155i16 - - Value: - Integer: - - I16 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305i16 - - Value: - Integer: - - I16 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435i16 - - Value: - Integer: - - I16 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167i16 - - Value: - Integer: - - I16 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486i16 - - Value: - Integer: - - I16 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975i16 - - Value: - Integer: - - I16 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816i16 - - Value: - Integer: - - I16 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978i16 - - Value: - Integer: - - I16 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635i16 - - Value: - Integer: - - I16 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713i16 - - Value: - Integer: - - I16 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716i16 - - Value: - Integer: - - I16 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965i16 - - Value: - Integer: - - I16 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268i16 - - Value: - Integer: - - I16 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279i16 - - Value: - Integer: - - I16 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638i16 - - Value: - Integer: - - I16 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620i16 - - Value: - Integer: - - I16 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898i16 - - Value: - Integer: - - I16 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516i16 - - Value: - Integer: - - I16 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377i16 - - Value: - Integer: - - I16 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521i16 - - Value: - Integer: - - I16 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358i16 - - Value: - Integer: - - I16 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452i16 - - Value: - Integer: - - I16 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158i16 - - Value: - Integer: - - I16 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051i16 - - Value: - Integer: - - I16 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318i16 - - Value: - Integer: - - I16 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590i16 - - Value: - Integer: - - I16 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800i16 - - Value: - Integer: - - I16 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117i16 - - Value: - Integer: - - I16 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940i16 - - Value: - Integer: - - I16 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783i16 - - Value: - Integer: - - I16 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874i16 - - Value: - Integer: - - I16 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940i16 - - Value: - Integer: - - I16 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040i16 - - Value: - Integer: - - I16 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509i16 - - Value: - Integer: - - I16 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918i16 - - Value: - Integer: - - I16 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133i16 - - Value: - Integer: - - I16 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032i16 - - Value: - Integer: - - I16 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261i16 - - Value: - Integer: - - I16 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764i16 - - Value: - Integer: - - I16 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080i16 - - Value: - Integer: - - I16 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385i16 - - Value: - Integer: - - I16 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058i16 - - Value: - Integer: - - I16 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292i16 - - Value: - Integer: - - I16 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273i16 - - Value: - Integer: - - I16 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617i16 - - Value: - Integer: - - I16 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189i16 - - Value: - Integer: - - I16 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931i16 - - Value: - Integer: - - I16 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281i16 - - Value: - Integer: - - I16 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802i16 - - Value: - Integer: - - I16 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261i16 - - Value: - Integer: - - I16 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090i16 - - Value: - Integer: - - I16 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405i16 - - Value: - Integer: - - I16 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237i16 - - Value: - Integer: - - I16 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190i16 - - Value: - Integer: - - I16 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419i16 - - Value: - Integer: - - I16 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431i16 - - Value: - Integer: - - I16 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803i16 - - Value: - Integer: - - I16 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693i16 - - Value: - Integer: - - I16 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240i16 - - Value: - Integer: - - I16 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332i16 - - Value: - Integer: - - I16 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338i16 - - Value: - Integer: - - I16 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008i16 - - Value: - Integer: - - I16 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889i16 - - Value: - Integer: - - I16 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188i16 - - Value: - Integer: - - I16 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051i16 - - Value: - Integer: - - I16 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518i16 - - Value: - Integer: - - I16 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820i16 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out deleted file mode 100644 index 82d66bdbf5..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I32 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123i32 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I32 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456i32 - - Value: - Integer: - - I32 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i32 - - Value: - Integer: - - I32 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i32 - - Value: - Integer: - - I32 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024i32 - - Value: - Integer: - - I32 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116i32 - - Value: - Integer: - - I32 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659i32 - - Value: - Integer: - - I32 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166i32 - - Value: - Integer: - - I32 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736i32 - - Value: - Integer: - - I32 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960i32 - - Value: - Integer: - - I32 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719i32 - - Value: - Integer: - - I32 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814i32 - - Value: - Integer: - - I32 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789i32 - - Value: - Integer: - - I32 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565i32 - - Value: - Integer: - - I32 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391i32 - - Value: - Integer: - - I32 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549i32 - - Value: - Integer: - - I32 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620i32 - - Value: - Integer: - - I32 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583i32 - - Value: - Integer: - - I32 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927i32 - - Value: - Integer: - - I32 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544i32 - - Value: - Integer: - - I32 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586i32 - - Value: - Integer: - - I32 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278i32 - - Value: - Integer: - - I32 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045i32 - - Value: - Integer: - - I32 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546i32 - - Value: - Integer: - - I32 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181i32 - - Value: - Integer: - - I32 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903i32 - - Value: - Integer: - - I32 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877i32 - - Value: - Integer: - - I32 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131i32 - - Value: - Integer: - - I32 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267i32 - - Value: - Integer: - - I32 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620i32 - - Value: - Integer: - - I32 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048i32 - - Value: - Integer: - - I32 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649i32 - - Value: - Integer: - - I32 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493i32 - - Value: - Integer: - - I32 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725i32 - - Value: - Integer: - - I32 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114i32 - - Value: - Integer: - - I32 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870i32 - - Value: - Integer: - - I32 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126i32 - - Value: - Integer: - - I32 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155i32 - - Value: - Integer: - - I32 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305i32 - - Value: - Integer: - - I32 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435i32 - - Value: - Integer: - - I32 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167i32 - - Value: - Integer: - - I32 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486i32 - - Value: - Integer: - - I32 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975i32 - - Value: - Integer: - - I32 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816i32 - - Value: - Integer: - - I32 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978i32 - - Value: - Integer: - - I32 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635i32 - - Value: - Integer: - - I32 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713i32 - - Value: - Integer: - - I32 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716i32 - - Value: - Integer: - - I32 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965i32 - - Value: - Integer: - - I32 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268i32 - - Value: - Integer: - - I32 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279i32 - - Value: - Integer: - - I32 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638i32 - - Value: - Integer: - - I32 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620i32 - - Value: - Integer: - - I32 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898i32 - - Value: - Integer: - - I32 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516i32 - - Value: - Integer: - - I32 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377i32 - - Value: - Integer: - - I32 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521i32 - - Value: - Integer: - - I32 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358i32 - - Value: - Integer: - - I32 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452i32 - - Value: - Integer: - - I32 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158i32 - - Value: - Integer: - - I32 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051i32 - - Value: - Integer: - - I32 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318i32 - - Value: - Integer: - - I32 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590i32 - - Value: - Integer: - - I32 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800i32 - - Value: - Integer: - - I32 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117i32 - - Value: - Integer: - - I32 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940i32 - - Value: - Integer: - - I32 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783i32 - - Value: - Integer: - - I32 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874i32 - - Value: - Integer: - - I32 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940i32 - - Value: - Integer: - - I32 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040i32 - - Value: - Integer: - - I32 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509i32 - - Value: - Integer: - - I32 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918i32 - - Value: - Integer: - - I32 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133i32 - - Value: - Integer: - - I32 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032i32 - - Value: - Integer: - - I32 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261i32 - - Value: - Integer: - - I32 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764i32 - - Value: - Integer: - - I32 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080i32 - - Value: - Integer: - - I32 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385i32 - - Value: - Integer: - - I32 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058i32 - - Value: - Integer: - - I32 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292i32 - - Value: - Integer: - - I32 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273i32 - - Value: - Integer: - - I32 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617i32 - - Value: - Integer: - - I32 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189i32 - - Value: - Integer: - - I32 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931i32 - - Value: - Integer: - - I32 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281i32 - - Value: - Integer: - - I32 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802i32 - - Value: - Integer: - - I32 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261i32 - - Value: - Integer: - - I32 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090i32 - - Value: - Integer: - - I32 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405i32 - - Value: - Integer: - - I32 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237i32 - - Value: - Integer: - - I32 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190i32 - - Value: - Integer: - - I32 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419i32 - - Value: - Integer: - - I32 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431i32 - - Value: - Integer: - - I32 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803i32 - - Value: - Integer: - - I32 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693i32 - - Value: - Integer: - - I32 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240i32 - - Value: - Integer: - - I32 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332i32 - - Value: - Integer: - - I32 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338i32 - - Value: - Integer: - - I32 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008i32 - - Value: - Integer: - - I32 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889i32 - - Value: - Integer: - - I32 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188i32 - - Value: - Integer: - - I32 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051i32 - - Value: - Integer: - - I32 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518i32 - - Value: - Integer: - - I32 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820i32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out deleted file mode 100644 index 24949c2f99..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I64 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123i64 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I64 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456i64 - - Value: - Integer: - - I64 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i64 - - Value: - Integer: - - I64 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i64 - - Value: - Integer: - - I64 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024i64 - - Value: - Integer: - - I64 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116i64 - - Value: - Integer: - - I64 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659i64 - - Value: - Integer: - - I64 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166i64 - - Value: - Integer: - - I64 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736i64 - - Value: - Integer: - - I64 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960i64 - - Value: - Integer: - - I64 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719i64 - - Value: - Integer: - - I64 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814i64 - - Value: - Integer: - - I64 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789i64 - - Value: - Integer: - - I64 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565i64 - - Value: - Integer: - - I64 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391i64 - - Value: - Integer: - - I64 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549i64 - - Value: - Integer: - - I64 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620i64 - - Value: - Integer: - - I64 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583i64 - - Value: - Integer: - - I64 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927i64 - - Value: - Integer: - - I64 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544i64 - - Value: - Integer: - - I64 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586i64 - - Value: - Integer: - - I64 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278i64 - - Value: - Integer: - - I64 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045i64 - - Value: - Integer: - - I64 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546i64 - - Value: - Integer: - - I64 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181i64 - - Value: - Integer: - - I64 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903i64 - - Value: - Integer: - - I64 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877i64 - - Value: - Integer: - - I64 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131i64 - - Value: - Integer: - - I64 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267i64 - - Value: - Integer: - - I64 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620i64 - - Value: - Integer: - - I64 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048i64 - - Value: - Integer: - - I64 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649i64 - - Value: - Integer: - - I64 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493i64 - - Value: - Integer: - - I64 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725i64 - - Value: - Integer: - - I64 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114i64 - - Value: - Integer: - - I64 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870i64 - - Value: - Integer: - - I64 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126i64 - - Value: - Integer: - - I64 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155i64 - - Value: - Integer: - - I64 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305i64 - - Value: - Integer: - - I64 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435i64 - - Value: - Integer: - - I64 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167i64 - - Value: - Integer: - - I64 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486i64 - - Value: - Integer: - - I64 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975i64 - - Value: - Integer: - - I64 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816i64 - - Value: - Integer: - - I64 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978i64 - - Value: - Integer: - - I64 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635i64 - - Value: - Integer: - - I64 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713i64 - - Value: - Integer: - - I64 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716i64 - - Value: - Integer: - - I64 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965i64 - - Value: - Integer: - - I64 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268i64 - - Value: - Integer: - - I64 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279i64 - - Value: - Integer: - - I64 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638i64 - - Value: - Integer: - - I64 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620i64 - - Value: - Integer: - - I64 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898i64 - - Value: - Integer: - - I64 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516i64 - - Value: - Integer: - - I64 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377i64 - - Value: - Integer: - - I64 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521i64 - - Value: - Integer: - - I64 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358i64 - - Value: - Integer: - - I64 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452i64 - - Value: - Integer: - - I64 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158i64 - - Value: - Integer: - - I64 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051i64 - - Value: - Integer: - - I64 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318i64 - - Value: - Integer: - - I64 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590i64 - - Value: - Integer: - - I64 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800i64 - - Value: - Integer: - - I64 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117i64 - - Value: - Integer: - - I64 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940i64 - - Value: - Integer: - - I64 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783i64 - - Value: - Integer: - - I64 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874i64 - - Value: - Integer: - - I64 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940i64 - - Value: - Integer: - - I64 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040i64 - - Value: - Integer: - - I64 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509i64 - - Value: - Integer: - - I64 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918i64 - - Value: - Integer: - - I64 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133i64 - - Value: - Integer: - - I64 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032i64 - - Value: - Integer: - - I64 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261i64 - - Value: - Integer: - - I64 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764i64 - - Value: - Integer: - - I64 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080i64 - - Value: - Integer: - - I64 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385i64 - - Value: - Integer: - - I64 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058i64 - - Value: - Integer: - - I64 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292i64 - - Value: - Integer: - - I64 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273i64 - - Value: - Integer: - - I64 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617i64 - - Value: - Integer: - - I64 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189i64 - - Value: - Integer: - - I64 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931i64 - - Value: - Integer: - - I64 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281i64 - - Value: - Integer: - - I64 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802i64 - - Value: - Integer: - - I64 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261i64 - - Value: - Integer: - - I64 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090i64 - - Value: - Integer: - - I64 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405i64 - - Value: - Integer: - - I64 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237i64 - - Value: - Integer: - - I64 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190i64 - - Value: - Integer: - - I64 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419i64 - - Value: - Integer: - - I64 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431i64 - - Value: - Integer: - - I64 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803i64 - - Value: - Integer: - - I64 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693i64 - - Value: - Integer: - - I64 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240i64 - - Value: - Integer: - - I64 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332i64 - - Value: - Integer: - - I64 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338i64 - - Value: - Integer: - - I64 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008i64 - - Value: - Integer: - - I64 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889i64 - - Value: - Integer: - - I64 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188i64 - - Value: - Integer: - - I64 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051i64 - - Value: - Integer: - - I64 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518i64 - - Value: - Integer: - - I64 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820i64 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out deleted file mode 100644 index 7b06304a6a..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I8 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 123i8 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I8 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 456i8 - - Value: - Integer: - - I8 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 83 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i8 - - Value: - Integer: - - I8 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 403 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i8 - - Value: - Integer: - - I8 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 340130024i8 - - Value: - Integer: - - I8 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158951116i8 - - Value: - Integer: - - I8 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 155529659i8 - - Value: - Integer: - - I8 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 642023166i8 - - Value: - Integer: - - I8 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 228481736i8 - - Value: - Integer: - - I8 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469712960i8 - - Value: - Integer: - - I8 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 929437719i8 - - Value: - Integer: - - I8 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721072814i8 - - Value: - Integer: - - I8 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 363254789i8 - - Value: - Integer: - - I8 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 906732565i8 - - Value: - Integer: - - I8 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 288246391i8 - - Value: - Integer: - - I8 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 724940549i8 - - Value: - Integer: - - I8 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 487101620i8 - - Value: - Integer: - - I8 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 261373583i8 - - Value: - Integer: - - I8 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 891163927i8 - - Value: - Integer: - - I8 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 743967544i8 - - Value: - Integer: - - I8 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 8372586i8 - - Value: - Integer: - - I8 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 461793278i8 - - Value: - Integer: - - I8 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 806307045i8 - - Value: - Integer: - - I8 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 122764546i8 - - Value: - Integer: - - I8 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 356336181i8 - - Value: - Integer: - - I8 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158370903i8 - - Value: - Integer: - - I8 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 774460877i8 - - Value: - Integer: - - I8 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 557174131i8 - - Value: - Integer: - - I8 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 492401267i8 - - Value: - Integer: - - I8 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893445620i8 - - Value: - Integer: - - I8 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 957757048i8 - - Value: - Integer: - - I8 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721540649i8 - - Value: - Integer: - - I8 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 390746493i8 - - Value: - Integer: - - I8 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 211251725i8 - - Value: - Integer: - - I8 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 938266114i8 - - Value: - Integer: - - I8 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 156985870i8 - - Value: - Integer: - - I8 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 703831126i8 - - Value: - Integer: - - I8 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 729964155i8 - - Value: - Integer: - - I8 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 988151305i8 - - Value: - Integer: - - I8 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 320872435i8 - - Value: - Integer: - - I8 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 719287167i8 - - Value: - Integer: - - I8 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 152289486i8 - - Value: - Integer: - - I8 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 740067975i8 - - Value: - Integer: - - I8 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 728627816i8 - - Value: - Integer: - - I8 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 385008978i8 - - Value: - Integer: - - I8 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 553967635i8 - - Value: - Integer: - - I8 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 71980713i8 - - Value: - Integer: - - I8 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 519444716i8 - - Value: - Integer: - - I8 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 116499965i8 - - Value: - Integer: - - I8 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 717422268i8 - - Value: - Integer: - - I8 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 18966279i8 - - Value: - Integer: - - I8 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 22458638i8 - - Value: - Integer: - - I8 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 857282620i8 - - Value: - Integer: - - I8 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 920675898i8 - - Value: - Integer: - - I8 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 762235516i8 - - Value: - Integer: - - I8 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469018377i8 - - Value: - Integer: - - I8 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199986521i8 - - Value: - Integer: - - I8 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 536679358i8 - - Value: - Integer: - - I8 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 591399452i8 - - Value: - Integer: - - I8 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 83083158i8 - - Value: - Integer: - - I8 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 599449051i8 - - Value: - Integer: - - I8 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 445442318i8 - - Value: - Integer: - - I8 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 585486590i8 - - Value: - Integer: - - I8 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 209278800i8 - - Value: - Integer: - - I8 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 873568117i8 - - Value: - Integer: - - I8 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 664470940i8 - - Value: - Integer: - - I8 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 465262783i8 - - Value: - Integer: - - I8 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 605652874i8 - - Value: - Integer: - - I8 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 376803940i8 - - Value: - Integer: - - I8 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 965247040i8 - - Value: - Integer: - - I8 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 598474509i8 - - Value: - Integer: - - I8 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 845119918i8 - - Value: - Integer: - - I8 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 648159133i8 - - Value: - Integer: - - I8 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 669051032i8 - - Value: - Integer: - - I8 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 800600261i8 - - Value: - Integer: - - I8 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 434689764i8 - - Value: - Integer: - - I8 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 520060080i8 - - Value: - Integer: - - I8 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 804659385i8 - - Value: - Integer: - - I8 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 537828058i8 - - Value: - Integer: - - I8 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 716600292i8 - - Value: - Integer: - - I8 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387020273i8 - - Value: - Integer: - - I8 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199375617i8 - - Value: - Integer: - - I8 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 680337189i8 - - Value: - Integer: - - I8 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 818479931i8 - - Value: - Integer: - - I8 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893693281i8 - - Value: - Integer: - - I8 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 87377802i8 - - Value: - Integer: - - I8 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 84699261i8 - - Value: - Integer: - - I8 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 292826090i8 - - Value: - Integer: - - I8 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 569171405i8 - - Value: - Integer: - - I8 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387436237i8 - - Value: - Integer: - - I8 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 150682190i8 - - Value: - Integer: - - I8 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 888770419i8 - - Value: - Integer: - - I8 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 824696431i8 - - Value: - Integer: - - I8 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 765659803i8 - - Value: - Integer: - - I8 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 270163693i8 - - Value: - Integer: - - I8 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 427940240i8 - - Value: - Integer: - - I8 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 504997332i8 - - Value: - Integer: - - I8 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 337808338i8 - - Value: - Integer: - - I8 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 907200008i8 - - Value: - Integer: - - I8 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 757177889i8 - - Value: - Integer: - - I8 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 696697188i8 - - Value: - Integer: - - I8 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 41376051i8 - - Value: - Integer: - - I8 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 496293518i8 - - Value: - Integer: - - I8 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 251218820i8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out deleted file mode 100644 index 43e759dcc6..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out +++ /dev/null @@ -1,949 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Implicit: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "456" - - Value: - Implicit: - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 81 - path: test - content: "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - Value: - Implicit: - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 401 - path: test - content: "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - Value: - Implicit: - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "340130024" - - Value: - Implicit: - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "158951116" - - Value: - Implicit: - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "155529659" - - Value: - Implicit: - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "642023166" - - Value: - Implicit: - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "228481736" - - Value: - Implicit: - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "469712960" - - Value: - Implicit: - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "929437719" - - Value: - Implicit: - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "721072814" - - Value: - Implicit: - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "363254789" - - Value: - Implicit: - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "906732565" - - Value: - Implicit: - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "288246391" - - Value: - Implicit: - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "724940549" - - Value: - Implicit: - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "487101620" - - Value: - Implicit: - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "261373583" - - Value: - Implicit: - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "891163927" - - Value: - Implicit: - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "743967544" - - Value: - Implicit: - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "8372586" - - Value: - Implicit: - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "461793278" - - Value: - Implicit: - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "806307045" - - Value: - Implicit: - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "122764546" - - Value: - Implicit: - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "356336181" - - Value: - Implicit: - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "158370903" - - Value: - Implicit: - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "774460877" - - Value: - Implicit: - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "557174131" - - Value: - Implicit: - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "492401267" - - Value: - Implicit: - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "893445620" - - Value: - Implicit: - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "957757048" - - Value: - Implicit: - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "721540649" - - Value: - Implicit: - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "390746493" - - Value: - Implicit: - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "211251725" - - Value: - Implicit: - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "938266114" - - Value: - Implicit: - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "156985870" - - Value: - Implicit: - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "703831126" - - Value: - Implicit: - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "729964155" - - Value: - Implicit: - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "988151305" - - Value: - Implicit: - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "320872435" - - Value: - Implicit: - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "719287167" - - Value: - Implicit: - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "152289486" - - Value: - Implicit: - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "740067975" - - Value: - Implicit: - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "728627816" - - Value: - Implicit: - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "385008978" - - Value: - Implicit: - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "553967635" - - Value: - Implicit: - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "71980713" - - Value: - Implicit: - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "519444716" - - Value: - Implicit: - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "116499965" - - Value: - Implicit: - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "717422268" - - Value: - Implicit: - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "18966279" - - Value: - Implicit: - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "22458638" - - Value: - Implicit: - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "857282620" - - Value: - Implicit: - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "920675898" - - Value: - Implicit: - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "762235516" - - Value: - Implicit: - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "469018377" - - Value: - Implicit: - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "199986521" - - Value: - Implicit: - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "536679358" - - Value: - Implicit: - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "591399452" - - Value: - Implicit: - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "83083158" - - Value: - Implicit: - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "599449051" - - Value: - Implicit: - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "445442318" - - Value: - Implicit: - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "585486590" - - Value: - Implicit: - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "209278800" - - Value: - Implicit: - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "873568117" - - Value: - Implicit: - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "664470940" - - Value: - Implicit: - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "465262783" - - Value: - Implicit: - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "605652874" - - Value: - Implicit: - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "376803940" - - Value: - Implicit: - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "965247040" - - Value: - Implicit: - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "598474509" - - Value: - Implicit: - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "845119918" - - Value: - Implicit: - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "648159133" - - Value: - Implicit: - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "669051032" - - Value: - Implicit: - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "800600261" - - Value: - Implicit: - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "434689764" - - Value: - Implicit: - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "520060080" - - Value: - Implicit: - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "804659385" - - Value: - Implicit: - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "537828058" - - Value: - Implicit: - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "716600292" - - Value: - Implicit: - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "387020273" - - Value: - Implicit: - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "199375617" - - Value: - Implicit: - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "680337189" - - Value: - Implicit: - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "818479931" - - Value: - Implicit: - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "893693281" - - Value: - Implicit: - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "87377802" - - Value: - Implicit: - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "84699261" - - Value: - Implicit: - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "292826090" - - Value: - Implicit: - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "569171405" - - Value: - Implicit: - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "387436237" - - Value: - Implicit: - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "150682190" - - Value: - Implicit: - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "888770419" - - Value: - Implicit: - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "824696431" - - Value: - Implicit: - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "765659803" - - Value: - Implicit: - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "270163693" - - Value: - Implicit: - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "427940240" - - Value: - Implicit: - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "504997332" - - Value: - Implicit: - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "337808338" - - Value: - Implicit: - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "907200008" - - Value: - Implicit: - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "757177889" - - Value: - Implicit: - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "696697188" - - Value: - Implicit: - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "41376051" - - Value: - Implicit: - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "496293518" - - Value: - Implicit: - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "251218820" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out deleted file mode 100644 index 9e959269ac..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Group: - Single: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: 123group - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Group: - Single: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: 456group - - Value: - Group: - Single: - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 86 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802group - - Value: - Group: - Single: - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 406 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802group - - Value: - Group: - Single: - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 340130024group - - Value: - Group: - Single: - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 158951116group - - Value: - Group: - Single: - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 155529659group - - Value: - Group: - Single: - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 642023166group - - Value: - Group: - Single: - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 228481736group - - Value: - Group: - Single: - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 469712960group - - Value: - Group: - Single: - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 929437719group - - Value: - Group: - Single: - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 721072814group - - Value: - Group: - Single: - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 363254789group - - Value: - Group: - Single: - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 906732565group - - Value: - Group: - Single: - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 288246391group - - Value: - Group: - Single: - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 724940549group - - Value: - Group: - Single: - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 487101620group - - Value: - Group: - Single: - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 261373583group - - Value: - Group: - Single: - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 891163927group - - Value: - Group: - Single: - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 743967544group - - Value: - Group: - Single: - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 8372586group - - Value: - Group: - Single: - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 461793278group - - Value: - Group: - Single: - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 806307045group - - Value: - Group: - Single: - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 122764546group - - Value: - Group: - Single: - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 356336181group - - Value: - Group: - Single: - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 158370903group - - Value: - Group: - Single: - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 774460877group - - Value: - Group: - Single: - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 557174131group - - Value: - Group: - Single: - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 492401267group - - Value: - Group: - Single: - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 893445620group - - Value: - Group: - Single: - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 957757048group - - Value: - Group: - Single: - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 721540649group - - Value: - Group: - Single: - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 390746493group - - Value: - Group: - Single: - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 211251725group - - Value: - Group: - Single: - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 938266114group - - Value: - Group: - Single: - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 156985870group - - Value: - Group: - Single: - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 703831126group - - Value: - Group: - Single: - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 729964155group - - Value: - Group: - Single: - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 988151305group - - Value: - Group: - Single: - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 320872435group - - Value: - Group: - Single: - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 719287167group - - Value: - Group: - Single: - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 152289486group - - Value: - Group: - Single: - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 740067975group - - Value: - Group: - Single: - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 728627816group - - Value: - Group: - Single: - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 385008978group - - Value: - Group: - Single: - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 553967635group - - Value: - Group: - Single: - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 71980713group - - Value: - Group: - Single: - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 519444716group - - Value: - Group: - Single: - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 116499965group - - Value: - Group: - Single: - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 717422268group - - Value: - Group: - Single: - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 18966279group - - Value: - Group: - Single: - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 22458638group - - Value: - Group: - Single: - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 857282620group - - Value: - Group: - Single: - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 920675898group - - Value: - Group: - Single: - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 762235516group - - Value: - Group: - Single: - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 469018377group - - Value: - Group: - Single: - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 199986521group - - Value: - Group: - Single: - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 536679358group - - Value: - Group: - Single: - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 591399452group - - Value: - Group: - Single: - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 83083158group - - Value: - Group: - Single: - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 599449051group - - Value: - Group: - Single: - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 445442318group - - Value: - Group: - Single: - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 585486590group - - Value: - Group: - Single: - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 209278800group - - Value: - Group: - Single: - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 873568117group - - Value: - Group: - Single: - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 664470940group - - Value: - Group: - Single: - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 465262783group - - Value: - Group: - Single: - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 605652874group - - Value: - Group: - Single: - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 376803940group - - Value: - Group: - Single: - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 965247040group - - Value: - Group: - Single: - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 598474509group - - Value: - Group: - Single: - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 845119918group - - Value: - Group: - Single: - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 648159133group - - Value: - Group: - Single: - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 669051032group - - Value: - Group: - Single: - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 800600261group - - Value: - Group: - Single: - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 434689764group - - Value: - Group: - Single: - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 520060080group - - Value: - Group: - Single: - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 804659385group - - Value: - Group: - Single: - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 537828058group - - Value: - Group: - Single: - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 716600292group - - Value: - Group: - Single: - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 387020273group - - Value: - Group: - Single: - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 199375617group - - Value: - Group: - Single: - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 680337189group - - Value: - Group: - Single: - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 818479931group - - Value: - Group: - Single: - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 893693281group - - Value: - Group: - Single: - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 87377802group - - Value: - Group: - Single: - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 84699261group - - Value: - Group: - Single: - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 292826090group - - Value: - Group: - Single: - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 569171405group - - Value: - Group: - Single: - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 387436237group - - Value: - Group: - Single: - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 150682190group - - Value: - Group: - Single: - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 888770419group - - Value: - Group: - Single: - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 824696431group - - Value: - Group: - Single: - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 765659803group - - Value: - Group: - Single: - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 270163693group - - Value: - Group: - Single: - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 427940240group - - Value: - Group: - Single: - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 504997332group - - Value: - Group: - Single: - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 337808338group - - Value: - Group: - Single: - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 907200008group - - Value: - Group: - Single: - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 757177889group - - Value: - Group: - Single: - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 696697188group - - Value: - Group: - Single: - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 41376051group - - Value: - Group: - Single: - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 496293518group - - Value: - Group: - Single: - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 251218820group diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out deleted file mode 100644 index f1048e6469..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U128 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 123u128 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U128 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 456u128 - - Value: - Integer: - - U128 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 85 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u128 - - Value: - Integer: - - U128 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 405 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u128 - - Value: - Integer: - - U128 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 340130024u128 - - Value: - Integer: - - U128 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 158951116u128 - - Value: - Integer: - - U128 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 155529659u128 - - Value: - Integer: - - U128 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 642023166u128 - - Value: - Integer: - - U128 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 228481736u128 - - Value: - Integer: - - U128 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 469712960u128 - - Value: - Integer: - - U128 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 929437719u128 - - Value: - Integer: - - U128 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 721072814u128 - - Value: - Integer: - - U128 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 363254789u128 - - Value: - Integer: - - U128 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 906732565u128 - - Value: - Integer: - - U128 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 288246391u128 - - Value: - Integer: - - U128 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 724940549u128 - - Value: - Integer: - - U128 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 487101620u128 - - Value: - Integer: - - U128 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 261373583u128 - - Value: - Integer: - - U128 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 891163927u128 - - Value: - Integer: - - U128 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 743967544u128 - - Value: - Integer: - - U128 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 8372586u128 - - Value: - Integer: - - U128 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 461793278u128 - - Value: - Integer: - - U128 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 806307045u128 - - Value: - Integer: - - U128 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 122764546u128 - - Value: - Integer: - - U128 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 356336181u128 - - Value: - Integer: - - U128 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 158370903u128 - - Value: - Integer: - - U128 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 774460877u128 - - Value: - Integer: - - U128 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 557174131u128 - - Value: - Integer: - - U128 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 492401267u128 - - Value: - Integer: - - U128 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 893445620u128 - - Value: - Integer: - - U128 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 957757048u128 - - Value: - Integer: - - U128 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 721540649u128 - - Value: - Integer: - - U128 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 390746493u128 - - Value: - Integer: - - U128 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 211251725u128 - - Value: - Integer: - - U128 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 938266114u128 - - Value: - Integer: - - U128 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 156985870u128 - - Value: - Integer: - - U128 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 703831126u128 - - Value: - Integer: - - U128 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 729964155u128 - - Value: - Integer: - - U128 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 988151305u128 - - Value: - Integer: - - U128 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 320872435u128 - - Value: - Integer: - - U128 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 719287167u128 - - Value: - Integer: - - U128 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 152289486u128 - - Value: - Integer: - - U128 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 740067975u128 - - Value: - Integer: - - U128 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 728627816u128 - - Value: - Integer: - - U128 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 385008978u128 - - Value: - Integer: - - U128 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 553967635u128 - - Value: - Integer: - - U128 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 71980713u128 - - Value: - Integer: - - U128 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 519444716u128 - - Value: - Integer: - - U128 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 116499965u128 - - Value: - Integer: - - U128 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 717422268u128 - - Value: - Integer: - - U128 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 18966279u128 - - Value: - Integer: - - U128 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 22458638u128 - - Value: - Integer: - - U128 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 857282620u128 - - Value: - Integer: - - U128 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 920675898u128 - - Value: - Integer: - - U128 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 762235516u128 - - Value: - Integer: - - U128 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 469018377u128 - - Value: - Integer: - - U128 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 199986521u128 - - Value: - Integer: - - U128 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 536679358u128 - - Value: - Integer: - - U128 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 591399452u128 - - Value: - Integer: - - U128 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 83083158u128 - - Value: - Integer: - - U128 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 599449051u128 - - Value: - Integer: - - U128 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 445442318u128 - - Value: - Integer: - - U128 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 585486590u128 - - Value: - Integer: - - U128 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 209278800u128 - - Value: - Integer: - - U128 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 873568117u128 - - Value: - Integer: - - U128 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 664470940u128 - - Value: - Integer: - - U128 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 465262783u128 - - Value: - Integer: - - U128 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 605652874u128 - - Value: - Integer: - - U128 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 376803940u128 - - Value: - Integer: - - U128 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 965247040u128 - - Value: - Integer: - - U128 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 598474509u128 - - Value: - Integer: - - U128 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 845119918u128 - - Value: - Integer: - - U128 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 648159133u128 - - Value: - Integer: - - U128 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 669051032u128 - - Value: - Integer: - - U128 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 800600261u128 - - Value: - Integer: - - U128 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 434689764u128 - - Value: - Integer: - - U128 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 520060080u128 - - Value: - Integer: - - U128 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 804659385u128 - - Value: - Integer: - - U128 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 537828058u128 - - Value: - Integer: - - U128 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 716600292u128 - - Value: - Integer: - - U128 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 387020273u128 - - Value: - Integer: - - U128 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 199375617u128 - - Value: - Integer: - - U128 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 680337189u128 - - Value: - Integer: - - U128 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 818479931u128 - - Value: - Integer: - - U128 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 893693281u128 - - Value: - Integer: - - U128 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 87377802u128 - - Value: - Integer: - - U128 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 84699261u128 - - Value: - Integer: - - U128 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 292826090u128 - - Value: - Integer: - - U128 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 569171405u128 - - Value: - Integer: - - U128 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 387436237u128 - - Value: - Integer: - - U128 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 150682190u128 - - Value: - Integer: - - U128 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 888770419u128 - - Value: - Integer: - - U128 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 824696431u128 - - Value: - Integer: - - U128 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 765659803u128 - - Value: - Integer: - - U128 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 270163693u128 - - Value: - Integer: - - U128 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 427940240u128 - - Value: - Integer: - - U128 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 504997332u128 - - Value: - Integer: - - U128 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 337808338u128 - - Value: - Integer: - - U128 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 907200008u128 - - Value: - Integer: - - U128 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 757177889u128 - - Value: - Integer: - - U128 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 696697188u128 - - Value: - Integer: - - U128 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 41376051u128 - - Value: - Integer: - - U128 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 496293518u128 - - Value: - Integer: - - U128 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 251218820u128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out deleted file mode 100644 index 324a0abcce..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U8 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 123u8 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U8 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 456u8 - - Value: - Integer: - - U8 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 83 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - - Value: - Integer: - - U8 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 403 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - - Value: - Integer: - - U8 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 340130024u8 - - Value: - Integer: - - U8 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158951116u8 - - Value: - Integer: - - U8 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 155529659u8 - - Value: - Integer: - - U8 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 642023166u8 - - Value: - Integer: - - U8 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 228481736u8 - - Value: - Integer: - - U8 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469712960u8 - - Value: - Integer: - - U8 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 929437719u8 - - Value: - Integer: - - U8 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721072814u8 - - Value: - Integer: - - U8 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 363254789u8 - - Value: - Integer: - - U8 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 906732565u8 - - Value: - Integer: - - U8 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 288246391u8 - - Value: - Integer: - - U8 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 724940549u8 - - Value: - Integer: - - U8 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 487101620u8 - - Value: - Integer: - - U8 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 261373583u8 - - Value: - Integer: - - U8 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 891163927u8 - - Value: - Integer: - - U8 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 743967544u8 - - Value: - Integer: - - U8 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 8372586u8 - - Value: - Integer: - - U8 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 461793278u8 - - Value: - Integer: - - U8 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 806307045u8 - - Value: - Integer: - - U8 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 122764546u8 - - Value: - Integer: - - U8 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 356336181u8 - - Value: - Integer: - - U8 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158370903u8 - - Value: - Integer: - - U8 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 774460877u8 - - Value: - Integer: - - U8 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 557174131u8 - - Value: - Integer: - - U8 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 492401267u8 - - Value: - Integer: - - U8 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893445620u8 - - Value: - Integer: - - U8 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 957757048u8 - - Value: - Integer: - - U8 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721540649u8 - - Value: - Integer: - - U8 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 390746493u8 - - Value: - Integer: - - U8 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 211251725u8 - - Value: - Integer: - - U8 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 938266114u8 - - Value: - Integer: - - U8 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 156985870u8 - - Value: - Integer: - - U8 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 703831126u8 - - Value: - Integer: - - U8 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 729964155u8 - - Value: - Integer: - - U8 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 988151305u8 - - Value: - Integer: - - U8 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 320872435u8 - - Value: - Integer: - - U8 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 719287167u8 - - Value: - Integer: - - U8 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 152289486u8 - - Value: - Integer: - - U8 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 740067975u8 - - Value: - Integer: - - U8 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 728627816u8 - - Value: - Integer: - - U8 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 385008978u8 - - Value: - Integer: - - U8 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 553967635u8 - - Value: - Integer: - - U8 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 71980713u8 - - Value: - Integer: - - U8 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 519444716u8 - - Value: - Integer: - - U8 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 116499965u8 - - Value: - Integer: - - U8 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 717422268u8 - - Value: - Integer: - - U8 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 18966279u8 - - Value: - Integer: - - U8 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 22458638u8 - - Value: - Integer: - - U8 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 857282620u8 - - Value: - Integer: - - U8 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 920675898u8 - - Value: - Integer: - - U8 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 762235516u8 - - Value: - Integer: - - U8 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469018377u8 - - Value: - Integer: - - U8 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199986521u8 - - Value: - Integer: - - U8 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 536679358u8 - - Value: - Integer: - - U8 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 591399452u8 - - Value: - Integer: - - U8 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 83083158u8 - - Value: - Integer: - - U8 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 599449051u8 - - Value: - Integer: - - U8 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 445442318u8 - - Value: - Integer: - - U8 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 585486590u8 - - Value: - Integer: - - U8 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 209278800u8 - - Value: - Integer: - - U8 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 873568117u8 - - Value: - Integer: - - U8 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 664470940u8 - - Value: - Integer: - - U8 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 465262783u8 - - Value: - Integer: - - U8 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 605652874u8 - - Value: - Integer: - - U8 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 376803940u8 - - Value: - Integer: - - U8 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 965247040u8 - - Value: - Integer: - - U8 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 598474509u8 - - Value: - Integer: - - U8 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 845119918u8 - - Value: - Integer: - - U8 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 648159133u8 - - Value: - Integer: - - U8 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 669051032u8 - - Value: - Integer: - - U8 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 800600261u8 - - Value: - Integer: - - U8 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 434689764u8 - - Value: - Integer: - - U8 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 520060080u8 - - Value: - Integer: - - U8 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 804659385u8 - - Value: - Integer: - - U8 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 537828058u8 - - Value: - Integer: - - U8 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 716600292u8 - - Value: - Integer: - - U8 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387020273u8 - - Value: - Integer: - - U8 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199375617u8 - - Value: - Integer: - - U8 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 680337189u8 - - Value: - Integer: - - U8 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 818479931u8 - - Value: - Integer: - - U8 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893693281u8 - - Value: - Integer: - - U8 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 87377802u8 - - Value: - Integer: - - U8 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 84699261u8 - - Value: - Integer: - - U8 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 292826090u8 - - Value: - Integer: - - U8 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 569171405u8 - - Value: - Integer: - - U8 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387436237u8 - - Value: - Integer: - - U8 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 150682190u8 - - Value: - Integer: - - U8 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 888770419u8 - - Value: - Integer: - - U8 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 824696431u8 - - Value: - Integer: - - U8 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 765659803u8 - - Value: - Integer: - - U8 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 270163693u8 - - Value: - Integer: - - U8 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 427940240u8 - - Value: - Integer: - - U8 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 504997332u8 - - Value: - Integer: - - U8 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 337808338u8 - - Value: - Integer: - - U8 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 907200008u8 - - Value: - Integer: - - U8 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 757177889u8 - - Value: - Integer: - - U8 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 696697188u8 - - Value: - Integer: - - U8 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 41376051u8 - - Value: - Integer: - - U8 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 496293518u8 - - Value: - Integer: - - U8 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out deleted file mode 100644 index ba97127eac..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U32 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123u32 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U32 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456u32 - - Value: - Integer: - - U32 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - - Value: - Integer: - - U32 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - - Value: - Integer: - - U32 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024u32 - - Value: - Integer: - - U32 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116u32 - - Value: - Integer: - - U32 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659u32 - - Value: - Integer: - - U32 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166u32 - - Value: - Integer: - - U32 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736u32 - - Value: - Integer: - - U32 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960u32 - - Value: - Integer: - - U32 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719u32 - - Value: - Integer: - - U32 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814u32 - - Value: - Integer: - - U32 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789u32 - - Value: - Integer: - - U32 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565u32 - - Value: - Integer: - - U32 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391u32 - - Value: - Integer: - - U32 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549u32 - - Value: - Integer: - - U32 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620u32 - - Value: - Integer: - - U32 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583u32 - - Value: - Integer: - - U32 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927u32 - - Value: - Integer: - - U32 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544u32 - - Value: - Integer: - - U32 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586u32 - - Value: - Integer: - - U32 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278u32 - - Value: - Integer: - - U32 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045u32 - - Value: - Integer: - - U32 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546u32 - - Value: - Integer: - - U32 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181u32 - - Value: - Integer: - - U32 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903u32 - - Value: - Integer: - - U32 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877u32 - - Value: - Integer: - - U32 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131u32 - - Value: - Integer: - - U32 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267u32 - - Value: - Integer: - - U32 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620u32 - - Value: - Integer: - - U32 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048u32 - - Value: - Integer: - - U32 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649u32 - - Value: - Integer: - - U32 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493u32 - - Value: - Integer: - - U32 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725u32 - - Value: - Integer: - - U32 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114u32 - - Value: - Integer: - - U32 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870u32 - - Value: - Integer: - - U32 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126u32 - - Value: - Integer: - - U32 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155u32 - - Value: - Integer: - - U32 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305u32 - - Value: - Integer: - - U32 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435u32 - - Value: - Integer: - - U32 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167u32 - - Value: - Integer: - - U32 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486u32 - - Value: - Integer: - - U32 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975u32 - - Value: - Integer: - - U32 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816u32 - - Value: - Integer: - - U32 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978u32 - - Value: - Integer: - - U32 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635u32 - - Value: - Integer: - - U32 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713u32 - - Value: - Integer: - - U32 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716u32 - - Value: - Integer: - - U32 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965u32 - - Value: - Integer: - - U32 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268u32 - - Value: - Integer: - - U32 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279u32 - - Value: - Integer: - - U32 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638u32 - - Value: - Integer: - - U32 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620u32 - - Value: - Integer: - - U32 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898u32 - - Value: - Integer: - - U32 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516u32 - - Value: - Integer: - - U32 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377u32 - - Value: - Integer: - - U32 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521u32 - - Value: - Integer: - - U32 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358u32 - - Value: - Integer: - - U32 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452u32 - - Value: - Integer: - - U32 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158u32 - - Value: - Integer: - - U32 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051u32 - - Value: - Integer: - - U32 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318u32 - - Value: - Integer: - - U32 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590u32 - - Value: - Integer: - - U32 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800u32 - - Value: - Integer: - - U32 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117u32 - - Value: - Integer: - - U32 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940u32 - - Value: - Integer: - - U32 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783u32 - - Value: - Integer: - - U32 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874u32 - - Value: - Integer: - - U32 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940u32 - - Value: - Integer: - - U32 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040u32 - - Value: - Integer: - - U32 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509u32 - - Value: - Integer: - - U32 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918u32 - - Value: - Integer: - - U32 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133u32 - - Value: - Integer: - - U32 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032u32 - - Value: - Integer: - - U32 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261u32 - - Value: - Integer: - - U32 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764u32 - - Value: - Integer: - - U32 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080u32 - - Value: - Integer: - - U32 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385u32 - - Value: - Integer: - - U32 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058u32 - - Value: - Integer: - - U32 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292u32 - - Value: - Integer: - - U32 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273u32 - - Value: - Integer: - - U32 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617u32 - - Value: - Integer: - - U32 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189u32 - - Value: - Integer: - - U32 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931u32 - - Value: - Integer: - - U32 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281u32 - - Value: - Integer: - - U32 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802u32 - - Value: - Integer: - - U32 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261u32 - - Value: - Integer: - - U32 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090u32 - - Value: - Integer: - - U32 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405u32 - - Value: - Integer: - - U32 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237u32 - - Value: - Integer: - - U32 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190u32 - - Value: - Integer: - - U32 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419u32 - - Value: - Integer: - - U32 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431u32 - - Value: - Integer: - - U32 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803u32 - - Value: - Integer: - - U32 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693u32 - - Value: - Integer: - - U32 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240u32 - - Value: - Integer: - - U32 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332u32 - - Value: - Integer: - - U32 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338u32 - - Value: - Integer: - - U32 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008u32 - - Value: - Integer: - - U32 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889u32 - - Value: - Integer: - - U32 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188u32 - - Value: - Integer: - - U32 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051u32 - - Value: - Integer: - - U32 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518u32 - - Value: - Integer: - - U32 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out deleted file mode 100644 index ba97127eac..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U32 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123u32 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U32 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456u32 - - Value: - Integer: - - U32 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - - Value: - Integer: - - U32 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - - Value: - Integer: - - U32 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024u32 - - Value: - Integer: - - U32 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116u32 - - Value: - Integer: - - U32 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659u32 - - Value: - Integer: - - U32 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166u32 - - Value: - Integer: - - U32 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736u32 - - Value: - Integer: - - U32 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960u32 - - Value: - Integer: - - U32 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719u32 - - Value: - Integer: - - U32 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814u32 - - Value: - Integer: - - U32 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789u32 - - Value: - Integer: - - U32 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565u32 - - Value: - Integer: - - U32 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391u32 - - Value: - Integer: - - U32 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549u32 - - Value: - Integer: - - U32 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620u32 - - Value: - Integer: - - U32 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583u32 - - Value: - Integer: - - U32 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927u32 - - Value: - Integer: - - U32 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544u32 - - Value: - Integer: - - U32 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586u32 - - Value: - Integer: - - U32 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278u32 - - Value: - Integer: - - U32 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045u32 - - Value: - Integer: - - U32 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546u32 - - Value: - Integer: - - U32 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181u32 - - Value: - Integer: - - U32 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903u32 - - Value: - Integer: - - U32 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877u32 - - Value: - Integer: - - U32 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131u32 - - Value: - Integer: - - U32 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267u32 - - Value: - Integer: - - U32 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620u32 - - Value: - Integer: - - U32 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048u32 - - Value: - Integer: - - U32 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649u32 - - Value: - Integer: - - U32 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493u32 - - Value: - Integer: - - U32 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725u32 - - Value: - Integer: - - U32 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114u32 - - Value: - Integer: - - U32 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870u32 - - Value: - Integer: - - U32 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126u32 - - Value: - Integer: - - U32 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155u32 - - Value: - Integer: - - U32 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305u32 - - Value: - Integer: - - U32 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435u32 - - Value: - Integer: - - U32 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167u32 - - Value: - Integer: - - U32 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486u32 - - Value: - Integer: - - U32 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975u32 - - Value: - Integer: - - U32 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816u32 - - Value: - Integer: - - U32 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978u32 - - Value: - Integer: - - U32 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635u32 - - Value: - Integer: - - U32 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713u32 - - Value: - Integer: - - U32 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716u32 - - Value: - Integer: - - U32 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965u32 - - Value: - Integer: - - U32 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268u32 - - Value: - Integer: - - U32 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279u32 - - Value: - Integer: - - U32 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638u32 - - Value: - Integer: - - U32 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620u32 - - Value: - Integer: - - U32 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898u32 - - Value: - Integer: - - U32 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516u32 - - Value: - Integer: - - U32 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377u32 - - Value: - Integer: - - U32 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521u32 - - Value: - Integer: - - U32 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358u32 - - Value: - Integer: - - U32 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452u32 - - Value: - Integer: - - U32 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158u32 - - Value: - Integer: - - U32 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051u32 - - Value: - Integer: - - U32 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318u32 - - Value: - Integer: - - U32 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590u32 - - Value: - Integer: - - U32 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800u32 - - Value: - Integer: - - U32 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117u32 - - Value: - Integer: - - U32 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940u32 - - Value: - Integer: - - U32 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783u32 - - Value: - Integer: - - U32 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874u32 - - Value: - Integer: - - U32 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940u32 - - Value: - Integer: - - U32 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040u32 - - Value: - Integer: - - U32 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509u32 - - Value: - Integer: - - U32 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918u32 - - Value: - Integer: - - U32 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133u32 - - Value: - Integer: - - U32 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032u32 - - Value: - Integer: - - U32 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261u32 - - Value: - Integer: - - U32 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764u32 - - Value: - Integer: - - U32 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080u32 - - Value: - Integer: - - U32 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385u32 - - Value: - Integer: - - U32 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058u32 - - Value: - Integer: - - U32 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292u32 - - Value: - Integer: - - U32 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273u32 - - Value: - Integer: - - U32 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617u32 - - Value: - Integer: - - U32 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189u32 - - Value: - Integer: - - U32 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931u32 - - Value: - Integer: - - U32 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281u32 - - Value: - Integer: - - U32 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802u32 - - Value: - Integer: - - U32 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261u32 - - Value: - Integer: - - U32 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090u32 - - Value: - Integer: - - U32 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405u32 - - Value: - Integer: - - U32 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237u32 - - Value: - Integer: - - U32 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190u32 - - Value: - Integer: - - U32 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419u32 - - Value: - Integer: - - U32 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431u32 - - Value: - Integer: - - U32 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803u32 - - Value: - Integer: - - U32 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693u32 - - Value: - Integer: - - U32 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240u32 - - Value: - Integer: - - U32 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332u32 - - Value: - Integer: - - U32 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338u32 - - Value: - Integer: - - U32 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008u32 - - Value: - Integer: - - U32 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889u32 - - Value: - Integer: - - U32 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188u32 - - Value: - Integer: - - U32 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051u32 - - Value: - Integer: - - U32 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518u32 - - Value: - Integer: - - U32 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out deleted file mode 100644 index 324a0abcce..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U8 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 123u8 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U8 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 456u8 - - Value: - Integer: - - U8 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 83 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - - Value: - Integer: - - U8 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 403 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - - Value: - Integer: - - U8 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 340130024u8 - - Value: - Integer: - - U8 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158951116u8 - - Value: - Integer: - - U8 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 155529659u8 - - Value: - Integer: - - U8 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 642023166u8 - - Value: - Integer: - - U8 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 228481736u8 - - Value: - Integer: - - U8 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469712960u8 - - Value: - Integer: - - U8 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 929437719u8 - - Value: - Integer: - - U8 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721072814u8 - - Value: - Integer: - - U8 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 363254789u8 - - Value: - Integer: - - U8 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 906732565u8 - - Value: - Integer: - - U8 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 288246391u8 - - Value: - Integer: - - U8 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 724940549u8 - - Value: - Integer: - - U8 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 487101620u8 - - Value: - Integer: - - U8 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 261373583u8 - - Value: - Integer: - - U8 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 891163927u8 - - Value: - Integer: - - U8 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 743967544u8 - - Value: - Integer: - - U8 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 8372586u8 - - Value: - Integer: - - U8 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 461793278u8 - - Value: - Integer: - - U8 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 806307045u8 - - Value: - Integer: - - U8 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 122764546u8 - - Value: - Integer: - - U8 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 356336181u8 - - Value: - Integer: - - U8 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158370903u8 - - Value: - Integer: - - U8 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 774460877u8 - - Value: - Integer: - - U8 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 557174131u8 - - Value: - Integer: - - U8 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 492401267u8 - - Value: - Integer: - - U8 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893445620u8 - - Value: - Integer: - - U8 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 957757048u8 - - Value: - Integer: - - U8 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721540649u8 - - Value: - Integer: - - U8 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 390746493u8 - - Value: - Integer: - - U8 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 211251725u8 - - Value: - Integer: - - U8 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 938266114u8 - - Value: - Integer: - - U8 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 156985870u8 - - Value: - Integer: - - U8 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 703831126u8 - - Value: - Integer: - - U8 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 729964155u8 - - Value: - Integer: - - U8 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 988151305u8 - - Value: - Integer: - - U8 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 320872435u8 - - Value: - Integer: - - U8 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 719287167u8 - - Value: - Integer: - - U8 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 152289486u8 - - Value: - Integer: - - U8 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 740067975u8 - - Value: - Integer: - - U8 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 728627816u8 - - Value: - Integer: - - U8 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 385008978u8 - - Value: - Integer: - - U8 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 553967635u8 - - Value: - Integer: - - U8 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 71980713u8 - - Value: - Integer: - - U8 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 519444716u8 - - Value: - Integer: - - U8 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 116499965u8 - - Value: - Integer: - - U8 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 717422268u8 - - Value: - Integer: - - U8 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 18966279u8 - - Value: - Integer: - - U8 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 22458638u8 - - Value: - Integer: - - U8 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 857282620u8 - - Value: - Integer: - - U8 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 920675898u8 - - Value: - Integer: - - U8 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 762235516u8 - - Value: - Integer: - - U8 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469018377u8 - - Value: - Integer: - - U8 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199986521u8 - - Value: - Integer: - - U8 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 536679358u8 - - Value: - Integer: - - U8 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 591399452u8 - - Value: - Integer: - - U8 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 83083158u8 - - Value: - Integer: - - U8 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 599449051u8 - - Value: - Integer: - - U8 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 445442318u8 - - Value: - Integer: - - U8 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 585486590u8 - - Value: - Integer: - - U8 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 209278800u8 - - Value: - Integer: - - U8 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 873568117u8 - - Value: - Integer: - - U8 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 664470940u8 - - Value: - Integer: - - U8 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 465262783u8 - - Value: - Integer: - - U8 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 605652874u8 - - Value: - Integer: - - U8 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 376803940u8 - - Value: - Integer: - - U8 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 965247040u8 - - Value: - Integer: - - U8 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 598474509u8 - - Value: - Integer: - - U8 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 845119918u8 - - Value: - Integer: - - U8 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 648159133u8 - - Value: - Integer: - - U8 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 669051032u8 - - Value: - Integer: - - U8 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 800600261u8 - - Value: - Integer: - - U8 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 434689764u8 - - Value: - Integer: - - U8 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 520060080u8 - - Value: - Integer: - - U8 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 804659385u8 - - Value: - Integer: - - U8 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 537828058u8 - - Value: - Integer: - - U8 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 716600292u8 - - Value: - Integer: - - U8 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387020273u8 - - Value: - Integer: - - U8 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199375617u8 - - Value: - Integer: - - U8 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 680337189u8 - - Value: - Integer: - - U8 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 818479931u8 - - Value: - Integer: - - U8 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893693281u8 - - Value: - Integer: - - U8 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 87377802u8 - - Value: - Integer: - - U8 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 84699261u8 - - Value: - Integer: - - U8 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 292826090u8 - - Value: - Integer: - - U8 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 569171405u8 - - Value: - Integer: - - U8 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387436237u8 - - Value: - Integer: - - U8 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 150682190u8 - - Value: - Integer: - - U8 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 888770419u8 - - Value: - Integer: - - U8 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 824696431u8 - - Value: - Integer: - - U8 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 765659803u8 - - Value: - Integer: - - U8 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 270163693u8 - - Value: - Integer: - - U8 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 427940240u8 - - Value: - Integer: - - U8 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 504997332u8 - - Value: - Integer: - - U8 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 337808338u8 - - Value: - Integer: - - U8 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 907200008u8 - - Value: - Integer: - - U8 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 757177889u8 - - Value: - Integer: - - U8 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 696697188u8 - - Value: - Integer: - - U8 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 41376051u8 - - Value: - Integer: - - U8 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 496293518u8 - - Value: - Integer: - - U8 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out b/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out deleted file mode 100644 index 00ff4531d4..0000000000 --- a/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out +++ /dev/null @@ -1,62 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'field' @ 1:1-6" - - "'Field' @ 1:1-6" - - "'fielD' @ 1:1-6" - - "'FIELD' @ 1:1-6" - - "'group' @ 1:1-6" - - "'Group' @ 1:1-6" - - "'grouP' @ 1:1-6" - - "'GROUP' @ 1:1-6" - - "'u8' @ 1:1-3" - - "'u16' @ 1:1-4" - - "'u32' @ 1:1-4" - - "'u64' @ 1:1-4" - - "'u128' @ 1:1-5" - - "'i8' @ 1:1-3" - - "'i16' @ 1:1-4" - - "'i32' @ 1:1-4" - - "'i64' @ 1:1-4" - - "'i128' @ 1:1-5" - - "'U8' @ 1:1-3" - - "'U16' @ 1:1-4" - - "'U32' @ 1:1-4" - - "'U64' @ 1:1-4" - - "'U128' @ 1:1-5" - - "'U8' @ 1:1-3" - - "'U16' @ 1:1-4" - - "'U32' @ 1:1-4" - - "'U64' @ 1:1-4" - - "'U128' @ 1:1-5" - - "'u' @ 1:1-2" - - "'8' @ 1:1-2" - - "'u' @ 1:1-2" - - "'16' @ 1:1-3" - - "'u' @ 1:1-2" - - "'32' @ 1:1-3" - - "'u' @ 1:1-2" - - "'64' @ 1:1-3" - - "'u' @ 1:1-2" - - "'128' @ 1:1-4" - - "'i' @ 1:1-2" - - "'8' @ 1:1-2" - - "'i' @ 1:1-2" - - "'16' @ 1:1-3" - - "'i' @ 1:1-2" - - "'32' @ 1:1-3" - - "'i' @ 1:1-2" - - "'64' @ 1:1-3" - - "'i' @ 1:1-2" - - "'128' @ 1:1-4" - - "'U' @ 1:1-2,'8' @ 1:3-4" - - "'U' @ 1:1-2,'16' @ 1:3-5" - - "'U' @ 1:1-2,'32' @ 1:3-5" - - "'U' @ 1:1-2,'64' @ 1:3-5" - - "'U' @ 1:1-2,'128' @ 1:3-6" - - "'U' @ 1:1-2,'8' @ 1:3-4" - - "'U' @ 1:1-2,'16' @ 1:3-5" - - "'U' @ 1:1-2,'32' @ 1:3-5" - - "'U' @ 1:1-2,'64' @ 1:3-5" - - "'U' @ 1:1-2,'128' @ 1:3-6" diff --git a/tests/expectations/parser/parser/expression/ternary.leo.out b/tests/expectations/parser/parser/expression/ternary.leo.out deleted file mode 100644 index 0d672f23d9..0000000000 --- a/tests/expectations/parser/parser/expression/ternary.leo.out +++ /dev/null @@ -1,72 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Ternary: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" - if_true: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" - if_false: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x ? y : z" - - Ternary: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - if_true: - Ternary: - condition: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - if_true: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - if_false: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 14 - path: test - content: "x ? a ? b : c : z" - if_false: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "x ? a ? b : c : z" - - Ternary: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - if_true: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - if_false: - Ternary: - condition: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - if_true: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - if_false: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 18 - path: test - content: "x ? y : a ? b : c" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "x ? y : a ? b : c" diff --git a/tests/expectations/parser/parser/expression/tuple.leo.out b/tests/expectations/parser/parser/expression/tuple.leo.out deleted file mode 100644 index f5ec2aa11b..0000000000 --- a/tests/expectations/parser/parser/expression/tuple.leo.out +++ /dev/null @@ -1,94 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Implicit: - - "" - - line_start: 0 - line_stop: 0 - col_start: 0 - col_stop: 0 - path: "" - content: "" - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(y)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(z)\\\"}\"}" - - Value: - Implicit: - - "" - - line_start: 0 - line_stop: 0 - col_start: 0 - col_stop: 0 - path: "" - content: "" - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,)\\\"}\"}" - - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "(x,y)" - - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "(x,y,z)" - - TupleInit: - elements: - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123,123)" - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 9 - path: test - content: "(123,123)" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "(123,123)" - - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: () - - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: (()) diff --git a/tests/expectations/parser/parser/expression/unary/negate.leo.out b/tests/expectations/parser/parser/expression/unary/negate.leo.out deleted file mode 100644 index de785f2be6..0000000000 --- a/tests/expectations/parser/parser/expression/unary/negate.leo.out +++ /dev/null @@ -1,120 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x\\\"}\"}" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "-x" - - Unary: - inner: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "-x.y" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "-x.y" - - Unary: - inner: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 6 - path: test - content: "-x::y" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "-x::y" - - Unary: - inner: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x()\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "-x()" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "-x()" - - Unary: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"--x\\\"}\"}" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "--x" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "--x" - - Unary: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-!x\\\"}\"}" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "-!x" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "-!x" diff --git a/tests/expectations/parser/parser/expression/unary/not.leo.out b/tests/expectations/parser/parser/expression/unary/not.leo.out deleted file mode 100644 index 5c93154572..0000000000 --- a/tests/expectations/parser/parser/expression/unary/not.leo.out +++ /dev/null @@ -1,120 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x\\\"}\"}" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "!x" - - Unary: - inner: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "!x.y" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "!x.y" - - Unary: - inner: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 6 - path: test - content: "!x::y" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "!x::y" - - Unary: - inner: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x()\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "!x()" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "!x()" - - Unary: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!!x\\\"}\"}" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "!!x" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "!!x" - - Unary: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!-x\\\"}\"}" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "!-x" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "!-x" diff --git a/tests/expectations/parser/parser/functions/annotated.leo.out b/tests/expectations/parser/parser/functions/annotated.leo.out deleted file mode 100644 index 29612e265a..0000000000 --- a/tests/expectations/parser/parser/functions/annotated.leo.out +++ /dev/null @@ -1,58 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": - annotations: - - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 6 - path: test - content: "@test" - name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test\\\"}\"}" - arguments: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 14 - col_stop: 2 - path: test - content: "function x() {\n...\n}" - span: - line_start: 4 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: test - content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_param.leo.out b/tests/expectations/parser/parser/functions/annotated_param.leo.out deleted file mode 100644 index 72ca72549e..0000000000 --- a/tests/expectations/parser/parser/functions/annotated_param.leo.out +++ /dev/null @@ -1,59 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": - annotations: - - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 12 - path: test - content: "@test(test)" - name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test(test)\\\"}\"}" - arguments: - - test - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 14 - col_stop: 2 - path: test - content: "function x() {\n...\n}" - span: - line_start: 4 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: test - content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_twice.leo.out b/tests/expectations/parser/parser/functions/annotated_twice.leo.out deleted file mode 100644 index a83199ec50..0000000000 --- a/tests/expectations/parser/parser/functions/annotated_twice.leo.out +++ /dev/null @@ -1,67 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": - annotations: - - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 6 - path: test - content: "@test @test2" - name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" - arguments: [] - - span: - line_start: 3 - line_stop: 3 - col_start: 7 - col_stop: 13 - path: test - content: "@test @test2" - name: "{\"name\":\"test2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" - arguments: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 14 - col_stop: 2 - path: test - content: "function x() {\n...\n}" - span: - line_start: 4 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: test - content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_input_fail.leo.out b/tests/expectations/parser/parser/functions/const_input_fail.leo.out deleted file mode 100644 index 468e683fd9..0000000000 --- a/tests/expectations/parser/parser/functions/const_input_fail.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Parse -expectation: Fail -outputs: - - " --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^\n |\n = expected 'ident', got 'input'" diff --git a/tests/expectations/parser/parser/functions/const_param.leo.out b/tests/expectations/parser/parser/functions/const_param.leo.out deleted file mode 100644 index 609a83247f..0000000000 --- a/tests/expectations/parser/parser/functions/const_param.leo.out +++ /dev/null @@ -1,140 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: u32, const y: i32) {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 26 - col_stop: 27 - path: test - content: "function x(x: u32, const y: i32) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 34 - col_stop: 2 - path: test - content: "function x(x: u32, const y: i32) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: u32, const y: i32) {\n...\n}" - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: U32 - span: - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 19 - path: test - content: "function x(const x: u32, y: i32) {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 7 - line_stop: 7 - col_start: 26 - col_stop: 27 - path: test - content: "function x(const x: u32, y: i32) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 7 - line_stop: 9 - col_start: 34 - col_stop: 2 - path: test - content: "function x(const x: u32, y: i32) {\n...\n}" - span: - line_start: 7 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: test - content: "function x(const x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_self_bad.leo.out b/tests/expectations/parser/parser/functions/const_self_bad.leo.out deleted file mode 100644 index 3b6e210cef..0000000000 --- a/tests/expectations/parser/parser/functions/const_self_bad.leo.out +++ /dev/null @@ -1,50 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" - input: - - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 24 - col_stop: 2 - path: test - content: "function x(const self) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(const self) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty.leo.out b/tests/expectations/parser/parser/functions/empty.leo.out deleted file mode 100644 index 5ead848ab3..0000000000 --- a/tests/expectations/parser/parser/functions/empty.leo.out +++ /dev/null @@ -1,49 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 14 - col_stop: 2 - path: test - content: "function x() {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty2.leo.out b/tests/expectations/parser/parser/functions/empty2.leo.out deleted file mode 100644 index 16574b1dc3..0000000000 --- a/tests/expectations/parser/parser/functions/empty2.leo.out +++ /dev/null @@ -1,31 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}" - input: [] - output: ~ - block: - statements: [] - span: - line_start: 3 - line_stop: 3 - col_start: 14 - col_stop: 16 - path: test - content: "function x() {}" - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 16 - path: test - content: "function x() {}" diff --git a/tests/expectations/parser/parser/functions/param_array.leo.out b/tests/expectations/parser/parser/functions/param_array.leo.out deleted file mode 100644 index c9b3cc79cd..0000000000 --- a/tests/expectations/parser/parser/functions/param_array.leo.out +++ /dev/null @@ -1,64 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U8 - - - value: "12" - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: [u8; 12]) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 25 - col_stop: 2 - path: test - content: "function x(x: [u8; 12]) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: [u8; 12]) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_circuit.leo.out b/tests/expectations/parser/parser/functions/param_circuit.leo.out deleted file mode 100644 index e998fe7f92..0000000000 --- a/tests/expectations/parser/parser/functions/param_circuit.leo.out +++ /dev/null @@ -1,62 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" - const_: false - mutable: true - type_: - Circuit: "{\"name\":\"MyCircuit\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: MyCircuit) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 26 - col_stop: 2 - path: test - content: "function x(x: MyCircuit) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: MyCircuit) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_tuple.leo.out b/tests/expectations/parser/parser/functions/param_tuple.leo.out deleted file mode 100644 index 9597b18cb3..0000000000 --- a/tests/expectations/parser/parser/functions/param_tuple.leo.out +++ /dev/null @@ -1,64 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - IntegerType: U32 - - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: (u32, i32)) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 27 - col_stop: 2 - path: test - content: "function x(x: (u32, i32)) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: (u32, i32)) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params.leo.out b/tests/expectations/parser/parser/functions/params.leo.out deleted file mode 100644 index 9c74dafafd..0000000000 --- a/tests/expectations/parser/parser/functions/params.leo.out +++ /dev/null @@ -1,75 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: u32, y: i32) {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: test - content: "function x(x: u32, y: i32) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 28 - col_stop: 2 - path: test - content: "function x(x: u32, y: i32) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params_return.leo.out b/tests/expectations/parser/parser/functions/params_return.leo.out deleted file mode 100644 index 6b1980e238..0000000000 --- a/tests/expectations/parser/parser/functions/params_return.leo.out +++ /dev/null @@ -1,76 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: u32, y: i32) -> u32 {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: test - content: "function x(x: u32, y: i32) -> u32 {" - output: - IntegerType: U32 - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 35 - col_stop: 2 - path: test - content: "function x(x: u32, y: i32) -> u32 {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: u32, y: i32) -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return.leo.out b/tests/expectations/parser/parser/functions/return.leo.out deleted file mode 100644 index 3baa2a2e79..0000000000 --- a/tests/expectations/parser/parser/functions/return.leo.out +++ /dev/null @@ -1,50 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}" - input: [] - output: - IntegerType: U32 - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 21 - col_stop: 2 - path: test - content: "function x() -> u32 {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x() -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return_tuple.leo.out b/tests/expectations/parser/parser/functions/return_tuple.leo.out deleted file mode 100644 index aa853f04df..0000000000 --- a/tests/expectations/parser/parser/functions/return_tuple.leo.out +++ /dev/null @@ -1,52 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}" - input: [] - output: - Tuple: - - IntegerType: U32 - - IntegerType: U32 - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 28 - col_stop: 2 - path: test - content: "function x() -> (u32, u32) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x() -> (u32, u32) {\n...\n}" diff --git a/tests/expectations/parser/parser/import/alias.leo.out b/tests/expectations/parser/parser/import/alias.leo.out deleted file mode 100644 index e0c181f3d7..0000000000 --- a/tests/expectations/parser/parser/import/alias.leo.out +++ /dev/null @@ -1,38 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" - alias: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" - span: - line_start: 3 - line_stop: 3 - col_start: 10 - col_stop: 18 - path: test - content: import a.b as bar; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 18 - path: test - content: import a.b as bar; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 18 - path: test - content: import a.b as bar; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/basic.leo.out b/tests/expectations/parser/parser/import/basic.leo.out deleted file mode 100644 index 7293ccb78e..0000000000 --- a/tests/expectations/parser/parser/import/basic.leo.out +++ /dev/null @@ -1,38 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" - alias: ~ - span: - line_start: 3 - line_stop: 3 - col_start: 10 - col_stop: 11 - path: test - content: import a.b; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 11 - path: test - content: import a.b; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 11 - path: test - content: import a.b; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/many_import.leo.out b/tests/expectations/parser/parser/import/many_import.leo.out deleted file mode 100644 index c8bf9349c8..0000000000 --- a/tests/expectations/parser/parser/import/many_import.leo.out +++ /dev/null @@ -1,136 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Packages: - name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.( // local import\\\"}\"}" - accesses: - - Symbol: - symbol: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Point,\\\"}\"}" - alias: ~ - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 10 - path: test - content: " Point," - - Symbol: - symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" foo,\\\"}\"}" - alias: ~ - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 8 - path: test - content: " foo," - span: - line_start: 3 - line_stop: 5 - col_start: 8 - col_stop: 8 - path: test - content: "import test-import.( // local import\n...\n foo," - span: - line_start: 3 - line_stop: 5 - col_start: 8 - col_stop: 8 - path: test - content: "import test-import.( // local import\n...\n foo," - - package_or_packages: - Packages: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.( // imports directory import\\\"}\"}" - accesses: - - Symbol: - symbol: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Bar,\\\"}\"}" - alias: ~ - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 8 - path: test - content: " Bar," - - Multiple: - name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" - accesses: - - Symbol: - symbol: "{\"name\":\"Baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" - alias: ~ - span: - line_start: 10 - line_stop: 10 - col_start: 10 - col_stop: 13 - path: test - content: " baz.(Baz, Bazzar)," - - Symbol: - symbol: "{\"name\":\"Bazzar\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" - alias: ~ - span: - line_start: 10 - line_stop: 10 - col_start: 15 - col_stop: 21 - path: test - content: " baz.(Baz, Bazzar)," - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 21 - path: test - content: " baz.(Baz, Bazzar)," - - SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" - access: - SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"Bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" - alias: ~ - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 16 - path: test - content: " bat.bat.Bat," - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 16 - path: test - content: " bat.bat.Bat," - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 16 - path: test - content: " bat.bat.Bat," - span: - line_start: 8 - line_stop: 11 - col_start: 8 - col_stop: 16 - path: test - content: "import bar.( // imports directory import\n...\n bat.bat.Bat," - span: - line_start: 8 - line_stop: 11 - col_start: 8 - col_stop: 16 - path: test - content: "import bar.( // imports directory import\n...\n bat.bat.Bat," - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/many_import_star.leo.out b/tests/expectations/parser/parser/import/many_import_star.leo.out deleted file mode 100644 index 9a04d35a1c..0000000000 --- a/tests/expectations/parser/parser/import/many_import_star.leo.out +++ /dev/null @@ -1,165 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*; // local import\\\"}\"}" - access: - Star: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: test - content: import test-import.*; // local import - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 21 - path: test - content: import test-import.*; // local import - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 21 - path: test - content: import test-import.*; // local import - - package_or_packages: - Package: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.*; // imports directory import\\\"}\"}" - access: - Star: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 13 - path: test - content: import bar.*; // imports directory import - span: - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 13 - path: test - content: import bar.*; // imports directory import - span: - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 13 - path: test - content: import bar.*; // imports directory import - - package_or_packages: - Package: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" - access: - SubPackage: - name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" - access: - Star: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 17 - path: test - content: import bar.baz.*; // imports directory import - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 17 - path: test - content: import bar.baz.*; // imports directory import - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 17 - path: test - content: import bar.baz.*; // imports directory import - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 17 - path: test - content: import bar.baz.*; // imports directory import - - package_or_packages: - Package: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" - access: - SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" - access: - SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" - access: - Star: - line_start: 7 - line_stop: 7 - col_start: 20 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - span: - line_start: 7 - line_stop: 7 - col_start: 8 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - span: - line_start: 7 - line_stop: 7 - col_start: 8 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - - package_or_packages: - Package: - name: "{\"name\":\"car\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import car.*; // imports directory import\\\"}\"}" - access: - Star: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 13 - path: test - content: import car.*; // imports directory import - span: - line_start: 8 - line_stop: 8 - col_start: 8 - col_stop: 13 - path: test - content: import car.*; // imports directory import - span: - line_start: 8 - line_stop: 8 - col_start: 8 - col_stop: 13 - path: test - content: import car.*; // imports directory import - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/names.leo.out b/tests/expectations/parser/parser/import/names.leo.out deleted file mode 100644 index 9bc9319577..0000000000 --- a/tests/expectations/parser/parser/import/names.leo.out +++ /dev/null @@ -1,94 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"a0-f\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" - alias: ~ - span: - line_start: 3 - line_stop: 3 - col_start: 13 - col_stop: 16 - path: test - content: import a0-f.foo; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 16 - path: test - content: import a0-f.foo; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 16 - path: test - content: import a0-f.foo; - - package_or_packages: - Package: - name: "{\"name\":\"a-9\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" - alias: ~ - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 15 - path: test - content: import a-9.bar; - span: - line_start: 4 - line_stop: 4 - col_start: 8 - col_stop: 15 - path: test - content: import a-9.bar; - span: - line_start: 4 - line_stop: 4 - col_start: 8 - col_stop: 15 - path: test - content: import a-9.bar; - - package_or_packages: - Package: - name: "{\"name\":\"hello-world\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":20,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" - alias: ~ - span: - line_start: 5 - line_stop: 5 - col_start: 20 - col_stop: 25 - path: test - content: import hello-world.hello; - span: - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 25 - path: test - content: import hello-world.hello; - span: - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 25 - path: test - content: import hello-world.hello; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/names_underscore.leo.out b/tests/expectations/parser/parser/import/names_underscore.leo.out deleted file mode 100644 index 952c5c0ac7..0000000000 --- a/tests/expectations/parser/parser/import/names_underscore.leo.out +++ /dev/null @@ -1,38 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"hello_world\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" - alias: ~ - span: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 23 - path: test - content: import hello_world.foo; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 23 - path: test - content: import hello_world.foo; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 23 - path: test - content: import hello_world.foo; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/star.leo.out b/tests/expectations/parser/parser/import/star.leo.out deleted file mode 100644 index 5bdc771258..0000000000 --- a/tests/expectations/parser/parser/import/star.leo.out +++ /dev/null @@ -1,35 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*;\\\"}\"}" - access: - Star: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: test - content: import test-import.*; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 21 - path: test - content: import test-import.*; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 21 - path: test - content: import test-import.*; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/statement/assign.leo.out b/tests/expectations/parser/parser/statement/assign.leo.out deleted file mode 100644 index d992c636a2..0000000000 --- a/tests/expectations/parser/parser/statement/assign.leo.out +++ /dev/null @@ -1,411 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: x = expr; - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: x = expr; - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = ();\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: x = (); - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 7 - path: test - content: x = (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: x = (); - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: x = x+y; - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: x = x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x = x+y; - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: "x = (x,y);" - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 10 - path: test - content: "x = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x = (x,y);" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: x = x(); - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: x = x(); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x = x(); - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0] = y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[0] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[0] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 7 - path: test - content: "x[0u32] = y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[0u32] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[0u32] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" - accesses: - - Tuple: - - value: "0" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0 = y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0 = y; - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x.0 = y; - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[1..2] = y;" - - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "x[1..2] = y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[1..2] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[1..2] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x[..2] = y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[..2] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x[..2] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[2..] = y;" - - ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[2..] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x[2..] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "x[..] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x[..] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" - accesses: - - Tuple: - - value: "0" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "x.0[0][..] = y;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x.0[0][..] = y;" - - ArrayRange: - - ~ - - ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x.0[0][..] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: "x.0[0][..] = y;" diff --git a/tests/expectations/parser/parser/statement/block.leo.out b/tests/expectations/parser/parser/statement/block.leo.out deleted file mode 100644 index 6e40c82b0f..0000000000 --- a/tests/expectations/parser/parser/statement/block.leo.out +++ /dev/null @@ -1,141 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "{}" - - Block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "{\n...\n}" - - Block: - statements: - - Block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "{{}}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "{{}}" - - Block: - statements: - - Block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 4 - col_start: 1 - col_stop: 2 - path: test - content: "{\n...\n}" - span: - line_start: 1 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "{\n...\n}" - - Block: - statements: - - Conditional: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 4 - col_start: 6 - col_stop: 2 - path: test - content: "if x {\n...\n}" - next: ~ - span: - line_start: 2 - line_stop: 4 - col_start: 1 - col_stop: 2 - path: test - content: "if x {\n...\n}" - span: - line_start: 1 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "{\n...\n}" diff --git a/tests/expectations/parser/parser/statement/conditional.leo.out b/tests/expectations/parser/parser/statement/conditional.leo.out deleted file mode 100644 index 337dcace01..0000000000 --- a/tests/expectations/parser/parser/statement/conditional.leo.out +++ /dev/null @@ -1,230 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Conditional: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 6 - col_stop: 2 - path: test - content: "if x {\n...\n}" - next: ~ - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "if x {\n...\n}" - - Conditional: - condition: - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if Self {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 9 - col_stop: 2 - path: test - content: "if Self {\n...\n}" - next: ~ - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "if Self {\n...\n}" - - Conditional: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 8 - col_stop: 2 - path: test - content: "if (x) {\n...\n}" - next: ~ - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "if (x) {\n...\n}" - - Conditional: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {}\\\"}\"}" - block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 10 - path: test - content: "if (x) {}" - next: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "if (x) {}" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {}\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {}\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 7 - path: test - content: "if x+y {}" - block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 10 - path: test - content: "if x+y {}" - next: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "if x+y {}" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 7 - path: test - content: "if x+y {" - block: - statements: - - Expression: - expression: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 5 - path: test - content: expr; - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 4 - col_start: 8 - col_stop: 2 - path: test - content: "if x+y {\n...\n}" - next: ~ - span: - line_start: 1 - line_stop: 4 - col_start: 1 - col_stop: 2 - path: test - content: "if x+y {\n...\n}\n" diff --git a/tests/expectations/parser/parser/statement/console.leo.out b/tests/expectations/parser/parser/statement/console.leo.out deleted file mode 100644 index 2ebba05261..0000000000 --- a/tests/expectations/parser/parser/statement/console.leo.out +++ /dev/null @@ -1,207 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Console: - function: - Assert: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.assert(x);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: console.assert(x); - - Console: - function: - Error: - parts: - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 22 - path: test - content: "console.error(\"{}\", x);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: "console.error(\"{}\", x);" - - Console: - function: - Error: - parts: - - Container - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 27 - path: test - content: "console.error(\"{}{}\", x, y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 27 - path: test - content: "console.error(\"{}{}\", x, y);" - - Console: - function: - Error: - parts: - - Const: x - parameters: [] - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 18 - path: test - content: "console.error(\"x\");" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "console.error(\"x\");" - - Console: - function: - Debug: - parts: - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 22 - path: test - content: "console.debug(\"{}\", x);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: "console.debug(\"{}\", x);" - - Console: - function: - Debug: - parts: - - Container - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 27 - path: test - content: "console.debug(\"{}{}\", x, y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 27 - path: test - content: "console.debug(\"{}{}\", x, y);" - - Console: - function: - Debug: - parts: - - Const: x - parameters: [] - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 18 - path: test - content: "console.debug(\"x\");" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "console.debug(\"x\");" - - Console: - function: - Log: - parts: - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 20 - path: test - content: "console.log(\"{}\", x);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 20 - path: test - content: "console.log(\"{}\", x);" - - Console: - function: - Log: - parts: - - Container - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 25 - path: test - content: "console.log(\"{}{}\", x, y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 25 - path: test - content: "console.log(\"{}{}\", x, y);" - - Console: - function: - Log: - parts: - - Const: x - parameters: [] - span: - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 16 - path: test - content: "console.log(\"x\");" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "console.log(\"x\");" diff --git a/tests/expectations/parser/parser/statement/definition.leo.out b/tests/expectations/parser/parser/statement/definition.leo.out deleted file mode 100644 index fa12ad7cea..0000000000 --- a/tests/expectations/parser/parser/statement/definition.leo.out +++ /dev/null @@ -1,1473 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: let x = expr; - type_: ~ - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: let x = expr; - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: let x = (); - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 11 - path: test - content: let x = (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: let x = (); - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: let x = x+y; - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 12 - path: test - content: let x = x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: let x = x+y; - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x = (x,y);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: "let x = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: "let x = (x,y);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: let x = x(); - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 12 - path: test - content: let x = x(); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: let x = x(); - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: const x = expr; - type_: ~ - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: const x = expr; - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: const x = (); - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 13 - path: test - content: const x = (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: const x = (); - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: const x = x+y; - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 14 - path: test - content: const x = x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: const x = x+y; - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x = (x,y);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 16 - path: test - content: "const x = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "const x = (x,y);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: const x = x(); - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 14 - path: test - content: const x = x(); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: const x = x(); - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = expr;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "let x: u32 = expr;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = ();" - type_: - IntegerType: U32 - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 16 - path: test - content: "let x: u32 = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "let x: u32 = ();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = x+y;" - type_: - IntegerType: U32 - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 17 - path: test - content: "let x: u32 = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "let x: u32 = x+y;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = (x,y);" - type_: - IntegerType: U32 - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 19 - path: test - content: "let x: u32 = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "let x: u32 = (x,y);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = x();" - type_: - IntegerType: U32 - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 17 - path: test - content: "let x: u32 = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "let x: u32 = x();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = expr;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 20 - path: test - content: "const x: u32 = expr;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = ();" - type_: - IntegerType: U32 - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 18 - path: test - content: "const x: u32 = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "const x: u32 = ();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = x+y;" - type_: - IntegerType: U32 - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 19 - path: test - content: "const x: u32 = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "const x: u32 = x+y;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = (x,y);" - type_: - IntegerType: U32 - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 21 - path: test - content: "const x: u32 = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 21 - path: test - content: "const x: u32 = (x,y);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = x();" - type_: - IntegerType: U32 - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 19 - path: test - content: "const x: u32 = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "const x: u32 = x();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = expr;" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = expr;" - type_: ~ - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "let (x, y) = expr;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = ();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = ();" - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 16 - path: test - content: "let (x, y) = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "let (x, y) = ();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = x+y;" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = x+y;" - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 17 - path: test - content: "let (x, y) = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "let (x, y) = x+y;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = (x,y);" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = (x,y);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 19 - path: test - content: "let (x, y) = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "let (x, y) = (x,y);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = x();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = x();" - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 17 - path: test - content: "let (x, y) = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "let (x, y) = x();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = expr;" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = expr;" - type_: ~ - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 20 - path: test - content: "const (x, y) = expr;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = ();" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = ();" - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 18 - path: test - content: "const (x, y) = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "const (x, y) = ();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = x+y;" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = x+y;" - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 19 - path: test - content: "const (x, y) = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "const (x, y) = x+y;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = (x,y);" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = (x,y);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 21 - path: test - content: "const (x, y) = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 21 - path: test - content: "const (x, y) = (x,y);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = x();" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = x();" - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 19 - path: test - content: "const (x, y) = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "const (x, y) = x();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = expr;" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = expr;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 23 - path: test - content: "let (x, y): u32 = expr;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = ();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = ();" - type_: - IntegerType: U32 - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 21 - path: test - content: "let (x, y): u32 = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 21 - path: test - content: "let (x, y): u32 = ();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = x+y;" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = x+y;" - type_: - IntegerType: U32 - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 22 - path: test - content: "let (x, y): u32 = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: "let (x, y): u32 = x+y;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = (x,y);" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = (x,y);" - type_: - IntegerType: U32 - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: "let (x, y): u32 = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: "let (x, y): u32 = (x,y);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = x();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = x();" - type_: - IntegerType: U32 - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 22 - path: test - content: "let (x, y): u32 = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: "let (x, y): u32 = x();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = expr;" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = expr;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 25 - path: test - content: "const (x, y): u32 = expr;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = ();" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = ();" - type_: - IntegerType: U32 - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 23 - path: test - content: "const (x, y): u32 = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 23 - path: test - content: "const (x, y): u32 = ();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = x+y;" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = x+y;" - type_: - IntegerType: U32 - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 24 - path: test - content: "const (x, y): u32 = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: "const (x, y): u32 = x+y;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = (x,y);" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = (x,y);" - type_: - IntegerType: U32 - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 26 - path: test - content: "const (x, y): u32 = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 26 - path: test - content: "const (x, y): u32 = (x,y);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = x();" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = x();" - type_: - IntegerType: U32 - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 24 - path: test - content: "const (x, y): u32 = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: "const (x, y): u32 = x();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x,y,) = ();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "let (x,y,) = ();" - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 16 - path: test - content: "let (x,y,) = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "let (x,y,) = ();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x,) = ();" - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 14 - path: test - content: "let (x,) = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: "let (x,) = ();" diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out deleted file mode 100644 index fcb8db8960..0000000000 --- a/tests/expectations/parser/parser/statement/definition_fail.leo.out +++ /dev/null @@ -1,27 +0,0 @@ ---- -namespace: ParseStatement -expectation: Fail -outputs: - - " --> test:1:0\n |\n 1 | let mut x = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^\n |\n = expected 'ident', got ','" diff --git a/tests/expectations/parser/parser/statement/expression.leo.out b/tests/expectations/parser/parser/statement/expression.leo.out deleted file mode 100644 index f9542ff844..0000000000 --- a/tests/expectations/parser/parser/statement/expression.leo.out +++ /dev/null @@ -1,94 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Expression: - expression: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: expr; - - Expression: - expression: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: (); - - Expression: - expression: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x+y; - - Expression: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "(x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "(x,y);" - - Expression: - expression: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x(); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x(); diff --git a/tests/expectations/parser/parser/statement/iteration.leo.out b/tests/expectations/parser/parser/statement/iteration.leo.out deleted file mode 100644 index 4fa2b3b899..0000000000 --- a/tests/expectations/parser/parser/statement/iteration.leo.out +++ /dev/null @@ -1,203 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {}\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "for x in 0..7 {}" - stop: - Value: - Implicit: - - "7" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: "for x in 0..7 {}" - block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 17 - path: test - content: "for x in 0..7 {}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "for x in 0..7 {}" - - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "for x in 0..7 {" - stop: - Value: - Implicit: - - "7" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: "for x in 0..7 {" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 15 - col_stop: 2 - path: test - content: "for x in 0..7 {\n...\n}" - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "for x in 0..7 {\n...\n}" - - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..99u8 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "for x in 0..99u8 {" - stop: - Value: - Integer: - - U8 - - "99" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 17 - path: test - content: "for x in 0..99u8 {" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 18 - col_stop: 2 - path: test - content: "for x in 0..99u8 {\n...\n}" - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "for x in 0..99u8 {\n...\n}" - - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "for x in 0..Self {" - stop: - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 18 - col_stop: 2 - path: test - content: "for x in 0..Self {\n...\n}" - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "for x in 0..Self {\n...\n}" diff --git a/tests/expectations/parser/parser/statement/return.leo.out b/tests/expectations/parser/parser/statement/return.leo.out deleted file mode 100644 index 938e0d0efe..0000000000 --- a/tests/expectations/parser/parser/statement/return.leo.out +++ /dev/null @@ -1,110 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Return: - expression: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: return expr; - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: return (); - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: return (); - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 11 - path: test - content: return x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: return x+y; - - Return: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 13 - path: test - content: "return (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: "return (x,y);" - - Return: - expression: - Value: - Implicit: - - "5" - - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 2 - path: test - content: 5; - span: - line_start: 1 - line_stop: 2 - col_start: 1 - col_stop: 2 - path: test - content: "return\n5;" diff --git a/tests/expectations/parser/parser/statement/return_fail.leo.out b/tests/expectations/parser/parser/statement/return_fail.leo.out deleted file mode 100644 index 9f5a9e7204..0000000000 --- a/tests/expectations/parser/parser/statement/return_fail.leo.out +++ /dev/null @@ -1,7 +0,0 @@ ---- -namespace: ParseStatement -expectation: Fail -outputs: - - " --> test:1:1\n |\n 1 | return\n | ^^^^^^\n |\n = unexpected EOF" - - " --> test:1:8\n |\n 1 | return 5\n | ^\n |\n = unexpected EOF" - - " --> test:2:1\n |\n 2 | if x {}\n | ^^\n |\n = expected 'expression', got 'if'" From 032341089be31744caeaea72a260312e4ffedcbe Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 5 May 2021 17:48:33 +0300 Subject: [PATCH 07/26] program state --- tests/compiler/{field => _field}/add.leo | 0 .../{field => _field}/console_assert.leo | 0 tests/compiler/{field => _field}/div.leo | 0 tests/compiler/{field => _field}/eq.leo | 0 tests/compiler/{field => _field}/field.leo | 0 .../{field => _field}/input/register_one.in | 0 .../{field => _field}/input/register_zero.in | 0 tests/compiler/{field => _field}/mod.rs | 0 tests/compiler/{field => _field}/mul.leo | 0 tests/compiler/{field => _field}/negate.leo | 0 .../no_space_between_literal.leo | 0 .../{field => _field}/output/register_one.out | 0 .../output/register_zero.out | 0 .../{field => _field}/output_register.leo | 0 tests/compiler/{field => _field}/sub.leo | 0 tests/compiler/{field => _field}/ternary.leo | 0 tests/compiler/{group => _group}/add.leo | 0 .../compiler/{group => _group}/assert_eq.leo | 0 .../{group => _group}/both_sign_high.leo | 0 .../{group => _group}/both_sign_inferred.leo | 0 .../{group => _group}/both_sign_low.leo | 0 tests/compiler/{group => _group}/eq.leo | 0 tests/compiler/{group => _group}/input.leo | 0 .../{group => _group}/input/invalid.in | 0 .../compiler/{group => _group}/input/point.in | 0 .../compiler/{group => _group}/input/valid.in | 0 tests/compiler/{group => _group}/mod.rs | 0 tests/compiler/{group => _group}/negate.leo | 0 .../no_space_between_literal.leo | 0 tests/compiler/{group => _group}/one.leo | 0 tests/compiler/{group => _group}/point.leo | 0 .../{group => _group}/point_input.leo | 0 .../positive_and_negative.leo | 0 tests/compiler/{group => _group}/sub.leo | 0 tests/compiler/{group => _group}/ternary.leo | 0 tests/compiler/{group => _group}/x_and_y.leo | 0 .../{group => _group}/x_sign_high.leo | 0 .../{group => _group}/x_sign_inferred.leo | 0 .../compiler/{group => _group}/x_sign_low.leo | 0 .../{group => _group}/y_sign_high.leo | 0 .../{group => _group}/y_sign_inferred.leo | 0 .../compiler/{group => _group}/y_sign_low.leo | 0 tests/compiler/{group => _group}/zero.leo | 0 .../program_input/input/main_array.in | 3 + .../input_files/program_input/main_array.leo | 5 +- .../input/main_array.in | 3 + .../program_input_constants/main_array.leo | 4 +- .../input_files/program_registers/mod.rs | 53 ------------- .../output/registers_array.out | 2 - .../output/registers_pass.out | 2 - .../program_registers/registers_array.leo | 8 +- .../program_registers/registers_fail.leo | 8 +- .../program_registers/registers_pass.leo | 8 +- .../input_files/program_state/access_all.leo | 15 ++-- .../program_state/access_state.leo | 13 +++- .../input_files/program_state/basic.leo | 10 +++ .../input_files/program_state/input/dummy.in | 2 + .../compiler/input_files/program_state/mod.rs | 78 ------------------- .../program_state/section_invalid.leo | 10 +++ .../program_state/section_undefined.leo | 10 +++ .../program_state/visibility_fail.leo | 10 +++ .../program_input/main_array.leo.out | 5 +- .../main_array.leo.out | 5 +- .../program_registers/registers_array.leo.out | 18 +++++ .../program_registers/registers_fail.leo.out | 5 ++ .../program_registers/registers_pass.leo.out | 18 +++++ .../program_state/access_all.leo.out | 18 +++++ .../program_state/access_state.leo.out | 18 +++++ .../input_files/program_state/basic.leo.out | 18 +++++ .../program_state/section_invalid.leo.out | 5 ++ .../program_state/section_undefined.leo.out | 5 ++ .../program_state/visibility_fail.leo.out | 5 ++ 72 files changed, 211 insertions(+), 153 deletions(-) rename tests/compiler/{field => _field}/add.leo (100%) rename tests/compiler/{field => _field}/console_assert.leo (100%) rename tests/compiler/{field => _field}/div.leo (100%) rename tests/compiler/{field => _field}/eq.leo (100%) rename tests/compiler/{field => _field}/field.leo (100%) rename tests/compiler/{field => _field}/input/register_one.in (100%) rename tests/compiler/{field => _field}/input/register_zero.in (100%) rename tests/compiler/{field => _field}/mod.rs (100%) rename tests/compiler/{field => _field}/mul.leo (100%) rename tests/compiler/{field => _field}/negate.leo (100%) rename tests/compiler/{field => _field}/no_space_between_literal.leo (100%) rename tests/compiler/{field => _field}/output/register_one.out (100%) rename tests/compiler/{field => _field}/output/register_zero.out (100%) rename tests/compiler/{field => _field}/output_register.leo (100%) rename tests/compiler/{field => _field}/sub.leo (100%) rename tests/compiler/{field => _field}/ternary.leo (100%) rename tests/compiler/{group => _group}/add.leo (100%) rename tests/compiler/{group => _group}/assert_eq.leo (100%) rename tests/compiler/{group => _group}/both_sign_high.leo (100%) rename tests/compiler/{group => _group}/both_sign_inferred.leo (100%) rename tests/compiler/{group => _group}/both_sign_low.leo (100%) rename tests/compiler/{group => _group}/eq.leo (100%) rename tests/compiler/{group => _group}/input.leo (100%) rename tests/compiler/{group => _group}/input/invalid.in (100%) rename tests/compiler/{group => _group}/input/point.in (100%) rename tests/compiler/{group => _group}/input/valid.in (100%) rename tests/compiler/{group => _group}/mod.rs (100%) rename tests/compiler/{group => _group}/negate.leo (100%) rename tests/compiler/{group => _group}/no_space_between_literal.leo (100%) rename tests/compiler/{group => _group}/one.leo (100%) rename tests/compiler/{group => _group}/point.leo (100%) rename tests/compiler/{group => _group}/point_input.leo (100%) rename tests/compiler/{group => _group}/positive_and_negative.leo (100%) rename tests/compiler/{group => _group}/sub.leo (100%) rename tests/compiler/{group => _group}/ternary.leo (100%) rename tests/compiler/{group => _group}/x_and_y.leo (100%) rename tests/compiler/{group => _group}/x_sign_high.leo (100%) rename tests/compiler/{group => _group}/x_sign_inferred.leo (100%) rename tests/compiler/{group => _group}/x_sign_low.leo (100%) rename tests/compiler/{group => _group}/y_sign_high.leo (100%) rename tests/compiler/{group => _group}/y_sign_inferred.leo (100%) rename tests/compiler/{group => _group}/y_sign_low.leo (100%) rename tests/compiler/{group => _group}/zero.leo (100%) delete mode 100644 tests/compiler/input_files/program_registers/mod.rs delete mode 100644 tests/compiler/input_files/program_registers/output/registers_array.out delete mode 100644 tests/compiler/input_files/program_registers/output/registers_pass.out create mode 100644 tests/compiler/input_files/program_state/basic.leo create mode 100644 tests/compiler/input_files/program_state/input/dummy.in delete mode 100644 tests/compiler/input_files/program_state/mod.rs create mode 100644 tests/compiler/input_files/program_state/section_invalid.leo create mode 100644 tests/compiler/input_files/program_state/section_undefined.leo create mode 100644 tests/compiler/input_files/program_state/visibility_fail.leo create mode 100644 tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_state/section_invalid.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_state/section_undefined.leo.out create mode 100644 tests/expectations/compiler/compiler/input_files/program_state/visibility_fail.leo.out diff --git a/tests/compiler/field/add.leo b/tests/compiler/_field/add.leo similarity index 100% rename from tests/compiler/field/add.leo rename to tests/compiler/_field/add.leo diff --git a/tests/compiler/field/console_assert.leo b/tests/compiler/_field/console_assert.leo similarity index 100% rename from tests/compiler/field/console_assert.leo rename to tests/compiler/_field/console_assert.leo diff --git a/tests/compiler/field/div.leo b/tests/compiler/_field/div.leo similarity index 100% rename from tests/compiler/field/div.leo rename to tests/compiler/_field/div.leo diff --git a/tests/compiler/field/eq.leo b/tests/compiler/_field/eq.leo similarity index 100% rename from tests/compiler/field/eq.leo rename to tests/compiler/_field/eq.leo diff --git a/tests/compiler/field/field.leo b/tests/compiler/_field/field.leo similarity index 100% rename from tests/compiler/field/field.leo rename to tests/compiler/_field/field.leo diff --git a/tests/compiler/field/input/register_one.in b/tests/compiler/_field/input/register_one.in similarity index 100% rename from tests/compiler/field/input/register_one.in rename to tests/compiler/_field/input/register_one.in diff --git a/tests/compiler/field/input/register_zero.in b/tests/compiler/_field/input/register_zero.in similarity index 100% rename from tests/compiler/field/input/register_zero.in rename to tests/compiler/_field/input/register_zero.in diff --git a/tests/compiler/field/mod.rs b/tests/compiler/_field/mod.rs similarity index 100% rename from tests/compiler/field/mod.rs rename to tests/compiler/_field/mod.rs diff --git a/tests/compiler/field/mul.leo b/tests/compiler/_field/mul.leo similarity index 100% rename from tests/compiler/field/mul.leo rename to tests/compiler/_field/mul.leo diff --git a/tests/compiler/field/negate.leo b/tests/compiler/_field/negate.leo similarity index 100% rename from tests/compiler/field/negate.leo rename to tests/compiler/_field/negate.leo diff --git a/tests/compiler/field/no_space_between_literal.leo b/tests/compiler/_field/no_space_between_literal.leo similarity index 100% rename from tests/compiler/field/no_space_between_literal.leo rename to tests/compiler/_field/no_space_between_literal.leo diff --git a/tests/compiler/field/output/register_one.out b/tests/compiler/_field/output/register_one.out similarity index 100% rename from tests/compiler/field/output/register_one.out rename to tests/compiler/_field/output/register_one.out diff --git a/tests/compiler/field/output/register_zero.out b/tests/compiler/_field/output/register_zero.out similarity index 100% rename from tests/compiler/field/output/register_zero.out rename to tests/compiler/_field/output/register_zero.out diff --git a/tests/compiler/field/output_register.leo b/tests/compiler/_field/output_register.leo similarity index 100% rename from tests/compiler/field/output_register.leo rename to tests/compiler/_field/output_register.leo diff --git a/tests/compiler/field/sub.leo b/tests/compiler/_field/sub.leo similarity index 100% rename from tests/compiler/field/sub.leo rename to tests/compiler/_field/sub.leo diff --git a/tests/compiler/field/ternary.leo b/tests/compiler/_field/ternary.leo similarity index 100% rename from tests/compiler/field/ternary.leo rename to tests/compiler/_field/ternary.leo diff --git a/tests/compiler/group/add.leo b/tests/compiler/_group/add.leo similarity index 100% rename from tests/compiler/group/add.leo rename to tests/compiler/_group/add.leo diff --git a/tests/compiler/group/assert_eq.leo b/tests/compiler/_group/assert_eq.leo similarity index 100% rename from tests/compiler/group/assert_eq.leo rename to tests/compiler/_group/assert_eq.leo diff --git a/tests/compiler/group/both_sign_high.leo b/tests/compiler/_group/both_sign_high.leo similarity index 100% rename from tests/compiler/group/both_sign_high.leo rename to tests/compiler/_group/both_sign_high.leo diff --git a/tests/compiler/group/both_sign_inferred.leo b/tests/compiler/_group/both_sign_inferred.leo similarity index 100% rename from tests/compiler/group/both_sign_inferred.leo rename to tests/compiler/_group/both_sign_inferred.leo diff --git a/tests/compiler/group/both_sign_low.leo b/tests/compiler/_group/both_sign_low.leo similarity index 100% rename from tests/compiler/group/both_sign_low.leo rename to tests/compiler/_group/both_sign_low.leo diff --git a/tests/compiler/group/eq.leo b/tests/compiler/_group/eq.leo similarity index 100% rename from tests/compiler/group/eq.leo rename to tests/compiler/_group/eq.leo diff --git a/tests/compiler/group/input.leo b/tests/compiler/_group/input.leo similarity index 100% rename from tests/compiler/group/input.leo rename to tests/compiler/_group/input.leo diff --git a/tests/compiler/group/input/invalid.in b/tests/compiler/_group/input/invalid.in similarity index 100% rename from tests/compiler/group/input/invalid.in rename to tests/compiler/_group/input/invalid.in diff --git a/tests/compiler/group/input/point.in b/tests/compiler/_group/input/point.in similarity index 100% rename from tests/compiler/group/input/point.in rename to tests/compiler/_group/input/point.in diff --git a/tests/compiler/group/input/valid.in b/tests/compiler/_group/input/valid.in similarity index 100% rename from tests/compiler/group/input/valid.in rename to tests/compiler/_group/input/valid.in diff --git a/tests/compiler/group/mod.rs b/tests/compiler/_group/mod.rs similarity index 100% rename from tests/compiler/group/mod.rs rename to tests/compiler/_group/mod.rs diff --git a/tests/compiler/group/negate.leo b/tests/compiler/_group/negate.leo similarity index 100% rename from tests/compiler/group/negate.leo rename to tests/compiler/_group/negate.leo diff --git a/tests/compiler/group/no_space_between_literal.leo b/tests/compiler/_group/no_space_between_literal.leo similarity index 100% rename from tests/compiler/group/no_space_between_literal.leo rename to tests/compiler/_group/no_space_between_literal.leo diff --git a/tests/compiler/group/one.leo b/tests/compiler/_group/one.leo similarity index 100% rename from tests/compiler/group/one.leo rename to tests/compiler/_group/one.leo diff --git a/tests/compiler/group/point.leo b/tests/compiler/_group/point.leo similarity index 100% rename from tests/compiler/group/point.leo rename to tests/compiler/_group/point.leo diff --git a/tests/compiler/group/point_input.leo b/tests/compiler/_group/point_input.leo similarity index 100% rename from tests/compiler/group/point_input.leo rename to tests/compiler/_group/point_input.leo diff --git a/tests/compiler/group/positive_and_negative.leo b/tests/compiler/_group/positive_and_negative.leo similarity index 100% rename from tests/compiler/group/positive_and_negative.leo rename to tests/compiler/_group/positive_and_negative.leo diff --git a/tests/compiler/group/sub.leo b/tests/compiler/_group/sub.leo similarity index 100% rename from tests/compiler/group/sub.leo rename to tests/compiler/_group/sub.leo diff --git a/tests/compiler/group/ternary.leo b/tests/compiler/_group/ternary.leo similarity index 100% rename from tests/compiler/group/ternary.leo rename to tests/compiler/_group/ternary.leo 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 similarity index 100% rename from tests/compiler/group/x_sign_high.leo rename to tests/compiler/_group/x_sign_high.leo diff --git a/tests/compiler/group/x_sign_inferred.leo b/tests/compiler/_group/x_sign_inferred.leo similarity index 100% rename from tests/compiler/group/x_sign_inferred.leo rename to tests/compiler/_group/x_sign_inferred.leo diff --git a/tests/compiler/group/x_sign_low.leo b/tests/compiler/_group/x_sign_low.leo similarity index 100% rename from tests/compiler/group/x_sign_low.leo rename to tests/compiler/_group/x_sign_low.leo diff --git a/tests/compiler/group/y_sign_high.leo b/tests/compiler/_group/y_sign_high.leo similarity index 100% rename from tests/compiler/group/y_sign_high.leo rename to tests/compiler/_group/y_sign_high.leo diff --git a/tests/compiler/group/y_sign_inferred.leo b/tests/compiler/_group/y_sign_inferred.leo similarity index 100% rename from tests/compiler/group/y_sign_inferred.leo rename to tests/compiler/_group/y_sign_inferred.leo diff --git a/tests/compiler/group/y_sign_low.leo b/tests/compiler/_group/y_sign_low.leo similarity index 100% rename from tests/compiler/group/y_sign_low.leo rename to tests/compiler/_group/y_sign_low.leo diff --git a/tests/compiler/group/zero.leo b/tests/compiler/_group/zero.leo similarity index 100% rename from tests/compiler/group/zero.leo rename to tests/compiler/_group/zero.leo diff --git a/tests/compiler/input_files/program_input/input/main_array.in b/tests/compiler/input_files/program_input/input/main_array.in index 34db280b2e..990cce98e9 100644 --- a/tests/compiler/input_files/program_input/input/main_array.in +++ b/tests/compiler/input_files/program_input/input/main_array.in @@ -1,2 +1,5 @@ [main] x: [i16; 1] = [0i16; 1]; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input/main_array.leo b/tests/compiler/input_files/program_input/main_array.leo index bd38e94cc8..349b05380a 100644 --- a/tests/compiler/input_files/program_input/main_array.leo +++ b/tests/compiler/input_files/program_input/main_array.leo @@ -4,7 +4,6 @@ expectation: Pass input_file: input/main_array.in */ -function main(x: [i16; 1]) { - console.log("{}", x); - console.assert(x[0] == 0); +function main(x: [i16; 1]) -> bool{ + return x[0] == 0; } diff --git a/tests/compiler/input_files/program_input_constants/input/main_array.in b/tests/compiler/input_files/program_input_constants/input/main_array.in index 3fe6502e8f..0cfd797088 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_array.in +++ b/tests/compiler/input_files/program_input_constants/input/main_array.in @@ -1,2 +1,5 @@ [constants] x: [i16; 1] = [0i16; 1]; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input_constants/main_array.leo b/tests/compiler/input_files/program_input_constants/main_array.leo index b00d7b942c..24e6b9bfa9 100644 --- a/tests/compiler/input_files/program_input_constants/main_array.leo +++ b/tests/compiler/input_files/program_input_constants/main_array.leo @@ -4,7 +4,7 @@ expectation: Pass input_file: input/main_array.in */ -function main(const x: [i16; 1]) { +function main(const x: [i16; 1]) -> bool { console.log("{}", x); - console.assert(x[0] == 0); + return x[0] == 0; } diff --git a/tests/compiler/input_files/program_registers/mod.rs b/tests/compiler/input_files/program_registers/mod.rs deleted file mode 100644 index b172c141e0..0000000000 --- a/tests/compiler/input_files/program_registers/mod.rs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{expect_compiler_error, get_output, parse_program_with_input}; - -#[test] -fn test_registers_pass() { - let program_string = include_str!("registers_pass.leo"); - let input_string = include_str!("input/main.in"); - let expected = include_bytes!("output/registers_pass.out"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let actual = get_output(program); - - assert!(expected.eq(actual.bytes().as_slice())); -} - -#[test] -fn test_registers_fail() { - let program_string = include_str!("registers_fail.leo"); - let input_string = include_str!("input/main.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_registers_array() { - let program_string = include_str!("registers_array.leo"); - let input_string = include_str!("input/array.in"); - let expected = include_bytes!("output/registers_array.out"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let actual = get_output(program); - - assert!(expected.eq(actual.bytes().as_slice())); -} diff --git a/tests/compiler/input_files/program_registers/output/registers_array.out b/tests/compiler/input_files/program_registers/output/registers_array.out deleted file mode 100644 index 20294ac107..0000000000 --- a/tests/compiler/input_files/program_registers/output/registers_array.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r2: [[u8; 4]; 2] = [[1, 2, 3, 4], [5, 6, 7, 8]]; diff --git a/tests/compiler/input_files/program_registers/output/registers_pass.out b/tests/compiler/input_files/program_registers/output/registers_pass.out deleted file mode 100644 index e26ba9195e..0000000000 --- a/tests/compiler/input_files/program_registers/output/registers_pass.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: u8 = 1; diff --git a/tests/compiler/input_files/program_registers/registers_array.leo b/tests/compiler/input_files/program_registers/registers_array.leo index 324515c13f..26c90ab073 100644 --- a/tests/compiler/input_files/program_registers/registers_array.leo +++ b/tests/compiler/input_files/program_registers/registers_array.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/array.in +*/ + function main () -> [[u8; 4]; 2] { return [[1u8, 2u8, 3u8, 4u8], [5u8, 6u8, 7u8, 8u8]]; -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_registers/registers_fail.leo b/tests/compiler/input_files/program_registers/registers_fail.leo index 78af2bb5d8..cbc8dd4de2 100644 --- a/tests/compiler/input_files/program_registers/registers_fail.leo +++ b/tests/compiler/input_files/program_registers/registers_fail.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/main.in +*/ + function main() -> bool { return false; -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_registers/registers_pass.leo b/tests/compiler/input_files/program_registers/registers_pass.leo index ff5ef4a0cd..f5afc3337c 100644 --- a/tests/compiler/input_files/program_registers/registers_pass.leo +++ b/tests/compiler/input_files/program_registers/registers_pass.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/main.in +*/ + function main() -> u8 { return 1u8; -} \ No newline at end of file +} diff --git a/tests/compiler/input_files/program_state/access_all.leo b/tests/compiler/input_files/program_state/access_all.leo index bf85a3f722..1f830228b6 100644 --- a/tests/compiler/input_files/program_state/access_all.leo +++ b/tests/compiler/input_files/program_state/access_all.leo @@ -1,8 +1,13 @@ -function main() { - console.assert(input.state.root == [0u8; 32]); +/* +namespace: Compile +expectation: Pass +state_file: input/token_withdraw.state +input_file: input/dummy.in +*/ +function main() -> bool { const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - //console.assert(input.record.owner, expected); - console.assert(input.state_leaf.network_id == 0u8); -} \ No newline at end of file + return input.state.root == [0u8; 32] + && input.state_leaf.network_id == 0u8; +} diff --git a/tests/compiler/input_files/program_state/access_state.leo b/tests/compiler/input_files/program_state/access_state.leo index a7afe50a5f..d345e4d1db 100644 --- a/tests/compiler/input_files/program_state/access_state.leo +++ b/tests/compiler/input_files/program_state/access_state.leo @@ -1,3 +1,10 @@ -function main() { - console.assert(input.state.root == [0u8; 32]); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +state_file: input/token_withdraw.state +input_file: input/dummy.in +*/ + +function main() -> bool { + return input.state.root == [0u8; 32]; +} diff --git a/tests/compiler/input_files/program_state/basic.leo b/tests/compiler/input_files/program_state/basic.leo new file mode 100644 index 0000000000..aeea0b2b3c --- /dev/null +++ b/tests/compiler/input_files/program_state/basic.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Pass +state_file: input/basic.state +input_file: input/dummy.in +*/ + +function main() -> bool { + return true; +} diff --git a/tests/compiler/input_files/program_state/input/dummy.in b/tests/compiler/input_files/program_state/input/dummy.in new file mode 100644 index 0000000000..459883ff33 --- /dev/null +++ b/tests/compiler/input_files/program_state/input/dummy.in @@ -0,0 +1,2 @@ +[registers] +r0: bool = false; diff --git a/tests/compiler/input_files/program_state/mod.rs b/tests/compiler/input_files/program_state/mod.rs deleted file mode 100644 index c5959196f5..0000000000 --- a/tests/compiler/input_files/program_state/mod.rs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_program_with_state, parse_state}; - -#[test] -fn test_basic() { - let state_string = include_str!("input/basic.state"); - - parse_state(state_string).unwrap(); -} - -#[test] -fn test_token_withdraw() { - let state_string = include_str!("input/token_withdraw.state"); - - parse_state(state_string).unwrap(); -} - -#[test] -fn test_access_state() { - let program_string = include_str!("access_state.leo"); - let state_string = include_str!("input/token_withdraw.state"); - - let program = parse_program_with_state(program_string, state_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_access_all() { - let program_string = include_str!("access_all.leo"); - let state_string = include_str!("input/token_withdraw.state"); - - let program = parse_program_with_state(program_string, state_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_visibility_fail() { - let state_string = include_str!("input/visibility_fail.state"); - - let is_err = parse_state(state_string).is_err(); - - assert!(is_err); -} - -#[test] -fn test_section_undefined() { - let state_string = include_str!("input/section_undefined.state"); - - let is_err = parse_state(state_string).is_err(); - - assert!(is_err); -} - -#[test] -fn test_section_invalid() { - let state_string = include_str!("input/section_invalid.state"); - - let is_err = parse_state(state_string).is_err(); - - assert!(is_err); -} diff --git a/tests/compiler/input_files/program_state/section_invalid.leo b/tests/compiler/input_files/program_state/section_invalid.leo new file mode 100644 index 0000000000..109f311a98 --- /dev/null +++ b/tests/compiler/input_files/program_state/section_invalid.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Fail +state_file: input/section_invalid.state +input_file: input/dummy.in +*/ + +function main() -> bool { + return true; +} diff --git a/tests/compiler/input_files/program_state/section_undefined.leo b/tests/compiler/input_files/program_state/section_undefined.leo new file mode 100644 index 0000000000..78195b0194 --- /dev/null +++ b/tests/compiler/input_files/program_state/section_undefined.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Fail +state_file: input/section_undefined.state +input_file: input/dummy.in +*/ + +function main() -> bool { + return true; +} diff --git a/tests/compiler/input_files/program_state/visibility_fail.leo b/tests/compiler/input_files/program_state/visibility_fail.leo new file mode 100644 index 0000000000..ea296f0ea2 --- /dev/null +++ b/tests/compiler/input_files/program_state/visibility_fail.leo @@ -0,0 +1,10 @@ +/* +namespace: Compile +expectation: Fail +state_file: input/visibility_fail.state +input_file: input/dummy.in +*/ + +function main() -> bool { + return true; +} diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out index 9ef270002c..dbeaf93fae 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: input/main_array.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out index ff0fd97799..319c7575a2 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: input/main_array.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out new file mode 100644 index 0000000000..0388ee9560 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/array.in + output: + registers: + r2: + type: "[[u8; 4]; 2]" + value: "[[1, 2, 3, 4], [5, 6, 7, 8]]" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out new file mode 100644 index 0000000000..887d34e7fb --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n | ^\n |\n = Mismatched types. Expected register output type `u8`, found type `bool`." diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out new file mode 100644 index 0000000000..2aae6495e7 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/main.in + output: + registers: + r: + type: u8 + value: "1" diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out new file mode 100644 index 0000000000..3981affaa5 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_all.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 527 + num_constraints: 527 + at: 7f6c7713392a44fa83a3fbffafd830d6e20356d72aff3d67f78c70ea5439a735 + bt: b21f2049f4ae8c11dff5de8b33d532f3ea7637bfdbd09395d056495472c1853a + ct: 096693f8f4f40acd0e3f82bd256738e157f33989bcc68a7b8eabe44e8449bbb0 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out new file mode 100644 index 0000000000..ed8115906e --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_state/access_state.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 511 + num_constraints: 511 + at: bb121a0b56bee9895a337644cf8ece2f09dcf9113cd75c29f9bf26d635ba6d22 + bt: 4a54bb6ffc0c9de1f8f349449b9071745f3db6985adb9b1d657e8aaa4309cc41 + ct: a0736e8c8f3bb1c39a147348754e53dfd31fd76a1df9cd9960472841bcc531df + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_state/section_invalid.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/section_invalid.leo.out new file mode 100644 index 0000000000..995afe29e0 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_state/section_invalid.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - aborting due to syntax error diff --git a/tests/expectations/compiler/compiler/input_files/program_state/section_undefined.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/section_undefined.leo.out new file mode 100644 index 0000000000..995afe29e0 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_state/section_undefined.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - aborting due to syntax error diff --git a/tests/expectations/compiler/compiler/input_files/program_state/visibility_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/visibility_fail.leo.out new file mode 100644 index 0000000000..995afe29e0 --- /dev/null +++ b/tests/expectations/compiler/compiler/input_files/program_state/visibility_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - aborting due to syntax error From 925afef17c4c5e63ff711fc9cafcd7b913f29dfc Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 5 May 2021 18:29:44 +0300 Subject: [PATCH 08/26] function --- tests/compiler/function/array_input.leo | 9 +- .../function/array_params_direct_call.leo | 7 +- .../compiler/function/conditional_return.leo | 16 +- ...tion.leo => duplicate_definition_fail.leo} | 8 +- tests/compiler/function/empty.leo | 7 +- .../function/input/conditional_return.in | 5 - tests/compiler/function/input/dummy.in | 7 + .../input/{newlines.in => integers.in} | 0 tests/compiler/function/input/registers.in | 3 - tests/compiler/function/iteration.leo | 12 +- .../compiler/function/iteration_repeated.leo | 12 +- tests/compiler/function/mod.rs | 221 ------------------ tests/compiler/function/multiple_returns.leo | 13 +- .../function/multiple_returns_fail.leo | 8 +- .../multiple_returns_fail_conditional.leo | 14 +- .../function/multiple_returns_main.leo | 8 +- tests/compiler/function/newlines.leo | 8 +- .../function/output/conditional_return.out | 2 - tests/compiler/function/output/newlines.out | 3 - tests/compiler/function/output/registers.out | 3 - tests/compiler/function/repeated.leo | 12 +- tests/compiler/function/return.leo | 12 +- .../function/return_array_nested_fail.leo | 8 +- .../function/return_array_nested_pass.leo | 8 +- .../function/return_array_tuple_fail.leo | 8 +- .../function/return_array_tuple_pass.leo | 8 +- tests/compiler/function/return_tuple.leo | 12 +- .../function/return_tuple_conditional.leo | 16 +- tests/compiler/function/scope_fail.leo | 10 +- tests/compiler/function/undefined.leo | 8 +- tests/compiler/function/value_unchanged.leo | 12 +- .../mutability/{array.leo => array_fail.leo} | 3 +- tests/compiler/mutability/array_mut.leo | 7 +- .../compiler/mutability/array_splice_mut.leo | 11 +- tests/compiler/mutability/array_tuple_mut.leo | 9 +- .../{circuit.leo => circuit_fail.leo} | 0 .../mutability/circuit_function_const.leo | 7 +- .../mutability/circuit_function_mut.leo | 7 +- ...o => circuit_static_function_mut_fail.leo} | 2 +- .../mutability/circuit_variable_mut.leo | 7 +- tests/compiler/mutability/cond_mut.leo | 7 +- tests/compiler/mutability/function_input.leo | 9 +- .../mutability/function_input_mut.leo | 11 +- tests/compiler/mutability/input/dummy.in | 9 + tests/compiler/mutability/let_mut.leo | 7 +- tests/compiler/mutability/let_mut_nested.leo | 6 +- tests/compiler/mutability/swap.leo | 10 +- .../compiler/function/array_input.leo.out | 15 ++ .../function/array_params_direct_call.leo.out | 15 ++ .../function/conditional_return.leo.out | 18 ++ .../duplicate_definition_fail.leo.out | 5 + .../compiler/compiler/function/empty.leo.out | 15 ++ .../compiler/function/iteration.leo.out | 18 ++ .../function/iteration_repeated.leo.out | 18 ++ .../function/multiple_returns.leo.out | 18 ++ .../function/multiple_returns_fail.leo.out | 5 + .../multiple_returns_fail_conditional.leo.out | 5 + .../function/multiple_returns_main.leo.out | 21 ++ .../compiler/function/newlines.leo.out | 21 ++ .../compiler/function/repeated.leo.out | 18 ++ .../compiler/compiler/function/return.leo.out | 18 ++ .../function/return_array_nested_fail.leo.out | 5 + .../function/return_array_nested_pass.leo.out | 15 ++ .../function/return_array_tuple_fail.leo.out | 5 + .../function/return_array_tuple_pass.leo.out | 15 ++ .../compiler/function/return_tuple.leo.out | 15 ++ .../function/return_tuple_conditional.leo.out | 21 ++ .../compiler/function/scope_fail.leo.out | 5 + .../compiler/function/undefined.leo.out | 5 + .../compiler/function/value_unchanged.leo.out | 18 ++ .../{array.leo.out => array_fail.leo.out} | 2 +- .../compiler/mutability/array_mut.leo.out | 7 +- .../mutability/array_splice_mut.leo.out | 7 +- .../mutability/array_tuple_mut.leo.out | 7 +- .../{circuit.leo.out => circuit_fail.leo.out} | 0 .../mutability/circuit_function_mut.leo.out | 7 +- ... circuit_static_function_mut_fail.leo.out} | 0 .../mutability/circuit_variable_mut.leo.out | 7 +- .../compiler/mutability/cond_mut.leo.out | 7 +- .../mutability/function_input.leo.out | 2 +- .../mutability/function_input_mut.leo.out | 7 +- .../compiler/mutability/let_mut.leo.out | 17 +- .../mutability/let_mut_nested.leo.out | 7 +- .../compiler/compiler/mutability/swap.leo.out | 2 +- 84 files changed, 627 insertions(+), 358 deletions(-) rename tests/compiler/function/{duplicate_definition.leo => duplicate_definition_fail.leo} (67%) delete mode 100644 tests/compiler/function/input/conditional_return.in create mode 100644 tests/compiler/function/input/dummy.in rename tests/compiler/function/input/{newlines.in => integers.in} (100%) delete mode 100644 tests/compiler/function/input/registers.in delete mode 100644 tests/compiler/function/mod.rs delete mode 100644 tests/compiler/function/output/conditional_return.out delete mode 100644 tests/compiler/function/output/newlines.out delete mode 100644 tests/compiler/function/output/registers.out rename tests/compiler/mutability/{array.leo => array_fail.leo} (72%) rename tests/compiler/mutability/{circuit.leo => circuit_fail.leo} (100%) rename tests/compiler/mutability/{circuit_static_function_mut.leo => circuit_static_function_mut_fail.leo} (98%) create mode 100644 tests/compiler/mutability/input/dummy.in create mode 100644 tests/expectations/compiler/compiler/function/array_input.leo.out create mode 100644 tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out create mode 100644 tests/expectations/compiler/compiler/function/conditional_return.leo.out create mode 100644 tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/function/empty.leo.out create mode 100644 tests/expectations/compiler/compiler/function/iteration.leo.out create mode 100644 tests/expectations/compiler/compiler/function/iteration_repeated.leo.out create mode 100644 tests/expectations/compiler/compiler/function/multiple_returns.leo.out create mode 100644 tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out create mode 100644 tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out create mode 100644 tests/expectations/compiler/compiler/function/newlines.leo.out create mode 100644 tests/expectations/compiler/compiler/function/repeated.leo.out create mode 100644 tests/expectations/compiler/compiler/function/return.leo.out create mode 100644 tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out create mode 100644 tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out create mode 100644 tests/expectations/compiler/compiler/function/return_tuple.leo.out create mode 100644 tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out create mode 100644 tests/expectations/compiler/compiler/function/scope_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/function/undefined.leo.out create mode 100644 tests/expectations/compiler/compiler/function/value_unchanged.leo.out rename tests/expectations/compiler/compiler/mutability/{array.leo.out => array_fail.leo.out} (67%) rename tests/expectations/compiler/compiler/mutability/{circuit.leo.out => circuit_fail.leo.out} (100%) rename tests/expectations/compiler/compiler/mutability/{circuit_static_function_mut.leo.out => circuit_static_function_mut_fail.leo.out} (100%) diff --git a/tests/compiler/function/array_input.leo b/tests/compiler/function/array_input.leo index 899c0e4af6..6e3a1f18ad 100644 --- a/tests/compiler/function/array_input.leo +++ b/tests/compiler/function/array_input.leo @@ -1,6 +1,11 @@ +/* +namespace: Compile +expectation: Pass +*/ + function foo(a: [u8; 1]) {} function main() { - const a: [u16; 1] = [1; 1]; + const a: [u8; 1] = [1; 1]; foo(a); -} \ No newline at end of file +} diff --git a/tests/compiler/function/array_params_direct_call.leo b/tests/compiler/function/array_params_direct_call.leo index 86762aabc7..094f0a852e 100644 --- a/tests/compiler/function/array_params_direct_call.leo +++ b/tests/compiler/function/array_params_direct_call.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function do_nothing(arr: [u32; 2]) {} function main() { @@ -6,4 +11,4 @@ function main() { do_nothing(arr); do_nothing([...arr]); do_nothing(arr[0u32..]); -} \ No newline at end of file +} diff --git a/tests/compiler/function/conditional_return.leo b/tests/compiler/function/conditional_return.leo index e27dd7aea5..84bdbf7928 100644 --- a/tests/compiler/function/conditional_return.leo +++ b/tests/compiler/function/conditional_return.leo @@ -1,7 +1,13 @@ -function main(x: u8) -> u8 { - if x == 2u8 { - return 3u8; +/* +namespace: Compile +expectation: Pass +input_file: input/integers.in +*/ + +function main(a: u32) -> u32 { + if a == 2u32 { + return 3u32; } else { - return 4u8; + return 4u32; } -} \ No newline at end of file +} diff --git a/tests/compiler/function/duplicate_definition.leo b/tests/compiler/function/duplicate_definition_fail.leo similarity index 67% rename from tests/compiler/function/duplicate_definition.leo rename to tests/compiler/function/duplicate_definition_fail.leo index cddc9ce7f2..b3f2eb8a7b 100644 --- a/tests/compiler/function/duplicate_definition.leo +++ b/tests/compiler/function/duplicate_definition_fail.leo @@ -1,7 +1,13 @@ +/* +namespace: Compile +expectation: Fail +*/ + + function main() { console.log("{}", 1u8); } function main() { console.log("{}", 2u8); -} \ No newline at end of file +} diff --git a/tests/compiler/function/empty.leo b/tests/compiler/function/empty.leo index f06c976158..3608a8ebed 100644 --- a/tests/compiler/function/empty.leo +++ b/tests/compiler/function/empty.leo @@ -1,5 +1,10 @@ +/* +namespace: Compile +expectation: Pass +*/ + function empty() { } function main() { empty(); -} \ No newline at end of file +} diff --git a/tests/compiler/function/input/conditional_return.in b/tests/compiler/function/input/conditional_return.in deleted file mode 100644 index d2d57dc93c..0000000000 --- a/tests/compiler/function/input/conditional_return.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -x: u8 = 1u8; - -[registers] -x: u8 = 0; diff --git a/tests/compiler/function/input/dummy.in b/tests/compiler/function/input/dummy.in new file mode 100644 index 0000000000..cfe617343a --- /dev/null +++ b/tests/compiler/function/input/dummy.in @@ -0,0 +1,7 @@ +[main] +a: u32 = 10; +b: u32 = 100; + +[registers] +r0: bool = true; +r1: bool = true; diff --git a/tests/compiler/function/input/newlines.in b/tests/compiler/function/input/integers.in similarity index 100% rename from tests/compiler/function/input/newlines.in rename to tests/compiler/function/input/integers.in diff --git a/tests/compiler/function/input/registers.in b/tests/compiler/function/input/registers.in deleted file mode 100644 index 306191c516..0000000000 --- a/tests/compiler/function/input/registers.in +++ /dev/null @@ -1,3 +0,0 @@ -[registers] -a: bool = true; -b: bool = false; diff --git a/tests/compiler/function/iteration.leo b/tests/compiler/function/iteration.leo index 9be86b5a7c..58c199e263 100644 --- a/tests/compiler/function/iteration.leo +++ b/tests/compiler/function/iteration.leo @@ -1,13 +1,19 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + function one() -> u32 { return 1u32; } -function main() { +function main() -> bool { let a = 0u32; for i in 0..10 { a += one(); } - console.assert(a == 10u32); -} \ No newline at end of file + return a == 10u32; +} diff --git a/tests/compiler/function/iteration_repeated.leo b/tests/compiler/function/iteration_repeated.leo index ef4f992d96..30b70bf214 100644 --- a/tests/compiler/function/iteration_repeated.leo +++ b/tests/compiler/function/iteration_repeated.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + function iteration() -> u32 { let a = 0u32; @@ -8,8 +14,8 @@ function iteration() -> u32 { return a; } -function main() { +function main() -> bool { const total = iteration() + iteration(); - console.assert(total == 20); -} \ No newline at end of file + return total == 20; +} diff --git a/tests/compiler/function/mod.rs b/tests/compiler/function/mod.rs deleted file mode 100644 index 8dfb865d90..0000000000 --- a/tests/compiler/function/mod.rs +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_asg_error, get_output, parse_program, parse_program_with_input}; - -#[test] -fn test_conditional_return() { - let input_string = include_str!("input/conditional_return.in"); - let program_string = include_str!("conditional_return.leo"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let expected_string = include_str!("output/conditional_return.out"); - let actual_bytes = get_output(program); - let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); - - assert_eq!(expected_string, actual_string); -} - -#[test] -fn test_empty() { - let program_string = include_str!("empty.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_iteration() { - let program_string = include_str!("iteration.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_iteration_repeated() { - let program_string = include_str!("iteration_repeated.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_newlines() { - let input_string = include_str!("input/newlines.in"); - let program_string = include_str!("newlines.leo"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let expected_string = include_str!("output/newlines.out"); - let actual_bytes = get_output(program); - let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); - - assert_eq!(expected_string, actual_string); -} - -#[test] -fn test_multiple_returns() { - let program_string = include_str!("multiple_returns.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_multiple_returns_fail() { - let program_string = include_str!("multiple_returns_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_multiple_returns_fail_conditional() { - let program_string = include_str!("multiple_returns_fail_conditional.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_multiple_returns_main() { - let program_string = include_str!("multiple_returns_main.leo"); - let input_string = include_str!("input/registers.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let expected_string = include_str!("output/registers.out"); - let actual_bytes = get_output(program); - let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); - - assert_eq!(expected_string, actual_string); -} - -#[test] -fn test_repeated_function_call() { - let program_string = include_str!("repeated.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_return() { - let program_string = include_str!("return.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_scope_fail() { - let program_string = include_str!("scope_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_undefined() { - let program_string = include_str!("undefined.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_value_unchanged() { - let program_string = include_str!("value_unchanged.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_input() { - let program_string = include_str!("array_input.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error) -} - -// Test return multidimensional arrays - -#[test] -fn test_return_array_nested_fail() { - let program_string = include_str!("return_array_nested_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_return_array_nested_pass() { - let program_string = include_str!("return_array_nested_pass.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_return_array_tuple_fail() { - let program_string = include_str!("return_array_tuple_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_return_array_tuple_pass() { - let program_string = include_str!("return_array_tuple_pass.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// Test return tuples - -#[test] -fn test_return_tuple() { - let program_string = include_str!("return_tuple.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_return_tuple_conditional() { - let program_string = include_str!("return_tuple_conditional.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_params_direct_call() { - let program_string = include_str!("array_params_direct_call.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_duplicate_function_definition() { - let program_string = include_str!("duplicate_definition.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} diff --git a/tests/compiler/function/multiple_returns.leo b/tests/compiler/function/multiple_returns.leo index 73797c6ca3..5ec2b2ab48 100644 --- a/tests/compiler/function/multiple_returns.leo +++ b/tests/compiler/function/multiple_returns.leo @@ -1,10 +1,15 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + function tuple() -> (bool, bool) { return (true, false); } -function main() { +function main() -> bool { const (a, b) = tuple(); - console.assert(a == true); - console.assert(b == false); -} \ No newline at end of file + return a == true && b == false; +} diff --git a/tests/compiler/function/multiple_returns_fail.leo b/tests/compiler/function/multiple_returns_fail.leo index c4539bb1a0..ea4f5de447 100644 --- a/tests/compiler/function/multiple_returns_fail.leo +++ b/tests/compiler/function/multiple_returns_fail.leo @@ -1,4 +1,10 @@ -function main () -> i8 { +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + +function main() -> i8 { if true { return 1i8; //ignored } diff --git a/tests/compiler/function/multiple_returns_fail_conditional.leo b/tests/compiler/function/multiple_returns_fail_conditional.leo index ded39534a4..29ce76b882 100644 --- a/tests/compiler/function/multiple_returns_fail_conditional.leo +++ b/tests/compiler/function/multiple_returns_fail_conditional.leo @@ -1,9 +1,15 @@ -function main () -> u16 { +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + +function main() -> bool { if false { const a = 1u16; const b = a + 1u16; - return b; + return b == 2u16; } else if false { - return 0u16; + return true; } -} \ No newline at end of file +} diff --git a/tests/compiler/function/multiple_returns_main.leo b/tests/compiler/function/multiple_returns_main.leo index 8590cdd71e..f0ae21e232 100644 --- a/tests/compiler/function/multiple_returns_main.leo +++ b/tests/compiler/function/multiple_returns_main.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + function main() -> (bool, bool) { - return (input.registers.a, input.registers.b); + return (input.registers.r0, input.registers.r1); } diff --git a/tests/compiler/function/newlines.leo b/tests/compiler/function/newlines.leo index e0b10dead1..f783569809 100644 --- a/tests/compiler/function/newlines.leo +++ b/tests/compiler/function/newlines.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/integers.in +*/ + function main( a: u32, b: u32, @@ -6,4 +12,4 @@ function main( u32, ) { return (a, b); -} \ No newline at end of file +} diff --git a/tests/compiler/function/output/conditional_return.out b/tests/compiler/function/output/conditional_return.out deleted file mode 100644 index 29d80c1cfc..0000000000 --- a/tests/compiler/function/output/conditional_return.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -x: u8 = 4; diff --git a/tests/compiler/function/output/newlines.out b/tests/compiler/function/output/newlines.out deleted file mode 100644 index 197a64cc63..0000000000 --- a/tests/compiler/function/output/newlines.out +++ /dev/null @@ -1,3 +0,0 @@ -[registers] -a: u32 = 0; -b: u32 = 0; diff --git a/tests/compiler/function/output/registers.out b/tests/compiler/function/output/registers.out deleted file mode 100644 index 306191c516..0000000000 --- a/tests/compiler/function/output/registers.out +++ /dev/null @@ -1,3 +0,0 @@ -[registers] -a: bool = true; -b: bool = false; diff --git a/tests/compiler/function/repeated.leo b/tests/compiler/function/repeated.leo index 2f9bc43d77..71b8cdfa6e 100644 --- a/tests/compiler/function/repeated.leo +++ b/tests/compiler/function/repeated.leo @@ -1,9 +1,15 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + function one() -> bool { return true; } -function main() { +function main() -> bool { const a = one() && one(); - console.assert(a == true); -} \ No newline at end of file + return a == true; +} diff --git a/tests/compiler/function/return.leo b/tests/compiler/function/return.leo index e839700ee3..4ebe7e3169 100644 --- a/tests/compiler/function/return.leo +++ b/tests/compiler/function/return.leo @@ -1,7 +1,13 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + function one() -> u32 { return 1u32; } -function main() { - console.assert(one() == 1u32); -} \ No newline at end of file +function main() -> bool { + return one() == 1u32; +} diff --git a/tests/compiler/function/return_array_nested_fail.leo b/tests/compiler/function/return_array_nested_fail.leo index 0db89a09e3..6e1bd15458 100644 --- a/tests/compiler/function/return_array_nested_fail.leo +++ b/tests/compiler/function/return_array_nested_fail.leo @@ -1,7 +1,13 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + function array_3x2_tuple() -> [[u8; 2]; 3] { return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]` } function main() { const b = array_3x2_tuple(); -} \ No newline at end of file +} diff --git a/tests/compiler/function/return_array_nested_pass.leo b/tests/compiler/function/return_array_nested_pass.leo index c7586f3f08..3427f1ea66 100644 --- a/tests/compiler/function/return_array_nested_pass.leo +++ b/tests/compiler/function/return_array_nested_pass.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + function array_3x2_nested() -> [[u8; 2]; 3] { return [[0u8; 2]; 3]; } @@ -9,4 +15,4 @@ function array_3x2_tuple() -> [[u8; 2]; 3] { function main() { const a = array_3x2_nested(); const b = array_3x2_tuple(); -} \ No newline at end of file +} diff --git a/tests/compiler/function/return_array_tuple_fail.leo b/tests/compiler/function/return_array_tuple_fail.leo index d2afcd2790..c5d3a9fd20 100644 --- a/tests/compiler/function/return_array_tuple_fail.leo +++ b/tests/compiler/function/return_array_tuple_fail.leo @@ -1,7 +1,13 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + function array_3x2_nested() -> [u8; (3, 2)] { return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]` } function main() { const a = array_3x2_nested(); -} \ No newline at end of file +} diff --git a/tests/compiler/function/return_array_tuple_pass.leo b/tests/compiler/function/return_array_tuple_pass.leo index 6f5a63e806..1766eac82c 100644 --- a/tests/compiler/function/return_array_tuple_pass.leo +++ b/tests/compiler/function/return_array_tuple_pass.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + function array_3x2_nested() -> [u8; (3, 2)] { return [[0u8; 2]; 3]; } @@ -9,4 +15,4 @@ function array_3x2_tuple() -> [u8; (3, 2)] { function main() { const a = array_3x2_nested(); const b = array_3x2_tuple(); -} \ No newline at end of file +} diff --git a/tests/compiler/function/return_tuple.leo b/tests/compiler/function/return_tuple.leo index 24328aeaaa..c01ae681cf 100644 --- a/tests/compiler/function/return_tuple.leo +++ b/tests/compiler/function/return_tuple.leo @@ -1,3 +1,13 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - tuple.in: | + [registers] + r0: (u8, u8) = (0, 0); + r1: u32 = 100; +*/ + // Returns a tuple of tuples. function tuples() -> ((u8, u8), u32) { const a: (u8, u8) = (1, 2); @@ -8,4 +18,4 @@ function tuples() -> ((u8, u8), u32) { function main() { const t = tuples(); -} \ No newline at end of file +} diff --git a/tests/compiler/function/return_tuple_conditional.leo b/tests/compiler/function/return_tuple_conditional.leo index b8040d47ec..1e0d78269b 100644 --- a/tests/compiler/function/return_tuple_conditional.leo +++ b/tests/compiler/function/return_tuple_conditional.leo @@ -1,7 +1,13 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/integers.in +*/ + // Returns a tuple using a conditional "if" statement. function tuple_conditional () -> ( - i64, - i64 + u32, + u32 ) { if true { return (1, 1); @@ -10,6 +16,6 @@ function tuple_conditional () -> ( } } -function main() { - const t = tuple_conditional(); -} \ No newline at end of file +function main() -> (u32, u32) { + return tuple_conditional(); +} diff --git a/tests/compiler/function/scope_fail.leo b/tests/compiler/function/scope_fail.leo index 693682d297..3f183386ac 100644 --- a/tests/compiler/function/scope_fail.leo +++ b/tests/compiler/function/scope_fail.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Fail +*/ + + function foo() -> field { return myGlobal; } @@ -5,4 +11,6 @@ function foo() -> field { function main() { const myGlobal = 42field; const err = foo(); -} \ No newline at end of file + + // TODO: update after field comparison is enabled +} diff --git a/tests/compiler/function/undefined.leo b/tests/compiler/function/undefined.leo index e1db3b9f09..42e251c558 100644 --- a/tests/compiler/function/undefined.leo +++ b/tests/compiler/function/undefined.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Fail +*/ + + function main() { my_function(); -} \ No newline at end of file +} diff --git a/tests/compiler/function/value_unchanged.leo b/tests/compiler/function/value_unchanged.leo index e116736316..0dc81e52a5 100644 --- a/tests/compiler/function/value_unchanged.leo +++ b/tests/compiler/function/value_unchanged.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + // Functions input in leo are pass-by-value. // // Program execution: @@ -11,9 +17,9 @@ function bad_mutate(x: u32) { x = 0; // <- does not change `a` } -function main() { +function main() -> bool { const a = 1u32; bad_mutate(a); - console.assert(a == 1u32); // <- value `a` is still `1u32` -} \ No newline at end of file + return a == 1u32; // <- value `a` is still `1u32` +} diff --git a/tests/compiler/mutability/array.leo b/tests/compiler/mutability/array_fail.leo similarity index 72% rename from tests/compiler/mutability/array.leo rename to tests/compiler/mutability/array_fail.leo index 8c31a30157..7f24d16bae 100644 --- a/tests/compiler/mutability/array.leo +++ b/tests/compiler/mutability/array_fail.leo @@ -3,8 +3,7 @@ namespace: Compile expectation: Fail */ -// Arrays are immutable by default. function main() { const a = [1u32]; a[0] = 0; -} \ No newline at end of file +} diff --git a/tests/compiler/mutability/array_mut.leo b/tests/compiler/mutability/array_mut.leo index a7e5a01a49..63213303de 100644 --- a/tests/compiler/mutability/array_mut.leo +++ b/tests/compiler/mutability/array_mut.leo @@ -1,11 +1,12 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main() { +function main() -> bool { let a = [1u32]; a[0] = 0; - console.assert(a[0] == 0u32); -} \ No newline at end of file + return a[0] == 0u32; +} diff --git a/tests/compiler/mutability/array_splice_mut.leo b/tests/compiler/mutability/array_splice_mut.leo index c6a928e799..5c3be4d5b9 100644 --- a/tests/compiler/mutability/array_splice_mut.leo +++ b/tests/compiler/mutability/array_splice_mut.leo @@ -1,13 +1,14 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main() { +function main() -> bool { let a = [1u32, 2u32, 3u32]; a[0u32..2u32] = [4u32, 5u32]; - console.assert(a[0] == 4u32); - console.assert(a[1] == 5u32); - console.assert(a[2] == 3u32); -} \ No newline at end of file + return a[0] == 4u32 + && a[1] == 5u32 + && a[2] == 3u32; +} diff --git a/tests/compiler/mutability/array_tuple_mut.leo b/tests/compiler/mutability/array_tuple_mut.leo index efa87c544b..7b3c57da0f 100644 --- a/tests/compiler/mutability/array_tuple_mut.leo +++ b/tests/compiler/mutability/array_tuple_mut.leo @@ -1,12 +1,13 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main() { +function main() -> bool { let a = [(1u32, 2u32)]; a[0u32].1 = 3u32; - console.assert(a[0u32].0 == 1u32); - console.assert(a[0u32].1 == 3u32); -} \ No newline at end of file + return a[0u32].0 == 1u32 + && a[0u32].1 == 3u32; +} diff --git a/tests/compiler/mutability/circuit.leo b/tests/compiler/mutability/circuit_fail.leo similarity index 100% rename from tests/compiler/mutability/circuit.leo rename to tests/compiler/mutability/circuit_fail.leo diff --git a/tests/compiler/mutability/circuit_function_const.leo b/tests/compiler/mutability/circuit_function_const.leo index 29d93ee775..25cbf1f789 100644 --- a/tests/compiler/mutability/circuit_function_const.leo +++ b/tests/compiler/mutability/circuit_function_const.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Fail +input_file: input/dummy.in */ circuit Foo { @@ -12,10 +13,10 @@ circuit Foo { } // cannot call mutable member function 'foo' of circuit 'Foo' from immutable context -function main() { +function main() -> bool { const a = Foo { x: 1 }; a.foo(); - console.assert(a.x == 10u32); -} \ No newline at end of file + return a.x == 10u32; +} diff --git a/tests/compiler/mutability/circuit_function_mut.leo b/tests/compiler/mutability/circuit_function_mut.leo index 1fbb23baae..0d734ad54d 100644 --- a/tests/compiler/mutability/circuit_function_mut.leo +++ b/tests/compiler/mutability/circuit_function_mut.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit Foo { @@ -12,10 +13,10 @@ circuit Foo { } -function main() { +function main() -> bool { let a = Foo { x: 1 }; a.foo(); - console.assert(a.x == 10u32); -} \ No newline at end of file + return a.x == 10u32; +} diff --git a/tests/compiler/mutability/circuit_static_function_mut.leo b/tests/compiler/mutability/circuit_static_function_mut_fail.leo similarity index 98% rename from tests/compiler/mutability/circuit_static_function_mut.leo rename to tests/compiler/mutability/circuit_static_function_mut_fail.leo index 4af33040ea..a311ed6305 100644 --- a/tests/compiler/mutability/circuit_static_function_mut.leo +++ b/tests/compiler/mutability/circuit_static_function_mut_fail.leo @@ -10,4 +10,4 @@ circuit Foo { function main() { let a = Foo { x: 1 }; a.bar = 0; -} \ No newline at end of file +} diff --git a/tests/compiler/mutability/circuit_variable_mut.leo b/tests/compiler/mutability/circuit_variable_mut.leo index f15f00047a..f7428e5473 100644 --- a/tests/compiler/mutability/circuit_variable_mut.leo +++ b/tests/compiler/mutability/circuit_variable_mut.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit Foo { @@ -8,9 +9,9 @@ circuit Foo { } // Using let makes a circuit variable mutable. -function main() { +function main() -> bool{ let a = Foo { x: 1 }; a.x = 0; - console.assert(a.x == 0u32); -} \ No newline at end of file + return a.x == 0u32; +} diff --git a/tests/compiler/mutability/cond_mut.leo b/tests/compiler/mutability/cond_mut.leo index b5187ce928..7ffe7a0b3d 100644 --- a/tests/compiler/mutability/cond_mut.leo +++ b/tests/compiler/mutability/cond_mut.leo @@ -1,12 +1,15 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main () { +function main() -> bool { let x = 100i8; if false { x = 1i8; x *= 100i8; } -} \ No newline at end of file + + return x == 100i8; +} diff --git a/tests/compiler/mutability/function_input.leo b/tests/compiler/mutability/function_input.leo index 30fb853f0f..65153d31e9 100644 --- a/tests/compiler/mutability/function_input.leo +++ b/tests/compiler/mutability/function_input.leo @@ -1,13 +1,10 @@ /* namespace: Compile expectation: Fail -inputs: - - const.in: | - [constants] - a: bool = true; +input_file: input/dummy.in */ // Const function input are immutable. -function main(const a: bool) { +function main(const b: bool) { a = false; -} \ No newline at end of file +} diff --git a/tests/compiler/mutability/function_input_mut.leo b/tests/compiler/mutability/function_input_mut.leo index 9d0d1c2dd5..bf2ed26078 100644 --- a/tests/compiler/mutability/function_input_mut.leo +++ b/tests/compiler/mutability/function_input_mut.leo @@ -1,15 +1,12 @@ /* namespace: Compile expectation: Pass -inputs: - - mut.in: | - [main] - a: bool = false; +input_file: input/dummy.in */ // Function input are mutable by default. -function main(a: bool) { +function main(a: bool) -> bool { a = true; - console.assert(a == true); -} \ No newline at end of file + return a == true; +} diff --git a/tests/compiler/mutability/input/dummy.in b/tests/compiler/mutability/input/dummy.in new file mode 100644 index 0000000000..dee8d1949b --- /dev/null +++ b/tests/compiler/mutability/input/dummy.in @@ -0,0 +1,9 @@ +[main] +a: bool = true; +arr: [u32; 2] = [10, 8]; + +[constants] +b: bool = true; + +[registers] +r0: bool = true; diff --git a/tests/compiler/mutability/let_mut.leo b/tests/compiler/mutability/let_mut.leo index 7a3f3d7107..da47ae2add 100644 --- a/tests/compiler/mutability/let_mut.leo +++ b/tests/compiler/mutability/let_mut.leo @@ -1,12 +1,13 @@ /* namespace: Compile -expectation: Fail +expectation: Pass +input_file: input/dummy.in */ // Adding the `mut` keyword makes a variable mutable. -function main() { +function main() -> bool { let a = 1u32; a = 0; return a == 0u32; -} \ No newline at end of file +} diff --git a/tests/compiler/mutability/let_mut_nested.leo b/tests/compiler/mutability/let_mut_nested.leo index 7d26239222..a3f20d4a18 100644 --- a/tests/compiler/mutability/let_mut_nested.leo +++ b/tests/compiler/mutability/let_mut_nested.leo @@ -1,10 +1,12 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main () { +function main() -> bool { let x = 2u8; let y = x; const z = y / 2u8; -} \ No newline at end of file + return z == 1; +} diff --git a/tests/compiler/mutability/swap.leo b/tests/compiler/mutability/swap.leo index f37ad53390..f9dc14ac1b 100644 --- a/tests/compiler/mutability/swap.leo +++ b/tests/compiler/mutability/swap.leo @@ -1,13 +1,7 @@ /* namespace: Compile expectation: Pass -inputs: - - swap.in: | - [main] - arr: [u32; 2] = [10, 8]; - - [registers] - r0: bool = false; +input_file: input/dummy.in */ // Swap two elements of an array. @@ -24,4 +18,4 @@ function main(arr: [u32; 2]) -> bool { // Do swap. return expected[0] == actual[0] && expected[1] == actual[1]; -} \ No newline at end of file +} diff --git a/tests/expectations/compiler/compiler/function/array_input.leo.out b/tests/expectations/compiler/compiler/function/array_input.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/function/array_input.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/function/conditional_return.leo.out b/tests/expectations/compiler/compiler/function/conditional_return.leo.out new file mode 100644 index 0000000000..7df9b53406 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/conditional_return.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 95 + num_constraints: 127 + at: 2cbb45563950440ec6b2ad12e378f1df49d6a12d4e773f0aa898f65f4eb109ff + bt: 7e12153373f45abf58e3b2954d1f1abfc951c7c1203e9e6c96fc37d9d25d8442 + ct: 50977b6cd45450d9fddf5934d9167f889165f6ff117b03bb780bd6d89434daf4 + output: + - input_file: input/integers.in + output: + registers: + a: + type: u32 + value: "4" diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out new file mode 100644 index 0000000000..bdda7896f1 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" diff --git a/tests/expectations/compiler/compiler/function/empty.leo.out b/tests/expectations/compiler/compiler/function/empty.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/function/empty.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/function/iteration.leo.out b/tests/expectations/compiler/compiler/function/iteration.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/function/iteration.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out new file mode 100644 index 0000000000..1b26ff36ee --- /dev/null +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:5\n |\n 4 | if true {\n 5 | ...\n 6 | }\n | ^\n |\n = function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out new file mode 100644 index 0000000000..751b09288b --- /dev/null +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n 6 | \n 7 | \n 8 | \n 9 | \n 10 | \n | ^\n |\n = function 'main' missing return for all paths" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out new file mode 100644 index 0000000000..0fee82a9e7 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/multiple_returns_main.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 2 + num_constraints: 2 + at: 401937c524c61a28b4fab76d7a1f85bb628850012af62362a0922610372faf92 + bt: cdf9a9cee4f2edf55111a95ae60bde9801080f6bde638a5c79273a39a2f9f7f5 + ct: 643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" + r1: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/newlines.leo.out b/tests/expectations/compiler/compiler/function/newlines.leo.out new file mode 100644 index 0000000000..6313305a72 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/newlines.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 64 + num_constraints: 64 + at: 2517dbbd3bc6f74f73a279bfe223141cdef8fce801edcc2972d568a815e43bcd + bt: 3a136bbbffaef5f4563e06a03444cfe5c512767d8c88a8be5b39034e18fe0081 + ct: 60e36dc4bc844fe8285371cf70c955b79990f094bc50b3401dcac4cbede63e8d + output: + - input_file: input/integers.in + output: + registers: + a: + type: u32 + value: "0" + b: + type: u32 + value: "0" diff --git a/tests/expectations/compiler/compiler/function/repeated.leo.out b/tests/expectations/compiler/compiler/function/repeated.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/function/repeated.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/return.leo.out b/tests/expectations/compiler/compiler/function/return.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/function/return.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out new file mode 100644 index 0000000000..bb750c6095 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out new file mode 100644 index 0000000000..69627ac35b --- /dev/null +++ b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out new file mode 100644 index 0000000000..480362c6e3 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out new file mode 100644 index 0000000000..69627ac35b --- /dev/null +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/function/return_tuple.leo.out b/tests/expectations/compiler/compiler/function/return_tuple.leo.out new file mode 100644 index 0000000000..7cd74b162a --- /dev/null +++ b/tests/expectations/compiler/compiler/function/return_tuple.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: tuple.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out new file mode 100644 index 0000000000..040996f183 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out @@ -0,0 +1,21 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/integers.in + output: + registers: + a: + type: u32 + value: "1" + b: + type: u32 + value: "1" 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..c181ea9d57 --- /dev/null +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n = failed to resolve variable reference 'myGlobal'" diff --git a/tests/expectations/compiler/compiler/function/undefined.leo.out b/tests/expectations/compiler/compiler/function/undefined.leo.out new file mode 100644 index 0000000000..55b7eb2a2d --- /dev/null +++ b/tests/expectations/compiler/compiler/function/undefined.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /test/src/main.leo:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n = failed to resolve function: 'my_function'" diff --git a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/array.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out similarity index 67% rename from tests/expectations/compiler/compiler/mutability/array.leo.out rename to tests/expectations/compiler/compiler/mutability/array_fail.leo.out index 2565a98cd2..54949e52ea 100644 --- a/tests/expectations/compiler/compiler/mutability/array.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:6:5\n |\n 6 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> /test/src/main.leo:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out index 2a650384ef..6b3a98e5ce 100644 --- a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out @@ -10,6 +10,9 @@ outputs: bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out index 2a650384ef..6b3a98e5ce 100644 --- a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out @@ -10,6 +10,9 @@ outputs: bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out index 2a650384ef..6b3a98e5ce 100644 --- a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out @@ -10,6 +10,9 @@ outputs: bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/circuit.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out similarity index 100% rename from tests/expectations/compiler/compiler/mutability/circuit.leo.out rename to tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out index 2a650384ef..6b3a98e5ce 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out @@ -10,6 +10,9 @@ outputs: bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out similarity index 100% rename from tests/expectations/compiler/compiler/mutability/circuit_static_function_mut.leo.out rename to tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out diff --git a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out index 2a650384ef..6b3a98e5ce 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out @@ -10,6 +10,9 @@ outputs: bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out index 2a650384ef..6b3a98e5ce 100644 --- a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out @@ -10,6 +10,9 @@ outputs: bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out index b725cf1c03..86bb18a599 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:5:5\n |\n 5 | a = false;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> /test/src/main.leo:5:5\n |\n 5 | a = false;\n | ^\n |\n = failed to resolve variable reference 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out index 122d7448a1..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input_mut.leo.out @@ -10,6 +10,9 @@ outputs: bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: mut.in + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out index c1aaa53b96..6b3a98e5ce 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out @@ -1,5 +1,18 @@ --- namespace: Compile -expectation: Fail +expectation: Pass outputs: - - " --> /test/src/main.leo:8:12\n |\n 8 | return a == 0u32;\n | ^^^^^^^^^\n |\n = unexpected type, expected: '()', received: 'bool'" + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out index 4d5e30c17d..f383798db5 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out @@ -10,6 +10,9 @@ outputs: bt: 3402e051d99a4c5be395811da2585d8a57577a0e8307aff01ddfe38b238e03ec ct: d5dcfd364897254307770e70351a0fba77b2db59351d48fedfaa02aff5307e50 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/swap.leo.out b/tests/expectations/compiler/compiler/mutability/swap.leo.out index 767d8df3ca..0d727fef3c 100644 --- a/tests/expectations/compiler/compiler/mutability/swap.leo.out +++ b/tests/expectations/compiler/compiler/mutability/swap.leo.out @@ -10,7 +10,7 @@ outputs: bt: 16d04f802c27d778734e07a0126cae3f096bc4e2e0b4362fe5687a338f1dece5 ct: acfbc6fdb7a3696d43be3cd62939a9731cb8b11c215564c52b3c67343cbda41f output: - - input_file: swap.in + - input_file: input/dummy.in output: registers: r0: From d5e8fb371871098680d1123618948af69e5383ca Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 5 May 2021 19:31:25 +0300 Subject: [PATCH 09/26] imports --- compiler/src/test.rs | 23 ++- tests/compiler/import/alias.leo | 13 +- tests/compiler/import/basic.leo | 13 +- .../compiler/import/{src => imports}/a-9.leo | 0 .../compiler/import/{src => imports}/a0-f.leo | 0 .../import/{src => imports}/hello-world.leo | 0 tests/compiler/import/imports/test-import.leo | 11 ++ tests/compiler/import/input/dummy.in | 2 + tests/compiler/import/many_import.leo | 13 +- tests/compiler/import/many_import_star.leo | 13 +- tests/compiler/import/mod.rs | 154 ------------------ tests/compiler/import/multiple.leo | 13 +- tests/compiler/import/names.leo | 9 +- tests/compiler/import/names_a_dash.leo | 11 +- tests/compiler/import/names_dash_a.leo | 11 +- tests/compiler/import/names_dollar.leo | 11 +- tests/compiler/import/names_underscore.leo | 11 +- tests/compiler/import/src/test-import.leo | 8 - tests/compiler/import/star.leo | 13 +- tests/compiler/import/star_fail.leo | 9 +- .../array/input_nested_3x2_fail.leo.out | 2 +- .../circuits/const_self_variable_fail.leo.out | 2 +- .../compiler/circuits/inline_fail.leo.out | 2 +- .../circuits/inline_member_fail.leo.out | 2 +- .../circuits/inline_undefined.leo.out | 2 +- .../circuits/member_function_fail.leo.out | 2 +- .../circuits/member_function_invalid.leo.out | 2 +- .../member_static_function_invalid.leo.out | 2 +- .../member_static_function_undefined.leo.out | 2 +- .../circuits/member_variable_fail.leo.out | 2 +- .../circuits/mut_function_fail.leo.out | 2 +- .../circuits/mut_self_function_fail.leo.out | 2 +- .../mut_self_static_function_fail.leo.out | 2 +- .../circuits/mut_self_variable_fail.leo.out | 2 +- .../circuits/mut_static_function_fail.leo.out | 2 +- .../circuits/mut_variable_fail.leo.out | 2 +- .../compiler/circuits/self_circuit.leo.out | 2 +- .../compiler/circuits/self_fail.leo.out | 2 +- .../circuits/self_member_invalid.leo.out | 2 +- .../circuits/self_member_undefined.leo.out | 2 +- .../compiler/console/log_fail.leo.out | 2 +- .../console/log_parameter_fail_empty.leo.out | 2 +- .../console/log_parameter_fail_none.leo.out | 2 +- .../log_parameter_fail_unknown.leo.out | 2 +- .../compiler/compiler/core/blake2s.leo.out | 2 +- .../core/core_circuit_invalid.leo.out | 2 +- .../duplicate_definition_fail.leo.out | 2 +- .../function/multiple_returns_fail.leo.out | 2 +- .../multiple_returns_fail_conditional.leo.out | 2 +- .../function/return_array_nested_fail.leo.out | 2 +- .../function/return_array_tuple_fail.leo.out | 2 +- .../compiler/function/scope_fail.leo.out | 2 +- .../compiler/function/undefined.leo.out | 2 +- .../compiler/compiler/import/alias.leo.out | 18 ++ .../compiler/compiler/import/basic.leo.out | 18 ++ .../compiler/import/many_import.leo.out | 18 ++ .../compiler/import/many_import_star.leo.out | 18 ++ .../compiler/compiler/import/multiple.leo.out | 18 ++ .../compiler/compiler/import/names.leo.out | 15 ++ .../compiler/import/names_a_dash.leo.out | 5 + .../compiler/import/names_dash_a.leo.out | 5 + .../compiler/import/names_dollar.leo.out | 5 + .../compiler/import/names_underscore.leo.out | 5 + .../compiler/compiler/import/star.leo.out | 18 ++ .../compiler/import/star_fail.leo.out | 5 + .../program_input/main_array_fail.leo.out | 2 +- .../program_input/main_tuple_fail.leo.out | 2 +- .../main_array_fail.leo.out | 2 +- .../main_tuple_fail.leo.out | 2 +- .../program_registers/registers_fail.leo.out | 2 +- .../compiler/integers/i16/max_fail.leo.out | 2 +- .../compiler/integers/i16/min_fail.leo.out | 2 +- .../compiler/integers/i8/max_fail.leo.out | 2 +- .../compiler/integers/i8/min_fail.leo.out | 2 +- .../compiler/integers/i8/negate_min.leo.out | 2 +- .../i8/no_space_between_literal.leo.out | 2 +- .../compiler/mutability/array_fail.leo.out | 2 +- .../compiler/mutability/circuit_fail.leo.out | 2 +- .../mutability/circuit_function_const.leo.out | 2 +- .../circuit_static_function_mut_fail.leo.out | 2 +- .../compiler/mutability/const.leo.out | 2 +- .../mutability/function_input.leo.out | 2 +- .../compiler/compiler/mutability/let.leo.out | 2 +- 83 files changed, 346 insertions(+), 242 deletions(-) rename tests/compiler/import/{src => imports}/a-9.leo (100%) rename tests/compiler/import/{src => imports}/a0-f.leo (100%) rename tests/compiler/import/{src => imports}/hello-world.leo (100%) create mode 100644 tests/compiler/import/imports/test-import.leo create mode 100644 tests/compiler/import/input/dummy.in delete mode 100644 tests/compiler/import/mod.rs delete mode 100644 tests/compiler/import/src/test-import.leo create mode 100644 tests/expectations/compiler/compiler/import/alias.leo.out create mode 100644 tests/expectations/compiler/compiler/import/basic.leo.out create mode 100644 tests/expectations/compiler/compiler/import/many_import.leo.out create mode 100644 tests/expectations/compiler/compiler/import/many_import_star.leo.out create mode 100644 tests/expectations/compiler/compiler/import/multiple.leo.out create mode 100644 tests/expectations/compiler/compiler/import/names.leo.out create mode 100644 tests/expectations/compiler/compiler/import/names_a_dash.leo.out create mode 100644 tests/expectations/compiler/compiler/import/names_dash_a.leo.out create mode 100644 tests/expectations/compiler/compiler/import/names_dollar.leo.out create mode 100644 tests/expectations/compiler/compiler/import/names_underscore.leo.out create mode 100644 tests/expectations/compiler/compiler/import/star.leo.out create mode 100644 tests/expectations/compiler/compiler/import/star_fail.leo.out diff --git a/compiler/src/test.rs b/compiler/src/test.rs index 299a8bb472..1b52a8a675 100644 --- a/compiler/src/test.rs +++ b/compiler/src/test.rs @@ -36,16 +36,15 @@ pub(crate) fn make_test_context() -> AsgContext<'static> { new_context(allocator) } -fn new_compiler() -> EdwardsTestCompiler { +fn new_compiler(path: PathBuf) -> EdwardsTestCompiler { let program_name = "test".to_string(); - let path = PathBuf::from("/test/src/main.leo"); let output_dir = PathBuf::from("/output/"); EdwardsTestCompiler::new(program_name, path, output_dir, make_test_context(), None) } -pub(crate) fn parse_program(program_string: &str) -> Result { - let mut compiler = new_compiler(); +pub(crate) fn parse_program(program_string: &str, cwd: PathBuf) -> Result { + let mut compiler = new_compiler(cwd); compiler.parse_program_from_string(program_string)?; @@ -72,7 +71,21 @@ impl Namespace for CompileNamespace { } fn run_test(&self, test: Test) -> Result { - let parsed = parse_program(&test.content).map_err(|x| x.to_string())?; + // Check for CWD option: + // ``` cwd: import ``` + // When set, uses different working directory for current file. + // If not, uses file path as current working directory. + let cwd = test + .config + .get("cwd") + .map(|val| { + let mut cwd = test.path.clone(); + cwd.pop(); + cwd.join(&val.as_str().unwrap()) + }) + .unwrap_or(test.path.clone()); + + let parsed = parse_program(&test.content, cwd).map_err(|x| x.to_string())?; // (name, content) let mut inputs = vec![]; diff --git a/tests/compiler/import/alias.leo b/tests/compiler/import/alias.leo index f153b5a128..1b1992b36f 100644 --- a/tests/compiler/import/alias.leo +++ b/tests/compiler/import/alias.leo @@ -1,5 +1,12 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +cwd: imports +*/ + import test-import.foo as bar; -function main() { - console.assert(bar() == 1u32); -} \ No newline at end of file +function main() -> bool { + return bar() == 1u32; +} diff --git a/tests/compiler/import/basic.leo b/tests/compiler/import/basic.leo index 53d243efaa..c1e84ae28e 100644 --- a/tests/compiler/import/basic.leo +++ b/tests/compiler/import/basic.leo @@ -1,5 +1,12 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +cwd: imports +*/ + import test-import.foo; -function main() { - console.assert(foo() == 1u32); -} \ No newline at end of file +function main() -> bool { + return foo() == 1u32; +} diff --git a/tests/compiler/import/src/a-9.leo b/tests/compiler/import/imports/a-9.leo similarity index 100% rename from tests/compiler/import/src/a-9.leo rename to tests/compiler/import/imports/a-9.leo diff --git a/tests/compiler/import/src/a0-f.leo b/tests/compiler/import/imports/a0-f.leo similarity index 100% rename from tests/compiler/import/src/a0-f.leo rename to tests/compiler/import/imports/a0-f.leo diff --git a/tests/compiler/import/src/hello-world.leo b/tests/compiler/import/imports/hello-world.leo similarity index 100% rename from tests/compiler/import/src/hello-world.leo rename to tests/compiler/import/imports/hello-world.leo diff --git a/tests/compiler/import/imports/test-import.leo b/tests/compiler/import/imports/test-import.leo new file mode 100644 index 0000000000..0a3c1aa06a --- /dev/null +++ b/tests/compiler/import/imports/test-import.leo @@ -0,0 +1,11 @@ +// test: ignore +// TODO: add some tag for ignored files + +circuit Point { + x: u32 + y: u32 +} + +function foo() -> u32 { + return 1u32; +} diff --git a/tests/compiler/import/input/dummy.in b/tests/compiler/import/input/dummy.in new file mode 100644 index 0000000000..a663954940 --- /dev/null +++ b/tests/compiler/import/input/dummy.in @@ -0,0 +1,2 @@ +[registers] +r0: bool = true; diff --git a/tests/compiler/import/many_import.leo b/tests/compiler/import/many_import.leo index 08ae494c4f..d101b06b97 100644 --- a/tests/compiler/import/many_import.leo +++ b/tests/compiler/import/many_import.leo @@ -1,3 +1,10 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +cwd: imports +*/ + import test-import.( // local import Point, foo, @@ -11,7 +18,7 @@ import bar.( // imports directory import import car.Car; // imports directory import -function main() { +function main() -> bool { const point = Point { x: 1u32, y: 1u32 }; const foo = foo(); @@ -22,5 +29,5 @@ function main() { const car = Car { c: 1u32 }; - console.assert(car.c == 1u32); -} \ No newline at end of file + return car.c == 1u32; +} diff --git a/tests/compiler/import/many_import_star.leo b/tests/compiler/import/many_import_star.leo index 575487a929..7df854b06e 100644 --- a/tests/compiler/import/many_import_star.leo +++ b/tests/compiler/import/many_import_star.leo @@ -1,3 +1,10 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +cwd: imports +*/ + import test-import.*; // local import import bar.*; // imports directory import @@ -5,7 +12,7 @@ import bar.baz.*; // imports directory import import bar.bat.bat.*; // imports directory import import car.*; // imports directory import -function main() { +function main() -> bool { const point = Point { x: 1u32, y: 1u32 }; const foo = foo(); @@ -15,5 +22,5 @@ function main() { const car = Car { c: 1u32 }; - console.assert(car.c == 1u32); -} \ No newline at end of file + return car.c == 1u32; +} diff --git a/tests/compiler/import/mod.rs b/tests/compiler/import/mod.rs deleted file mode 100644 index 1a3440b577..0000000000 --- a/tests/compiler/import/mod.rs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_program}; - -use std::env::{current_dir, set_current_dir}; - -static TEST_SOURCE_DIRECTORY: &str = "tests/import"; - -// Import tests rely on knowledge of local directories. They should be run locally only. - -pub fn set_local_dir() { - let mut local = current_dir().unwrap(); - local.push(TEST_SOURCE_DIRECTORY); - - set_current_dir(local).unwrap(); -} - -#[test] -#[ignore] -fn test_basic() { - set_local_dir(); - - let program_string = include_str!("basic.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_multiple() { - set_local_dir(); - - let program_string = include_str!("multiple.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_star() { - set_local_dir(); - - let program_string = include_str!("star.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_star_fail() { - set_local_dir(); - - let program_string = include_str!("star_fail.leo"); - assert!(parse_program(program_string).is_err()); -} - -#[test] -#[ignore] -fn test_alias() { - set_local_dir(); - - let program_string = include_str!("alias.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// naming tests -#[test] -#[ignore] -fn test_names_pass() { - set_local_dir(); - - let program_string = include_str!("names.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_names_fail_1() { - set_local_dir(); - - let program_string = include_str!("names_dash_a.leo"); - assert!(parse_program(program_string).is_err()); -} - -#[test] -#[ignore] -fn test_names_fail_2() { - set_local_dir(); - - let program_string = include_str!("names_a_dash.leo"); - assert!(parse_program(program_string).is_err()); -} - -#[test] -#[ignore] -fn test_names_fail_3() { - set_local_dir(); - - let program_string = include_str!("names_underscore.leo"); - assert!(parse_program(program_string).is_err()); -} - -#[test] -#[ignore] -fn test_names_fail_4() { - set_local_dir(); - - let program_string = include_str!("names_dollar.leo"); - assert!(parse_program(program_string).is_err()); -} - -// more complex tests -#[test] -#[ignore] -fn test_many_import() { - set_local_dir(); - - let program_string = include_str!("many_import.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_many_import_star() { - set_local_dir(); - - let program_string = include_str!("many_import_star.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/tests/compiler/import/multiple.leo b/tests/compiler/import/multiple.leo index 4bd181c02d..a8445b89ef 100644 --- a/tests/compiler/import/multiple.leo +++ b/tests/compiler/import/multiple.leo @@ -1,10 +1,17 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +cwd: imports +*/ + import test-import.( Point, foo ); -function main() { +function main() -> bool { const a = Point { x: 1u32, y: 0u32 }; - console.assert(a.x == 1u32); -} \ No newline at end of file + return a.x == 1u32; +} diff --git a/tests/compiler/import/names.leo b/tests/compiler/import/names.leo index d3ce50829a..c5f2242a55 100644 --- a/tests/compiler/import/names.leo +++ b/tests/compiler/import/names.leo @@ -1,5 +1,12 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +cwd: imports +*/ + import a0-f.foo; import a-9.bar; import hello-world.hello; -function main() {} \ No newline at end of file +function main() {} diff --git a/tests/compiler/import/names_a_dash.leo b/tests/compiler/import/names_a_dash.leo index ec136176b2..1206c3bdd5 100644 --- a/tests/compiler/import/names_a_dash.leo +++ b/tests/compiler/import/names_a_dash.leo @@ -1,3 +1,12 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +cwd: imports +*/ + import a-.foo; -function main() {} \ No newline at end of file +function main() -> bool { + return false; +} diff --git a/tests/compiler/import/names_dash_a.leo b/tests/compiler/import/names_dash_a.leo index 95ccb7e4a5..dcc9129fd4 100644 --- a/tests/compiler/import/names_dash_a.leo +++ b/tests/compiler/import/names_dash_a.leo @@ -1,3 +1,12 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +cwd: imports +*/ + import -a.foo; -function main() {} \ No newline at end of file +function main() -> bool { + return false; +} diff --git a/tests/compiler/import/names_dollar.leo b/tests/compiler/import/names_dollar.leo index e4eaec3719..24255ce361 100644 --- a/tests/compiler/import/names_dollar.leo +++ b/tests/compiler/import/names_dollar.leo @@ -1,3 +1,12 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +cwd: imports +*/ + import money$.foo; -function main() {} \ No newline at end of file +function main() -> bool { + return false; +} diff --git a/tests/compiler/import/names_underscore.leo b/tests/compiler/import/names_underscore.leo index c5822ebadd..85119451e5 100644 --- a/tests/compiler/import/names_underscore.leo +++ b/tests/compiler/import/names_underscore.leo @@ -1,3 +1,12 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +cwd: imports +*/ + import hello_world.foo; -function main() {} \ No newline at end of file +function main() -> bool { + return true; +} diff --git a/tests/compiler/import/src/test-import.leo b/tests/compiler/import/src/test-import.leo deleted file mode 100644 index 9a57d433f4..0000000000 --- a/tests/compiler/import/src/test-import.leo +++ /dev/null @@ -1,8 +0,0 @@ -circuit Point { - x: u32 - y: u32 -} - -function foo() -> u32 { - return 1u32; -} \ No newline at end of file diff --git a/tests/compiler/import/star.leo b/tests/compiler/import/star.leo index 69d0791627..02f3ba02fe 100644 --- a/tests/compiler/import/star.leo +++ b/tests/compiler/import/star.leo @@ -1,7 +1,14 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +cwd: imports +*/ + import test-import.*; -function main() { +function main() -> bool { const a = Point { x: 1u32, y: 0u32 }; - console.assert(foo() == 1u32); -} \ No newline at end of file + return foo() == 1u32; +} diff --git a/tests/compiler/import/star_fail.leo b/tests/compiler/import/star_fail.leo index 47f2efeda7..7d500b5d56 100644 --- a/tests/compiler/import/star_fail.leo +++ b/tests/compiler/import/star_fail.leo @@ -1,4 +1,11 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +cwd: imports +*/ + // importing `*` from a directory is illegal import bar.bat.*; -function main() {} \ No newline at end of file +function main() {} diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out index de8607964a..e99d996ed2 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:37\n |\n 4 | console.assert(a == [[0u8; 2]; 3)]); // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/input_nested_3x2_fail.leo:4:37\n |\n 4 | console.assert(a == [[0u8; 2]; 3)]); // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out index 48f3614d62..63d864e31b 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/const_self_variable_fail.leo:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out index 6ac648a3e6..27c244a96d 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/inline_fail.leo:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out index ca83db6796..300919265d 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/inline_member_fail.leo:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out index 8b7a0be7d5..46d645b4dc 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n = failed to resolve circuit: 'Foo'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/inline_undefined.leo:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n = failed to resolve circuit: 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out index cfd7656f46..eed8ae4a23 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_function_fail.leo:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out index 16fa915b96..ed5910ffed 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n = cannot call static function 'echo' of circuit 'Foo' from target" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_function_invalid.leo:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n = cannot call static function 'echo' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out index a518cb4078..0415f67d1e 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n = failed to resolve variable reference 'Foo'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_static_function_invalid.leo:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n = failed to resolve variable reference 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out index 6b68a9ab05..6c9c9e3e36 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_static_function_undefined.leo:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out index 952e3fdacb..2784191a0d 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n = illegal reference to non-existant member 'y' of circuit 'Foo'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_variable_fail.leo:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n = illegal reference to non-existant member 'y' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out index 1d236af849..b5694b4b6f 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_function_fail.leo:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out index 165ac66fac..40c666fed8 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_self_function_fail.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out index 165ac66fac..d1c5d10f1f 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_self_static_function_fail.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out index 48f3614d62..a967b4092c 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_self_variable_fail.leo:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out index ebae3568f6..7b87b25cee 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n = extra circuit member 'a' for initialization of circuit 'Foo' is not allowed" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_static_function_fail.leo:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n = extra circuit member 'a' for initialization of circuit 'Foo' is not allowed" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out index ae22229256..569df3cb4f 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'f'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_variable_fail.leo:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'f'" diff --git a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out index 8c69b77e46..7ca06d2781 100644 --- a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n = expected 'ident', got 'static'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/self_circuit.leo:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n = expected 'ident', got 'static'" diff --git a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out index 8ef345f61a..08b7aa351a 100644 --- a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n = failed to resolve circuit: 'Self'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/self_fail.leo:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n = failed to resolve circuit: 'Self'" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out index 6ad055c2fe..f458e20c63 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/self_member_invalid.leo:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out index f00cd79c2d..99a718bd97 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/self_member_undefined.leo:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/console/log_fail.leo.out b/tests/expectations/compiler/compiler/console/log_fail.leo.out index f89f222493..82295806a3 100644 --- a/tests/expectations/compiler/compiler/console/log_fail.leo.out +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n = expected 'formatted string', got 'hello'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/console/log_fail.leo:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n = expected 'formatted string', got 'hello'" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out index 3c425bcad2..1080f67054 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n = function call expected 2 arguments, got 1" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/console/log_parameter_fail_empty.leo:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n = function call expected 2 arguments, got 1" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out index 203c74bf00..a460352a8c 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n = function call expected 1 arguments, got 2" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/console/log_parameter_fail_none.leo:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n = function call expected 1 arguments, got 2" 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 index bb56f577f2..2c4f7e4e2b 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n = failed to resolve variable reference 'a'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/console/log_parameter_fail_unknown.leo:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n = failed to resolve variable reference 'a'" diff --git a/tests/expectations/compiler/compiler/core/blake2s.leo.out b/tests/expectations/compiler/compiler/core/blake2s.leo.out index 8f9c175e48..89d8334bd2 100644 --- a/tests/expectations/compiler/compiler/core/blake2s.leo.out +++ b/tests/expectations/compiler/compiler/core/blake2s.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/core/blake2s.leo:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out index 8f9c175e48..1bb7a5998f 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/core/core_circuit_invalid.leo:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index bdda7896f1..573dc19d2d 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/duplicate_definition_fail.leo:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out index 1b26ff36ee..964b2da6c9 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:5\n |\n 4 | if true {\n 5 | ...\n 6 | }\n | ^\n |\n = function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/multiple_returns_fail.leo:4:5\n |\n 4 | if true {\n 5 | ...\n 6 | }\n | ^\n |\n = function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out index 751b09288b..95bf77625e 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n 6 | \n 7 | \n 8 | \n 9 | \n 10 | \n | ^\n |\n = function 'main' missing return for all paths" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/multiple_returns_fail_conditional.leo:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n 6 | \n 7 | \n 8 | \n 9 | \n 10 | \n | ^\n |\n = function 'main' missing return for all paths" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out index bb750c6095..8678e0d18d 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/return_array_nested_fail.leo:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out index 480362c6e3..84cf26c329 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/return_array_tuple_fail.leo:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/function/scope_fail.leo.out b/tests/expectations/compiler/compiler/function/scope_fail.leo.out index c181ea9d57..dbaeebd081 100644 --- a/tests/expectations/compiler/compiler/function/scope_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n = failed to resolve variable reference 'myGlobal'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/scope_fail.leo:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n = failed to resolve variable reference 'myGlobal'" diff --git a/tests/expectations/compiler/compiler/function/undefined.leo.out b/tests/expectations/compiler/compiler/function/undefined.leo.out index 55b7eb2a2d..80339fd63c 100644 --- a/tests/expectations/compiler/compiler/function/undefined.leo.out +++ b/tests/expectations/compiler/compiler/function/undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n = failed to resolve function: 'my_function'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/undefined.leo:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n = failed to resolve function: 'my_function'" diff --git a/tests/expectations/compiler/compiler/import/alias.leo.out b/tests/expectations/compiler/compiler/import/alias.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/import/alias.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/import/basic.leo.out b/tests/expectations/compiler/compiler/import/basic.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/import/basic.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/import/many_import.leo.out b/tests/expectations/compiler/compiler/import/many_import.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/import/many_import.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/import/many_import_star.leo.out b/tests/expectations/compiler/compiler/import/many_import_star.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/import/many_import_star.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/import/multiple.leo.out b/tests/expectations/compiler/compiler/import/multiple.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/import/multiple.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/import/names.leo.out b/tests/expectations/compiler/compiler/import/names.leo.out new file mode 100644 index 0000000000..69627ac35b --- /dev/null +++ b/tests/expectations/compiler/compiler/import/names.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/import/names_a_dash.leo.out b/tests/expectations/compiler/compiler/import/names_a_dash.leo.out new file mode 100644 index 0000000000..01e57e6bd4 --- /dev/null +++ b/tests/expectations/compiler/compiler/import/names_a_dash.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:3:10\n |\n 3 | import a-.foo;\n | ^\n |\n = expected 'ident', got '.'" diff --git a/tests/expectations/compiler/compiler/import/names_dash_a.leo.out b/tests/expectations/compiler/compiler/import/names_dash_a.leo.out new file mode 100644 index 0000000000..79088f763f --- /dev/null +++ b/tests/expectations/compiler/compiler/import/names_dash_a.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:3:8\n |\n 3 | import -a.foo;\n | ^\n |\n = expected 'ident', got '-'" diff --git a/tests/expectations/compiler/compiler/import/names_dollar.leo.out b/tests/expectations/compiler/compiler/import/names_dollar.leo.out new file mode 100644 index 0000000000..edc3407f7d --- /dev/null +++ b/tests/expectations/compiler/compiler/import/names_dollar.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:3:13\n |\n 3 | import money$.foo;\n | ^\n |\n = unexpected token: '$'" diff --git a/tests/expectations/compiler/compiler/import/names_underscore.leo.out b/tests/expectations/compiler/compiler/import/names_underscore.leo.out new file mode 100644 index 0000000000..e065c6f031 --- /dev/null +++ b/tests/expectations/compiler/compiler/import/names_underscore.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:3:20\n |\n 3 | import hello_world.foo;\n | ^^^\n |\n = Cannot find imported package `hello_world` in source files or import directory." diff --git a/tests/expectations/compiler/compiler/import/star.leo.out b/tests/expectations/compiler/compiler/import/star.leo.out new file mode 100644 index 0000000000..6b3a98e5ce --- /dev/null +++ b/tests/expectations/compiler/compiler/import/star.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/import/star_fail.leo.out b/tests/expectations/compiler/compiler/import/star_fail.leo.out new file mode 100644 index 0000000000..1c9e918a30 --- /dev/null +++ b/tests/expectations/compiler/compiler/import/star_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:4:16\n |\n 4 | import bar.bat.*;\n | ^\n |\n = Expected library file `\"/Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports/bar/src/bat/src/lib.leo\"`." diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out index 041ef90457..7b6e84afb8 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:3:1\n |\n 3 | function main(x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 1, found array dimensions 2" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_input/main_array_fail.leo:3:1\n |\n 3 | function main(x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 1, found array dimensions 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out index c7b025f3b1..7694184c47 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:3:1\n |\n 3 | function main(x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_input/main_tuple_fail.leo:3:1\n |\n 3 | function main(x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out index 5088df2b5f..73a0348b94 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:3:1\n |\n 3 | function main(const x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 2, found array dimensions 1" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_input_constants/main_array_fail.leo:3:1\n |\n 3 | function main(const x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 2, found array dimensions 1" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out index f1b289f53f..d4907ce851 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:3:1\n |\n 3 | function main(const x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_input_constants/main_tuple_fail.leo:3:1\n |\n 3 | function main(const x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index 887d34e7fb..a5e53f9bc4 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n | ^\n |\n = Mismatched types. Expected register output type `u8`, found type `bool`." + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_registers/registers_fail.leo:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n | ^\n |\n = Mismatched types. Expected register output type `u8`, found type `bool`." diff --git a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out index c634052dbd..0cc0d7ab95 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n = failed to parse int value '32768'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i16/max_fail.leo:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n = failed to parse int value '32768'" diff --git a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out index eec1ebd3ef..98b8834029 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n = failed to parse int value '-32769'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i16/min_fail.leo:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n = failed to parse int value '-32769'" diff --git a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out index e7800e5925..bb53d71aa2 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n = failed to parse int value '128'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/max_fail.leo:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n = failed to parse int value '128'" diff --git a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out index 7a373b2d02..0433fe8027 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n = failed to parse int value '-129'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/min_fail.leo:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n = failed to parse int value '-129'" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out index d307d7bcf7..28d52607ff 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n = integer operation failed due to the signed integer error `Overflow`" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/negate_min.leo:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n = integer operation failed due to the signed integer error `Overflow`" diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out index d280bc7fbe..9ed5dff636 100644 --- a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:4:13\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/no_space_between_literal.leo:4:13\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" diff --git a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out index 54949e52ea..3369ab9006 100644 --- a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/array_fail.leo:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out index fe83538093..d42c174fa2 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/circuit_fail.leo:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out index 3c52156846..32e059bbe1 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n = cannot call mutable member function 'foo' of circuit 'Foo' from immutable context" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/circuit_function_const.leo:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n = cannot call mutable member function 'foo' of circuit 'Foo' from immutable context" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out index 671031ca81..d85afcdf07 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n = extra circuit member 'x' for initialization of circuit 'Foo' is not allowed" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/circuit_static_function_mut_fail.leo:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n = extra circuit member 'x' for initialization of circuit 'Foo' is not allowed" diff --git a/tests/expectations/compiler/compiler/mutability/const.leo.out b/tests/expectations/compiler/compiler/mutability/const.leo.out index eb7ad1607b..1a19051cc1 100644 --- a/tests/expectations/compiler/compiler/mutability/const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/const.leo:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out index 86bb18a599..c760a8685d 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:5:5\n |\n 5 | a = false;\n | ^\n |\n = failed to resolve variable reference 'a'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/function_input.leo:5:5\n |\n 5 | a = false;\n | ^\n |\n = failed to resolve variable reference 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/let.leo.out b/tests/expectations/compiler/compiler/mutability/let.leo.out index eb7ad1607b..9d577f41f2 100644 --- a/tests/expectations/compiler/compiler/mutability/let.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /test/src/main.leo:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/let.leo:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" From 7f390d4d5cb095c5710a592c3b6f2a48ad042c2f Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 5 May 2021 21:06:15 +0300 Subject: [PATCH 10/26] global const --- .../global_consts/global_const_types.leo | 51 + .../global_consts/modify_global_const.leo | 11 + .../global_consts/global_const_types.leo.out | 18 + .../global_consts/modify_global_const.leo.out | 5 + .../parser/parser/circuits/big_self.leo.out | 53 + .../parser/parser/circuits/empty.leo.out | 13 + .../circuits/field_and_functions.leo.out | 97 ++ .../parser/parser/circuits/fields.leo.out | 19 + .../parser/parser/circuits/functions.leo.out | 91 + .../parser/parser/circuits/mut_self.leo.out | 53 + .../parser/parser/circuits/self.leo.out | 53 + .../expression/access/array_access.leo.out | 267 +++ .../access/array_range_access.leo.out | 401 +++++ .../parser/expression/access/call.leo.out | 162 ++ .../parser/expression/access/circuit.leo.out | 120 ++ .../expression/access/circuit_static.leo.out | 120 ++ .../parser/expression/access/tuple.leo.out | 109 ++ .../parser/expression/array_init.leo.out | 150 ++ .../parser/expression/array_init_fail.leo.out | 6 + .../parser/expression/array_inline.leo.out | 317 ++++ .../expression/array_inline_fail.leo.out | 9 + .../parser/expression/binary/add.leo.out | 338 ++++ .../parser/expression/binary/and.leo.out | 111 ++ .../parser/expression/binary/div.leo.out | 180 ++ .../parser/expression/binary/eq.leo.out | 338 ++++ .../parser/expression/binary/exp.leo.out | 244 +++ .../parser/expression/binary/gt.leo.out | 338 ++++ .../parser/expression/binary/gte.leo.out | 338 ++++ .../parser/expression/binary/lt.leo.out | 338 ++++ .../parser/expression/binary/lte.leo.out | 338 ++++ .../parser/expression/binary/mul.leo.out | 289 ++++ .../parser/expression/binary/ne.leo.out | 338 ++++ .../parser/expression/binary/or.leo.out | 338 ++++ .../parser/expression/binary/sub.leo.out | 180 ++ .../parser/parser/expression/cast.leo.out | 186 +++ .../parser/expression/circuit_init.leo.out | 113 ++ .../expression/circuit_init_fail.leo.out | 16 + .../parser/parser/expression/ident.leo.out | 23 + .../parser/expression/literal/address.leo.out | 13 + .../expression/literal/address_fail.leo.out | 13 + .../expression/literal/address_parse.leo.out | 40 + .../parser/expression/literal/bool.leo.out | 12 + .../expression/literal/bool_parse.leo.out | 22 + .../parser/expression/literal/comment.leo.out | 22 + .../literal/formatted_string.leo.out | 24 + .../parser/expression/literal/group.leo.out | 648 ++++++++ .../expression/literal/group_fail.leo.out | 13 + .../parser/expression/literal/int.leo.out | 111 ++ .../literal/int_parse/field.leo.out | 949 +++++++++++ .../expression/literal/int_parse/i128.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/i16.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/i32.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/i64.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/i8.leo.out | 1053 ++++++++++++ .../literal/int_parse/implicit.leo.out | 949 +++++++++++ .../literal/int_parse/mono_group.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u128.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u16.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u32.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u64.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u8.leo.out | 1053 ++++++++++++ .../expression/literal/postfix_types.leo.out | 62 + .../parser/parser/expression/ternary.leo.out | 72 + .../parser/parser/expression/tuple.leo.out | 94 ++ .../parser/expression/unary/negate.leo.out | 120 ++ .../parser/expression/unary/not.leo.out | 120 ++ .../parser/parser/functions/annotated.leo.out | 58 + .../parser/functions/annotated_param.leo.out | 59 + .../parser/functions/annotated_twice.leo.out | 67 + .../parser/functions/const_input_fail.leo.out | 5 + .../parser/functions/const_param.leo.out | 140 ++ .../parser/functions/const_self_bad.leo.out | 50 + .../parser/parser/functions/empty.leo.out | 49 + .../parser/parser/functions/empty2.leo.out | 31 + .../parser/functions/param_array.leo.out | 64 + .../parser/functions/param_circuit.leo.out | 62 + .../parser/functions/param_tuple.leo.out | 64 + .../parser/parser/functions/params.leo.out | 75 + .../parser/functions/params_return.leo.out | 76 + .../parser/parser/functions/return.leo.out | 50 + .../parser/functions/return_tuple.leo.out | 52 + .../parser/parser/import/alias.leo.out | 38 + .../parser/parser/import/basic.leo.out | 38 + .../parser/parser/import/many_import.leo.out | 136 ++ .../parser/import/many_import_star.leo.out | 165 ++ .../parser/parser/import/names.leo.out | 94 ++ .../parser/import/names_underscore.leo.out | 38 + .../parser/parser/import/star.leo.out | 35 + .../parser/parser/statement/assign.leo.out | 411 +++++ .../parser/parser/statement/block.leo.out | 141 ++ .../parser/statement/conditional.leo.out | 230 +++ .../parser/parser/statement/console.leo.out | 207 +++ .../parser/statement/definition.leo.out | 1473 +++++++++++++++++ .../parser/statement/definition_fail.leo.out | 27 + .../parser/statement/expression.leo.out | 94 ++ .../parser/parser/statement/iteration.leo.out | 203 +++ .../parser/parser/statement/return.leo.out | 110 ++ .../parser/statement/return_fail.leo.out | 7 + 98 files changed, 25387 insertions(+) create mode 100644 tests/compiler/global_consts/global_const_types.leo create mode 100644 tests/compiler/global_consts/modify_global_const.leo create mode 100644 tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out create mode 100644 tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out create mode 100644 tests/expectations/parser/parser/circuits/big_self.leo.out create mode 100644 tests/expectations/parser/parser/circuits/empty.leo.out create mode 100644 tests/expectations/parser/parser/circuits/field_and_functions.leo.out create mode 100644 tests/expectations/parser/parser/circuits/fields.leo.out create mode 100644 tests/expectations/parser/parser/circuits/functions.leo.out create mode 100644 tests/expectations/parser/parser/circuits/mut_self.leo.out create mode 100644 tests/expectations/parser/parser/circuits/self.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/array_access.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/array_range_access.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/call.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/circuit.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/circuit_static.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/tuple.leo.out create mode 100644 tests/expectations/parser/parser/expression/array_init.leo.out create mode 100644 tests/expectations/parser/parser/expression/array_init_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/array_inline.leo.out create mode 100644 tests/expectations/parser/parser/expression/array_inline_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/add.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/and.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/div.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/eq.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/exp.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/gt.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/gte.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/lt.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/lte.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/mul.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/ne.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/or.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/sub.leo.out create mode 100644 tests/expectations/parser/parser/expression/cast.leo.out create mode 100644 tests/expectations/parser/parser/expression/circuit_init.leo.out create mode 100644 tests/expectations/parser/parser/expression/circuit_init_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/ident.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/address.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/address_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/address_parse.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/bool.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/bool_parse.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/comment.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/formatted_string.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/group.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/group_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/postfix_types.leo.out create mode 100644 tests/expectations/parser/parser/expression/ternary.leo.out create mode 100644 tests/expectations/parser/parser/expression/tuple.leo.out create mode 100644 tests/expectations/parser/parser/expression/unary/negate.leo.out create mode 100644 tests/expectations/parser/parser/expression/unary/not.leo.out create mode 100644 tests/expectations/parser/parser/functions/annotated.leo.out create mode 100644 tests/expectations/parser/parser/functions/annotated_param.leo.out create mode 100644 tests/expectations/parser/parser/functions/annotated_twice.leo.out create mode 100644 tests/expectations/parser/parser/functions/const_input_fail.leo.out create mode 100644 tests/expectations/parser/parser/functions/const_param.leo.out create mode 100644 tests/expectations/parser/parser/functions/const_self_bad.leo.out create mode 100644 tests/expectations/parser/parser/functions/empty.leo.out create mode 100644 tests/expectations/parser/parser/functions/empty2.leo.out create mode 100644 tests/expectations/parser/parser/functions/param_array.leo.out create mode 100644 tests/expectations/parser/parser/functions/param_circuit.leo.out create mode 100644 tests/expectations/parser/parser/functions/param_tuple.leo.out create mode 100644 tests/expectations/parser/parser/functions/params.leo.out create mode 100644 tests/expectations/parser/parser/functions/params_return.leo.out create mode 100644 tests/expectations/parser/parser/functions/return.leo.out create mode 100644 tests/expectations/parser/parser/functions/return_tuple.leo.out create mode 100644 tests/expectations/parser/parser/import/alias.leo.out create mode 100644 tests/expectations/parser/parser/import/basic.leo.out create mode 100644 tests/expectations/parser/parser/import/many_import.leo.out create mode 100644 tests/expectations/parser/parser/import/many_import_star.leo.out create mode 100644 tests/expectations/parser/parser/import/names.leo.out create mode 100644 tests/expectations/parser/parser/import/names_underscore.leo.out create mode 100644 tests/expectations/parser/parser/import/star.leo.out create mode 100644 tests/expectations/parser/parser/statement/assign.leo.out create mode 100644 tests/expectations/parser/parser/statement/block.leo.out create mode 100644 tests/expectations/parser/parser/statement/conditional.leo.out create mode 100644 tests/expectations/parser/parser/statement/console.leo.out create mode 100644 tests/expectations/parser/parser/statement/definition.leo.out create mode 100644 tests/expectations/parser/parser/statement/definition_fail.leo.out create mode 100644 tests/expectations/parser/parser/statement/expression.leo.out create mode 100644 tests/expectations/parser/parser/statement/iteration.leo.out create mode 100644 tests/expectations/parser/parser/statement/return.leo.out create mode 100644 tests/expectations/parser/parser/statement/return_fail.leo.out diff --git a/tests/compiler/global_consts/global_const_types.leo b/tests/compiler/global_consts/global_const_types.leo new file mode 100644 index 0000000000..5b454dbfc7 --- /dev/null +++ b/tests/compiler/global_consts/global_const_types.leo @@ -0,0 +1,51 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - globals.in: | + [main] + a: u32 = 0; + + [registers] + r0: bool = false; +*/ + +const basic: u32 = 8; +const array: [u8; (3, 2)] = [[0u8; 2]; 3]; +const tuple = (1u32, 2u32); +const (a, b) = (1u32, 2u32); +const simple_group: group = 1group; +const complex_group = (_, 1)group; +const field_test: field = 2; +const use_another_const = basic + 1; +const foo = Foo { width: 10, height: 20 }; +const uno = uno(); + +circuit Foo { + width: u32, + height: u32, +} + +function uno() -> u32 { + return 1u32; +} + +function main(a: u32) -> bool { + let (x, y) = (1u32, 2u32); + + return a == basic + && basic == 8u32 + && array[0][0] == 0 // arrays + && array[2][1] == 0 + && x == 1u32 // tuple test + && y == 2u32 + && a == 1u32 // tuple extraction test + && b == 2u32 + && simple_group == 1group // group test + && complex_group == (_, 1)group + && field_test == 2field // field test + && use_another_const == 9u32 // use another const test + && foo.width == 10u32 // circuit test + && foo.height == 20u32 + && uno == 1u32; // function test +} diff --git a/tests/compiler/global_consts/modify_global_const.leo b/tests/compiler/global_consts/modify_global_const.leo new file mode 100644 index 0000000000..cc4b3c447f --- /dev/null +++ b/tests/compiler/global_consts/modify_global_const.leo @@ -0,0 +1,11 @@ +/* +namespace: Compile +expectation: Fail +*/ + +const basic: u32 = 8; + +function main() { + // Cannot re-assign! + basic = 2u32; +} diff --git a/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out new file mode 100644 index 0000000000..18e9de1712 --- /dev/null +++ b/tests/expectations/compiler/compiler/global_consts/global_const_types.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 95 + num_constraints: 95 + at: 8db8901199024f620eff3a2a9d95e74862d07f8413a6fef789347f012de915ce + bt: 134fe0b804695f759f665fe6754e85dc3556cb7c4fd7fca0e78ed2f55d048873 + ct: 8770257f9e15fb2972e7ca01e77f3d4d0303033d75d9e990b7065a3096ce9cfb + output: + - input_file: globals.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out new file mode 100644 index 0000000000..9358a50c76 --- /dev/null +++ b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/global_consts/modify_global_const.leo:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'basic'" diff --git a/tests/expectations/parser/parser/circuits/big_self.leo.out b/tests/expectations/parser/parser/circuits/big_self.leo.out new file mode 100644 index 0000000000..abdced08ca --- /dev/null +++ b/tests/expectations/parser/parser/circuits/big_self.leo.out @@ -0,0 +1,53 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() -> Self {\\\"}\"}" + input: [] + output: SelfType + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return Self {};\\\"}\"}" + members: [] + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 23 + path: test + content: " return Self {};" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 23 + path: test + content: " return Self {};" + span: + line_start: 4 + line_stop: 6 + col_start: 26 + col_stop: 6 + path: test + content: " function x() -> Self {\n...\n }" + span: + line_start: 4 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: test + content: " function x() -> Self {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/empty.leo.out b/tests/expectations/parser/parser/circuits/empty.leo.out new file mode 100644 index 0000000000..e826c4097d --- /dev/null +++ b/tests/expectations/parser/parser/circuits/empty.leo.out @@ -0,0 +1,13 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: [] + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out new file mode 100644 index 0000000000..039d525028 --- /dev/null +++ b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out @@ -0,0 +1,97 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}" + - IntegerType: U32 + - CircuitVariable: + - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32,\\\"}\"}" + - IntegerType: U32 + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 6 + line_stop: 8 + col_start: 18 + col_stop: 6 + path: test + content: " function x() {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: test + content: " function x() {\n...\n }" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 10 + line_stop: 10 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 10 + line_stop: 10 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 9 + line_stop: 11 + col_start: 18 + col_stop: 6 + path: test + content: " function y() {\n...\n }" + span: + line_start: 9 + line_stop: 11 + col_start: 5 + col_stop: 6 + path: test + content: " function y() {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/fields.leo.out b/tests/expectations/parser/parser/circuits/fields.leo.out new file mode 100644 index 0000000000..851d2945c7 --- /dev/null +++ b/tests/expectations/parser/parser/circuits/fields.leo.out @@ -0,0 +1,19 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}" + - IntegerType: U32 + - CircuitVariable: + - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32,\\\"}\"}" + - IntegerType: U32 + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/functions.leo.out b/tests/expectations/parser/parser/circuits/functions.leo.out new file mode 100644 index 0000000000..aebda6c4e5 --- /dev/null +++ b/tests/expectations/parser/parser/circuits/functions.leo.out @@ -0,0 +1,91 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 18 + col_stop: 6 + path: test + content: " function x() {\n...\n }" + span: + line_start: 4 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: test + content: " function x() {\n...\n }" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 8 + line_stop: 8 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 7 + line_stop: 9 + col_start: 18 + col_stop: 6 + path: test + content: " function y() {\n...\n }" + span: + line_start: 7 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: test + content: " function y() {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/mut_self.leo.out b/tests/expectations/parser/parser/circuits/mut_self.leo.out new file mode 100644 index 0000000000..03997801dc --- /dev/null +++ b/tests/expectations/parser/parser/circuits/mut_self.leo.out @@ -0,0 +1,53 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" + input: + - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 26 + col_stop: 6 + path: test + content: " function x(mut self) {\n...\n }" + span: + line_start: 4 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: test + content: " function x(mut self) {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/self.leo.out b/tests/expectations/parser/parser/circuits/self.leo.out new file mode 100644 index 0000000000..65785a36b6 --- /dev/null +++ b/tests/expectations/parser/parser/circuits/self.leo.out @@ -0,0 +1,53 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" + input: + - SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 22 + col_stop: 6 + path: test + content: " function x(self) {\n...\n }" + span: + line_start: 4 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: test + content: " function x(self) {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/expression/access/array_access.leo.out b/tests/expectations/parser/parser/expression/access/array_access.leo.out new file mode 100644 index 0000000000..5c820cc814 --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/array_access.leo.out @@ -0,0 +1,267 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[0]" + - ArrayAccess: + array: + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X[1]\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "X[1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "X[1]" + - ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8]\\\"}\"}" + index: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[0u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[0u8]" + - ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1u8][2u8]\\\"}\"}" + index: + Value: + Integer: + - U8 + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[1u8][2u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[1u8][2u8]" + index: + Value: + Integer: + - U8 + - "2" + - line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 11 + path: test + content: "x[1u8][2u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[1u8][2u8]" + - ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + index: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[x][y][z]" + index: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[x][y][z]" + index: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x[x][y][z]" + - Call: + function: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]()\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0]()" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[0]()" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[0]()" + - ArrayAccess: + array: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()[0]\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "x()[0]" + index: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x()[0]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x()[0]" + - Call: + function: + CircuitStaticFunctionAccess: + circuit: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x(y)::y(x)" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x(y)::y(x)" + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x(y)::y(x)" + - ArrayAccess: + array: + TupleAccess: + tuple: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" + index: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[x].0[x]" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[x].0[x]" + index: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x[x].0[x]" diff --git a/tests/expectations/parser/parser/expression/access/array_range_access.leo.out b/tests/expectations/parser/parser/expression/access/array_range_access.leo.out new file mode 100644 index 0000000000..10b02e133d --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/array_range_access.leo.out @@ -0,0 +1,401 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" + left: ~ + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "x[..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..]\\\"}\"}" + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[1..]" + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[1..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..1]\\\"}\"}" + left: ~ + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x[..1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[..1]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..1]\\\"}\"}" + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[1..1]" + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "x[1..1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[1..1]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0..100]\\\"}\"}" + left: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0..100]" + right: + Value: + Implicit: + - "100" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 9 + path: test + content: "x[0..100]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x[0..100]" + - ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[323452345.2345234523453453][323452345.2345234523453453]\\\"}\"}" + index: + TupleAccess: + tuple: + Value: + Implicit: + - "323452345" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 12 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + index: + value: "2345234523453453" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 29 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 30 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + index: + TupleAccess: + tuple: + Value: + Implicit: + - "323452345" + - line_start: 1 + line_stop: 1 + col_start: 31 + col_stop: 40 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + index: + value: "2345234523453453" + span: + line_start: 1 + line_stop: 1 + col_start: 31 + col_stop: 57 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 58 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..1u8]\\\"}\"}" + left: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[0u8..1u8]" + right: + Value: + Integer: + - U8 + - "1" + - line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 11 + path: test + content: "x[0u8..1u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[0u8..1u8]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..]\\\"}\"}" + left: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[0u8..]" + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[0u8..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..0u8]\\\"}\"}" + left: ~ + right: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "x[..0u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[..0u8]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" + left: ~ + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "x[..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[x.y..]" + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[x.y..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" + left: ~ + right: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "x[..y.x]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[..y.x]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[x.y..y.x]" + right: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 11 + path: test + content: "x[x.y..y.x]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[x.y..y.x]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + left: + CircuitMemberAccess: + circuit: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[x.y.x..y.x.y]" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 8 + path: test + content: "x[x.y.x..y.x.y]" + right: + CircuitMemberAccess: + circuit: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 13 + path: test + content: "x[x.y.x..y.x.y]" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: "x[x.y.x..y.x.y]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "x[x.y.x..y.x.y]" diff --git a/tests/expectations/parser/parser/expression/access/call.leo.out b/tests/expectations/parser/parser/expression/access/call.leo.out new file mode 100644 index 0000000000..ed9e9058da --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/call.leo.out @@ -0,0 +1,162 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x() + - Call: + function: + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X()\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: X() + - Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: x(y) + - Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x(y, z)" + - Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x(x, y, z)" + - Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y()" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x::y()" + - Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y(x)" + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x::y(x)" + - Call: + function: + TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0(x) + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: x.0(x) + - Call: + function: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0](x)" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[0](x)" + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[0](x)" diff --git a/tests/expectations/parser/parser/expression/access/circuit.leo.out b/tests/expectations/parser/parser/expression/access/circuit.leo.out new file mode 100644 index 0000000000..e10176179c --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/circuit.leo.out @@ -0,0 +1,120 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.y + - CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" + name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: X.Y + - CircuitMemberAccess: + circuit: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.y.z + name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.y.z + - Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.y() + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.y() + - TupleAccess: + tuple: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.y.0 + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.y.0 + - ArrayAccess: + array: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "x.y[1]" + index: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x.y[1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x.y[1]" diff --git a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out new file mode 100644 index 0000000000..eed96329a1 --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out @@ -0,0 +1,120 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y" + - CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" + name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "X::Y" + - CircuitStaticFunctionAccess: + circuit: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y::z" + name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x::y::z" + - Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y()" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x::y()" + - TupleAccess: + tuple: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y.0" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x::y.0" + - ArrayAccess: + array: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y[1]" + index: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "x::y[1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x::y[1]" diff --git a/tests/expectations/parser/parser/expression/access/tuple.leo.out b/tests/expectations/parser/parser/expression/access/tuple.leo.out new file mode 100644 index 0000000000..c4089a4522 --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/tuple.leo.out @@ -0,0 +1,109 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0\\\"}\"}" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0 + - TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1\\\"}\"}" + index: + value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.1 + - TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2\\\"}\"}" + index: + value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.2 + - TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0.0\\\"}\"}" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0.0 + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.0.0 + - TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1.1\\\"}\"}" + index: + value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.1.1 + index: + value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.1.1 + - TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2.2\\\"}\"}" + index: + value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.2.2 + index: + value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.2.2 diff --git a/tests/expectations/parser/parser/expression/array_init.leo.out b/tests/expectations/parser/parser/expression/array_init.leo.out new file mode 100644 index 0000000000..c8ee3bfb32 --- /dev/null +++ b/tests/expectations/parser/parser/expression/array_init.leo.out @@ -0,0 +1,150 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "[0u8; 1]" + dimensions: + - value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "[0u8; 1]" + - ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0; 1]" + dimensions: + - value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "[0; 1]" + - ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0; (1)]" + dimensions: + - value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "[0; (1)]" + - ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0; (1, 2)]" + dimensions: + - value: "1" + - value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "[0; (1, 2)]" + - ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0; (1, 2, 3)]" + dimensions: + - value: "1" + - value: "2" + - value: "3" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: "[0; (1, 2, 3)]" + - ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: "[[[0; 3]; 2]; 1]" + dimensions: + - value: "3" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 9 + path: test + content: "[[[0; 3]; 2]; 1]" + dimensions: + - value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 13 + path: test + content: "[[[0; 3]; 2]; 1]" + dimensions: + - value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "[[[0; 3]; 2]; 1]" diff --git a/tests/expectations/parser/parser/expression/array_init_fail.leo.out b/tests/expectations/parser/parser/expression/array_init_fail.leo.out new file mode 100644 index 0000000000..3e6e920477 --- /dev/null +++ b/tests/expectations/parser/parser/expression/array_init_fail.leo.out @@ -0,0 +1,6 @@ +--- +namespace: ParseExpression +expectation: Fail +outputs: + - " --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^\n |\n = illegal spread in array initializer" + - " --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^\n |\n = illegal spread in array initializer" diff --git a/tests/expectations/parser/parser/expression/array_inline.leo.out b/tests/expectations/parser/parser/expression/array_inline.leo.out new file mode 100644 index 0000000000..ae4ccf624f --- /dev/null +++ b/tests/expectations/parser/parser/expression/array_inline.leo.out @@ -0,0 +1,317 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "[0u8, 1, 2, 3]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "[0u8, 1, 2, 3]" + - Expression: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "[0u8, 1, 2, 3]" + - Expression: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: "[0u8, 1, 2, 3]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: "[0u8, 1, 2, 3]" + - ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "[1]" + - ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "1" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "[1u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "[1u8]" + - ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "1" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "[1u8,]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "[1u8,]" + - ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0, 1,]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "[0, 1,]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "[0, 1,]" + - ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0,1,]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: "[0,1,]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "[0,1,]" + - ArrayInline: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "[]" + - ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "[[1,2,3],[1,2,3]]" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 9 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 16 + path: test + content: "[[1,2,3],[1,2,3]]" + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 17 + path: test + content: "[[1,2,3],[1,2,3]]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "[[1,2,3],[1,2,3]]" + - ArrayInline: + elements: + - Expression: + ArrayInline: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "[[]]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "[[]]" + - ArrayInline: + elements: + - Expression: + ArrayInline: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "[[], []]" + - Expression: + ArrayInline: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 8 + path: test + content: "[[], []]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "[[], []]" diff --git a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out new file mode 100644 index 0000000000..3565e3e59c --- /dev/null +++ b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out @@ -0,0 +1,9 @@ +--- +namespace: ParseExpression +expectation: Fail +outputs: + - " --> test:1:2\n |\n 1 | [,]\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:2\n |\n 1 | [,,]\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:4\n |\n 1 | [0,,]\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:2\n |\n 1 | [,0]\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:2\n |\n 1 | [,0,]\n | ^\n |\n = expected 'expression', got ','" diff --git a/tests/expectations/parser/parser/expression/binary/add.leo.out b/tests/expectations/parser/parser/expression/binary/add.leo.out new file mode 100644 index 0000000000..72d244dd8d --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/add.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 1 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2+3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2+3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2+3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 + 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 + 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 + 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 + 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 + 2 + 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 + 3 * 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 + 3 * 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 - 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 - 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 - 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 - 3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 + 2 - 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 18 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/and.leo.out b/tests/expectations/parser/parser/expression/binary/and.leo.out new file mode 100644 index 0000000000..b6f8de5d72 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/and.leo.out @@ -0,0 +1,111 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: true && false + right: + Value: + Boolean: + - "false" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: true && false + op: And + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: true && false + - Binary: + left: + Value: + Boolean: + - "false" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: false&&true + right: + Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 12 + path: test + content: false&&true + op: And + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: false&&true + - Binary: + left: + Binary: + left: + Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: true&&false&&true + right: + Value: + Boolean: + - "false" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 12 + path: test + content: true&&false&&true + op: And + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: true&&false&&true + right: + Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 18 + path: test + content: true&&false&&true + op: And + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: true&&false&&true diff --git a/tests/expectations/parser/parser/expression/binary/div.leo.out b/tests/expectations/parser/parser/expression/binary/div.leo.out new file mode 100644 index 0000000000..45684cd859 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/div.leo.out @@ -0,0 +1,180 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 / 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 / 1 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 / 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2/3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2/3 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2/3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 / 2 / 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 / 2 / 3 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 / 2 / 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 / 2 / 3 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 / 2 / 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 2 / 3 ** 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 2 / 3 ** 4 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 ** 2 / 3 ** 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 ** 2 / 3 ** 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 16 + path: test + content: 1 ** 2 / 3 ** 4 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 16 + path: test + content: 1 ** 2 / 3 ** 4 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: 1 ** 2 / 3 ** 4 diff --git a/tests/expectations/parser/parser/expression/binary/eq.leo.out b/tests/expectations/parser/parser/expression/binary/eq.leo.out new file mode 100644 index 0000000000..56f7df069c --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/eq.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 == 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 == 1 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 == 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2==3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: 2==3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: 2==3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 == 2 == 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 == 2 == 3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 == 2 == 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 == 2 == 3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 == 2 == 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 == 3 < 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 == 3 < 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 == 3 < 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 < 2 == 3 < 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 == 2 == 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 == 2 == 3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 == 2 == 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 == 2 == 3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 == 2 == 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/exp.leo.out b/tests/expectations/parser/parser/expression/binary/exp.leo.out new file mode 100644 index 0000000000..b0c39a877f --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/exp.leo.out @@ -0,0 +1,244 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 1 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 ** 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2**3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: 2**3 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: 2**3 + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 2 ** 3 + right: + Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 2 ** 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 ** 2 ** 3 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 12 + path: test + content: 1 ** 2 ** 3 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 ** 2 ** 3 + - Binary: + left: + Cast: + inner: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 as i8 ** 3 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 1 as i8 ** 3 as i8 + right: + Cast: + inner: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 13 + path: test + content: 1 as i8 ** 3 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 19 + path: test + content: 1 as i8 ** 3 as i8 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: 1 as i8 ** 3 as i8 + - Binary: + left: + Cast: + inner: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + right: + Binary: + left: + Cast: + inner: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 13 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 19 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + right: + Cast: + inner: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 30 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 30 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 30 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 diff --git a/tests/expectations/parser/parser/expression/binary/gt.leo.out b/tests/expectations/parser/parser/expression/binary/gt.leo.out new file mode 100644 index 0000000000..b9d5cfd72d --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/gt.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 > 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 > 1 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 > 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2>3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2>3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2>3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 > 2 > 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 > 2 > 3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 > 2 > 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 > 2 > 3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 > 2 > 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 > 3 + 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 > 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 > 3 + 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 > 3 + 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 > 2 > 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 > 2 > 3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 > 2 > 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 > 2 > 3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 > 2 > 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 18 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 22 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 22 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/gte.leo.out b/tests/expectations/parser/parser/expression/binary/gte.leo.out new file mode 100644 index 0000000000..9ab526f71c --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/gte.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 >= 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 >= 1 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 >= 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2 >= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 2 >= 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 >= 2 >= 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 >= 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 >= 2 >= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 >= 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 >= 2 >= 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 >= 3 + 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 >= 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 >= 3 + 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 + 2 >= 3 + 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 >= 2 >= 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 >= 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 >= 2 >= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 >= 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 >= 2 >= 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lt.leo.out b/tests/expectations/parser/parser/expression/binary/lt.leo.out new file mode 100644 index 0000000000..9879afc9d3 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/lt.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 1 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2<3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2<3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2<3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 < 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 < 3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 < 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 < 2 < 3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 < 2 < 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 < 3 + 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 < 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 < 3 + 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 < 3 + 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 < 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 < 3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 < 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 < 2 < 3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 < 2 < 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 18 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 22 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 22 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lte.leo.out b/tests/expectations/parser/parser/expression/binary/lte.leo.out new file mode 100644 index 0000000000..f40df4bddb --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/lte.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 <= 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 <= 1 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 <= 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2 <= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 2 <= 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 <= 2 <= 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 <= 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 <= 2 <= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 <= 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 <= 2 <= 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 <= 3 + 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 <= 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 <= 3 + 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 + 2 <= 3 + 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 <= 2 <= 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 <= 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 <= 2 <= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 <= 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 <= 2 <= 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/mul.leo.out b/tests/expectations/parser/parser/expression/binary/mul.leo.out new file mode 100644 index 0000000000..c146eeee15 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/mul.leo.out @@ -0,0 +1,289 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 1 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2*3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2*3 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2*3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 * 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 * 3 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 * 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 * 3 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 * 2 * 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 2 * 3 ** 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 2 * 3 ** 4 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 ** 2 * 3 ** 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 ** 2 * 3 ** 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 24 + col_stop: 25 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 25 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 25 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 diff --git a/tests/expectations/parser/parser/expression/binary/ne.leo.out b/tests/expectations/parser/parser/expression/binary/ne.leo.out new file mode 100644 index 0000000000..65fb6e2298 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/ne.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 != 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 != 1 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 != 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2!=3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: 2!=3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: 2!=3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 != 2 != 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 != 2 != 3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 != 2 != 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 != 2 != 3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 != 2 != 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 != 3 < 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 != 3 < 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 != 3 < 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 < 2 != 3 < 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 != 2 != 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 != 2 != 3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 != 2 != 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 != 2 != 3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 != 2 != 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/or.leo.out b/tests/expectations/parser/parser/expression/binary/or.leo.out new file mode 100644 index 0000000000..72d244dd8d --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/or.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 1 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2+3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2+3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2+3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 + 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 + 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 + 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 + 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 + 2 + 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 + 3 * 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 + 3 * 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 - 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 - 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 - 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 - 3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 + 2 - 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 18 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/sub.leo.out b/tests/expectations/parser/parser/expression/binary/sub.leo.out new file mode 100644 index 0000000000..4e39639fe2 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/sub.leo.out @@ -0,0 +1,180 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 - 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 - 1 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 - 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2-3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2-3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2-3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 - 2 - 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 - 2 - 3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 - 2 - 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 - 2 - 3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 - 2 - 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 - 3 * 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 - 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 - 3 * 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 - 3 * 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 - 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 - 3 * 4 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 - 3 * 4 diff --git a/tests/expectations/parser/parser/expression/cast.leo.out b/tests/expectations/parser/parser/expression/cast.leo.out new file mode 100644 index 0000000000..25ace32c14 --- /dev/null +++ b/tests/expectations/parser/parser/expression/cast.leo.out @@ -0,0 +1,186 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8\\\"}\"}" + target_type: + IntegerType: U8 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x as u8 + - Cast: + inner: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" + target_type: + Circuit: "{\"name\":\"id\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: y as id + - Cast: + inner: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"z as u32\\\"}\"}" + target_type: + IntegerType: U32 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: z as u32 + - Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as i128\\\"}\"}" + target_type: + IntegerType: I128 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: x as i128 + - Cast: + inner: + Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8 as u128\\\"}\"}" + target_type: + IntegerType: U8 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x as u8 as u128 + target_type: + IntegerType: U128 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: x as u8 as u128 + - Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as field\\\"}\"}" + target_type: Field + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: x as field + - Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as group\\\"}\"}" + target_type: Group + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: x as group + - Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" + right: + Binary: + left: + Cast: + inner: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" + target_type: + IntegerType: U32 + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 14 + path: test + content: x ** y as u32 ** z + right: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 19 + path: test + content: x ** y as u32 ** z + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: x ** y as u32 ** z + - Value: + Implicit: + - "" + - line_start: 0 + line_stop: 0 + col_start: 0 + col_stop: 0 + path: "" + content: "" + - Cast: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x as u32\\\"}\"}" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "!x as u32" + target_type: + IntegerType: U32 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "!x as u32" + - Cast: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x as u32\\\"}\"}" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "-x as u32" + target_type: + IntegerType: U32 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "-x as u32" diff --git a/tests/expectations/parser/parser/expression/circuit_init.leo.out b/tests/expectations/parser/parser/expression/circuit_init.leo.out new file mode 100644 index 0000000000..4295420d95 --- /dev/null +++ b/tests/expectations/parser/parser/expression/circuit_init.leo.out @@ -0,0 +1,113 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {}\\\"}\"}" + members: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x {}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" + expression: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "x {y}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" + expression: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x{y}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{}\\\"}\"}" + members: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "x{}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" + expression: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x{y: y}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" + expression: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x{y: x}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" + expression: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x{y: x,}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + expression: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + expression: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: "x{y:x, x:y,}" + - CircuitInit: + name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self {}\\\"}\"}" + members: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "Self {}" diff --git a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out new file mode 100644 index 0000000000..3aae92971f --- /dev/null +++ b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out @@ -0,0 +1,16 @@ +--- +namespace: ParseExpression +expectation: Fail +outputs: + - " --> test:1:3\n |\n 1 | x {\n | ^\n |\n = unexpected EOF" + - "did not consume all input: '}' @ 1:3-4\n" + - " --> test:1:4\n |\n 1 | x {,}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:5\n |\n 1 | x { , }\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,,,}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:6\n |\n 1 | x {x,,}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,,x}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,x}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:8\n |\n 1 | x {x:y,,}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,,x:y}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,x:y}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:6\n |\n 1 | x {x:}\n | ^\n |\n = expected 'expression', got '}'" diff --git a/tests/expectations/parser/parser/expression/ident.leo.out b/tests/expectations/parser/parser/expression/ident.leo.out new file mode 100644 index 0000000000..a92fc0c1c8 --- /dev/null +++ b/tests/expectations/parser/parser/expression/ident.leo.out @@ -0,0 +1,23 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x\\\"}\"}" + - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X\\\"}\"}" + - Identifier: "{\"name\":\"xxx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xxx\\\"}\"}" + - Identifier: "{\"name\":\"XXX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"XXX\\\"}\"}" + - Identifier: "{\"name\":\"x1\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x1\\\"}\"}" + - Identifier: "{\"name\":\"xu32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xu32\\\"}\"}" + - Identifier: "{\"name\":\"testx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testx\\\"}\"}" + - Identifier: "{\"name\":\"truex\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"truex\\\"}\"}" + - Identifier: "{\"name\":\"TRUE\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"TRUE\\\"}\"}" + - Identifier: "{\"name\":\"testX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testX\\\"}\"}" + - Identifier: "{\"name\":\"letX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"letX\\\"}\"}" + - Identifier: "{\"name\":\"constX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"constX\\\"}\"}" + - Identifier: "{\"name\":\"test_test\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"test_test\\\"}\"}" + - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"self\\\"}\"}" + - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self\\\"}\"}" + - Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"input\\\"}\"}" + - Identifier: "{\"name\":\"selfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"selfX\\\"}\"}" + - Identifier: "{\"name\":\"SelfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"SelfX\\\"}\"}" + - Identifier: "{\"name\":\"inputX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"inputX\\\"}\"}" diff --git a/tests/expectations/parser/parser/expression/literal/address.leo.out b/tests/expectations/parser/parser/expression/literal/address.leo.out new file mode 100644 index 0000000000..04610e6ead --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/address.leo.out @@ -0,0 +1,13 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8' @ 1:1-64" + - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9' @ 1:1-64" + - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" + - "'aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st' @ 1:1-64" + - "'ALEO1' @ 1:1-6" + - "'Aleo1' @ 1:1-6" + - "'aleO1' @ 1:1-6" + - "'aleo2qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" + - "'bleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" diff --git a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out new file mode 100644 index 0000000000..c0fc912fd4 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out @@ -0,0 +1,13 @@ +--- +namespace: Token +expectation: Fail +outputs: + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'" + - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'" + - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'" diff --git a/tests/expectations/parser/parser/expression/literal/address_parse.leo.out b/tests/expectations/parser/parser/expression/literal/address_parse.leo.out new file mode 100644 index 0000000000..ce2e019189 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/address_parse.leo.out @@ -0,0 +1,40 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Address: + - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 64 + path: test + content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 + - Value: + Address: + - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9 + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 64 + path: test + content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9 + - Value: + Address: + - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9 + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 64 + path: test + content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9 + - Value: + Address: + - aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 64 + path: test + content: aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st diff --git a/tests/expectations/parser/parser/expression/literal/bool.leo.out b/tests/expectations/parser/parser/expression/literal/bool.leo.out new file mode 100644 index 0000000000..9222f3dd49 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/bool.leo.out @@ -0,0 +1,12 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'true' @ 1:1-5" + - "'True' @ 1:1-5" + - "'TRUE' @ 1:1-5" + - "'truE' @ 1:1-5" + - "'false' @ 1:1-6" + - "'False' @ 1:1-6" + - "'FALSE' @ 1:1-6" + - "'falsE' @ 1:1-6" diff --git a/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out b/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out new file mode 100644 index 0000000000..85b9453e0b --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out @@ -0,0 +1,22 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "true" + - Value: + Boolean: + - "false" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "false" diff --git a/tests/expectations/parser/parser/expression/literal/comment.leo.out b/tests/expectations/parser/parser/expression/literal/comment.leo.out new file mode 100644 index 0000000000..9f4cc8a518 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/comment.leo.out @@ -0,0 +1,22 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'// test1' @ 1:1-9" + - "'// test2' @ 1:1-9" + - "'//test3' @ 1:1-8" + - "'/' @ 1:1-2,'/' @ 1:3-4,'test4' @ 1:5-10" + - "'/* test5 */' @ 1:1-12" + - "'/*' @ 1:1-3" + - "'test' @ 1:1-5,'6' @ 1:6-7,'*' @ 1:8-9,'/' @ 1:9-10" + - "'/* test 7' @ 1:1-10" + - "'*' @ 1:1-2,'/' @ 1:2-3" + - "'/*test8 */' @ 1:1-11" + - "'/* test9*/' @ 1:1-11" + - "'/*test10*/' @ 1:1-11" + - "'/*/**/' @ 1:1-7" + - "'/**/' @ 1:1-5" + - "'/*//*/' @ 1:1-7" + - "'/** /*/' @ 1:1-8" + - "'/** **/' @ 1:1-8" + - "'/*' @ 1:1-3" diff --git a/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out b/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out new file mode 100644 index 0000000000..47fddf9292 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'\"{}\"' @ 1:1-5" + - "'\" {} \"' @ 1:1-7" + - "'\"{}d\"' @ 1:1-6" + - "'\"{}D\"' @ 1:1-6" + - "'\"d{}\"' @ 1:1-6" + - "'\"D{}\"' @ 1:1-6" + - "'\"D{}D\"' @ 1:1-7" + - "'\"{}{}\"' @ 1:1-7" + - "'\"D{}{}D\"' @ 1:1-9" + - "'\"D{}{}\"' @ 1:1-8" + - "'\"{}{}D\"' @ 1:1-8" + - "'\"D{}D{}D\"' @ 1:1-10" + - "'\"{{}}\"' @ 1:1-7" + - "'\"}}\"' @ 1:1-5" + - "'\"{{\"' @ 1:1-5" + - "'\"}}{{\"' @ 1:1-7" + - "'\"{{}\"' @ 1:1-6" + - "'\"{}}\"' @ 1:1-6" + - "'\"{\"' @ 1:1-4" + - "'\"}\"' @ 1:1-4" diff --git a/tests/expectations/parser/parser/expression/literal/group.leo.out b/tests/expectations/parser/parser/expression/literal/group.leo.out new file mode 100644 index 0000000000..2a4389526e --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/group.leo.out @@ -0,0 +1,648 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Group: + Tuple: + x: SignHigh + y: Inferred + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(+, _)group" + - Value: + Group: + Tuple: + x: Inferred + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(_, -)group" + - Value: + Group: + Tuple: + x: SignHigh + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(+, -)group" + - Value: + Group: + Tuple: + x: SignLow + y: SignHigh + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(-, +)group" + - Value: + Group: + Tuple: + x: SignHigh + y: SignHigh + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(+, +)group" + - Value: + Group: + Tuple: + x: SignLow + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(-, -)group" + - Value: + Group: + Tuple: + x: Inferred + y: Inferred + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(_, _)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123,-456)group" + y: + Number: + - "-456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123,-456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123,-456)group" + - Value: + Group: + Tuple: + x: + Number: + - "-123" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "(-123,456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(-123,456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(-123,456)group" + - Value: + Group: + Tuple: + x: + Number: + - "-123" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "(-123,456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(-123,456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(-123,456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, _)group" + y: Inferred + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, _)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, -)group" + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, -)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, -)group" + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, -)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, +)group" + y: SignHigh + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, +)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, +)group" + y: SignHigh + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, +)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, -)group" + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, -)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, _)group" + y: Inferred + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, _)group" + - Value: + Group: + Tuple: + x: SignHigh + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(+, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(+, 345)group" + - Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(_, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(_, 345)group" + - Value: + Group: + Tuple: + x: SignHigh + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(+, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(+, 345)group" + - Value: + Group: + Tuple: + x: SignLow + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(-, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(-, 345)group" + - Value: + Group: + Tuple: + x: SignHigh + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(+, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(+, 345)group" + - Value: + Group: + Tuple: + x: SignLow + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(-, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(-, 345)group" + - Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(_, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(_, 345)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out new file mode 100644 index 0000000000..da65de24fa --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out @@ -0,0 +1,13 @@ +--- +namespace: ParseExpression +expectation: Fail +outputs: + - " --> test:1:1\n |\n 1 | group\n | ^^^^^\n |\n = expected 'expression', got 'group'" + - "did not consume all input: 'group' @ 1:3-8\n" + - "did not consume all input: 'group' @ 1:6-11\n" + - " --> test:1:2\n |\n 1 | (,)group\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:2\n |\n 1 | (+, -,)group\n | ^\n |\n = expected 'expression', got '+'" + - " --> test:1:2\n |\n 1 | (,+, -)group\n | ^\n |\n = expected 'expression', got ','" + - "did not consume all input: 'group' @ 1:6-11\n" + - "did not consume all input: 'group' @ 1:12-17\n" + - "did not consume all input: 'group' @ 1:15-20\n" diff --git a/tests/expectations/parser/parser/expression/literal/int.leo.out b/tests/expectations/parser/parser/expression/literal/int.leo.out new file mode 100644 index 0000000000..ccac03f213 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int.leo.out @@ -0,0 +1,111 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'123' @ 1:1-4,'abc123' @ 1:4-10" + - "'123' @ 1:1-4,'abc' @ 1:4-7" + - "'123' @ 1:1-4" + - "'456' @ 1:1-4" + - "'123' @ 1:1-4,'456' @ 1:5-8" + - "'87377802873778028737780287377802873778028737780287377802873778028737780287377802' @ 1:1-81" + - "'8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802' @ 1:1-401" + - "'340130024' @ 1:1-10" + - "'158951116' @ 1:1-10" + - "'155529659' @ 1:1-10" + - "'642023166' @ 1:1-10" + - "'228481736' @ 1:1-10" + - "'469712960' @ 1:1-10" + - "'929437719' @ 1:1-10" + - "'721072814' @ 1:1-10" + - "'363254789' @ 1:1-10" + - "'906732565' @ 1:1-10" + - "'288246391' @ 1:1-10" + - "'724940549' @ 1:1-10" + - "'487101620' @ 1:1-10" + - "'261373583' @ 1:1-10" + - "'891163927' @ 1:1-10" + - "'743967544' @ 1:1-10" + - "'8372586' @ 1:1-8" + - "'461793278' @ 1:1-10" + - "'806307045' @ 1:1-10" + - "'122764546' @ 1:1-10" + - "'356336181' @ 1:1-10" + - "'158370903' @ 1:1-10" + - "'774460877' @ 1:1-10" + - "'557174131' @ 1:1-10" + - "'492401267' @ 1:1-10" + - "'893445620' @ 1:1-10" + - "'957757048' @ 1:1-10" + - "'721540649' @ 1:1-10" + - "'390746493' @ 1:1-10" + - "'211251725' @ 1:1-10" + - "'938266114' @ 1:1-10" + - "'156985870' @ 1:1-10" + - "'703831126' @ 1:1-10" + - "'729964155' @ 1:1-10" + - "'988151305' @ 1:1-10" + - "'320872435' @ 1:1-10" + - "'719287167' @ 1:1-10" + - "'152289486' @ 1:1-10" + - "'740067975' @ 1:1-10" + - "'728627816' @ 1:1-10" + - "'385008978' @ 1:1-10" + - "'553967635' @ 1:1-10" + - "'71980713' @ 1:1-9" + - "'519444716' @ 1:1-10" + - "'116499965' @ 1:1-10" + - "'717422268' @ 1:1-10" + - "'18966279' @ 1:1-9" + - "'22458638' @ 1:1-9" + - "'857282620' @ 1:1-10" + - "'920675898' @ 1:1-10" + - "'762235516' @ 1:1-10" + - "'469018377' @ 1:1-10" + - "'199986521' @ 1:1-10" + - "'536679358' @ 1:1-10" + - "'591399452' @ 1:1-10" + - "'83083158' @ 1:1-9" + - "'599449051' @ 1:1-10" + - "'445442318' @ 1:1-10" + - "'585486590' @ 1:1-10" + - "'209278800' @ 1:1-10" + - "'873568117' @ 1:1-10" + - "'664470940' @ 1:1-10" + - "'465262783' @ 1:1-10" + - "'605652874' @ 1:1-10" + - "'376803940' @ 1:1-10" + - "'965247040' @ 1:1-10" + - "'598474509' @ 1:1-10" + - "'845119918' @ 1:1-10" + - "'648159133' @ 1:1-10" + - "'669051032' @ 1:1-10" + - "'800600261' @ 1:1-10" + - "'434689764' @ 1:1-10" + - "'520060080' @ 1:1-10" + - "'804659385' @ 1:1-10" + - "'537828058' @ 1:1-10" + - "'716600292' @ 1:1-10" + - "'387020273' @ 1:1-10" + - "'199375617' @ 1:1-10" + - "'680337189' @ 1:1-10" + - "'818479931' @ 1:1-10" + - "'893693281' @ 1:1-10" + - "'87377802' @ 1:1-9" + - "'84699261' @ 1:1-9" + - "'292826090' @ 1:1-10" + - "'569171405' @ 1:1-10" + - "'387436237' @ 1:1-10" + - "'150682190' @ 1:1-10" + - "'888770419' @ 1:1-10" + - "'824696431' @ 1:1-10" + - "'765659803' @ 1:1-10" + - "'270163693' @ 1:1-10" + - "'427940240' @ 1:1-10" + - "'504997332' @ 1:1-10" + - "'337808338' @ 1:1-10" + - "'907200008' @ 1:1-10" + - "'757177889' @ 1:1-10" + - "'696697188' @ 1:1-10" + - "'41376051' @ 1:1-9" + - "'496293518' @ 1:1-10" + - "'251218820' @ 1:1-10" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out new file mode 100644 index 0000000000..c7f5f3576f --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out @@ -0,0 +1,949 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Field: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: 123field + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Field: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: 456field + - Value: + Field: + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 86 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802field + - Value: + Field: + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 406 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802field + - Value: + Field: + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 340130024field + - Value: + Field: + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 158951116field + - Value: + Field: + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 155529659field + - Value: + Field: + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 642023166field + - Value: + Field: + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 228481736field + - Value: + Field: + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 469712960field + - Value: + Field: + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 929437719field + - Value: + Field: + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 721072814field + - Value: + Field: + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 363254789field + - Value: + Field: + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 906732565field + - Value: + Field: + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 288246391field + - Value: + Field: + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 724940549field + - Value: + Field: + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 487101620field + - Value: + Field: + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 261373583field + - Value: + Field: + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 891163927field + - Value: + Field: + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 743967544field + - Value: + Field: + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 8372586field + - Value: + Field: + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 461793278field + - Value: + Field: + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 806307045field + - Value: + Field: + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 122764546field + - Value: + Field: + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 356336181field + - Value: + Field: + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 158370903field + - Value: + Field: + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 774460877field + - Value: + Field: + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 557174131field + - Value: + Field: + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 492401267field + - Value: + Field: + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 893445620field + - Value: + Field: + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 957757048field + - Value: + Field: + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 721540649field + - Value: + Field: + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 390746493field + - Value: + Field: + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 211251725field + - Value: + Field: + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 938266114field + - Value: + Field: + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 156985870field + - Value: + Field: + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 703831126field + - Value: + Field: + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 729964155field + - Value: + Field: + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 988151305field + - Value: + Field: + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 320872435field + - Value: + Field: + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 719287167field + - Value: + Field: + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 152289486field + - Value: + Field: + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 740067975field + - Value: + Field: + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 728627816field + - Value: + Field: + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 385008978field + - Value: + Field: + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 553967635field + - Value: + Field: + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 71980713field + - Value: + Field: + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 519444716field + - Value: + Field: + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 116499965field + - Value: + Field: + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 717422268field + - Value: + Field: + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 18966279field + - Value: + Field: + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 22458638field + - Value: + Field: + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 857282620field + - Value: + Field: + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 920675898field + - Value: + Field: + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 762235516field + - Value: + Field: + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 469018377field + - Value: + Field: + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 199986521field + - Value: + Field: + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 536679358field + - Value: + Field: + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 591399452field + - Value: + Field: + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 83083158field + - Value: + Field: + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 599449051field + - Value: + Field: + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 445442318field + - Value: + Field: + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 585486590field + - Value: + Field: + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 209278800field + - Value: + Field: + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 873568117field + - Value: + Field: + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 664470940field + - Value: + Field: + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 465262783field + - Value: + Field: + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 605652874field + - Value: + Field: + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 376803940field + - Value: + Field: + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 965247040field + - Value: + Field: + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 598474509field + - Value: + Field: + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 845119918field + - Value: + Field: + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 648159133field + - Value: + Field: + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 669051032field + - Value: + Field: + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 800600261field + - Value: + Field: + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 434689764field + - Value: + Field: + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 520060080field + - Value: + Field: + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 804659385field + - Value: + Field: + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 537828058field + - Value: + Field: + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 716600292field + - Value: + Field: + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 387020273field + - Value: + Field: + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 199375617field + - Value: + Field: + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 680337189field + - Value: + Field: + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 818479931field + - Value: + Field: + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 893693281field + - Value: + Field: + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 87377802field + - Value: + Field: + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 84699261field + - Value: + Field: + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 292826090field + - Value: + Field: + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 569171405field + - Value: + Field: + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 387436237field + - Value: + Field: + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 150682190field + - Value: + Field: + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 888770419field + - Value: + Field: + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 824696431field + - Value: + Field: + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 765659803field + - Value: + Field: + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 270163693field + - Value: + Field: + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 427940240field + - Value: + Field: + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 504997332field + - Value: + Field: + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 337808338field + - Value: + Field: + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 907200008field + - Value: + Field: + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 757177889field + - Value: + Field: + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 696697188field + - Value: + Field: + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 41376051field + - Value: + Field: + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 496293518field + - Value: + Field: + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 251218820field diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out new file mode 100644 index 0000000000..f0d886348f --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I128 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 123i128 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I128 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 456i128 + - Value: + Integer: + - I128 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 85 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i128 + - Value: + Integer: + - I128 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 405 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i128 + - Value: + Integer: + - I128 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 340130024i128 + - Value: + Integer: + - I128 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 158951116i128 + - Value: + Integer: + - I128 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 155529659i128 + - Value: + Integer: + - I128 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 642023166i128 + - Value: + Integer: + - I128 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 228481736i128 + - Value: + Integer: + - I128 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 469712960i128 + - Value: + Integer: + - I128 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 929437719i128 + - Value: + Integer: + - I128 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 721072814i128 + - Value: + Integer: + - I128 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 363254789i128 + - Value: + Integer: + - I128 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 906732565i128 + - Value: + Integer: + - I128 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 288246391i128 + - Value: + Integer: + - I128 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 724940549i128 + - Value: + Integer: + - I128 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 487101620i128 + - Value: + Integer: + - I128 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 261373583i128 + - Value: + Integer: + - I128 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 891163927i128 + - Value: + Integer: + - I128 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 743967544i128 + - Value: + Integer: + - I128 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 8372586i128 + - Value: + Integer: + - I128 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 461793278i128 + - Value: + Integer: + - I128 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 806307045i128 + - Value: + Integer: + - I128 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 122764546i128 + - Value: + Integer: + - I128 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 356336181i128 + - Value: + Integer: + - I128 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 158370903i128 + - Value: + Integer: + - I128 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 774460877i128 + - Value: + Integer: + - I128 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 557174131i128 + - Value: + Integer: + - I128 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 492401267i128 + - Value: + Integer: + - I128 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 893445620i128 + - Value: + Integer: + - I128 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 957757048i128 + - Value: + Integer: + - I128 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 721540649i128 + - Value: + Integer: + - I128 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 390746493i128 + - Value: + Integer: + - I128 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 211251725i128 + - Value: + Integer: + - I128 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 938266114i128 + - Value: + Integer: + - I128 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 156985870i128 + - Value: + Integer: + - I128 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 703831126i128 + - Value: + Integer: + - I128 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 729964155i128 + - Value: + Integer: + - I128 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 988151305i128 + - Value: + Integer: + - I128 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 320872435i128 + - Value: + Integer: + - I128 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 719287167i128 + - Value: + Integer: + - I128 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 152289486i128 + - Value: + Integer: + - I128 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 740067975i128 + - Value: + Integer: + - I128 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 728627816i128 + - Value: + Integer: + - I128 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 385008978i128 + - Value: + Integer: + - I128 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 553967635i128 + - Value: + Integer: + - I128 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 71980713i128 + - Value: + Integer: + - I128 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 519444716i128 + - Value: + Integer: + - I128 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 116499965i128 + - Value: + Integer: + - I128 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 717422268i128 + - Value: + Integer: + - I128 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 18966279i128 + - Value: + Integer: + - I128 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 22458638i128 + - Value: + Integer: + - I128 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 857282620i128 + - Value: + Integer: + - I128 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 920675898i128 + - Value: + Integer: + - I128 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 762235516i128 + - Value: + Integer: + - I128 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 469018377i128 + - Value: + Integer: + - I128 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 199986521i128 + - Value: + Integer: + - I128 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 536679358i128 + - Value: + Integer: + - I128 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 591399452i128 + - Value: + Integer: + - I128 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 83083158i128 + - Value: + Integer: + - I128 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 599449051i128 + - Value: + Integer: + - I128 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 445442318i128 + - Value: + Integer: + - I128 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 585486590i128 + - Value: + Integer: + - I128 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 209278800i128 + - Value: + Integer: + - I128 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 873568117i128 + - Value: + Integer: + - I128 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 664470940i128 + - Value: + Integer: + - I128 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 465262783i128 + - Value: + Integer: + - I128 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 605652874i128 + - Value: + Integer: + - I128 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 376803940i128 + - Value: + Integer: + - I128 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 965247040i128 + - Value: + Integer: + - I128 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 598474509i128 + - Value: + Integer: + - I128 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 845119918i128 + - Value: + Integer: + - I128 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 648159133i128 + - Value: + Integer: + - I128 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 669051032i128 + - Value: + Integer: + - I128 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 800600261i128 + - Value: + Integer: + - I128 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 434689764i128 + - Value: + Integer: + - I128 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 520060080i128 + - Value: + Integer: + - I128 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 804659385i128 + - Value: + Integer: + - I128 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 537828058i128 + - Value: + Integer: + - I128 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 716600292i128 + - Value: + Integer: + - I128 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 387020273i128 + - Value: + Integer: + - I128 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 199375617i128 + - Value: + Integer: + - I128 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 680337189i128 + - Value: + Integer: + - I128 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 818479931i128 + - Value: + Integer: + - I128 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 893693281i128 + - Value: + Integer: + - I128 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 87377802i128 + - Value: + Integer: + - I128 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 84699261i128 + - Value: + Integer: + - I128 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 292826090i128 + - Value: + Integer: + - I128 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 569171405i128 + - Value: + Integer: + - I128 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 387436237i128 + - Value: + Integer: + - I128 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 150682190i128 + - Value: + Integer: + - I128 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 888770419i128 + - Value: + Integer: + - I128 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 824696431i128 + - Value: + Integer: + - I128 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 765659803i128 + - Value: + Integer: + - I128 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 270163693i128 + - Value: + Integer: + - I128 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 427940240i128 + - Value: + Integer: + - I128 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 504997332i128 + - Value: + Integer: + - I128 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 337808338i128 + - Value: + Integer: + - I128 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 907200008i128 + - Value: + Integer: + - I128 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 757177889i128 + - Value: + Integer: + - I128 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 696697188i128 + - Value: + Integer: + - I128 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 41376051i128 + - Value: + Integer: + - I128 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 496293518i128 + - Value: + Integer: + - I128 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 251218820i128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out new file mode 100644 index 0000000000..82a8fc8b1b --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I16 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123i16 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I16 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456i16 + - Value: + Integer: + - I16 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i16 + - Value: + Integer: + - I16 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i16 + - Value: + Integer: + - I16 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024i16 + - Value: + Integer: + - I16 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116i16 + - Value: + Integer: + - I16 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659i16 + - Value: + Integer: + - I16 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166i16 + - Value: + Integer: + - I16 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736i16 + - Value: + Integer: + - I16 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960i16 + - Value: + Integer: + - I16 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719i16 + - Value: + Integer: + - I16 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814i16 + - Value: + Integer: + - I16 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789i16 + - Value: + Integer: + - I16 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565i16 + - Value: + Integer: + - I16 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391i16 + - Value: + Integer: + - I16 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549i16 + - Value: + Integer: + - I16 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620i16 + - Value: + Integer: + - I16 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583i16 + - Value: + Integer: + - I16 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927i16 + - Value: + Integer: + - I16 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544i16 + - Value: + Integer: + - I16 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586i16 + - Value: + Integer: + - I16 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278i16 + - Value: + Integer: + - I16 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045i16 + - Value: + Integer: + - I16 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546i16 + - Value: + Integer: + - I16 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181i16 + - Value: + Integer: + - I16 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903i16 + - Value: + Integer: + - I16 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877i16 + - Value: + Integer: + - I16 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131i16 + - Value: + Integer: + - I16 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267i16 + - Value: + Integer: + - I16 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620i16 + - Value: + Integer: + - I16 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048i16 + - Value: + Integer: + - I16 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649i16 + - Value: + Integer: + - I16 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493i16 + - Value: + Integer: + - I16 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725i16 + - Value: + Integer: + - I16 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114i16 + - Value: + Integer: + - I16 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870i16 + - Value: + Integer: + - I16 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126i16 + - Value: + Integer: + - I16 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155i16 + - Value: + Integer: + - I16 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305i16 + - Value: + Integer: + - I16 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435i16 + - Value: + Integer: + - I16 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167i16 + - Value: + Integer: + - I16 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486i16 + - Value: + Integer: + - I16 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975i16 + - Value: + Integer: + - I16 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816i16 + - Value: + Integer: + - I16 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978i16 + - Value: + Integer: + - I16 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635i16 + - Value: + Integer: + - I16 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713i16 + - Value: + Integer: + - I16 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716i16 + - Value: + Integer: + - I16 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965i16 + - Value: + Integer: + - I16 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268i16 + - Value: + Integer: + - I16 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279i16 + - Value: + Integer: + - I16 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638i16 + - Value: + Integer: + - I16 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620i16 + - Value: + Integer: + - I16 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898i16 + - Value: + Integer: + - I16 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516i16 + - Value: + Integer: + - I16 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377i16 + - Value: + Integer: + - I16 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521i16 + - Value: + Integer: + - I16 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358i16 + - Value: + Integer: + - I16 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452i16 + - Value: + Integer: + - I16 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158i16 + - Value: + Integer: + - I16 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051i16 + - Value: + Integer: + - I16 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318i16 + - Value: + Integer: + - I16 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590i16 + - Value: + Integer: + - I16 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800i16 + - Value: + Integer: + - I16 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117i16 + - Value: + Integer: + - I16 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940i16 + - Value: + Integer: + - I16 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783i16 + - Value: + Integer: + - I16 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874i16 + - Value: + Integer: + - I16 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940i16 + - Value: + Integer: + - I16 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040i16 + - Value: + Integer: + - I16 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509i16 + - Value: + Integer: + - I16 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918i16 + - Value: + Integer: + - I16 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133i16 + - Value: + Integer: + - I16 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032i16 + - Value: + Integer: + - I16 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261i16 + - Value: + Integer: + - I16 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764i16 + - Value: + Integer: + - I16 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080i16 + - Value: + Integer: + - I16 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385i16 + - Value: + Integer: + - I16 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058i16 + - Value: + Integer: + - I16 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292i16 + - Value: + Integer: + - I16 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273i16 + - Value: + Integer: + - I16 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617i16 + - Value: + Integer: + - I16 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189i16 + - Value: + Integer: + - I16 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931i16 + - Value: + Integer: + - I16 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281i16 + - Value: + Integer: + - I16 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802i16 + - Value: + Integer: + - I16 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261i16 + - Value: + Integer: + - I16 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090i16 + - Value: + Integer: + - I16 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405i16 + - Value: + Integer: + - I16 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237i16 + - Value: + Integer: + - I16 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190i16 + - Value: + Integer: + - I16 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419i16 + - Value: + Integer: + - I16 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431i16 + - Value: + Integer: + - I16 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803i16 + - Value: + Integer: + - I16 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693i16 + - Value: + Integer: + - I16 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240i16 + - Value: + Integer: + - I16 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332i16 + - Value: + Integer: + - I16 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338i16 + - Value: + Integer: + - I16 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008i16 + - Value: + Integer: + - I16 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889i16 + - Value: + Integer: + - I16 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188i16 + - Value: + Integer: + - I16 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051i16 + - Value: + Integer: + - I16 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518i16 + - Value: + Integer: + - I16 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820i16 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out new file mode 100644 index 0000000000..82d66bdbf5 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I32 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123i32 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I32 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456i32 + - Value: + Integer: + - I32 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i32 + - Value: + Integer: + - I32 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i32 + - Value: + Integer: + - I32 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024i32 + - Value: + Integer: + - I32 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116i32 + - Value: + Integer: + - I32 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659i32 + - Value: + Integer: + - I32 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166i32 + - Value: + Integer: + - I32 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736i32 + - Value: + Integer: + - I32 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960i32 + - Value: + Integer: + - I32 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719i32 + - Value: + Integer: + - I32 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814i32 + - Value: + Integer: + - I32 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789i32 + - Value: + Integer: + - I32 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565i32 + - Value: + Integer: + - I32 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391i32 + - Value: + Integer: + - I32 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549i32 + - Value: + Integer: + - I32 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620i32 + - Value: + Integer: + - I32 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583i32 + - Value: + Integer: + - I32 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927i32 + - Value: + Integer: + - I32 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544i32 + - Value: + Integer: + - I32 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586i32 + - Value: + Integer: + - I32 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278i32 + - Value: + Integer: + - I32 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045i32 + - Value: + Integer: + - I32 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546i32 + - Value: + Integer: + - I32 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181i32 + - Value: + Integer: + - I32 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903i32 + - Value: + Integer: + - I32 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877i32 + - Value: + Integer: + - I32 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131i32 + - Value: + Integer: + - I32 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267i32 + - Value: + Integer: + - I32 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620i32 + - Value: + Integer: + - I32 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048i32 + - Value: + Integer: + - I32 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649i32 + - Value: + Integer: + - I32 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493i32 + - Value: + Integer: + - I32 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725i32 + - Value: + Integer: + - I32 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114i32 + - Value: + Integer: + - I32 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870i32 + - Value: + Integer: + - I32 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126i32 + - Value: + Integer: + - I32 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155i32 + - Value: + Integer: + - I32 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305i32 + - Value: + Integer: + - I32 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435i32 + - Value: + Integer: + - I32 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167i32 + - Value: + Integer: + - I32 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486i32 + - Value: + Integer: + - I32 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975i32 + - Value: + Integer: + - I32 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816i32 + - Value: + Integer: + - I32 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978i32 + - Value: + Integer: + - I32 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635i32 + - Value: + Integer: + - I32 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713i32 + - Value: + Integer: + - I32 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716i32 + - Value: + Integer: + - I32 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965i32 + - Value: + Integer: + - I32 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268i32 + - Value: + Integer: + - I32 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279i32 + - Value: + Integer: + - I32 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638i32 + - Value: + Integer: + - I32 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620i32 + - Value: + Integer: + - I32 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898i32 + - Value: + Integer: + - I32 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516i32 + - Value: + Integer: + - I32 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377i32 + - Value: + Integer: + - I32 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521i32 + - Value: + Integer: + - I32 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358i32 + - Value: + Integer: + - I32 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452i32 + - Value: + Integer: + - I32 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158i32 + - Value: + Integer: + - I32 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051i32 + - Value: + Integer: + - I32 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318i32 + - Value: + Integer: + - I32 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590i32 + - Value: + Integer: + - I32 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800i32 + - Value: + Integer: + - I32 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117i32 + - Value: + Integer: + - I32 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940i32 + - Value: + Integer: + - I32 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783i32 + - Value: + Integer: + - I32 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874i32 + - Value: + Integer: + - I32 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940i32 + - Value: + Integer: + - I32 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040i32 + - Value: + Integer: + - I32 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509i32 + - Value: + Integer: + - I32 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918i32 + - Value: + Integer: + - I32 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133i32 + - Value: + Integer: + - I32 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032i32 + - Value: + Integer: + - I32 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261i32 + - Value: + Integer: + - I32 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764i32 + - Value: + Integer: + - I32 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080i32 + - Value: + Integer: + - I32 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385i32 + - Value: + Integer: + - I32 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058i32 + - Value: + Integer: + - I32 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292i32 + - Value: + Integer: + - I32 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273i32 + - Value: + Integer: + - I32 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617i32 + - Value: + Integer: + - I32 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189i32 + - Value: + Integer: + - I32 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931i32 + - Value: + Integer: + - I32 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281i32 + - Value: + Integer: + - I32 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802i32 + - Value: + Integer: + - I32 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261i32 + - Value: + Integer: + - I32 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090i32 + - Value: + Integer: + - I32 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405i32 + - Value: + Integer: + - I32 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237i32 + - Value: + Integer: + - I32 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190i32 + - Value: + Integer: + - I32 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419i32 + - Value: + Integer: + - I32 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431i32 + - Value: + Integer: + - I32 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803i32 + - Value: + Integer: + - I32 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693i32 + - Value: + Integer: + - I32 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240i32 + - Value: + Integer: + - I32 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332i32 + - Value: + Integer: + - I32 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338i32 + - Value: + Integer: + - I32 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008i32 + - Value: + Integer: + - I32 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889i32 + - Value: + Integer: + - I32 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188i32 + - Value: + Integer: + - I32 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051i32 + - Value: + Integer: + - I32 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518i32 + - Value: + Integer: + - I32 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820i32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out new file mode 100644 index 0000000000..24949c2f99 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I64 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123i64 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I64 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456i64 + - Value: + Integer: + - I64 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i64 + - Value: + Integer: + - I64 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i64 + - Value: + Integer: + - I64 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024i64 + - Value: + Integer: + - I64 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116i64 + - Value: + Integer: + - I64 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659i64 + - Value: + Integer: + - I64 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166i64 + - Value: + Integer: + - I64 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736i64 + - Value: + Integer: + - I64 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960i64 + - Value: + Integer: + - I64 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719i64 + - Value: + Integer: + - I64 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814i64 + - Value: + Integer: + - I64 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789i64 + - Value: + Integer: + - I64 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565i64 + - Value: + Integer: + - I64 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391i64 + - Value: + Integer: + - I64 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549i64 + - Value: + Integer: + - I64 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620i64 + - Value: + Integer: + - I64 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583i64 + - Value: + Integer: + - I64 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927i64 + - Value: + Integer: + - I64 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544i64 + - Value: + Integer: + - I64 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586i64 + - Value: + Integer: + - I64 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278i64 + - Value: + Integer: + - I64 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045i64 + - Value: + Integer: + - I64 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546i64 + - Value: + Integer: + - I64 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181i64 + - Value: + Integer: + - I64 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903i64 + - Value: + Integer: + - I64 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877i64 + - Value: + Integer: + - I64 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131i64 + - Value: + Integer: + - I64 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267i64 + - Value: + Integer: + - I64 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620i64 + - Value: + Integer: + - I64 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048i64 + - Value: + Integer: + - I64 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649i64 + - Value: + Integer: + - I64 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493i64 + - Value: + Integer: + - I64 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725i64 + - Value: + Integer: + - I64 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114i64 + - Value: + Integer: + - I64 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870i64 + - Value: + Integer: + - I64 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126i64 + - Value: + Integer: + - I64 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155i64 + - Value: + Integer: + - I64 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305i64 + - Value: + Integer: + - I64 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435i64 + - Value: + Integer: + - I64 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167i64 + - Value: + Integer: + - I64 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486i64 + - Value: + Integer: + - I64 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975i64 + - Value: + Integer: + - I64 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816i64 + - Value: + Integer: + - I64 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978i64 + - Value: + Integer: + - I64 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635i64 + - Value: + Integer: + - I64 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713i64 + - Value: + Integer: + - I64 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716i64 + - Value: + Integer: + - I64 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965i64 + - Value: + Integer: + - I64 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268i64 + - Value: + Integer: + - I64 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279i64 + - Value: + Integer: + - I64 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638i64 + - Value: + Integer: + - I64 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620i64 + - Value: + Integer: + - I64 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898i64 + - Value: + Integer: + - I64 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516i64 + - Value: + Integer: + - I64 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377i64 + - Value: + Integer: + - I64 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521i64 + - Value: + Integer: + - I64 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358i64 + - Value: + Integer: + - I64 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452i64 + - Value: + Integer: + - I64 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158i64 + - Value: + Integer: + - I64 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051i64 + - Value: + Integer: + - I64 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318i64 + - Value: + Integer: + - I64 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590i64 + - Value: + Integer: + - I64 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800i64 + - Value: + Integer: + - I64 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117i64 + - Value: + Integer: + - I64 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940i64 + - Value: + Integer: + - I64 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783i64 + - Value: + Integer: + - I64 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874i64 + - Value: + Integer: + - I64 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940i64 + - Value: + Integer: + - I64 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040i64 + - Value: + Integer: + - I64 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509i64 + - Value: + Integer: + - I64 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918i64 + - Value: + Integer: + - I64 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133i64 + - Value: + Integer: + - I64 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032i64 + - Value: + Integer: + - I64 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261i64 + - Value: + Integer: + - I64 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764i64 + - Value: + Integer: + - I64 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080i64 + - Value: + Integer: + - I64 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385i64 + - Value: + Integer: + - I64 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058i64 + - Value: + Integer: + - I64 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292i64 + - Value: + Integer: + - I64 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273i64 + - Value: + Integer: + - I64 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617i64 + - Value: + Integer: + - I64 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189i64 + - Value: + Integer: + - I64 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931i64 + - Value: + Integer: + - I64 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281i64 + - Value: + Integer: + - I64 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802i64 + - Value: + Integer: + - I64 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261i64 + - Value: + Integer: + - I64 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090i64 + - Value: + Integer: + - I64 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405i64 + - Value: + Integer: + - I64 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237i64 + - Value: + Integer: + - I64 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190i64 + - Value: + Integer: + - I64 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419i64 + - Value: + Integer: + - I64 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431i64 + - Value: + Integer: + - I64 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803i64 + - Value: + Integer: + - I64 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693i64 + - Value: + Integer: + - I64 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240i64 + - Value: + Integer: + - I64 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332i64 + - Value: + Integer: + - I64 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338i64 + - Value: + Integer: + - I64 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008i64 + - Value: + Integer: + - I64 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889i64 + - Value: + Integer: + - I64 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188i64 + - Value: + Integer: + - I64 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051i64 + - Value: + Integer: + - I64 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518i64 + - Value: + Integer: + - I64 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820i64 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out new file mode 100644 index 0000000000..7b06304a6a --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I8 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 123i8 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I8 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 456i8 + - Value: + Integer: + - I8 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 83 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i8 + - Value: + Integer: + - I8 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 403 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i8 + - Value: + Integer: + - I8 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 340130024i8 + - Value: + Integer: + - I8 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158951116i8 + - Value: + Integer: + - I8 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 155529659i8 + - Value: + Integer: + - I8 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 642023166i8 + - Value: + Integer: + - I8 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 228481736i8 + - Value: + Integer: + - I8 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469712960i8 + - Value: + Integer: + - I8 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 929437719i8 + - Value: + Integer: + - I8 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721072814i8 + - Value: + Integer: + - I8 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 363254789i8 + - Value: + Integer: + - I8 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 906732565i8 + - Value: + Integer: + - I8 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 288246391i8 + - Value: + Integer: + - I8 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 724940549i8 + - Value: + Integer: + - I8 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 487101620i8 + - Value: + Integer: + - I8 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 261373583i8 + - Value: + Integer: + - I8 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 891163927i8 + - Value: + Integer: + - I8 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 743967544i8 + - Value: + Integer: + - I8 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 8372586i8 + - Value: + Integer: + - I8 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 461793278i8 + - Value: + Integer: + - I8 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 806307045i8 + - Value: + Integer: + - I8 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 122764546i8 + - Value: + Integer: + - I8 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 356336181i8 + - Value: + Integer: + - I8 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158370903i8 + - Value: + Integer: + - I8 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 774460877i8 + - Value: + Integer: + - I8 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 557174131i8 + - Value: + Integer: + - I8 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 492401267i8 + - Value: + Integer: + - I8 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893445620i8 + - Value: + Integer: + - I8 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 957757048i8 + - Value: + Integer: + - I8 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721540649i8 + - Value: + Integer: + - I8 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 390746493i8 + - Value: + Integer: + - I8 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 211251725i8 + - Value: + Integer: + - I8 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 938266114i8 + - Value: + Integer: + - I8 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 156985870i8 + - Value: + Integer: + - I8 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 703831126i8 + - Value: + Integer: + - I8 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 729964155i8 + - Value: + Integer: + - I8 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 988151305i8 + - Value: + Integer: + - I8 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 320872435i8 + - Value: + Integer: + - I8 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 719287167i8 + - Value: + Integer: + - I8 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 152289486i8 + - Value: + Integer: + - I8 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 740067975i8 + - Value: + Integer: + - I8 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 728627816i8 + - Value: + Integer: + - I8 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 385008978i8 + - Value: + Integer: + - I8 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 553967635i8 + - Value: + Integer: + - I8 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 71980713i8 + - Value: + Integer: + - I8 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 519444716i8 + - Value: + Integer: + - I8 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 116499965i8 + - Value: + Integer: + - I8 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 717422268i8 + - Value: + Integer: + - I8 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 18966279i8 + - Value: + Integer: + - I8 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 22458638i8 + - Value: + Integer: + - I8 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 857282620i8 + - Value: + Integer: + - I8 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 920675898i8 + - Value: + Integer: + - I8 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 762235516i8 + - Value: + Integer: + - I8 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469018377i8 + - Value: + Integer: + - I8 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199986521i8 + - Value: + Integer: + - I8 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 536679358i8 + - Value: + Integer: + - I8 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 591399452i8 + - Value: + Integer: + - I8 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 83083158i8 + - Value: + Integer: + - I8 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 599449051i8 + - Value: + Integer: + - I8 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 445442318i8 + - Value: + Integer: + - I8 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 585486590i8 + - Value: + Integer: + - I8 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 209278800i8 + - Value: + Integer: + - I8 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 873568117i8 + - Value: + Integer: + - I8 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 664470940i8 + - Value: + Integer: + - I8 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 465262783i8 + - Value: + Integer: + - I8 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 605652874i8 + - Value: + Integer: + - I8 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 376803940i8 + - Value: + Integer: + - I8 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 965247040i8 + - Value: + Integer: + - I8 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 598474509i8 + - Value: + Integer: + - I8 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 845119918i8 + - Value: + Integer: + - I8 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 648159133i8 + - Value: + Integer: + - I8 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 669051032i8 + - Value: + Integer: + - I8 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 800600261i8 + - Value: + Integer: + - I8 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 434689764i8 + - Value: + Integer: + - I8 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 520060080i8 + - Value: + Integer: + - I8 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 804659385i8 + - Value: + Integer: + - I8 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 537828058i8 + - Value: + Integer: + - I8 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 716600292i8 + - Value: + Integer: + - I8 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387020273i8 + - Value: + Integer: + - I8 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199375617i8 + - Value: + Integer: + - I8 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 680337189i8 + - Value: + Integer: + - I8 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 818479931i8 + - Value: + Integer: + - I8 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893693281i8 + - Value: + Integer: + - I8 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 87377802i8 + - Value: + Integer: + - I8 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 84699261i8 + - Value: + Integer: + - I8 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 292826090i8 + - Value: + Integer: + - I8 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 569171405i8 + - Value: + Integer: + - I8 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387436237i8 + - Value: + Integer: + - I8 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 150682190i8 + - Value: + Integer: + - I8 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 888770419i8 + - Value: + Integer: + - I8 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 824696431i8 + - Value: + Integer: + - I8 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 765659803i8 + - Value: + Integer: + - I8 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 270163693i8 + - Value: + Integer: + - I8 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 427940240i8 + - Value: + Integer: + - I8 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 504997332i8 + - Value: + Integer: + - I8 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 337808338i8 + - Value: + Integer: + - I8 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 907200008i8 + - Value: + Integer: + - I8 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 757177889i8 + - Value: + Integer: + - I8 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 696697188i8 + - Value: + Integer: + - I8 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 41376051i8 + - Value: + Integer: + - I8 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 496293518i8 + - Value: + Integer: + - I8 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 251218820i8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out new file mode 100644 index 0000000000..43e759dcc6 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out @@ -0,0 +1,949 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Implicit: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "456" + - Value: + Implicit: + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 81 + path: test + content: "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - Value: + Implicit: + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 401 + path: test + content: "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - Value: + Implicit: + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "340130024" + - Value: + Implicit: + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "158951116" + - Value: + Implicit: + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "155529659" + - Value: + Implicit: + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "642023166" + - Value: + Implicit: + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "228481736" + - Value: + Implicit: + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "469712960" + - Value: + Implicit: + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "929437719" + - Value: + Implicit: + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "721072814" + - Value: + Implicit: + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "363254789" + - Value: + Implicit: + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "906732565" + - Value: + Implicit: + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "288246391" + - Value: + Implicit: + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "724940549" + - Value: + Implicit: + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "487101620" + - Value: + Implicit: + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "261373583" + - Value: + Implicit: + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "891163927" + - Value: + Implicit: + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "743967544" + - Value: + Implicit: + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "8372586" + - Value: + Implicit: + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "461793278" + - Value: + Implicit: + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "806307045" + - Value: + Implicit: + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "122764546" + - Value: + Implicit: + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "356336181" + - Value: + Implicit: + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "158370903" + - Value: + Implicit: + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "774460877" + - Value: + Implicit: + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "557174131" + - Value: + Implicit: + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "492401267" + - Value: + Implicit: + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "893445620" + - Value: + Implicit: + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "957757048" + - Value: + Implicit: + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "721540649" + - Value: + Implicit: + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "390746493" + - Value: + Implicit: + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "211251725" + - Value: + Implicit: + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "938266114" + - Value: + Implicit: + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "156985870" + - Value: + Implicit: + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "703831126" + - Value: + Implicit: + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "729964155" + - Value: + Implicit: + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "988151305" + - Value: + Implicit: + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "320872435" + - Value: + Implicit: + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "719287167" + - Value: + Implicit: + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "152289486" + - Value: + Implicit: + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "740067975" + - Value: + Implicit: + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "728627816" + - Value: + Implicit: + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "385008978" + - Value: + Implicit: + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "553967635" + - Value: + Implicit: + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "71980713" + - Value: + Implicit: + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "519444716" + - Value: + Implicit: + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "116499965" + - Value: + Implicit: + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "717422268" + - Value: + Implicit: + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "18966279" + - Value: + Implicit: + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "22458638" + - Value: + Implicit: + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "857282620" + - Value: + Implicit: + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "920675898" + - Value: + Implicit: + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "762235516" + - Value: + Implicit: + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "469018377" + - Value: + Implicit: + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "199986521" + - Value: + Implicit: + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "536679358" + - Value: + Implicit: + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "591399452" + - Value: + Implicit: + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "83083158" + - Value: + Implicit: + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "599449051" + - Value: + Implicit: + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "445442318" + - Value: + Implicit: + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "585486590" + - Value: + Implicit: + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "209278800" + - Value: + Implicit: + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "873568117" + - Value: + Implicit: + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "664470940" + - Value: + Implicit: + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "465262783" + - Value: + Implicit: + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "605652874" + - Value: + Implicit: + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "376803940" + - Value: + Implicit: + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "965247040" + - Value: + Implicit: + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "598474509" + - Value: + Implicit: + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "845119918" + - Value: + Implicit: + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "648159133" + - Value: + Implicit: + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "669051032" + - Value: + Implicit: + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "800600261" + - Value: + Implicit: + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "434689764" + - Value: + Implicit: + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "520060080" + - Value: + Implicit: + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "804659385" + - Value: + Implicit: + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "537828058" + - Value: + Implicit: + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "716600292" + - Value: + Implicit: + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "387020273" + - Value: + Implicit: + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "199375617" + - Value: + Implicit: + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "680337189" + - Value: + Implicit: + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "818479931" + - Value: + Implicit: + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "893693281" + - Value: + Implicit: + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "87377802" + - Value: + Implicit: + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "84699261" + - Value: + Implicit: + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "292826090" + - Value: + Implicit: + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "569171405" + - Value: + Implicit: + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "387436237" + - Value: + Implicit: + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "150682190" + - Value: + Implicit: + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "888770419" + - Value: + Implicit: + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "824696431" + - Value: + Implicit: + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "765659803" + - Value: + Implicit: + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "270163693" + - Value: + Implicit: + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "427940240" + - Value: + Implicit: + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "504997332" + - Value: + Implicit: + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "337808338" + - Value: + Implicit: + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "907200008" + - Value: + Implicit: + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "757177889" + - Value: + Implicit: + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "696697188" + - Value: + Implicit: + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "41376051" + - Value: + Implicit: + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "496293518" + - Value: + Implicit: + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "251218820" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out new file mode 100644 index 0000000000..9e959269ac --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Group: + Single: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: 123group + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Group: + Single: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: 456group + - Value: + Group: + Single: + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 86 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802group + - Value: + Group: + Single: + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 406 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802group + - Value: + Group: + Single: + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 340130024group + - Value: + Group: + Single: + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 158951116group + - Value: + Group: + Single: + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 155529659group + - Value: + Group: + Single: + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 642023166group + - Value: + Group: + Single: + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 228481736group + - Value: + Group: + Single: + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 469712960group + - Value: + Group: + Single: + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 929437719group + - Value: + Group: + Single: + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 721072814group + - Value: + Group: + Single: + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 363254789group + - Value: + Group: + Single: + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 906732565group + - Value: + Group: + Single: + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 288246391group + - Value: + Group: + Single: + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 724940549group + - Value: + Group: + Single: + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 487101620group + - Value: + Group: + Single: + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 261373583group + - Value: + Group: + Single: + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 891163927group + - Value: + Group: + Single: + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 743967544group + - Value: + Group: + Single: + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 8372586group + - Value: + Group: + Single: + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 461793278group + - Value: + Group: + Single: + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 806307045group + - Value: + Group: + Single: + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 122764546group + - Value: + Group: + Single: + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 356336181group + - Value: + Group: + Single: + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 158370903group + - Value: + Group: + Single: + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 774460877group + - Value: + Group: + Single: + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 557174131group + - Value: + Group: + Single: + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 492401267group + - Value: + Group: + Single: + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 893445620group + - Value: + Group: + Single: + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 957757048group + - Value: + Group: + Single: + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 721540649group + - Value: + Group: + Single: + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 390746493group + - Value: + Group: + Single: + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 211251725group + - Value: + Group: + Single: + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 938266114group + - Value: + Group: + Single: + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 156985870group + - Value: + Group: + Single: + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 703831126group + - Value: + Group: + Single: + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 729964155group + - Value: + Group: + Single: + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 988151305group + - Value: + Group: + Single: + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 320872435group + - Value: + Group: + Single: + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 719287167group + - Value: + Group: + Single: + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 152289486group + - Value: + Group: + Single: + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 740067975group + - Value: + Group: + Single: + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 728627816group + - Value: + Group: + Single: + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 385008978group + - Value: + Group: + Single: + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 553967635group + - Value: + Group: + Single: + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 71980713group + - Value: + Group: + Single: + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 519444716group + - Value: + Group: + Single: + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 116499965group + - Value: + Group: + Single: + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 717422268group + - Value: + Group: + Single: + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 18966279group + - Value: + Group: + Single: + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 22458638group + - Value: + Group: + Single: + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 857282620group + - Value: + Group: + Single: + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 920675898group + - Value: + Group: + Single: + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 762235516group + - Value: + Group: + Single: + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 469018377group + - Value: + Group: + Single: + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 199986521group + - Value: + Group: + Single: + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 536679358group + - Value: + Group: + Single: + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 591399452group + - Value: + Group: + Single: + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 83083158group + - Value: + Group: + Single: + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 599449051group + - Value: + Group: + Single: + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 445442318group + - Value: + Group: + Single: + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 585486590group + - Value: + Group: + Single: + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 209278800group + - Value: + Group: + Single: + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 873568117group + - Value: + Group: + Single: + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 664470940group + - Value: + Group: + Single: + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 465262783group + - Value: + Group: + Single: + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 605652874group + - Value: + Group: + Single: + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 376803940group + - Value: + Group: + Single: + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 965247040group + - Value: + Group: + Single: + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 598474509group + - Value: + Group: + Single: + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 845119918group + - Value: + Group: + Single: + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 648159133group + - Value: + Group: + Single: + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 669051032group + - Value: + Group: + Single: + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 800600261group + - Value: + Group: + Single: + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 434689764group + - Value: + Group: + Single: + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 520060080group + - Value: + Group: + Single: + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 804659385group + - Value: + Group: + Single: + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 537828058group + - Value: + Group: + Single: + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 716600292group + - Value: + Group: + Single: + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 387020273group + - Value: + Group: + Single: + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 199375617group + - Value: + Group: + Single: + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 680337189group + - Value: + Group: + Single: + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 818479931group + - Value: + Group: + Single: + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 893693281group + - Value: + Group: + Single: + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 87377802group + - Value: + Group: + Single: + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 84699261group + - Value: + Group: + Single: + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 292826090group + - Value: + Group: + Single: + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 569171405group + - Value: + Group: + Single: + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 387436237group + - Value: + Group: + Single: + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 150682190group + - Value: + Group: + Single: + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 888770419group + - Value: + Group: + Single: + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 824696431group + - Value: + Group: + Single: + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 765659803group + - Value: + Group: + Single: + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 270163693group + - Value: + Group: + Single: + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 427940240group + - Value: + Group: + Single: + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 504997332group + - Value: + Group: + Single: + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 337808338group + - Value: + Group: + Single: + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 907200008group + - Value: + Group: + Single: + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 757177889group + - Value: + Group: + Single: + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 696697188group + - Value: + Group: + Single: + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 41376051group + - Value: + Group: + Single: + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 496293518group + - Value: + Group: + Single: + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 251218820group diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out new file mode 100644 index 0000000000..f1048e6469 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U128 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 123u128 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U128 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 456u128 + - Value: + Integer: + - U128 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 85 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u128 + - Value: + Integer: + - U128 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 405 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u128 + - Value: + Integer: + - U128 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 340130024u128 + - Value: + Integer: + - U128 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 158951116u128 + - Value: + Integer: + - U128 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 155529659u128 + - Value: + Integer: + - U128 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 642023166u128 + - Value: + Integer: + - U128 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 228481736u128 + - Value: + Integer: + - U128 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 469712960u128 + - Value: + Integer: + - U128 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 929437719u128 + - Value: + Integer: + - U128 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 721072814u128 + - Value: + Integer: + - U128 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 363254789u128 + - Value: + Integer: + - U128 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 906732565u128 + - Value: + Integer: + - U128 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 288246391u128 + - Value: + Integer: + - U128 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 724940549u128 + - Value: + Integer: + - U128 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 487101620u128 + - Value: + Integer: + - U128 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 261373583u128 + - Value: + Integer: + - U128 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 891163927u128 + - Value: + Integer: + - U128 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 743967544u128 + - Value: + Integer: + - U128 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 8372586u128 + - Value: + Integer: + - U128 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 461793278u128 + - Value: + Integer: + - U128 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 806307045u128 + - Value: + Integer: + - U128 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 122764546u128 + - Value: + Integer: + - U128 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 356336181u128 + - Value: + Integer: + - U128 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 158370903u128 + - Value: + Integer: + - U128 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 774460877u128 + - Value: + Integer: + - U128 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 557174131u128 + - Value: + Integer: + - U128 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 492401267u128 + - Value: + Integer: + - U128 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 893445620u128 + - Value: + Integer: + - U128 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 957757048u128 + - Value: + Integer: + - U128 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 721540649u128 + - Value: + Integer: + - U128 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 390746493u128 + - Value: + Integer: + - U128 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 211251725u128 + - Value: + Integer: + - U128 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 938266114u128 + - Value: + Integer: + - U128 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 156985870u128 + - Value: + Integer: + - U128 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 703831126u128 + - Value: + Integer: + - U128 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 729964155u128 + - Value: + Integer: + - U128 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 988151305u128 + - Value: + Integer: + - U128 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 320872435u128 + - Value: + Integer: + - U128 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 719287167u128 + - Value: + Integer: + - U128 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 152289486u128 + - Value: + Integer: + - U128 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 740067975u128 + - Value: + Integer: + - U128 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 728627816u128 + - Value: + Integer: + - U128 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 385008978u128 + - Value: + Integer: + - U128 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 553967635u128 + - Value: + Integer: + - U128 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 71980713u128 + - Value: + Integer: + - U128 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 519444716u128 + - Value: + Integer: + - U128 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 116499965u128 + - Value: + Integer: + - U128 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 717422268u128 + - Value: + Integer: + - U128 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 18966279u128 + - Value: + Integer: + - U128 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 22458638u128 + - Value: + Integer: + - U128 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 857282620u128 + - Value: + Integer: + - U128 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 920675898u128 + - Value: + Integer: + - U128 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 762235516u128 + - Value: + Integer: + - U128 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 469018377u128 + - Value: + Integer: + - U128 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 199986521u128 + - Value: + Integer: + - U128 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 536679358u128 + - Value: + Integer: + - U128 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 591399452u128 + - Value: + Integer: + - U128 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 83083158u128 + - Value: + Integer: + - U128 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 599449051u128 + - Value: + Integer: + - U128 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 445442318u128 + - Value: + Integer: + - U128 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 585486590u128 + - Value: + Integer: + - U128 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 209278800u128 + - Value: + Integer: + - U128 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 873568117u128 + - Value: + Integer: + - U128 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 664470940u128 + - Value: + Integer: + - U128 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 465262783u128 + - Value: + Integer: + - U128 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 605652874u128 + - Value: + Integer: + - U128 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 376803940u128 + - Value: + Integer: + - U128 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 965247040u128 + - Value: + Integer: + - U128 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 598474509u128 + - Value: + Integer: + - U128 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 845119918u128 + - Value: + Integer: + - U128 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 648159133u128 + - Value: + Integer: + - U128 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 669051032u128 + - Value: + Integer: + - U128 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 800600261u128 + - Value: + Integer: + - U128 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 434689764u128 + - Value: + Integer: + - U128 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 520060080u128 + - Value: + Integer: + - U128 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 804659385u128 + - Value: + Integer: + - U128 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 537828058u128 + - Value: + Integer: + - U128 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 716600292u128 + - Value: + Integer: + - U128 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 387020273u128 + - Value: + Integer: + - U128 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 199375617u128 + - Value: + Integer: + - U128 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 680337189u128 + - Value: + Integer: + - U128 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 818479931u128 + - Value: + Integer: + - U128 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 893693281u128 + - Value: + Integer: + - U128 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 87377802u128 + - Value: + Integer: + - U128 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 84699261u128 + - Value: + Integer: + - U128 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 292826090u128 + - Value: + Integer: + - U128 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 569171405u128 + - Value: + Integer: + - U128 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 387436237u128 + - Value: + Integer: + - U128 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 150682190u128 + - Value: + Integer: + - U128 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 888770419u128 + - Value: + Integer: + - U128 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 824696431u128 + - Value: + Integer: + - U128 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 765659803u128 + - Value: + Integer: + - U128 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 270163693u128 + - Value: + Integer: + - U128 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 427940240u128 + - Value: + Integer: + - U128 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 504997332u128 + - Value: + Integer: + - U128 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 337808338u128 + - Value: + Integer: + - U128 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 907200008u128 + - Value: + Integer: + - U128 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 757177889u128 + - Value: + Integer: + - U128 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 696697188u128 + - Value: + Integer: + - U128 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 41376051u128 + - Value: + Integer: + - U128 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 496293518u128 + - Value: + Integer: + - U128 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 251218820u128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out new file mode 100644 index 0000000000..324a0abcce --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U8 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 123u8 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U8 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 456u8 + - Value: + Integer: + - U8 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 83 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 + - Value: + Integer: + - U8 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 403 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 + - Value: + Integer: + - U8 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 340130024u8 + - Value: + Integer: + - U8 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158951116u8 + - Value: + Integer: + - U8 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 155529659u8 + - Value: + Integer: + - U8 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 642023166u8 + - Value: + Integer: + - U8 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 228481736u8 + - Value: + Integer: + - U8 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469712960u8 + - Value: + Integer: + - U8 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 929437719u8 + - Value: + Integer: + - U8 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721072814u8 + - Value: + Integer: + - U8 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 363254789u8 + - Value: + Integer: + - U8 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 906732565u8 + - Value: + Integer: + - U8 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 288246391u8 + - Value: + Integer: + - U8 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 724940549u8 + - Value: + Integer: + - U8 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 487101620u8 + - Value: + Integer: + - U8 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 261373583u8 + - Value: + Integer: + - U8 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 891163927u8 + - Value: + Integer: + - U8 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 743967544u8 + - Value: + Integer: + - U8 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 8372586u8 + - Value: + Integer: + - U8 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 461793278u8 + - Value: + Integer: + - U8 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 806307045u8 + - Value: + Integer: + - U8 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 122764546u8 + - Value: + Integer: + - U8 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 356336181u8 + - Value: + Integer: + - U8 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158370903u8 + - Value: + Integer: + - U8 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 774460877u8 + - Value: + Integer: + - U8 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 557174131u8 + - Value: + Integer: + - U8 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 492401267u8 + - Value: + Integer: + - U8 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893445620u8 + - Value: + Integer: + - U8 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 957757048u8 + - Value: + Integer: + - U8 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721540649u8 + - Value: + Integer: + - U8 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 390746493u8 + - Value: + Integer: + - U8 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 211251725u8 + - Value: + Integer: + - U8 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 938266114u8 + - Value: + Integer: + - U8 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 156985870u8 + - Value: + Integer: + - U8 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 703831126u8 + - Value: + Integer: + - U8 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 729964155u8 + - Value: + Integer: + - U8 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 988151305u8 + - Value: + Integer: + - U8 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 320872435u8 + - Value: + Integer: + - U8 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 719287167u8 + - Value: + Integer: + - U8 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 152289486u8 + - Value: + Integer: + - U8 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 740067975u8 + - Value: + Integer: + - U8 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 728627816u8 + - Value: + Integer: + - U8 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 385008978u8 + - Value: + Integer: + - U8 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 553967635u8 + - Value: + Integer: + - U8 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 71980713u8 + - Value: + Integer: + - U8 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 519444716u8 + - Value: + Integer: + - U8 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 116499965u8 + - Value: + Integer: + - U8 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 717422268u8 + - Value: + Integer: + - U8 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 18966279u8 + - Value: + Integer: + - U8 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 22458638u8 + - Value: + Integer: + - U8 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 857282620u8 + - Value: + Integer: + - U8 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 920675898u8 + - Value: + Integer: + - U8 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 762235516u8 + - Value: + Integer: + - U8 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469018377u8 + - Value: + Integer: + - U8 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199986521u8 + - Value: + Integer: + - U8 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 536679358u8 + - Value: + Integer: + - U8 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 591399452u8 + - Value: + Integer: + - U8 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 83083158u8 + - Value: + Integer: + - U8 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 599449051u8 + - Value: + Integer: + - U8 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 445442318u8 + - Value: + Integer: + - U8 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 585486590u8 + - Value: + Integer: + - U8 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 209278800u8 + - Value: + Integer: + - U8 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 873568117u8 + - Value: + Integer: + - U8 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 664470940u8 + - Value: + Integer: + - U8 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 465262783u8 + - Value: + Integer: + - U8 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 605652874u8 + - Value: + Integer: + - U8 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 376803940u8 + - Value: + Integer: + - U8 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 965247040u8 + - Value: + Integer: + - U8 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 598474509u8 + - Value: + Integer: + - U8 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 845119918u8 + - Value: + Integer: + - U8 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 648159133u8 + - Value: + Integer: + - U8 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 669051032u8 + - Value: + Integer: + - U8 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 800600261u8 + - Value: + Integer: + - U8 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 434689764u8 + - Value: + Integer: + - U8 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 520060080u8 + - Value: + Integer: + - U8 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 804659385u8 + - Value: + Integer: + - U8 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 537828058u8 + - Value: + Integer: + - U8 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 716600292u8 + - Value: + Integer: + - U8 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387020273u8 + - Value: + Integer: + - U8 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199375617u8 + - Value: + Integer: + - U8 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 680337189u8 + - Value: + Integer: + - U8 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 818479931u8 + - Value: + Integer: + - U8 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893693281u8 + - Value: + Integer: + - U8 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 87377802u8 + - Value: + Integer: + - U8 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 84699261u8 + - Value: + Integer: + - U8 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 292826090u8 + - Value: + Integer: + - U8 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 569171405u8 + - Value: + Integer: + - U8 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387436237u8 + - Value: + Integer: + - U8 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 150682190u8 + - Value: + Integer: + - U8 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 888770419u8 + - Value: + Integer: + - U8 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 824696431u8 + - Value: + Integer: + - U8 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 765659803u8 + - Value: + Integer: + - U8 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 270163693u8 + - Value: + Integer: + - U8 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 427940240u8 + - Value: + Integer: + - U8 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 504997332u8 + - Value: + Integer: + - U8 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 337808338u8 + - Value: + Integer: + - U8 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 907200008u8 + - Value: + Integer: + - U8 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 757177889u8 + - Value: + Integer: + - U8 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 696697188u8 + - Value: + Integer: + - U8 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 41376051u8 + - Value: + Integer: + - U8 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 496293518u8 + - Value: + Integer: + - U8 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out new file mode 100644 index 0000000000..ba97127eac --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U32 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123u32 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U32 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456u32 + - Value: + Integer: + - U32 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 + - Value: + Integer: + - U32 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 + - Value: + Integer: + - U32 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024u32 + - Value: + Integer: + - U32 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116u32 + - Value: + Integer: + - U32 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659u32 + - Value: + Integer: + - U32 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166u32 + - Value: + Integer: + - U32 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736u32 + - Value: + Integer: + - U32 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960u32 + - Value: + Integer: + - U32 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719u32 + - Value: + Integer: + - U32 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814u32 + - Value: + Integer: + - U32 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789u32 + - Value: + Integer: + - U32 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565u32 + - Value: + Integer: + - U32 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391u32 + - Value: + Integer: + - U32 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549u32 + - Value: + Integer: + - U32 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620u32 + - Value: + Integer: + - U32 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583u32 + - Value: + Integer: + - U32 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927u32 + - Value: + Integer: + - U32 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544u32 + - Value: + Integer: + - U32 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586u32 + - Value: + Integer: + - U32 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278u32 + - Value: + Integer: + - U32 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045u32 + - Value: + Integer: + - U32 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546u32 + - Value: + Integer: + - U32 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181u32 + - Value: + Integer: + - U32 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903u32 + - Value: + Integer: + - U32 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877u32 + - Value: + Integer: + - U32 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131u32 + - Value: + Integer: + - U32 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267u32 + - Value: + Integer: + - U32 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620u32 + - Value: + Integer: + - U32 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048u32 + - Value: + Integer: + - U32 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649u32 + - Value: + Integer: + - U32 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493u32 + - Value: + Integer: + - U32 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725u32 + - Value: + Integer: + - U32 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114u32 + - Value: + Integer: + - U32 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870u32 + - Value: + Integer: + - U32 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126u32 + - Value: + Integer: + - U32 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155u32 + - Value: + Integer: + - U32 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305u32 + - Value: + Integer: + - U32 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435u32 + - Value: + Integer: + - U32 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167u32 + - Value: + Integer: + - U32 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486u32 + - Value: + Integer: + - U32 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975u32 + - Value: + Integer: + - U32 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816u32 + - Value: + Integer: + - U32 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978u32 + - Value: + Integer: + - U32 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635u32 + - Value: + Integer: + - U32 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713u32 + - Value: + Integer: + - U32 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716u32 + - Value: + Integer: + - U32 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965u32 + - Value: + Integer: + - U32 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268u32 + - Value: + Integer: + - U32 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279u32 + - Value: + Integer: + - U32 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638u32 + - Value: + Integer: + - U32 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620u32 + - Value: + Integer: + - U32 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898u32 + - Value: + Integer: + - U32 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516u32 + - Value: + Integer: + - U32 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377u32 + - Value: + Integer: + - U32 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521u32 + - Value: + Integer: + - U32 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358u32 + - Value: + Integer: + - U32 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452u32 + - Value: + Integer: + - U32 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158u32 + - Value: + Integer: + - U32 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051u32 + - Value: + Integer: + - U32 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318u32 + - Value: + Integer: + - U32 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590u32 + - Value: + Integer: + - U32 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800u32 + - Value: + Integer: + - U32 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117u32 + - Value: + Integer: + - U32 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940u32 + - Value: + Integer: + - U32 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783u32 + - Value: + Integer: + - U32 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874u32 + - Value: + Integer: + - U32 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940u32 + - Value: + Integer: + - U32 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040u32 + - Value: + Integer: + - U32 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509u32 + - Value: + Integer: + - U32 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918u32 + - Value: + Integer: + - U32 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133u32 + - Value: + Integer: + - U32 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032u32 + - Value: + Integer: + - U32 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261u32 + - Value: + Integer: + - U32 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764u32 + - Value: + Integer: + - U32 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080u32 + - Value: + Integer: + - U32 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385u32 + - Value: + Integer: + - U32 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058u32 + - Value: + Integer: + - U32 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292u32 + - Value: + Integer: + - U32 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273u32 + - Value: + Integer: + - U32 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617u32 + - Value: + Integer: + - U32 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189u32 + - Value: + Integer: + - U32 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931u32 + - Value: + Integer: + - U32 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281u32 + - Value: + Integer: + - U32 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802u32 + - Value: + Integer: + - U32 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261u32 + - Value: + Integer: + - U32 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090u32 + - Value: + Integer: + - U32 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405u32 + - Value: + Integer: + - U32 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237u32 + - Value: + Integer: + - U32 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190u32 + - Value: + Integer: + - U32 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419u32 + - Value: + Integer: + - U32 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431u32 + - Value: + Integer: + - U32 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803u32 + - Value: + Integer: + - U32 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693u32 + - Value: + Integer: + - U32 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240u32 + - Value: + Integer: + - U32 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332u32 + - Value: + Integer: + - U32 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338u32 + - Value: + Integer: + - U32 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008u32 + - Value: + Integer: + - U32 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889u32 + - Value: + Integer: + - U32 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188u32 + - Value: + Integer: + - U32 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051u32 + - Value: + Integer: + - U32 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518u32 + - Value: + Integer: + - U32 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out new file mode 100644 index 0000000000..ba97127eac --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U32 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123u32 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U32 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456u32 + - Value: + Integer: + - U32 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 + - Value: + Integer: + - U32 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 + - Value: + Integer: + - U32 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024u32 + - Value: + Integer: + - U32 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116u32 + - Value: + Integer: + - U32 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659u32 + - Value: + Integer: + - U32 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166u32 + - Value: + Integer: + - U32 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736u32 + - Value: + Integer: + - U32 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960u32 + - Value: + Integer: + - U32 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719u32 + - Value: + Integer: + - U32 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814u32 + - Value: + Integer: + - U32 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789u32 + - Value: + Integer: + - U32 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565u32 + - Value: + Integer: + - U32 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391u32 + - Value: + Integer: + - U32 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549u32 + - Value: + Integer: + - U32 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620u32 + - Value: + Integer: + - U32 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583u32 + - Value: + Integer: + - U32 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927u32 + - Value: + Integer: + - U32 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544u32 + - Value: + Integer: + - U32 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586u32 + - Value: + Integer: + - U32 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278u32 + - Value: + Integer: + - U32 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045u32 + - Value: + Integer: + - U32 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546u32 + - Value: + Integer: + - U32 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181u32 + - Value: + Integer: + - U32 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903u32 + - Value: + Integer: + - U32 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877u32 + - Value: + Integer: + - U32 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131u32 + - Value: + Integer: + - U32 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267u32 + - Value: + Integer: + - U32 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620u32 + - Value: + Integer: + - U32 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048u32 + - Value: + Integer: + - U32 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649u32 + - Value: + Integer: + - U32 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493u32 + - Value: + Integer: + - U32 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725u32 + - Value: + Integer: + - U32 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114u32 + - Value: + Integer: + - U32 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870u32 + - Value: + Integer: + - U32 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126u32 + - Value: + Integer: + - U32 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155u32 + - Value: + Integer: + - U32 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305u32 + - Value: + Integer: + - U32 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435u32 + - Value: + Integer: + - U32 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167u32 + - Value: + Integer: + - U32 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486u32 + - Value: + Integer: + - U32 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975u32 + - Value: + Integer: + - U32 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816u32 + - Value: + Integer: + - U32 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978u32 + - Value: + Integer: + - U32 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635u32 + - Value: + Integer: + - U32 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713u32 + - Value: + Integer: + - U32 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716u32 + - Value: + Integer: + - U32 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965u32 + - Value: + Integer: + - U32 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268u32 + - Value: + Integer: + - U32 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279u32 + - Value: + Integer: + - U32 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638u32 + - Value: + Integer: + - U32 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620u32 + - Value: + Integer: + - U32 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898u32 + - Value: + Integer: + - U32 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516u32 + - Value: + Integer: + - U32 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377u32 + - Value: + Integer: + - U32 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521u32 + - Value: + Integer: + - U32 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358u32 + - Value: + Integer: + - U32 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452u32 + - Value: + Integer: + - U32 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158u32 + - Value: + Integer: + - U32 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051u32 + - Value: + Integer: + - U32 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318u32 + - Value: + Integer: + - U32 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590u32 + - Value: + Integer: + - U32 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800u32 + - Value: + Integer: + - U32 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117u32 + - Value: + Integer: + - U32 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940u32 + - Value: + Integer: + - U32 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783u32 + - Value: + Integer: + - U32 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874u32 + - Value: + Integer: + - U32 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940u32 + - Value: + Integer: + - U32 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040u32 + - Value: + Integer: + - U32 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509u32 + - Value: + Integer: + - U32 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918u32 + - Value: + Integer: + - U32 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133u32 + - Value: + Integer: + - U32 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032u32 + - Value: + Integer: + - U32 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261u32 + - Value: + Integer: + - U32 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764u32 + - Value: + Integer: + - U32 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080u32 + - Value: + Integer: + - U32 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385u32 + - Value: + Integer: + - U32 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058u32 + - Value: + Integer: + - U32 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292u32 + - Value: + Integer: + - U32 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273u32 + - Value: + Integer: + - U32 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617u32 + - Value: + Integer: + - U32 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189u32 + - Value: + Integer: + - U32 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931u32 + - Value: + Integer: + - U32 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281u32 + - Value: + Integer: + - U32 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802u32 + - Value: + Integer: + - U32 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261u32 + - Value: + Integer: + - U32 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090u32 + - Value: + Integer: + - U32 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405u32 + - Value: + Integer: + - U32 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237u32 + - Value: + Integer: + - U32 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190u32 + - Value: + Integer: + - U32 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419u32 + - Value: + Integer: + - U32 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431u32 + - Value: + Integer: + - U32 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803u32 + - Value: + Integer: + - U32 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693u32 + - Value: + Integer: + - U32 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240u32 + - Value: + Integer: + - U32 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332u32 + - Value: + Integer: + - U32 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338u32 + - Value: + Integer: + - U32 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008u32 + - Value: + Integer: + - U32 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889u32 + - Value: + Integer: + - U32 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188u32 + - Value: + Integer: + - U32 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051u32 + - Value: + Integer: + - U32 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518u32 + - Value: + Integer: + - U32 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out new file mode 100644 index 0000000000..324a0abcce --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U8 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 123u8 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U8 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 456u8 + - Value: + Integer: + - U8 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 83 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 + - Value: + Integer: + - U8 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 403 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 + - Value: + Integer: + - U8 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 340130024u8 + - Value: + Integer: + - U8 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158951116u8 + - Value: + Integer: + - U8 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 155529659u8 + - Value: + Integer: + - U8 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 642023166u8 + - Value: + Integer: + - U8 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 228481736u8 + - Value: + Integer: + - U8 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469712960u8 + - Value: + Integer: + - U8 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 929437719u8 + - Value: + Integer: + - U8 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721072814u8 + - Value: + Integer: + - U8 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 363254789u8 + - Value: + Integer: + - U8 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 906732565u8 + - Value: + Integer: + - U8 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 288246391u8 + - Value: + Integer: + - U8 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 724940549u8 + - Value: + Integer: + - U8 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 487101620u8 + - Value: + Integer: + - U8 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 261373583u8 + - Value: + Integer: + - U8 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 891163927u8 + - Value: + Integer: + - U8 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 743967544u8 + - Value: + Integer: + - U8 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 8372586u8 + - Value: + Integer: + - U8 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 461793278u8 + - Value: + Integer: + - U8 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 806307045u8 + - Value: + Integer: + - U8 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 122764546u8 + - Value: + Integer: + - U8 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 356336181u8 + - Value: + Integer: + - U8 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158370903u8 + - Value: + Integer: + - U8 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 774460877u8 + - Value: + Integer: + - U8 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 557174131u8 + - Value: + Integer: + - U8 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 492401267u8 + - Value: + Integer: + - U8 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893445620u8 + - Value: + Integer: + - U8 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 957757048u8 + - Value: + Integer: + - U8 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721540649u8 + - Value: + Integer: + - U8 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 390746493u8 + - Value: + Integer: + - U8 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 211251725u8 + - Value: + Integer: + - U8 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 938266114u8 + - Value: + Integer: + - U8 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 156985870u8 + - Value: + Integer: + - U8 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 703831126u8 + - Value: + Integer: + - U8 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 729964155u8 + - Value: + Integer: + - U8 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 988151305u8 + - Value: + Integer: + - U8 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 320872435u8 + - Value: + Integer: + - U8 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 719287167u8 + - Value: + Integer: + - U8 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 152289486u8 + - Value: + Integer: + - U8 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 740067975u8 + - Value: + Integer: + - U8 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 728627816u8 + - Value: + Integer: + - U8 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 385008978u8 + - Value: + Integer: + - U8 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 553967635u8 + - Value: + Integer: + - U8 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 71980713u8 + - Value: + Integer: + - U8 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 519444716u8 + - Value: + Integer: + - U8 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 116499965u8 + - Value: + Integer: + - U8 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 717422268u8 + - Value: + Integer: + - U8 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 18966279u8 + - Value: + Integer: + - U8 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 22458638u8 + - Value: + Integer: + - U8 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 857282620u8 + - Value: + Integer: + - U8 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 920675898u8 + - Value: + Integer: + - U8 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 762235516u8 + - Value: + Integer: + - U8 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469018377u8 + - Value: + Integer: + - U8 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199986521u8 + - Value: + Integer: + - U8 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 536679358u8 + - Value: + Integer: + - U8 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 591399452u8 + - Value: + Integer: + - U8 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 83083158u8 + - Value: + Integer: + - U8 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 599449051u8 + - Value: + Integer: + - U8 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 445442318u8 + - Value: + Integer: + - U8 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 585486590u8 + - Value: + Integer: + - U8 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 209278800u8 + - Value: + Integer: + - U8 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 873568117u8 + - Value: + Integer: + - U8 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 664470940u8 + - Value: + Integer: + - U8 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 465262783u8 + - Value: + Integer: + - U8 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 605652874u8 + - Value: + Integer: + - U8 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 376803940u8 + - Value: + Integer: + - U8 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 965247040u8 + - Value: + Integer: + - U8 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 598474509u8 + - Value: + Integer: + - U8 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 845119918u8 + - Value: + Integer: + - U8 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 648159133u8 + - Value: + Integer: + - U8 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 669051032u8 + - Value: + Integer: + - U8 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 800600261u8 + - Value: + Integer: + - U8 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 434689764u8 + - Value: + Integer: + - U8 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 520060080u8 + - Value: + Integer: + - U8 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 804659385u8 + - Value: + Integer: + - U8 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 537828058u8 + - Value: + Integer: + - U8 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 716600292u8 + - Value: + Integer: + - U8 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387020273u8 + - Value: + Integer: + - U8 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199375617u8 + - Value: + Integer: + - U8 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 680337189u8 + - Value: + Integer: + - U8 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 818479931u8 + - Value: + Integer: + - U8 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893693281u8 + - Value: + Integer: + - U8 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 87377802u8 + - Value: + Integer: + - U8 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 84699261u8 + - Value: + Integer: + - U8 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 292826090u8 + - Value: + Integer: + - U8 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 569171405u8 + - Value: + Integer: + - U8 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387436237u8 + - Value: + Integer: + - U8 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 150682190u8 + - Value: + Integer: + - U8 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 888770419u8 + - Value: + Integer: + - U8 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 824696431u8 + - Value: + Integer: + - U8 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 765659803u8 + - Value: + Integer: + - U8 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 270163693u8 + - Value: + Integer: + - U8 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 427940240u8 + - Value: + Integer: + - U8 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 504997332u8 + - Value: + Integer: + - U8 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 337808338u8 + - Value: + Integer: + - U8 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 907200008u8 + - Value: + Integer: + - U8 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 757177889u8 + - Value: + Integer: + - U8 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 696697188u8 + - Value: + Integer: + - U8 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 41376051u8 + - Value: + Integer: + - U8 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 496293518u8 + - Value: + Integer: + - U8 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out b/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out new file mode 100644 index 0000000000..00ff4531d4 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out @@ -0,0 +1,62 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'field' @ 1:1-6" + - "'Field' @ 1:1-6" + - "'fielD' @ 1:1-6" + - "'FIELD' @ 1:1-6" + - "'group' @ 1:1-6" + - "'Group' @ 1:1-6" + - "'grouP' @ 1:1-6" + - "'GROUP' @ 1:1-6" + - "'u8' @ 1:1-3" + - "'u16' @ 1:1-4" + - "'u32' @ 1:1-4" + - "'u64' @ 1:1-4" + - "'u128' @ 1:1-5" + - "'i8' @ 1:1-3" + - "'i16' @ 1:1-4" + - "'i32' @ 1:1-4" + - "'i64' @ 1:1-4" + - "'i128' @ 1:1-5" + - "'U8' @ 1:1-3" + - "'U16' @ 1:1-4" + - "'U32' @ 1:1-4" + - "'U64' @ 1:1-4" + - "'U128' @ 1:1-5" + - "'U8' @ 1:1-3" + - "'U16' @ 1:1-4" + - "'U32' @ 1:1-4" + - "'U64' @ 1:1-4" + - "'U128' @ 1:1-5" + - "'u' @ 1:1-2" + - "'8' @ 1:1-2" + - "'u' @ 1:1-2" + - "'16' @ 1:1-3" + - "'u' @ 1:1-2" + - "'32' @ 1:1-3" + - "'u' @ 1:1-2" + - "'64' @ 1:1-3" + - "'u' @ 1:1-2" + - "'128' @ 1:1-4" + - "'i' @ 1:1-2" + - "'8' @ 1:1-2" + - "'i' @ 1:1-2" + - "'16' @ 1:1-3" + - "'i' @ 1:1-2" + - "'32' @ 1:1-3" + - "'i' @ 1:1-2" + - "'64' @ 1:1-3" + - "'i' @ 1:1-2" + - "'128' @ 1:1-4" + - "'U' @ 1:1-2,'8' @ 1:3-4" + - "'U' @ 1:1-2,'16' @ 1:3-5" + - "'U' @ 1:1-2,'32' @ 1:3-5" + - "'U' @ 1:1-2,'64' @ 1:3-5" + - "'U' @ 1:1-2,'128' @ 1:3-6" + - "'U' @ 1:1-2,'8' @ 1:3-4" + - "'U' @ 1:1-2,'16' @ 1:3-5" + - "'U' @ 1:1-2,'32' @ 1:3-5" + - "'U' @ 1:1-2,'64' @ 1:3-5" + - "'U' @ 1:1-2,'128' @ 1:3-6" diff --git a/tests/expectations/parser/parser/expression/ternary.leo.out b/tests/expectations/parser/parser/expression/ternary.leo.out new file mode 100644 index 0000000000..0d672f23d9 --- /dev/null +++ b/tests/expectations/parser/parser/expression/ternary.leo.out @@ -0,0 +1,72 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Ternary: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" + if_true: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" + if_false: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x ? y : z" + - Ternary: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + if_true: + Ternary: + condition: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + if_true: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + if_false: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 14 + path: test + content: "x ? a ? b : c : z" + if_false: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "x ? a ? b : c : z" + - Ternary: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + if_true: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + if_false: + Ternary: + condition: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + if_true: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + if_false: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 18 + path: test + content: "x ? y : a ? b : c" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "x ? y : a ? b : c" diff --git a/tests/expectations/parser/parser/expression/tuple.leo.out b/tests/expectations/parser/parser/expression/tuple.leo.out new file mode 100644 index 0000000000..f5ec2aa11b --- /dev/null +++ b/tests/expectations/parser/parser/expression/tuple.leo.out @@ -0,0 +1,94 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Implicit: + - "" + - line_start: 0 + line_stop: 0 + col_start: 0 + col_stop: 0 + path: "" + content: "" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(y)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(z)\\\"}\"}" + - Value: + Implicit: + - "" + - line_start: 0 + line_stop: 0 + col_start: 0 + col_stop: 0 + path: "" + content: "" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,)\\\"}\"}" + - TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "(x,y)" + - TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "(x,y,z)" + - TupleInit: + elements: + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123,123)" + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 9 + path: test + content: "(123,123)" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "(123,123)" + - TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: () + - TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: (()) diff --git a/tests/expectations/parser/parser/expression/unary/negate.leo.out b/tests/expectations/parser/parser/expression/unary/negate.leo.out new file mode 100644 index 0000000000..de785f2be6 --- /dev/null +++ b/tests/expectations/parser/parser/expression/unary/negate.leo.out @@ -0,0 +1,120 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x\\\"}\"}" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "-x" + - Unary: + inner: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "-x.y" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "-x.y" + - Unary: + inner: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 6 + path: test + content: "-x::y" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "-x::y" + - Unary: + inner: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x()\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "-x()" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "-x()" + - Unary: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"--x\\\"}\"}" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "--x" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "--x" + - Unary: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-!x\\\"}\"}" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "-!x" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "-!x" diff --git a/tests/expectations/parser/parser/expression/unary/not.leo.out b/tests/expectations/parser/parser/expression/unary/not.leo.out new file mode 100644 index 0000000000..5c93154572 --- /dev/null +++ b/tests/expectations/parser/parser/expression/unary/not.leo.out @@ -0,0 +1,120 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x\\\"}\"}" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "!x" + - Unary: + inner: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "!x.y" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "!x.y" + - Unary: + inner: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 6 + path: test + content: "!x::y" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "!x::y" + - Unary: + inner: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x()\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "!x()" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "!x()" + - Unary: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!!x\\\"}\"}" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "!!x" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "!!x" + - Unary: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!-x\\\"}\"}" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "!-x" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "!-x" diff --git a/tests/expectations/parser/parser/functions/annotated.leo.out b/tests/expectations/parser/parser/functions/annotated.leo.out new file mode 100644 index 0000000000..29612e265a --- /dev/null +++ b/tests/expectations/parser/parser/functions/annotated.leo.out @@ -0,0 +1,58 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + annotations: + - span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 6 + path: test + content: "@test" + name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test\\\"}\"}" + arguments: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 14 + col_stop: 2 + path: test + content: "function x() {\n...\n}" + span: + line_start: 4 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: test + content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_param.leo.out b/tests/expectations/parser/parser/functions/annotated_param.leo.out new file mode 100644 index 0000000000..72ca72549e --- /dev/null +++ b/tests/expectations/parser/parser/functions/annotated_param.leo.out @@ -0,0 +1,59 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + annotations: + - span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 12 + path: test + content: "@test(test)" + name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test(test)\\\"}\"}" + arguments: + - test + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 14 + col_stop: 2 + path: test + content: "function x() {\n...\n}" + span: + line_start: 4 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: test + content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_twice.leo.out b/tests/expectations/parser/parser/functions/annotated_twice.leo.out new file mode 100644 index 0000000000..a83199ec50 --- /dev/null +++ b/tests/expectations/parser/parser/functions/annotated_twice.leo.out @@ -0,0 +1,67 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + annotations: + - span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 6 + path: test + content: "@test @test2" + name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" + arguments: [] + - span: + line_start: 3 + line_stop: 3 + col_start: 7 + col_stop: 13 + path: test + content: "@test @test2" + name: "{\"name\":\"test2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" + arguments: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 14 + col_stop: 2 + path: test + content: "function x() {\n...\n}" + span: + line_start: 4 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: test + content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_input_fail.leo.out b/tests/expectations/parser/parser/functions/const_input_fail.leo.out new file mode 100644 index 0000000000..468e683fd9 --- /dev/null +++ b/tests/expectations/parser/parser/functions/const_input_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Parse +expectation: Fail +outputs: + - " --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^\n |\n = expected 'ident', got 'input'" diff --git a/tests/expectations/parser/parser/functions/const_param.leo.out b/tests/expectations/parser/parser/functions/const_param.leo.out new file mode 100644 index 0000000000..609a83247f --- /dev/null +++ b/tests/expectations/parser/parser/functions/const_param.leo.out @@ -0,0 +1,140 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: u32, const y: i32) {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 26 + col_stop: 27 + path: test + content: "function x(x: u32, const y: i32) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 34 + col_stop: 2 + path: test + content: "function x(x: u32, const y: i32) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: u32, const y: i32) {\n...\n}" + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: U32 + span: + line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 19 + path: test + content: "function x(const x: u32, y: i32) {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 7 + line_stop: 7 + col_start: 26 + col_stop: 27 + path: test + content: "function x(const x: u32, y: i32) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 7 + line_stop: 9 + col_start: 34 + col_stop: 2 + path: test + content: "function x(const x: u32, y: i32) {\n...\n}" + span: + line_start: 7 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: test + content: "function x(const x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_self_bad.leo.out b/tests/expectations/parser/parser/functions/const_self_bad.leo.out new file mode 100644 index 0000000000..3b6e210cef --- /dev/null +++ b/tests/expectations/parser/parser/functions/const_self_bad.leo.out @@ -0,0 +1,50 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" + input: + - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 24 + col_stop: 2 + path: test + content: "function x(const self) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(const self) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty.leo.out b/tests/expectations/parser/parser/functions/empty.leo.out new file mode 100644 index 0000000000..5ead848ab3 --- /dev/null +++ b/tests/expectations/parser/parser/functions/empty.leo.out @@ -0,0 +1,49 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 14 + col_stop: 2 + path: test + content: "function x() {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty2.leo.out b/tests/expectations/parser/parser/functions/empty2.leo.out new file mode 100644 index 0000000000..16574b1dc3 --- /dev/null +++ b/tests/expectations/parser/parser/functions/empty2.leo.out @@ -0,0 +1,31 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}" + input: [] + output: ~ + block: + statements: [] + span: + line_start: 3 + line_stop: 3 + col_start: 14 + col_stop: 16 + path: test + content: "function x() {}" + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 16 + path: test + content: "function x() {}" diff --git a/tests/expectations/parser/parser/functions/param_array.leo.out b/tests/expectations/parser/parser/functions/param_array.leo.out new file mode 100644 index 0000000000..c9b3cc79cd --- /dev/null +++ b/tests/expectations/parser/parser/functions/param_array.leo.out @@ -0,0 +1,64 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U8 + - - value: "12" + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: [u8; 12]) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 25 + col_stop: 2 + path: test + content: "function x(x: [u8; 12]) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: [u8; 12]) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_circuit.leo.out b/tests/expectations/parser/parser/functions/param_circuit.leo.out new file mode 100644 index 0000000000..e998fe7f92 --- /dev/null +++ b/tests/expectations/parser/parser/functions/param_circuit.leo.out @@ -0,0 +1,62 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" + const_: false + mutable: true + type_: + Circuit: "{\"name\":\"MyCircuit\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: MyCircuit) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 26 + col_stop: 2 + path: test + content: "function x(x: MyCircuit) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: MyCircuit) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_tuple.leo.out b/tests/expectations/parser/parser/functions/param_tuple.leo.out new file mode 100644 index 0000000000..9597b18cb3 --- /dev/null +++ b/tests/expectations/parser/parser/functions/param_tuple.leo.out @@ -0,0 +1,64 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - IntegerType: U32 + - IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: (u32, i32)) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 27 + col_stop: 2 + path: test + content: "function x(x: (u32, i32)) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: (u32, i32)) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params.leo.out b/tests/expectations/parser/parser/functions/params.leo.out new file mode 100644 index 0000000000..9c74dafafd --- /dev/null +++ b/tests/expectations/parser/parser/functions/params.leo.out @@ -0,0 +1,75 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: u32, y: i32) {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: test + content: "function x(x: u32, y: i32) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 28 + col_stop: 2 + path: test + content: "function x(x: u32, y: i32) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params_return.leo.out b/tests/expectations/parser/parser/functions/params_return.leo.out new file mode 100644 index 0000000000..6b1980e238 --- /dev/null +++ b/tests/expectations/parser/parser/functions/params_return.leo.out @@ -0,0 +1,76 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: u32, y: i32) -> u32 {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: test + content: "function x(x: u32, y: i32) -> u32 {" + output: + IntegerType: U32 + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 35 + col_stop: 2 + path: test + content: "function x(x: u32, y: i32) -> u32 {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: u32, y: i32) -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return.leo.out b/tests/expectations/parser/parser/functions/return.leo.out new file mode 100644 index 0000000000..3baa2a2e79 --- /dev/null +++ b/tests/expectations/parser/parser/functions/return.leo.out @@ -0,0 +1,50 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}" + input: [] + output: + IntegerType: U32 + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 21 + col_stop: 2 + path: test + content: "function x() -> u32 {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x() -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return_tuple.leo.out b/tests/expectations/parser/parser/functions/return_tuple.leo.out new file mode 100644 index 0000000000..aa853f04df --- /dev/null +++ b/tests/expectations/parser/parser/functions/return_tuple.leo.out @@ -0,0 +1,52 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}" + input: [] + output: + Tuple: + - IntegerType: U32 + - IntegerType: U32 + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 28 + col_stop: 2 + path: test + content: "function x() -> (u32, u32) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x() -> (u32, u32) {\n...\n}" diff --git a/tests/expectations/parser/parser/import/alias.leo.out b/tests/expectations/parser/parser/import/alias.leo.out new file mode 100644 index 0000000000..e0c181f3d7 --- /dev/null +++ b/tests/expectations/parser/parser/import/alias.leo.out @@ -0,0 +1,38 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" + alias: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" + span: + line_start: 3 + line_stop: 3 + col_start: 10 + col_stop: 18 + path: test + content: import a.b as bar; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 18 + path: test + content: import a.b as bar; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 18 + path: test + content: import a.b as bar; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/basic.leo.out b/tests/expectations/parser/parser/import/basic.leo.out new file mode 100644 index 0000000000..7293ccb78e --- /dev/null +++ b/tests/expectations/parser/parser/import/basic.leo.out @@ -0,0 +1,38 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" + alias: ~ + span: + line_start: 3 + line_stop: 3 + col_start: 10 + col_stop: 11 + path: test + content: import a.b; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 11 + path: test + content: import a.b; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 11 + path: test + content: import a.b; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/many_import.leo.out b/tests/expectations/parser/parser/import/many_import.leo.out new file mode 100644 index 0000000000..c8bf9349c8 --- /dev/null +++ b/tests/expectations/parser/parser/import/many_import.leo.out @@ -0,0 +1,136 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Packages: + name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.( // local import\\\"}\"}" + accesses: + - Symbol: + symbol: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Point,\\\"}\"}" + alias: ~ + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 10 + path: test + content: " Point," + - Symbol: + symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" foo,\\\"}\"}" + alias: ~ + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 8 + path: test + content: " foo," + span: + line_start: 3 + line_stop: 5 + col_start: 8 + col_stop: 8 + path: test + content: "import test-import.( // local import\n...\n foo," + span: + line_start: 3 + line_stop: 5 + col_start: 8 + col_stop: 8 + path: test + content: "import test-import.( // local import\n...\n foo," + - package_or_packages: + Packages: + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.( // imports directory import\\\"}\"}" + accesses: + - Symbol: + symbol: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Bar,\\\"}\"}" + alias: ~ + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 8 + path: test + content: " Bar," + - Multiple: + name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" + accesses: + - Symbol: + symbol: "{\"name\":\"Baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" + alias: ~ + span: + line_start: 10 + line_stop: 10 + col_start: 10 + col_stop: 13 + path: test + content: " baz.(Baz, Bazzar)," + - Symbol: + symbol: "{\"name\":\"Bazzar\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" + alias: ~ + span: + line_start: 10 + line_stop: 10 + col_start: 15 + col_stop: 21 + path: test + content: " baz.(Baz, Bazzar)," + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 21 + path: test + content: " baz.(Baz, Bazzar)," + - SubPackage: + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" + access: + SubPackage: + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"Bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" + alias: ~ + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 16 + path: test + content: " bat.bat.Bat," + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 16 + path: test + content: " bat.bat.Bat," + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 16 + path: test + content: " bat.bat.Bat," + span: + line_start: 8 + line_stop: 11 + col_start: 8 + col_stop: 16 + path: test + content: "import bar.( // imports directory import\n...\n bat.bat.Bat," + span: + line_start: 8 + line_stop: 11 + col_start: 8 + col_stop: 16 + path: test + content: "import bar.( // imports directory import\n...\n bat.bat.Bat," + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/many_import_star.leo.out b/tests/expectations/parser/parser/import/many_import_star.leo.out new file mode 100644 index 0000000000..9a04d35a1c --- /dev/null +++ b/tests/expectations/parser/parser/import/many_import_star.leo.out @@ -0,0 +1,165 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*; // local import\\\"}\"}" + access: + Star: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: test + content: import test-import.*; // local import + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 21 + path: test + content: import test-import.*; // local import + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 21 + path: test + content: import test-import.*; // local import + - package_or_packages: + Package: + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.*; // imports directory import\\\"}\"}" + access: + Star: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 13 + path: test + content: import bar.*; // imports directory import + span: + line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 13 + path: test + content: import bar.*; // imports directory import + span: + line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 13 + path: test + content: import bar.*; // imports directory import + - package_or_packages: + Package: + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" + access: + SubPackage: + name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" + access: + Star: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 17 + path: test + content: import bar.baz.*; // imports directory import + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 17 + path: test + content: import bar.baz.*; // imports directory import + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 17 + path: test + content: import bar.baz.*; // imports directory import + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 17 + path: test + content: import bar.baz.*; // imports directory import + - package_or_packages: + Package: + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" + access: + SubPackage: + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" + access: + SubPackage: + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" + access: + Star: + line_start: 7 + line_stop: 7 + col_start: 20 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + span: + line_start: 7 + line_stop: 7 + col_start: 8 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + span: + line_start: 7 + line_stop: 7 + col_start: 8 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + - package_or_packages: + Package: + name: "{\"name\":\"car\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import car.*; // imports directory import\\\"}\"}" + access: + Star: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 13 + path: test + content: import car.*; // imports directory import + span: + line_start: 8 + line_stop: 8 + col_start: 8 + col_stop: 13 + path: test + content: import car.*; // imports directory import + span: + line_start: 8 + line_stop: 8 + col_start: 8 + col_stop: 13 + path: test + content: import car.*; // imports directory import + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/names.leo.out b/tests/expectations/parser/parser/import/names.leo.out new file mode 100644 index 0000000000..9bc9319577 --- /dev/null +++ b/tests/expectations/parser/parser/import/names.leo.out @@ -0,0 +1,94 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"a0-f\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" + alias: ~ + span: + line_start: 3 + line_stop: 3 + col_start: 13 + col_stop: 16 + path: test + content: import a0-f.foo; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 16 + path: test + content: import a0-f.foo; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 16 + path: test + content: import a0-f.foo; + - package_or_packages: + Package: + name: "{\"name\":\"a-9\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" + alias: ~ + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 15 + path: test + content: import a-9.bar; + span: + line_start: 4 + line_stop: 4 + col_start: 8 + col_stop: 15 + path: test + content: import a-9.bar; + span: + line_start: 4 + line_stop: 4 + col_start: 8 + col_stop: 15 + path: test + content: import a-9.bar; + - package_or_packages: + Package: + name: "{\"name\":\"hello-world\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":20,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" + alias: ~ + span: + line_start: 5 + line_stop: 5 + col_start: 20 + col_stop: 25 + path: test + content: import hello-world.hello; + span: + line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 25 + path: test + content: import hello-world.hello; + span: + line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 25 + path: test + content: import hello-world.hello; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/names_underscore.leo.out b/tests/expectations/parser/parser/import/names_underscore.leo.out new file mode 100644 index 0000000000..952c5c0ac7 --- /dev/null +++ b/tests/expectations/parser/parser/import/names_underscore.leo.out @@ -0,0 +1,38 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"hello_world\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" + alias: ~ + span: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 23 + path: test + content: import hello_world.foo; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 23 + path: test + content: import hello_world.foo; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 23 + path: test + content: import hello_world.foo; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/star.leo.out b/tests/expectations/parser/parser/import/star.leo.out new file mode 100644 index 0000000000..5bdc771258 --- /dev/null +++ b/tests/expectations/parser/parser/import/star.leo.out @@ -0,0 +1,35 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*;\\\"}\"}" + access: + Star: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: test + content: import test-import.*; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 21 + path: test + content: import test-import.*; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 21 + path: test + content: import test-import.*; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/statement/assign.leo.out b/tests/expectations/parser/parser/statement/assign.leo.out new file mode 100644 index 0000000000..d992c636a2 --- /dev/null +++ b/tests/expectations/parser/parser/statement/assign.leo.out @@ -0,0 +1,411 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: x = expr; + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: x = expr; + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = ();\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: x = (); + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 7 + path: test + content: x = (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: x = (); + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: x = x+y; + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: x = x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x = x+y; + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: "x = (x,y);" + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 10 + path: test + content: "x = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x = (x,y);" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: x = x(); + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: x = x(); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x = x(); + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0] = y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[0] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[0] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 7 + path: test + content: "x[0u32] = y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[0u32] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[0u32] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" + accesses: + - Tuple: + - value: "0" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0 = y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0 = y; + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x.0 = y; + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[1..2] = y;" + - Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "x[1..2] = y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[1..2] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[1..2] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x[..2] = y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[..2] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x[..2] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[2..] = y;" + - ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[2..] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x[2..] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "x[..] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x[..] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" + accesses: + - Tuple: + - value: "0" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "x.0[0][..] = y;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x.0[0][..] = y;" + - ArrayRange: + - ~ + - ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x.0[0][..] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: "x.0[0][..] = y;" diff --git a/tests/expectations/parser/parser/statement/block.leo.out b/tests/expectations/parser/parser/statement/block.leo.out new file mode 100644 index 0000000000..6e40c82b0f --- /dev/null +++ b/tests/expectations/parser/parser/statement/block.leo.out @@ -0,0 +1,141 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "{}" + - Block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "{\n...\n}" + - Block: + statements: + - Block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "{{}}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "{{}}" + - Block: + statements: + - Block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 4 + col_start: 1 + col_stop: 2 + path: test + content: "{\n...\n}" + span: + line_start: 1 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "{\n...\n}" + - Block: + statements: + - Conditional: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 4 + col_start: 6 + col_stop: 2 + path: test + content: "if x {\n...\n}" + next: ~ + span: + line_start: 2 + line_stop: 4 + col_start: 1 + col_stop: 2 + path: test + content: "if x {\n...\n}" + span: + line_start: 1 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "{\n...\n}" diff --git a/tests/expectations/parser/parser/statement/conditional.leo.out b/tests/expectations/parser/parser/statement/conditional.leo.out new file mode 100644 index 0000000000..337dcace01 --- /dev/null +++ b/tests/expectations/parser/parser/statement/conditional.leo.out @@ -0,0 +1,230 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Conditional: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 6 + col_stop: 2 + path: test + content: "if x {\n...\n}" + next: ~ + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "if x {\n...\n}" + - Conditional: + condition: + Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if Self {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 9 + col_stop: 2 + path: test + content: "if Self {\n...\n}" + next: ~ + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "if Self {\n...\n}" + - Conditional: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 8 + col_stop: 2 + path: test + content: "if (x) {\n...\n}" + next: ~ + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "if (x) {\n...\n}" + - Conditional: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {}\\\"}\"}" + block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 10 + path: test + content: "if (x) {}" + next: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "if (x) {}" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {}\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {}\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 7 + path: test + content: "if x+y {}" + block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 10 + path: test + content: "if x+y {}" + next: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "if x+y {}" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 7 + path: test + content: "if x+y {" + block: + statements: + - Expression: + expression: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 5 + path: test + content: expr; + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 4 + col_start: 8 + col_stop: 2 + path: test + content: "if x+y {\n...\n}" + next: ~ + span: + line_start: 1 + line_stop: 4 + col_start: 1 + col_stop: 2 + path: test + content: "if x+y {\n...\n}\n" diff --git a/tests/expectations/parser/parser/statement/console.leo.out b/tests/expectations/parser/parser/statement/console.leo.out new file mode 100644 index 0000000000..2ebba05261 --- /dev/null +++ b/tests/expectations/parser/parser/statement/console.leo.out @@ -0,0 +1,207 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Console: + function: + Assert: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.assert(x);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: console.assert(x); + - Console: + function: + Error: + parts: + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 22 + path: test + content: "console.error(\"{}\", x);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: "console.error(\"{}\", x);" + - Console: + function: + Error: + parts: + - Container + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 27 + path: test + content: "console.error(\"{}{}\", x, y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 27 + path: test + content: "console.error(\"{}{}\", x, y);" + - Console: + function: + Error: + parts: + - Const: x + parameters: [] + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 18 + path: test + content: "console.error(\"x\");" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "console.error(\"x\");" + - Console: + function: + Debug: + parts: + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 22 + path: test + content: "console.debug(\"{}\", x);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: "console.debug(\"{}\", x);" + - Console: + function: + Debug: + parts: + - Container + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 27 + path: test + content: "console.debug(\"{}{}\", x, y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 27 + path: test + content: "console.debug(\"{}{}\", x, y);" + - Console: + function: + Debug: + parts: + - Const: x + parameters: [] + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 18 + path: test + content: "console.debug(\"x\");" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "console.debug(\"x\");" + - Console: + function: + Log: + parts: + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 20 + path: test + content: "console.log(\"{}\", x);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 20 + path: test + content: "console.log(\"{}\", x);" + - Console: + function: + Log: + parts: + - Container + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 25 + path: test + content: "console.log(\"{}{}\", x, y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 25 + path: test + content: "console.log(\"{}{}\", x, y);" + - Console: + function: + Log: + parts: + - Const: x + parameters: [] + span: + line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 16 + path: test + content: "console.log(\"x\");" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "console.log(\"x\");" diff --git a/tests/expectations/parser/parser/statement/definition.leo.out b/tests/expectations/parser/parser/statement/definition.leo.out new file mode 100644 index 0000000000..fa12ad7cea --- /dev/null +++ b/tests/expectations/parser/parser/statement/definition.leo.out @@ -0,0 +1,1473 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: let x = expr; + type_: ~ + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: let x = expr; + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: let x = (); + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 11 + path: test + content: let x = (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: let x = (); + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: let x = x+y; + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 12 + path: test + content: let x = x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: let x = x+y; + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x = (x,y);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: "let x = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: "let x = (x,y);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: let x = x(); + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 12 + path: test + content: let x = x(); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: let x = x(); + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: const x = expr; + type_: ~ + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: const x = expr; + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: const x = (); + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 13 + path: test + content: const x = (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: const x = (); + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: const x = x+y; + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 14 + path: test + content: const x = x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: const x = x+y; + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x = (x,y);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 16 + path: test + content: "const x = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "const x = (x,y);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: const x = x(); + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 14 + path: test + content: const x = x(); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: const x = x(); + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = expr;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "let x: u32 = expr;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = ();" + type_: + IntegerType: U32 + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 16 + path: test + content: "let x: u32 = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "let x: u32 = ();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = x+y;" + type_: + IntegerType: U32 + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 17 + path: test + content: "let x: u32 = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "let x: u32 = x+y;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = (x,y);" + type_: + IntegerType: U32 + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 19 + path: test + content: "let x: u32 = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "let x: u32 = (x,y);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = x();" + type_: + IntegerType: U32 + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 17 + path: test + content: "let x: u32 = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "let x: u32 = x();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = expr;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 20 + path: test + content: "const x: u32 = expr;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = ();" + type_: + IntegerType: U32 + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 18 + path: test + content: "const x: u32 = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "const x: u32 = ();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = x+y;" + type_: + IntegerType: U32 + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 19 + path: test + content: "const x: u32 = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "const x: u32 = x+y;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = (x,y);" + type_: + IntegerType: U32 + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 21 + path: test + content: "const x: u32 = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 21 + path: test + content: "const x: u32 = (x,y);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = x();" + type_: + IntegerType: U32 + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 19 + path: test + content: "const x: u32 = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "const x: u32 = x();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = expr;" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = expr;" + type_: ~ + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "let (x, y) = expr;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = ();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = ();" + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 16 + path: test + content: "let (x, y) = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "let (x, y) = ();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = x+y;" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = x+y;" + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 17 + path: test + content: "let (x, y) = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "let (x, y) = x+y;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = (x,y);" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = (x,y);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 19 + path: test + content: "let (x, y) = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "let (x, y) = (x,y);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = x();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = x();" + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 17 + path: test + content: "let (x, y) = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "let (x, y) = x();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = expr;" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = expr;" + type_: ~ + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 20 + path: test + content: "const (x, y) = expr;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = ();" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = ();" + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 18 + path: test + content: "const (x, y) = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "const (x, y) = ();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = x+y;" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = x+y;" + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 19 + path: test + content: "const (x, y) = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "const (x, y) = x+y;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = (x,y);" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = (x,y);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 21 + path: test + content: "const (x, y) = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 21 + path: test + content: "const (x, y) = (x,y);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = x();" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = x();" + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 19 + path: test + content: "const (x, y) = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "const (x, y) = x();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = expr;" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = expr;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 23 + path: test + content: "let (x, y): u32 = expr;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = ();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = ();" + type_: + IntegerType: U32 + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 21 + path: test + content: "let (x, y): u32 = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 21 + path: test + content: "let (x, y): u32 = ();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = x+y;" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = x+y;" + type_: + IntegerType: U32 + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 22 + path: test + content: "let (x, y): u32 = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: "let (x, y): u32 = x+y;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = (x,y);" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = (x,y);" + type_: + IntegerType: U32 + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: "let (x, y): u32 = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: "let (x, y): u32 = (x,y);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = x();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = x();" + type_: + IntegerType: U32 + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 22 + path: test + content: "let (x, y): u32 = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: "let (x, y): u32 = x();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = expr;" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = expr;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 25 + path: test + content: "const (x, y): u32 = expr;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = ();" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = ();" + type_: + IntegerType: U32 + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 23 + path: test + content: "const (x, y): u32 = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 23 + path: test + content: "const (x, y): u32 = ();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = x+y;" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = x+y;" + type_: + IntegerType: U32 + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 24 + path: test + content: "const (x, y): u32 = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: "const (x, y): u32 = x+y;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = (x,y);" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = (x,y);" + type_: + IntegerType: U32 + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 26 + path: test + content: "const (x, y): u32 = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 26 + path: test + content: "const (x, y): u32 = (x,y);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = x();" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = x();" + type_: + IntegerType: U32 + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 24 + path: test + content: "const (x, y): u32 = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: "const (x, y): u32 = x();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x,y,) = ();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "let (x,y,) = ();" + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 16 + path: test + content: "let (x,y,) = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "let (x,y,) = ();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x,) = ();" + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 14 + path: test + content: "let (x,) = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: "let (x,) = ();" diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out new file mode 100644 index 0000000000..fcb8db8960 --- /dev/null +++ b/tests/expectations/parser/parser/statement/definition_fail.leo.out @@ -0,0 +1,27 @@ +--- +namespace: ParseStatement +expectation: Fail +outputs: + - " --> test:1:0\n |\n 1 | let mut x = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^\n |\n = expected 'ident', got ','" diff --git a/tests/expectations/parser/parser/statement/expression.leo.out b/tests/expectations/parser/parser/statement/expression.leo.out new file mode 100644 index 0000000000..f9542ff844 --- /dev/null +++ b/tests/expectations/parser/parser/statement/expression.leo.out @@ -0,0 +1,94 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Expression: + expression: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: expr; + - Expression: + expression: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: (); + - Expression: + expression: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x+y; + - Expression: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "(x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "(x,y);" + - Expression: + expression: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x(); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x(); diff --git a/tests/expectations/parser/parser/statement/iteration.leo.out b/tests/expectations/parser/parser/statement/iteration.leo.out new file mode 100644 index 0000000000..4fa2b3b899 --- /dev/null +++ b/tests/expectations/parser/parser/statement/iteration.leo.out @@ -0,0 +1,203 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Iteration: + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {}\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "for x in 0..7 {}" + stop: + Value: + Implicit: + - "7" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: "for x in 0..7 {}" + block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 17 + path: test + content: "for x in 0..7 {}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "for x in 0..7 {}" + - Iteration: + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "for x in 0..7 {" + stop: + Value: + Implicit: + - "7" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: "for x in 0..7 {" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 15 + col_stop: 2 + path: test + content: "for x in 0..7 {\n...\n}" + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "for x in 0..7 {\n...\n}" + - Iteration: + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..99u8 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "for x in 0..99u8 {" + stop: + Value: + Integer: + - U8 + - "99" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 17 + path: test + content: "for x in 0..99u8 {" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 18 + col_stop: 2 + path: test + content: "for x in 0..99u8 {\n...\n}" + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "for x in 0..99u8 {\n...\n}" + - Iteration: + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "for x in 0..Self {" + stop: + Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 18 + col_stop: 2 + path: test + content: "for x in 0..Self {\n...\n}" + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "for x in 0..Self {\n...\n}" diff --git a/tests/expectations/parser/parser/statement/return.leo.out b/tests/expectations/parser/parser/statement/return.leo.out new file mode 100644 index 0000000000..938e0d0efe --- /dev/null +++ b/tests/expectations/parser/parser/statement/return.leo.out @@ -0,0 +1,110 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Return: + expression: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: return expr; + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: return (); + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: return (); + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 11 + path: test + content: return x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: return x+y; + - Return: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 13 + path: test + content: "return (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: "return (x,y);" + - Return: + expression: + Value: + Implicit: + - "5" + - line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 2 + path: test + content: 5; + span: + line_start: 1 + line_stop: 2 + col_start: 1 + col_stop: 2 + path: test + content: "return\n5;" diff --git a/tests/expectations/parser/parser/statement/return_fail.leo.out b/tests/expectations/parser/parser/statement/return_fail.leo.out new file mode 100644 index 0000000000..9f5a9e7204 --- /dev/null +++ b/tests/expectations/parser/parser/statement/return_fail.leo.out @@ -0,0 +1,7 @@ +--- +namespace: ParseStatement +expectation: Fail +outputs: + - " --> test:1:1\n |\n 1 | return\n | ^^^^^^\n |\n = unexpected EOF" + - " --> test:1:8\n |\n 1 | return 5\n | ^\n |\n = unexpected EOF" + - " --> test:2:1\n |\n 2 | if x {}\n | ^^\n |\n = expected 'expression', got 'if'" From 91c9969ff925813847b9e5e0695d725e8fcbe4ed Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 5 May 2021 21:25:24 +0300 Subject: [PATCH 11/26] arrays 1/2 --- tests/compiler/array/input/count_to_6.in | 2 +- tests/compiler/array/input/dummy.in | 6 + .../compiler/array/input/initializer_fail.in | 3 + .../compiler/array/input/input_nested_3x2.in | 3 + .../array/input/input_nested_3x2_fail.in | 3 + tests/compiler/array/input/input_tuple_3x2.in | 3 + .../array/input/input_tuple_3x2_fail.in | 3 + tests/compiler/array/input/registers_ones.in | 6 + tests/compiler/array/input/registers_zeros.in | 6 + tests/compiler/array/input/three_ones.in | 5 +- .../input/type_nested_value_nested_3x2.in | 3 + .../type_nested_value_nested_3x2_fail.in | 3 + .../input/type_nested_value_nested_4x3x2.in | 3 + .../type_nested_value_nested_4x3x2_fail.in | 3 + .../input/type_nested_value_tuple_3x2.in | 3 + .../input/type_nested_value_tuple_3x2_fail.in | 3 + .../input/type_nested_value_tuple_4x3x2.in | 3 + .../type_nested_value_tuple_4x3x2_fail.in | 3 + .../input/type_tuple_value_nested_3x2.in | 3 + .../input/type_tuple_value_nested_3x2_fail.in | 3 + .../input/type_tuple_value_nested_4x3x2.in | 3 + .../type_tuple_value_nested_4x3x2_fail.in | 3 + .../array/input/type_tuple_value_tuple_3x2.in | 3 + .../input/type_tuple_value_tuple_3x2_fail.in | 3 + .../input/type_tuple_value_tuple_4x3x2.in | 3 + .../type_tuple_value_tuple_4x3x2_fail.in | 3 + tests/compiler/array/input_nested_3x2.leo | 10 +- .../compiler/array/input_nested_3x2_fail.leo | 8 +- tests/compiler/array/input_tuple_3x2.leo | 10 +- tests/compiler/array/input_tuple_3x2_fail.leo | 10 +- tests/compiler/array/mod.rs | 716 ------------------ .../compiler/array/multi_fail_initializer.leo | 11 +- tests/compiler/array/multi_fail_inline.leo | 11 +- tests/compiler/array/multi_initializer.leo | 13 +- .../compiler/array/multi_initializer_fail.leo | 11 +- tests/compiler/array/nested.leo | 12 +- tests/compiler/array/nested_3x2_value.leo | 15 +- .../compiler/array/nested_3x2_value_fail.leo | 10 +- tests/compiler/array/registers.leo | 12 +- tests/compiler/array/slice.leo | 13 +- tests/compiler/array/slice_lower.leo | 12 +- tests/compiler/array/spread.leo | 12 +- tests/compiler/array/tuple_3x2_value.leo | 15 +- tests/compiler/array/tuple_3x2_value_fail.leo | 5 + tests/compiler/array/type_fail.leo | 8 +- .../compiler/array/input_nested_3x2.leo.out | 18 + .../array/input_nested_3x2_fail.leo.out | 2 +- .../compiler/array/input_tuple_3x2.leo.out | 18 + .../array/input_tuple_3x2_fail.leo.out | 5 + .../array/multi_fail_initializer.leo.out | 5 + .../compiler/array/multi_fail_inline.leo.out | 5 + .../compiler/array/multi_initializer.leo.out | 18 + .../array/multi_initializer_fail.leo.out | 5 + .../compiler/compiler/array/nested.leo.out | 18 + .../compiler/array/nested_3x2_value.leo.out | 18 + .../array/nested_3x2_value_fail.leo.out | 5 + .../compiler/compiler/array/registers.leo.out | 24 + .../compiler/compiler/array/slice.leo.out | 18 + .../compiler/array/slice_lower.leo.out | 18 + .../compiler/compiler/array/spread.leo.out | 18 + .../compiler/array/tuple_3x2_value.leo.out | 18 + .../array/tuple_3x2_value_fail.leo.out | 5 + .../compiler/compiler/array/type_fail.leo.out | 5 + 63 files changed, 459 insertions(+), 766 deletions(-) create mode 100644 tests/compiler/array/input/dummy.in delete mode 100644 tests/compiler/array/mod.rs create mode 100644 tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/input_tuple_3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out create mode 100644 tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out create mode 100644 tests/expectations/compiler/compiler/array/multi_initializer.leo.out create mode 100644 tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/nested.leo.out create mode 100644 tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out create mode 100644 tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/registers.leo.out create mode 100644 tests/expectations/compiler/compiler/array/slice.leo.out create mode 100644 tests/expectations/compiler/compiler/array/slice_lower.leo.out create mode 100644 tests/expectations/compiler/compiler/array/spread.leo.out create mode 100644 tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out create mode 100644 tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_fail.leo.out diff --git a/tests/compiler/array/input/count_to_6.in b/tests/compiler/array/input/count_to_6.in index 64ae8f82f6..21ce3837d0 100644 --- a/tests/compiler/array/input/count_to_6.in +++ b/tests/compiler/array/input/count_to_6.in @@ -2,4 +2,4 @@ a: [[u8; 2]; 3] = [[1, 2], [3, 4], [5, 6]]; [registers] -x: bool = false; \ No newline at end of file +x: bool = false; diff --git a/tests/compiler/array/input/dummy.in b/tests/compiler/array/input/dummy.in new file mode 100644 index 0000000000..6e43b49ecc --- /dev/null +++ b/tests/compiler/array/input/dummy.in @@ -0,0 +1,6 @@ +[main] +y: bool = true; +n: bool = false; + +[registers] +r0: bool = false; diff --git a/tests/compiler/array/input/initializer_fail.in b/tests/compiler/array/input/initializer_fail.in index 0ff699aa13..822f21634b 100644 --- a/tests/compiler/array/input/initializer_fail.in +++ b/tests/compiler/array/input/initializer_fail.in @@ -1,2 +1,5 @@ [main] a: [u8; (3, 2)] = [0u8; (2, 2)]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/input_nested_3x2.in b/tests/compiler/array/input/input_nested_3x2.in index 9eaafe9bdd..fbe64e3a1d 100644 --- a/tests/compiler/array/input/input_nested_3x2.in +++ b/tests/compiler/array/input/input_nested_3x2.in @@ -1,2 +1,5 @@ [main] a: [u8; (3, 2)] = [[0u8; 2]; 3]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/input_nested_3x2_fail.in b/tests/compiler/array/input/input_nested_3x2_fail.in index d1c114a08b..aac88582f7 100644 --- a/tests/compiler/array/input/input_nested_3x2_fail.in +++ b/tests/compiler/array/input/input_nested_3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [u8; (3, 2)] = [[0u8; 3]; 2)]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/input_tuple_3x2.in b/tests/compiler/array/input/input_tuple_3x2.in index 1c0bd495ec..718fcaa89e 100644 --- a/tests/compiler/array/input/input_tuple_3x2.in +++ b/tests/compiler/array/input/input_tuple_3x2.in @@ -1,2 +1,5 @@ [main] a: [u8; (3, 2)] = [0u8; (3, 2)]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/input_tuple_3x2_fail.in b/tests/compiler/array/input/input_tuple_3x2_fail.in index c281d9d464..eb5a8962bf 100644 --- a/tests/compiler/array/input/input_tuple_3x2_fail.in +++ b/tests/compiler/array/input/input_tuple_3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [u8; (3, 2)] = [0u8; (2, 3)]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/registers_ones.in b/tests/compiler/array/input/registers_ones.in index fab79f69a0..7320577a6c 100644 --- a/tests/compiler/array/input/registers_ones.in +++ b/tests/compiler/array/input/registers_ones.in @@ -1,2 +1,8 @@ +[main] +a: [u8; 3] = [1, 1, 1]; + [registers] r: [u8; 3] = [1u8, 1u8, 1u8]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/registers_zeros.in b/tests/compiler/array/input/registers_zeros.in index e9aa65cf9b..c24270c956 100644 --- a/tests/compiler/array/input/registers_zeros.in +++ b/tests/compiler/array/input/registers_zeros.in @@ -1,2 +1,8 @@ +[main] +a: [u8; 3] = [1, 1, 1]; // doesn't match arr below + [registers] r: [u8; 3] = [0u8, 0u8, 0u8]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/three_ones.in b/tests/compiler/array/input/three_ones.in index 80d095f864..c6b803e634 100644 --- a/tests/compiler/array/input/three_ones.in +++ b/tests/compiler/array/input/three_ones.in @@ -1,2 +1,5 @@ [main] -a: [u8; 3] = [1, 1, 1]; \ No newline at end of file +a: [u8; 3] = [1, 1, 1]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_nested_value_nested_3x2.in b/tests/compiler/array/input/type_nested_value_nested_3x2.in index 21fc9b953f..cf532b3dde 100644 --- a/tests/compiler/array/input/type_nested_value_nested_3x2.in +++ b/tests/compiler/array/input/type_nested_value_nested_3x2.in @@ -1,2 +1,5 @@ [main] a: [[u8; 2]; 3] = [[0; 2]; 3]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_nested_value_nested_3x2_fail.in b/tests/compiler/array/input/type_nested_value_nested_3x2_fail.in index 280b38b909..13ae01334a 100644 --- a/tests/compiler/array/input/type_nested_value_nested_3x2_fail.in +++ b/tests/compiler/array/input/type_nested_value_nested_3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_nested_value_nested_4x3x2.in b/tests/compiler/array/input/type_nested_value_nested_4x3x2.in index 53ca13b024..2f3f390024 100644 --- a/tests/compiler/array/input/type_nested_value_nested_4x3x2.in +++ b/tests/compiler/array/input/type_nested_value_nested_4x3x2.in @@ -1,2 +1,5 @@ [main] a: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in b/tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in index 11f44a76a4..c94c4f6522 100644 --- a/tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in +++ b/tests/compiler/array/input/type_nested_value_nested_4x3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_nested_value_tuple_3x2.in b/tests/compiler/array/input/type_nested_value_tuple_3x2.in index 689e164b73..03eed3b54f 100644 --- a/tests/compiler/array/input/type_nested_value_tuple_3x2.in +++ b/tests/compiler/array/input/type_nested_value_tuple_3x2.in @@ -1,2 +1,5 @@ [main] a: [[u8; 2]; 3] = [0; (3, 2)]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in b/tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in index 4a43d7d816..93f080d5bf 100644 --- a/tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in +++ b/tests/compiler/array/input/type_nested_value_tuple_3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_nested_value_tuple_4x3x2.in b/tests/compiler/array/input/type_nested_value_tuple_4x3x2.in index 649a7154ad..dce1923bc6 100644 --- a/tests/compiler/array/input/type_nested_value_tuple_4x3x2.in +++ b/tests/compiler/array/input/type_nested_value_tuple_4x3x2.in @@ -1,2 +1,5 @@ [main] a: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in b/tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in index eed469d6ac..9b69718907 100644 --- a/tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in +++ b/tests/compiler/array/input/type_nested_value_tuple_4x3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_tuple_value_nested_3x2.in b/tests/compiler/array/input/type_tuple_value_nested_3x2.in index cb3943365b..30b1b7bcad 100644 --- a/tests/compiler/array/input/type_tuple_value_nested_3x2.in +++ b/tests/compiler/array/input/type_tuple_value_nested_3x2.in @@ -1,2 +1,5 @@ [main] a: [u8; (3, 2)] = [[0; 2]; 3]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in b/tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in index c787cbffd9..ede7f5c9f8 100644 --- a/tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in +++ b/tests/compiler/array/input/type_tuple_value_nested_3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [u8; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_tuple_value_nested_4x3x2.in b/tests/compiler/array/input/type_tuple_value_nested_4x3x2.in index 8105eae543..a03583d029 100644 --- a/tests/compiler/array/input/type_tuple_value_nested_4x3x2.in +++ b/tests/compiler/array/input/type_tuple_value_nested_4x3x2.in @@ -1,2 +1,5 @@ [main] a: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in b/tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in index 3e194e590d..ffb85a2230 100644 --- a/tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in +++ b/tests/compiler/array/input/type_tuple_value_nested_4x3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_tuple_value_tuple_3x2.in b/tests/compiler/array/input/type_tuple_value_tuple_3x2.in index cbfeb6d5f1..f5d315cfc7 100644 --- a/tests/compiler/array/input/type_tuple_value_tuple_3x2.in +++ b/tests/compiler/array/input/type_tuple_value_tuple_3x2.in @@ -1,2 +1,5 @@ [main] a: [u8; (3, 2)] = [0; (3, 2)]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in b/tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in index 3409e8aaa9..36001b82ff 100644 --- a/tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in +++ b/tests/compiler/array/input/type_tuple_value_tuple_3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [u8; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in b/tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in index 6fd97ee2d2..0a6975de8e 100644 --- a/tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in +++ b/tests/compiler/array/input/type_tuple_value_tuple_4x3x2.in @@ -1,2 +1,5 @@ [main] a: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in b/tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in index d6de4af3c5..9b6a46c114 100644 --- a/tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in +++ b/tests/compiler/array/input/type_tuple_value_tuple_4x3x2_fail.in @@ -1,2 +1,5 @@ [main] a: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) + +[registers] +x: bool = false; diff --git a/tests/compiler/array/input_nested_3x2.leo b/tests/compiler/array/input_nested_3x2.leo index b7e59a5dc0..0c2d7d8663 100644 --- a/tests/compiler/array/input_nested_3x2.leo +++ b/tests/compiler/array/input_nested_3x2.leo @@ -1,3 +1,9 @@ -function main(a: [u8; (3, 2)]) { - console.assert(a == [[0u8; 2]; 3]); +/* +namespace: Compile +expectation: Pass +input_file: input/input_nested_3x2.in +*/ + +function main(a: [u8; (3, 2)]) -> bool { + return a == [[0u8; 2]; 3]; } diff --git a/tests/compiler/array/input_nested_3x2_fail.leo b/tests/compiler/array/input_nested_3x2_fail.leo index eeb602faa1..ff208f4124 100644 --- a/tests/compiler/array/input_nested_3x2_fail.leo +++ b/tests/compiler/array/input_nested_3x2_fail.leo @@ -1,11 +1,9 @@ /* namespace: Compile expectation: Fail -input_file: - - input/six_zeros.in - - input/count_to_6.in +input_file: input/input_nested_3x2_fail.in */ -function main(a: [u8; (3, 2)]) { - console.assert(a == [[0u8; 2]; 3)]); // This should be written the right way as this test is for the input file. +function main(a: [u8; (3, 2)]) -> bool { + return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file. } diff --git a/tests/compiler/array/input_tuple_3x2.leo b/tests/compiler/array/input_tuple_3x2.leo index 4c3c001f41..4db78940f6 100644 --- a/tests/compiler/array/input_tuple_3x2.leo +++ b/tests/compiler/array/input_tuple_3x2.leo @@ -1,3 +1,9 @@ -function main(a: [u8; (3, 2)]) { - console.assert(a == [0u8; (3, 2)]); +/* +namespace: Compile +expectation: Pass +input_file: input/input_tuple_3x2.in +*/ + +function main(a: [u8; (3, 2)]) -> bool { + return a == [0u8; (3, 2)]; } diff --git a/tests/compiler/array/input_tuple_3x2_fail.leo b/tests/compiler/array/input_tuple_3x2_fail.leo index 4c3c001f41..b1d48fef02 100644 --- a/tests/compiler/array/input_tuple_3x2_fail.leo +++ b/tests/compiler/array/input_tuple_3x2_fail.leo @@ -1,3 +1,9 @@ -function main(a: [u8; (3, 2)]) { - console.assert(a == [0u8; (3, 2)]); +/* +namespace: Compile +expectation: Fail +input_file: input/input_tuple_3x2_fail.in +*/ + +function main(a: [u8; (3, 2)]) -> bool { + return a == [0u8; (3, 2)]; } diff --git a/tests/compiler/array/mod.rs b/tests/compiler/array/mod.rs deleted file mode 100644 index 7acbd1af2f..0000000000 --- a/tests/compiler/array/mod.rs +++ /dev/null @@ -1,716 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - get_output, - parse_program, - parse_program_with_input, - EdwardsTestCompiler, -}; - -pub fn output_ones(program: EdwardsTestCompiler) { - 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 actual = get_output(program); - - assert!(expected.eq(actual.bytes().as_slice())); -} - -// Registers - -#[test] -fn test_registers() { - let program_string = include_str!("registers.leo"); - let ones_input_string = include_str!("input/registers_ones.in"); - let zeros_input_string = include_str!("input/registers_zeros.in"); - - // test ones input register => ones output register - let program = parse_program_with_input(program_string, ones_input_string).unwrap(); - - output_ones(program); - - // test zeros input register => zeros output register - let program = parse_program_with_input(program_string, zeros_input_string).unwrap(); - - output_zeros(program); -} - -// Expressions - -#[test] -fn test_inline() { - let program_string = include_str!("inline.leo"); - let input_string = include_str!("input/three_ones.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_nested() { - let program_string = include_str!("nested.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_inline_fail() { - let program_string = include_str!("inline.leo"); - let program = parse_program(program_string).unwrap(); - - let _err = expect_compiler_error(program); -} - -#[test] -fn test_initializer() { - let program_string = include_str!("initializer.leo"); - let input_string = include_str!("input/three_ones.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_initializer_fail() { - let program_string = include_str!("initializer_fail.leo"); - let input_string = include_str!("input/three_ones.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_initializer_input() { - let program_string = include_str!("initializer_input.leo"); - let input_string = include_str!("input/six_zeros.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_initializer_input_fail() { - let program_string = include_str!("initializer_input.leo"); - let input_string = include_str!("input/initializer_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_nested_3x2() { - let program_string = include_str!("input_nested_3x2.leo"); - let input_string = include_str!("input/input_nested_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_nested_3x2_fail() { - let program_string = include_str!("input_nested_3x2_fail.leo"); - let input_string = include_str!("input/input_nested_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_tuple_3x2() { - let program_string = include_str!("input_tuple_3x2.leo"); - let input_string = include_str!("input/input_tuple_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_tuple_3x2_fail() { - let program_string = include_str!("input_tuple_3x2_fail.leo"); - let input_string = include_str!("input/input_tuple_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_multi_fail_initializer() { - let program_string = include_str!("multi_fail_initializer.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_multi_inline_fail() { - let program_string = include_str!("multi_fail_inline.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_multi_initializer() { - let program_string = include_str!("multi_initializer.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_multi_initializer_fail() { - let program_string = include_str!("multi_initializer_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_nested_3x2_value() { - let program_string = include_str!("nested_3x2_value.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_nested_3x2_value_fail() { - let program_string = include_str!("nested_3x2_value_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_tuple_3x2_value() { - let program_string = include_str!("tuple_3x2_value.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_tuple_3x2_value_fail() { - let program_string = include_str!("tuple_3x2_value_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_spread() { - let program_string = include_str!("spread.leo"); - let input_string = include_str!("input/three_ones.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_slice() { - let program_string = include_str!("slice.leo"); - let input_string = include_str!("input/three_ones.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_slice_lower() { - let program_string = include_str!("slice_lower.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// Array type tests - -#[test] -fn test_type_fail() { - let program_string = include_str!("type_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_type_nested_value_nested_3x2() { - let program_string = include_str!("type_nested_value_nested_3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_nested_value_nested_3x2_fail() { - let program_string = include_str!("type_nested_value_nested_3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_nested_value_nested_4x3x2() { - let program_string = include_str!("type_nested_value_nested_4x3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_nested_value_nested_4x3x2_fail() { - let program_string = include_str!("type_nested_value_nested_4x3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_nested_value_tuple_3x2() { - let program_string = include_str!("type_nested_value_tuple_3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_nested_value_tuple_3x2_fail() { - let program_string = include_str!("type_nested_value_tuple_3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_nested_value_tuple_4x3x2() { - let program_string = include_str!("type_nested_value_tuple_4x3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_nested_value_tuple_4x3x2_fail() { - let program_string = include_str!("type_nested_value_tuple_4x3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_tuple_value_nested_3x2() { - let program_string = include_str!("type_tuple_value_nested_3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_tuple_value_nested_3x2_fail() { - let program_string = include_str!("type_tuple_value_nested_3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_tuple_value_nested_4x3x2() { - let program_string = include_str!("type_tuple_value_nested_4x3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_tuple_value_nested_4x3x2_fail() { - let program_string = include_str!("type_tuple_value_nested_4x3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_tuple_value_tuple_3x2() { - let program_string = include_str!("type_tuple_value_tuple_3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_tuple_value_tuple_3x2_fail() { - let program_string = include_str!("type_tuple_value_tuple_3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_tuple_value_tuple_4x3x2() { - let program_string = include_str!("type_tuple_value_tuple_4x3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_tuple_value_tuple_4x3x2_fail() { - let program_string = include_str!("type_tuple_value_tuple_4x3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Tests for nested multi-dimensional arrays as input to the program - -#[test] -fn test_input_type_nested_value_nested_3x2() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_nested_value_nested_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_nested_value_nested_3x2_fail() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_nested_value_nested_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_nested_value_nested_4x3x2() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_nested_value_nested_4x3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_nested_value_nested_4x3x2_fail() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_nested_value_nested_4x3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_nested_value_tuple_3x2() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_nested_value_tuple_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_nested_value_tuple_3x2_fail() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_nested_value_tuple_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_nested_value_tuple_4x3x2() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_nested_value_tuple_4x3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program) -} - -#[test] -fn test_input_type_nested_value_tuple_4x3x2_fail() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_nested_value_tuple_4x3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -// Tests for multi-dimensional arrays using tuple syntax as input to the program - -#[test] -fn test_input_type_tuple_value_nested_3x2() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_tuple_value_nested_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_tuple_value_nested_3x2_fail() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_tuple_value_nested_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_tuple_value_nested_4x3x2() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_tuple_value_nested_4x3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_tuple_value_nested_4x3x2_fail() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_tuple_value_nested_4x3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_tuple_value_tuple_3x2() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_tuple_value_tuple_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_tuple_value_tuple_3x2_fail() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_tuple_value_tuple_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_tuple_value_tuple_4x3x2() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_tuple_value_tuple_4x3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_tuple_value_tuple_4x3x2_fail() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_tuple_value_tuple_4x3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_variable_slice_fail() { - let program_string = include_str!("variable_slice_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_index() { - let program_string = r#" - function main(i: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert(2 == b[i]); - console.assert(3 == b[2]); - } - "#; - let input_string = r#" - [main] - i: u32 = 1; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_index_bounds_fail() { - let program_string = r#" - function main(i: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert(2 == b[i]); - } - "#; - let input_string = r#" - [main] - i: u32 = 4; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_const_array_index_bounds_fail() { - let program_string = r#" - function main() { - let b = [1u8, 2, 3, 4]; - const i: u32 = 4; - - console.assert(2 == b[i]); - } - "#; - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_range_index() { - let program_string = r#" - function main(i: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([1u8, 2] == b[0..i]); - console.assert([3u8, 4] == b[i..4]); - } - "#; - let input_string = r#" - [main] - i: u32 = 2; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_range_index_dyn() { - let program_string = r#" - function main(i: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([1u8, 2] == b[..i]); - console.assert([3u8, 4] == b[i..]); - } - "#; - let input_string = r#" - [main] - i: u32 = 2; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_range_index_full_dyn() { - let program_string = r#" - function main(i: u32, y: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([3u8, 4] == b[i..y]); - } - "#; - let input_string = r#" - [main] - i: u32 = 2; - y: u32 = 4; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_range_index_out_of_bounds_fail() { - let program_string = r#" - function main() { - let b = [1u8, 2, 3, 4]; - - console.assert([1, 2] == b[3..5]); - } - "#; - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_range_index_invalid_bounds_fail() { - let program_string = r#" - function main() { - let b = [1u8, 2, 3, 4]; - - console.assert([1, 2] == b[2..1]); - } - "#; - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_range_index_full_dyn_resized_fail() { - let program_string = r#" - function main(i: u32, y: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([3u8, 4] == b[i..y]); - } - "#; - let input_string = r#" - [main] - i: u32 = 1; - y: u32 = 4; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_array_range_index_full_dyn_bounds_fail() { - let program_string = r#" - function main(i: u32, y: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([3u8, 4] == b[i..y]); - } - "#; - let input_string = r#" - [main] - i: u32 = 3; - y: u32 = 5; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_compiler_error(program); -} diff --git a/tests/compiler/array/multi_fail_initializer.leo b/tests/compiler/array/multi_fail_initializer.leo index be1ab315bd..464736f85f 100644 --- a/tests/compiler/array/multi_fail_initializer.leo +++ b/tests/compiler/array/multi_fail_initializer.leo @@ -1,3 +1,10 @@ -function main() { +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + +function main() -> bool { const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions -} \ No newline at end of file + return false; +} diff --git a/tests/compiler/array/multi_fail_inline.leo b/tests/compiler/array/multi_fail_inline.leo index 49c9296798..10ee6634ab 100644 --- a/tests/compiler/array/multi_fail_inline.leo +++ b/tests/compiler/array/multi_fail_inline.leo @@ -1,4 +1,11 @@ -function main() { +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + +function main() -> bool { const arr: [u8; (2, 2)] = [[1u8, 1u8], [1u8]]; // incorrect dimensions -} \ No newline at end of file + return false; +} diff --git a/tests/compiler/array/multi_initializer.leo b/tests/compiler/array/multi_initializer.leo index 6133542ef0..98faed5d05 100644 --- a/tests/compiler/array/multi_initializer.leo +++ b/tests/compiler/array/multi_initializer.leo @@ -1,7 +1,12 @@ -function main() { - const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)]; +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ +function main(y: bool) -> bool { + const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)]; const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2]; - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/multi_initializer_fail.leo b/tests/compiler/array/multi_initializer_fail.leo index e38a8fdaee..b99fcee93c 100644 --- a/tests/compiler/array/multi_initializer_fail.leo +++ b/tests/compiler/array/multi_initializer_fail.leo @@ -1,3 +1,10 @@ -function main() { +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + +function main() -> bool { const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions -} \ No newline at end of file + return false; +} diff --git a/tests/compiler/array/nested.leo b/tests/compiler/array/nested.leo index 80fc5511bf..e384518b01 100644 --- a/tests/compiler/array/nested.leo +++ b/tests/compiler/array/nested.leo @@ -1,4 +1,12 @@ -function main () { +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +function main(n: bool) -> bool { const x = [false; (2, 2)]; - const y: bool = x[0][0]; + const z: bool = x[0][0]; + + return n == z; } diff --git a/tests/compiler/array/nested_3x2_value.leo b/tests/compiler/array/nested_3x2_value.leo index c5f64c997e..85693cc6b7 100644 --- a/tests/compiler/array/nested_3x2_value.leo +++ b/tests/compiler/array/nested_3x2_value.leo @@ -1,8 +1,13 @@ -// Multidimensional array syntax in leo -function main() { - const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ +// Multidimensional array syntax in leo +function main(y: bool) -> bool { + const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/nested_3x2_value_fail.leo b/tests/compiler/array/nested_3x2_value_fail.leo index a187a51991..f05d9517a3 100644 --- a/tests/compiler/array/nested_3x2_value_fail.leo +++ b/tests/compiler/array/nested_3x2_value_fail.leo @@ -1,4 +1,12 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + + // Multidimensional array syntax in leo -function main() { +function main(y: bool) -> bool { const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) + return false; } diff --git a/tests/compiler/array/registers.leo b/tests/compiler/array/registers.leo index 98d129207f..254c8a8d22 100644 --- a/tests/compiler/array/registers.leo +++ b/tests/compiler/array/registers.leo @@ -1,3 +1,11 @@ -function main() -> [u8; 3] { - return input.registers.r; +/* +namespace: Compile +expectation: Pass +input_file: + - input/registers_ones.in + - input/registers_zeros.in +*/ + +function main(a: [u8; 3]) -> [u8; 3] { + return input.registers.r == a ? [3,2,1] : [1,2,3]; } diff --git a/tests/compiler/array/slice.leo b/tests/compiler/array/slice.leo index 9ff83dbbb8..9841cf4c52 100644 --- a/tests/compiler/array/slice.leo +++ b/tests/compiler/array/slice.leo @@ -1,6 +1,11 @@ -// `{from}..{to}` copies the elements of one array into another exclusively -function main(a: [u8; 3]) { - const b = [1u8; 4]; +/* +namespace: Compile +expectation: Pass +input_file: input/three_ones.in +*/ - console.assert(a == b[0..3]); +// `{from}..{to}` copies the elements of one array into another exclusively +function main(a: [u8; 3]) -> bool { + const b = [1u8; 4]; + return a == b[0..3]; } diff --git a/tests/compiler/array/slice_lower.leo b/tests/compiler/array/slice_lower.leo index 0af6fbd937..cea4bf1484 100644 --- a/tests/compiler/array/slice_lower.leo +++ b/tests/compiler/array/slice_lower.leo @@ -1,8 +1,14 @@ -function main() { +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +function main(y: bool) -> bool { const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8]; const expected: [u32; 2] = [0, 1]; const actual = arr[..2]; // Should produce [0, 1] - console.assert(expected == actual); -} \ No newline at end of file + return expected == actual == y; +} diff --git a/tests/compiler/array/spread.leo b/tests/compiler/array/spread.leo index 8bd2861aae..3236476099 100644 --- a/tests/compiler/array/spread.leo +++ b/tests/compiler/array/spread.leo @@ -1,7 +1,13 @@ +/* +namespace: Compile +expectation: Pass +input_file: input/three_ones.in +*/ + // A spread operator `...` copies the elements of one array into another -function main(a: [u8; 3]) { +function main(a: [u8; 3]) -> bool { const b = [1u8, 1u8]; const c = [1u8, ...b]; - console.assert(a == c); -} \ No newline at end of file + return a == c; +} diff --git a/tests/compiler/array/tuple_3x2_value.leo b/tests/compiler/array/tuple_3x2_value.leo index b6659539d5..4e23eaaca2 100644 --- a/tests/compiler/array/tuple_3x2_value.leo +++ b/tests/compiler/array/tuple_3x2_value.leo @@ -1,8 +1,13 @@ -// Multidimensional array syntax in leo -function main() { - const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ +// Multidimensional array syntax in leo +function main(y: bool) -> bool { + const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/tuple_3x2_value_fail.leo b/tests/compiler/array/tuple_3x2_value_fail.leo index 78593ab696..204226ff47 100644 --- a/tests/compiler/array/tuple_3x2_value_fail.leo +++ b/tests/compiler/array/tuple_3x2_value_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + // Multidimensional array syntax in leo function main() { const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) diff --git a/tests/compiler/array/type_fail.leo b/tests/compiler/array/type_fail.leo index 356bba976a..5a93752e16 100644 --- a/tests/compiler/array/type_fail.leo +++ b/tests/compiler/array/type_fail.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Fail +*/ + + function main() { const a: [u8; -2] = [0u32; 2]; -} \ No newline at end of file +} diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out new file mode 100644 index 0000000000..9cf2626dba --- /dev/null +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 95 + num_constraints: 95 + at: 5884e806c47756fa1d12f47e5cc5249843d8de4e2fafcb373c5a0d67dfe22d69 + bt: 983c734b40e342144d6b4d52e315da9ff9f97580f019f606403924bb977a5be7 + ct: 49f0db71bd29b80dbe5f2f96573a5959b1df339c92350e16f111bade214037aa + output: + - input_file: input/input_nested_3x2.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out index e99d996ed2..fe2d945a7a 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/input_nested_3x2_fail.leo:4:37\n |\n 4 | console.assert(a == [[0u8; 2]; 3)]); // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/input_nested_3x2_fail.leo:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" diff --git a/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out new file mode 100644 index 0000000000..1650b2cd83 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/input_tuple_3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 95 + num_constraints: 95 + at: 5884e806c47756fa1d12f47e5cc5249843d8de4e2fafcb373c5a0d67dfe22d69 + bt: 983c734b40e342144d6b4d52e315da9ff9f97580f019f606403924bb977a5be7 + ct: 49f0db71bd29b80dbe5f2f96573a5959b1df339c92350e16f111bade214037aa + output: + - input_file: input/input_tuple_3x2.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/input_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_tuple_3x2_fail.leo.out new file mode 100644 index 0000000000..995afe29e0 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/input_tuple_3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - aborting due to syntax error diff --git a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out new file mode 100644 index 0000000000..6d1808725c --- /dev/null +++ b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/multi_fail_initializer.leo:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out new file mode 100644 index 0000000000..6229b578b6 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/multi_fail_inline.leo:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/multi_initializer.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out new file mode 100644 index 0000000000..f35aaaa775 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/multi_initializer_fail.leo:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" diff --git a/tests/expectations/compiler/compiler/array/nested.leo.out b/tests/expectations/compiler/compiler/array/nested.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/nested.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out new file mode 100644 index 0000000000..aea15af86c --- /dev/null +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/nested_3x2_value_fail.leo:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/registers.leo.out b/tests/expectations/compiler/compiler/array/registers.leo.out new file mode 100644 index 0000000000..b9730543b0 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/registers.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 119 + num_constraints: 143 + at: ae3e8a95d339433e8a11fc7a54536b8f56abacc03cffa1c4f4be8fa32bc4da8b + bt: 43972815ec9d0ab821613fde2cd6a5df9ee42f50758a27a0fed6dc111b44f3ee + ct: 5ed7a755b881aa851f3d3e966a4bd18dd48ce59be71b4ada39c9c891f8297201 + output: + - input_file: input/registers_ones.in + output: + registers: + r: + type: "[u8; 3]" + value: "[3, 2, 1]" + - input_file: input/registers_zeros.in + output: + registers: + r: + type: "[u8; 3]" + value: "[1, 2, 3]" diff --git a/tests/expectations/compiler/compiler/array/slice.leo.out b/tests/expectations/compiler/compiler/array/slice.leo.out new file mode 100644 index 0000000000..267848a117 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/slice.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 47 + num_constraints: 47 + at: 9034e7c6c2ae58e279196614600093d655bcdad8237302b84a66e63ec1c2f00e + bt: f23a0442b41c8901611d5f1a9a8493a0cb03c68e183a81a1b88c5a6600fa7420 + ct: ad66abc1bf940dbc76573c0a516ebf633c1411f9997101d86ded0faff025d52c + output: + - input_file: input/three_ones.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/slice_lower.leo.out b/tests/expectations/compiler/compiler/array/slice_lower.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/slice_lower.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/spread.leo.out b/tests/expectations/compiler/compiler/array/spread.leo.out new file mode 100644 index 0000000000..267848a117 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/spread.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 47 + num_constraints: 47 + at: 9034e7c6c2ae58e279196614600093d655bcdad8237302b84a66e63ec1c2f00e + bt: f23a0442b41c8901611d5f1a9a8493a0cb03c68e183a81a1b88c5a6600fa7420 + ct: ad66abc1bf940dbc76573c0a516ebf633c1411f9997101d86ded0faff025d52c + output: + - input_file: input/three_ones.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out new file mode 100644 index 0000000000..aa9292ed1b --- /dev/null +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/tuple_3x2_value_fail.leo:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_fail.leo.out b/tests/expectations/compiler/compiler/array/type_fail.leo.out new file mode 100644 index 0000000000..23f85efd45 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_fail.leo:5:19\n |\n 5 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n = expected '(' -- got '-'" From e3983bfa909eb05a13de30bac42b7b5588fd0bd1 Mon Sep 17 00:00:00 2001 From: damirka Date: Thu, 6 May 2021 14:01:42 +0300 Subject: [PATCH 12/26] array --- tests/compiler/array/type_fail.leo | 1 - tests/compiler/array/type_input_3x2.leo | 12 +++++++++--- tests/compiler/array/type_input_4x3x2.leo | 12 +++++++++--- .../array/type_nested_value_nested_3x2.leo | 13 +++++++++---- .../type_nested_value_nested_3x2_fail.leo | 7 ++++++- .../array/type_nested_value_nested_4x3x2.leo | 12 +++++++++--- .../type_nested_value_nested_4x3x2_fail.leo | 7 ++++++- .../array/type_nested_value_tuple_3x2.leo | 13 +++++++++---- .../array/type_nested_value_tuple_3x2_fail.leo | 7 ++++++- .../array/type_nested_value_tuple_4x3x2.leo | 12 +++++++++--- .../type_nested_value_tuple_4x3x2_fail.leo | 7 ++++++- .../array/type_tuple_value_nested_3x2.leo | 12 +++++++++--- .../array/type_tuple_value_nested_3x2_fail.leo | 8 +++++++- .../array/type_tuple_value_nested_4x3x2.leo | 12 +++++++++--- .../type_tuple_value_nested_4x3x2_fail.leo | 7 ++++++- .../array/type_tuple_value_tuple_3x2.leo | 12 +++++++++--- .../array/type_tuple_value_tuple_3x2_fail.leo | 7 ++++++- .../array/type_tuple_value_tuple_4x3x2.leo | 12 +++++++++--- .../type_tuple_value_tuple_4x3x2_fail.leo | 7 ++++++- tests/compiler/array/variable_slice_fail.leo | 7 ++++++- .../compiler/compiler/array/type_fail.leo.out | 2 +- .../compiler/array/type_input_3x2.leo.out | 18 ++++++++++++++++++ .../compiler/array/type_input_4x3x2.leo.out | 18 ++++++++++++++++++ .../array/type_nested_value_nested_3x2.leo.out | 18 ++++++++++++++++++ .../type_nested_value_nested_3x2_fail.leo.out | 5 +++++ .../type_nested_value_nested_4x3x2.leo.out | 18 ++++++++++++++++++ ...type_nested_value_nested_4x3x2_fail.leo.out | 5 +++++ .../array/type_nested_value_tuple_3x2.leo.out | 18 ++++++++++++++++++ .../type_nested_value_tuple_3x2_fail.leo.out | 5 +++++ .../type_nested_value_tuple_4x3x2.leo.out | 18 ++++++++++++++++++ .../type_nested_value_tuple_4x3x2_fail.leo.out | 5 +++++ .../array/type_tuple_value_nested_3x2.leo.out | 18 ++++++++++++++++++ .../type_tuple_value_nested_3x2_fail.leo.out | 5 +++++ .../type_tuple_value_nested_4x3x2.leo.out | 18 ++++++++++++++++++ .../type_tuple_value_nested_4x3x2_fail.leo.out | 5 +++++ .../array/type_tuple_value_tuple_3x2.leo.out | 18 ++++++++++++++++++ .../type_tuple_value_tuple_3x2_fail.leo.out | 5 +++++ .../array/type_tuple_value_tuple_4x3x2.leo.out | 18 ++++++++++++++++++ .../type_tuple_value_tuple_4x3x2_fail.leo.out | 5 +++++ .../compiler/array/variable_slice_fail.leo.out | 5 +++++ 40 files changed, 371 insertions(+), 43 deletions(-) create mode 100644 tests/expectations/compiler/compiler/array/type_input_3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out create mode 100644 tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out diff --git a/tests/compiler/array/type_fail.leo b/tests/compiler/array/type_fail.leo index 5a93752e16..603871544b 100644 --- a/tests/compiler/array/type_fail.leo +++ b/tests/compiler/array/type_fail.leo @@ -3,7 +3,6 @@ namespace: Compile expectation: Fail */ - function main() { const a: [u8; -2] = [0u32; 2]; } diff --git a/tests/compiler/array/type_input_3x2.leo b/tests/compiler/array/type_input_3x2.leo index ea60a0cc24..7b3cb6d1a5 100644 --- a/tests/compiler/array/type_input_3x2.leo +++ b/tests/compiler/array/type_input_3x2.leo @@ -1,5 +1,11 @@ -function main(a: [[u8; 2]; 3]) { +/* +namespace: Compile +expectation: Pass +input_file: input/input_tuple_3x2.in +*/ + +function main(a: [[u8; 2]; 3]) -> bool { const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - console.assert(a == b); -} \ No newline at end of file + return a == b; +} diff --git a/tests/compiler/array/type_input_4x3x2.leo b/tests/compiler/array/type_input_4x3x2.leo index 2d9c4cff22..cc5afdce3e 100644 --- a/tests/compiler/array/type_input_4x3x2.leo +++ b/tests/compiler/array/type_input_4x3x2.leo @@ -1,8 +1,14 @@ -function main(a: [[[u8; 2]; 3]; 4]) { +/* +namespace: Compile +expectation: Pass +input_file: input/type_tuple_value_nested_4x3x2.in +*/ + +function main(a: [[[u8; 2]; 3]; 4]) -> bool { const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - console.assert(a == b); -} \ No newline at end of file + return a == b; +} diff --git a/tests/compiler/array/type_nested_value_nested_3x2.leo b/tests/compiler/array/type_nested_value_nested_3x2.leo index bcf5bae674..dbc2c1e6b4 100644 --- a/tests/compiler/array/type_nested_value_nested_3x2.leo +++ b/tests/compiler/array/type_nested_value_nested_3x2.leo @@ -1,7 +1,12 @@ -function main() { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline +/* +namespace: Compile +expectation: Pass +input_file: input/type_nested_value_nested_3x2.in +*/ +function main() -> bool { + const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b; +} diff --git a/tests/compiler/array/type_nested_value_nested_3x2_fail.leo b/tests/compiler/array/type_nested_value_nested_3x2_fail.leo index 56c8916fb0..ab5e620209 100644 --- a/tests/compiler/array/type_nested_value_nested_3x2_fail.leo +++ b/tests/compiler/array/type_nested_value_nested_3x2_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file +} diff --git a/tests/compiler/array/type_nested_value_nested_4x3x2.leo b/tests/compiler/array/type_nested_value_nested_4x3x2.leo index 1691fa26c7..1845a03257 100644 --- a/tests/compiler/array/type_nested_value_nested_4x3x2.leo +++ b/tests/compiler/array/type_nested_value_nested_4x3x2.leo @@ -1,4 +1,10 @@ -function main() { +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +function main(y: bool) -> bool { const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], @@ -6,5 +12,5 @@ function main() { const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo b/tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo index 480327a91d..ab0447eb50 100644 --- a/tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo +++ b/tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file +} diff --git a/tests/compiler/array/type_nested_value_tuple_3x2.leo b/tests/compiler/array/type_nested_value_tuple_3x2.leo index 5f14084d55..7dd77e0baa 100644 --- a/tests/compiler/array/type_nested_value_tuple_3x2.leo +++ b/tests/compiler/array/type_nested_value_tuple_3x2.leo @@ -1,7 +1,12 @@ -function main() { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ +function main(y: bool) -> bool { + const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/type_nested_value_tuple_3x2_fail.leo b/tests/compiler/array/type_nested_value_tuple_3x2_fail.leo index 3bfb559615..24e66bb059 100644 --- a/tests/compiler/array/type_nested_value_tuple_3x2_fail.leo +++ b/tests/compiler/array/type_nested_value_tuple_3x2_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file +} diff --git a/tests/compiler/array/type_nested_value_tuple_4x3x2.leo b/tests/compiler/array/type_nested_value_tuple_4x3x2.leo index 88a5143bd2..1efc8658bb 100644 --- a/tests/compiler/array/type_nested_value_tuple_4x3x2.leo +++ b/tests/compiler/array/type_nested_value_tuple_4x3x2.leo @@ -1,4 +1,10 @@ -function main() { +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +function main(y: bool) -> bool { const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], @@ -6,5 +12,5 @@ function main() { const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo b/tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo index ce1219a37b..e28f9d0c96 100644 --- a/tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo +++ b/tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file +} diff --git a/tests/compiler/array/type_tuple_value_nested_3x2.leo b/tests/compiler/array/type_tuple_value_nested_3x2.leo index 81195e03a1..20c2fdea95 100644 --- a/tests/compiler/array/type_tuple_value_nested_3x2.leo +++ b/tests/compiler/array/type_tuple_value_nested_3x2.leo @@ -1,7 +1,13 @@ -function main() { +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +function main(y: bool) -> bool { const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/type_tuple_value_nested_3x2_fail.leo b/tests/compiler/array/type_tuple_value_nested_3x2_fail.leo index e84f025a9f..e11ae71dad 100644 --- a/tests/compiler/array/type_tuple_value_nested_3x2_fail.leo +++ b/tests/compiler/array/type_tuple_value_nested_3x2_fail.leo @@ -1,3 +1,9 @@ +/* +namespace: Compile +expectation: Fail +input_file: input/dummy.in +*/ + function main() { const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file +} diff --git a/tests/compiler/array/type_tuple_value_nested_4x3x2.leo b/tests/compiler/array/type_tuple_value_nested_4x3x2.leo index 322a6f7601..63d41b546e 100644 --- a/tests/compiler/array/type_tuple_value_nested_4x3x2.leo +++ b/tests/compiler/array/type_tuple_value_nested_4x3x2.leo @@ -1,4 +1,10 @@ -function main() { +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +function main(y: bool) -> bool { const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], @@ -6,5 +12,5 @@ function main() { const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo b/tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo index cbb7ccbf76..63d7724c7c 100644 --- a/tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo +++ b/tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file +} diff --git a/tests/compiler/array/type_tuple_value_tuple_3x2.leo b/tests/compiler/array/type_tuple_value_tuple_3x2.leo index d451a9c1a8..15754d3f4f 100644 --- a/tests/compiler/array/type_tuple_value_tuple_3x2.leo +++ b/tests/compiler/array/type_tuple_value_tuple_3x2.leo @@ -1,7 +1,13 @@ -function main() { +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +function main(y: bool) -> bool { const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo b/tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo index 884a75db9d..2c010bb604 100644 --- a/tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo +++ b/tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file +} diff --git a/tests/compiler/array/type_tuple_value_tuple_4x3x2.leo b/tests/compiler/array/type_tuple_value_tuple_4x3x2.leo index 1205b1dc9c..9fc4402f21 100644 --- a/tests/compiler/array/type_tuple_value_tuple_4x3x2.leo +++ b/tests/compiler/array/type_tuple_value_tuple_4x3x2.leo @@ -1,4 +1,10 @@ -function main() { +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +function main(y: bool) -> bool{ const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], @@ -6,5 +12,5 @@ function main() { const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer - console.assert(a == b); -} \ No newline at end of file + return a == b == y; +} diff --git a/tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo b/tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo index 31e2a5e552..4ab68f8a40 100644 --- a/tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo +++ b/tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order) -} \ No newline at end of file +} diff --git a/tests/compiler/array/variable_slice_fail.leo b/tests/compiler/array/variable_slice_fail.leo index e79d64112f..1751b2b845 100644 --- a/tests/compiler/array/variable_slice_fail.leo +++ b/tests/compiler/array/variable_slice_fail.leo @@ -1,7 +1,12 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a = [1u8; 10]; for i in 0..10 { const x = a[i..10]; console.debug("{}", x); } -} \ No newline at end of file +} diff --git a/tests/expectations/compiler/compiler/array/type_fail.leo.out b/tests/expectations/compiler/compiler/array/type_fail.leo.out index 23f85efd45..6ee0b01923 100644 --- a/tests/expectations/compiler/compiler/array/type_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_fail.leo:5:19\n |\n 5 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n = expected '(' -- got '-'" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_fail.leo:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n = expected '(' -- got '-'" diff --git a/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out new file mode 100644 index 0000000000..1650b2cd83 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_input_3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 95 + num_constraints: 95 + at: 5884e806c47756fa1d12f47e5cc5249843d8de4e2fafcb373c5a0d67dfe22d69 + bt: 983c734b40e342144d6b4d52e315da9ff9f97580f019f606403924bb977a5be7 + ct: 49f0db71bd29b80dbe5f2f96573a5959b1df339c92350e16f111bade214037aa + output: + - input_file: input/input_tuple_3x2.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out new file mode 100644 index 0000000000..c25919cad6 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_input_4x3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 383 + num_constraints: 383 + at: ec8cf3ea9e586d3c504b8b467b4404d213dd375aa2691f2b9a8670c879ffa24d + bt: 9b5ba17ea683af827718f9062b3102faa0be01b9f67022e2322db989bf90f057 + ct: 6fe90b4e46834afeb215a4702281504d676eae391588e5b576f6e406f6ddd504 + output: + - input_file: input/type_tuple_value_nested_4x3x2.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out new file mode 100644 index 0000000000..a9bc438951 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: input/type_nested_value_nested_3x2.in + output: + registers: + x: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out new file mode 100644 index 0000000000..9b1d6a23cb --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_nested_value_nested_3x2_fail.leo:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out new file mode 100644 index 0000000000..29e7dd7ae5 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out new file mode 100644 index 0000000000..ed105638c8 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_nested_value_tuple_3x2_fail.leo:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out new file mode 100644 index 0000000000..c9a3bd14b5 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out new file mode 100644 index 0000000000..5de8770b54 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_tuple_value_nested_3x2_fail.leo:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out new file mode 100644 index 0000000000..5fb050dcf9 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out new file mode 100644 index 0000000000..41ce984735 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out new file mode 100644 index 0000000000..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out new file mode 100644 index 0000000000..9d6bf75f48 --- /dev/null +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out new file mode 100644 index 0000000000..45a24a23ce --- /dev/null +++ b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/variable_slice_fail.leo:6:19\n |\n 6 | const x = a[i..10];\n | ^^^^^^^^\n |\n = array size cannot be inferred, add explicit types" From ac57fe64105315083086beb3f35c1e39a2da4294 Mon Sep 17 00:00:00 2001 From: damirka Date: Thu, 6 May 2021 14:27:42 +0300 Subject: [PATCH 13/26] test conflicts + clippy --- compiler/src/output/mod.rs | 20 ++++++++++++------- parser/src/parser/statement.rs | 5 ++--- ...define_circuit_inside_circuit_function.leo | 4 ++-- tests/compiler/circuits/inline.leo | 2 +- .../compiler/circuits/inline_member_pass.leo | 7 +++++-- .../circuits/member_function_nested.leo | 4 ++-- tests/compiler/circuits/pedersen_mock.leo | 7 +++---- tests/compiler/integers/i8/ternary.leo | 4 ++-- tests/compiler/mutability/let_mut_nested.leo | 2 +- tests/compiler/mutability/swap.leo | 4 ++-- tests/compiler/statements/for_loop.leo | 2 +- tests/compiler/tuples/dependent.leo | 4 ++-- tests/compiler/tuples/destructured.leo | 4 ++-- tests/compiler/tuples/nested_access.leo | 4 ++-- .../circuits/inline_member_pass.leo.out | 10 +++++----- .../compiler/circuits/pedersen_mock.leo.out | 10 +++++----- 16 files changed, 50 insertions(+), 43 deletions(-) diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index 6e698187b2..44d6cf0827 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -44,20 +44,26 @@ pub struct Output { impl fmt::Display for Output { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "[{}]\n", REGISTERS_VARIABLE_NAME)?; + writeln!(f, "[{}]", REGISTERS_VARIABLE_NAME)?; // format: "token_id: u64 = 1u64;" for (name, register) in self.registers.iter() { - write!(f, "{}: {} = {};\n", name, register.type_, register.value)?; + writeln!(f, "{}: {} = {};", name, register.type_, register.value)?; } Ok(()) } } -impl Into for Output { - fn into(self) -> OutputBytes { - OutputBytes::from(self.to_string().into_bytes()) - } -} +// impl Into for Output { +// fn into(self) -> OutputBytes { +// OutputBytes::from(self.to_string().into_bytes()) +// } +// } + +// impl From for OutputBytes { +// fn from(a: Output) -> Self { + +// } +// } impl Output { pub fn new<'a, F: PrimeField, G: GroupType>( diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index fafc5771df..637e1d99e9 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -314,8 +314,9 @@ impl ParserContext { pub fn parse_definition_statement(&mut self) -> SyntaxResult { let declare = self.expect_oneof(&[Token::Let, Token::Const])?; let mut variable_names = Vec::new(); + variable_names.push(self.parse_variable_name(&declare)?); + if self.eat(Token::LeftParen).is_some() { - variable_names.push(self.parse_variable_name(&declare)?); let mut eaten_ending = false; while self.eat(Token::Comma).is_some() { if self.eat(Token::RightParen).is_some() { @@ -327,8 +328,6 @@ impl ParserContext { if !eaten_ending { self.expect(Token::RightParen)?; } - } else { - variable_names.push(self.parse_variable_name(&declare)?); } let type_ = if self.eat(Token::Colon).is_some() { diff --git a/tests/compiler/circuits/define_circuit_inside_circuit_function.leo b/tests/compiler/circuits/define_circuit_inside_circuit_function.leo index e3eb425f54..e04eb547c6 100644 --- a/tests/compiler/circuits/define_circuit_inside_circuit_function.leo +++ b/tests/compiler/circuits/define_circuit_inside_circuit_function.leo @@ -16,12 +16,12 @@ circuit Foo { circuit Bar { function bar(a: u32) -> u32 { - const f = Foo { a: a }; + let f = Foo { a: a }; return f.a; } } function main(a: u32) -> bool { - const b = Bar::bar(a); + let b = Bar::bar(a); return a == b; } diff --git a/tests/compiler/circuits/inline.leo b/tests/compiler/circuits/inline.leo index 0d15894e68..332aa5aa2e 100644 --- a/tests/compiler/circuits/inline.leo +++ b/tests/compiler/circuits/inline.leo @@ -15,6 +15,6 @@ circuit Foo { } function main(x: u32) -> u32 { - const a = Foo { x: x }; + let a = Foo { x: x }; return a.x; } diff --git a/tests/compiler/circuits/inline_member_pass.leo b/tests/compiler/circuits/inline_member_pass.leo index e966c9b0fb..f7f22f000d 100644 --- a/tests/compiler/circuits/inline_member_pass.leo +++ b/tests/compiler/circuits/inline_member_pass.leo @@ -4,6 +4,9 @@ expectation: Pass inputs: - inline.in: | [main] + y: bool = true; + + [constants] x: u8 = 10; [registers] @@ -18,9 +21,9 @@ circuit Foo { } } -function main(x: u8) -> bool { +function main(const x: u8, y: bool) -> bool { const a = Foo { x }; const b = Foo::new(x); - return b.x == a.x; + return b.x == a.x == y; } diff --git a/tests/compiler/circuits/member_function_nested.leo b/tests/compiler/circuits/member_function_nested.leo index 888cd69d11..f464f9cb6e 100644 --- a/tests/compiler/circuits/member_function_nested.leo +++ b/tests/compiler/circuits/member_function_nested.leo @@ -23,8 +23,8 @@ circuit Foo { } function main(x: u32) -> bool { - const a = Foo { x }; - const b = a.add_x(1u32); + let a = Foo { x }; + let b = a.add_x(1u32); return b == x + 1; } diff --git a/tests/compiler/circuits/pedersen_mock.leo b/tests/compiler/circuits/pedersen_mock.leo index ee001de4f3..562ac618b3 100644 --- a/tests/compiler/circuits/pedersen_mock.leo +++ b/tests/compiler/circuits/pedersen_mock.leo @@ -17,10 +17,10 @@ circuit PedersenHash { return Self { parameters: parameters }; } - function hash(self, bits: [bool; 512]) -> u32 { + function hash(const self, bits: [bool; 512]) -> u32 { let digest: u32 = 0; for i in 0..512 { - const base = bits[i] ? self.parameters[i] : 0u32; + let base = bits[i] ? self.parameters[i] : 0u32; digest += base; } return digest; @@ -31,8 +31,7 @@ circuit PedersenHash { function main(hash_input: [bool; 512]) -> bool { const parameters = [0u32; 512]; const pedersen = PedersenHash::new(parameters); - const res = pedersen.hash(hash_input); + let res = pedersen.hash(hash_input); - console.assert(res == 0u32); return res == 0u32; } diff --git a/tests/compiler/integers/i8/ternary.leo b/tests/compiler/integers/i8/ternary.leo index 4c489b78bc..6198977451 100644 --- a/tests/compiler/integers/i8/ternary.leo +++ b/tests/compiler/integers/i8/ternary.leo @@ -17,7 +17,7 @@ inputs: */ function main(s: bool, a: i8, b: i8, c: i8) { - const r = s ? a : b; + let r = s ? a : b; console.assert(r == c); -} \ No newline at end of file +} diff --git a/tests/compiler/mutability/let_mut_nested.leo b/tests/compiler/mutability/let_mut_nested.leo index a3f20d4a18..34def73c71 100644 --- a/tests/compiler/mutability/let_mut_nested.leo +++ b/tests/compiler/mutability/let_mut_nested.leo @@ -7,6 +7,6 @@ input_file: input/dummy.in function main() -> bool { let x = 2u8; let y = x; - const z = y / 2u8; + let z = y / 2u8; return z == 1; } diff --git a/tests/compiler/mutability/swap.leo b/tests/compiler/mutability/swap.leo index f9dc14ac1b..964c368cdd 100644 --- a/tests/compiler/mutability/swap.leo +++ b/tests/compiler/mutability/swap.leo @@ -6,7 +6,7 @@ input_file: input/dummy.in // Swap two elements of an array. function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] { - const t = a[i]; + let t = a[i]; a[i] = a[j]; a[j] = t; return a; @@ -14,7 +14,7 @@ function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] { function main(arr: [u32; 2]) -> bool { const expected: [u32; 2] = [1, 0]; - const actual = swap(arr, 0, 1); + let actual = swap(arr, 0, 1); // Do swap. return expected[0] == actual[0] && expected[1] == actual[1]; diff --git a/tests/compiler/statements/for_loop.leo b/tests/compiler/statements/for_loop.leo index 9c0f79d057..e220e30734 100644 --- a/tests/compiler/statements/for_loop.leo +++ b/tests/compiler/statements/for_loop.leo @@ -13,7 +13,7 @@ function main(x: u32) -> bool { } } - const r: u32 = x == 3 ? 6 : 0; + let r: u32 = x == 3 ? 6 : 0; return r == b; } diff --git a/tests/compiler/tuples/dependent.leo b/tests/compiler/tuples/dependent.leo index 37bcbb738b..3e46824bf5 100644 --- a/tests/compiler/tuples/dependent.leo +++ b/tests/compiler/tuples/dependent.leo @@ -5,7 +5,7 @@ input_file: inputs/true_true.in */ function main(a: (bool, bool)) -> (bool, bool) { - const a = (a.0 ? false : true, a.1 ? false : true); + let a = (a.0 ? false : true, a.1 ? false : true); return (a.0, a.1); -} \ No newline at end of file +} diff --git a/tests/compiler/tuples/destructured.leo b/tests/compiler/tuples/destructured.leo index d3780b496e..d9f1c0def8 100644 --- a/tests/compiler/tuples/destructured.leo +++ b/tests/compiler/tuples/destructured.leo @@ -5,7 +5,7 @@ input_file: inputs/true_true.in */ function main(a: (bool, bool)) -> (bool, bool) { - const (a, b) = (a.0 ? false : true, a.1 ? false : true); + let (a, b) = (a.0 ? false : true, a.1 ? false : true); return (b, a); -} \ No newline at end of file +} diff --git a/tests/compiler/tuples/nested_access.leo b/tests/compiler/tuples/nested_access.leo index 424ba47822..ea42b7e358 100644 --- a/tests/compiler/tuples/nested_access.leo +++ b/tests/compiler/tuples/nested_access.leo @@ -5,7 +5,7 @@ input_file: inputs/true_true.in */ function main(a: (bool, bool)) -> (bool, bool) { - const b = (a, false); + let b = (a, false); return (b.1 || b.0.0, b.1 && b.0.1); -} \ No newline at end of file +} diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out index 76eda84c48..1b78f6ccca 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_pass.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 23 - num_constraints: 23 - at: 1b2521e1b6fa3c84507b93ff0c68d463de22e8fcf6e750ff11dbf856494e9851 - bt: e07261c391194324de6c9bb8706ff09c30ce64dfc55ce30bd8aa4b19f7b1443a - ct: f053ce5b6adb30f5c4f21f4c4c4001a77517d9c0ca3d113cece2585b22e56635 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: inline.in output: diff --git a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out index 93b1d0d42a..51c1c16196 100644 --- a/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out +++ b/tests/expectations/compiler/compiler/circuits/pedersen_mock.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 33854 - num_constraints: 50750 - at: ef530d618c6915bbff2137e7f057b1135dacbdd02e8d4be420320999724633ad - bt: 4ec9fd3915bf2762cb32a7f7805918c1b976ca6c59852f505089fd23c0f321b7 - ct: e13fb652749582faae780837f6de4900f3b6c7202289d2219a543bfdd4f6836e + num_private_variables: 33823 + num_constraints: 50719 + at: 894e21b7ca1c178a167a94f174b4ea0d37b102b394100a15c92e78e16a87acdf + bt: 6756180897cb6c9fe53fce913fd9ad1c77a5b537b805da2c7f42de0473d12c94 + ct: 2f2e90dcee9f8a28e7a9fd4ee37093e4d247d07e4ab97937ecd0ba60ec5dd903 output: - input_file: pedersen.in output: From acf5e1dc08b4f29492041cb40c74f753b1f5f052 Mon Sep 17 00:00:00 2001 From: damirka Date: Thu, 6 May 2021 14:48:41 +0300 Subject: [PATCH 14/26] part revert clippy, fix parser --- parser/src/parser/statement.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index 637e1d99e9..070562c68c 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -314,9 +314,9 @@ impl ParserContext { pub fn parse_definition_statement(&mut self) -> SyntaxResult { let declare = self.expect_oneof(&[Token::Let, Token::Const])?; let mut variable_names = Vec::new(); - variable_names.push(self.parse_variable_name(&declare)?); if self.eat(Token::LeftParen).is_some() { + variable_names.push(self.parse_variable_name(&declare)?); let mut eaten_ending = false; while self.eat(Token::Comma).is_some() { if self.eat(Token::RightParen).is_some() { @@ -328,6 +328,8 @@ impl ParserContext { if !eaten_ending { self.expect(Token::RightParen)?; } + } else { + variable_names.push(self.parse_variable_name(&declare)?); } let type_ = if self.eat(Token::Colon).is_some() { From a39197af621a65f42bd669e3d9535f1fc9f7fac6 Mon Sep 17 00:00:00 2001 From: damirka Date: Thu, 6 May 2021 14:52:20 +0300 Subject: [PATCH 15/26] add const test --- tests/compiler/statements/ternary_non_const_fail.leo | 9 +++++++++ .../compiler/statements/ternary_non_const_fail.leo.out | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 tests/compiler/statements/ternary_non_const_fail.leo create mode 100644 tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out diff --git a/tests/compiler/statements/ternary_non_const_fail.leo b/tests/compiler/statements/ternary_non_const_fail.leo new file mode 100644 index 0000000000..4f1638e00a --- /dev/null +++ b/tests/compiler/statements/ternary_non_const_fail.leo @@ -0,0 +1,9 @@ +/* +namespace: Compile +expectation: Fail +*/ + +function main() { + let x = 3u8; + const y = x > 2u8? 1u8 : 2u8; +} diff --git a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out new file mode 100644 index 0000000000..fe2b77a905 --- /dev/null +++ b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/statements/ternary_non_const_fail.leo:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to create const variable(s) 'y' with non constant values." From 4fcce103298873000373c794db8b9298edf8a6ae Mon Sep 17 00:00:00 2001 From: damirka Date: Thu, 6 May 2021 14:58:36 +0300 Subject: [PATCH 16/26] remove unnecessary mod --- tests/compiler/console/mod.rs | 169 ---------------------------------- 1 file changed, 169 deletions(-) delete mode 100644 tests/compiler/console/mod.rs diff --git a/tests/compiler/console/mod.rs b/tests/compiler/console/mod.rs deleted file mode 100644 index d3ce931675..0000000000 --- a/tests/compiler/console/mod.rs +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - parse_program, - parse_program_with_input, -}; -use leo_ast::InputValue; - -#[test] -fn test_log() { - let program_string = include_str!("log.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_log_fail() { - let program_string = include_str!("log_fail.leo"); - - assert!(parse_program(program_string).is_err()); -} - -#[test] -fn test_log_parameter() { - let program_string = include_str!("log_parameter.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_log_parameter_many() { - let program_string = include_str!("log_parameter_many.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_log_parameter_fail_empty() { - let program_string = include_str!("log_parameter_fail_empty.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_log_parameter_fail_none() { - let program_string = include_str!("log_parameter_fail_empty.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_log_parameter_fail_unknown() { - let program_string = include_str!("log_parameter_fail_unknown.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_log_input() { - let program_string = include_str!("log_input.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(true)))]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -#[test] -fn test_log_conditional() { - let program_string = include_str!("log_conditional.leo"); - let input_equal_string = include_str!("input/input_equal.in"); - - let program = parse_program_with_input(program_string, input_equal_string).unwrap(); - - assert_satisfied(program); - - let input_unequal_string = include_str!("input/input_unequal.in"); - - let program = parse_program_with_input(program_string, input_unequal_string).unwrap(); - - assert_satisfied(program); -} - -// Debug - -#[test] -fn test_debug() { - let program_string = include_str!("debug.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// Error - -#[test] -fn test_error() { - let program_string = include_str!("error.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// Assertion - -#[test] -fn test_assert() { - let program_string = include_str!("assert.leo"); - let mut program = parse_program(program_string).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(program_string).unwrap(); - - let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(false)))]); - - program.set_main_input(main_input); - - expect_compiler_error(program); -} - -#[test] -fn test_conditional_assert() { - let program_string = include_str!("conditional_assert.leo"); - let mut program = parse_program(program_string).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(program_string).unwrap(); - - let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(false)))]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} From 112efb100cb6cb099498fe5561b623db0f55166c Mon Sep 17 00:00:00 2001 From: damirka Date: Mon, 10 May 2021 14:12:31 +0300 Subject: [PATCH 17/26] clippy --- parser/src/parser/statement.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/parser/src/parser/statement.rs b/parser/src/parser/statement.rs index 070562c68c..e83dfa732f 100644 --- a/parser/src/parser/statement.rs +++ b/parser/src/parser/statement.rs @@ -315,8 +315,9 @@ impl ParserContext { let declare = self.expect_oneof(&[Token::Let, Token::Const])?; let mut variable_names = Vec::new(); - if self.eat(Token::LeftParen).is_some() { - variable_names.push(self.parse_variable_name(&declare)?); + let next = self.eat(Token::LeftParen); + variable_names.push(self.parse_variable_name(&declare)?); + if next.is_some() { let mut eaten_ending = false; while self.eat(Token::Comma).is_some() { if self.eat(Token::RightParen).is_some() { @@ -328,8 +329,6 @@ impl ParserContext { if !eaten_ending { self.expect(Token::RightParen)?; } - } else { - variable_names.push(self.parse_variable_name(&declare)?); } let type_ = if self.eat(Token::Colon).is_some() { From 1a15ad3a8f6663452ff8324724939eee7c6bd769 Mon Sep 17 00:00:00 2001 From: damirka Date: Mon, 10 May 2021 20:19:19 +0300 Subject: [PATCH 18/26] i* --- tests/compiler/integers/i128/add.leo | 20 ++- .../compiler/integers/i128/console_assert.leo | 12 +- tests/compiler/integers/i128/div.leo | 20 ++- tests/compiler/integers/i128/eq.leo | 20 ++- tests/compiler/integers/i128/ge.leo | 28 +++- tests/compiler/integers/i128/gt.leo | 28 +++- tests/compiler/integers/i128/input.leo | 3 - tests/compiler/integers/i128/le.leo | 28 +++- tests/compiler/integers/i128/lt.leo | 28 +++- tests/compiler/integers/i128/max.leo | 7 +- tests/compiler/integers/i128/max_fail.leo | 7 +- tests/compiler/integers/i128/min.leo | 7 +- tests/compiler/integers/i128/min_fail.leo | 7 +- tests/compiler/integers/i128/mod.rs | 142 ------------------ tests/compiler/integers/i128/mul.leo | 20 ++- tests/compiler/integers/i128/ne.leo | 28 +++- tests/compiler/integers/i128/negate.leo | 26 +++- tests/compiler/integers/i128/negate_min.leo | 9 +- tests/compiler/integers/i128/negate_zero.leo | 18 ++- .../i128/no_space_between_literal.leo | 9 +- tests/compiler/integers/i128/pow.leo | 6 +- tests/compiler/integers/i128/sub.leo | 20 ++- tests/compiler/integers/i128/ternary.leo | 32 +++- tests/compiler/integers/i16/add.leo | 15 +- .../compiler/integers/i16/console_assert.leo | 6 +- tests/compiler/integers/i16/div.leo | 13 +- tests/compiler/integers/i16/eq.leo | 18 +-- tests/compiler/integers/i16/ge.leo | 22 ++- tests/compiler/integers/i16/gt.leo | 24 +-- tests/compiler/integers/i16/input.leo | 13 -- tests/compiler/integers/i16/le.leo | 26 ++-- tests/compiler/integers/i16/lt.leo | 24 +-- tests/compiler/integers/i16/mul.leo | 20 ++- tests/compiler/integers/i16/ne.leo | 28 +++- tests/compiler/integers/i16/negate.leo | 26 +++- tests/compiler/integers/i16/negate_min.leo | 9 +- tests/compiler/integers/i16/negate_zero.leo | 18 ++- .../integers/i16/no_space_between_literal.leo | 9 +- tests/compiler/integers/i16/pow.leo | 20 ++- tests/compiler/integers/i16/sub.leo | 20 ++- tests/compiler/integers/i16/ternary.leo | 32 +++- tests/compiler/integers/i32/add.leo | 20 ++- .../compiler/integers/i32/console_assert.leo | 12 +- tests/compiler/integers/i32/div.leo | 20 ++- tests/compiler/integers/i32/eq.leo | 20 ++- tests/compiler/integers/i32/ge.leo | 28 +++- tests/compiler/integers/i32/gt.leo | 28 +++- tests/compiler/integers/i32/input.leo | 3 - tests/compiler/integers/i32/le.leo | 28 +++- tests/compiler/integers/i32/lt.leo | 28 +++- tests/compiler/integers/i32/max.leo | 7 +- tests/compiler/integers/i32/max_fail.leo | 7 +- tests/compiler/integers/i32/min.leo | 7 +- tests/compiler/integers/i32/min_fail.leo | 7 +- tests/compiler/integers/i32/mod.rs | 141 ----------------- tests/compiler/integers/i32/mul.leo | 20 ++- tests/compiler/integers/i32/ne.leo | 28 +++- tests/compiler/integers/i32/negate.leo | 26 +++- tests/compiler/integers/i32/negate_min.leo | 9 +- tests/compiler/integers/i32/negate_zero.leo | 18 ++- .../integers/i32/no_space_between_literal.leo | 9 +- tests/compiler/integers/i32/pow.leo | 6 +- tests/compiler/integers/i32/sub.leo | 20 ++- tests/compiler/integers/i32/ternary.leo | 32 +++- tests/compiler/integers/i64/add.leo | 20 ++- .../compiler/integers/i64/console_assert.leo | 12 +- tests/compiler/integers/i64/div.leo | 20 ++- tests/compiler/integers/i64/eq.leo | 20 ++- tests/compiler/integers/i64/ge.leo | 28 +++- tests/compiler/integers/i64/gt.leo | 28 +++- tests/compiler/integers/i64/input.leo | 3 - tests/compiler/integers/i64/le.leo | 28 +++- tests/compiler/integers/i64/lt.leo | 28 +++- tests/compiler/integers/i64/max.leo | 7 +- tests/compiler/integers/i64/max_fail.leo | 7 +- tests/compiler/integers/i64/min.leo | 7 +- tests/compiler/integers/i64/min_fail.leo | 7 +- tests/compiler/integers/i64/mod.rs | 142 ------------------ tests/compiler/integers/i64/mul.leo | 20 ++- tests/compiler/integers/i64/ne.leo | 28 +++- tests/compiler/integers/i64/negate.leo | 26 +++- tests/compiler/integers/i64/negate_min.leo | 9 +- tests/compiler/integers/i64/negate_zero.leo | 18 ++- .../integers/i64/no_space_between_literal.leo | 9 +- tests/compiler/integers/i64/pow.leo | 6 +- tests/compiler/integers/i64/sub.leo | 20 ++- tests/compiler/integers/i64/ternary.leo | 32 +++- tests/compiler/integers/i8/add.leo | 9 +- tests/compiler/integers/i8/div.leo | 9 +- tests/compiler/integers/i8/eq.leo | 9 +- tests/compiler/integers/i8/ge.leo | 19 ++- tests/compiler/integers/i8/gt.leo | 19 ++- tests/compiler/integers/i8/inputs/abc_bool.in | 0 tests/compiler/integers/i8/inputs/abc_int.in | 4 - tests/compiler/integers/i8/le.leo | 19 ++- tests/compiler/integers/i8/lt.leo | 19 ++- tests/compiler/integers/i8/mul.leo | 9 +- tests/compiler/integers/i8/ne.leo | 19 ++- tests/compiler/integers/i8/negate.leo | 16 +- tests/compiler/integers/i8/negate_min.leo | 2 +- tests/compiler/integers/i8/negate_zero.leo | 13 +- .../integers/i8/no_space_between_literal.leo | 4 +- tests/compiler/integers/i8/pow.leo | 9 +- tests/compiler/integers/i8/sub.leo | 9 +- tests/compiler/integers/i8/ternary.leo | 10 +- .../compiler/integers/i128/add.leo.out | 18 +++ .../integers/i128/console_assert.leo.out | 15 ++ .../compiler/integers/i128/div.leo.out | 18 +++ .../compiler/integers/i128/eq.leo.out | 18 +++ .../compiler/integers/i128/ge.leo.out | 24 +++ .../compiler/integers/i128/gt.leo.out | 24 +++ .../compiler/integers/i128/le.leo.out | 24 +++ .../compiler/integers/i128/lt.leo.out | 24 +++ .../compiler/integers/i128/max.leo.out | 15 ++ .../compiler/integers/i128/max_fail.leo.out | 5 + .../compiler/integers/i128/min.leo.out | 15 ++ .../compiler/integers/i128/min_fail.leo.out | 5 + .../compiler/integers/i128/mul.leo.out | 18 +++ .../compiler/integers/i128/ne.leo.out | 24 +++ .../compiler/integers/i128/negate.leo.out | 24 +++ .../compiler/integers/i128/negate_min.leo.out | 15 ++ .../integers/i128/negate_zero.leo.out | 18 +++ .../i128/no_space_between_literal.leo.out | 5 + .../compiler/integers/i128/sub.leo.out | 18 +++ .../compiler/integers/i128/ternary.leo.out | 24 +++ .../compiler/integers/i16/add.leo.out | 5 +- .../compiler/integers/i16/div.leo.out | 5 +- .../compiler/compiler/integers/i16/eq.leo.out | 8 +- .../compiler/compiler/integers/i16/ge.leo.out | 14 +- .../compiler/compiler/integers/i16/gt.leo.out | 14 +- .../compiler/integers/i16/input.leo.out | 15 -- .../compiler/compiler/integers/i16/le.leo.out | 14 +- .../compiler/compiler/integers/i16/lt.leo.out | 14 +- .../compiler/integers/i16/mul.leo.out | 18 +++ .../compiler/compiler/integers/i16/ne.leo.out | 24 +++ .../compiler/integers/i16/negate.leo.out | 24 +++ .../compiler/integers/i16/negate_min.leo.out | 15 ++ .../compiler/integers/i16/negate_zero.leo.out | 18 +++ .../i16/no_space_between_literal.leo.out | 5 + .../compiler/integers/i16/pow.leo.out | 18 +++ .../compiler/integers/i16/sub.leo.out | 18 +++ .../compiler/integers/i16/ternary.leo.out | 24 +++ .../compiler/integers/i32/add.leo.out | 18 +++ .../integers/i32/console_assert.leo.out | 15 ++ .../compiler/integers/i32/div.leo.out | 18 +++ .../compiler/compiler/integers/i32/eq.leo.out | 18 +++ .../compiler/compiler/integers/i32/ge.leo.out | 24 +++ .../compiler/compiler/integers/i32/gt.leo.out | 24 +++ .../compiler/compiler/integers/i32/le.leo.out | 24 +++ .../compiler/compiler/integers/i32/lt.leo.out | 24 +++ .../compiler/integers/i32/max.leo.out | 15 ++ .../compiler/integers/i32/max_fail.leo.out | 5 + .../compiler/integers/i32/min.leo.out | 15 ++ .../compiler/integers/i32/min_fail.leo.out | 5 + .../compiler/integers/i32/mul.leo.out | 18 +++ .../compiler/compiler/integers/i32/ne.leo.out | 24 +++ .../compiler/integers/i32/negate.leo.out | 24 +++ .../compiler/integers/i32/negate_min.leo.out | 15 ++ .../compiler/integers/i32/negate_zero.leo.out | 18 +++ .../i32/no_space_between_literal.leo.out | 5 + .../compiler/integers/i32/sub.leo.out | 18 +++ .../compiler/integers/i32/ternary.leo.out | 24 +++ .../compiler/integers/i64/add.leo.out | 18 +++ .../integers/i64/console_assert.leo.out | 15 ++ .../compiler/integers/i64/div.leo.out | 18 +++ .../compiler/compiler/integers/i64/eq.leo.out | 18 +++ .../compiler/compiler/integers/i64/ge.leo.out | 24 +++ .../compiler/compiler/integers/i64/gt.leo.out | 24 +++ .../compiler/compiler/integers/i64/le.leo.out | 24 +++ .../compiler/compiler/integers/i64/lt.leo.out | 24 +++ .../compiler/integers/i64/max.leo.out | 15 ++ .../compiler/integers/i64/max_fail.leo.out | 5 + .../compiler/integers/i64/min.leo.out | 15 ++ .../compiler/integers/i64/min_fail.leo.out | 5 + .../compiler/integers/i64/mul.leo.out | 18 +++ .../compiler/compiler/integers/i64/ne.leo.out | 24 +++ .../compiler/integers/i64/negate.leo.out | 24 +++ .../compiler/integers/i64/negate_min.leo.out | 15 ++ .../compiler/integers/i64/negate_zero.leo.out | 18 +++ .../i64/no_space_between_literal.leo.out | 5 + .../compiler/integers/i64/sub.leo.out | 18 +++ .../compiler/integers/i64/ternary.leo.out | 24 +++ .../compiler/compiler/integers/i8/add.leo.out | 5 +- .../compiler/compiler/integers/i8/div.leo.out | 5 +- .../compiler/compiler/integers/i8/eq.leo.out | 5 +- .../compiler/compiler/integers/i8/ge.leo.out | 13 +- .../compiler/compiler/integers/i8/gt.leo.out | 13 +- .../compiler/compiler/integers/i8/le.leo.out | 13 +- .../compiler/compiler/integers/i8/lt.leo.out | 13 +- .../compiler/compiler/integers/i8/mul.leo.out | 5 +- .../compiler/compiler/integers/i8/ne.leo.out | 13 +- .../compiler/integers/i8/negate.leo.out | 11 +- .../compiler/integers/i8/negate_zero.leo.out | 17 ++- .../i8/no_space_between_literal.leo.out | 2 +- .../compiler/compiler/integers/i8/pow.leo.out | 5 +- .../compiler/compiler/integers/i8/sub.leo.out | 5 +- .../compiler/integers/i8/ternary.leo.out | 10 +- 197 files changed, 2750 insertions(+), 806 deletions(-) delete mode 100644 tests/compiler/integers/i128/input.leo delete mode 100644 tests/compiler/integers/i128/mod.rs delete mode 100644 tests/compiler/integers/i16/input.leo delete mode 100644 tests/compiler/integers/i32/input.leo delete mode 100644 tests/compiler/integers/i32/mod.rs delete mode 100644 tests/compiler/integers/i64/input.leo delete mode 100644 tests/compiler/integers/i64/mod.rs delete mode 100644 tests/compiler/integers/i8/inputs/abc_bool.in delete mode 100644 tests/compiler/integers/i8/inputs/abc_int.in create mode 100644 tests/expectations/compiler/compiler/integers/i128/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/negate.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i128/ternary.leo.out delete mode 100644 tests/expectations/compiler/compiler/integers/i16/input.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/negate.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/pow.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i16/ternary.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/negate.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i32/ternary.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/negate.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/i64/ternary.leo.out diff --git a/tests/compiler/integers/i128/add.leo b/tests/compiler/integers/i128/add.leo index e35648f545..591661dbb9 100644 --- a/tests/compiler/integers/i128/add.leo +++ b/tests/compiler/integers/i128/add.leo @@ -1,3 +1,17 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a + b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128.in: | + [main] + a: i128 = 1; + b: i128 = 2; + c: i128 = 3; + + [registers] + r0: bool = true; +*/ + +function main(a: i128, b: i128, c: i128) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/i128/console_assert.leo b/tests/compiler/integers/i128/console_assert.leo index c89021f609..0db16aa363 100644 --- a/tests/compiler/integers/i128/console_assert.leo +++ b/tests/compiler/integers/i128/console_assert.leo @@ -1,3 +1,13 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i128.in: | + [main] + a: i128 = 1; + b: i128 = 1; +*/ + function main(a: i128, b: i128) { console.assert(a == b); -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i128/div.leo b/tests/compiler/integers/i128/div.leo index ffaeae19a8..d7055f3eda 100644 --- a/tests/compiler/integers/i128/div.leo +++ b/tests/compiler/integers/i128/div.leo @@ -1,3 +1,17 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a / b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128.in: | + [main] + a: i128 = 4; + b: i128 = 2; + c: i128 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: i128, b: i128, c: i128) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/i128/eq.leo b/tests/compiler/integers/i128/eq.leo index f4beddc8fc..a319c3e672 100644 --- a/tests/compiler/integers/i128/eq.leo +++ b/tests/compiler/integers/i128/eq.leo @@ -1,3 +1,17 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128.in: | + [main] + a: i128 = 2; + b: i128 = 2; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: i128, b: i128, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/i128/ge.leo b/tests/compiler/integers/i128/ge.leo index 1fbbd68073..ae5c4aeb0f 100644 --- a/tests/compiler/integers/i128/ge.leo +++ b/tests/compiler/integers/i128/ge.leo @@ -1,3 +1,25 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128_e.in: | + [main] + a: i128 = 4; + b: i128 = 4; + c: bool = true; + + [registers] + r0: bool = true; + - i128_g.in: | + [main] + a: i128 = 5; + b: i128 = 4; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: i128, b: i128, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/i128/gt.leo b/tests/compiler/integers/i128/gt.leo index 27849afbe8..8c862646d2 100644 --- a/tests/compiler/integers/i128/gt.leo +++ b/tests/compiler/integers/i128/gt.leo @@ -1,3 +1,25 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128_g.in: | + [main] + a: i128 = 4; + b: i128 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - i128_e.in: | + [main] + a: i128 = 4; + b: i128 = 4; + c: bool = false; + + [registers] + r0: bool = false; +*/ + +function main(a: i128, b: i128, c: bool) -> bool { + return a > b == c; +} diff --git a/tests/compiler/integers/i128/input.leo b/tests/compiler/integers/i128/input.leo deleted file mode 100644 index c89021f609..0000000000 --- a/tests/compiler/integers/i128/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128) { - console.assert(a == b); -} \ No newline at end of file diff --git a/tests/compiler/integers/i128/le.leo b/tests/compiler/integers/i128/le.leo index ea0c3c9e1d..5fec5c1b8d 100644 --- a/tests/compiler/integers/i128/le.leo +++ b/tests/compiler/integers/i128/le.leo @@ -1,3 +1,25 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128_l.in: | + [main] + a: i128 = 1; + b: i128 = 100; + c: bool = true; + + [registers] + r0: bool = true; + - i128_e.in: | + [main] + a: i128 = 2; + b: i128 = 2; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: i128, b: i128, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/i128/lt.leo b/tests/compiler/integers/i128/lt.leo index bde4def85c..2ee95b0d29 100644 --- a/tests/compiler/integers/i128/lt.leo +++ b/tests/compiler/integers/i128/lt.leo @@ -1,3 +1,25 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128_l.in: | + [main] + a: i128 = 2; + b: i128 = 4; + c: bool = true; + + [registers] + r0: bool = false; + - i128_e.in: | + [main] + a: i128 = 2; + b: i128 = 2; + c: bool = false; + + [registers] + r0: bool = false; +*/ + +function main(a: i128, b: i128, c: bool) -> bool{ + return a < b == c; +} diff --git a/tests/compiler/integers/i128/max.leo b/tests/compiler/integers/i128/max.leo index 5ba44213e1..ff9c74cf13 100644 --- a/tests/compiler/integers/i128/max.leo +++ b/tests/compiler/integers/i128/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i128 = 170141183460469231731687303715884105727; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i128/max_fail.leo b/tests/compiler/integers/i128/max_fail.leo index a9a46afd7f..17b4ea31b9 100644 --- a/tests/compiler/integers/i128/max_fail.leo +++ b/tests/compiler/integers/i128/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i128 = 170141183460469231731687303715884105728; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i128/min.leo b/tests/compiler/integers/i128/min.leo index 19509a3fb0..23654c3e8f 100644 --- a/tests/compiler/integers/i128/min.leo +++ b/tests/compiler/integers/i128/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i128 = -170141183460469231731687303715884105728; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i128/min_fail.leo b/tests/compiler/integers/i128/min_fail.leo index 918f0e439d..903d41ff96 100644 --- a/tests/compiler/integers/i128/min_fail.leo +++ b/tests/compiler/integers/i128/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i128 = -170141183460469231731687303715884105729; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i128/mod.rs b/tests/compiler/integers/i128/mod.rs deleted file mode 100644 index ead011f14e..0000000000 --- a/tests/compiler/integers/i128/mod.rs +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I128Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI128, - i128, - IntegerType::Signed(SignedIntegerType::I128Type(I128Type {})), - Int128 -); - -#[test] -fn test_i128_min() { - TestI128::test_min(); -} - -#[test] -fn test_i128_min_fail() { - TestI128::test_min_fail(); -} - -#[test] -fn test_i128_max() { - TestI128::test_max(); -} - -#[test] -fn test_i128_max_fail() { - TestI128::test_max_fail(); -} - -#[test] -fn test_i128_neg() { - TestI128::test_negate(); -} - -#[test] -fn test_i128_neg_max_fail() { - TestI128::test_negate_min_fail(); -} - -#[test] -fn test_i128_neg_zero() { - TestI128::test_negate_zero(); -} - -#[test] -fn test_i128_add() { - TestI128::test_add(); -} - -#[test] -fn test_i128_sub() { - TestI128::test_sub(); -} - -#[test] -fn test_i128_mul() { - TestI128::test_mul(); -} - -#[test] -#[ignore] // takes several minutes -fn test_i128_div() { - TestI128::test_div(); -} - -#[test] -fn test_i128_pow() { - TestI128::test_pow(); -} - -#[test] -fn test_i128_eq() { - TestI128::test_eq(); -} - -#[test] -fn test_i128_ne() { - TestI128::test_ne(); -} - -#[test] -fn test_i128_ge() { - TestI128::test_ge(); -} - -#[test] -fn test_i128_gt() { - TestI128::test_gt(); -} - -#[test] -fn test_i128_le() { - TestI128::test_le(); -} - -#[test] -fn test_i128_lt() { - TestI128::test_lt(); -} - -#[test] -fn test_i128_assert_eq() { - TestI128::test_console_assert(); -} - -#[test] -fn test_i128_ternary() { - TestI128::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/i128/mul.leo b/tests/compiler/integers/i128/mul.leo index 25b902d53c..1626521ed0 100644 --- a/tests/compiler/integers/i128/mul.leo +++ b/tests/compiler/integers/i128/mul.leo @@ -1,3 +1,17 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a * b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128.in: | + [main] + a: i128 = 2; + b: i128 = 5; + c: i128 = 10; + + [registers] + r0: bool = false; +*/ + +function main(a: i128, b: i128, c: i128) -> bool { + return a * b == c; +} diff --git a/tests/compiler/integers/i128/ne.leo b/tests/compiler/integers/i128/ne.leo index dae148b49c..c8cc08abb9 100644 --- a/tests/compiler/integers/i128/ne.leo +++ b/tests/compiler/integers/i128/ne.leo @@ -1,3 +1,25 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128_ne.in: | + [main] + a: i128 = 2; + b: i128 = 5; + c: bool = true; + + [registers] + r0: bool = false; + - i128_e.in: | + [main] + a: i128 = 5; + b: i128 = 5; + c: bool = false; + + [registers] + r0: bool = false; +*/ + +function main(a: i128, b: i128, c: bool) -> bool{ + return a != b == c; +} diff --git a/tests/compiler/integers/i128/negate.leo b/tests/compiler/integers/i128/negate.leo index 437ee06390..b336b8df32 100644 --- a/tests/compiler/integers/i128/negate.leo +++ b/tests/compiler/integers/i128/negate.leo @@ -1,3 +1,23 @@ -function main(a: i128, b: i128) { - console.assert(-a == b); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128.in: | + [main] + a: i128 = 5; + b: i128 = -5; + + [registers] + r0: bool = false; + - i128.in: | + [main] + a: i128 = -5; + b: i128 = 5; + + [registers] + r0: bool = false; +*/ + +function main(a: i128, b: i128) -> bool { + return -a == b; +} diff --git a/tests/compiler/integers/i128/negate_min.leo b/tests/compiler/integers/i128/negate_min.leo index c9de272960..115d4ca00f 100644 --- a/tests/compiler/integers/i128/negate_min.leo +++ b/tests/compiler/integers/i128/negate_min.leo @@ -1,4 +1,9 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { - const a: i128 = -170141183460469231731687303715884105728; + const a = -128i128; const b = -a; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i128/negate_zero.leo b/tests/compiler/integers/i128/negate_zero.leo index e079baf393..b78fff141c 100644 --- a/tests/compiler/integers/i128/negate_zero.leo +++ b/tests/compiler/integers/i128/negate_zero.leo @@ -1,5 +1,17 @@ -function main() { +/* +namespace: Compile +expectation: Pass +inputs: + - dummy.in: | + [main] + y: bool = true; + + [registers] + r0: bool = false; +*/ + +function main(y: bool) -> bool { const a = 0i128; - console.assert(-a == 0i128); -} \ No newline at end of file + return -a == 0i128 == y; +} diff --git a/tests/compiler/integers/i128/no_space_between_literal.leo b/tests/compiler/integers/i128/no_space_between_literal.leo index 3142fb5724..fd4ddadfb2 100644 --- a/tests/compiler/integers/i128/no_space_between_literal.leo +++ b/tests/compiler/integers/i128/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { - const i = 1 i128; -} \ No newline at end of file + const i = 1 i128; +} diff --git a/tests/compiler/integers/i128/pow.leo b/tests/compiler/integers/i128/pow.leo index 05536aad51..0d1508184a 100644 --- a/tests/compiler/integers/i128/pow.leo +++ b/tests/compiler/integers/i128/pow.leo @@ -1,3 +1,3 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a ** b == c); -} \ No newline at end of file +function main(a: i128, b: i128, c: i128) -> bool { + return a ** b == c; +} diff --git a/tests/compiler/integers/i128/sub.leo b/tests/compiler/integers/i128/sub.leo index 3a723eec49..8254d82fa8 100644 --- a/tests/compiler/integers/i128/sub.leo +++ b/tests/compiler/integers/i128/sub.leo @@ -1,3 +1,17 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a - b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i128.in: | + [main] + a: i128 = 100; + b: i128 = 50; + c: i128 = 50; + + [registers] + r0: bool = false; +*/ + +function main(a: i128, b: i128, c: i128) -> bool { + return a - b == c; +} diff --git a/tests/compiler/integers/i128/ternary.leo b/tests/compiler/integers/i128/ternary.leo index 3783463b22..0e55bfef03 100644 --- a/tests/compiler/integers/i128/ternary.leo +++ b/tests/compiler/integers/i128/ternary.leo @@ -1,5 +1,29 @@ -function main(s: bool, a: i128, b: i128, c: i128) { - const r = s ? a : b; +/* +namespace: Compile +expectation: Pass +inputs: + - i128.in: | + [main] + s: bool = true; + a: i128 = 10; + b: i128 = 5; + c: i128 = 10; - console.assert(r == c); -} \ No newline at end of file + [registers] + r0: bool = false; + - i128_rev.in: | + [main] + s: bool = false; + a: i128 = 10; + b: i128 = 5; + c: i128 = 5; + + [registers] + r0: bool = false; +*/ + +function main(s: bool, a: i128, b: i128, c: i128) -> bool { + let r = s ? a : b; + + return r == c; +} diff --git a/tests/compiler/integers/i16/add.leo b/tests/compiler/integers/i16/add.leo index 7ee0d2cf2b..361d2c4fb8 100644 --- a/tests/compiler/integers/i16/add.leo +++ b/tests/compiler/integers/i16/add.leo @@ -4,11 +4,14 @@ expectation: Pass inputs: - i16.in: | [main] - a: i16 = 2; - b: i16 = 3; - c: i16 = 5; + a: i16 = 1; + b: i16 = 2; + c: i16 = 3; + + [registers] + r0: bool = true; */ -function main(a: i16, b: i16, c: i16) { - console.assert(a + b == c); -} \ No newline at end of file +function main(a: i16, b: i16, c: i16) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/i16/console_assert.leo b/tests/compiler/integers/i16/console_assert.leo index dd7dfa48d0..1ba8ccbb48 100644 --- a/tests/compiler/integers/i16/console_assert.leo +++ b/tests/compiler/integers/i16/console_assert.leo @@ -4,10 +4,10 @@ expectation: Pass inputs: - i16.in: | [main] - a: i16 = 2; - b: i16 = 2; + a: i16 = 1; + b: i16 = 1; */ function main(a: i16, b: i16) { console.assert(a == b); -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i16/div.leo b/tests/compiler/integers/i16/div.leo index 4526d19c6e..3cd78a3967 100644 --- a/tests/compiler/integers/i16/div.leo +++ b/tests/compiler/integers/i16/div.leo @@ -4,11 +4,14 @@ expectation: Pass inputs: - i16.in: | [main] - a: i16 = 6; - b: i16 = 3; + a: i16 = 4; + b: i16 = 2; c: i16 = 2; + + [registers] + r0: bool = true; */ -function main(a: i16, b: i16, c: i16) { - console.assert(a / b == c); -} \ No newline at end of file +function main(a: i16, b: i16, c: i16) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/i16/eq.leo b/tests/compiler/integers/i16/eq.leo index 5fabe04551..91980ee899 100644 --- a/tests/compiler/integers/i16/eq.leo +++ b/tests/compiler/integers/i16/eq.leo @@ -4,16 +4,14 @@ expectation: Pass inputs: - i16.in: | [main] - a: i16 = 3; - b: i16 = 3; + a: i16 = 2; + b: i16 = 2; c: bool = true; - - i16_false: | - [main] - a: i16 = 4; - b: i16 = 3; - c: bool = false; + + [registers] + r0: bool = true; */ -function main(a: i16, b: i16, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +function main(a: i16, b: i16, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/i16/ge.leo b/tests/compiler/integers/i16/ge.leo index 6946663e55..f9864e3183 100644 --- a/tests/compiler/integers/i16/ge.leo +++ b/tests/compiler/integers/i16/ge.leo @@ -2,18 +2,24 @@ namespace: Compile expectation: Pass inputs: - - i16.in: | + - i16_e.in: | [main] a: i16 = 4; b: i16 = 4; c: bool = true; - - i16_false: | + + [registers] + r0: bool = true; + - i16_g.in: | [main] - a: i16 = 3; - b: i16 = 6; - c: bool = false; + a: i16 = 5; + b: i16 = 4; + c: bool = true; + + [registers] + r0: bool = true; */ -function main(a: i16, b: i16, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +function main(a: i16, b: i16, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/i16/gt.leo b/tests/compiler/integers/i16/gt.leo index f0d31edde0..05959cf697 100644 --- a/tests/compiler/integers/i16/gt.leo +++ b/tests/compiler/integers/i16/gt.leo @@ -2,18 +2,24 @@ namespace: Compile expectation: Pass inputs: - - i16.in: | + - i16_g.in: | [main] a: i16 = 4; - b: i16 = 1; - c: bool = true; - - i16_false: | - [main] - a: i16 = 1; b: i16 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - i16_e.in: | + [main] + a: i16 = 4; + b: i16 = 4; c: bool = false; + + [registers] + r0: bool = false; */ -function main(a: i16, b: i16, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file +function main(a: i16, b: i16, c: bool) -> bool { + return a > b == c; +} diff --git a/tests/compiler/integers/i16/input.leo b/tests/compiler/integers/i16/input.leo deleted file mode 100644 index a912b48e27..0000000000 --- a/tests/compiler/integers/i16/input.leo +++ /dev/null @@ -1,13 +0,0 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - i16.in: | - [main] - a: i16 = 3; - b: i16 = 3; -*/ - -function main(a: i16, b: i16) { - console.assert(a == b); -} \ No newline at end of file diff --git a/tests/compiler/integers/i16/le.leo b/tests/compiler/integers/i16/le.leo index 56edaefd66..e6a5bb20e7 100644 --- a/tests/compiler/integers/i16/le.leo +++ b/tests/compiler/integers/i16/le.leo @@ -2,18 +2,24 @@ namespace: Compile expectation: Pass inputs: - - i16.in: | + - i16_l.in: | [main] - a: i16 = 3; - b: i16 = 3; + a: i16 = 1; + b: i16 = 100; c: bool = true; - - i16_false: | + + [registers] + r0: bool = true; + - i16_e.in: | [main] - a: i16 = 4; - b: i16 = 3; - c: bool = false; + a: i16 = 2; + b: i16 = 2; + c: bool = true; + + [registers] + r0: bool = true; */ -function main(a: i16, b: i16, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +function main(a: i16, b: i16, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/i16/lt.leo b/tests/compiler/integers/i16/lt.leo index 14195a74d6..93955f1e70 100644 --- a/tests/compiler/integers/i16/lt.leo +++ b/tests/compiler/integers/i16/lt.leo @@ -2,18 +2,24 @@ namespace: Compile expectation: Pass inputs: - - i16.in: | + - i16_l.in: | [main] - a: i16 = 1; - b: i16 = 5; + a: i16 = 2; + b: i16 = 4; c: bool = true; - - i16_false: | + + [registers] + r0: bool = false; + - i16_e.in: | [main] - a: i16 = 4; - b: i16 = 3; + a: i16 = 2; + b: i16 = 2; c: bool = false; + + [registers] + r0: bool = false; */ -function main(a: i16, b: i16, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +function main(a: i16, b: i16, c: bool) -> bool{ + return a < b == c; +} diff --git a/tests/compiler/integers/i16/mul.leo b/tests/compiler/integers/i16/mul.leo index 6fd19b703a..a5f551040d 100644 --- a/tests/compiler/integers/i16/mul.leo +++ b/tests/compiler/integers/i16/mul.leo @@ -1,3 +1,17 @@ -function main(a: i16, b: i16, c: i16) { - console.assert(a * b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 2; + b: i16 = 5; + c: i16 = 10; + + [registers] + r0: bool = false; +*/ + +function main(a: i16, b: i16, c: i16) -> bool { + return a * b == c; +} diff --git a/tests/compiler/integers/i16/ne.leo b/tests/compiler/integers/i16/ne.leo index f0a9472678..676bc78a0d 100644 --- a/tests/compiler/integers/i16/ne.leo +++ b/tests/compiler/integers/i16/ne.leo @@ -1,3 +1,25 @@ -function main(a: i16, b: i16, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i16_ne.in: | + [main] + a: i16 = 2; + b: i16 = 5; + c: bool = true; + + [registers] + r0: bool = false; + - i16_e.in: | + [main] + a: i16 = 5; + b: i16 = 5; + c: bool = false; + + [registers] + r0: bool = false; +*/ + +function main(a: i16, b: i16, c: bool) -> bool{ + return a != b == c; +} diff --git a/tests/compiler/integers/i16/negate.leo b/tests/compiler/integers/i16/negate.leo index 1d2644dce7..c7af1058e8 100644 --- a/tests/compiler/integers/i16/negate.leo +++ b/tests/compiler/integers/i16/negate.leo @@ -1,3 +1,23 @@ -function main(a: i16, b: i16) { - console.assert(-a == b); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 5; + b: i16 = -5; + + [registers] + r0: bool = false; + - i16.in: | + [main] + a: i16 = -5; + b: i16 = 5; + + [registers] + r0: bool = false; +*/ + +function main(a: i16, b: i16) -> bool { + return -a == b; +} diff --git a/tests/compiler/integers/i16/negate_min.leo b/tests/compiler/integers/i16/negate_min.leo index d52a356396..ebefa52864 100644 --- a/tests/compiler/integers/i16/negate_min.leo +++ b/tests/compiler/integers/i16/negate_min.leo @@ -1,4 +1,9 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { - const a = -32768i16; + const a = -128i16; const b = -a; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i16/negate_zero.leo b/tests/compiler/integers/i16/negate_zero.leo index 20f8a4fba7..1c1c9eef8b 100644 --- a/tests/compiler/integers/i16/negate_zero.leo +++ b/tests/compiler/integers/i16/negate_zero.leo @@ -1,5 +1,17 @@ -function main() { +/* +namespace: Compile +expectation: Pass +inputs: + - dummy.in: | + [main] + y: bool = true; + + [registers] + r0: bool = false; +*/ + +function main(y: bool) -> bool { const a = 0i16; - console.assert(-a == 0i16); -} \ No newline at end of file + return -a == 0i16 == y; +} diff --git a/tests/compiler/integers/i16/no_space_between_literal.leo b/tests/compiler/integers/i16/no_space_between_literal.leo index 96c6b2a914..d652810279 100644 --- a/tests/compiler/integers/i16/no_space_between_literal.leo +++ b/tests/compiler/integers/i16/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { - const i = 1 i16; -} \ No newline at end of file + const i = 1 i16; +} diff --git a/tests/compiler/integers/i16/pow.leo b/tests/compiler/integers/i16/pow.leo index 769d2d2fbb..eb23bb297c 100644 --- a/tests/compiler/integers/i16/pow.leo +++ b/tests/compiler/integers/i16/pow.leo @@ -1,3 +1,17 @@ -function main(a: i16, b: i16, c: i16) { - console.assert(a ** b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 2; + b: i16 = 2; + c: i16 = 4; + + [registers] + r0: bool = true; +*/ + +function main(a: i16, b: i16, c: i16) -> bool { + return a ** b == c; +} diff --git a/tests/compiler/integers/i16/sub.leo b/tests/compiler/integers/i16/sub.leo index e935935187..db6b3f1aab 100644 --- a/tests/compiler/integers/i16/sub.leo +++ b/tests/compiler/integers/i16/sub.leo @@ -1,3 +1,17 @@ -function main(a: i16, b: i16, c: i16) { - console.assert(a - b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + a: i16 = 100; + b: i16 = 50; + c: i16 = 50; + + [registers] + r0: bool = false; +*/ + +function main(a: i16, b: i16, c: i16) -> bool { + return a - b == c; +} diff --git a/tests/compiler/integers/i16/ternary.leo b/tests/compiler/integers/i16/ternary.leo index d66c73cb93..cf41885144 100644 --- a/tests/compiler/integers/i16/ternary.leo +++ b/tests/compiler/integers/i16/ternary.leo @@ -1,5 +1,29 @@ -function main(s: bool, a: i16, b: i16, c: i16) { - const r = s ? a : b; +/* +namespace: Compile +expectation: Pass +inputs: + - i16.in: | + [main] + s: bool = true; + a: i16 = 10; + b: i16 = 5; + c: i16 = 10; - console.assert(r == c); -} \ No newline at end of file + [registers] + r0: bool = false; + - i16_rev.in: | + [main] + s: bool = false; + a: i16 = 10; + b: i16 = 5; + c: i16 = 5; + + [registers] + r0: bool = false; +*/ + +function main(s: bool, a: i16, b: i16, c: i16) -> bool { + let r = s ? a : b; + + return r == c; +} diff --git a/tests/compiler/integers/i32/add.leo b/tests/compiler/integers/i32/add.leo index 3d8fb1b1d2..f824f1cf08 100644 --- a/tests/compiler/integers/i32/add.leo +++ b/tests/compiler/integers/i32/add.leo @@ -1,3 +1,17 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a + b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i32.in: | + [main] + a: i32 = 1; + b: i32 = 2; + c: i32 = 3; + + [registers] + r0: bool = true; +*/ + +function main(a: i32, b: i32, c: i32) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/i32/console_assert.leo b/tests/compiler/integers/i32/console_assert.leo index a2d6980e9a..6652c2926e 100644 --- a/tests/compiler/integers/i32/console_assert.leo +++ b/tests/compiler/integers/i32/console_assert.leo @@ -1,3 +1,13 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i32.in: | + [main] + a: i32 = 1; + b: i32 = 1; +*/ + function main(a: i32, b: i32) { console.assert(a == b); -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i32/div.leo b/tests/compiler/integers/i32/div.leo index 3189a354f0..2ad70c95f8 100644 --- a/tests/compiler/integers/i32/div.leo +++ b/tests/compiler/integers/i32/div.leo @@ -1,3 +1,17 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a / b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i32.in: | + [main] + a: i32 = 4; + b: i32 = 2; + c: i32 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: i32, b: i32, c: i32) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/i32/eq.leo b/tests/compiler/integers/i32/eq.leo index bac7af0be0..93453b81d6 100644 --- a/tests/compiler/integers/i32/eq.leo +++ b/tests/compiler/integers/i32/eq.leo @@ -1,3 +1,17 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i32.in: | + [main] + a: i32 = 2; + b: i32 = 2; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: i32, b: i32, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/i32/ge.leo b/tests/compiler/integers/i32/ge.leo index 362521fc82..39843f508e 100644 --- a/tests/compiler/integers/i32/ge.leo +++ b/tests/compiler/integers/i32/ge.leo @@ -1,3 +1,25 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i32_e.in: | + [main] + a: i32 = 4; + b: i32 = 4; + c: bool = true; + + [registers] + r0: bool = true; + - i32_g.in: | + [main] + a: i32 = 5; + b: i32 = 4; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: i32, b: i32, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/i32/gt.leo b/tests/compiler/integers/i32/gt.leo index 63ddcaa85c..c27c45b393 100644 --- a/tests/compiler/integers/i32/gt.leo +++ b/tests/compiler/integers/i32/gt.leo @@ -1,3 +1,25 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i32_g.in: | + [main] + a: i32 = 4; + b: i32 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - i32_e.in: | + [main] + a: i32 = 4; + b: i32 = 4; + c: bool = false; + + [registers] + r0: bool = false; +*/ + +function main(a: i32, b: i32, c: bool) -> bool { + return a > b == c; +} diff --git a/tests/compiler/integers/i32/input.leo b/tests/compiler/integers/i32/input.leo deleted file mode 100644 index a2d6980e9a..0000000000 --- a/tests/compiler/integers/i32/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32) { - console.assert(a == b); -} \ No newline at end of file diff --git a/tests/compiler/integers/i32/le.leo b/tests/compiler/integers/i32/le.leo index 948c66b1fc..4c3fd6b6e0 100644 --- a/tests/compiler/integers/i32/le.leo +++ b/tests/compiler/integers/i32/le.leo @@ -1,3 +1,25 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i32_l.in: | + [main] + a: i32 = 1; + b: i32 = 100; + c: bool = true; + + [registers] + r0: bool = true; + - i32_e.in: | + [main] + a: i32 = 2; + b: i32 = 2; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: i32, b: i32, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/i32/lt.leo b/tests/compiler/integers/i32/lt.leo index 72a8fb0d53..16a2e8383d 100644 --- a/tests/compiler/integers/i32/lt.leo +++ b/tests/compiler/integers/i32/lt.leo @@ -1,3 +1,25 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i32_l.in: | + [main] + a: i32 = 2; + b: i32 = 4; + c: bool = true; + + [registers] + r0: bool = false; + - i32_e.in: | + [main] + a: i32 = 2; + b: i32 = 2; + c: bool = false; + + [registers] + r0: bool = false; +*/ + +function main(a: i32, b: i32, c: bool) -> bool{ + return a < b == c; +} diff --git a/tests/compiler/integers/i32/max.leo b/tests/compiler/integers/i32/max.leo index 074c75f1a6..0fcc8bf4cb 100644 --- a/tests/compiler/integers/i32/max.leo +++ b/tests/compiler/integers/i32/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i32 = 2147483647; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i32/max_fail.leo b/tests/compiler/integers/i32/max_fail.leo index af2877ff5e..a3cd62c112 100644 --- a/tests/compiler/integers/i32/max_fail.leo +++ b/tests/compiler/integers/i32/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i32 = 2147483648; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i32/min.leo b/tests/compiler/integers/i32/min.leo index 8436268ce6..714262c52a 100644 --- a/tests/compiler/integers/i32/min.leo +++ b/tests/compiler/integers/i32/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i32 = -2147483648; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i32/min_fail.leo b/tests/compiler/integers/i32/min_fail.leo index 11a683b087..bed96206bd 100644 --- a/tests/compiler/integers/i32/min_fail.leo +++ b/tests/compiler/integers/i32/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i32 = -2147483649; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i32/mod.rs b/tests/compiler/integers/i32/mod.rs deleted file mode 100644 index b8a6925ac2..0000000000 --- a/tests/compiler/integers/i32/mod.rs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I32Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI32, - i32, - IntegerType::Signed(SignedIntegerType::I32Type(I32Type {})), - Int32 -); - -#[test] -fn test_i32_min() { - TestI32::test_min(); -} - -#[test] -fn test_i32_min_fail() { - TestI32::test_min_fail(); -} - -#[test] -fn test_i32_max() { - TestI32::test_max(); -} - -#[test] -fn test_i32_max_fail() { - TestI32::test_max_fail(); -} - -#[test] -fn test_i32_neg() { - TestI32::test_negate(); -} - -#[test] -fn test_i32_neg_max_fail() { - TestI32::test_negate_min_fail(); -} - -#[test] -fn test_i32_neg_zero() { - TestI32::test_negate_zero(); -} - -#[test] -fn test_i32_add() { - TestI32::test_add(); -} - -#[test] -fn test_i32_sub() { - TestI32::test_sub(); -} - -#[test] -fn test_i32_mul() { - TestI32::test_mul(); -} - -#[test] -fn test_i32_div() { - TestI32::test_div(); -} - -#[test] -fn test_i32_pow() { - TestI32::test_pow(); -} - -#[test] -fn test_i32_eq() { - TestI32::test_eq(); -} - -#[test] -fn test_i32_ne() { - TestI32::test_ne(); -} - -#[test] -fn test_i32_ge() { - TestI32::test_ge(); -} - -#[test] -fn test_i32_gt() { - TestI32::test_gt(); -} - -#[test] -fn test_i32_le() { - TestI32::test_le(); -} - -#[test] -fn test_i32_lt() { - TestI32::test_lt(); -} - -#[test] -fn test_i32_console_assert() { - TestI32::test_console_assert(); -} - -#[test] -fn test_i32_ternary() { - TestI32::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/i32/mul.leo b/tests/compiler/integers/i32/mul.leo index 50ba5b4128..ce66848f09 100644 --- a/tests/compiler/integers/i32/mul.leo +++ b/tests/compiler/integers/i32/mul.leo @@ -1,3 +1,17 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a * b == c); -} \ No newline at end of file +/* +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/tests/compiler/integers/i32/ne.leo b/tests/compiler/integers/i32/ne.leo index dcc1a185d1..60b30017af 100644 --- a/tests/compiler/integers/i32/ne.leo +++ b/tests/compiler/integers/i32/ne.leo @@ -1,3 +1,25 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +/* +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/tests/compiler/integers/i32/negate.leo b/tests/compiler/integers/i32/negate.leo index eef94c934f..2aee276336 100644 --- a/tests/compiler/integers/i32/negate.leo +++ b/tests/compiler/integers/i32/negate.leo @@ -1,3 +1,23 @@ -function main(a: i32, b: i32) { - console.assert(-a == b); -} \ No newline at end of file +/* +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/tests/compiler/integers/i32/negate_min.leo b/tests/compiler/integers/i32/negate_min.leo index a96455d57a..397ba6cebf 100644 --- a/tests/compiler/integers/i32/negate_min.leo +++ b/tests/compiler/integers/i32/negate_min.leo @@ -1,4 +1,9 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { - const a = -2147483648i32; + const a = -128i32; const b = -a; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i32/negate_zero.leo b/tests/compiler/integers/i32/negate_zero.leo index a3807b1f8a..0b224e64a1 100644 --- a/tests/compiler/integers/i32/negate_zero.leo +++ b/tests/compiler/integers/i32/negate_zero.leo @@ -1,5 +1,17 @@ -function main() { +/* +namespace: Compile +expectation: Pass +inputs: + - dummy.in: | + [main] + y: bool = true; + + [registers] + r0: bool = false; +*/ + +function main(y: bool) -> bool { const a = 0i32; - console.assert(-a == 0i32); -} \ No newline at end of file + return -a == 0i32 == y; +} diff --git a/tests/compiler/integers/i32/no_space_between_literal.leo b/tests/compiler/integers/i32/no_space_between_literal.leo index 845a7f403e..f3a03890d3 100644 --- a/tests/compiler/integers/i32/no_space_between_literal.leo +++ b/tests/compiler/integers/i32/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { - const i = 1 i32; -} \ No newline at end of file + const i = 1 i32; +} diff --git a/tests/compiler/integers/i32/pow.leo b/tests/compiler/integers/i32/pow.leo index ebb131e30b..2db0063b3d 100644 --- a/tests/compiler/integers/i32/pow.leo +++ b/tests/compiler/integers/i32/pow.leo @@ -1,3 +1,3 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a ** b == c); -} \ No newline at end of file +function main(a: i32, b: i32, c: i32) -> bool { + return a ** b == c; +} diff --git a/tests/compiler/integers/i32/sub.leo b/tests/compiler/integers/i32/sub.leo index 1f054a5ddf..cf554eba72 100644 --- a/tests/compiler/integers/i32/sub.leo +++ b/tests/compiler/integers/i32/sub.leo @@ -1,3 +1,17 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a - b == c); -} \ No newline at end of file +/* +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/tests/compiler/integers/i32/ternary.leo b/tests/compiler/integers/i32/ternary.leo index 790769d62f..bbbb2ac2db 100644 --- a/tests/compiler/integers/i32/ternary.leo +++ b/tests/compiler/integers/i32/ternary.leo @@ -1,5 +1,29 @@ -function main(s: bool, a: i32, b: i32, c: i32) { - const r = s ? a : b; +/* +namespace: Compile +expectation: Pass +inputs: + - i32.in: | + [main] + s: bool = true; + a: i32 = 10; + b: i32 = 5; + c: i32 = 10; - console.assert(r == c); -} \ No newline at end of file + [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/tests/compiler/integers/i64/add.leo b/tests/compiler/integers/i64/add.leo index aefdbb178f..beee775605 100644 --- a/tests/compiler/integers/i64/add.leo +++ b/tests/compiler/integers/i64/add.leo @@ -1,3 +1,17 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a + b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64.in: | + [main] + a: i64 = 1; + b: i64 = 2; + c: i64 = 3; + + [registers] + r0: bool = true; +*/ + +function main(a: i64, b: i64, c: i64) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/i64/console_assert.leo b/tests/compiler/integers/i64/console_assert.leo index ab9a5d6e91..16202ea112 100644 --- a/tests/compiler/integers/i64/console_assert.leo +++ b/tests/compiler/integers/i64/console_assert.leo @@ -1,3 +1,13 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - i64.in: | + [main] + a: i64 = 1; + b: i64 = 1; +*/ + function main(a: i64, b: i64) { console.assert(a == b); -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i64/div.leo b/tests/compiler/integers/i64/div.leo index 142e4ab801..a1d4c44fc9 100644 --- a/tests/compiler/integers/i64/div.leo +++ b/tests/compiler/integers/i64/div.leo @@ -1,3 +1,17 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a / b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64.in: | + [main] + a: i64 = 4; + b: i64 = 2; + c: i64 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: i64, b: i64, c: i64) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/i64/eq.leo b/tests/compiler/integers/i64/eq.leo index 86a234c834..5c8c13d794 100644 --- a/tests/compiler/integers/i64/eq.leo +++ b/tests/compiler/integers/i64/eq.leo @@ -1,3 +1,17 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64.in: | + [main] + a: i64 = 2; + b: i64 = 2; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: i64, b: i64, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/i64/ge.leo b/tests/compiler/integers/i64/ge.leo index e7b453c5dc..deb4e8aae6 100644 --- a/tests/compiler/integers/i64/ge.leo +++ b/tests/compiler/integers/i64/ge.leo @@ -1,3 +1,25 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64_e.in: | + [main] + a: i64 = 4; + b: i64 = 4; + c: bool = true; + + [registers] + r0: bool = true; + - i64_g.in: | + [main] + a: i64 = 5; + b: i64 = 4; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: i64, b: i64, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/i64/gt.leo b/tests/compiler/integers/i64/gt.leo index 9709bad012..e4c6f17db7 100644 --- a/tests/compiler/integers/i64/gt.leo +++ b/tests/compiler/integers/i64/gt.leo @@ -1,3 +1,25 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64_g.in: | + [main] + a: i64 = 4; + b: i64 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - i64_e.in: | + [main] + a: i64 = 4; + b: i64 = 4; + c: bool = false; + + [registers] + r0: bool = false; +*/ + +function main(a: i64, b: i64, c: bool) -> bool { + return a > b == c; +} diff --git a/tests/compiler/integers/i64/input.leo b/tests/compiler/integers/i64/input.leo deleted file mode 100644 index ab9a5d6e91..0000000000 --- a/tests/compiler/integers/i64/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64) { - console.assert(a == b); -} \ No newline at end of file diff --git a/tests/compiler/integers/i64/le.leo b/tests/compiler/integers/i64/le.leo index 3e2cfcb711..6906fc2672 100644 --- a/tests/compiler/integers/i64/le.leo +++ b/tests/compiler/integers/i64/le.leo @@ -1,3 +1,25 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64_l.in: | + [main] + a: i64 = 1; + b: i64 = 100; + c: bool = true; + + [registers] + r0: bool = true; + - i64_e.in: | + [main] + a: i64 = 2; + b: i64 = 2; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: i64, b: i64, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/i64/lt.leo b/tests/compiler/integers/i64/lt.leo index ef4e38eb76..9debb01ea5 100644 --- a/tests/compiler/integers/i64/lt.leo +++ b/tests/compiler/integers/i64/lt.leo @@ -1,3 +1,25 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64_l.in: | + [main] + a: i64 = 2; + b: i64 = 4; + c: bool = true; + + [registers] + r0: bool = false; + - i64_e.in: | + [main] + a: i64 = 2; + b: i64 = 2; + c: bool = false; + + [registers] + r0: bool = false; +*/ + +function main(a: i64, b: i64, c: bool) -> bool{ + return a < b == c; +} diff --git a/tests/compiler/integers/i64/max.leo b/tests/compiler/integers/i64/max.leo index 593f91e110..45187aa446 100644 --- a/tests/compiler/integers/i64/max.leo +++ b/tests/compiler/integers/i64/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i64 = 9223372036854775807; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i64/max_fail.leo b/tests/compiler/integers/i64/max_fail.leo index 362b794a2c..ca8157dd4e 100644 --- a/tests/compiler/integers/i64/max_fail.leo +++ b/tests/compiler/integers/i64/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i64 = 9223372036854775808; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i64/min.leo b/tests/compiler/integers/i64/min.leo index 794d8fbfac..975f2bd897 100644 --- a/tests/compiler/integers/i64/min.leo +++ b/tests/compiler/integers/i64/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: i64 = -9223372036854775808; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i64/min_fail.leo b/tests/compiler/integers/i64/min_fail.leo index bb260ecc3f..186aa74cdb 100644 --- a/tests/compiler/integers/i64/min_fail.leo +++ b/tests/compiler/integers/i64/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: i64 = -9223372036854775809; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i64/mod.rs b/tests/compiler/integers/i64/mod.rs deleted file mode 100644 index ccfb06ce68..0000000000 --- a/tests/compiler/integers/i64/mod.rs +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I64Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI64, - i64, - IntegerType::Signed(SignedIntegerType::I64Type(I64Type {})), - Int64 -); - -#[test] -fn test_i64_min() { - TestI64::test_min(); -} - -#[test] -fn test_i64_min_fail() { - TestI64::test_min_fail(); -} - -#[test] -fn test_i64_max() { - TestI64::test_max(); -} - -#[test] -fn test_i64_max_fail() { - TestI64::test_max_fail(); -} - -#[test] -fn test_i64_neg() { - TestI64::test_negate(); -} - -#[test] -fn test_i64_neg_max_fail() { - TestI64::test_negate_min_fail(); -} - -#[test] -fn test_i64_neg_zero() { - TestI64::test_negate_zero(); -} - -#[test] -fn test_i64_add() { - TestI64::test_add(); -} - -#[test] -fn test_i64_sub() { - TestI64::test_sub(); -} - -#[test] -fn test_i64_mul() { - TestI64::test_mul(); -} - -#[test] -#[ignore] // takes 2 minutes -fn test_i64_div() { - TestI64::test_div(); -} - -#[test] -fn test_i64_pow() { - TestI64::test_pow(); -} - -#[test] -fn test_i64_eq() { - TestI64::test_eq(); -} - -#[test] -fn test_i64_ne() { - TestI64::test_ne(); -} - -#[test] -fn test_i64_ge() { - TestI64::test_ge(); -} - -#[test] -fn test_i64_gt() { - TestI64::test_gt(); -} - -#[test] -fn test_i64_le() { - TestI64::test_le(); -} - -#[test] -fn test_i64_lt() { - TestI64::test_lt(); -} - -#[test] -fn test_i64_console_assert() { - TestI64::test_console_assert(); -} - -#[test] -fn test_i64_ternary() { - TestI64::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/i64/mul.leo b/tests/compiler/integers/i64/mul.leo index a3b8bd1da5..9338236078 100644 --- a/tests/compiler/integers/i64/mul.leo +++ b/tests/compiler/integers/i64/mul.leo @@ -1,3 +1,17 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a * b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64.in: | + [main] + a: i64 = 2; + b: i64 = 5; + c: i64 = 10; + + [registers] + r0: bool = false; +*/ + +function main(a: i64, b: i64, c: i64) -> bool { + return a * b == c; +} diff --git a/tests/compiler/integers/i64/ne.leo b/tests/compiler/integers/i64/ne.leo index a2642bb479..162ef26bea 100644 --- a/tests/compiler/integers/i64/ne.leo +++ b/tests/compiler/integers/i64/ne.leo @@ -1,3 +1,25 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64_ne.in: | + [main] + a: i64 = 2; + b: i64 = 5; + c: bool = true; + + [registers] + r0: bool = false; + - i64_e.in: | + [main] + a: i64 = 5; + b: i64 = 5; + c: bool = false; + + [registers] + r0: bool = false; +*/ + +function main(a: i64, b: i64, c: bool) -> bool{ + return a != b == c; +} diff --git a/tests/compiler/integers/i64/negate.leo b/tests/compiler/integers/i64/negate.leo index fe0cdc4d97..0353f579a7 100644 --- a/tests/compiler/integers/i64/negate.leo +++ b/tests/compiler/integers/i64/negate.leo @@ -1,3 +1,23 @@ -function main(a: i64, b: i64) { - console.assert(-a == b); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64.in: | + [main] + a: i64 = 5; + b: i64 = -5; + + [registers] + r0: bool = false; + - i64.in: | + [main] + a: i64 = -5; + b: i64 = 5; + + [registers] + r0: bool = false; +*/ + +function main(a: i64, b: i64) -> bool { + return -a == b; +} diff --git a/tests/compiler/integers/i64/negate_min.leo b/tests/compiler/integers/i64/negate_min.leo index daf694491b..b00ff7b98c 100644 --- a/tests/compiler/integers/i64/negate_min.leo +++ b/tests/compiler/integers/i64/negate_min.leo @@ -1,4 +1,9 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { - const a: i64 = -9223372036854775808; + const a = -128i64; const b = -a; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i64/negate_zero.leo b/tests/compiler/integers/i64/negate_zero.leo index 81f09c19a3..1af21e8f01 100644 --- a/tests/compiler/integers/i64/negate_zero.leo +++ b/tests/compiler/integers/i64/negate_zero.leo @@ -1,5 +1,17 @@ -function main() { +/* +namespace: Compile +expectation: Pass +inputs: + - dummy.in: | + [main] + y: bool = true; + + [registers] + r0: bool = false; +*/ + +function main(y: bool) -> bool { const a = 0i64; - console.assert(-a == 0i64); -} \ No newline at end of file + return -a == 0i64 == y; +} diff --git a/tests/compiler/integers/i64/no_space_between_literal.leo b/tests/compiler/integers/i64/no_space_between_literal.leo index 7fb6ea9e62..726b97f7fc 100644 --- a/tests/compiler/integers/i64/no_space_between_literal.leo +++ b/tests/compiler/integers/i64/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { - const i = 1 i64; -} \ No newline at end of file + const i = 1 i64; +} diff --git a/tests/compiler/integers/i64/pow.leo b/tests/compiler/integers/i64/pow.leo index dca2dace74..d0ee63b639 100644 --- a/tests/compiler/integers/i64/pow.leo +++ b/tests/compiler/integers/i64/pow.leo @@ -1,3 +1,3 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a ** b == c); -} \ No newline at end of file +function main(a: i64, b: i64) -> bool { + return a ** 4 == b; +} diff --git a/tests/compiler/integers/i64/sub.leo b/tests/compiler/integers/i64/sub.leo index 4d335e504b..7afe8e6c2e 100644 --- a/tests/compiler/integers/i64/sub.leo +++ b/tests/compiler/integers/i64/sub.leo @@ -1,3 +1,17 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a - b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - i64.in: | + [main] + a: i64 = 100; + b: i64 = 50; + c: i64 = 50; + + [registers] + r0: bool = false; +*/ + +function main(a: i64, b: i64, c: i64) -> bool { + return a - b == c; +} diff --git a/tests/compiler/integers/i64/ternary.leo b/tests/compiler/integers/i64/ternary.leo index df63b3ad6a..0e72e4ea24 100644 --- a/tests/compiler/integers/i64/ternary.leo +++ b/tests/compiler/integers/i64/ternary.leo @@ -1,5 +1,29 @@ -function main(s: bool, a: i64, b: i64, c: i64) { - const r = s ? a : b; +/* +namespace: Compile +expectation: Pass +inputs: + - i64.in: | + [main] + s: bool = true; + a: i64 = 10; + b: i64 = 5; + c: i64 = 10; - console.assert(r == c); -} \ No newline at end of file + [registers] + r0: bool = false; + - i64_rev.in: | + [main] + s: bool = false; + a: i64 = 10; + b: i64 = 5; + c: i64 = 5; + + [registers] + r0: bool = false; +*/ + +function main(s: bool, a: i64, b: i64, c: i64) -> bool { + let r = s ? a : b; + + return r == c; +} diff --git a/tests/compiler/integers/i8/add.leo b/tests/compiler/integers/i8/add.leo index e98daba07f..b14e877e39 100644 --- a/tests/compiler/integers/i8/add.leo +++ b/tests/compiler/integers/i8/add.leo @@ -7,8 +7,11 @@ inputs: a: i8 = 1; b: i8 = 2; c: i8 = 3; + + [registers] + r0: bool = true; */ -function main(a: i8, b: i8, c: i8) { - console.assert(a + b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: i8) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/i8/div.leo b/tests/compiler/integers/i8/div.leo index 801897199b..9c77d98cc2 100644 --- a/tests/compiler/integers/i8/div.leo +++ b/tests/compiler/integers/i8/div.leo @@ -7,8 +7,11 @@ inputs: a: i8 = 4; b: i8 = 2; c: i8 = 2; + + [registers] + r0: bool = true; */ -function main(a: i8, b: i8, c: i8) { - console.assert(a / b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: i8) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/i8/eq.leo b/tests/compiler/integers/i8/eq.leo index fb457b22f7..29a2e0492b 100644 --- a/tests/compiler/integers/i8/eq.leo +++ b/tests/compiler/integers/i8/eq.leo @@ -7,8 +7,11 @@ inputs: a: i8 = 2; b: i8 = 2; c: bool = true; + + [registers] + r0: bool = true; */ -function main(a: i8, b: i8, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/i8/ge.leo b/tests/compiler/integers/i8/ge.leo index 8311c497a8..9d34f0eaa3 100644 --- a/tests/compiler/integers/i8/ge.leo +++ b/tests/compiler/integers/i8/ge.leo @@ -2,13 +2,24 @@ namespace: Compile expectation: Pass inputs: - - i8.in: | + - i8_e.in: | [main] a: i8 = 4; b: i8 = 4; c: bool = true; + + [registers] + r0: bool = true; + - i8_g.in: | + [main] + a: i8 = 5; + b: i8 = 4; + c: bool = true; + + [registers] + r0: bool = true; */ -function main(a: i8, b: i8, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/i8/gt.leo b/tests/compiler/integers/i8/gt.leo index c9f02290c6..c37e2b4d9f 100644 --- a/tests/compiler/integers/i8/gt.leo +++ b/tests/compiler/integers/i8/gt.leo @@ -2,13 +2,24 @@ namespace: Compile expectation: Pass inputs: - - i8.in: | + - i8_g.in: | [main] a: i8 = 4; b: i8 = 2; c: bool = true; + + [registers] + r0: bool = true; + - i8_e.in: | + [main] + a: i8 = 4; + b: i8 = 4; + c: bool = false; + + [registers] + r0: bool = false; */ -function main(a: i8, b: i8, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: bool) -> bool { + return a > b == c; +} diff --git a/tests/compiler/integers/i8/inputs/abc_bool.in b/tests/compiler/integers/i8/inputs/abc_bool.in deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/compiler/integers/i8/inputs/abc_int.in b/tests/compiler/integers/i8/inputs/abc_int.in deleted file mode 100644 index 77660df494..0000000000 --- a/tests/compiler/integers/i8/inputs/abc_int.in +++ /dev/null @@ -1,4 +0,0 @@ -[main] -a: i8 = 1; -b: i8 = 2; -c: bool = true; \ No newline at end of file diff --git a/tests/compiler/integers/i8/le.leo b/tests/compiler/integers/i8/le.leo index a95914cb18..d8b79df2d9 100644 --- a/tests/compiler/integers/i8/le.leo +++ b/tests/compiler/integers/i8/le.leo @@ -2,13 +2,24 @@ namespace: Compile expectation: Pass inputs: - - i8.in: | + - i8_l.in: | + [main] + a: i8 = 1; + b: i8 = 100; + c: bool = true; + + [registers] + r0: bool = true; + - i8_e.in: | [main] a: i8 = 2; b: i8 = 2; c: bool = true; + + [registers] + r0: bool = true; */ -function main(a: i8, b: i8, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/i8/lt.leo b/tests/compiler/integers/i8/lt.leo index 49aa80ee9c..8e21f5634c 100644 --- a/tests/compiler/integers/i8/lt.leo +++ b/tests/compiler/integers/i8/lt.leo @@ -2,13 +2,24 @@ namespace: Compile expectation: Pass inputs: - - i8.in: | + - i8_l.in: | [main] a: i8 = 2; b: i8 = 4; c: bool = true; + + [registers] + r0: bool = false; + - i8_e.in: | + [main] + a: i8 = 2; + b: i8 = 2; + c: bool = false; + + [registers] + r0: bool = false; */ -function main(a: i8, b: i8, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: bool) -> bool{ + return a < b == c; +} diff --git a/tests/compiler/integers/i8/mul.leo b/tests/compiler/integers/i8/mul.leo index aa01cac3df..0cbbc85bfb 100644 --- a/tests/compiler/integers/i8/mul.leo +++ b/tests/compiler/integers/i8/mul.leo @@ -7,8 +7,11 @@ inputs: a: i8 = 2; b: i8 = 5; c: i8 = 10; + + [registers] + r0: bool = false; */ -function main(a: i8, b: i8, c: i8) { - console.assert(a * b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: i8) -> bool { + return a * b == c; +} diff --git a/tests/compiler/integers/i8/ne.leo b/tests/compiler/integers/i8/ne.leo index 27805d113f..8f6349ace2 100644 --- a/tests/compiler/integers/i8/ne.leo +++ b/tests/compiler/integers/i8/ne.leo @@ -2,13 +2,24 @@ namespace: Compile expectation: Pass inputs: - - i8.in: | + - i8_ne.in: | [main] a: i8 = 2; b: i8 = 5; c: bool = true; + + [registers] + r0: bool = false; + - i8_e.in: | + [main] + a: i8 = 5; + b: i8 = 5; + c: bool = false; + + [registers] + r0: bool = false; */ -function main(a: i8, b: i8, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: bool) -> bool{ + return a != b == c; +} diff --git a/tests/compiler/integers/i8/negate.leo b/tests/compiler/integers/i8/negate.leo index 25b0c38b12..1811fa650b 100644 --- a/tests/compiler/integers/i8/negate.leo +++ b/tests/compiler/integers/i8/negate.leo @@ -6,8 +6,18 @@ inputs: [main] a: i8 = 5; b: i8 = -5; + + [registers] + r0: bool = false; + - i8.in: | + [main] + a: i8 = -5; + b: i8 = 5; + + [registers] + r0: bool = false; */ -function main(a: i8, b: i8) { - console.assert(-a == b); -} \ No newline at end of file +function main(a: i8, b: i8) -> bool { + return -a == b; +} diff --git a/tests/compiler/integers/i8/negate_min.leo b/tests/compiler/integers/i8/negate_min.leo index e6a7ff1417..5ec07974bd 100644 --- a/tests/compiler/integers/i8/negate_min.leo +++ b/tests/compiler/integers/i8/negate_min.leo @@ -6,4 +6,4 @@ expectation: Fail function main() { const a = -128i8; const b = -a; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/i8/negate_zero.leo b/tests/compiler/integers/i8/negate_zero.leo index f4f6d38592..a115c2cb09 100644 --- a/tests/compiler/integers/i8/negate_zero.leo +++ b/tests/compiler/integers/i8/negate_zero.leo @@ -1,10 +1,17 @@ /* namespace: Compile expectation: Pass +inputs: + - dummy.in: | + [main] + y: bool = true; + + [registers] + r0: bool = false; */ -function main() { +function main(y: bool) -> bool { const a = 0i8; - console.assert(-a == 0i8); -} \ No newline at end of file + return -a == 0i8 == y; +} diff --git a/tests/compiler/integers/i8/no_space_between_literal.leo b/tests/compiler/integers/i8/no_space_between_literal.leo index 333cdbbf59..b069c9e5fc 100644 --- a/tests/compiler/integers/i8/no_space_between_literal.leo +++ b/tests/compiler/integers/i8/no_space_between_literal.leo @@ -4,5 +4,5 @@ expectation: Fail */ function main() { - const i = 1 i8; -} \ No newline at end of file + const i = 1 i8; +} diff --git a/tests/compiler/integers/i8/pow.leo b/tests/compiler/integers/i8/pow.leo index 7b65f691e4..b78c650f6a 100644 --- a/tests/compiler/integers/i8/pow.leo +++ b/tests/compiler/integers/i8/pow.leo @@ -7,8 +7,11 @@ inputs: a: i8 = 2; b: i8 = 2; c: i8 = 4; + + [registers] + r0: bool = true; */ -function main(a: i8, b: i8, c: i8) { - console.assert(a ** b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: i8) -> bool { + return a ** b == c; +} diff --git a/tests/compiler/integers/i8/sub.leo b/tests/compiler/integers/i8/sub.leo index 2e2de982fa..1d8f879391 100644 --- a/tests/compiler/integers/i8/sub.leo +++ b/tests/compiler/integers/i8/sub.leo @@ -7,8 +7,11 @@ inputs: a: i8 = 100; b: i8 = 50; c: i8 = 50; + + [registers] + r0: bool = false; */ -function main(a: i8, b: i8, c: i8) { - console.assert(a - b == c); -} \ No newline at end of file +function main(a: i8, b: i8, c: i8) -> bool { + return a - b == c; +} diff --git a/tests/compiler/integers/i8/ternary.leo b/tests/compiler/integers/i8/ternary.leo index 6198977451..24015584e8 100644 --- a/tests/compiler/integers/i8/ternary.leo +++ b/tests/compiler/integers/i8/ternary.leo @@ -8,16 +8,22 @@ inputs: a: i8 = 10; b: i8 = 5; c: i8 = 10; + + [registers] + r0: bool = false; - i8_rev.in: | [main] s: bool = false; a: i8 = 10; b: i8 = 5; c: i8 = 5; + + [registers] + r0: bool = false; */ -function main(s: bool, a: i8, b: i8, c: i8) { +function main(s: bool, a: i8, b: i8, c: i8) -> bool { let r = s ? a : b; - console.assert(r == c); + return r == c; } diff --git a/tests/expectations/compiler/compiler/integers/i128/add.leo.out b/tests/expectations/compiler/compiler/integers/i128/add.leo.out new file mode 100644 index 0000000000..49b7bfc6b0 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/add.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1404 + num_constraints: 1405 + at: 1de369da9f4704c5dfe4d6b415ef81ab0a16e02ccb89af770ab9083526d9db94 + bt: 7d12a27b02e7c965ac1775f6711d6da181ea2a809f8bf644ab1755929013f7e4 + ct: e7b4e2f5a4e98c3a9016990ee3dd9bbf5e55e7a98e1dc3ac7d4b458ecdcdde7e + output: + - input_file: i128.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out new file mode 100644 index 0000000000..372413218b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/console_assert.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 511 + num_constraints: 511 + at: 7dcc86d79e1657a96155485d8aac78bca5392b8376b33faae47dfc973b4e810d + bt: 7ac37b347f82644239128aa66e9caf34375b1fd860069659581477883d92fb7a + ct: 3e4c7833e73f9ee37e42c796e8af7a6d417a012b776b348abedbfd317110858d + output: + - input_file: i128.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i128/div.leo.out b/tests/expectations/compiler/compiler/integers/i128/div.leo.out new file mode 100644 index 0000000000..99f74135e4 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/div.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 506500 + num_constraints: 556546 + at: 276ce56b48a5db9e546f468d1360d00b27728dc93b8632fd78a88db9efbfe1f8 + bt: b9699f707750827fa2663e2e2c6ef82c786ed4c74556e3bed076d78eb1a896b1 + ct: 9fe6835b23ef949becddbd4ec16c3fc389c72ee929e57a82a3336848e077758e + output: + - input_file: i128.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/eq.leo.out b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out new file mode 100644 index 0000000000..68b92e7594 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/eq.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 513 + num_constraints: 513 + at: 1394ad70170ddf61787d75c37b0438dc380e73ed0570a0755e1ea121261f084b + bt: c1e085f0d8047bc5b5f574ca9de7d79a0ce3b3235e3bfb83ff15aecf05ad1323 + ct: c224fec21cf5a2b24eb94033a20aeb4729d3d0cf596339145cb49ea6a44cc5d8 + output: + - input_file: i128.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/ge.leo.out b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out new file mode 100644 index 0000000000..0c2d7e0c33 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/ge.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 897 + num_constraints: 897 + at: 05d7005b5fdaa7c459327b4c1d09041dcc226aaff499ee3885883ae499a450de + bt: bf4203445221fa42994f563865391d625b571513cf25a20cf465fbe26647ec5d + ct: 8d7309bdb692a71de6c9efc246984ce389534e8fc31222a94d5217720c2d20e9 + output: + - input_file: i128_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i128_g.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/gt.leo.out b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out new file mode 100644 index 0000000000..b5cd2595b4 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/gt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 897 + num_constraints: 897 + at: dc1301c93c3e7eff4464797dae66c49012deb970199561074fa23c7a0d8aeab3 + bt: 7734cf8efdd437cd881763da604d9524fca91092bda9b6fc677ff9c30fa4b3c7 + ct: 8d7309bdb692a71de6c9efc246984ce389534e8fc31222a94d5217720c2d20e9 + output: + - input_file: i128_g.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i128_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/le.leo.out b/tests/expectations/compiler/compiler/integers/i128/le.leo.out new file mode 100644 index 0000000000..fa96b6c429 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/le.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 897 + num_constraints: 897 + at: 8bee805269694137605d1f95f7824ed777f516e048d69e70e83236ee01c2ec03 + bt: 78d5b43e2c7d048af797f16a430d0ce5b99f8305fb1dbd0c7a0a6f36cbd6b046 + ct: 8d7309bdb692a71de6c9efc246984ce389534e8fc31222a94d5217720c2d20e9 + output: + - input_file: i128_l.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i128_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/lt.leo.out b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out new file mode 100644 index 0000000000..5cf413f4e8 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/lt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 897 + num_constraints: 897 + at: 57c1d9c06091b82189025923173d4cdc95c8e8f741979d2a9102ff55d8d507a2 + bt: 9a46d23879218b3aa9d5b6575fc677aca1f7470b3b4e623a26f410a38200661b + ct: 8d7309bdb692a71de6c9efc246984ce389534e8fc31222a94d5217720c2d20e9 + output: + - input_file: i128_l.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i128_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/max.leo.out b/tests/expectations/compiler/compiler/integers/i128/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..be534c6877 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i128/max_fail.leo:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '170141183460469231731687303715884105728'" diff --git a/tests/expectations/compiler/compiler/integers/i128/min.leo.out b/tests/expectations/compiler/compiler/integers/i128/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..5c5b33430b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i128/min_fail.leo:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-170141183460469231731687303715884105729'" diff --git a/tests/expectations/compiler/compiler/integers/i128/mul.leo.out b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out new file mode 100644 index 0000000000..f5c3853ed8 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/mul.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 393216 + num_constraints: 393217 + at: e58d2cc579cdf111ac8fa1552f20b2c11c11aeaa9a9f0e009b1254b6369cd1a3 + bt: 2d0600e403e694d114c452c3e5c1ad2137e48b5344b3760dbec2e826420b8a9e + ct: 76b519a48f8267fa180bc68f3e7a84fe7319a3ad2e76338916cb399d9cea22d8 + output: + - input_file: i128.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/ne.leo.out b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out new file mode 100644 index 0000000000..1f6503884c --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/ne.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 513 + num_constraints: 513 + at: 48bbe0018b41afb2e67252317f5b9562174680891247b191932e8c9ddfac6235 + bt: edc1de9388a8bb2c659c9b4e9deecd8406826abcfe220d295bf7d85a550c0c43 + ct: c224fec21cf5a2b24eb94033a20aeb4729d3d0cf596339145cb49ea6a44cc5d8 + output: + - input_file: i128_ne.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i128_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/negate.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out new file mode 100644 index 0000000000..0c46139a17 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/negate.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 765 + num_constraints: 765 + at: 98dd464444c8062f02a0911a1ddea0094fd3ebd3506ca2676979105087fe7397 + bt: f1167d856668e1efcd49f020430a704e62ad6e46006e7faf58acdac8bb8a5ba2 + ct: 075f6359a5dd933b671b42c06465f4c70f5ec152176c234fb4d3cdfbe6255daf + output: + - input_file: i128.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i128.in + output: + registers: + r0: + type: bool + value: "true" 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..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out new file mode 100644 index 0000000000..6cc283900b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/negate_zero.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out new file mode 100644 index 0000000000..82beb9beae --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i128/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i128;\n | ^\n |\n = Unexpected white space between terms 1 and i128" diff --git a/tests/expectations/compiler/compiler/integers/i128/sub.leo.out b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out new file mode 100644 index 0000000000..572723a921 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/sub.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1658 + num_constraints: 1659 + at: 6b875cb06d16a700f8d1b42d2c49142252ad34cf6d54f08ea232a0fe525d9085 + bt: 859297637693ebdf41005288cf212906c1d7619049b4305d34d9dededb24b5c5 + ct: 97ce4bbb07278639ab86e5665c47e13e1156e2f338bc0048937eccb87f48e4b1 + output: + - input_file: i128.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out new file mode 100644 index 0000000000..267004ef1d --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i128/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 896 + num_constraints: 1024 + at: 2ba7f5e796779d99922e1b044ce5614b7e35945ff743c2b54412f00570bb935f + bt: 1fb9bfc22c01a54c08602e7f3883c19b00de1070aa9bad9e9234e322f9043711 + ct: ee9facabe4c76f5eb89984d3c5cb15f92eaa0cc3b4bc4fdff261aeb36ad0101b + output: + - input_file: i128.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i128_rev.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/add.leo.out b/tests/expectations/compiler/compiler/integers/i16/add.leo.out index 2f277eb56e..896131009c 100644 --- a/tests/expectations/compiler/compiler/integers/i16/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/add.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: i16.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/div.leo.out b/tests/expectations/compiler/compiler/integers/i16/div.leo.out index 5e93941061..671fdc3437 100644 --- a/tests/expectations/compiler/compiler/integers/i16/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/div.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: i16.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out index 928bfb9a09..01ff8a54ab 100644 --- a/tests/expectations/compiler/compiler/integers/i16/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/eq.leo.out @@ -12,7 +12,7 @@ outputs: output: - input_file: i16.in output: - registers: {} - - input_file: i16_false - output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out index e726ead169..90c6e6b3ce 100644 --- a/tests/expectations/compiler/compiler/integers/i16/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/ge.leo.out @@ -10,9 +10,15 @@ outputs: bt: dc20f75204b1fb858e1971441f24a4aa1780e545581c55ff3d52cec41be65b79 ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 output: - - input_file: i16.in + - input_file: i16_e.in output: - registers: {} - - input_file: i16_false + registers: + r0: + type: bool + value: "true" + - input_file: i16_g.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out index 786a7cbde1..6c2d0d5ae2 100644 --- a/tests/expectations/compiler/compiler/integers/i16/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/gt.leo.out @@ -10,9 +10,15 @@ outputs: bt: 07da85fcfccc58758d043e27b0aab5a749760c644824684c13befde258deb78c ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 output: - - input_file: i16.in + - input_file: i16_g.in output: - registers: {} - - input_file: i16_false + registers: + r0: + type: bool + value: "true" + - input_file: i16_e.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/input.leo.out b/tests/expectations/compiler/compiler/integers/i16/input.leo.out deleted file mode 100644 index 90b869d10b..0000000000 --- a/tests/expectations/compiler/compiler/integers/i16/input.leo.out +++ /dev/null @@ -1,15 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 63 - num_constraints: 63 - at: 4cac6455a624606970ebe776412ee9b9d5800577aea1fad0677b866e991b6181 - bt: abee7b67c55170fc3341444203a9a70e68690dce751aa36d3e91f1cf7ceef73d - ct: 51c18ee4216feeb01d0b0d661dfeb294e7e100873586edf79be89c8b54d9e168 - output: - - input_file: i16.in - output: - registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/le.leo.out b/tests/expectations/compiler/compiler/integers/i16/le.leo.out index bb748be517..84fde78444 100644 --- a/tests/expectations/compiler/compiler/integers/i16/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/le.leo.out @@ -10,9 +10,15 @@ outputs: bt: 34c1c5f1fd258fc5f18137e0cd367a6c3149958ec8b92123518e293db31afbe3 ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 output: - - input_file: i16.in + - input_file: i16_l.in output: - registers: {} - - input_file: i16_false + registers: + r0: + type: bool + value: "true" + - input_file: i16_e.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out index af932fab79..01b3aee5c8 100644 --- a/tests/expectations/compiler/compiler/integers/i16/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/lt.leo.out @@ -10,9 +10,15 @@ outputs: bt: 564588048812d9300963caf70148f154c231faa3209aed2ee5f9dd51a31af0ef ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 output: - - input_file: i16.in + - input_file: i16_l.in output: - registers: {} - - input_file: i16_false + registers: + r0: + type: bool + value: "true" + - input_file: i16_e.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/mul.leo.out b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out new file mode 100644 index 0000000000..3f53ee42ec --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/mul.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 6144 + num_constraints: 6145 + at: e0ac196102c7e3dab5f8b99377bd64bdafc963706644e45cccf0e9e008d80654 + bt: cd23bca179b84ca9238460e8de4ec0c0afdc0ce1e3d6669329fc4baf08e7e0db + ct: f60e073d0353b71ab07769daa585ce03799bb2f4095a0dda5f9009b4f42162ed + output: + - input_file: i16.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/ne.leo.out b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out new file mode 100644 index 0000000000..b7caefe5d7 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/ne.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 65 + num_constraints: 65 + at: 0fdea959dac884336ecafa3d6ae5bb268aaefacd91e099a206f2974681d6a0a8 + bt: 30bc7cfbc53a2e928ca0310b6041f1f1548ad7c1197ffc9301b46522122e5561 + ct: f037d279ccea3ca689e05801ec3ba0053b5ce66a1763d4620262ea9b69873008 + output: + - input_file: i16_ne.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i16_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/negate.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out new file mode 100644 index 0000000000..9130c2bf99 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/negate.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 93 + num_constraints: 93 + at: 3f12aea0b23980da83e9b76f0f59c727d5ced82bd09ac8bcf9b26537b42bcbda + bt: 9bba1722080b8c396e72a645c5ca7dff2943c0b29a741569acdba3887e40c8af + ct: 4f89ea4838bc4544e2767b7dc68a1e0fa0649d7401bb7ae8292bd6aa654eda28 + output: + - input_file: i16.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i16.in + output: + registers: + r0: + type: bool + value: "true" 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..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out new file mode 100644 index 0000000000..6cc283900b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/negate_zero.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out new file mode 100644 index 0000000000..e2b2f4b963 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i16/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i16;\n | ^\n |\n = Unexpected white space between terms 1 and i16" diff --git a/tests/expectations/compiler/compiler/integers/i16/pow.leo.out b/tests/expectations/compiler/compiler/integers/i16/pow.leo.out new file mode 100644 index 0000000000..cbd7679c80 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/pow.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 194687 + num_constraints: 194975 + at: 6fbacc0d7dabcccfa86d6925e45ca29c14c4e48426268e433c759b80e4851436 + bt: eff82086d6011254c096316b39532b79c6cc45607db3f7b237f8b9af7e8e2ad4 + ct: 153a20350a404865df65fd2a2eb9f721db89fe0f1d0321eba0c1864f60813b6b + output: + - input_file: i16.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/sub.leo.out b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out new file mode 100644 index 0000000000..c9a6026849 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/sub.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 202 + num_constraints: 203 + at: e2596c361eae975f6e49b22e11f1776fb711d2b9e6a69041b230ebb3d9561a5e + bt: 035e3e8f741942f4683b2262c8f0fc75c0c5a89252c069ed956abce34019b988 + ct: 4d408b4df7a360a52a36a57c13e15711470bb854d599278e72f31cae00ddb347 + output: + - input_file: i16.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out new file mode 100644 index 0000000000..92a5715acf --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i16/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 112 + num_constraints: 128 + at: 58c61c468b93481b5691b278622e567b5a718e6411cce53fdbe46e2839bdf8c3 + bt: 0e5faacb5d80488eeda9e7fa79ddd96e54c010e0e98571449f79cad816cc18a2 + ct: 2b3428d7c7335edc32ab219fe11c92e215d70a52c89434de349f4951561d5795 + output: + - input_file: i16.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i16_rev.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/add.leo.out b/tests/expectations/compiler/compiler/integers/i32/add.leo.out new file mode 100644 index 0000000000..1f62a44046 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/add.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 348 + num_constraints: 349 + at: 623759513f511047731696dc641970503b3a71642eaf04c325203156d8ffb600 + bt: 8dd304125c8178327f11b0894be2788080258a5a80aab3c1df046fea9f262789 + ct: 8b73986e71edfc8b716f535eaa069b04cc15502adbd166ae713df42cb9d37a3c + output: + - input_file: i32.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out new file mode 100644 index 0000000000..cfc199d978 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/console_assert.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 127 + num_constraints: 127 + at: e0e639bf48906da80759e2f98e3205a68a63ae175dcd7c198fe3bf6b1650a84e + bt: 6b92443726163ac0fc32f7c9edace0ec8369e793d24105d93d121cb0bd5c3128 + ct: 7cb2d3f0ccfb9a2e747c6a05bdb52812c4539c836ff62c4e555fac13ef2084d4 + output: + - input_file: i32.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i32/div.leo.out b/tests/expectations/compiler/compiler/integers/i32/div.leo.out new file mode 100644 index 0000000000..b3702306ae --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/div.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 31396 + num_constraints: 34690 + at: da21ab443f5a626be92c61f68a650ce70f13aebfe7e7f385490af4d8ff812311 + bt: 2b765f5660bc847af13d6361ed89fbc296cfa094fd80972604f1745259c14289 + ct: 037b7ecfb3a4477858f5587ac9671bc32d664e4ca55d311f1c77502f58321c85 + output: + - input_file: i32.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/eq.leo.out b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out new file mode 100644 index 0000000000..083968257f --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/eq.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 129 + num_constraints: 129 + at: 669271745b6c4fd803216e0e59f47da168d7e5bb9f7058232265a79c62f67696 + bt: e63628fc48d1e71ea44830c010e442f577239e29f7ffada0d8df34c28e67f107 + ct: 9f4c72431c0c7c03e216195a071c971c53deed8e3bfce450bffb3a6fad7418d5 + output: + - input_file: i32.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/ge.leo.out b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out new file mode 100644 index 0000000000..d6c74bd2dd --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/ge.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 225 + num_constraints: 225 + at: 56b3865e8aa1bfe3069fca36232a122eaa9430c642d17cfd2a51e07abe948ead + bt: 3f23038cdf71876dea48b44b9cae993b3f649b628bcdaf6f1cb77bbafa92b600 + ct: d7067f500143a40e015fd1f4447a4ea5b9ee6ebdf007e08be51772a8a2b672c3 + output: + - input_file: i32_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i32_g.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/gt.leo.out b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out new file mode 100644 index 0000000000..3b7a4bebcc --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/gt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 225 + num_constraints: 225 + at: 5d29f27de2cc29c473be77bf193ab76c81325cf7379c8cb128f529dd2f8f2b75 + bt: 02fd44d092923c1a89fc492a9660926934e03005d8c3fa5f42ae2a3fbd7048ea + ct: d7067f500143a40e015fd1f4447a4ea5b9ee6ebdf007e08be51772a8a2b672c3 + output: + - input_file: i32_g.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i32_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/le.leo.out b/tests/expectations/compiler/compiler/integers/i32/le.leo.out new file mode 100644 index 0000000000..c6466a908d --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/le.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 225 + num_constraints: 225 + at: 0e304c1ff4b2d054a884efec2b672faeb96edc095eb9092b1afe8161500dc7cd + bt: 4e75a3c5fd91239e6bf32d96c6a4a702e040e4a3bddcc282706ca76facb9e942 + ct: d7067f500143a40e015fd1f4447a4ea5b9ee6ebdf007e08be51772a8a2b672c3 + output: + - input_file: i32_l.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i32_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/lt.leo.out b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out new file mode 100644 index 0000000000..2621cc3f0e --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/lt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 225 + num_constraints: 225 + at: ab78d207fa52f7931c697b9d6999ef4d6adde046baf32c1a85a90dbfd24f1cd1 + bt: 26e3dae4bf8fe37424b8ef7cc60b6136809286a8e64736e63b8b5dfacf774c21 + ct: d7067f500143a40e015fd1f4447a4ea5b9ee6ebdf007e08be51772a8a2b672c3 + output: + - input_file: i32_l.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i32_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/max.leo.out b/tests/expectations/compiler/compiler/integers/i32/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..fd3f1d2a11 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i32/max_fail.leo:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^\n |\n = failed to parse int value '2147483648'" diff --git a/tests/expectations/compiler/compiler/integers/i32/min.leo.out b/tests/expectations/compiler/compiler/integers/i32/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..f0eddf0f33 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i32/min_fail.leo:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^\n |\n = failed to parse int value '-2147483649'" diff --git a/tests/expectations/compiler/compiler/integers/i32/mul.leo.out b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out new file mode 100644 index 0000000000..0048fe059b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/mul.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 24576 + num_constraints: 24577 + at: fb4e2b915ecfd8fe94bb73daaa80c1b2ad75c155ecf96250fbe020cec4fb2bd9 + bt: fc2efd0d73e1d0feb345c15515e796fcd289003e5e388d35be464e3ee76a0cb5 + ct: f720f62a8a58bc4a64c837cfad115c98d50ccfe3b208fb9fa346c5c17ff7ded4 + output: + - input_file: i32.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/ne.leo.out b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out new file mode 100644 index 0000000000..caaebdb04c --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/ne.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 129 + num_constraints: 129 + at: 4886c2b717c624374dad0a9b657c2081663a6eb235c10b386bcaf117c0fdb004 + bt: 1178e67ab79eac96592f17313168c4300d53e89ab571025054d53d19dfdfd1b8 + ct: 9f4c72431c0c7c03e216195a071c971c53deed8e3bfce450bffb3a6fad7418d5 + output: + - input_file: i32_ne.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i32_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/negate.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out new file mode 100644 index 0000000000..cc3c0ca72f --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/negate.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 189 + num_constraints: 189 + at: 1f06616d7ab0f9397c33e23191bf4bcda843096a327c797c3149139ac7ad9e08 + bt: 244d201ae16e93cdd97ca56d698598a5a66e1bcb2794d58b5e24f6f9df9760a4 + ct: 1607b4ad7556c35957a6cbce85868f0f82d2c65e55f13350ef81738caec6e235 + output: + - input_file: i32.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i32.in + output: + registers: + r0: + type: bool + value: "true" 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..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out new file mode 100644 index 0000000000..6cc283900b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/negate_zero.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out new file mode 100644 index 0000000000..bfff55cb4d --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i32/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i32;\n | ^\n |\n = Unexpected white space between terms 1 and i32" diff --git a/tests/expectations/compiler/compiler/integers/i32/sub.leo.out b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out new file mode 100644 index 0000000000..d9b9a605ca --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/sub.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 410 + num_constraints: 411 + at: 7e15d23fe1f99f56b446ff52d2998286e031c68d26a3308ddfe6caf3271b9e31 + bt: c342f65da421c48d402ba324062abbb064eb525a99fe5379fcb1654a33a11d68 + ct: f9165fc0dbff251907271ea7256f90598d12e2dea3afdd1293099a08e9922fe6 + output: + - input_file: i32.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out new file mode 100644 index 0000000000..f76a22cd84 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i32/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 224 + num_constraints: 256 + at: 9338a0dd9e836893acff2938b8ad85ab3255dd2f189dd4f2bc00fef2d38c073d + bt: 35d9c47cfd4fc137760d0ee411c0b097541cab7aae2b0a9ea83b368328fe5c23 + ct: 032da4c7df957d9ca89b5395be6e1c84cab7d19a78abe1b02bb37b26ca65b0e4 + output: + - input_file: i32.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i32_rev.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/add.leo.out b/tests/expectations/compiler/compiler/integers/i64/add.leo.out new file mode 100644 index 0000000000..d727a96316 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/add.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 700 + num_constraints: 701 + at: 2d074af82e5f1955746fb3ab5dde050a622ac0d1f55f76a97eee76419aaaebc2 + bt: dbea824d3f892b3f86e08d05b68eecdc0de998bcd12186475d90ede9dfc5dfd8 + ct: 8bc1636c45d8da73bfa0c5a71972d9829c9954007eff5db6f8fa4672d5b57c4f + output: + - input_file: i64.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out new file mode 100644 index 0000000000..fc374c4cad --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/console_assert.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 255 + num_constraints: 255 + at: 085ed7b795cfdd2b367e0714e4f7c75cd84b99895bc7597ffc3134ab4b4fb47a + bt: 2c1d031e57e285b1277f2c37853fc7fdff23711e1147d7b26ed74d3acd28ceff + ct: 0b136215b60005ed17aa4eea76bc4e2b0349c0fecf57dc06f5dba31981f270d0 + output: + - input_file: i64.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i64/div.leo.out b/tests/expectations/compiler/compiler/integers/i64/div.leo.out new file mode 100644 index 0000000000..a449d85ac9 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/div.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 126276 + num_constraints: 139010 + at: 08ca67f8f6a55a97c98376e47bdc55730ebf02eea500e26f3d21d8fcbd01eed8 + bt: 2a2b1dfbe635b61460fcba331f7383edd70f065881804500e5c4068771b1b040 + ct: 6bbd0c0bfca90f9c361b96367f77ea0c1efb042d3e60117944ff7d05fd50f2eb + output: + - input_file: i64.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/eq.leo.out b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out new file mode 100644 index 0000000000..b9f51500b3 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/eq.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 257 + num_constraints: 257 + at: 4461f4148de047b81686ddce14909d0676354608816291b838209335b7b5040c + bt: 1aaee32179419b6185d75c5745bd13c7c8ba869bad0132405ef1b28915bfe5d9 + ct: 8edd5528a862bbd5590cfbd0d52871e395cf73e3a22c70839571b36506fbe3a7 + output: + - input_file: i64.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/ge.leo.out b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out new file mode 100644 index 0000000000..e689b56ce6 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/ge.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 449 + num_constraints: 449 + at: 732f88f6d74154902e8e9ccb6a4f52a7ff945ad78d37bbd769fcfd226e7d3261 + bt: 46fa1dbc8f6cc62609913fe96ad20cff4ba8ba7ea886b3682c3b4dc9a491b334 + ct: 7b765314986bd8a51a62dabdef866c5fe05ad9bf392fb0e25b7ce3b9969f81e1 + output: + - input_file: i64_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i64_g.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/gt.leo.out b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out new file mode 100644 index 0000000000..301ee2fa3a --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/gt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 449 + num_constraints: 449 + at: 00e3111a40957b18c86be06041e0064425fee842c1d44ec540ba3ab7dbcde7d8 + bt: 3947204249ecf9b6f7339e9c6409daf25d626f7e807ac182d3222e61fb4499dd + ct: 7b765314986bd8a51a62dabdef866c5fe05ad9bf392fb0e25b7ce3b9969f81e1 + output: + - input_file: i64_g.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i64_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/le.leo.out b/tests/expectations/compiler/compiler/integers/i64/le.leo.out new file mode 100644 index 0000000000..0bc069cecc --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/le.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 449 + num_constraints: 449 + at: 583b2c56b8f6afe21b1853986324c698ae281b32af481dc24333125506210d63 + bt: b228ce69df9ccfd94eb2d43619a82e2720dc0b34666b6850f0cd42db04befdef + ct: 7b765314986bd8a51a62dabdef866c5fe05ad9bf392fb0e25b7ce3b9969f81e1 + output: + - input_file: i64_l.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i64_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/lt.leo.out b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out new file mode 100644 index 0000000000..1a8a899cb3 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/lt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 449 + num_constraints: 449 + at: 6cd1a9d0201b57ab7f8618df8baa423bedbfc501b15cd6e1497867f15133ef8b + bt: fcbfd8b9b01e1754f1023d94765533fb9199baa19fddcb89a4d2a010e7844284 + ct: 7b765314986bd8a51a62dabdef866c5fe05ad9bf392fb0e25b7ce3b9969f81e1 + output: + - input_file: i64_l.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i64_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/max.leo.out b/tests/expectations/compiler/compiler/integers/i64/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..22b6a3253c --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i64/max_fail.leo:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '9223372036854775808'" diff --git a/tests/expectations/compiler/compiler/integers/i64/min.leo.out b/tests/expectations/compiler/compiler/integers/i64/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..0dd85392b2 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i64/min_fail.leo:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-9223372036854775809'" diff --git a/tests/expectations/compiler/compiler/integers/i64/mul.leo.out b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out new file mode 100644 index 0000000000..30bbbfc6c8 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/mul.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 98304 + num_constraints: 98305 + at: 08ca93778574f4dd25706eddac7210062ffe0fc794108555bcc597892a739c8e + bt: 2fc487f7ec79d8c33c89cf5c899ad0b56f7468af6aec96081b6f08344fbf872f + ct: 37717cfdc15b44be3cd83355ff38227c8abc7aa09152746fe4cd7f42ae31ea9f + output: + - input_file: i64.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/ne.leo.out b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out new file mode 100644 index 0000000000..2658276ca5 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/ne.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 257 + num_constraints: 257 + at: 94abff87eb8bfdc488ea06a67dcf479c6a05c779b40e11c40ee2c69d22030ba3 + bt: 7abc1550aed02405fe1d0951da294ee11583b4215ddc3889429f16ac75604766 + ct: 8edd5528a862bbd5590cfbd0d52871e395cf73e3a22c70839571b36506fbe3a7 + output: + - input_file: i64_ne.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i64_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/negate.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out new file mode 100644 index 0000000000..ba016266cc --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/negate.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 381 + num_constraints: 381 + at: 2cf8ec48b86767689e33a5c95b6e2badd7ee35497fada3d65a7bf5f67aa290ad + bt: f99ae12913da76b1006f5da90b82a67453e4ade0ae3c1102088527b9165abfc3 + ct: e7cff3106d84b6f974711e728b4b6138785655ed58ad24bcd957a5fbbde6be62 + output: + - input_file: i64.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i64.in + output: + registers: + r0: + type: bool + value: "true" 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..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out new file mode 100644 index 0000000000..6cc283900b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/negate_zero.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out new file mode 100644 index 0000000000..47cd46e965 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i64/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i64;\n | ^\n |\n = Unexpected white space between terms 1 and i64" diff --git a/tests/expectations/compiler/compiler/integers/i64/sub.leo.out b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out new file mode 100644 index 0000000000..d453a4c73c --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/sub.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 826 + num_constraints: 827 + at: 0940d7c32fa559933029626b467e1d1699273a7e4d04dcb4230911d0fc3cc283 + bt: b2855c9d479f9679702723e00941392e8c7e3b66b48b997c2ff7e575b3b2a33d + ct: 3bb5ddec31f7c687baef9618ce0597888541de092319ce8f05576d71439e848e + output: + - input_file: i64.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out new file mode 100644 index 0000000000..e3c99e1566 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/i64/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 448 + num_constraints: 512 + at: 690e01212c73d922dcb536db333646b61ef69ccbfbf86376f643586a130e5b90 + bt: edadcd06780bd97cb60d245565ce94697ee12b4d71ce9148f1546f1c4390b668 + ct: f1bb709127145aae7603feda04afbc3e401fdf290c1d549be8d2d4b21ece9b58 + output: + - input_file: i64.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: i64_rev.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/add.leo.out b/tests/expectations/compiler/compiler/integers/i8/add.leo.out index e88041f83e..a8d3fabb34 100644 --- a/tests/expectations/compiler/compiler/integers/i8/add.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/add.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: i8.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/div.leo.out b/tests/expectations/compiler/compiler/integers/i8/div.leo.out index 276ae8c818..7803a9ccb0 100644 --- a/tests/expectations/compiler/compiler/integers/i8/div.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/div.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: i8.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out index 0dfbf49db7..27f1106e56 100644 --- a/tests/expectations/compiler/compiler/integers/i8/eq.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/eq.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: i8.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out index f0666523a7..3bbc0bde6f 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ge.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ge.leo.out @@ -10,6 +10,15 @@ outputs: bt: a55f11270f22104142bcee90897c9d9a8463b2fa9043957f85d82725f4bb075e ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 output: - - input_file: i8.in + - input_file: i8_e.in output: - registers: {} + registers: + r0: + type: bool + value: "true" + - input_file: i8_g.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out index 8dfd598ad5..567da629f3 100644 --- a/tests/expectations/compiler/compiler/integers/i8/gt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/gt.leo.out @@ -10,6 +10,15 @@ outputs: bt: 4a959c05229442ca476ef20cfe1988fab90d5ca1b8f1c75f75719d475030c086 ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 output: - - input_file: i8.in + - input_file: i8_g.in output: - registers: {} + registers: + r0: + type: bool + value: "true" + - input_file: i8_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/le.leo.out b/tests/expectations/compiler/compiler/integers/i8/le.leo.out index 0dd7ae182b..2e2fa0dbfb 100644 --- a/tests/expectations/compiler/compiler/integers/i8/le.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/le.leo.out @@ -10,6 +10,15 @@ outputs: bt: 13756f3827f4f5f9c3d57ac57364366b9716cd3474416861f9aa9fe7a79206d0 ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 output: - - input_file: i8.in + - input_file: i8_l.in output: - registers: {} + registers: + r0: + type: bool + value: "true" + - input_file: i8_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out index 5e26082c7c..89563da359 100644 --- a/tests/expectations/compiler/compiler/integers/i8/lt.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/lt.leo.out @@ -10,6 +10,15 @@ outputs: bt: 2edb58dffc1fb55bd54dd589b8fb4cf15292f14cc2e9d478bb372b57c958ead9 ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 output: - - input_file: i8.in + - input_file: i8_l.in output: - registers: {} + registers: + r0: + type: bool + value: "true" + - input_file: i8_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out index 1b213ebb13..fb71755039 100644 --- a/tests/expectations/compiler/compiler/integers/i8/mul.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/mul.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: i8.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out index dabe909afa..42249020db 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ne.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ne.leo.out @@ -10,6 +10,15 @@ outputs: bt: 10b52342f8c44eb9b3335b4df9ca4136de3ad35d5b580b2ab32ae5e10bcdf3b4 ct: 2aae7d6631260dcaafbfe9709ade84e75f5172a9baad48e108e7264d5fc17cf6 output: - - input_file: i8.in + - input_file: i8_ne.in output: - registers: {} + registers: + r0: + type: bool + value: "true" + - input_file: i8_e.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out index 210b46a3a5..a7c02911c7 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate.leo.out @@ -12,4 +12,13 @@ outputs: output: - input_file: i8.in output: - registers: {} + registers: + r0: + type: bool + value: "true" + - input_file: i8.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out index 2a650384ef..6cc283900b 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_zero.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out index 9ed5dff636..86314aef62 100644 --- a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/no_space_between_literal.leo:4:13\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" diff --git a/tests/expectations/compiler/compiler/integers/i8/pow.leo.out b/tests/expectations/compiler/compiler/integers/i8/pow.leo.out index 3052caf6f5..2b9d1fa103 100644 --- a/tests/expectations/compiler/compiler/integers/i8/pow.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/pow.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: i8.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out index 2009bad971..4bb05df618 100644 --- a/tests/expectations/compiler/compiler/integers/i8/sub.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/sub.leo.out @@ -12,4 +12,7 @@ outputs: output: - input_file: i8.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out index e4b884a40d..ddf50c9b75 100644 --- a/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/ternary.leo.out @@ -12,7 +12,13 @@ outputs: output: - input_file: i8.in output: - registers: {} + registers: + r0: + type: bool + value: "true" - input_file: i8_rev.in output: - registers: {} + registers: + r0: + type: bool + value: "true" From 5d018f4ad2137b83fb27cb61f681d27101b91bdc Mon Sep 17 00:00:00 2001 From: damirka Date: Mon, 10 May 2021 21:11:31 +0300 Subject: [PATCH 19/26] u* --- tests/compiler/integers/int_macro.rs | 538 ------------------ tests/compiler/integers/integer_tester.rs | 83 --- tests/compiler/integers/mod.rs | 37 -- tests/compiler/integers/u128/add.leo | 20 +- .../compiler/integers/u128/console_assert.leo | 18 +- tests/compiler/integers/u128/div.leo | 20 +- tests/compiler/integers/u128/eq.leo | 28 +- tests/compiler/integers/u128/ge.leo | 36 +- tests/compiler/integers/u128/gt.leo | 24 +- tests/compiler/integers/u128/input.leo | 19 +- tests/compiler/integers/u128/le.leo | 36 +- tests/compiler/integers/u128/lt.leo | 28 +- tests/compiler/integers/u128/max.leo | 7 +- tests/compiler/integers/u128/max_fail.leo | 7 +- tests/compiler/integers/u128/min.leo | 7 +- tests/compiler/integers/u128/min_fail.leo | 7 +- tests/compiler/integers/u128/mod.rs | 126 ---- tests/compiler/integers/u128/mul.leo | 20 +- tests/compiler/integers/u128/ne.leo | 20 +- .../u128/no_space_between_literal.leo | 9 +- tests/compiler/integers/u128/pow.leo | 6 +- tests/compiler/integers/u128/sub.leo | 20 +- tests/compiler/integers/u128/ternary.leo | 32 +- tests/compiler/integers/u16/add.leo | 20 +- .../compiler/integers/u16/console_assert.leo | 18 +- tests/compiler/integers/u16/div.leo | 20 +- tests/compiler/integers/u16/eq.leo | 28 +- tests/compiler/integers/u16/ge.leo | 36 +- tests/compiler/integers/u16/gt.leo | 24 +- tests/compiler/integers/u16/input.leo | 19 +- tests/compiler/integers/u16/le.leo | 36 +- tests/compiler/integers/u16/lt.leo | 28 +- tests/compiler/integers/u16/max.leo | 7 +- tests/compiler/integers/u16/max_fail.leo | 7 +- tests/compiler/integers/u16/min.leo | 7 +- tests/compiler/integers/u16/min_fail.leo | 7 +- tests/compiler/integers/u16/mod.rs | 126 ---- tests/compiler/integers/u16/mul.leo | 20 +- tests/compiler/integers/u16/ne.leo | 20 +- .../integers/u16/no_space_between_literal.leo | 9 +- tests/compiler/integers/u16/pow.leo | 20 +- tests/compiler/integers/u16/sub.leo | 20 +- tests/compiler/integers/u16/ternary.leo | 32 +- tests/compiler/integers/u32/add.leo | 20 +- .../compiler/integers/u32/console_assert.leo | 18 +- tests/compiler/integers/u32/div.leo | 20 +- tests/compiler/integers/u32/eq.leo | 28 +- tests/compiler/integers/u32/ge.leo | 36 +- tests/compiler/integers/u32/gt.leo | 24 +- tests/compiler/integers/u32/input.leo | 19 +- tests/compiler/integers/u32/le.leo | 36 +- tests/compiler/integers/u32/lt.leo | 28 +- tests/compiler/integers/u32/max.leo | 7 +- tests/compiler/integers/u32/max_fail.leo | 7 +- tests/compiler/integers/u32/min.leo | 7 +- tests/compiler/integers/u32/min_fail.leo | 7 +- tests/compiler/integers/u32/mod.rs | 126 ---- tests/compiler/integers/u32/mul.leo | 20 +- tests/compiler/integers/u32/ne.leo | 20 +- .../integers/u32/no_space_between_literal.leo | 9 +- tests/compiler/integers/u32/pow.leo | 6 +- tests/compiler/integers/u32/sub.leo | 20 +- tests/compiler/integers/u32/ternary.leo | 32 +- tests/compiler/integers/u64/add.leo | 20 +- .../compiler/integers/u64/console_assert.leo | 18 +- tests/compiler/integers/u64/div.leo | 20 +- tests/compiler/integers/u64/eq.leo | 28 +- tests/compiler/integers/u64/ge.leo | 36 +- tests/compiler/integers/u64/gt.leo | 24 +- tests/compiler/integers/u64/input.leo | 19 +- tests/compiler/integers/u64/le.leo | 36 +- tests/compiler/integers/u64/lt.leo | 28 +- tests/compiler/integers/u64/max.leo | 7 +- tests/compiler/integers/u64/max_fail.leo | 7 +- tests/compiler/integers/u64/min.leo | 7 +- tests/compiler/integers/u64/min_fail.leo | 7 +- tests/compiler/integers/u64/mod.rs | 126 ---- tests/compiler/integers/u64/mul.leo | 20 +- tests/compiler/integers/u64/ne.leo | 20 +- .../integers/u64/no_space_between_literal.leo | 9 +- tests/compiler/integers/u64/pow.leo | 6 +- tests/compiler/integers/u64/sub.leo | 20 +- tests/compiler/integers/u64/ternary.leo | 32 +- tests/compiler/integers/u8/add.leo | 20 +- tests/compiler/integers/u8/console_assert.leo | 18 +- tests/compiler/integers/u8/div.leo | 20 +- tests/compiler/integers/u8/eq.leo | 28 +- tests/compiler/integers/u8/ge.leo | 36 +- tests/compiler/integers/u8/gt.leo | 24 +- tests/compiler/integers/u8/input.leo | 19 +- tests/compiler/integers/u8/le.leo | 36 +- tests/compiler/integers/u8/lt.leo | 28 +- tests/compiler/integers/u8/max.leo | 7 +- tests/compiler/integers/u8/max_fail.leo | 7 +- tests/compiler/integers/u8/min.leo | 7 +- tests/compiler/integers/u8/min_fail.leo | 7 +- tests/compiler/integers/u8/mod.rs | 126 ---- tests/compiler/integers/u8/mul.leo | 20 +- tests/compiler/integers/u8/ne.leo | 20 +- .../integers/u8/no_space_between_literal.leo | 9 +- tests/compiler/integers/u8/pow.leo | 20 +- tests/compiler/integers/u8/sub.leo | 20 +- tests/compiler/integers/u8/ternary.leo | 32 +- tests/compiler/integers/uint_macro.rs | 476 ---------------- .../compiler/integers/u128/add.leo.out | 18 + .../integers/u128/console_assert.leo.out | 18 + .../compiler/integers/u128/div.leo.out | 18 + .../compiler/integers/u128/eq.leo.out | 24 + .../compiler/integers/u128/ge.leo.out | 30 + .../compiler/integers/u128/gt.leo.out | 18 + .../compiler/integers/u128/input.leo.out | 18 + .../compiler/integers/u128/le.leo.out | 30 + .../compiler/integers/u128/lt.leo.out | 24 + .../compiler/integers/u128/max.leo.out | 15 + .../compiler/integers/u128/max_fail.leo.out | 5 + .../compiler/integers/u128/min.leo.out | 15 + .../compiler/integers/u128/min_fail.leo.out | 5 + .../compiler/integers/u128/mul.leo.out | 18 + .../compiler/integers/u128/ne.leo.out | 18 + .../u128/no_space_between_literal.leo.out | 5 + .../compiler/integers/u128/sub.leo.out | 18 + .../compiler/integers/u128/ternary.leo.out | 24 + .../compiler/integers/u16/add.leo.out | 18 + .../integers/u16/console_assert.leo.out | 18 + .../compiler/integers/u16/div.leo.out | 18 + .../compiler/compiler/integers/u16/eq.leo.out | 24 + .../compiler/compiler/integers/u16/ge.leo.out | 30 + .../compiler/compiler/integers/u16/gt.leo.out | 18 + .../compiler/integers/u16/input.leo.out | 18 + .../compiler/compiler/integers/u16/le.leo.out | 30 + .../compiler/compiler/integers/u16/lt.leo.out | 24 + .../compiler/integers/u16/max.leo.out | 15 + .../compiler/integers/u16/max_fail.leo.out | 5 + .../compiler/integers/u16/min.leo.out | 15 + .../compiler/integers/u16/min_fail.leo.out | 5 + .../compiler/integers/u16/mul.leo.out | 18 + .../compiler/compiler/integers/u16/ne.leo.out | 18 + .../u16/no_space_between_literal.leo.out | 5 + .../compiler/integers/u16/pow.leo.out | 18 + .../compiler/integers/u16/sub.leo.out | 18 + .../compiler/integers/u16/ternary.leo.out | 24 + .../compiler/integers/u32/add.leo.out | 18 + .../integers/u32/console_assert.leo.out | 18 + .../compiler/integers/u32/div.leo.out | 18 + .../compiler/compiler/integers/u32/eq.leo.out | 24 + .../compiler/compiler/integers/u32/ge.leo.out | 30 + .../compiler/compiler/integers/u32/gt.leo.out | 18 + .../compiler/integers/u32/input.leo.out | 18 + .../compiler/compiler/integers/u32/le.leo.out | 30 + .../compiler/compiler/integers/u32/lt.leo.out | 24 + .../compiler/integers/u32/max.leo.out | 15 + .../compiler/integers/u32/max_fail.leo.out | 5 + .../compiler/integers/u32/min.leo.out | 15 + .../compiler/integers/u32/min_fail.leo.out | 5 + .../compiler/integers/u32/mul.leo.out | 18 + .../compiler/compiler/integers/u32/ne.leo.out | 18 + .../u32/no_space_between_literal.leo.out | 5 + .../compiler/integers/u32/sub.leo.out | 18 + .../compiler/integers/u32/ternary.leo.out | 24 + .../compiler/integers/u64/add.leo.out | 18 + .../integers/u64/console_assert.leo.out | 18 + .../compiler/integers/u64/div.leo.out | 18 + .../compiler/compiler/integers/u64/eq.leo.out | 24 + .../compiler/compiler/integers/u64/ge.leo.out | 30 + .../compiler/compiler/integers/u64/gt.leo.out | 18 + .../compiler/integers/u64/input.leo.out | 18 + .../compiler/compiler/integers/u64/le.leo.out | 30 + .../compiler/compiler/integers/u64/lt.leo.out | 24 + .../compiler/integers/u64/max.leo.out | 15 + .../compiler/integers/u64/max_fail.leo.out | 5 + .../compiler/integers/u64/min.leo.out | 15 + .../compiler/integers/u64/min_fail.leo.out | 5 + .../compiler/integers/u64/mul.leo.out | 18 + .../compiler/compiler/integers/u64/ne.leo.out | 18 + .../u64/no_space_between_literal.leo.out | 5 + .../compiler/integers/u64/sub.leo.out | 18 + .../compiler/integers/u64/ternary.leo.out | 24 + .../compiler/compiler/integers/u8/add.leo.out | 18 + .../integers/u8/console_assert.leo.out | 18 + .../compiler/compiler/integers/u8/div.leo.out | 18 + .../compiler/compiler/integers/u8/eq.leo.out | 24 + .../compiler/compiler/integers/u8/ge.leo.out | 30 + .../compiler/compiler/integers/u8/gt.leo.out | 18 + .../compiler/integers/u8/input.leo.out | 18 + .../compiler/compiler/integers/u8/le.leo.out | 30 + .../compiler/compiler/integers/u8/lt.leo.out | 24 + .../compiler/compiler/integers/u8/max.leo.out | 15 + .../compiler/integers/u8/max_fail.leo.out | 5 + .../compiler/compiler/integers/u8/min.leo.out | 15 + .../compiler/integers/u8/min_fail.leo.out | 5 + .../compiler/compiler/integers/u8/mul.leo.out | 18 + .../compiler/compiler/integers/u8/ne.leo.out | 18 + .../u8/no_space_between_literal.leo.out | 5 + .../compiler/compiler/integers/u8/pow.leo.out | 18 + .../compiler/compiler/integers/u8/sub.leo.out | 18 + .../compiler/integers/u8/ternary.leo.out | 24 + 196 files changed, 3259 insertions(+), 1994 deletions(-) delete mode 100644 tests/compiler/integers/int_macro.rs delete mode 100644 tests/compiler/integers/integer_tester.rs delete mode 100644 tests/compiler/integers/mod.rs delete mode 100644 tests/compiler/integers/u128/mod.rs delete mode 100644 tests/compiler/integers/u16/mod.rs delete mode 100644 tests/compiler/integers/u32/mod.rs delete mode 100644 tests/compiler/integers/u64/mod.rs delete mode 100644 tests/compiler/integers/u8/mod.rs delete mode 100644 tests/compiler/integers/uint_macro.rs create mode 100644 tests/expectations/compiler/compiler/integers/u128/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/input.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u128/ternary.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/input.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/pow.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u16/ternary.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/input.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u32/ternary.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/input.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u64/ternary.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/add.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/div.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/eq.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/ge.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/gt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/input.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/le.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/lt.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/max.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/min.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/mul.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/ne.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/pow.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/sub.leo.out create mode 100644 tests/expectations/compiler/compiler/integers/u8/ternary.leo.out diff --git a/tests/compiler/integers/int_macro.rs b/tests/compiler/integers/int_macro.rs deleted file mode 100644 index 7867961fc4..0000000000 --- a/tests/compiler/integers/int_macro.rs +++ /dev/null @@ -1,538 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -macro_rules! test_int { - ($name: ident, $type_: ty, $integer_type: expr, $gadget: ty) => { - pub struct $name {} - - impl $name { - fn test_negate() { - for _ in 0..10 { - let a: $type_ = rand::random(); - - let b = match a.checked_neg() { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("negate.leo"); - let mut program = parse_program(program_string).unwrap(); - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_negate_min_fail() { - let program_string = include_str!("negate_min.leo"); - let program = parse_program(program_string).unwrap(); - - expect_computation_error(program); - } - - fn test_negate_zero() { - let program_string = include_str!("negate_zero.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); - } - } - - impl IntegerTester for $name { - fn test_min() { - let program_string = include_str!("min.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); - } - - fn test_min_fail() { - let program_string = include_str!("min_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); - } - - fn test_max() { - let program_string = include_str!("max.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); - } - - fn test_max_fail() { - let program_string = include_str!("max_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); - } - - fn test_add() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_add(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("add.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_sub() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - if b.checked_neg().is_none() { - continue; - } - - let c = match a.checked_sub(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("sub.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_mul() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_mul(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("mul.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_div() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // make sure that we can calculate the inverse of each number - // Leo signed integer division is non-wrapping. Thus attempting to calculate a - // division result that wraps should be ignored here. - if a.checked_neg().is_none() { - continue; - } - - let program_string = include_str!("div.leo"); - let mut program = parse_program(program_string).unwrap(); - - // expect an error when dividing by zero - if b == 0 { - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } else { - let c = match a.checked_div(b) { - Some(valid) => valid, - None => continue, - }; - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - } - - fn test_pow() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // rust specific conversion see https://doc.rust-lang.org/std/primitive.u8.html#method.checked_pow - let c = match a.checked_pow(b as u32) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("pow.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_eq() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.eq(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_ne() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test a != a == false - - let program_string = include_str!("ne.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.ne(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_ge() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("ge.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test greater or equal - - let c = a.ge(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_gt() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("gt.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test greater than - - let c = a.gt(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_le() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("le.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test less or equal - - let c = a.le(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_lt() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("lt.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test less or equal - - let c = a.lt(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_console_assert() { - for _ in 0..10 { - let a: $type_ = rand::random(); - - // test equal - let program_string = include_str!("console_assert.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - let b: $type_ = rand::random(); - - if a == b { - continue; - } - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } - } - - fn test_ternary() { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let program_string = include_str!("ternary.leo"); - let mut program = parse_program(program_string).unwrap(); - - // true -> field 1 - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(true))), - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, a.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // false -> field 2 - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(false))), - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - }; -} diff --git a/tests/compiler/integers/integer_tester.rs b/tests/compiler/integers/integer_tester.rs deleted file mode 100644 index 23085d5aac..0000000000 --- a/tests/compiler/integers/integer_tester.rs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{expect_compiler_error, EdwardsTestCompiler}; -use leo_compiler::errors::{CompilerError, ExpressionError, FunctionError, IntegerError, StatementError}; - -pub trait IntegerTester { - /// Tests defining the smalled value that can be represented by the integer type - fn test_min(); - - /// Tests defining the smallest value - 1 - fn test_min_fail(); - - /// Tests defining the largest value that can be represented by the integer type - fn test_max(); - - /// Tests defining the largest value + 1 - fn test_max_fail(); - - /// Tests a non-wrapping addition - fn test_add(); - - /// Tests a non-wrapping subtraction - fn test_sub(); - - /// Tests a non-wrapping multiplication - fn test_mul(); - - /// Tests a non-wrapping division - fn test_div(); - - /// Tests a non-wrapping exponentiation - fn test_pow(); - - /// Tests == evaluation - fn test_eq(); - - /// Tests != evaluation - fn test_ne(); - - /// Tests >= evaluation - fn test_ge(); - - /// Tests > evaluation - fn test_gt(); - - /// Tests <= evaluation - fn test_le(); - - /// Tests < evaluation - fn test_lt(); - - /// Test assert equals constraint keyword - fn test_console_assert(); - - /// Test ternary if bool ? num_1 : num_2; - fn test_ternary(); -} - -pub(crate) fn expect_computation_error(program: EdwardsTestCompiler) { - match expect_compiler_error(program) { - CompilerError::FunctionError(FunctionError::StatementError(StatementError::ExpressionError( - ExpressionError::IntegerError(IntegerError::Error(_)), - ))) => {} - error => panic!( - "Expected integer computation error such as `DivisionByZero`, found {:?}", - error - ), - } -} diff --git a/tests/compiler/integers/mod.rs b/tests/compiler/integers/mod.rs deleted file mode 100644 index 0cfd4f643c..0000000000 --- a/tests/compiler/integers/mod.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -#[macro_use] -pub mod int_macro; - -#[macro_use] -pub mod uint_macro; - -pub mod integer_tester; -pub use self::integer_tester::*; - -// must be below macro definitions! -pub mod u128; -pub mod u16; -pub mod u32; -pub mod u64; -pub mod u8; - -pub mod i128; -pub mod i16; -pub mod i32; -pub mod i64; -pub mod i8; diff --git a/tests/compiler/integers/u128/add.leo b/tests/compiler/integers/u128/add.leo index 6b32042fd5..66b6e5a41d 100644 --- a/tests/compiler/integers/u128/add.leo +++ b/tests/compiler/integers/u128/add.leo @@ -1,3 +1,17 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a + b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u128.in: | + [main] + a: u128 = 2; + b: u128 = 4; + c: u128 = 6; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128, c: u128) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/u128/console_assert.leo b/tests/compiler/integers/u128/console_assert.leo index adab295385..ef51461445 100644 --- a/tests/compiler/integers/u128/console_assert.leo +++ b/tests/compiler/integers/u128/console_assert.leo @@ -1,3 +1,17 @@ -function main(a: u128, b: u128) { +/* +namespace: Compile +expectation: Pass +inputs: + - u128.in: | + [main] + a: u128 = 2; + b: u128 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128) -> bool { console.assert(a == b); -} \ No newline at end of file + return a == b; +} diff --git a/tests/compiler/integers/u128/div.leo b/tests/compiler/integers/u128/div.leo index 0d62054eca..d228e360c3 100644 --- a/tests/compiler/integers/u128/div.leo +++ b/tests/compiler/integers/u128/div.leo @@ -1,3 +1,17 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a / b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u128.in: | + [main] + a: u128 = 4; + b: u128 = 2; + c: u128 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128, c: u128) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/u128/eq.leo b/tests/compiler/integers/u128/eq.leo index 2c2acd923a..c850875671 100644 --- a/tests/compiler/integers/u128/eq.leo +++ b/tests/compiler/integers/u128/eq.leo @@ -1,3 +1,25 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u128_e.in: | + [main] + a: u128 = 2; + b: u128 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u128_n.in: | + [main] + a: u128 = 3; + b: u128 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/u128/ge.leo b/tests/compiler/integers/u128/ge.leo index bff7cd321b..cc6b3650ef 100644 --- a/tests/compiler/integers/u128/ge.leo +++ b/tests/compiler/integers/u128/ge.leo @@ -1,3 +1,33 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u128_g.in: | + [main] + a: u128 = 3; + b: u128 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u128_e.in: | + [main] + a: u128 = 2; + b: u128 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u128_f.in: | + [main] + a: u128 = 1; + b: u128 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/u128/gt.leo b/tests/compiler/integers/u128/gt.leo index e8aec0faf2..0cf5f6ba9b 100644 --- a/tests/compiler/integers/u128/gt.leo +++ b/tests/compiler/integers/u128/gt.leo @@ -1,3 +1,25 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - u128_g.in: | + [main] + a: u128 = 3; + b: u128 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u128_f.in: | + [main] + a: u128 = 1; + b: u128 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + function main(a: u128, b: u128, c: bool) { console.assert(a > b == c); -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u128/input.leo b/tests/compiler/integers/u128/input.leo index adab295385..1c4e813734 100644 --- a/tests/compiler/integers/u128/input.leo +++ b/tests/compiler/integers/u128/input.leo @@ -1,3 +1,16 @@ -function main(a: u128, b: u128) { - console.assert(a == b); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u128_g.in: | + [main] + a: u128 = 2; + b: u128 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128) -> bool { + return a == b; +} diff --git a/tests/compiler/integers/u128/le.leo b/tests/compiler/integers/u128/le.leo index c9e4609136..afb2197734 100644 --- a/tests/compiler/integers/u128/le.leo +++ b/tests/compiler/integers/u128/le.leo @@ -1,3 +1,33 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u128_f.in: | + [main] + a: u128 = 3; + b: u128 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u128_e.in: | + [main] + a: u128 = 2; + b: u128 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u128_l.in: | + [main] + a: u128 = 1; + b: u128 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/u128/lt.leo b/tests/compiler/integers/u128/lt.leo index b37057c895..b9d74af6c9 100644 --- a/tests/compiler/integers/u128/lt.leo +++ b/tests/compiler/integers/u128/lt.leo @@ -1,3 +1,25 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u128_f.in: | + [main] + a: u128 = 3; + b: u128 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u128_g.in: | + [main] + a: u128 = 1; + b: u128 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128, c: bool) -> bool { + return a < b == c; +} diff --git a/tests/compiler/integers/u128/max.leo b/tests/compiler/integers/u128/max.leo index b166ede06b..2d09d170c6 100644 --- a/tests/compiler/integers/u128/max.leo +++ b/tests/compiler/integers/u128/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u128 = 340282366920938463463374607431768211455; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u128/max_fail.leo b/tests/compiler/integers/u128/max_fail.leo index f51c967925..3872bdf79d 100644 --- a/tests/compiler/integers/u128/max_fail.leo +++ b/tests/compiler/integers/u128/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u128 = 340282366920938463463374607431768211456; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u128/min.leo b/tests/compiler/integers/u128/min.leo index 41fbf1a2fe..3863cbce99 100644 --- a/tests/compiler/integers/u128/min.leo +++ b/tests/compiler/integers/u128/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u128 = 0; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u128/min_fail.leo b/tests/compiler/integers/u128/min_fail.leo index b0d17191ff..321104f74c 100644 --- a/tests/compiler/integers/u128/min_fail.leo +++ b/tests/compiler/integers/u128/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u128 = -1; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u128/mod.rs b/tests/compiler/integers/u128/mod.rs deleted file mode 100644 index 38677dcb29..0000000000 --- a/tests/compiler/integers/u128/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U128Type, UnsignedIntegerType}; - -test_uint!( - TestU128, - u128, - IntegerType::Unsigned(UnsignedIntegerType::U128Type(U128Type {})), - UInt128 -); - -#[test] -fn test_u128_min() { - TestU128::test_min(); -} - -#[test] -fn test_u128_min_fail() { - TestU128::test_min_fail(); -} - -#[test] -fn test_u128_max() { - TestU128::test_max(); -} - -#[test] -fn test_u128_max_fail() { - TestU128::test_max_fail(); -} - -#[test] -fn test_u128_add() { - TestU128::test_add(); -} - -#[test] -fn test_u128_sub() { - TestU128::test_sub(); -} - -#[test] -fn test_u128_mul() { - TestU128::test_mul(); -} - -#[test] -fn test_u128_div() { - TestU128::test_div(); -} - -#[test] -fn test_u128_pow() { - TestU128::test_pow(); -} - -#[test] -fn test_u128_eq() { - TestU128::test_eq(); -} - -#[test] -fn test_u128_ne() { - TestU128::test_ne(); -} - -#[test] -fn test_u128_ge() { - TestU128::test_ge(); -} - -#[test] -fn test_u128_gt() { - TestU128::test_gt(); -} - -#[test] -fn test_u128_le() { - TestU128::test_le(); -} - -#[test] -fn test_u128_lt() { - TestU128::test_lt(); -} - -#[test] -fn test_u128_console_assert() { - TestU128::test_console_assert(); -} - -#[test] -fn test_u128_ternary() { - TestU128::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/u128/mul.leo b/tests/compiler/integers/u128/mul.leo index c7fdc1530c..dc74761701 100644 --- a/tests/compiler/integers/u128/mul.leo +++ b/tests/compiler/integers/u128/mul.leo @@ -1,3 +1,17 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a * b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - mul.in: | + [main] + a: u128 = 10; + b: u128 = 20; + c: u128 = 30; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128, c: u128) -> bool { + return a * b == c; +} diff --git a/tests/compiler/integers/u128/ne.leo b/tests/compiler/integers/u128/ne.leo index da3467d01e..4299cc3a3c 100644 --- a/tests/compiler/integers/u128/ne.leo +++ b/tests/compiler/integers/u128/ne.leo @@ -1,3 +1,17 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - ne.in: | + [main] + a: u128 = 10; + b: u128 = 20; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128, c: bool) -> bool { + return a != b == c; +} diff --git a/tests/compiler/integers/u128/no_space_between_literal.leo b/tests/compiler/integers/u128/no_space_between_literal.leo index fc48e7f1ae..0254188d17 100644 --- a/tests/compiler/integers/u128/no_space_between_literal.leo +++ b/tests/compiler/integers/u128/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { - const i = 1 u128; -} \ No newline at end of file + const i = 1 u128; +} diff --git a/tests/compiler/integers/u128/pow.leo b/tests/compiler/integers/u128/pow.leo index 27614bfa56..aa291182a2 100644 --- a/tests/compiler/integers/u128/pow.leo +++ b/tests/compiler/integers/u128/pow.leo @@ -1,3 +1,3 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a ** b == c); -} \ No newline at end of file +function main(a: u128, b: u128, c: u128) -> bool { + return a ** b == c; +} diff --git a/tests/compiler/integers/u128/sub.leo b/tests/compiler/integers/u128/sub.leo index 2374413505..fbb08ad176 100644 --- a/tests/compiler/integers/u128/sub.leo +++ b/tests/compiler/integers/u128/sub.leo @@ -1,3 +1,17 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a - b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u128_f.in: | + [main] + a: u128 = 4; + b: u128 = 2; + c: u128 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u128, b: u128, c: u128) -> bool { + return a - b == c; +} diff --git a/tests/compiler/integers/u128/ternary.leo b/tests/compiler/integers/u128/ternary.leo index 99a6b997e0..b0bef36862 100644 --- a/tests/compiler/integers/u128/ternary.leo +++ b/tests/compiler/integers/u128/ternary.leo @@ -1,5 +1,29 @@ -function main(s: bool, a: u128, b: u128, c: u128) { - const r = s ? a : b; +/* +namespace: Compile +expectation: Pass +inputs: + - u128_t.in: | + [main] + s: bool = true; + a: u128 = 4; + b: u128 = 2; + c: u128 = 4; - console.assert(r == c); -} \ No newline at end of file + [registers] + r0: bool = true; + - u128_f.in: | + [main] + s: bool = false; + a: u128 = 4; + b: u128 = 2; + c: u128 = 2; + + [registers] + r0: bool = true; +*/ + +function main(s: bool, a: u128, b: u128, c: u128) -> bool { + let r = s ? a : b; + + return r == c; +} diff --git a/tests/compiler/integers/u16/add.leo b/tests/compiler/integers/u16/add.leo index f00701181b..44f0b1ba5a 100644 --- a/tests/compiler/integers/u16/add.leo +++ b/tests/compiler/integers/u16/add.leo @@ -1,3 +1,17 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a + b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u16.in: | + [main] + a: u16 = 2; + b: u16 = 4; + c: u16 = 6; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: u16) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/u16/console_assert.leo b/tests/compiler/integers/u16/console_assert.leo index 761f0639d0..51c091dff0 100644 --- a/tests/compiler/integers/u16/console_assert.leo +++ b/tests/compiler/integers/u16/console_assert.leo @@ -1,3 +1,17 @@ -function main(a: u16, b: u16) { +/* +namespace: Compile +expectation: Pass +inputs: + - u16.in: | + [main] + a: u16 = 2; + b: u16 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16) -> bool { console.assert(a == b); -} \ No newline at end of file + return a == b; +} diff --git a/tests/compiler/integers/u16/div.leo b/tests/compiler/integers/u16/div.leo index f1dd3fa463..728135715d 100644 --- a/tests/compiler/integers/u16/div.leo +++ b/tests/compiler/integers/u16/div.leo @@ -1,3 +1,17 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a / b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u16.in: | + [main] + a: u16 = 4; + b: u16 = 2; + c: u16 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: u16) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/u16/eq.leo b/tests/compiler/integers/u16/eq.leo index a4b4e78b49..4f715a1706 100644 --- a/tests/compiler/integers/u16/eq.leo +++ b/tests/compiler/integers/u16/eq.leo @@ -1,3 +1,25 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u16_e.in: | + [main] + a: u16 = 2; + b: u16 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u16_n.in: | + [main] + a: u16 = 3; + b: u16 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/u16/ge.leo b/tests/compiler/integers/u16/ge.leo index 4b1da1b27b..faaa70bd3d 100644 --- a/tests/compiler/integers/u16/ge.leo +++ b/tests/compiler/integers/u16/ge.leo @@ -1,3 +1,33 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u16_g.in: | + [main] + a: u16 = 3; + b: u16 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u16_e.in: | + [main] + a: u16 = 2; + b: u16 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u16_f.in: | + [main] + a: u16 = 1; + b: u16 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/u16/gt.leo b/tests/compiler/integers/u16/gt.leo index 2c5ffbe8eb..66502930a6 100644 --- a/tests/compiler/integers/u16/gt.leo +++ b/tests/compiler/integers/u16/gt.leo @@ -1,3 +1,25 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - u16_g.in: | + [main] + a: u16 = 3; + b: u16 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u16_f.in: | + [main] + a: u16 = 1; + b: u16 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + function main(a: u16, b: u16, c: bool) { console.assert(a > b == c); -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u16/input.leo b/tests/compiler/integers/u16/input.leo index 761f0639d0..81f52cc41a 100644 --- a/tests/compiler/integers/u16/input.leo +++ b/tests/compiler/integers/u16/input.leo @@ -1,3 +1,16 @@ -function main(a: u16, b: u16) { - console.assert(a == b); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u16_g.in: | + [main] + a: u16 = 2; + b: u16 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16) -> bool { + return a == b; +} diff --git a/tests/compiler/integers/u16/le.leo b/tests/compiler/integers/u16/le.leo index 49713482d0..4e02c11e05 100644 --- a/tests/compiler/integers/u16/le.leo +++ b/tests/compiler/integers/u16/le.leo @@ -1,3 +1,33 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u16_f.in: | + [main] + a: u16 = 3; + b: u16 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u16_e.in: | + [main] + a: u16 = 2; + b: u16 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u16_l.in: | + [main] + a: u16 = 1; + b: u16 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/u16/lt.leo b/tests/compiler/integers/u16/lt.leo index dae1951231..c00278a984 100644 --- a/tests/compiler/integers/u16/lt.leo +++ b/tests/compiler/integers/u16/lt.leo @@ -1,3 +1,25 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u16_f.in: | + [main] + a: u16 = 3; + b: u16 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u16_g.in: | + [main] + a: u16 = 1; + b: u16 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: bool) -> bool { + return a < b == c; +} diff --git a/tests/compiler/integers/u16/max.leo b/tests/compiler/integers/u16/max.leo index 56cb2af18d..b483f758b6 100644 --- a/tests/compiler/integers/u16/max.leo +++ b/tests/compiler/integers/u16/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u16 = 65535; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u16/max_fail.leo b/tests/compiler/integers/u16/max_fail.leo index bb703210e3..5e5c8e84fd 100644 --- a/tests/compiler/integers/u16/max_fail.leo +++ b/tests/compiler/integers/u16/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u16 = 65536; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u16/min.leo b/tests/compiler/integers/u16/min.leo index 4dee94a1a4..0e8946fdec 100644 --- a/tests/compiler/integers/u16/min.leo +++ b/tests/compiler/integers/u16/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u16 = 0; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u16/min_fail.leo b/tests/compiler/integers/u16/min_fail.leo index 0c61dd7ddf..d5bd1ff3c7 100644 --- a/tests/compiler/integers/u16/min_fail.leo +++ b/tests/compiler/integers/u16/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u16 = -1; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u16/mod.rs b/tests/compiler/integers/u16/mod.rs deleted file mode 100644 index 33f88452c1..0000000000 --- a/tests/compiler/integers/u16/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U16Type, UnsignedIntegerType}; - -test_uint!( - TestU16, - u16, - IntegerType::Unsigned(UnsignedIntegerType::U16Type(U16Type {})), - UInt16 -); - -#[test] -fn test_u16_min() { - TestU16::test_min(); -} - -#[test] -fn test_u16_min_fail() { - TestU16::test_min_fail(); -} - -#[test] -fn test_u16_max() { - TestU16::test_max(); -} - -#[test] -fn test_u16_max_fail() { - TestU16::test_max_fail(); -} - -#[test] -fn test_u16_add() { - TestU16::test_add(); -} - -#[test] -fn test_u16_sub() { - TestU16::test_sub(); -} - -#[test] -fn test_u16_mul() { - TestU16::test_mul(); -} - -#[test] -fn test_u16_div() { - TestU16::test_div(); -} - -#[test] -fn test_u16_pow() { - TestU16::test_pow(); -} - -#[test] -fn test_u16_eq() { - TestU16::test_eq(); -} - -#[test] -fn test_u16_ne() { - TestU16::test_ne(); -} - -#[test] -fn test_u16_ge() { - TestU16::test_ge(); -} - -#[test] -fn test_u16_gt() { - TestU16::test_gt(); -} - -#[test] -fn test_u16_le() { - TestU16::test_le(); -} - -#[test] -fn test_u16_lt() { - TestU16::test_lt(); -} - -#[test] -fn test_u16_console_assert() { - TestU16::test_console_assert(); -} - -#[test] -fn test_u16_ternary() { - TestU16::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/u16/mul.leo b/tests/compiler/integers/u16/mul.leo index f2c6f0aac8..f729004f42 100644 --- a/tests/compiler/integers/u16/mul.leo +++ b/tests/compiler/integers/u16/mul.leo @@ -1,3 +1,17 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a * b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - mul.in: | + [main] + a: u16 = 10; + b: u16 = 20; + c: u16 = 30; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: u16) -> bool { + return a * b == c; +} diff --git a/tests/compiler/integers/u16/ne.leo b/tests/compiler/integers/u16/ne.leo index e90a304cfe..823557a6e5 100644 --- a/tests/compiler/integers/u16/ne.leo +++ b/tests/compiler/integers/u16/ne.leo @@ -1,3 +1,17 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - ne.in: | + [main] + a: u16 = 10; + b: u16 = 20; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: bool) -> bool { + return a != b == c; +} diff --git a/tests/compiler/integers/u16/no_space_between_literal.leo b/tests/compiler/integers/u16/no_space_between_literal.leo index 34e125cfc6..106d5c9117 100644 --- a/tests/compiler/integers/u16/no_space_between_literal.leo +++ b/tests/compiler/integers/u16/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { - const i = 1 u16; -} \ No newline at end of file + const i = 1 u16; +} diff --git a/tests/compiler/integers/u16/pow.leo b/tests/compiler/integers/u16/pow.leo index 564c1c51fe..da2f15408c 100644 --- a/tests/compiler/integers/u16/pow.leo +++ b/tests/compiler/integers/u16/pow.leo @@ -1,3 +1,17 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a ** b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u16_f.in: | + [main] + a: u16 = 2; + b: u16 = 2; + c: u16 = 4; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: u16) -> bool { + return a ** b == c; +} diff --git a/tests/compiler/integers/u16/sub.leo b/tests/compiler/integers/u16/sub.leo index 92aae9ac2c..dfdc9e772b 100644 --- a/tests/compiler/integers/u16/sub.leo +++ b/tests/compiler/integers/u16/sub.leo @@ -1,3 +1,17 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a - b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u16_f.in: | + [main] + a: u16 = 4; + b: u16 = 2; + c: u16 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u16, b: u16, c: u16) -> bool { + return a - b == c; +} diff --git a/tests/compiler/integers/u16/ternary.leo b/tests/compiler/integers/u16/ternary.leo index d6131f9f4f..82a2c111ff 100644 --- a/tests/compiler/integers/u16/ternary.leo +++ b/tests/compiler/integers/u16/ternary.leo @@ -1,5 +1,29 @@ -function main(s: bool, a: u16, b: u16, c: u16) { - const r = s ? a : b; +/* +namespace: Compile +expectation: Pass +inputs: + - u16_t.in: | + [main] + s: bool = true; + a: u16 = 4; + b: u16 = 2; + c: u16 = 4; - console.assert(r == c); -} \ No newline at end of file + [registers] + r0: bool = true; + - u16_f.in: | + [main] + s: bool = false; + a: u16 = 4; + b: u16 = 2; + c: u16 = 2; + + [registers] + r0: bool = true; +*/ + +function main(s: bool, a: u16, b: u16, c: u16) -> bool { + let r = s ? a : b; + + return r == c; +} diff --git a/tests/compiler/integers/u32/add.leo b/tests/compiler/integers/u32/add.leo index 6f6a2454b4..176de60a1c 100644 --- a/tests/compiler/integers/u32/add.leo +++ b/tests/compiler/integers/u32/add.leo @@ -1,3 +1,17 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a + b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u32.in: | + [main] + a: u32 = 2; + b: u32 = 4; + c: u32 = 6; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32, c: u32) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/u32/console_assert.leo b/tests/compiler/integers/u32/console_assert.leo index 32604eb3b8..ce81cedf30 100644 --- a/tests/compiler/integers/u32/console_assert.leo +++ b/tests/compiler/integers/u32/console_assert.leo @@ -1,3 +1,17 @@ -function main(a: u32, b: u32) { +/* +namespace: Compile +expectation: Pass +inputs: + - u32.in: | + [main] + a: u32 = 2; + b: u32 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32) -> bool { console.assert(a == b); -} \ No newline at end of file + return a == b; +} diff --git a/tests/compiler/integers/u32/div.leo b/tests/compiler/integers/u32/div.leo index ed689bd408..70e3cdd526 100644 --- a/tests/compiler/integers/u32/div.leo +++ b/tests/compiler/integers/u32/div.leo @@ -1,3 +1,17 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a / b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u32.in: | + [main] + a: u32 = 4; + b: u32 = 2; + c: u32 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32, c: u32) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/u32/eq.leo b/tests/compiler/integers/u32/eq.leo index ca427b3c42..38720ddd9d 100644 --- a/tests/compiler/integers/u32/eq.leo +++ b/tests/compiler/integers/u32/eq.leo @@ -1,3 +1,25 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u32_e.in: | + [main] + a: u32 = 2; + b: u32 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u32_n.in: | + [main] + a: u32 = 3; + b: u32 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/u32/ge.leo b/tests/compiler/integers/u32/ge.leo index 35c1c71829..e10409cf8c 100644 --- a/tests/compiler/integers/u32/ge.leo +++ b/tests/compiler/integers/u32/ge.leo @@ -1,3 +1,33 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u32_g.in: | + [main] + a: u32 = 3; + b: u32 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u32_e.in: | + [main] + a: u32 = 2; + b: u32 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u32_f.in: | + [main] + a: u32 = 1; + b: u32 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/u32/gt.leo b/tests/compiler/integers/u32/gt.leo index f76df415c4..3fd2757ad5 100644 --- a/tests/compiler/integers/u32/gt.leo +++ b/tests/compiler/integers/u32/gt.leo @@ -1,3 +1,25 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - u32_g.in: | + [main] + a: u32 = 3; + b: u32 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u32_f.in: | + [main] + a: u32 = 1; + b: u32 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + function main(a: u32, b: u32, c: bool) { console.assert(a > b == c); -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u32/input.leo b/tests/compiler/integers/u32/input.leo index 32604eb3b8..c411a34e9e 100644 --- a/tests/compiler/integers/u32/input.leo +++ b/tests/compiler/integers/u32/input.leo @@ -1,3 +1,16 @@ -function main(a: u32, b: u32) { - console.assert(a == b); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u32_g.in: | + [main] + a: u32 = 2; + b: u32 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32) -> bool { + return a == b; +} diff --git a/tests/compiler/integers/u32/le.leo b/tests/compiler/integers/u32/le.leo index 9a802f896d..a26f621974 100644 --- a/tests/compiler/integers/u32/le.leo +++ b/tests/compiler/integers/u32/le.leo @@ -1,3 +1,33 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u32_f.in: | + [main] + a: u32 = 3; + b: u32 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u32_e.in: | + [main] + a: u32 = 2; + b: u32 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u32_l.in: | + [main] + a: u32 = 1; + b: u32 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/u32/lt.leo b/tests/compiler/integers/u32/lt.leo index 73e5654470..ba504c02ff 100644 --- a/tests/compiler/integers/u32/lt.leo +++ b/tests/compiler/integers/u32/lt.leo @@ -1,3 +1,25 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u32_f.in: | + [main] + a: u32 = 3; + b: u32 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u32_g.in: | + [main] + a: u32 = 1; + b: u32 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32, c: bool) -> bool { + return a < b == c; +} diff --git a/tests/compiler/integers/u32/max.leo b/tests/compiler/integers/u32/max.leo index 4a07281b5d..98b9f1df0c 100644 --- a/tests/compiler/integers/u32/max.leo +++ b/tests/compiler/integers/u32/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u32 = 4294967295; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u32/max_fail.leo b/tests/compiler/integers/u32/max_fail.leo index 6b1631876e..276ccb3bab 100644 --- a/tests/compiler/integers/u32/max_fail.leo +++ b/tests/compiler/integers/u32/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u32 = 4294967296; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u32/min.leo b/tests/compiler/integers/u32/min.leo index 8077e0ec02..3ef31dda9b 100644 --- a/tests/compiler/integers/u32/min.leo +++ b/tests/compiler/integers/u32/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u32 = 0; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u32/min_fail.leo b/tests/compiler/integers/u32/min_fail.leo index c3e3f33225..ca62f4a0df 100644 --- a/tests/compiler/integers/u32/min_fail.leo +++ b/tests/compiler/integers/u32/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u32 = -1; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u32/mod.rs b/tests/compiler/integers/u32/mod.rs deleted file mode 100644 index 7f2d76d198..0000000000 --- a/tests/compiler/integers/u32/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U32Type, UnsignedIntegerType}; - -test_uint!( - TestU32, - u32, - IntegerType::Unsigned(UnsignedIntegerType::U32Type(U32Type {})), - UInt32 -); - -#[test] -fn test_u32_min() { - TestU32::test_min(); -} - -#[test] -fn test_u32_min_fail() { - TestU32::test_min_fail(); -} - -#[test] -fn test_u32_max() { - TestU32::test_max(); -} - -#[test] -fn test_u32_max_fail() { - TestU32::test_max_fail(); -} - -#[test] -fn test_u32_add() { - TestU32::test_add(); -} - -#[test] -fn test_u32_sub() { - TestU32::test_sub(); -} - -#[test] -fn test_u32_mul() { - TestU32::test_mul(); -} - -#[test] -fn test_u32_div() { - TestU32::test_div(); -} - -#[test] -fn test_u32_pow() { - TestU32::test_pow(); -} - -#[test] -fn test_u32_eq() { - TestU32::test_eq(); -} - -#[test] -fn test_u32_ne() { - TestU32::test_ne(); -} - -#[test] -fn test_u32_ge() { - TestU32::test_ge(); -} - -#[test] -fn test_u32_gt() { - TestU32::test_gt(); -} - -#[test] -fn test_u32_le() { - TestU32::test_le(); -} - -#[test] -fn test_u32_lt() { - TestU32::test_lt(); -} - -#[test] -fn test_u32_console_assert() { - TestU32::test_console_assert(); -} - -#[test] -fn test_u32_ternary() { - TestU32::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/u32/mul.leo b/tests/compiler/integers/u32/mul.leo index a77a85477b..b0b6e0f73f 100644 --- a/tests/compiler/integers/u32/mul.leo +++ b/tests/compiler/integers/u32/mul.leo @@ -1,3 +1,17 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a * b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - mul.in: | + [main] + a: u32 = 10; + b: u32 = 20; + c: u32 = 30; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32, c: u32) -> bool { + return a * b == c; +} diff --git a/tests/compiler/integers/u32/ne.leo b/tests/compiler/integers/u32/ne.leo index 00ee1a9989..2df0af5399 100644 --- a/tests/compiler/integers/u32/ne.leo +++ b/tests/compiler/integers/u32/ne.leo @@ -1,3 +1,17 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - ne.in: | + [main] + a: u32 = 10; + b: u32 = 20; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32, c: bool) -> bool { + return a != b == c; +} diff --git a/tests/compiler/integers/u32/no_space_between_literal.leo b/tests/compiler/integers/u32/no_space_between_literal.leo index 83b3caca55..1037049dfb 100644 --- a/tests/compiler/integers/u32/no_space_between_literal.leo +++ b/tests/compiler/integers/u32/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { - const i = 1 u32; -} \ No newline at end of file + const i = 1 u32; +} diff --git a/tests/compiler/integers/u32/pow.leo b/tests/compiler/integers/u32/pow.leo index b82496ff77..b00477b40f 100644 --- a/tests/compiler/integers/u32/pow.leo +++ b/tests/compiler/integers/u32/pow.leo @@ -1,3 +1,3 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a ** b == c); -} \ No newline at end of file +function main(a: u32, b: u32, c: u32) -> bool { + return a ** b == c; +} diff --git a/tests/compiler/integers/u32/sub.leo b/tests/compiler/integers/u32/sub.leo index 54480bd4bc..c8548a1e63 100644 --- a/tests/compiler/integers/u32/sub.leo +++ b/tests/compiler/integers/u32/sub.leo @@ -1,3 +1,17 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a - b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u32_f.in: | + [main] + a: u32 = 4; + b: u32 = 2; + c: u32 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u32, b: u32, c: u32) -> bool { + return a - b == c; +} diff --git a/tests/compiler/integers/u32/ternary.leo b/tests/compiler/integers/u32/ternary.leo index f32ffc29fe..2d46bba693 100644 --- a/tests/compiler/integers/u32/ternary.leo +++ b/tests/compiler/integers/u32/ternary.leo @@ -1,5 +1,29 @@ -function main(s: bool, a: u32, b: u32, c: u32) { - const r = s ? a : b; +/* +namespace: Compile +expectation: Pass +inputs: + - u32_t.in: | + [main] + s: bool = true; + a: u32 = 4; + b: u32 = 2; + c: u32 = 4; - console.assert(r == c); -} \ No newline at end of file + [registers] + r0: bool = true; + - u32_f.in: | + [main] + s: bool = false; + a: u32 = 4; + b: u32 = 2; + c: u32 = 2; + + [registers] + r0: bool = true; +*/ + +function main(s: bool, a: u32, b: u32, c: u32) -> bool { + let r = s ? a : b; + + return r == c; +} diff --git a/tests/compiler/integers/u64/add.leo b/tests/compiler/integers/u64/add.leo index 28abe51201..9478bb1010 100644 --- a/tests/compiler/integers/u64/add.leo +++ b/tests/compiler/integers/u64/add.leo @@ -1,3 +1,17 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a + b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u64.in: | + [main] + a: u64 = 2; + b: u64 = 4; + c: u64 = 6; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64, c: u64) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/u64/console_assert.leo b/tests/compiler/integers/u64/console_assert.leo index ac1d6d40c3..e9e732a268 100644 --- a/tests/compiler/integers/u64/console_assert.leo +++ b/tests/compiler/integers/u64/console_assert.leo @@ -1,3 +1,17 @@ -function main(a: u64, b: u64) { +/* +namespace: Compile +expectation: Pass +inputs: + - u64.in: | + [main] + a: u64 = 2; + b: u64 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64) -> bool { console.assert(a == b); -} \ No newline at end of file + return a == b; +} diff --git a/tests/compiler/integers/u64/div.leo b/tests/compiler/integers/u64/div.leo index 059da236bb..1cd7321331 100644 --- a/tests/compiler/integers/u64/div.leo +++ b/tests/compiler/integers/u64/div.leo @@ -1,3 +1,17 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a / b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u64.in: | + [main] + a: u64 = 4; + b: u64 = 2; + c: u64 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64, c: u64) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/u64/eq.leo b/tests/compiler/integers/u64/eq.leo index 990b2dad2d..0a6f49d7d6 100644 --- a/tests/compiler/integers/u64/eq.leo +++ b/tests/compiler/integers/u64/eq.leo @@ -1,3 +1,25 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u64_e.in: | + [main] + a: u64 = 2; + b: u64 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u64_n.in: | + [main] + a: u64 = 3; + b: u64 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/u64/ge.leo b/tests/compiler/integers/u64/ge.leo index 46ba36ceff..b6bda683a3 100644 --- a/tests/compiler/integers/u64/ge.leo +++ b/tests/compiler/integers/u64/ge.leo @@ -1,3 +1,33 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u64_g.in: | + [main] + a: u64 = 3; + b: u64 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u64_e.in: | + [main] + a: u64 = 2; + b: u64 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u64_f.in: | + [main] + a: u64 = 1; + b: u64 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/u64/gt.leo b/tests/compiler/integers/u64/gt.leo index 7d3032c7f5..08d770aa95 100644 --- a/tests/compiler/integers/u64/gt.leo +++ b/tests/compiler/integers/u64/gt.leo @@ -1,3 +1,25 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - u64_g.in: | + [main] + a: u64 = 3; + b: u64 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u64_f.in: | + [main] + a: u64 = 1; + b: u64 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + function main(a: u64, b: u64, c: bool) { console.assert(a > b == c); -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u64/input.leo b/tests/compiler/integers/u64/input.leo index ac1d6d40c3..460f4d508a 100644 --- a/tests/compiler/integers/u64/input.leo +++ b/tests/compiler/integers/u64/input.leo @@ -1,3 +1,16 @@ -function main(a: u64, b: u64) { - console.assert(a == b); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u64_g.in: | + [main] + a: u64 = 2; + b: u64 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64) -> bool { + return a == b; +} diff --git a/tests/compiler/integers/u64/le.leo b/tests/compiler/integers/u64/le.leo index 625b38d2d9..b83333882b 100644 --- a/tests/compiler/integers/u64/le.leo +++ b/tests/compiler/integers/u64/le.leo @@ -1,3 +1,33 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u64_f.in: | + [main] + a: u64 = 3; + b: u64 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u64_e.in: | + [main] + a: u64 = 2; + b: u64 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u64_l.in: | + [main] + a: u64 = 1; + b: u64 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/u64/lt.leo b/tests/compiler/integers/u64/lt.leo index ed379f7341..4e30c8d848 100644 --- a/tests/compiler/integers/u64/lt.leo +++ b/tests/compiler/integers/u64/lt.leo @@ -1,3 +1,25 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u64_f.in: | + [main] + a: u64 = 3; + b: u64 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u64_g.in: | + [main] + a: u64 = 1; + b: u64 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64, c: bool) -> bool { + return a < b == c; +} diff --git a/tests/compiler/integers/u64/max.leo b/tests/compiler/integers/u64/max.leo index f14ac7ce64..f0067949fa 100644 --- a/tests/compiler/integers/u64/max.leo +++ b/tests/compiler/integers/u64/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u64 = 18446744073709551615; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u64/max_fail.leo b/tests/compiler/integers/u64/max_fail.leo index d606c83585..7755551729 100644 --- a/tests/compiler/integers/u64/max_fail.leo +++ b/tests/compiler/integers/u64/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u64 = 18446744073709551616; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u64/min.leo b/tests/compiler/integers/u64/min.leo index b1da40b14c..559cccdb1a 100644 --- a/tests/compiler/integers/u64/min.leo +++ b/tests/compiler/integers/u64/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u64 = 0; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u64/min_fail.leo b/tests/compiler/integers/u64/min_fail.leo index e58f1897e6..d35f6cb787 100644 --- a/tests/compiler/integers/u64/min_fail.leo +++ b/tests/compiler/integers/u64/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u64 = -1; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u64/mod.rs b/tests/compiler/integers/u64/mod.rs deleted file mode 100644 index 1a2af24ddd..0000000000 --- a/tests/compiler/integers/u64/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U64Type, UnsignedIntegerType}; - -test_uint!( - TestU64, - u64, - IntegerType::Unsigned(UnsignedIntegerType::U64Type(U64Type {})), - UInt64 -); - -#[test] -fn test_u64_min() { - TestU64::test_min(); -} - -#[test] -fn test_u64_min_fail() { - TestU64::test_min_fail(); -} - -#[test] -fn test_u64_max() { - TestU64::test_max(); -} - -#[test] -fn test_u64_max_fail() { - TestU64::test_max_fail(); -} - -#[test] -fn test_u64_add() { - TestU64::test_add(); -} - -#[test] -fn test_u64_sub() { - TestU64::test_sub(); -} - -#[test] -fn test_u64_mul() { - TestU64::test_mul(); -} - -#[test] -fn test_u64_div() { - TestU64::test_div(); -} - -#[test] -fn test_u64_pow() { - TestU64::test_pow(); -} - -#[test] -fn test_u64_eq() { - TestU64::test_eq(); -} - -#[test] -fn test_u64_ne() { - TestU64::test_ne(); -} - -#[test] -fn test_u64_ge() { - TestU64::test_ge(); -} - -#[test] -fn test_u64_gt() { - TestU64::test_gt(); -} - -#[test] -fn test_u64_le() { - TestU64::test_le(); -} - -#[test] -fn test_u64_lt() { - TestU64::test_lt(); -} - -#[test] -fn test_u64_console_assert() { - TestU64::test_console_assert(); -} - -#[test] -fn test_u64_ternary() { - TestU64::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/u64/mul.leo b/tests/compiler/integers/u64/mul.leo index 2633e6780c..483e440823 100644 --- a/tests/compiler/integers/u64/mul.leo +++ b/tests/compiler/integers/u64/mul.leo @@ -1,3 +1,17 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a * b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - mul.in: | + [main] + a: u64 = 10; + b: u64 = 20; + c: u64 = 30; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64, c: u64) -> bool { + return a * b == c; +} diff --git a/tests/compiler/integers/u64/ne.leo b/tests/compiler/integers/u64/ne.leo index e47acbb1de..1cd832ce16 100644 --- a/tests/compiler/integers/u64/ne.leo +++ b/tests/compiler/integers/u64/ne.leo @@ -1,3 +1,17 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - ne.in: | + [main] + a: u64 = 10; + b: u64 = 20; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64, c: bool) -> bool { + return a != b == c; +} diff --git a/tests/compiler/integers/u64/no_space_between_literal.leo b/tests/compiler/integers/u64/no_space_between_literal.leo index 852fd5c2aa..8c715a07d4 100644 --- a/tests/compiler/integers/u64/no_space_between_literal.leo +++ b/tests/compiler/integers/u64/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { - const i = 1 u64; -} \ No newline at end of file + const i = 1 u64; +} diff --git a/tests/compiler/integers/u64/pow.leo b/tests/compiler/integers/u64/pow.leo index 64f0694ed1..3b47d849fa 100644 --- a/tests/compiler/integers/u64/pow.leo +++ b/tests/compiler/integers/u64/pow.leo @@ -1,3 +1,3 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a ** b == c); -} \ No newline at end of file +function main(a: u64, b: u64, c: u64) -> bool { + return a ** b == c; +} diff --git a/tests/compiler/integers/u64/sub.leo b/tests/compiler/integers/u64/sub.leo index 9961f0f7b7..c5aa32b477 100644 --- a/tests/compiler/integers/u64/sub.leo +++ b/tests/compiler/integers/u64/sub.leo @@ -1,3 +1,17 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a - b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u64_f.in: | + [main] + a: u64 = 4; + b: u64 = 2; + c: u64 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u64, b: u64, c: u64) -> bool { + return a - b == c; +} diff --git a/tests/compiler/integers/u64/ternary.leo b/tests/compiler/integers/u64/ternary.leo index 4427cd0466..1790fa8040 100644 --- a/tests/compiler/integers/u64/ternary.leo +++ b/tests/compiler/integers/u64/ternary.leo @@ -1,5 +1,29 @@ -function main(s: bool, a: u64, b: u64, c: u64) { - const r = s ? a : b; +/* +namespace: Compile +expectation: Pass +inputs: + - u64_t.in: | + [main] + s: bool = true; + a: u64 = 4; + b: u64 = 2; + c: u64 = 4; - console.assert(r == c); -} \ No newline at end of file + [registers] + r0: bool = true; + - u64_f.in: | + [main] + s: bool = false; + a: u64 = 4; + b: u64 = 2; + c: u64 = 2; + + [registers] + r0: bool = true; +*/ + +function main(s: bool, a: u64, b: u64, c: u64) -> bool { + let r = s ? a : b; + + return r == c; +} diff --git a/tests/compiler/integers/u8/add.leo b/tests/compiler/integers/u8/add.leo index 1b40e304d2..aca4a0366d 100644 --- a/tests/compiler/integers/u8/add.leo +++ b/tests/compiler/integers/u8/add.leo @@ -1,3 +1,17 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a + b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u8.in: | + [main] + a: u8 = 2; + b: u8 = 4; + c: u8 = 6; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: u8) -> bool { + return a + b == c; +} diff --git a/tests/compiler/integers/u8/console_assert.leo b/tests/compiler/integers/u8/console_assert.leo index 4d99dc106c..710787e4f9 100644 --- a/tests/compiler/integers/u8/console_assert.leo +++ b/tests/compiler/integers/u8/console_assert.leo @@ -1,3 +1,17 @@ -function main(a: u8, b: u8) { +/* +namespace: Compile +expectation: Pass +inputs: + - u8.in: | + [main] + a: u8 = 2; + b: u8 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8) -> bool { console.assert(a == b); -} \ No newline at end of file + return a == b; +} diff --git a/tests/compiler/integers/u8/div.leo b/tests/compiler/integers/u8/div.leo index 945aa94c30..b6a8ff68ec 100644 --- a/tests/compiler/integers/u8/div.leo +++ b/tests/compiler/integers/u8/div.leo @@ -1,3 +1,17 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a / b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u8.in: | + [main] + a: u8 = 4; + b: u8 = 2; + c: u8 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: u8) -> bool { + return a / b == c; +} diff --git a/tests/compiler/integers/u8/eq.leo b/tests/compiler/integers/u8/eq.leo index c2a487b0e7..d73a7ab9ca 100644 --- a/tests/compiler/integers/u8/eq.leo +++ b/tests/compiler/integers/u8/eq.leo @@ -1,3 +1,25 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u8_e.in: | + [main] + a: u8 = 2; + b: u8 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u8_n.in: | + [main] + a: u8 = 3; + b: u8 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: bool) -> bool { + return a == b == c; +} diff --git a/tests/compiler/integers/u8/ge.leo b/tests/compiler/integers/u8/ge.leo index d819422276..f51243237f 100644 --- a/tests/compiler/integers/u8/ge.leo +++ b/tests/compiler/integers/u8/ge.leo @@ -1,3 +1,33 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u8_g.in: | + [main] + a: u8 = 3; + b: u8 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u8_e.in: | + [main] + a: u8 = 2; + b: u8 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u8_f.in: | + [main] + a: u8 = 1; + b: u8 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: bool) -> bool { + return a >= b == c; +} diff --git a/tests/compiler/integers/u8/gt.leo b/tests/compiler/integers/u8/gt.leo index 87843f575f..b650667253 100644 --- a/tests/compiler/integers/u8/gt.leo +++ b/tests/compiler/integers/u8/gt.leo @@ -1,3 +1,25 @@ +/* +namespace: Compile +expectation: Pass +inputs: + - u8_g.in: | + [main] + a: u8 = 3; + b: u8 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u8_f.in: | + [main] + a: u8 = 1; + b: u8 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + function main(a: u8, b: u8, c: bool) { console.assert(a > b == c); -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u8/input.leo b/tests/compiler/integers/u8/input.leo index 4d99dc106c..06e53ef670 100644 --- a/tests/compiler/integers/u8/input.leo +++ b/tests/compiler/integers/u8/input.leo @@ -1,3 +1,16 @@ -function main(a: u8, b: u8) { - console.assert(a == b); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u8_g.in: | + [main] + a: u8 = 2; + b: u8 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8) -> bool { + return a == b; +} diff --git a/tests/compiler/integers/u8/le.leo b/tests/compiler/integers/u8/le.leo index 2607b7f3d1..f2a66ab074 100644 --- a/tests/compiler/integers/u8/le.leo +++ b/tests/compiler/integers/u8/le.leo @@ -1,3 +1,33 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u8_f.in: | + [main] + a: u8 = 3; + b: u8 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u8_e.in: | + [main] + a: u8 = 2; + b: u8 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u8_l.in: | + [main] + a: u8 = 1; + b: u8 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: bool) -> bool { + return a <= b == c; +} diff --git a/tests/compiler/integers/u8/lt.leo b/tests/compiler/integers/u8/lt.leo index 7495d0fe37..d47a4b411d 100644 --- a/tests/compiler/integers/u8/lt.leo +++ b/tests/compiler/integers/u8/lt.leo @@ -1,3 +1,25 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u8_f.in: | + [main] + a: u8 = 3; + b: u8 = 2; + c: bool = true; + + [registers] + r0: bool = true; + - u8_g.in: | + [main] + a: u8 = 1; + b: u8 = 2; + c: bool = false; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: bool) -> bool { + return a < b == c; +} diff --git a/tests/compiler/integers/u8/max.leo b/tests/compiler/integers/u8/max.leo index 03e82c9a5e..7e1a1822ab 100644 --- a/tests/compiler/integers/u8/max.leo +++ b/tests/compiler/integers/u8/max.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u8 = 255; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u8/max_fail.leo b/tests/compiler/integers/u8/max_fail.leo index 01bb544601..59151c571a 100644 --- a/tests/compiler/integers/u8/max_fail.leo +++ b/tests/compiler/integers/u8/max_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u8 = 256; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u8/min.leo b/tests/compiler/integers/u8/min.leo index 1db08a07b5..c16193901a 100644 --- a/tests/compiler/integers/u8/min.leo +++ b/tests/compiler/integers/u8/min.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Pass +*/ + function main() { const a: u8 = 0; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u8/min_fail.leo b/tests/compiler/integers/u8/min_fail.leo index 3cd8d46de7..a2b2df1de9 100644 --- a/tests/compiler/integers/u8/min_fail.leo +++ b/tests/compiler/integers/u8/min_fail.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { const a: u8 = -1; -} \ No newline at end of file +} diff --git a/tests/compiler/integers/u8/mod.rs b/tests/compiler/integers/u8/mod.rs deleted file mode 100644 index f1fb2b0fab..0000000000 --- a/tests/compiler/integers/u8/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U8Type, UnsignedIntegerType}; - -test_uint!( - TestU8, - u8, - IntegerType::Unsigned(UnsignedIntegerType::U8Type(U8Type {})), - UInt8 -); - -#[test] -fn test_u8_min() { - TestU8::test_min(); -} - -#[test] -fn test_u8_min_fail() { - TestU8::test_min_fail(); -} - -#[test] -fn test_u8_max() { - TestU8::test_max(); -} - -#[test] -fn test_u8_max_fail() { - TestU8::test_max_fail(); -} - -#[test] -fn test_u8_add() { - TestU8::test_add(); -} - -#[test] -fn test_u8_sub() { - TestU8::test_sub(); -} - -#[test] -fn test_u8_mul() { - TestU8::test_mul(); -} - -#[test] -fn test_u8_div() { - TestU8::test_div(); -} - -#[test] -fn test_u8_pow() { - TestU8::test_pow(); -} - -#[test] -fn test_u8_eq() { - TestU8::test_eq(); -} - -#[test] -fn test_u8_ne() { - TestU8::test_ne(); -} - -#[test] -fn test_u8_ge() { - TestU8::test_ge(); -} - -#[test] -fn test_u8_gt() { - TestU8::test_gt(); -} - -#[test] -fn test_u8_le() { - TestU8::test_le(); -} - -#[test] -fn test_u8_lt() { - TestU8::test_lt(); -} - -#[test] -fn test_u8_console_assert() { - TestU8::test_console_assert(); -} - -#[test] -fn test_u8_ternary() { - TestU8::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/tests/compiler/integers/u8/mul.leo b/tests/compiler/integers/u8/mul.leo index 11acf4688b..93b95c601f 100644 --- a/tests/compiler/integers/u8/mul.leo +++ b/tests/compiler/integers/u8/mul.leo @@ -1,3 +1,17 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a * b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - mul.in: | + [main] + a: u8 = 10; + b: u8 = 20; + c: u8 = 30; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: u8) -> bool { + return a * b == c; +} diff --git a/tests/compiler/integers/u8/ne.leo b/tests/compiler/integers/u8/ne.leo index e75194a2f2..d8c635ba6a 100644 --- a/tests/compiler/integers/u8/ne.leo +++ b/tests/compiler/integers/u8/ne.leo @@ -1,3 +1,17 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - ne.in: | + [main] + a: u8 = 10; + b: u8 = 20; + c: bool = true; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: bool) -> bool { + return a != b == c; +} diff --git a/tests/compiler/integers/u8/no_space_between_literal.leo b/tests/compiler/integers/u8/no_space_between_literal.leo index 64eba2a083..8514926ec7 100644 --- a/tests/compiler/integers/u8/no_space_between_literal.leo +++ b/tests/compiler/integers/u8/no_space_between_literal.leo @@ -1,3 +1,8 @@ +/* +namespace: Compile +expectation: Fail +*/ + function main() { - const i = 1 u8; -} \ No newline at end of file + const i = 1 u8; +} diff --git a/tests/compiler/integers/u8/pow.leo b/tests/compiler/integers/u8/pow.leo index 928ab73b0d..5651d25e1f 100644 --- a/tests/compiler/integers/u8/pow.leo +++ b/tests/compiler/integers/u8/pow.leo @@ -1,3 +1,17 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a ** b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u8_f.in: | + [main] + a: u8 = 2; + b: u8 = 2; + c: u8 = 4; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: u8) -> bool { + return a ** b == c; +} diff --git a/tests/compiler/integers/u8/sub.leo b/tests/compiler/integers/u8/sub.leo index 1335409c29..421a47cbbb 100644 --- a/tests/compiler/integers/u8/sub.leo +++ b/tests/compiler/integers/u8/sub.leo @@ -1,3 +1,17 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a - b == c); -} \ No newline at end of file +/* +namespace: Compile +expectation: Pass +inputs: + - u8_f.in: | + [main] + a: u8 = 4; + b: u8 = 2; + c: u8 = 2; + + [registers] + r0: bool = true; +*/ + +function main(a: u8, b: u8, c: u8) -> bool { + return a - b == c; +} diff --git a/tests/compiler/integers/u8/ternary.leo b/tests/compiler/integers/u8/ternary.leo index 5123a511cd..9cabdb5fcc 100644 --- a/tests/compiler/integers/u8/ternary.leo +++ b/tests/compiler/integers/u8/ternary.leo @@ -1,5 +1,29 @@ -function main(s: bool, a: u8, b: u8, c: u8) { - const r = s ? a : b; +/* +namespace: Compile +expectation: Pass +inputs: + - u8_t.in: | + [main] + s: bool = true; + a: u8 = 4; + b: u8 = 2; + c: u8 = 4; - console.assert(r == c); -} \ No newline at end of file + [registers] + r0: bool = true; + - u8_f.in: | + [main] + s: bool = false; + a: u8 = 4; + b: u8 = 2; + c: u8 = 2; + + [registers] + r0: bool = true; +*/ + +function main(s: bool, a: u8, b: u8, c: u8) -> bool { + let r = s ? a : b; + + return r == c; +} diff --git a/tests/compiler/integers/uint_macro.rs b/tests/compiler/integers/uint_macro.rs deleted file mode 100644 index 393ed1c7a6..0000000000 --- a/tests/compiler/integers/uint_macro.rs +++ /dev/null @@ -1,476 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -macro_rules! test_uint { - ($name: ident, $type_: ty, $integer_type: expr, $gadget: ty) => { - pub struct $name {} - - impl IntegerTester for $name { - fn test_min() { - let program_string = include_str!("min.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); - } - - fn test_min_fail() { - let program_string = include_str!("min_fail.leo"); - let program = parse_program(program_string).err().unwrap(); - - expect_asg_error(program); - } - - fn test_max() { - let program_string = include_str!("max.leo"); - let error = parse_program(program_string).unwrap(); - - assert_satisfied(error); - } - - fn test_max_fail() { - let program_string = include_str!("max_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); - } - - fn test_add() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_add(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("add.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_sub() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_sub(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("sub.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_mul() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_mul(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("mul.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_div() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_div(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("div.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_pow() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // rust specific conversion see https://doc.rust-lang.org/std/primitive.u8.html#method.checked_pow - let c = match a.checked_pow(b as u32) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("pow.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_eq() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.eq(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_ne() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test a != a == false - - let program_string = include_str!("ne.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.ne(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_ge() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("ge.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test greater or equal - - let c = a.ge(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_gt() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("gt.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test greater than - - let c = a.gt(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_le() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("le.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test less or equal - - let c = a.le(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_lt() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("lt.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test less or equal - - let c = a.lt(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_console_assert() { - for _ in 0..10 { - let a: $type_ = rand::random(); - - // test equal - let program_string = include_str!("console_assert.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - let b: $type_ = rand::random(); - - if a == b { - continue; - } - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } - } - - fn test_ternary() { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let program_string = include_str!("ternary.leo"); - let mut program = parse_program(program_string).unwrap(); - - // true -> field 1 - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(true))), - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, a.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // false -> field 2 - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(false))), - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - }; -} diff --git a/tests/expectations/compiler/compiler/integers/u128/add.leo.out b/tests/expectations/compiler/compiler/integers/u128/add.leo.out new file mode 100644 index 0000000000..0877f467a3 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/add.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 769 + num_constraints: 770 + at: d8a4c69e3b90fec9af0a2534c6a0372e5ee816f28e315b9c3aa448b90abb7ba5 + bt: 3bd68a594ade714a6dce154fa8fe1b206c3339d591863157d5d4a30e82be8c38 + ct: ee4814a6df109d34265d062047ac22141174bab478caf254c5623f917c5d7a66 + output: + - input_file: u128.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out new file mode 100644 index 0000000000..b839457a1a --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/console_assert.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 766 + num_constraints: 766 + at: 2c054edb296bccaaeb01e2eb08e8dceaeaeb5e24eb41807a3a7996ea5b56e53c + bt: a6020f3baa81181dab1735218a3d3c8a2504b7f30c6c73c0c12e8edf0aa403b6 + ct: 22bcd53d2a96f7cf838f37fb01781267764156a778d5b2df80572f5030de4b0f + output: + - input_file: u128.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/div.leo.out b/tests/expectations/compiler/compiler/integers/u128/div.leo.out new file mode 100644 index 0000000000..487e3c8f01 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/div.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 50562 + num_constraints: 50946 + at: 0f5d84d9873d45008f4e0feaf4b93323f33277677a9b2d48c6dc0431affbe0a3 + bt: 5f17f32257e466ef51120fe4cb2d1d2039bcf5bf39c3c477ec09c966419719c9 + ct: d4285993ccb479eefff4da2590ce08924fe8d1750c916a794036f8131d1d720e + output: + - input_file: u128.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/eq.leo.out b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out new file mode 100644 index 0000000000..2869be3f80 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/eq.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 513 + num_constraints: 513 + at: 1394ad70170ddf61787d75c37b0438dc380e73ed0570a0755e1ea121261f084b + bt: c1e085f0d8047bc5b5f574ca9de7d79a0ce3b3235e3bfb83ff15aecf05ad1323 + ct: c224fec21cf5a2b24eb94033a20aeb4729d3d0cf596339145cb49ea6a44cc5d8 + output: + - input_file: u128_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u128_n.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/ge.leo.out b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out new file mode 100644 index 0000000000..60e513fdad --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/ge.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 897 + num_constraints: 897 + at: 983b6b8a791cffc8ccf2e04825e86de304bd5933050b17a9c9d163cea94ce39b + bt: 75543c2d7e977fd59df93d598b3ba1ab92b7e6048a823fb41969668e29286a6b + ct: 8d7309bdb692a71de6c9efc246984ce389534e8fc31222a94d5217720c2d20e9 + output: + - input_file: u128_g.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u128_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u128_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/gt.leo.out b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out new file mode 100644 index 0000000000..86cc1ddeec --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/gt.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 897 + num_constraints: 897 + at: 3d6229f725268e89a402192cd8760652d20315a669e0ca8e13de703fc7a99bab + bt: 2005303715fb1fda8dbf03970acb45982b78b7c61034b172e9ea3cd363a013f8 + ct: 8d7309bdb692a71de6c9efc246984ce389534e8fc31222a94d5217720c2d20e9 + output: + - input_file: u128_g.in + output: + registers: {} + - input_file: u128_f.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/u128/input.leo.out b/tests/expectations/compiler/compiler/integers/u128/input.leo.out new file mode 100644 index 0000000000..43db8568e6 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/input.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 511 + num_constraints: 511 + at: 7dcc86d79e1657a96155485d8aac78bca5392b8376b33faae47dfc973b4e810d + bt: 7ac37b347f82644239128aa66e9caf34375b1fd860069659581477883d92fb7a + ct: 3e4c7833e73f9ee37e42c796e8af7a6d417a012b776b348abedbfd317110858d + output: + - input_file: u128_g.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/le.leo.out b/tests/expectations/compiler/compiler/integers/u128/le.leo.out new file mode 100644 index 0000000000..8930709315 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/le.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 897 + num_constraints: 897 + at: a0a7d9bb5470350ea51e092afebb394ef3bac50ae23c11dd856c76251d80bf06 + bt: 8e0a2864aa6383434f6d7843e06d6594b85a65b2009c612f72b3d8c6f07fb4ef + ct: 8d7309bdb692a71de6c9efc246984ce389534e8fc31222a94d5217720c2d20e9 + output: + - input_file: u128_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u128_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u128_l.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u128/lt.leo.out b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out new file mode 100644 index 0000000000..7f88b21c32 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/lt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 897 + num_constraints: 897 + at: 806020409e835c8ec9c66af54867f86d986a1ccb479d28cf63925fddd28fef1f + bt: 1669da8e0d67919ecf7e28a3727b73be52d08f9af5feb640a8cd6f2d302caa07 + ct: 8d7309bdb692a71de6c9efc246984ce389534e8fc31222a94d5217720c2d20e9 + output: + - input_file: u128_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u128_g.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u128/max.leo.out b/tests/expectations/compiler/compiler/integers/u128/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..a8d68ec28d --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u128/max_fail.leo:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '340282366920938463463374607431768211456'" diff --git a/tests/expectations/compiler/compiler/integers/u128/min.leo.out b/tests/expectations/compiler/compiler/integers/u128/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..b3f0b5025d --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u128/min_fail.leo:4:21\n |\n 4 | const a: u128 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u128/mul.leo.out b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out new file mode 100644 index 0000000000..964ab38279 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/mul.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 50431 + num_constraints: 66944 + at: 89ff29ce1a3521c3820bb891428af41f569b3901bc24403db115c9dc73ecf82d + bt: 011ebf5dd53ae194c7135690f3bc6307a362ea10ba113e19ae7195be6ab375a9 + ct: 147b92b75d75f78bed11d65294d9ae2479b8ab32f98521755557fd54076f3c07 + output: + - input_file: mul.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u128/ne.leo.out b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out new file mode 100644 index 0000000000..1cc84f247b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/ne.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 513 + num_constraints: 513 + at: 48bbe0018b41afb2e67252317f5b9562174680891247b191932e8c9ddfac6235 + bt: edc1de9388a8bb2c659c9b4e9deecd8406826abcfe220d295bf7d85a550c0c43 + ct: c224fec21cf5a2b24eb94033a20aeb4729d3d0cf596339145cb49ea6a44cc5d8 + output: + - input_file: ne.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out new file mode 100644 index 0000000000..6190090732 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u128/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u128;\n | ^\n |\n = Unexpected white space between terms 1 and u128" diff --git a/tests/expectations/compiler/compiler/integers/u128/sub.leo.out b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out new file mode 100644 index 0000000000..48e6dd93b2 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/sub.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 769 + num_constraints: 770 + at: d8a4c69e3b90fec9af0a2534c6a0372e5ee816f28e315b9c3aa448b90abb7ba5 + bt: 3bd68a594ade714a6dce154fa8fe1b206c3339d591863157d5d4a30e82be8c38 + ct: 950ff5f999ac2edfb80654ff5270b048ac8a19131c655af6d145533a9ef97c6f + output: + - input_file: u128_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out new file mode 100644 index 0000000000..69611dd6d5 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u128/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 896 + num_constraints: 1024 + at: 2ba7f5e796779d99922e1b044ce5614b7e35945ff743c2b54412f00570bb935f + bt: 1fb9bfc22c01a54c08602e7f3883c19b00de1070aa9bad9e9234e322f9043711 + ct: ee9facabe4c76f5eb89984d3c5cb15f92eaa0cc3b4bc4fdff261aeb36ad0101b + output: + - input_file: u128_t.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u128_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/add.leo.out b/tests/expectations/compiler/compiler/integers/u16/add.leo.out new file mode 100644 index 0000000000..0178a79394 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/add.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 96 + num_constraints: 97 + at: 0b612b91a5711faa9b25368b800ec27054f6bec2936b376f723c4e134750a358 + bt: c404ca4ebed24418ea98c0994a710e335e65d373114e9e1be5ba5354ced20806 + ct: 7413addd13f168a5677d482e41bd131e5773eca1ab5c5bd62829ed0b67fd3508 + output: + - input_file: u16.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out new file mode 100644 index 0000000000..6a60c4c7eb --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/console_assert.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 94 + num_constraints: 94 + at: e743cc2f3a0973d5f1b6cc60690a16fc51e6e7c622ce1317308f5f90f51e98ff + bt: 7a2ed9c91a2df8eed7704b5a71f92b9e20beeade151f02135169ab5f4ca69b6a + ct: 09526721ae1dd7355e4608df2b3eabc5c7007bceb8c6b99389aa8160c63a8982 + output: + - input_file: u16.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/div.leo.out b/tests/expectations/compiler/compiler/integers/u16/div.leo.out new file mode 100644 index 0000000000..1f85378288 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/div.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 913 + num_constraints: 961 + at: 38222d75f2dd22e5017b242315b139e3ffb62b3f1c7e62fb744b1fd2cdcd3b7b + bt: 9a48749a964cf80e8bacc149bcdc3524853fb3517f848522553e7da6e273f715 + ct: 82ac3f91dba2daec2992e4aaea085ff388f59e0e26330488e1dd2be11d79308d + output: + - input_file: u16.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/eq.leo.out b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out new file mode 100644 index 0000000000..2062843390 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/eq.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 65 + num_constraints: 65 + at: d1e727ca124b8a409ccaa2404651441e669134e272d9d6635564d4e2509b7ebb + bt: eba2113bdda3d667d9e8c87f545fe4e2a0143b18a3fff0c1aaa46dd376ed1735 + ct: f037d279ccea3ca689e05801ec3ba0053b5ce66a1763d4620262ea9b69873008 + output: + - input_file: u16_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u16_n.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/ge.leo.out b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out new file mode 100644 index 0000000000..04971d60f7 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/ge.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 113 + num_constraints: 113 + at: 4c642bff63f8bf685dfd92e5c9688d445da4e9ec8e088a05845d59d20f3108d6 + bt: 43d500d0bdcdf8461bd9605a2665bc17410cb0c7b1c743142aad3a41e74fcbe5 + ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 + output: + - input_file: u16_g.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u16_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u16_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/gt.leo.out b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out new file mode 100644 index 0000000000..48b3de664e --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/gt.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 113 + num_constraints: 113 + at: a6773378571451240e431a69892efae59e2a3a7fc48f0681cc43f89758ccb087 + bt: 417dc25c14bf36db410808a30f2263083728f1158cbf74a81bd8d8b5cba878d9 + ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 + output: + - input_file: u16_g.in + output: + registers: {} + - input_file: u16_f.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/u16/input.leo.out b/tests/expectations/compiler/compiler/integers/u16/input.leo.out new file mode 100644 index 0000000000..786fa72fe4 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/input.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 63 + num_constraints: 63 + at: 4cac6455a624606970ebe776412ee9b9d5800577aea1fad0677b866e991b6181 + bt: abee7b67c55170fc3341444203a9a70e68690dce751aa36d3e91f1cf7ceef73d + ct: 51c18ee4216feeb01d0b0d661dfeb294e7e100873586edf79be89c8b54d9e168 + output: + - input_file: u16_g.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/le.leo.out b/tests/expectations/compiler/compiler/integers/u16/le.leo.out new file mode 100644 index 0000000000..ad470cd8b8 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/le.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 113 + num_constraints: 113 + at: 2caa8ab46e1a7425363292ccd1ebc91398ec8b9f2819b5678b8ce34aca296881 + bt: 7549aaa9e0eaa389b14dbf7a0c15122a1cd9707f492b8bedee98ae8f09bd9142 + ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 + output: + - input_file: u16_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u16_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u16_l.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u16/lt.leo.out b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out new file mode 100644 index 0000000000..366639fc9f --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/lt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 113 + num_constraints: 113 + at: 9d8dfce3ccafba84f7f1244545ccdae9d7f7939ef1fb1b66d290f5c604050666 + bt: 1bbe7b7f496597bd94e86ea0452146e8360ba0b2b2d922a81cfc51b4b5fa4fda + ct: 92784334fb47e5a53eb972ec42d95f97470117bb6839cf2d46e8fcbd38a662f9 + output: + - input_file: u16_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u16_g.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u16/max.leo.out b/tests/expectations/compiler/compiler/integers/u16/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..68b98c5845 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u16/max_fail.leo:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^\n |\n = failed to parse int value '65536'" diff --git a/tests/expectations/compiler/compiler/integers/u16/min.leo.out b/tests/expectations/compiler/compiler/integers/u16/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..5eec48f390 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u16/min_fail.leo:4:20\n |\n 4 | const a: u16 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u16/mul.leo.out b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out new file mode 100644 index 0000000000..2bf9d16cf3 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/mul.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 899 + num_constraints: 1172 + at: 27bcf7c8bd272206f044bfb7ec1e3b8b69a86cd737d8818b12b9fa8235f7b94e + bt: f660e7fad189d6e454e78216e0128e07d47145da1eeb6b53ed5a73cdf4fe9888 + ct: 267549c071634baac2f681f050ede9777ca6d302d8a0ca04c60f6f60e497d64e + output: + - input_file: mul.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u16/ne.leo.out b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out new file mode 100644 index 0000000000..31f41f164f --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/ne.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 65 + num_constraints: 65 + at: 0fdea959dac884336ecafa3d6ae5bb268aaefacd91e099a206f2974681d6a0a8 + bt: 30bc7cfbc53a2e928ca0310b6041f1f1548ad7c1197ffc9301b46522122e5561 + ct: f037d279ccea3ca689e05801ec3ba0053b5ce66a1763d4620262ea9b69873008 + output: + - input_file: ne.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out new file mode 100644 index 0000000000..03c73b5848 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u16/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u16;\n | ^\n |\n = Unexpected white space between terms 1 and u16" diff --git a/tests/expectations/compiler/compiler/integers/u16/pow.leo.out b/tests/expectations/compiler/compiler/integers/u16/pow.leo.out new file mode 100644 index 0000000000..3db463ad76 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/pow.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 26847 + num_constraints: 35839 + at: 60e4ca8986bb9be35a32592f396a840e2a589c3313e88c7a7e0560cc90f5aabc + bt: fcc7eca9b990faff84958bccb424d52d122271d4a28f14f7977a0ee13626825f + ct: adfdc17059fec9d5afc537f7a1fa8d2616e48017333a2c0b982568865c1e2122 + output: + - input_file: u16_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/sub.leo.out b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out new file mode 100644 index 0000000000..42e96ffbaf --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/sub.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 96 + num_constraints: 97 + at: 0b612b91a5711faa9b25368b800ec27054f6bec2936b376f723c4e134750a358 + bt: c404ca4ebed24418ea98c0994a710e335e65d373114e9e1be5ba5354ced20806 + ct: 81a951fd0bc0072abf02978c9c6547c090936985ea19b50e3c148595d4870599 + output: + - input_file: u16_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out new file mode 100644 index 0000000000..7cea1c4948 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u16/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 112 + num_constraints: 128 + at: 58c61c468b93481b5691b278622e567b5a718e6411cce53fdbe46e2839bdf8c3 + bt: 0e5faacb5d80488eeda9e7fa79ddd96e54c010e0e98571449f79cad816cc18a2 + ct: 2b3428d7c7335edc32ab219fe11c92e215d70a52c89434de349f4951561d5795 + output: + - input_file: u16_t.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u16_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/add.leo.out b/tests/expectations/compiler/compiler/integers/u32/add.leo.out new file mode 100644 index 0000000000..4b412385b9 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/add.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 192 + num_constraints: 193 + at: 844f8ddd185206ae97ce65d91e247a34cd7d12c6a2a6300bfefdeece068ccde6 + bt: db97ec2b7f2b40889263b26fc6f01de19f78a4b007371ad2f54869e9a31d21db + ct: 2773a172ee849b2e45b68f0c367651fc5a0715e9415d2d97601d41e540d713d0 + output: + - input_file: u32.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out new file mode 100644 index 0000000000..48b9be14c3 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/console_assert.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 190 + num_constraints: 190 + at: 50e55296085087c5ca1fd3d7c3894d10dd4bad60b83c4a7984e8dbf77126e92b + bt: fbf306d0d13bf3d40926ad7adc07f122cb8d065e7e5d55f3416ac30d7ebe7a7c + ct: 97e2acff1b76912c52107342393ec04a09af81353a25f7ce330b8492f41381cf + output: + - input_file: u32.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/div.leo.out b/tests/expectations/compiler/compiler/integers/u32/div.leo.out new file mode 100644 index 0000000000..f8d2f5fae5 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/div.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3361 + num_constraints: 3457 + at: 2edc6d9666efc4ff81d37d73f724501de64288cbe5f9d888f48868c30f548688 + bt: 4984a34e571417eb6ce209b1542beefad525200e782ec88e6f5c58c440402f33 + ct: a0b70b0006b80beff40b0f991739c129cdf3a759c4d7c85c274f59ad62e103d5 + output: + - input_file: u32.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/eq.leo.out b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out new file mode 100644 index 0000000000..bf63d4b68d --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/eq.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 129 + num_constraints: 129 + at: 669271745b6c4fd803216e0e59f47da168d7e5bb9f7058232265a79c62f67696 + bt: e63628fc48d1e71ea44830c010e442f577239e29f7ffada0d8df34c28e67f107 + ct: 9f4c72431c0c7c03e216195a071c971c53deed8e3bfce450bffb3a6fad7418d5 + output: + - input_file: u32_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u32_n.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/ge.leo.out b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out new file mode 100644 index 0000000000..7c1cea5e83 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/ge.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 225 + num_constraints: 225 + at: 589d7168d25ef5775b171257cb3677bb22c95d8b2ade148e8d70c20fed37161c + bt: 37e95d209b9ca56b6ed5debe1d21d2c72e48d6a0898a59833bdf3daf2ce1c96b + ct: d7067f500143a40e015fd1f4447a4ea5b9ee6ebdf007e08be51772a8a2b672c3 + output: + - input_file: u32_g.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u32_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u32_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/gt.leo.out b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out new file mode 100644 index 0000000000..3b8d391bf4 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/gt.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 225 + num_constraints: 225 + at: 77a5c3680e4d8961411b0b7384818f4a3d79a52e20d0ccb268ce820570b56e11 + bt: 3a99f6fa32ac0358a66ac53d0cef7af442097730b5f56ec8f8d9974108f25215 + ct: d7067f500143a40e015fd1f4447a4ea5b9ee6ebdf007e08be51772a8a2b672c3 + output: + - input_file: u32_g.in + output: + registers: {} + - input_file: u32_f.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/u32/input.leo.out b/tests/expectations/compiler/compiler/integers/u32/input.leo.out new file mode 100644 index 0000000000..bad0f699cb --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/input.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 127 + num_constraints: 127 + at: e0e639bf48906da80759e2f98e3205a68a63ae175dcd7c198fe3bf6b1650a84e + bt: 6b92443726163ac0fc32f7c9edace0ec8369e793d24105d93d121cb0bd5c3128 + ct: 7cb2d3f0ccfb9a2e747c6a05bdb52812c4539c836ff62c4e555fac13ef2084d4 + output: + - input_file: u32_g.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/le.leo.out b/tests/expectations/compiler/compiler/integers/u32/le.leo.out new file mode 100644 index 0000000000..567c58c4e1 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/le.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 225 + num_constraints: 225 + at: 2037796c0ef82e5db53cf8ee4c92ccc0388b85b91d9112ec6c9ef0bd14658e21 + bt: 6e596324acc04a48f980f6248f44cbf54a25671a41051bbffc087505edbf031f + ct: d7067f500143a40e015fd1f4447a4ea5b9ee6ebdf007e08be51772a8a2b672c3 + output: + - input_file: u32_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u32_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u32_l.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u32/lt.leo.out b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out new file mode 100644 index 0000000000..3f6548eda9 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/lt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 225 + num_constraints: 225 + at: 94d430d7b576bd44d770148d8bff7f5eb5ff3955f77b1263f22096e9a0c34168 + bt: 953b00df7ba097904b71a60403e38d69eece1a6e0b6791b13214cb6ea803fbb3 + ct: d7067f500143a40e015fd1f4447a4ea5b9ee6ebdf007e08be51772a8a2b672c3 + output: + - input_file: u32_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u32_g.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u32/max.leo.out b/tests/expectations/compiler/compiler/integers/u32/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..e6094a8f42 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u32/max_fail.leo:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^\n |\n = failed to parse int value '4294967296'" diff --git a/tests/expectations/compiler/compiler/integers/u32/min.leo.out b/tests/expectations/compiler/compiler/integers/u32/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..a3f6fdd1f8 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u32/min_fail.leo:4:20\n |\n 4 | const a: u32 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u32/mul.leo.out b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out new file mode 100644 index 0000000000..8874857b38 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/mul.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3332 + num_constraints: 4389 + at: 0d533d5cba25194e61fb9b0fab6f0aef9114b2c570146d8cbccebc35dd3c1aa2 + bt: 127cc198f6c432cd8add8297902708b759e48ff05fb8c042a356cb5bd81524a8 + ct: e4cb5fbafce0c6aae444c1ddf3f1883ca3df62c790a4baa8a3755bd75bb42f49 + output: + - input_file: mul.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u32/ne.leo.out b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out new file mode 100644 index 0000000000..b85bca089f --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/ne.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 129 + num_constraints: 129 + at: 4886c2b717c624374dad0a9b657c2081663a6eb235c10b386bcaf117c0fdb004 + bt: 1178e67ab79eac96592f17313168c4300d53e89ab571025054d53d19dfdfd1b8 + ct: 9f4c72431c0c7c03e216195a071c971c53deed8e3bfce450bffb3a6fad7418d5 + output: + - input_file: ne.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out new file mode 100644 index 0000000000..e7989f319d --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u32/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u32;\n | ^\n |\n = Unexpected white space between terms 1 and u32" diff --git a/tests/expectations/compiler/compiler/integers/u32/sub.leo.out b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out new file mode 100644 index 0000000000..9df0cb7642 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/sub.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 192 + num_constraints: 193 + at: 844f8ddd185206ae97ce65d91e247a34cd7d12c6a2a6300bfefdeece068ccde6 + bt: db97ec2b7f2b40889263b26fc6f01de19f78a4b007371ad2f54869e9a31d21db + ct: 0a2d17cb1ee78051a702abbb771d34100ff951ae893e69981ee2507b5aba6671 + output: + - input_file: u32_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out new file mode 100644 index 0000000000..fa00aea2cf --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u32/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 224 + num_constraints: 256 + at: 9338a0dd9e836893acff2938b8ad85ab3255dd2f189dd4f2bc00fef2d38c073d + bt: 35d9c47cfd4fc137760d0ee411c0b097541cab7aae2b0a9ea83b368328fe5c23 + ct: 032da4c7df957d9ca89b5395be6e1c84cab7d19a78abe1b02bb37b26ca65b0e4 + output: + - input_file: u32_t.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u32_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/add.leo.out b/tests/expectations/compiler/compiler/integers/u64/add.leo.out new file mode 100644 index 0000000000..2c5df022de --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/add.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 384 + num_constraints: 385 + at: 377dbd064ab8292845e80919eb529539cbedb4c28ff3c9b92f2cc4370bc92854 + bt: 8cbfb6559664a4d73354d718f19247484a98da79ddf83350c1a070cb14fda399 + ct: 0715661d18c8621f5c33eee669d8d659ee3a767d6ef515102191cdc19577ac02 + output: + - input_file: u64.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out new file mode 100644 index 0000000000..7d707bba69 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/console_assert.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 382 + num_constraints: 382 + at: 037bcdc9fba5f1f5890ceed8c3ca080e4d72f4b2ab1e72f616ca2797194fd149 + bt: 21d30b45426d69b866ddb826df03348580bcd064b2586cd615e3c270d7b85397 + ct: bd9112f8b3135d07d5b5a2491f17add20c7ca9d7881df20e3ff47918d208e75d + output: + - input_file: u64.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/div.leo.out b/tests/expectations/compiler/compiler/integers/u64/div.leo.out new file mode 100644 index 0000000000..641ff47020 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/div.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 12865 + num_constraints: 13057 + at: 85a89926847b7763982dfe80fd15f00693f054e8bbb8c502ffdf2f9892ec95fd + bt: 37b9014d1049204c4dcc70c10ddba1f7cf576ac366850b6a839896ca106b5e45 + ct: 96c178c46c3d65d0d19f71fede0add7de947179c34ad70565bf34b80ca88fa4a + output: + - input_file: u64.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/eq.leo.out b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out new file mode 100644 index 0000000000..3f8b402ba5 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/eq.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 257 + num_constraints: 257 + at: 4461f4148de047b81686ddce14909d0676354608816291b838209335b7b5040c + bt: 1aaee32179419b6185d75c5745bd13c7c8ba869bad0132405ef1b28915bfe5d9 + ct: 8edd5528a862bbd5590cfbd0d52871e395cf73e3a22c70839571b36506fbe3a7 + output: + - input_file: u64_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u64_n.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/ge.leo.out b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out new file mode 100644 index 0000000000..695a702c9b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/ge.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 449 + num_constraints: 449 + at: da4ed3fe37a309845d94cfe19b5e363f1e46a3689f11097214d3b8bc9d345ea7 + bt: bd9dd7ede35a39f80c5b4b97dca300dcd37110f2270cb25d8935d964db04e2ab + ct: 7b765314986bd8a51a62dabdef866c5fe05ad9bf392fb0e25b7ce3b9969f81e1 + output: + - input_file: u64_g.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u64_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u64_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/gt.leo.out b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out new file mode 100644 index 0000000000..54d42e2d60 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/gt.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 449 + num_constraints: 449 + at: c380c2756c57968eff7775b22745a743e282670bfde1b06bcddf2f4a84bd6276 + bt: fcf7dc96d2a270e2f93cf6e19151e06c10a1b5361d5ac92a8cb2a2ba36c19067 + ct: 7b765314986bd8a51a62dabdef866c5fe05ad9bf392fb0e25b7ce3b9969f81e1 + output: + - input_file: u64_g.in + output: + registers: {} + - input_file: u64_f.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/u64/input.leo.out b/tests/expectations/compiler/compiler/integers/u64/input.leo.out new file mode 100644 index 0000000000..434716176b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/input.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 255 + num_constraints: 255 + at: 085ed7b795cfdd2b367e0714e4f7c75cd84b99895bc7597ffc3134ab4b4fb47a + bt: 2c1d031e57e285b1277f2c37853fc7fdff23711e1147d7b26ed74d3acd28ceff + ct: 0b136215b60005ed17aa4eea76bc4e2b0349c0fecf57dc06f5dba31981f270d0 + output: + - input_file: u64_g.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/le.leo.out b/tests/expectations/compiler/compiler/integers/u64/le.leo.out new file mode 100644 index 0000000000..0b07b16179 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/le.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 449 + num_constraints: 449 + at: f5d0a1e668ad75aafbe69353ed7ae68a130f85cfb3d0704477bc60a81b33a94a + bt: 20b7ff1d5fb8aeb0ff37cde558c4da0c1949885789a23bdf21a415cefb159e16 + ct: 7b765314986bd8a51a62dabdef866c5fe05ad9bf392fb0e25b7ce3b9969f81e1 + output: + - input_file: u64_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u64_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u64_l.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u64/lt.leo.out b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out new file mode 100644 index 0000000000..b0b7b8fba7 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/lt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 449 + num_constraints: 449 + at: 463fe45adee0c8a9f698f25f5abb731f42ea06688233a422d13ec9b9efdf051a + bt: ac1a1706eaf7c384375eebf95d38ab272e9c27745c6a9f5feed56e6ecbe28e8b + ct: 7b765314986bd8a51a62dabdef866c5fe05ad9bf392fb0e25b7ce3b9969f81e1 + output: + - input_file: u64_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u64_g.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u64/max.leo.out b/tests/expectations/compiler/compiler/integers/u64/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..a8877a835b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u64/max_fail.leo:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '18446744073709551616'" diff --git a/tests/expectations/compiler/compiler/integers/u64/min.leo.out b/tests/expectations/compiler/compiler/integers/u64/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..8a9ea28fd9 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u64/min_fail.leo:4:20\n |\n 4 | const a: u64 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u64/mul.leo.out b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out new file mode 100644 index 0000000000..d5945cdf29 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/mul.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 12805 + num_constraints: 16966 + at: 8f78296a499e79bdee1ee3c7aa5be45436dbd25859176f3d95fff2c55d6ec92a + bt: 8063dc2ec3957d32cb243785803b1fe280885ae5bbb7b50ae5dd71b4a5b404dd + ct: 5c2a423f5d488da02561837d1ae9e5b86ede29cd64555ebc88229ab4ef9d8fa2 + output: + - input_file: mul.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u64/ne.leo.out b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out new file mode 100644 index 0000000000..7411db0908 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/ne.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 257 + num_constraints: 257 + at: 94abff87eb8bfdc488ea06a67dcf479c6a05c779b40e11c40ee2c69d22030ba3 + bt: 7abc1550aed02405fe1d0951da294ee11583b4215ddc3889429f16ac75604766 + ct: 8edd5528a862bbd5590cfbd0d52871e395cf73e3a22c70839571b36506fbe3a7 + output: + - input_file: ne.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out new file mode 100644 index 0000000000..4a12048b4d --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u64/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u64;\n | ^\n |\n = Unexpected white space between terms 1 and u64" diff --git a/tests/expectations/compiler/compiler/integers/u64/sub.leo.out b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out new file mode 100644 index 0000000000..3f751ad5bd --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/sub.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 384 + num_constraints: 385 + at: 377dbd064ab8292845e80919eb529539cbedb4c28ff3c9b92f2cc4370bc92854 + bt: 8cbfb6559664a4d73354d718f19247484a98da79ddf83350c1a070cb14fda399 + ct: 4906d35acd2d4c5fda24a10932dbccfb9c814de0b6160b29fa57540935c864ee + output: + - input_file: u64_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out new file mode 100644 index 0000000000..5ba9c070d4 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u64/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 448 + num_constraints: 512 + at: 690e01212c73d922dcb536db333646b61ef69ccbfbf86376f643586a130e5b90 + bt: edadcd06780bd97cb60d245565ce94697ee12b4d71ce9148f1546f1c4390b668 + ct: f1bb709127145aae7603feda04afbc3e401fdf290c1d549be8d2d4b21ece9b58 + output: + - input_file: u64_t.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u64_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/add.leo.out b/tests/expectations/compiler/compiler/integers/u8/add.leo.out new file mode 100644 index 0000000000..5f74107901 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/add.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 48 + num_constraints: 49 + at: 47ad61cbbd19835d1bad8f3543217313ee841a18dfa224995e5a4e7a9802fc6e + bt: 0864b812eb8b0fd3cb3173bde347790cd9975d1117accb115141afe0444cea3c + ct: 463f6e3dc8e5ed795eb81d0b200c7f8d7ee4294ef49dc7469646067364331ccf + output: + - input_file: u8.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out new file mode 100644 index 0000000000..28a3b998db --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/console_assert.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 46 + num_constraints: 46 + at: c7c833c325c07232393d6adac2c5b3028e69fde20b546115f417e71586c16b7c + bt: 10f68596bcedd566b8eecf0bd255093865e9652e35d141d868fcba35ed67b24a + ct: 547830d9a13714ce4f3490f83aeafb5faa68aac46614867b7c19beb99eb908ff + output: + - input_file: u8.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/div.leo.out b/tests/expectations/compiler/compiler/integers/u8/div.leo.out new file mode 100644 index 0000000000..2cc67d4551 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/div.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 265 + num_constraints: 289 + at: eddd4269143fb8b2c128fe0694337f34f867573279288e8dc02480eb2aa7790b + bt: 781b0b03c0008f52efceb5be0abe02d4ac135ac1df6cda486eb941e9e6df53f5 + ct: c137ae93c16c69c41bc1758702a1b64e14ed572dab2f1461552c328dfb4b173a + output: + - input_file: u8.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/eq.leo.out b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out new file mode 100644 index 0000000000..ebc70e588e --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/eq.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 33 + num_constraints: 33 + at: 4560e85454c127fff9bff0d813b7598022e740537151444c2dca8fae4996c3b0 + bt: 03d1b6a8fdf9f73f595cf97261f1bae81000c89364c7af58f4f7f04aba7bac30 + ct: 2aae7d6631260dcaafbfe9709ade84e75f5172a9baad48e108e7264d5fc17cf6 + output: + - input_file: u8_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u8_n.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/ge.leo.out b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out new file mode 100644 index 0000000000..0c547a5f91 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/ge.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 57 + num_constraints: 57 + at: 891a7122f212dca6faf409e15ed5dd81f970ff9ebd32609298d9501a037e7979 + bt: 6af90ba76909462a3da873fbb2276b4020df6b3318671bd44aef4572df6326fc + ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 + output: + - input_file: u8_g.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u8_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u8_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/gt.leo.out b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out new file mode 100644 index 0000000000..09af378acd --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/gt.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 57 + num_constraints: 57 + at: 8f8994ac4185be57f63a1bc7a1812c3da7099f2323edab3be3eb8c2060258b74 + bt: 0edd7a2aa1dabdeb3cd270d78086cb74dfc5f4c957e6f2ce7546daed614a3579 + ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 + output: + - input_file: u8_g.in + output: + registers: {} + - input_file: u8_f.in + output: + registers: {} diff --git a/tests/expectations/compiler/compiler/integers/u8/input.leo.out b/tests/expectations/compiler/compiler/integers/u8/input.leo.out new file mode 100644 index 0000000000..3efe55bc7b --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/input.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 31 + num_constraints: 31 + at: fc632b7c29294f7348e0fd778b0e144743a047f35498f3ab5cc30be48469100a + bt: c2cfac5aa6e125cb6cde720b0598fef7933c4aa62926fe99405bf1c2829dd4ce + ct: a3fa97a403ebea95a47d7ded7c01cee45af74afbfa876c203e4e96f6054b8815 + output: + - input_file: u8_g.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/le.leo.out b/tests/expectations/compiler/compiler/integers/u8/le.leo.out new file mode 100644 index 0000000000..189ff38f25 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/le.leo.out @@ -0,0 +1,30 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 57 + num_constraints: 57 + at: e46ad137d5e17ca6959751f6acd5b2bf830e0804c864314eed80d1bbb172b622 + bt: 7166372193964d2e6e881f4178c1a8fd80afe2c60584af277e73e606f4ac4efd + ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 + output: + - input_file: u8_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u8_e.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u8_l.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u8/lt.leo.out b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out new file mode 100644 index 0000000000..a13b96f318 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/lt.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 57 + num_constraints: 57 + at: 6048fc53fef2d92ab69d9150e4caf32daa4e87c1ded6adfa85e0cc322a771143 + bt: 1c92f5790ff308be2d3a812b0b14b7445192b9b9fb271cabd8a18dc925deb34d + ct: 5a4c4f077603c1f7c4b31cf17fee281ab3cb7d2a9571be40a2f3a88577759477 + output: + - input_file: u8_f.in + output: + registers: + r0: + type: bool + value: "false" + - input_file: u8_g.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u8/max.leo.out b/tests/expectations/compiler/compiler/integers/u8/max.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/max.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..8e690fa9bc --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u8/max_fail.leo:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^\n |\n = failed to parse int value '256'" diff --git a/tests/expectations/compiler/compiler/integers/u8/min.leo.out b/tests/expectations/compiler/compiler/integers/u8/min.leo.out new file mode 100644 index 0000000000..2a650384ef --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/min.leo.out @@ -0,0 +1,15 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 0 + num_constraints: 0 + at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + output: + - input_file: empty + output: + registers: {} 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..ae460d701f --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u8/min_fail.leo:4:19\n |\n 4 | const a: u8 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u8/mul.leo.out b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out new file mode 100644 index 0000000000..0241fad64e --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/mul.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 258 + num_constraints: 331 + at: 8380d2144479ab1cc948b8961b8778ac82dc9eb1fab4f24c1af69e3bb75e681c + bt: a9bb86254052a3c5b275213180e89108aea721369a9d32cbd837a1cb974d76b3 + ct: 4dc6b4ca7c3bcedbbe8abbaee96615345e08b304dd65b217319ece1224721b57 + output: + - input_file: mul.in + output: + registers: + r0: + type: bool + value: "false" diff --git a/tests/expectations/compiler/compiler/integers/u8/ne.leo.out b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out new file mode 100644 index 0000000000..eeb30fed53 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/ne.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 33 + num_constraints: 33 + at: cea5a73507043981fb288f2b6ab49a8b860029156ad1e126894c522207d53c02 + bt: 10b52342f8c44eb9b3335b4df9ca4136de3ad35d5b580b2ab32ae5e10bcdf3b4 + ct: 2aae7d6631260dcaafbfe9709ade84e75f5172a9baad48e108e7264d5fc17cf6 + output: + - input_file: ne.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out new file mode 100644 index 0000000000..db6a0c5669 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u8/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u8;\n | ^\n |\n = Unexpected white space between terms 1 and u8" diff --git a/tests/expectations/compiler/compiler/integers/u8/pow.leo.out b/tests/expectations/compiler/compiler/integers/u8/pow.leo.out new file mode 100644 index 0000000000..f99e7dbb01 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/pow.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 3679 + num_constraints: 4911 + at: fb59ec7f84e731eb117badc47fb61c700d450743c876b67c60193e4aa0cdbf58 + bt: 5575062025be6100312de38fb9901cde8870659224b2148a8ccdf5c442e52247 + ct: 8196252f9e347739efec32ad2533722817c96a34b1a87186539e030d475e7c75 + output: + - input_file: u8_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/sub.leo.out b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out new file mode 100644 index 0000000000..55883716a3 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/sub.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 48 + num_constraints: 49 + at: 47ad61cbbd19835d1bad8f3543217313ee841a18dfa224995e5a4e7a9802fc6e + bt: 0864b812eb8b0fd3cb3173bde347790cd9975d1117accb115141afe0444cea3c + ct: a09cd762cf1db927d99cef196452f092d030aa05851fe466816535ac34c6188f + output: + - input_file: u8_f.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out new file mode 100644 index 0000000000..f1e8bcd450 --- /dev/null +++ b/tests/expectations/compiler/compiler/integers/u8/ternary.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 56 + num_constraints: 64 + at: 74bc7b90c80770131152d547d67464f326973f075c0dc65ebc94d13fbeb2effa + bt: 90a2489533355ee3e27d5cf485612441ec10e21923eb78e6be21633ce11fa8f1 + ct: 4c2d67fc6e1c4ad44f323c1b958ed94313153573aa72a3c0f0d25b17b54e63bc + output: + - input_file: u8_t.in + output: + registers: + r0: + type: bool + value: "true" + - input_file: u8_f.in + output: + registers: + r0: + type: bool + value: "true" From b20f8a0369cc6e480b1974ce6f9de11238f6d0b1 Mon Sep 17 00:00:00 2001 From: damirka Date: Tue, 11 May 2021 21:16:55 +0300 Subject: [PATCH 20/26] added doc --- tests/README.md | 150 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 tests/README.md diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000000..04c9a3be29 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,150 @@ +# Leo Test Framework + +This directory includes Leo code samples, which are parsed and used as tests by test-framework. + +## Structure + +Currently, test framework covers only two areas: compiler and parser, tests for both destinations are placed in +matching folders. Third folder - expectations - contains results of test execution which are saved in git and then +compared to test output. + +## Test Structure + +Tests can be placed either in `compiler/` or `parser/` directories. Each test is a Leo file with correct (or intentionally +incorrect) Leo code. What makes Leo file a test is block comment at the top of the file: + +``` +/* +namespace: Parse +expectation: Pass +*/ + +circuit X { + x: u32, + y: u32, +} +``` + +This comment contains YAML structure with set of mandatory and optional fields. + +## Test Expectations + +After first run of the tests, test expectations will be autogenerated and placed under `tests/expectations` directory. +They will contain results of exection in detail (for example, in Compiler tests they include number of constraints and +output registers). + +During next test runs, results of each test are compared to stored expectations, and if stored expectations (say, number +of constaints in Pedersen Hash example) don't match actual results, error will be through and test won't pass. Of course, +there are two possible scenarios: + +1. If test has failed because logic was changed intentionally, then expectations need to be deleted. New ones will be +generated instead. And commit or PR should contain changes to expectations as well as to tests or code. +2. If test should pass, then expectations should not be changed or removed. + +## Test Configuration + +Here is the list of all possible configuration options for compiler and parser tests. + +#### namespace + +``` +- Mandatory: yes +- Namespace: all +- Values: Compile / Parser +``` + +Only two values are supported: `Parser` and `Compile`, the former is meant to be a parser test, the latter +is, obviously, compiler test. Mind that it's `Compile` and NOT ~Compiler~. + +In Parser namespace there are additional possible values to this field: `ParseStatement`, `ParseExpression` and `Token`. +Each one of them allows testing Leo parser on different levels - lexer tokens or just expressions/statements. + +Compiler tests always include complete Leo programs. + +### expectation + +``` +- Mandatory: yes +- Namespace: all +- Values: Pass / Fail +``` + +This setting indicates whether given code is supposed to be run successfuly or we expect failure. Then, if test +was marked as `Pass` and it actually failed, you'll know that something went wrong and test or compiler/parser need +fixing. + +### input_file (Compile) + +``` +- Mandatory: no +- Namespace: Compile +- Values: , ... +``` + +This setting allows using one or multiple input files for Leo program. Program will then be run with every provided input. +See this example: + +``` +/* +namespace: Compile +expectation: Pass +input_file: + - inputs/a_0.in + - inputs/a_1.in +*/ + +function main(a: u32) {} +``` + +### inputs (Compile) + +``` +- Mandatory: no +- Namespace: Compile +- Values: , ... +``` + +With this setting you can specify inputs right in the test description. It is useful for not creating too many files for +each single case. + +``` +/* +namespace: Compile +expectation: Pass +inputs: + - first.in: | + [main] + a: u32 = 100; + + [registers] + r0: bool = false; +# - second.in: | .... +*/ + +function main(a: u32) -> bool { + return a == 100; +} +``` + +### state_file (Compile) + +``` +- Mandatory: no +- Namespace: Compile +- Values: +``` + +This setting allows you to specify state file, which can be accessed in Leo program: + +``` +/* +namespace: Compile +expectation: Pass +state_file: input/basic.state +input_file: input/basic.in +*/ + +function main(a: bool) -> bool { + return a == input.registers.b; +} +``` From 6138f8e7199747f23ee04b414d7924438ddf8276 Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 12 May 2021 19:39:27 +0300 Subject: [PATCH 21/26] removed old compiler tests --- .../address/console_assert_fail.leo | 0 .../address/console_assert_pass.leo | 0 .../{otests => _otests}/address/empty.leo | 0 .../{otests => _otests}/address/equal.leo | 0 .../address/implicit_invalid.leo | 0 .../address/implicit_valid.leo | 0 .../{otests => _otests}/address/input.leo | 0 .../address/invalid_length.leo | 0 .../address/invalid_prefix.leo | 0 compiler/{otests => _otests}/address/mod.rs | 0 .../{otests => _otests}/address/ternary.leo | 0 .../{otests => _otests}/address/valid.leo | 0 .../{otests => _otests}/array/initializer.leo | 0 .../array/initializer_fail.leo | 0 .../array/initializer_input.leo | 0 compiler/{otests => _otests}/array/inline.leo | 0 .../array/input/initializer_fail.in | 0 .../array/input/inline_fail.leo | 0 .../array/input/input_nested_3x2.in | 0 .../array/input/input_nested_3x2_fail.in | 0 .../array/input/input_tuple_3x2.in | 0 .../array/input/input_tuple_3x2_fail.in | 0 .../array/input/registers_ones.in | 0 .../array/input/registers_zeros.in | 0 .../array/input/six_zeros.in | 0 .../array/input/three_ones.in | 0 .../input/type_nested_value_nested_3x2.in | 0 .../type_nested_value_nested_3x2_fail.in | 0 .../input/type_nested_value_nested_4x3x2.in | 0 .../type_nested_value_nested_4x3x2_fail.in | 0 .../input/type_nested_value_tuple_3x2.in | 0 .../input/type_nested_value_tuple_3x2_fail.in | 0 .../input/type_nested_value_tuple_4x3x2.in | 0 .../type_nested_value_tuple_4x3x2_fail.in | 0 .../input/type_tuple_value_nested_3x2.in | 0 .../input/type_tuple_value_nested_3x2_fail.in | 0 .../input/type_tuple_value_nested_4x3x2.in | 0 .../type_tuple_value_nested_4x3x2_fail.in | 0 .../array/input/type_tuple_value_tuple_3x2.in | 0 .../input/type_tuple_value_tuple_3x2_fail.in | 0 .../input/type_tuple_value_tuple_4x3x2.in | 0 .../type_tuple_value_tuple_4x3x2_fail.in | 0 .../array/input_nested_3x2.leo | 0 .../array/input_nested_3x2_fail.leo | 0 .../array/input_tuple_3x2.leo | 0 .../array/input_tuple_3x2_fail.leo | 0 compiler/{otests => _otests}/array/mod.rs | 0 .../array/multi_fail_initializer.leo | 0 .../array/multi_fail_inline.leo | 0 .../array/multi_initializer.leo | 0 .../array/multi_initializer_fail.leo | 0 compiler/{otests => _otests}/array/nested.leo | 0 .../array/nested_3x2_value.leo | 0 .../array/nested_3x2_value_fail.leo | 0 .../array/output/registers_ones.out | 0 .../array/output/registers_zeros.out | 0 .../{otests => _otests}/array/registers.leo | 0 compiler/{otests => _otests}/array/slice.leo | 0 .../{otests => _otests}/array/slice_lower.leo | 0 compiler/{otests => _otests}/array/spread.leo | 0 .../array/tuple_3x2_value.leo | 0 .../array/tuple_3x2_value_fail.leo | 0 .../{otests => _otests}/array/type_fail.leo | 0 .../array/type_input_3x2.leo | 0 .../array/type_input_4x3x2.leo | 0 .../array/type_nested_value_nested_3x2.leo | 0 .../type_nested_value_nested_3x2_fail.leo | 0 .../array/type_nested_value_nested_4x3x2.leo | 0 .../type_nested_value_nested_4x3x2_fail.leo | 0 .../array/type_nested_value_tuple_3x2.leo | 0 .../type_nested_value_tuple_3x2_fail.leo | 0 .../array/type_nested_value_tuple_4x3x2.leo | 0 .../type_nested_value_tuple_4x3x2_fail.leo | 0 .../array/type_tuple_value_nested_3x2.leo | 0 .../type_tuple_value_nested_3x2_fail.leo | 0 .../array/type_tuple_value_nested_4x3x2.leo | 0 .../type_tuple_value_nested_4x3x2_fail.leo | 0 .../array/type_tuple_value_tuple_3x2.leo | 0 .../array/type_tuple_value_tuple_3x2_fail.leo | 0 .../array/type_tuple_value_tuple_4x3x2.leo | 0 .../type_tuple_value_tuple_4x3x2_fail.leo | 0 .../array/variable_slice_fail.leo | 0 compiler/{otests => _otests}/boolean/all.leo | 0 .../boolean/assert_eq_input.leo | 0 .../boolean/conditional_mut.leo | 0 .../boolean/false_and_false.leo | 0 .../boolean/false_or_false.leo | 0 .../boolean/input/registers_false.in | 0 .../boolean/input/registers_true.in | 0 .../boolean/input/true_false.in | 0 .../boolean/input/true_true.in | 0 compiler/{otests => _otests}/boolean/mod.rs | 0 .../{otests => _otests}/boolean/not_false.leo | 0 .../boolean/not_mutable.leo | 0 .../{otests => _otests}/boolean/not_true.leo | 0 .../{otests => _otests}/boolean/not_u32.leo | 0 .../boolean/output/registers_false.out | 0 .../boolean/output/registers_true.out | 0 .../boolean/output_register.leo | 0 .../boolean/true_and_false.leo | 0 .../boolean/true_and_true.leo | 0 .../boolean/true_and_u32.leo | 0 .../boolean/true_or_false.leo | 0 .../boolean/true_or_true.leo | 0 .../boolean/true_or_u32.leo | 0 .../canonicalization/array_expansion.json | 0 .../canonicalization/array_expansion.leo | 0 .../canonicalization/array_size_zero_fail.leo | 0 .../big_self_in_circuit_replacement.json | 0 .../big_self_in_circuit_replacement.leo | 0 .../big_self_outside_circuit_fail.leo | 0 .../canonicalization/compound_assignment.json | 0 .../canonicalization/compound_assignment.leo | 0 .../illegal_array_range_fail.leo | 0 .../canonicalization/input/array_expansion.in | 0 .../canonicalization/mod.rs | 0 .../circuits/const_self_variable.leo | 0 .../circuits/const_self_variable_fail.leo | 0 ...define_circuit_inside_circuit_function.leo | 0 .../circuits/duplicate_name_context.leo | 0 .../{otests => _otests}/circuits/inline.leo | 0 .../circuits/inline_fail.leo | 0 .../circuits/inline_member_fail.leo | 0 .../circuits/inline_member_pass.leo | 0 .../circuits/inline_undefined.leo | 0 .../circuits/member_function.leo | 0 .../circuits/member_function_fail.leo | 0 .../circuits/member_function_invalid.leo | 0 .../circuits/member_function_nested.leo | 0 .../circuits/member_static_function.leo | 0 .../member_static_function_invalid.leo | 0 .../member_static_function_nested.leo | 0 .../member_static_function_undefined.leo | 0 .../circuits/member_variable.leo | 0 .../circuits/member_variable_and_function.leo | 0 .../circuits/member_variable_fail.leo | 0 compiler/{otests => _otests}/circuits/mod.rs | 0 .../circuits/mut_function_fail.leo | 0 .../circuits/mut_self_function_fail.leo | 0 .../mut_self_static_function_fail.leo | 0 .../circuits/mut_self_variable.leo | 0 .../circuits/mut_self_variable_branch.leo | 0 .../mut_self_variable_conditional.leo | 0 .../circuits/mut_self_variable_fail.leo | 0 .../circuits/mut_static_function_fail.leo | 0 .../circuits/mut_variable.leo | 0 .../circuits/mut_variable_fail.leo | 0 .../mutable_call_immutable_context.leo | 0 .../circuits/pedersen_mock.leo | 0 .../circuits/self_circuit.leo | 0 .../circuits/self_fail.leo | 0 .../circuits/self_member.leo | 0 .../circuits/self_member_invalid.leo | 0 .../circuits/self_member_undefined.leo | 0 .../{otests => _otests}/compiler/main.leo | 0 compiler/{otests => _otests}/compiler/mod.rs | 0 .../{otests => _otests}/console/assert.leo | 0 .../console/conditional_assert.leo | 0 .../{otests => _otests}/console/debug.leo | 0 .../{otests => _otests}/console/error.leo | 0 .../console/input/input_equal.in | 0 .../console/input/input_unequal.in | 0 compiler/{otests => _otests}/console/log.leo | 0 .../console/log_conditional.leo | 0 .../{otests => _otests}/console/log_fail.leo | 0 .../{otests => _otests}/console/log_input.leo | 0 .../console/log_parameter.leo | 0 .../console/log_parameter_fail_empty.leo | 0 .../console/log_parameter_fail_none.leo | 0 .../console/log_parameter_fail_unknown.leo | 0 .../console/log_parameter_many.leo | 0 compiler/{otests => _otests}/console/mod.rs | 0 .../core/core_circuit_invalid.leo | 0 .../core/core_circuit_star_fail.leo | 0 .../core/core_package_invalid.leo | 0 .../core/core_unstable_package_invalid.leo | 0 compiler/{otests => _otests}/core/mod.rs | 0 .../{otests => _otests}/core/packages/mod.rs | 0 .../blake2s/arguments_length_fail.leo | 0 .../unstable/blake2s/arguments_type_fail.leo | 0 .../unstable/blake2s/blake2s_input.leo | 0 .../unstable/blake2s/blake2s_random.leo | 0 .../unstable/blake2s/inputs/valid_input.in | 0 .../core/packages/unstable/blake2s/mod.rs | 0 .../unstable/blake2s/outputs/valid_output.out | 0 .../core/packages/unstable/mod.rs | 0 .../core/unstable_blake2s.leo | 0 .../{otests => _otests}/definition/mod.rs | 0 .../definition/out_of_order.leo | 0 .../definition/out_of_order_with_import.leo | 0 compiler/{otests => _otests}/field/add.leo | 0 .../field/console_assert.leo | 0 compiler/{otests => _otests}/field/div.leo | 0 compiler/{otests => _otests}/field/eq.leo | 0 compiler/{otests => _otests}/field/field.leo | 0 .../field/input/register_one.in | 0 .../field/input/register_zero.in | 0 compiler/{otests => _otests}/field/mod.rs | 0 compiler/{otests => _otests}/field/mul.leo | 0 compiler/{otests => _otests}/field/negate.leo | 0 .../field/no_space_between_literal.leo | 0 .../field/output/register_one.out | 0 .../field/output/register_zero.out | 0 .../field/output_register.leo | 0 compiler/{otests => _otests}/field/sub.leo | 0 .../{otests => _otests}/field/ternary.leo | 0 .../function/array_input.leo | 0 .../function/array_params_direct_call.leo | 0 .../function/conditional_return.leo | 0 .../function/duplicate_definition.leo | 0 .../{otests => _otests}/function/empty.leo | 0 .../function/input/conditional_return.in | 0 .../function/input/newlines.in | 0 .../function/input/registers.in | 0 .../function/iteration.leo | 0 .../function/iteration_repeated.leo | 0 compiler/{otests => _otests}/function/mod.rs | 0 .../function/multiple_returns.leo | 0 .../function/multiple_returns_fail.leo | 0 .../multiple_returns_fail_conditional.leo | 0 .../function/multiple_returns_main.leo | 0 .../{otests => _otests}/function/newlines.leo | 0 .../function/output/conditional_return.out | 0 .../function/output/newlines.out | 0 .../function/output/registers.out | 0 .../{otests => _otests}/function/repeated.leo | 0 .../{otests => _otests}/function/return.leo | 0 .../function/return_array_nested_fail.leo | 0 .../function/return_array_nested_pass.leo | 0 .../function/return_array_tuple_fail.leo | 0 .../function/return_array_tuple_pass.leo | 0 .../function/return_tuple.leo | 0 .../function/return_tuple_conditional.leo | 0 .../function/scope_fail.leo | 0 .../function/undefined.leo | 0 .../function/value_unchanged.leo | 0 .../global_consts/global_const_types.leo | 0 .../{otests => _otests}/global_consts/mod.rs | 0 .../global_consts/modify_global_const.leo | 0 compiler/{otests => _otests}/group/add.leo | 0 .../{otests => _otests}/group/assert_eq.leo | 0 .../group/both_sign_high.leo | 0 .../group/both_sign_inferred.leo | 0 .../group/both_sign_low.leo | 0 compiler/{otests => _otests}/group/eq.leo | 0 compiler/{otests => _otests}/group/input.leo | 0 .../group/input/invalid.in | 0 .../{otests => _otests}/group/input/point.in | 0 .../{otests => _otests}/group/input/valid.in | 0 compiler/{otests => _otests}/group/mod.rs | 0 compiler/{otests => _otests}/group/negate.leo | 0 .../group/no_space_between_literal.leo | 0 compiler/{otests => _otests}/group/one.leo | 0 compiler/{otests => _otests}/group/point.leo | 0 .../{otests => _otests}/group/point_input.leo | 0 .../group/positive_and_negative.leo | 0 compiler/{otests => _otests}/group/sub.leo | 0 .../{otests => _otests}/group/ternary.leo | 0 .../{otests => _otests}/group/x_and_y.leo | 0 .../{otests => _otests}/group/x_sign_high.leo | 0 .../group/x_sign_inferred.leo | 0 .../{otests => _otests}/group/x_sign_low.leo | 0 .../{otests => _otests}/group/y_sign_high.leo | 0 .../group/y_sign_inferred.leo | 0 .../{otests => _otests}/group/y_sign_low.leo | 0 compiler/{otests => _otests}/group/zero.leo | 0 compiler/{otests => _otests}/import/alias.leo | 0 compiler/{otests => _otests}/import/basic.leo | 0 .../import/imports/bar/.gitignore | 0 .../import/imports/bar/Leo.toml | 0 .../import/imports/bar/src/bat/bat.leo | 0 .../import/imports/bar/src/baz.leo | 0 .../import/imports/bar/src/lib.leo | 0 .../import/imports/car/.gitignore | 0 .../import/imports/car/Leo.toml | 0 .../import/imports/car/src/lib.leo | 0 .../import/many_import.leo | 0 .../import/many_import_star.leo | 0 compiler/{otests => _otests}/import/mod.rs | 0 .../{otests => _otests}/import/multiple.leo | 0 compiler/{otests => _otests}/import/names.leo | 0 .../import/names_a_dash.leo | 0 .../import/names_dash_a.leo | 0 .../import/names_dollar.leo | 0 .../import/names_underscore.leo | 0 .../{otests => _otests}/import/src/a-9.leo | 0 .../{otests => _otests}/import/src/a0-f.leo | 0 .../import/src/hello-world.leo | 0 .../import/src/test-import.leo | 0 compiler/{otests => _otests}/import/star.leo | 0 .../{otests => _otests}/import/star_fail.leo | 0 .../{otests => _otests}/input_files/mod.rs | 0 .../input_files/program_input/input/main.in | 0 .../program_input/input/main_array.in | 0 .../program_input/input/main_array_fail.in | 0 .../program_input/input/main_fail_name.in | 0 .../program_input/input/main_fail_type.in | 0 .../program_input/input/main_field.in | 0 .../program_input/input/main_group.in | 0 .../input/main_multi_dimension_array.in | 0 .../program_input/input/main_multiple.in | 0 .../program_input/input/main_tuple_fail.in | 0 .../input_files/program_input/main.leo | 0 .../input_files/program_input/main_array.leo | 0 .../program_input/main_array_fail.leo | 0 .../input_files/program_input/main_field.leo | 0 .../input_files/program_input/main_group.leo | 0 .../main_multi_dimension_array.leo | 0 .../program_input/main_multiple.leo | 0 .../program_input/main_tuple_fail.leo | 0 .../input_files/program_input/mod.rs | 0 .../access.leo | 0 .../input/basic.in | 0 .../input/basic.state | 0 .../input/token_withdraw.in | 0 .../input/token_withdraw.state | 0 .../program_input_and_program_state/mod.rs | 0 .../program_input_constants/input/main.in | 0 .../input/main_array.in | 0 .../input/main_array_fail.in | 0 .../input/main_double_declaration_fail.in | 0 .../input/main_fail_name.in | 0 .../input/main_fail_type.in | 0 .../input/main_field.in | 0 .../input/main_group.in | 0 .../input/main_multi_dimension_array.in | 0 .../input/main_multiple.in | 0 .../input/main_not_const_input_fail.in | 0 .../input/main_tuple_fail.in | 0 .../input/main_type_mismatch.in | 0 .../program_input_constants/main.leo | 0 .../program_input_constants/main_array.leo | 0 .../main_array_fail.leo | 0 .../program_input_constants/main_field.leo | 0 .../program_input_constants/main_group.leo | 0 .../main_multi_dimension_array.leo | 0 .../program_input_constants/main_multiple.leo | 0 .../main_tuple_fail.leo | 0 .../program_input_constants/mod.rs | 0 .../program_registers/input/array.in | 0 .../program_registers/input/main.in | 0 .../input_files/program_registers/mod.rs | 0 .../output/registers_array.out | 0 .../output/registers_pass.out | 0 .../program_registers/registers_array.leo | 0 .../program_registers/registers_fail.leo | 0 .../program_registers/registers_pass.leo | 0 .../input_files/program_state/access_all.leo | 0 .../program_state/access_state.leo | 0 .../program_state/input/basic.state | 0 .../program_state/input/section_invalid.state | 0 .../input/section_undefined.state | 0 .../program_state/input/token_withdraw.state | 0 .../program_state/input/visibility_fail.state | 0 .../input_files/program_state/mod.rs | 0 .../{otests => _otests}/integers/i128/add.leo | 0 .../integers/i128/console_assert.leo | 0 .../{otests => _otests}/integers/i128/div.leo | 0 .../{otests => _otests}/integers/i128/eq.leo | 0 .../{otests => _otests}/integers/i128/ge.leo | 0 .../{otests => _otests}/integers/i128/gt.leo | 0 .../integers/i128/input.leo | 0 .../{otests => _otests}/integers/i128/le.leo | 0 .../{otests => _otests}/integers/i128/lt.leo | 0 .../{otests => _otests}/integers/i128/max.leo | 0 .../integers/i128/max_fail.leo | 0 .../{otests => _otests}/integers/i128/min.leo | 0 .../integers/i128/min_fail.leo | 0 .../{otests => _otests}/integers/i128/mod.rs | 0 .../{otests => _otests}/integers/i128/mul.leo | 0 .../{otests => _otests}/integers/i128/ne.leo | 0 .../integers/i128/negate.leo | 0 .../integers/i128/negate_min.leo | 0 .../integers/i128/negate_zero.leo | 0 .../i128/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/i128/pow.leo | 0 .../{otests => _otests}/integers/i128/sub.leo | 0 .../integers/i128/ternary.leo | 0 .../{otests => _otests}/integers/i16/add.leo | 0 .../integers/i16/console_assert.leo | 0 .../{otests => _otests}/integers/i16/div.leo | 0 .../{otests => _otests}/integers/i16/eq.leo | 0 .../{otests => _otests}/integers/i16/ge.leo | 0 .../{otests => _otests}/integers/i16/gt.leo | 0 .../integers/i16/input.leo | 0 .../{otests => _otests}/integers/i16/le.leo | 0 .../{otests => _otests}/integers/i16/lt.leo | 0 .../{otests => _otests}/integers/i16/max.leo | 0 .../integers/i16/max_fail.leo | 0 .../{otests => _otests}/integers/i16/min.leo | 0 .../integers/i16/min_fail.leo | 0 .../{otests => _otests}/integers/i16/mod.rs | 0 .../{otests => _otests}/integers/i16/mul.leo | 0 .../{otests => _otests}/integers/i16/ne.leo | 0 .../integers/i16/negate.leo | 0 .../integers/i16/negate_min.leo | 0 .../integers/i16/negate_zero.leo | 0 .../integers/i16/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/i16/pow.leo | 0 .../{otests => _otests}/integers/i16/sub.leo | 0 .../integers/i16/ternary.leo | 0 .../{otests => _otests}/integers/i32/add.leo | 0 .../integers/i32/console_assert.leo | 0 .../{otests => _otests}/integers/i32/div.leo | 0 .../{otests => _otests}/integers/i32/eq.leo | 0 .../{otests => _otests}/integers/i32/ge.leo | 0 .../{otests => _otests}/integers/i32/gt.leo | 0 .../integers/i32/input.leo | 0 .../{otests => _otests}/integers/i32/le.leo | 0 .../{otests => _otests}/integers/i32/lt.leo | 0 .../{otests => _otests}/integers/i32/max.leo | 0 .../integers/i32/max_fail.leo | 0 .../{otests => _otests}/integers/i32/min.leo | 0 .../integers/i32/min_fail.leo | 0 .../{otests => _otests}/integers/i32/mod.rs | 0 .../{otests => _otests}/integers/i32/mul.leo | 0 .../{otests => _otests}/integers/i32/ne.leo | 0 .../integers/i32/negate.leo | 0 .../integers/i32/negate_min.leo | 0 .../integers/i32/negate_zero.leo | 0 .../integers/i32/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/i32/pow.leo | 0 .../{otests => _otests}/integers/i32/sub.leo | 0 .../integers/i32/ternary.leo | 0 .../{otests => _otests}/integers/i64/add.leo | 0 .../integers/i64/console_assert.leo | 0 .../{otests => _otests}/integers/i64/div.leo | 0 .../{otests => _otests}/integers/i64/eq.leo | 0 .../{otests => _otests}/integers/i64/ge.leo | 0 .../{otests => _otests}/integers/i64/gt.leo | 0 .../integers/i64/input.leo | 0 .../{otests => _otests}/integers/i64/le.leo | 0 .../{otests => _otests}/integers/i64/lt.leo | 0 .../{otests => _otests}/integers/i64/max.leo | 0 .../integers/i64/max_fail.leo | 0 .../{otests => _otests}/integers/i64/min.leo | 0 .../integers/i64/min_fail.leo | 0 .../{otests => _otests}/integers/i64/mod.rs | 0 .../{otests => _otests}/integers/i64/mul.leo | 0 .../{otests => _otests}/integers/i64/ne.leo | 0 .../integers/i64/negate.leo | 0 .../integers/i64/negate_min.leo | 0 .../integers/i64/negate_zero.leo | 0 .../integers/i64/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/i64/pow.leo | 0 .../{otests => _otests}/integers/i64/sub.leo | 0 .../integers/i64/ternary.leo | 0 .../{otests => _otests}/integers/i8/add.leo | 0 .../integers/i8/console_assert.leo | 0 .../{otests => _otests}/integers/i8/div.leo | 0 .../{otests => _otests}/integers/i8/eq.leo | 0 .../{otests => _otests}/integers/i8/ge.leo | 0 .../{otests => _otests}/integers/i8/gt.leo | 0 .../{otests => _otests}/integers/i8/input.leo | 0 .../{otests => _otests}/integers/i8/le.leo | 0 .../{otests => _otests}/integers/i8/lt.leo | 0 .../{otests => _otests}/integers/i8/max.leo | 0 .../integers/i8/max_fail.leo | 0 .../{otests => _otests}/integers/i8/min.leo | 0 .../integers/i8/min_fail.leo | 0 .../{otests => _otests}/integers/i8/mod.rs | 0 .../{otests => _otests}/integers/i8/mul.leo | 0 .../{otests => _otests}/integers/i8/ne.leo | 0 .../integers/i8/negate.leo | 0 .../integers/i8/negate_min.leo | 0 .../integers/i8/negate_zero.leo | 0 .../integers/i8/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/i8/pow.leo | 0 .../{otests => _otests}/integers/i8/sub.leo | 0 .../integers/i8/ternary.leo | 0 .../{otests => _otests}/integers/int_macro.rs | 0 .../integers/integer_tester.rs | 0 compiler/{otests => _otests}/integers/mod.rs | 0 .../{otests => _otests}/integers/u128/add.leo | 0 .../integers/u128/console_assert.leo | 0 .../{otests => _otests}/integers/u128/div.leo | 0 .../{otests => _otests}/integers/u128/eq.leo | 0 .../{otests => _otests}/integers/u128/ge.leo | 0 .../{otests => _otests}/integers/u128/gt.leo | 0 .../integers/u128/input.leo | 0 .../{otests => _otests}/integers/u128/le.leo | 0 .../{otests => _otests}/integers/u128/lt.leo | 0 .../{otests => _otests}/integers/u128/max.leo | 0 .../integers/u128/max_fail.leo | 0 .../{otests => _otests}/integers/u128/min.leo | 0 .../integers/u128/min_fail.leo | 0 .../{otests => _otests}/integers/u128/mod.rs | 0 .../{otests => _otests}/integers/u128/mul.leo | 0 .../{otests => _otests}/integers/u128/ne.leo | 0 .../u128/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/u128/pow.leo | 0 .../{otests => _otests}/integers/u128/sub.leo | 0 .../integers/u128/ternary.leo | 0 .../{otests => _otests}/integers/u16/add.leo | 0 .../integers/u16/console_assert.leo | 0 .../{otests => _otests}/integers/u16/div.leo | 0 .../{otests => _otests}/integers/u16/eq.leo | 0 .../{otests => _otests}/integers/u16/ge.leo | 0 .../{otests => _otests}/integers/u16/gt.leo | 0 .../integers/u16/input.leo | 0 .../{otests => _otests}/integers/u16/le.leo | 0 .../{otests => _otests}/integers/u16/lt.leo | 0 .../{otests => _otests}/integers/u16/max.leo | 0 .../integers/u16/max_fail.leo | 0 .../{otests => _otests}/integers/u16/min.leo | 0 .../integers/u16/min_fail.leo | 0 .../{otests => _otests}/integers/u16/mod.rs | 0 .../{otests => _otests}/integers/u16/mul.leo | 0 .../{otests => _otests}/integers/u16/ne.leo | 0 .../integers/u16/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/u16/pow.leo | 0 .../{otests => _otests}/integers/u16/sub.leo | 0 .../integers/u16/ternary.leo | 0 .../{otests => _otests}/integers/u32/add.leo | 0 .../integers/u32/console_assert.leo | 0 .../{otests => _otests}/integers/u32/div.leo | 0 .../{otests => _otests}/integers/u32/eq.leo | 0 .../{otests => _otests}/integers/u32/ge.leo | 0 .../{otests => _otests}/integers/u32/gt.leo | 0 .../integers/u32/input.leo | 0 .../{otests => _otests}/integers/u32/le.leo | 0 .../{otests => _otests}/integers/u32/lt.leo | 0 .../{otests => _otests}/integers/u32/max.leo | 0 .../integers/u32/max_fail.leo | 0 .../{otests => _otests}/integers/u32/min.leo | 0 .../integers/u32/min_fail.leo | 0 .../{otests => _otests}/integers/u32/mod.rs | 0 .../{otests => _otests}/integers/u32/mul.leo | 0 .../{otests => _otests}/integers/u32/ne.leo | 0 .../integers/u32/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/u32/pow.leo | 0 .../{otests => _otests}/integers/u32/sub.leo | 0 .../integers/u32/ternary.leo | 0 .../{otests => _otests}/integers/u64/add.leo | 0 .../integers/u64/console_assert.leo | 0 .../{otests => _otests}/integers/u64/div.leo | 0 .../{otests => _otests}/integers/u64/eq.leo | 0 .../{otests => _otests}/integers/u64/ge.leo | 0 .../{otests => _otests}/integers/u64/gt.leo | 0 .../integers/u64/input.leo | 0 .../{otests => _otests}/integers/u64/le.leo | 0 .../{otests => _otests}/integers/u64/lt.leo | 0 .../{otests => _otests}/integers/u64/max.leo | 0 .../integers/u64/max_fail.leo | 0 .../{otests => _otests}/integers/u64/min.leo | 0 .../integers/u64/min_fail.leo | 0 .../{otests => _otests}/integers/u64/mod.rs | 0 .../{otests => _otests}/integers/u64/mul.leo | 0 .../{otests => _otests}/integers/u64/ne.leo | 0 .../integers/u64/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/u64/pow.leo | 0 .../{otests => _otests}/integers/u64/sub.leo | 0 .../integers/u64/ternary.leo | 0 .../{otests => _otests}/integers/u8/add.leo | 0 .../integers/u8/console_assert.leo | 0 .../{otests => _otests}/integers/u8/div.leo | 0 .../{otests => _otests}/integers/u8/eq.leo | 0 .../{otests => _otests}/integers/u8/ge.leo | 0 .../{otests => _otests}/integers/u8/gt.leo | 0 .../{otests => _otests}/integers/u8/input.leo | 0 .../{otests => _otests}/integers/u8/le.leo | 0 .../{otests => _otests}/integers/u8/lt.leo | 0 .../{otests => _otests}/integers/u8/max.leo | 0 .../integers/u8/max_fail.leo | 0 .../{otests => _otests}/integers/u8/min.leo | 0 .../integers/u8/min_fail.leo | 0 .../{otests => _otests}/integers/u8/mod.rs | 0 .../{otests => _otests}/integers/u8/mul.leo | 0 .../{otests => _otests}/integers/u8/ne.leo | 0 .../integers/u8/no_space_between_literal.leo | 0 .../{otests => _otests}/integers/u8/pow.leo | 0 .../{otests => _otests}/integers/u8/sub.leo | 0 .../integers/u8/ternary.leo | 0 .../integers/uint_macro.rs | 0 compiler/{otests => _otests}/mod.rs | 0 .../{otests => _otests}/mutability/array.leo | 0 .../mutability/array_mut.leo | 0 .../mutability/array_splice_mut.leo | 0 .../mutability/array_tuple_mut.leo | 0 .../mutability/circuit.leo | 0 .../mutability/circuit_function_mut.leo | 0 .../mutability/circuit_mut.leo | 0 .../circuit_static_function_mut.leo | 0 .../mutability/circuit_variable_mut.leo | 0 .../mutability/cond_mut.leo | 0 .../{otests => _otests}/mutability/const.leo | 0 .../mutability/function_input.leo | 0 .../mutability/function_input_mut.leo | 0 .../{otests => _otests}/mutability/let.leo | 0 .../mutability/let_mut.leo | 0 .../mutability/let_mut_nested.leo | 0 .../{otests => _otests}/mutability/mod.rs | 0 .../{otests => _otests}/mutability/swap.leo | 0 .../{otests => _otests}/statements/block.leo | 0 .../statements/conditional/assert.leo | 0 .../statements/conditional/chain.leo | 0 .../statements/conditional/cond_switch.leo | 0 .../statements/conditional/for_loop.leo | 0 .../conditional/input/cond_switch.in | 0 .../conditional/input/registers_one.in | 0 .../conditional/input/registers_zero.in | 0 .../statements/conditional/mod.rs | 0 .../conditional/multiple_returns.leo | 0 .../statements/conditional/mutate.leo | 0 .../statements/conditional/nested.leo | 0 .../conditional/output/cond_switch.out | 0 .../conditional/output/registers_one.out | 0 .../conditional/output/registers_zero.out | 0 .../statements/iteration_basic.leo | 0 .../statements/iteration_input.in | 0 .../statements/iteration_input.leo | 0 .../statements/iteration_type_fail.leo | 0 .../statements/iteration_variable.leo | 0 .../{otests => _otests}/statements/mod.rs | 0 .../statements/num_returns_fail.leo | 0 .../statements/ternary_basic.leo | 0 .../ternary_non_const_conditional_fail.leo | 0 .../syntax/compare_mismatched_types.leo | 0 .../syntax/identifiers/address_fail.leo | 0 .../syntax/identifiers/console_fail.leo | 0 .../syntax/identifiers/field_fail.leo | 0 .../syntax/identifiers/group_fail.leo | 0 .../syntax/identifiers/i8_fail.leo | 0 .../syntax/identifiers/input_fail.leo | 0 .../syntax/identifiers/mod.rs | 0 .../syntax/identifiers/self_keyword_fail.leo | 0 .../syntax/identifiers/self_type_fail.leo | 0 .../syntax/identifiers/true_fail.leo | 0 .../syntax/identifiers/u8_fail.leo | 0 .../syntax/input_semicolon.leo | 0 compiler/{otests => _otests}/syntax/mod.rs | 0 .../{otests => _otests}/syntax/semicolon.leo | 0 .../{otests => _otests}/syntax/undefined.leo | 0 .../{otests => _otests}/tuples/access.leo | 0 compiler/{otests => _otests}/tuples/basic.leo | 0 .../{otests => _otests}/tuples/function.leo | 0 .../tuples/function_multiple.leo | 0 .../tuples/function_typed.leo | 0 compiler/{otests => _otests}/tuples/input.leo | 0 .../tuples/inputs/input.in | 0 compiler/{otests => _otests}/tuples/mod.rs | 0 .../{otests => _otests}/tuples/multiple.leo | 0 .../tuples/multiple_typed.leo | 0 .../{otests => _otests}/tuples/nested.leo | 0 .../tuples/nested_access.leo | 0 .../tuples/nested_typed.leo | 0 compiler/{otests => _otests}/tuples/typed.leo | 0 .../type_inference/basic.json | 0 .../type_inference/basic.leo | 0 .../type_inference/for_loop_and_compound.json | 0 .../type_inference/for_loop_and_compound.leo | 0 .../{otests => _otests}/type_inference/mod.rs | 0 compiler/src/lib.rs | 3 - compiler/src/output/mod.rs | 17 +- .../canonicalization/array_expansion.json | 359 +++ .../canonicalization/array_expansion.leo | 7 + .../canonicalization/array_size_zero_fail.leo | 3 + .../big_self_in_circuit_replacement.json | 219 ++ .../big_self_in_circuit_replacement.leo | 15 + .../big_self_outside_circuit_fail.leo | 15 + .../canonicalization/compound_assignment.json | 2033 +++++++++++++++++ .../canonicalization/compound_assignment.leo | 37 + .../illegal_array_range_fail.leo | 4 + .../canonicalization/input/array_expansion.in | 2 + compiler/tests/canonicalization/mod.rs | 97 + .../compiler_output/empty.out | 0 compiler/tests/mod.rs | 124 + compiler/{src => tests}/test.rs | 2 +- compiler/tests/type_inference/basic.json | 1008 ++++++++ compiler/tests/type_inference/basic.leo | 23 + .../type_inference/for_loop_and_compound.json | 243 ++ .../type_inference/for_loop_and_compound.leo | 7 + compiler/tests/type_inference/mod.rs | 85 + tests/compiler/_field/mod.rs | 369 --- tests/compiler/_group/mod.rs | 407 ---- 675 files changed, 4288 insertions(+), 791 deletions(-) rename compiler/{otests => _otests}/address/console_assert_fail.leo (100%) rename compiler/{otests => _otests}/address/console_assert_pass.leo (100%) rename compiler/{otests => _otests}/address/empty.leo (100%) rename compiler/{otests => _otests}/address/equal.leo (100%) rename compiler/{otests => _otests}/address/implicit_invalid.leo (100%) rename compiler/{otests => _otests}/address/implicit_valid.leo (100%) rename compiler/{otests => _otests}/address/input.leo (100%) rename compiler/{otests => _otests}/address/invalid_length.leo (100%) rename compiler/{otests => _otests}/address/invalid_prefix.leo (100%) rename compiler/{otests => _otests}/address/mod.rs (100%) rename compiler/{otests => _otests}/address/ternary.leo (100%) rename compiler/{otests => _otests}/address/valid.leo (100%) rename compiler/{otests => _otests}/array/initializer.leo (100%) rename compiler/{otests => _otests}/array/initializer_fail.leo (100%) rename compiler/{otests => _otests}/array/initializer_input.leo (100%) rename compiler/{otests => _otests}/array/inline.leo (100%) rename compiler/{otests => _otests}/array/input/initializer_fail.in (100%) rename compiler/{otests => _otests}/array/input/inline_fail.leo (100%) rename compiler/{otests => _otests}/array/input/input_nested_3x2.in (100%) rename compiler/{otests => _otests}/array/input/input_nested_3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input/input_tuple_3x2.in (100%) rename compiler/{otests => _otests}/array/input/input_tuple_3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input/registers_ones.in (100%) rename compiler/{otests => _otests}/array/input/registers_zeros.in (100%) rename compiler/{otests => _otests}/array/input/six_zeros.in (100%) rename compiler/{otests => _otests}/array/input/three_ones.in (100%) rename compiler/{otests => _otests}/array/input/type_nested_value_nested_3x2.in (100%) rename compiler/{otests => _otests}/array/input/type_nested_value_nested_3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input/type_nested_value_nested_4x3x2.in (100%) rename compiler/{otests => _otests}/array/input/type_nested_value_nested_4x3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input/type_nested_value_tuple_3x2.in (100%) rename compiler/{otests => _otests}/array/input/type_nested_value_tuple_3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input/type_nested_value_tuple_4x3x2.in (100%) rename compiler/{otests => _otests}/array/input/type_nested_value_tuple_4x3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input/type_tuple_value_nested_3x2.in (100%) rename compiler/{otests => _otests}/array/input/type_tuple_value_nested_3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input/type_tuple_value_nested_4x3x2.in (100%) rename compiler/{otests => _otests}/array/input/type_tuple_value_nested_4x3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input/type_tuple_value_tuple_3x2.in (100%) rename compiler/{otests => _otests}/array/input/type_tuple_value_tuple_3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input/type_tuple_value_tuple_4x3x2.in (100%) rename compiler/{otests => _otests}/array/input/type_tuple_value_tuple_4x3x2_fail.in (100%) rename compiler/{otests => _otests}/array/input_nested_3x2.leo (100%) rename compiler/{otests => _otests}/array/input_nested_3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/input_tuple_3x2.leo (100%) rename compiler/{otests => _otests}/array/input_tuple_3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/mod.rs (100%) rename compiler/{otests => _otests}/array/multi_fail_initializer.leo (100%) rename compiler/{otests => _otests}/array/multi_fail_inline.leo (100%) rename compiler/{otests => _otests}/array/multi_initializer.leo (100%) rename compiler/{otests => _otests}/array/multi_initializer_fail.leo (100%) rename compiler/{otests => _otests}/array/nested.leo (100%) rename compiler/{otests => _otests}/array/nested_3x2_value.leo (100%) rename compiler/{otests => _otests}/array/nested_3x2_value_fail.leo (100%) rename compiler/{otests => _otests}/array/output/registers_ones.out (100%) rename compiler/{otests => _otests}/array/output/registers_zeros.out (100%) rename compiler/{otests => _otests}/array/registers.leo (100%) rename compiler/{otests => _otests}/array/slice.leo (100%) rename compiler/{otests => _otests}/array/slice_lower.leo (100%) rename compiler/{otests => _otests}/array/spread.leo (100%) rename compiler/{otests => _otests}/array/tuple_3x2_value.leo (100%) rename compiler/{otests => _otests}/array/tuple_3x2_value_fail.leo (100%) rename compiler/{otests => _otests}/array/type_fail.leo (100%) rename compiler/{otests => _otests}/array/type_input_3x2.leo (100%) rename compiler/{otests => _otests}/array/type_input_4x3x2.leo (100%) rename compiler/{otests => _otests}/array/type_nested_value_nested_3x2.leo (100%) rename compiler/{otests => _otests}/array/type_nested_value_nested_3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/type_nested_value_nested_4x3x2.leo (100%) rename compiler/{otests => _otests}/array/type_nested_value_nested_4x3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/type_nested_value_tuple_3x2.leo (100%) rename compiler/{otests => _otests}/array/type_nested_value_tuple_3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/type_nested_value_tuple_4x3x2.leo (100%) rename compiler/{otests => _otests}/array/type_nested_value_tuple_4x3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/type_tuple_value_nested_3x2.leo (100%) rename compiler/{otests => _otests}/array/type_tuple_value_nested_3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/type_tuple_value_nested_4x3x2.leo (100%) rename compiler/{otests => _otests}/array/type_tuple_value_nested_4x3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/type_tuple_value_tuple_3x2.leo (100%) rename compiler/{otests => _otests}/array/type_tuple_value_tuple_3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/type_tuple_value_tuple_4x3x2.leo (100%) rename compiler/{otests => _otests}/array/type_tuple_value_tuple_4x3x2_fail.leo (100%) rename compiler/{otests => _otests}/array/variable_slice_fail.leo (100%) rename compiler/{otests => _otests}/boolean/all.leo (100%) rename compiler/{otests => _otests}/boolean/assert_eq_input.leo (100%) rename compiler/{otests => _otests}/boolean/conditional_mut.leo (100%) rename compiler/{otests => _otests}/boolean/false_and_false.leo (100%) rename compiler/{otests => _otests}/boolean/false_or_false.leo (100%) rename compiler/{otests => _otests}/boolean/input/registers_false.in (100%) rename compiler/{otests => _otests}/boolean/input/registers_true.in (100%) rename compiler/{otests => _otests}/boolean/input/true_false.in (100%) rename compiler/{otests => _otests}/boolean/input/true_true.in (100%) rename compiler/{otests => _otests}/boolean/mod.rs (100%) rename compiler/{otests => _otests}/boolean/not_false.leo (100%) rename compiler/{otests => _otests}/boolean/not_mutable.leo (100%) rename compiler/{otests => _otests}/boolean/not_true.leo (100%) rename compiler/{otests => _otests}/boolean/not_u32.leo (100%) rename compiler/{otests => _otests}/boolean/output/registers_false.out (100%) rename compiler/{otests => _otests}/boolean/output/registers_true.out (100%) rename compiler/{otests => _otests}/boolean/output_register.leo (100%) rename compiler/{otests => _otests}/boolean/true_and_false.leo (100%) rename compiler/{otests => _otests}/boolean/true_and_true.leo (100%) rename compiler/{otests => _otests}/boolean/true_and_u32.leo (100%) rename compiler/{otests => _otests}/boolean/true_or_false.leo (100%) rename compiler/{otests => _otests}/boolean/true_or_true.leo (100%) rename compiler/{otests => _otests}/boolean/true_or_u32.leo (100%) rename compiler/{otests => _otests}/canonicalization/array_expansion.json (100%) rename compiler/{otests => _otests}/canonicalization/array_expansion.leo (100%) rename compiler/{otests => _otests}/canonicalization/array_size_zero_fail.leo (100%) rename compiler/{otests => _otests}/canonicalization/big_self_in_circuit_replacement.json (100%) rename compiler/{otests => _otests}/canonicalization/big_self_in_circuit_replacement.leo (100%) rename compiler/{otests => _otests}/canonicalization/big_self_outside_circuit_fail.leo (100%) rename compiler/{otests => _otests}/canonicalization/compound_assignment.json (100%) rename compiler/{otests => _otests}/canonicalization/compound_assignment.leo (100%) rename compiler/{otests => _otests}/canonicalization/illegal_array_range_fail.leo (100%) rename compiler/{otests => _otests}/canonicalization/input/array_expansion.in (100%) rename compiler/{otests => _otests}/canonicalization/mod.rs (100%) rename compiler/{otests => _otests}/circuits/const_self_variable.leo (100%) rename compiler/{otests => _otests}/circuits/const_self_variable_fail.leo (100%) rename compiler/{otests => _otests}/circuits/define_circuit_inside_circuit_function.leo (100%) rename compiler/{otests => _otests}/circuits/duplicate_name_context.leo (100%) rename compiler/{otests => _otests}/circuits/inline.leo (100%) rename compiler/{otests => _otests}/circuits/inline_fail.leo (100%) rename compiler/{otests => _otests}/circuits/inline_member_fail.leo (100%) rename compiler/{otests => _otests}/circuits/inline_member_pass.leo (100%) rename compiler/{otests => _otests}/circuits/inline_undefined.leo (100%) rename compiler/{otests => _otests}/circuits/member_function.leo (100%) rename compiler/{otests => _otests}/circuits/member_function_fail.leo (100%) rename compiler/{otests => _otests}/circuits/member_function_invalid.leo (100%) rename compiler/{otests => _otests}/circuits/member_function_nested.leo (100%) rename compiler/{otests => _otests}/circuits/member_static_function.leo (100%) rename compiler/{otests => _otests}/circuits/member_static_function_invalid.leo (100%) rename compiler/{otests => _otests}/circuits/member_static_function_nested.leo (100%) rename compiler/{otests => _otests}/circuits/member_static_function_undefined.leo (100%) rename compiler/{otests => _otests}/circuits/member_variable.leo (100%) rename compiler/{otests => _otests}/circuits/member_variable_and_function.leo (100%) rename compiler/{otests => _otests}/circuits/member_variable_fail.leo (100%) rename compiler/{otests => _otests}/circuits/mod.rs (100%) rename compiler/{otests => _otests}/circuits/mut_function_fail.leo (100%) rename compiler/{otests => _otests}/circuits/mut_self_function_fail.leo (100%) rename compiler/{otests => _otests}/circuits/mut_self_static_function_fail.leo (100%) rename compiler/{otests => _otests}/circuits/mut_self_variable.leo (100%) rename compiler/{otests => _otests}/circuits/mut_self_variable_branch.leo (100%) rename compiler/{otests => _otests}/circuits/mut_self_variable_conditional.leo (100%) rename compiler/{otests => _otests}/circuits/mut_self_variable_fail.leo (100%) rename compiler/{otests => _otests}/circuits/mut_static_function_fail.leo (100%) rename compiler/{otests => _otests}/circuits/mut_variable.leo (100%) rename compiler/{otests => _otests}/circuits/mut_variable_fail.leo (100%) rename compiler/{otests => _otests}/circuits/mutable_call_immutable_context.leo (100%) rename compiler/{otests => _otests}/circuits/pedersen_mock.leo (100%) rename compiler/{otests => _otests}/circuits/self_circuit.leo (100%) rename compiler/{otests => _otests}/circuits/self_fail.leo (100%) rename compiler/{otests => _otests}/circuits/self_member.leo (100%) rename compiler/{otests => _otests}/circuits/self_member_invalid.leo (100%) rename compiler/{otests => _otests}/circuits/self_member_undefined.leo (100%) rename compiler/{otests => _otests}/compiler/main.leo (100%) rename compiler/{otests => _otests}/compiler/mod.rs (100%) rename compiler/{otests => _otests}/console/assert.leo (100%) rename compiler/{otests => _otests}/console/conditional_assert.leo (100%) rename compiler/{otests => _otests}/console/debug.leo (100%) rename compiler/{otests => _otests}/console/error.leo (100%) rename compiler/{otests => _otests}/console/input/input_equal.in (100%) rename compiler/{otests => _otests}/console/input/input_unequal.in (100%) rename compiler/{otests => _otests}/console/log.leo (100%) rename compiler/{otests => _otests}/console/log_conditional.leo (100%) rename compiler/{otests => _otests}/console/log_fail.leo (100%) rename compiler/{otests => _otests}/console/log_input.leo (100%) rename compiler/{otests => _otests}/console/log_parameter.leo (100%) rename compiler/{otests => _otests}/console/log_parameter_fail_empty.leo (100%) rename compiler/{otests => _otests}/console/log_parameter_fail_none.leo (100%) rename compiler/{otests => _otests}/console/log_parameter_fail_unknown.leo (100%) rename compiler/{otests => _otests}/console/log_parameter_many.leo (100%) rename compiler/{otests => _otests}/console/mod.rs (100%) rename compiler/{otests => _otests}/core/core_circuit_invalid.leo (100%) rename compiler/{otests => _otests}/core/core_circuit_star_fail.leo (100%) rename compiler/{otests => _otests}/core/core_package_invalid.leo (100%) rename compiler/{otests => _otests}/core/core_unstable_package_invalid.leo (100%) rename compiler/{otests => _otests}/core/mod.rs (100%) rename compiler/{otests => _otests}/core/packages/mod.rs (100%) rename compiler/{otests => _otests}/core/packages/unstable/blake2s/arguments_length_fail.leo (100%) rename compiler/{otests => _otests}/core/packages/unstable/blake2s/arguments_type_fail.leo (100%) rename compiler/{otests => _otests}/core/packages/unstable/blake2s/blake2s_input.leo (100%) rename compiler/{otests => _otests}/core/packages/unstable/blake2s/blake2s_random.leo (100%) rename compiler/{otests => _otests}/core/packages/unstable/blake2s/inputs/valid_input.in (100%) rename compiler/{otests => _otests}/core/packages/unstable/blake2s/mod.rs (100%) rename compiler/{otests => _otests}/core/packages/unstable/blake2s/outputs/valid_output.out (100%) rename compiler/{otests => _otests}/core/packages/unstable/mod.rs (100%) rename compiler/{otests => _otests}/core/unstable_blake2s.leo (100%) rename compiler/{otests => _otests}/definition/mod.rs (100%) rename compiler/{otests => _otests}/definition/out_of_order.leo (100%) rename compiler/{otests => _otests}/definition/out_of_order_with_import.leo (100%) rename compiler/{otests => _otests}/field/add.leo (100%) rename compiler/{otests => _otests}/field/console_assert.leo (100%) rename compiler/{otests => _otests}/field/div.leo (100%) rename compiler/{otests => _otests}/field/eq.leo (100%) rename compiler/{otests => _otests}/field/field.leo (100%) rename compiler/{otests => _otests}/field/input/register_one.in (100%) rename compiler/{otests => _otests}/field/input/register_zero.in (100%) rename compiler/{otests => _otests}/field/mod.rs (100%) rename compiler/{otests => _otests}/field/mul.leo (100%) rename compiler/{otests => _otests}/field/negate.leo (100%) rename compiler/{otests => _otests}/field/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/field/output/register_one.out (100%) rename compiler/{otests => _otests}/field/output/register_zero.out (100%) rename compiler/{otests => _otests}/field/output_register.leo (100%) rename compiler/{otests => _otests}/field/sub.leo (100%) rename compiler/{otests => _otests}/field/ternary.leo (100%) rename compiler/{otests => _otests}/function/array_input.leo (100%) rename compiler/{otests => _otests}/function/array_params_direct_call.leo (100%) rename compiler/{otests => _otests}/function/conditional_return.leo (100%) rename compiler/{otests => _otests}/function/duplicate_definition.leo (100%) rename compiler/{otests => _otests}/function/empty.leo (100%) rename compiler/{otests => _otests}/function/input/conditional_return.in (100%) rename compiler/{otests => _otests}/function/input/newlines.in (100%) rename compiler/{otests => _otests}/function/input/registers.in (100%) rename compiler/{otests => _otests}/function/iteration.leo (100%) rename compiler/{otests => _otests}/function/iteration_repeated.leo (100%) rename compiler/{otests => _otests}/function/mod.rs (100%) rename compiler/{otests => _otests}/function/multiple_returns.leo (100%) rename compiler/{otests => _otests}/function/multiple_returns_fail.leo (100%) rename compiler/{otests => _otests}/function/multiple_returns_fail_conditional.leo (100%) rename compiler/{otests => _otests}/function/multiple_returns_main.leo (100%) rename compiler/{otests => _otests}/function/newlines.leo (100%) rename compiler/{otests => _otests}/function/output/conditional_return.out (100%) rename compiler/{otests => _otests}/function/output/newlines.out (100%) rename compiler/{otests => _otests}/function/output/registers.out (100%) rename compiler/{otests => _otests}/function/repeated.leo (100%) rename compiler/{otests => _otests}/function/return.leo (100%) rename compiler/{otests => _otests}/function/return_array_nested_fail.leo (100%) rename compiler/{otests => _otests}/function/return_array_nested_pass.leo (100%) rename compiler/{otests => _otests}/function/return_array_tuple_fail.leo (100%) rename compiler/{otests => _otests}/function/return_array_tuple_pass.leo (100%) rename compiler/{otests => _otests}/function/return_tuple.leo (100%) rename compiler/{otests => _otests}/function/return_tuple_conditional.leo (100%) rename compiler/{otests => _otests}/function/scope_fail.leo (100%) rename compiler/{otests => _otests}/function/undefined.leo (100%) rename compiler/{otests => _otests}/function/value_unchanged.leo (100%) rename compiler/{otests => _otests}/global_consts/global_const_types.leo (100%) rename compiler/{otests => _otests}/global_consts/mod.rs (100%) rename compiler/{otests => _otests}/global_consts/modify_global_const.leo (100%) rename compiler/{otests => _otests}/group/add.leo (100%) rename compiler/{otests => _otests}/group/assert_eq.leo (100%) rename compiler/{otests => _otests}/group/both_sign_high.leo (100%) rename compiler/{otests => _otests}/group/both_sign_inferred.leo (100%) rename compiler/{otests => _otests}/group/both_sign_low.leo (100%) rename compiler/{otests => _otests}/group/eq.leo (100%) rename compiler/{otests => _otests}/group/input.leo (100%) rename compiler/{otests => _otests}/group/input/invalid.in (100%) rename compiler/{otests => _otests}/group/input/point.in (100%) rename compiler/{otests => _otests}/group/input/valid.in (100%) rename compiler/{otests => _otests}/group/mod.rs (100%) rename compiler/{otests => _otests}/group/negate.leo (100%) rename compiler/{otests => _otests}/group/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/group/one.leo (100%) rename compiler/{otests => _otests}/group/point.leo (100%) rename compiler/{otests => _otests}/group/point_input.leo (100%) rename compiler/{otests => _otests}/group/positive_and_negative.leo (100%) rename compiler/{otests => _otests}/group/sub.leo (100%) rename compiler/{otests => _otests}/group/ternary.leo (100%) rename compiler/{otests => _otests}/group/x_and_y.leo (100%) rename compiler/{otests => _otests}/group/x_sign_high.leo (100%) rename compiler/{otests => _otests}/group/x_sign_inferred.leo (100%) rename compiler/{otests => _otests}/group/x_sign_low.leo (100%) rename compiler/{otests => _otests}/group/y_sign_high.leo (100%) rename compiler/{otests => _otests}/group/y_sign_inferred.leo (100%) rename compiler/{otests => _otests}/group/y_sign_low.leo (100%) rename compiler/{otests => _otests}/group/zero.leo (100%) rename compiler/{otests => _otests}/import/alias.leo (100%) rename compiler/{otests => _otests}/import/basic.leo (100%) rename compiler/{otests => _otests}/import/imports/bar/.gitignore (100%) rename compiler/{otests => _otests}/import/imports/bar/Leo.toml (100%) rename compiler/{otests => _otests}/import/imports/bar/src/bat/bat.leo (100%) rename compiler/{otests => _otests}/import/imports/bar/src/baz.leo (100%) rename compiler/{otests => _otests}/import/imports/bar/src/lib.leo (100%) rename compiler/{otests => _otests}/import/imports/car/.gitignore (100%) rename compiler/{otests => _otests}/import/imports/car/Leo.toml (100%) rename compiler/{otests => _otests}/import/imports/car/src/lib.leo (100%) rename compiler/{otests => _otests}/import/many_import.leo (100%) rename compiler/{otests => _otests}/import/many_import_star.leo (100%) rename compiler/{otests => _otests}/import/mod.rs (100%) rename compiler/{otests => _otests}/import/multiple.leo (100%) rename compiler/{otests => _otests}/import/names.leo (100%) rename compiler/{otests => _otests}/import/names_a_dash.leo (100%) rename compiler/{otests => _otests}/import/names_dash_a.leo (100%) rename compiler/{otests => _otests}/import/names_dollar.leo (100%) rename compiler/{otests => _otests}/import/names_underscore.leo (100%) rename compiler/{otests => _otests}/import/src/a-9.leo (100%) rename compiler/{otests => _otests}/import/src/a0-f.leo (100%) rename compiler/{otests => _otests}/import/src/hello-world.leo (100%) rename compiler/{otests => _otests}/import/src/test-import.leo (100%) rename compiler/{otests => _otests}/import/star.leo (100%) rename compiler/{otests => _otests}/import/star_fail.leo (100%) rename compiler/{otests => _otests}/input_files/mod.rs (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main.in (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main_array.in (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main_array_fail.in (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main_fail_name.in (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main_fail_type.in (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main_field.in (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main_group.in (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main_multi_dimension_array.in (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main_multiple.in (100%) rename compiler/{otests => _otests}/input_files/program_input/input/main_tuple_fail.in (100%) rename compiler/{otests => _otests}/input_files/program_input/main.leo (100%) rename compiler/{otests => _otests}/input_files/program_input/main_array.leo (100%) rename compiler/{otests => _otests}/input_files/program_input/main_array_fail.leo (100%) rename compiler/{otests => _otests}/input_files/program_input/main_field.leo (100%) rename compiler/{otests => _otests}/input_files/program_input/main_group.leo (100%) rename compiler/{otests => _otests}/input_files/program_input/main_multi_dimension_array.leo (100%) rename compiler/{otests => _otests}/input_files/program_input/main_multiple.leo (100%) rename compiler/{otests => _otests}/input_files/program_input/main_tuple_fail.leo (100%) rename compiler/{otests => _otests}/input_files/program_input/mod.rs (100%) rename compiler/{otests => _otests}/input_files/program_input_and_program_state/access.leo (100%) rename compiler/{otests => _otests}/input_files/program_input_and_program_state/input/basic.in (100%) rename compiler/{otests => _otests}/input_files/program_input_and_program_state/input/basic.state (100%) rename compiler/{otests => _otests}/input_files/program_input_and_program_state/input/token_withdraw.in (100%) rename compiler/{otests => _otests}/input_files/program_input_and_program_state/input/token_withdraw.state (100%) rename compiler/{otests => _otests}/input_files/program_input_and_program_state/mod.rs (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_array.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_array_fail.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_double_declaration_fail.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_fail_name.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_fail_type.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_field.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_group.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_multi_dimension_array.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_multiple.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_not_const_input_fail.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_tuple_fail.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/input/main_type_mismatch.in (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/main.leo (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/main_array.leo (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/main_array_fail.leo (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/main_field.leo (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/main_group.leo (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/main_multi_dimension_array.leo (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/main_multiple.leo (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/main_tuple_fail.leo (100%) rename compiler/{otests => _otests}/input_files/program_input_constants/mod.rs (100%) rename compiler/{otests => _otests}/input_files/program_registers/input/array.in (100%) rename compiler/{otests => _otests}/input_files/program_registers/input/main.in (100%) rename compiler/{otests => _otests}/input_files/program_registers/mod.rs (100%) rename compiler/{otests => _otests}/input_files/program_registers/output/registers_array.out (100%) rename compiler/{otests => _otests}/input_files/program_registers/output/registers_pass.out (100%) rename compiler/{otests => _otests}/input_files/program_registers/registers_array.leo (100%) rename compiler/{otests => _otests}/input_files/program_registers/registers_fail.leo (100%) rename compiler/{otests => _otests}/input_files/program_registers/registers_pass.leo (100%) rename compiler/{otests => _otests}/input_files/program_state/access_all.leo (100%) rename compiler/{otests => _otests}/input_files/program_state/access_state.leo (100%) rename compiler/{otests => _otests}/input_files/program_state/input/basic.state (100%) rename compiler/{otests => _otests}/input_files/program_state/input/section_invalid.state (100%) rename compiler/{otests => _otests}/input_files/program_state/input/section_undefined.state (100%) rename compiler/{otests => _otests}/input_files/program_state/input/token_withdraw.state (100%) rename compiler/{otests => _otests}/input_files/program_state/input/visibility_fail.state (100%) rename compiler/{otests => _otests}/input_files/program_state/mod.rs (100%) rename compiler/{otests => _otests}/integers/i128/add.leo (100%) rename compiler/{otests => _otests}/integers/i128/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/i128/div.leo (100%) rename compiler/{otests => _otests}/integers/i128/eq.leo (100%) rename compiler/{otests => _otests}/integers/i128/ge.leo (100%) rename compiler/{otests => _otests}/integers/i128/gt.leo (100%) rename compiler/{otests => _otests}/integers/i128/input.leo (100%) rename compiler/{otests => _otests}/integers/i128/le.leo (100%) rename compiler/{otests => _otests}/integers/i128/lt.leo (100%) rename compiler/{otests => _otests}/integers/i128/max.leo (100%) rename compiler/{otests => _otests}/integers/i128/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/i128/min.leo (100%) rename compiler/{otests => _otests}/integers/i128/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/i128/mod.rs (100%) rename compiler/{otests => _otests}/integers/i128/mul.leo (100%) rename compiler/{otests => _otests}/integers/i128/ne.leo (100%) rename compiler/{otests => _otests}/integers/i128/negate.leo (100%) rename compiler/{otests => _otests}/integers/i128/negate_min.leo (100%) rename compiler/{otests => _otests}/integers/i128/negate_zero.leo (100%) rename compiler/{otests => _otests}/integers/i128/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/i128/pow.leo (100%) rename compiler/{otests => _otests}/integers/i128/sub.leo (100%) rename compiler/{otests => _otests}/integers/i128/ternary.leo (100%) rename compiler/{otests => _otests}/integers/i16/add.leo (100%) rename compiler/{otests => _otests}/integers/i16/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/i16/div.leo (100%) rename compiler/{otests => _otests}/integers/i16/eq.leo (100%) rename compiler/{otests => _otests}/integers/i16/ge.leo (100%) rename compiler/{otests => _otests}/integers/i16/gt.leo (100%) rename compiler/{otests => _otests}/integers/i16/input.leo (100%) rename compiler/{otests => _otests}/integers/i16/le.leo (100%) rename compiler/{otests => _otests}/integers/i16/lt.leo (100%) rename compiler/{otests => _otests}/integers/i16/max.leo (100%) rename compiler/{otests => _otests}/integers/i16/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/i16/min.leo (100%) rename compiler/{otests => _otests}/integers/i16/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/i16/mod.rs (100%) rename compiler/{otests => _otests}/integers/i16/mul.leo (100%) rename compiler/{otests => _otests}/integers/i16/ne.leo (100%) rename compiler/{otests => _otests}/integers/i16/negate.leo (100%) rename compiler/{otests => _otests}/integers/i16/negate_min.leo (100%) rename compiler/{otests => _otests}/integers/i16/negate_zero.leo (100%) rename compiler/{otests => _otests}/integers/i16/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/i16/pow.leo (100%) rename compiler/{otests => _otests}/integers/i16/sub.leo (100%) rename compiler/{otests => _otests}/integers/i16/ternary.leo (100%) rename compiler/{otests => _otests}/integers/i32/add.leo (100%) rename compiler/{otests => _otests}/integers/i32/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/i32/div.leo (100%) rename compiler/{otests => _otests}/integers/i32/eq.leo (100%) rename compiler/{otests => _otests}/integers/i32/ge.leo (100%) rename compiler/{otests => _otests}/integers/i32/gt.leo (100%) rename compiler/{otests => _otests}/integers/i32/input.leo (100%) rename compiler/{otests => _otests}/integers/i32/le.leo (100%) rename compiler/{otests => _otests}/integers/i32/lt.leo (100%) rename compiler/{otests => _otests}/integers/i32/max.leo (100%) rename compiler/{otests => _otests}/integers/i32/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/i32/min.leo (100%) rename compiler/{otests => _otests}/integers/i32/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/i32/mod.rs (100%) rename compiler/{otests => _otests}/integers/i32/mul.leo (100%) rename compiler/{otests => _otests}/integers/i32/ne.leo (100%) rename compiler/{otests => _otests}/integers/i32/negate.leo (100%) rename compiler/{otests => _otests}/integers/i32/negate_min.leo (100%) rename compiler/{otests => _otests}/integers/i32/negate_zero.leo (100%) rename compiler/{otests => _otests}/integers/i32/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/i32/pow.leo (100%) rename compiler/{otests => _otests}/integers/i32/sub.leo (100%) rename compiler/{otests => _otests}/integers/i32/ternary.leo (100%) rename compiler/{otests => _otests}/integers/i64/add.leo (100%) rename compiler/{otests => _otests}/integers/i64/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/i64/div.leo (100%) rename compiler/{otests => _otests}/integers/i64/eq.leo (100%) rename compiler/{otests => _otests}/integers/i64/ge.leo (100%) rename compiler/{otests => _otests}/integers/i64/gt.leo (100%) rename compiler/{otests => _otests}/integers/i64/input.leo (100%) rename compiler/{otests => _otests}/integers/i64/le.leo (100%) rename compiler/{otests => _otests}/integers/i64/lt.leo (100%) rename compiler/{otests => _otests}/integers/i64/max.leo (100%) rename compiler/{otests => _otests}/integers/i64/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/i64/min.leo (100%) rename compiler/{otests => _otests}/integers/i64/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/i64/mod.rs (100%) rename compiler/{otests => _otests}/integers/i64/mul.leo (100%) rename compiler/{otests => _otests}/integers/i64/ne.leo (100%) rename compiler/{otests => _otests}/integers/i64/negate.leo (100%) rename compiler/{otests => _otests}/integers/i64/negate_min.leo (100%) rename compiler/{otests => _otests}/integers/i64/negate_zero.leo (100%) rename compiler/{otests => _otests}/integers/i64/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/i64/pow.leo (100%) rename compiler/{otests => _otests}/integers/i64/sub.leo (100%) rename compiler/{otests => _otests}/integers/i64/ternary.leo (100%) rename compiler/{otests => _otests}/integers/i8/add.leo (100%) rename compiler/{otests => _otests}/integers/i8/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/i8/div.leo (100%) rename compiler/{otests => _otests}/integers/i8/eq.leo (100%) rename compiler/{otests => _otests}/integers/i8/ge.leo (100%) rename compiler/{otests => _otests}/integers/i8/gt.leo (100%) rename compiler/{otests => _otests}/integers/i8/input.leo (100%) rename compiler/{otests => _otests}/integers/i8/le.leo (100%) rename compiler/{otests => _otests}/integers/i8/lt.leo (100%) rename compiler/{otests => _otests}/integers/i8/max.leo (100%) rename compiler/{otests => _otests}/integers/i8/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/i8/min.leo (100%) rename compiler/{otests => _otests}/integers/i8/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/i8/mod.rs (100%) rename compiler/{otests => _otests}/integers/i8/mul.leo (100%) rename compiler/{otests => _otests}/integers/i8/ne.leo (100%) rename compiler/{otests => _otests}/integers/i8/negate.leo (100%) rename compiler/{otests => _otests}/integers/i8/negate_min.leo (100%) rename compiler/{otests => _otests}/integers/i8/negate_zero.leo (100%) rename compiler/{otests => _otests}/integers/i8/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/i8/pow.leo (100%) rename compiler/{otests => _otests}/integers/i8/sub.leo (100%) rename compiler/{otests => _otests}/integers/i8/ternary.leo (100%) rename compiler/{otests => _otests}/integers/int_macro.rs (100%) rename compiler/{otests => _otests}/integers/integer_tester.rs (100%) rename compiler/{otests => _otests}/integers/mod.rs (100%) rename compiler/{otests => _otests}/integers/u128/add.leo (100%) rename compiler/{otests => _otests}/integers/u128/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/u128/div.leo (100%) rename compiler/{otests => _otests}/integers/u128/eq.leo (100%) rename compiler/{otests => _otests}/integers/u128/ge.leo (100%) rename compiler/{otests => _otests}/integers/u128/gt.leo (100%) rename compiler/{otests => _otests}/integers/u128/input.leo (100%) rename compiler/{otests => _otests}/integers/u128/le.leo (100%) rename compiler/{otests => _otests}/integers/u128/lt.leo (100%) rename compiler/{otests => _otests}/integers/u128/max.leo (100%) rename compiler/{otests => _otests}/integers/u128/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/u128/min.leo (100%) rename compiler/{otests => _otests}/integers/u128/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/u128/mod.rs (100%) rename compiler/{otests => _otests}/integers/u128/mul.leo (100%) rename compiler/{otests => _otests}/integers/u128/ne.leo (100%) rename compiler/{otests => _otests}/integers/u128/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/u128/pow.leo (100%) rename compiler/{otests => _otests}/integers/u128/sub.leo (100%) rename compiler/{otests => _otests}/integers/u128/ternary.leo (100%) rename compiler/{otests => _otests}/integers/u16/add.leo (100%) rename compiler/{otests => _otests}/integers/u16/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/u16/div.leo (100%) rename compiler/{otests => _otests}/integers/u16/eq.leo (100%) rename compiler/{otests => _otests}/integers/u16/ge.leo (100%) rename compiler/{otests => _otests}/integers/u16/gt.leo (100%) rename compiler/{otests => _otests}/integers/u16/input.leo (100%) rename compiler/{otests => _otests}/integers/u16/le.leo (100%) rename compiler/{otests => _otests}/integers/u16/lt.leo (100%) rename compiler/{otests => _otests}/integers/u16/max.leo (100%) rename compiler/{otests => _otests}/integers/u16/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/u16/min.leo (100%) rename compiler/{otests => _otests}/integers/u16/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/u16/mod.rs (100%) rename compiler/{otests => _otests}/integers/u16/mul.leo (100%) rename compiler/{otests => _otests}/integers/u16/ne.leo (100%) rename compiler/{otests => _otests}/integers/u16/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/u16/pow.leo (100%) rename compiler/{otests => _otests}/integers/u16/sub.leo (100%) rename compiler/{otests => _otests}/integers/u16/ternary.leo (100%) rename compiler/{otests => _otests}/integers/u32/add.leo (100%) rename compiler/{otests => _otests}/integers/u32/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/u32/div.leo (100%) rename compiler/{otests => _otests}/integers/u32/eq.leo (100%) rename compiler/{otests => _otests}/integers/u32/ge.leo (100%) rename compiler/{otests => _otests}/integers/u32/gt.leo (100%) rename compiler/{otests => _otests}/integers/u32/input.leo (100%) rename compiler/{otests => _otests}/integers/u32/le.leo (100%) rename compiler/{otests => _otests}/integers/u32/lt.leo (100%) rename compiler/{otests => _otests}/integers/u32/max.leo (100%) rename compiler/{otests => _otests}/integers/u32/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/u32/min.leo (100%) rename compiler/{otests => _otests}/integers/u32/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/u32/mod.rs (100%) rename compiler/{otests => _otests}/integers/u32/mul.leo (100%) rename compiler/{otests => _otests}/integers/u32/ne.leo (100%) rename compiler/{otests => _otests}/integers/u32/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/u32/pow.leo (100%) rename compiler/{otests => _otests}/integers/u32/sub.leo (100%) rename compiler/{otests => _otests}/integers/u32/ternary.leo (100%) rename compiler/{otests => _otests}/integers/u64/add.leo (100%) rename compiler/{otests => _otests}/integers/u64/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/u64/div.leo (100%) rename compiler/{otests => _otests}/integers/u64/eq.leo (100%) rename compiler/{otests => _otests}/integers/u64/ge.leo (100%) rename compiler/{otests => _otests}/integers/u64/gt.leo (100%) rename compiler/{otests => _otests}/integers/u64/input.leo (100%) rename compiler/{otests => _otests}/integers/u64/le.leo (100%) rename compiler/{otests => _otests}/integers/u64/lt.leo (100%) rename compiler/{otests => _otests}/integers/u64/max.leo (100%) rename compiler/{otests => _otests}/integers/u64/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/u64/min.leo (100%) rename compiler/{otests => _otests}/integers/u64/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/u64/mod.rs (100%) rename compiler/{otests => _otests}/integers/u64/mul.leo (100%) rename compiler/{otests => _otests}/integers/u64/ne.leo (100%) rename compiler/{otests => _otests}/integers/u64/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/u64/pow.leo (100%) rename compiler/{otests => _otests}/integers/u64/sub.leo (100%) rename compiler/{otests => _otests}/integers/u64/ternary.leo (100%) rename compiler/{otests => _otests}/integers/u8/add.leo (100%) rename compiler/{otests => _otests}/integers/u8/console_assert.leo (100%) rename compiler/{otests => _otests}/integers/u8/div.leo (100%) rename compiler/{otests => _otests}/integers/u8/eq.leo (100%) rename compiler/{otests => _otests}/integers/u8/ge.leo (100%) rename compiler/{otests => _otests}/integers/u8/gt.leo (100%) rename compiler/{otests => _otests}/integers/u8/input.leo (100%) rename compiler/{otests => _otests}/integers/u8/le.leo (100%) rename compiler/{otests => _otests}/integers/u8/lt.leo (100%) rename compiler/{otests => _otests}/integers/u8/max.leo (100%) rename compiler/{otests => _otests}/integers/u8/max_fail.leo (100%) rename compiler/{otests => _otests}/integers/u8/min.leo (100%) rename compiler/{otests => _otests}/integers/u8/min_fail.leo (100%) rename compiler/{otests => _otests}/integers/u8/mod.rs (100%) rename compiler/{otests => _otests}/integers/u8/mul.leo (100%) rename compiler/{otests => _otests}/integers/u8/ne.leo (100%) rename compiler/{otests => _otests}/integers/u8/no_space_between_literal.leo (100%) rename compiler/{otests => _otests}/integers/u8/pow.leo (100%) rename compiler/{otests => _otests}/integers/u8/sub.leo (100%) rename compiler/{otests => _otests}/integers/u8/ternary.leo (100%) rename compiler/{otests => _otests}/integers/uint_macro.rs (100%) rename compiler/{otests => _otests}/mod.rs (100%) rename compiler/{otests => _otests}/mutability/array.leo (100%) rename compiler/{otests => _otests}/mutability/array_mut.leo (100%) rename compiler/{otests => _otests}/mutability/array_splice_mut.leo (100%) rename compiler/{otests => _otests}/mutability/array_tuple_mut.leo (100%) rename compiler/{otests => _otests}/mutability/circuit.leo (100%) rename compiler/{otests => _otests}/mutability/circuit_function_mut.leo (100%) rename compiler/{otests => _otests}/mutability/circuit_mut.leo (100%) rename compiler/{otests => _otests}/mutability/circuit_static_function_mut.leo (100%) rename compiler/{otests => _otests}/mutability/circuit_variable_mut.leo (100%) rename compiler/{otests => _otests}/mutability/cond_mut.leo (100%) rename compiler/{otests => _otests}/mutability/const.leo (100%) rename compiler/{otests => _otests}/mutability/function_input.leo (100%) rename compiler/{otests => _otests}/mutability/function_input_mut.leo (100%) rename compiler/{otests => _otests}/mutability/let.leo (100%) rename compiler/{otests => _otests}/mutability/let_mut.leo (100%) rename compiler/{otests => _otests}/mutability/let_mut_nested.leo (100%) rename compiler/{otests => _otests}/mutability/mod.rs (100%) rename compiler/{otests => _otests}/mutability/swap.leo (100%) rename compiler/{otests => _otests}/statements/block.leo (100%) rename compiler/{otests => _otests}/statements/conditional/assert.leo (100%) rename compiler/{otests => _otests}/statements/conditional/chain.leo (100%) rename compiler/{otests => _otests}/statements/conditional/cond_switch.leo (100%) rename compiler/{otests => _otests}/statements/conditional/for_loop.leo (100%) rename compiler/{otests => _otests}/statements/conditional/input/cond_switch.in (100%) rename compiler/{otests => _otests}/statements/conditional/input/registers_one.in (100%) rename compiler/{otests => _otests}/statements/conditional/input/registers_zero.in (100%) rename compiler/{otests => _otests}/statements/conditional/mod.rs (100%) rename compiler/{otests => _otests}/statements/conditional/multiple_returns.leo (100%) rename compiler/{otests => _otests}/statements/conditional/mutate.leo (100%) rename compiler/{otests => _otests}/statements/conditional/nested.leo (100%) rename compiler/{otests => _otests}/statements/conditional/output/cond_switch.out (100%) rename compiler/{otests => _otests}/statements/conditional/output/registers_one.out (100%) rename compiler/{otests => _otests}/statements/conditional/output/registers_zero.out (100%) rename compiler/{otests => _otests}/statements/iteration_basic.leo (100%) rename compiler/{otests => _otests}/statements/iteration_input.in (100%) rename compiler/{otests => _otests}/statements/iteration_input.leo (100%) rename compiler/{otests => _otests}/statements/iteration_type_fail.leo (100%) rename compiler/{otests => _otests}/statements/iteration_variable.leo (100%) rename compiler/{otests => _otests}/statements/mod.rs (100%) rename compiler/{otests => _otests}/statements/num_returns_fail.leo (100%) rename compiler/{otests => _otests}/statements/ternary_basic.leo (100%) rename compiler/{otests => _otests}/statements/ternary_non_const_conditional_fail.leo (100%) rename compiler/{otests => _otests}/syntax/compare_mismatched_types.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/address_fail.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/console_fail.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/field_fail.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/group_fail.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/i8_fail.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/input_fail.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/mod.rs (100%) rename compiler/{otests => _otests}/syntax/identifiers/self_keyword_fail.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/self_type_fail.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/true_fail.leo (100%) rename compiler/{otests => _otests}/syntax/identifiers/u8_fail.leo (100%) rename compiler/{otests => _otests}/syntax/input_semicolon.leo (100%) rename compiler/{otests => _otests}/syntax/mod.rs (100%) rename compiler/{otests => _otests}/syntax/semicolon.leo (100%) rename compiler/{otests => _otests}/syntax/undefined.leo (100%) rename compiler/{otests => _otests}/tuples/access.leo (100%) rename compiler/{otests => _otests}/tuples/basic.leo (100%) rename compiler/{otests => _otests}/tuples/function.leo (100%) rename compiler/{otests => _otests}/tuples/function_multiple.leo (100%) rename compiler/{otests => _otests}/tuples/function_typed.leo (100%) rename compiler/{otests => _otests}/tuples/input.leo (100%) rename compiler/{otests => _otests}/tuples/inputs/input.in (100%) rename compiler/{otests => _otests}/tuples/mod.rs (100%) rename compiler/{otests => _otests}/tuples/multiple.leo (100%) rename compiler/{otests => _otests}/tuples/multiple_typed.leo (100%) rename compiler/{otests => _otests}/tuples/nested.leo (100%) rename compiler/{otests => _otests}/tuples/nested_access.leo (100%) rename compiler/{otests => _otests}/tuples/nested_typed.leo (100%) rename compiler/{otests => _otests}/tuples/typed.leo (100%) rename compiler/{otests => _otests}/type_inference/basic.json (100%) rename compiler/{otests => _otests}/type_inference/basic.leo (100%) rename compiler/{otests => _otests}/type_inference/for_loop_and_compound.json (100%) rename compiler/{otests => _otests}/type_inference/for_loop_and_compound.leo (100%) rename compiler/{otests => _otests}/type_inference/mod.rs (100%) create mode 100644 compiler/tests/canonicalization/array_expansion.json create mode 100644 compiler/tests/canonicalization/array_expansion.leo create mode 100644 compiler/tests/canonicalization/array_size_zero_fail.leo create mode 100644 compiler/tests/canonicalization/big_self_in_circuit_replacement.json create mode 100644 compiler/tests/canonicalization/big_self_in_circuit_replacement.leo create mode 100644 compiler/tests/canonicalization/big_self_outside_circuit_fail.leo create mode 100644 compiler/tests/canonicalization/compound_assignment.json create mode 100644 compiler/tests/canonicalization/compound_assignment.leo create mode 100644 compiler/tests/canonicalization/illegal_array_range_fail.leo create mode 100644 compiler/tests/canonicalization/input/array_expansion.in create mode 100644 compiler/tests/canonicalization/mod.rs rename compiler/{otests => tests}/compiler_output/empty.out (100%) create mode 100644 compiler/tests/mod.rs rename compiler/{src => tests}/test.rs (98%) create mode 100644 compiler/tests/type_inference/basic.json create mode 100644 compiler/tests/type_inference/basic.leo create mode 100644 compiler/tests/type_inference/for_loop_and_compound.json create mode 100644 compiler/tests/type_inference/for_loop_and_compound.leo create mode 100644 compiler/tests/type_inference/mod.rs delete mode 100644 tests/compiler/_field/mod.rs delete mode 100644 tests/compiler/_group/mod.rs diff --git a/compiler/otests/address/console_assert_fail.leo b/compiler/_otests/address/console_assert_fail.leo similarity index 100% rename from compiler/otests/address/console_assert_fail.leo rename to compiler/_otests/address/console_assert_fail.leo diff --git a/compiler/otests/address/console_assert_pass.leo b/compiler/_otests/address/console_assert_pass.leo similarity index 100% rename from compiler/otests/address/console_assert_pass.leo rename to compiler/_otests/address/console_assert_pass.leo diff --git a/compiler/otests/address/empty.leo b/compiler/_otests/address/empty.leo similarity index 100% rename from compiler/otests/address/empty.leo rename to compiler/_otests/address/empty.leo diff --git a/compiler/otests/address/equal.leo b/compiler/_otests/address/equal.leo similarity index 100% rename from compiler/otests/address/equal.leo rename to compiler/_otests/address/equal.leo diff --git a/compiler/otests/address/implicit_invalid.leo b/compiler/_otests/address/implicit_invalid.leo similarity index 100% rename from compiler/otests/address/implicit_invalid.leo rename to compiler/_otests/address/implicit_invalid.leo diff --git a/compiler/otests/address/implicit_valid.leo b/compiler/_otests/address/implicit_valid.leo similarity index 100% rename from compiler/otests/address/implicit_valid.leo rename to compiler/_otests/address/implicit_valid.leo diff --git a/compiler/otests/address/input.leo b/compiler/_otests/address/input.leo similarity index 100% rename from compiler/otests/address/input.leo rename to compiler/_otests/address/input.leo diff --git a/compiler/otests/address/invalid_length.leo b/compiler/_otests/address/invalid_length.leo similarity index 100% rename from compiler/otests/address/invalid_length.leo rename to compiler/_otests/address/invalid_length.leo diff --git a/compiler/otests/address/invalid_prefix.leo b/compiler/_otests/address/invalid_prefix.leo similarity index 100% rename from compiler/otests/address/invalid_prefix.leo rename to compiler/_otests/address/invalid_prefix.leo diff --git a/compiler/otests/address/mod.rs b/compiler/_otests/address/mod.rs similarity index 100% rename from compiler/otests/address/mod.rs rename to compiler/_otests/address/mod.rs diff --git a/compiler/otests/address/ternary.leo b/compiler/_otests/address/ternary.leo similarity index 100% rename from compiler/otests/address/ternary.leo rename to compiler/_otests/address/ternary.leo diff --git a/compiler/otests/address/valid.leo b/compiler/_otests/address/valid.leo similarity index 100% rename from compiler/otests/address/valid.leo rename to compiler/_otests/address/valid.leo diff --git a/compiler/otests/array/initializer.leo b/compiler/_otests/array/initializer.leo similarity index 100% rename from compiler/otests/array/initializer.leo rename to compiler/_otests/array/initializer.leo diff --git a/compiler/otests/array/initializer_fail.leo b/compiler/_otests/array/initializer_fail.leo similarity index 100% rename from compiler/otests/array/initializer_fail.leo rename to compiler/_otests/array/initializer_fail.leo diff --git a/compiler/otests/array/initializer_input.leo b/compiler/_otests/array/initializer_input.leo similarity index 100% rename from compiler/otests/array/initializer_input.leo rename to compiler/_otests/array/initializer_input.leo diff --git a/compiler/otests/array/inline.leo b/compiler/_otests/array/inline.leo similarity index 100% rename from compiler/otests/array/inline.leo rename to compiler/_otests/array/inline.leo diff --git a/compiler/otests/array/input/initializer_fail.in b/compiler/_otests/array/input/initializer_fail.in similarity index 100% rename from compiler/otests/array/input/initializer_fail.in rename to compiler/_otests/array/input/initializer_fail.in diff --git a/compiler/otests/array/input/inline_fail.leo b/compiler/_otests/array/input/inline_fail.leo similarity index 100% rename from compiler/otests/array/input/inline_fail.leo rename to compiler/_otests/array/input/inline_fail.leo diff --git a/compiler/otests/array/input/input_nested_3x2.in b/compiler/_otests/array/input/input_nested_3x2.in similarity index 100% rename from compiler/otests/array/input/input_nested_3x2.in rename to compiler/_otests/array/input/input_nested_3x2.in diff --git a/compiler/otests/array/input/input_nested_3x2_fail.in b/compiler/_otests/array/input/input_nested_3x2_fail.in similarity index 100% rename from compiler/otests/array/input/input_nested_3x2_fail.in rename to compiler/_otests/array/input/input_nested_3x2_fail.in diff --git a/compiler/otests/array/input/input_tuple_3x2.in b/compiler/_otests/array/input/input_tuple_3x2.in similarity index 100% rename from compiler/otests/array/input/input_tuple_3x2.in rename to compiler/_otests/array/input/input_tuple_3x2.in diff --git a/compiler/otests/array/input/input_tuple_3x2_fail.in b/compiler/_otests/array/input/input_tuple_3x2_fail.in similarity index 100% rename from compiler/otests/array/input/input_tuple_3x2_fail.in rename to compiler/_otests/array/input/input_tuple_3x2_fail.in diff --git a/compiler/otests/array/input/registers_ones.in b/compiler/_otests/array/input/registers_ones.in similarity index 100% rename from compiler/otests/array/input/registers_ones.in rename to compiler/_otests/array/input/registers_ones.in diff --git a/compiler/otests/array/input/registers_zeros.in b/compiler/_otests/array/input/registers_zeros.in similarity index 100% rename from compiler/otests/array/input/registers_zeros.in rename to compiler/_otests/array/input/registers_zeros.in diff --git a/compiler/otests/array/input/six_zeros.in b/compiler/_otests/array/input/six_zeros.in similarity index 100% rename from compiler/otests/array/input/six_zeros.in rename to compiler/_otests/array/input/six_zeros.in diff --git a/compiler/otests/array/input/three_ones.in b/compiler/_otests/array/input/three_ones.in similarity index 100% rename from compiler/otests/array/input/three_ones.in rename to compiler/_otests/array/input/three_ones.in diff --git a/compiler/otests/array/input/type_nested_value_nested_3x2.in b/compiler/_otests/array/input/type_nested_value_nested_3x2.in similarity index 100% rename from compiler/otests/array/input/type_nested_value_nested_3x2.in rename to compiler/_otests/array/input/type_nested_value_nested_3x2.in diff --git a/compiler/otests/array/input/type_nested_value_nested_3x2_fail.in b/compiler/_otests/array/input/type_nested_value_nested_3x2_fail.in similarity index 100% rename from compiler/otests/array/input/type_nested_value_nested_3x2_fail.in rename to compiler/_otests/array/input/type_nested_value_nested_3x2_fail.in diff --git a/compiler/otests/array/input/type_nested_value_nested_4x3x2.in b/compiler/_otests/array/input/type_nested_value_nested_4x3x2.in similarity index 100% rename from compiler/otests/array/input/type_nested_value_nested_4x3x2.in rename to compiler/_otests/array/input/type_nested_value_nested_4x3x2.in diff --git a/compiler/otests/array/input/type_nested_value_nested_4x3x2_fail.in b/compiler/_otests/array/input/type_nested_value_nested_4x3x2_fail.in similarity index 100% rename from compiler/otests/array/input/type_nested_value_nested_4x3x2_fail.in rename to compiler/_otests/array/input/type_nested_value_nested_4x3x2_fail.in diff --git a/compiler/otests/array/input/type_nested_value_tuple_3x2.in b/compiler/_otests/array/input/type_nested_value_tuple_3x2.in similarity index 100% rename from compiler/otests/array/input/type_nested_value_tuple_3x2.in rename to compiler/_otests/array/input/type_nested_value_tuple_3x2.in diff --git a/compiler/otests/array/input/type_nested_value_tuple_3x2_fail.in b/compiler/_otests/array/input/type_nested_value_tuple_3x2_fail.in similarity index 100% rename from compiler/otests/array/input/type_nested_value_tuple_3x2_fail.in rename to compiler/_otests/array/input/type_nested_value_tuple_3x2_fail.in diff --git a/compiler/otests/array/input/type_nested_value_tuple_4x3x2.in b/compiler/_otests/array/input/type_nested_value_tuple_4x3x2.in similarity index 100% rename from compiler/otests/array/input/type_nested_value_tuple_4x3x2.in rename to compiler/_otests/array/input/type_nested_value_tuple_4x3x2.in diff --git a/compiler/otests/array/input/type_nested_value_tuple_4x3x2_fail.in b/compiler/_otests/array/input/type_nested_value_tuple_4x3x2_fail.in similarity index 100% rename from compiler/otests/array/input/type_nested_value_tuple_4x3x2_fail.in rename to compiler/_otests/array/input/type_nested_value_tuple_4x3x2_fail.in diff --git a/compiler/otests/array/input/type_tuple_value_nested_3x2.in b/compiler/_otests/array/input/type_tuple_value_nested_3x2.in similarity index 100% rename from compiler/otests/array/input/type_tuple_value_nested_3x2.in rename to compiler/_otests/array/input/type_tuple_value_nested_3x2.in diff --git a/compiler/otests/array/input/type_tuple_value_nested_3x2_fail.in b/compiler/_otests/array/input/type_tuple_value_nested_3x2_fail.in similarity index 100% rename from compiler/otests/array/input/type_tuple_value_nested_3x2_fail.in rename to compiler/_otests/array/input/type_tuple_value_nested_3x2_fail.in diff --git a/compiler/otests/array/input/type_tuple_value_nested_4x3x2.in b/compiler/_otests/array/input/type_tuple_value_nested_4x3x2.in similarity index 100% rename from compiler/otests/array/input/type_tuple_value_nested_4x3x2.in rename to compiler/_otests/array/input/type_tuple_value_nested_4x3x2.in diff --git a/compiler/otests/array/input/type_tuple_value_nested_4x3x2_fail.in b/compiler/_otests/array/input/type_tuple_value_nested_4x3x2_fail.in similarity index 100% rename from compiler/otests/array/input/type_tuple_value_nested_4x3x2_fail.in rename to compiler/_otests/array/input/type_tuple_value_nested_4x3x2_fail.in diff --git a/compiler/otests/array/input/type_tuple_value_tuple_3x2.in b/compiler/_otests/array/input/type_tuple_value_tuple_3x2.in similarity index 100% rename from compiler/otests/array/input/type_tuple_value_tuple_3x2.in rename to compiler/_otests/array/input/type_tuple_value_tuple_3x2.in diff --git a/compiler/otests/array/input/type_tuple_value_tuple_3x2_fail.in b/compiler/_otests/array/input/type_tuple_value_tuple_3x2_fail.in similarity index 100% rename from compiler/otests/array/input/type_tuple_value_tuple_3x2_fail.in rename to compiler/_otests/array/input/type_tuple_value_tuple_3x2_fail.in diff --git a/compiler/otests/array/input/type_tuple_value_tuple_4x3x2.in b/compiler/_otests/array/input/type_tuple_value_tuple_4x3x2.in similarity index 100% rename from compiler/otests/array/input/type_tuple_value_tuple_4x3x2.in rename to compiler/_otests/array/input/type_tuple_value_tuple_4x3x2.in diff --git a/compiler/otests/array/input/type_tuple_value_tuple_4x3x2_fail.in b/compiler/_otests/array/input/type_tuple_value_tuple_4x3x2_fail.in similarity index 100% rename from compiler/otests/array/input/type_tuple_value_tuple_4x3x2_fail.in rename to compiler/_otests/array/input/type_tuple_value_tuple_4x3x2_fail.in diff --git a/compiler/otests/array/input_nested_3x2.leo b/compiler/_otests/array/input_nested_3x2.leo similarity index 100% rename from compiler/otests/array/input_nested_3x2.leo rename to compiler/_otests/array/input_nested_3x2.leo diff --git a/compiler/otests/array/input_nested_3x2_fail.leo b/compiler/_otests/array/input_nested_3x2_fail.leo similarity index 100% rename from compiler/otests/array/input_nested_3x2_fail.leo rename to compiler/_otests/array/input_nested_3x2_fail.leo diff --git a/compiler/otests/array/input_tuple_3x2.leo b/compiler/_otests/array/input_tuple_3x2.leo similarity index 100% rename from compiler/otests/array/input_tuple_3x2.leo rename to compiler/_otests/array/input_tuple_3x2.leo diff --git a/compiler/otests/array/input_tuple_3x2_fail.leo b/compiler/_otests/array/input_tuple_3x2_fail.leo similarity index 100% rename from compiler/otests/array/input_tuple_3x2_fail.leo rename to compiler/_otests/array/input_tuple_3x2_fail.leo diff --git a/compiler/otests/array/mod.rs b/compiler/_otests/array/mod.rs similarity index 100% rename from compiler/otests/array/mod.rs rename to compiler/_otests/array/mod.rs diff --git a/compiler/otests/array/multi_fail_initializer.leo b/compiler/_otests/array/multi_fail_initializer.leo similarity index 100% rename from compiler/otests/array/multi_fail_initializer.leo rename to compiler/_otests/array/multi_fail_initializer.leo diff --git a/compiler/otests/array/multi_fail_inline.leo b/compiler/_otests/array/multi_fail_inline.leo similarity index 100% rename from compiler/otests/array/multi_fail_inline.leo rename to compiler/_otests/array/multi_fail_inline.leo diff --git a/compiler/otests/array/multi_initializer.leo b/compiler/_otests/array/multi_initializer.leo similarity index 100% rename from compiler/otests/array/multi_initializer.leo rename to compiler/_otests/array/multi_initializer.leo diff --git a/compiler/otests/array/multi_initializer_fail.leo b/compiler/_otests/array/multi_initializer_fail.leo similarity index 100% rename from compiler/otests/array/multi_initializer_fail.leo rename to compiler/_otests/array/multi_initializer_fail.leo diff --git a/compiler/otests/array/nested.leo b/compiler/_otests/array/nested.leo similarity index 100% rename from compiler/otests/array/nested.leo rename to compiler/_otests/array/nested.leo diff --git a/compiler/otests/array/nested_3x2_value.leo b/compiler/_otests/array/nested_3x2_value.leo similarity index 100% rename from compiler/otests/array/nested_3x2_value.leo rename to compiler/_otests/array/nested_3x2_value.leo diff --git a/compiler/otests/array/nested_3x2_value_fail.leo b/compiler/_otests/array/nested_3x2_value_fail.leo similarity index 100% rename from compiler/otests/array/nested_3x2_value_fail.leo rename to compiler/_otests/array/nested_3x2_value_fail.leo diff --git a/compiler/otests/array/output/registers_ones.out b/compiler/_otests/array/output/registers_ones.out similarity index 100% rename from compiler/otests/array/output/registers_ones.out rename to compiler/_otests/array/output/registers_ones.out diff --git a/compiler/otests/array/output/registers_zeros.out b/compiler/_otests/array/output/registers_zeros.out similarity index 100% rename from compiler/otests/array/output/registers_zeros.out rename to compiler/_otests/array/output/registers_zeros.out diff --git a/compiler/otests/array/registers.leo b/compiler/_otests/array/registers.leo similarity index 100% rename from compiler/otests/array/registers.leo rename to compiler/_otests/array/registers.leo diff --git a/compiler/otests/array/slice.leo b/compiler/_otests/array/slice.leo similarity index 100% rename from compiler/otests/array/slice.leo rename to compiler/_otests/array/slice.leo diff --git a/compiler/otests/array/slice_lower.leo b/compiler/_otests/array/slice_lower.leo similarity index 100% rename from compiler/otests/array/slice_lower.leo rename to compiler/_otests/array/slice_lower.leo diff --git a/compiler/otests/array/spread.leo b/compiler/_otests/array/spread.leo similarity index 100% rename from compiler/otests/array/spread.leo rename to compiler/_otests/array/spread.leo diff --git a/compiler/otests/array/tuple_3x2_value.leo b/compiler/_otests/array/tuple_3x2_value.leo similarity index 100% rename from compiler/otests/array/tuple_3x2_value.leo rename to compiler/_otests/array/tuple_3x2_value.leo diff --git a/compiler/otests/array/tuple_3x2_value_fail.leo b/compiler/_otests/array/tuple_3x2_value_fail.leo similarity index 100% rename from compiler/otests/array/tuple_3x2_value_fail.leo rename to compiler/_otests/array/tuple_3x2_value_fail.leo diff --git a/compiler/otests/array/type_fail.leo b/compiler/_otests/array/type_fail.leo similarity index 100% rename from compiler/otests/array/type_fail.leo rename to compiler/_otests/array/type_fail.leo diff --git a/compiler/otests/array/type_input_3x2.leo b/compiler/_otests/array/type_input_3x2.leo similarity index 100% rename from compiler/otests/array/type_input_3x2.leo rename to compiler/_otests/array/type_input_3x2.leo diff --git a/compiler/otests/array/type_input_4x3x2.leo b/compiler/_otests/array/type_input_4x3x2.leo similarity index 100% rename from compiler/otests/array/type_input_4x3x2.leo rename to compiler/_otests/array/type_input_4x3x2.leo diff --git a/compiler/otests/array/type_nested_value_nested_3x2.leo b/compiler/_otests/array/type_nested_value_nested_3x2.leo similarity index 100% rename from compiler/otests/array/type_nested_value_nested_3x2.leo rename to compiler/_otests/array/type_nested_value_nested_3x2.leo diff --git a/compiler/otests/array/type_nested_value_nested_3x2_fail.leo b/compiler/_otests/array/type_nested_value_nested_3x2_fail.leo similarity index 100% rename from compiler/otests/array/type_nested_value_nested_3x2_fail.leo rename to compiler/_otests/array/type_nested_value_nested_3x2_fail.leo diff --git a/compiler/otests/array/type_nested_value_nested_4x3x2.leo b/compiler/_otests/array/type_nested_value_nested_4x3x2.leo similarity index 100% rename from compiler/otests/array/type_nested_value_nested_4x3x2.leo rename to compiler/_otests/array/type_nested_value_nested_4x3x2.leo diff --git a/compiler/otests/array/type_nested_value_nested_4x3x2_fail.leo b/compiler/_otests/array/type_nested_value_nested_4x3x2_fail.leo similarity index 100% rename from compiler/otests/array/type_nested_value_nested_4x3x2_fail.leo rename to compiler/_otests/array/type_nested_value_nested_4x3x2_fail.leo diff --git a/compiler/otests/array/type_nested_value_tuple_3x2.leo b/compiler/_otests/array/type_nested_value_tuple_3x2.leo similarity index 100% rename from compiler/otests/array/type_nested_value_tuple_3x2.leo rename to compiler/_otests/array/type_nested_value_tuple_3x2.leo diff --git a/compiler/otests/array/type_nested_value_tuple_3x2_fail.leo b/compiler/_otests/array/type_nested_value_tuple_3x2_fail.leo similarity index 100% rename from compiler/otests/array/type_nested_value_tuple_3x2_fail.leo rename to compiler/_otests/array/type_nested_value_tuple_3x2_fail.leo diff --git a/compiler/otests/array/type_nested_value_tuple_4x3x2.leo b/compiler/_otests/array/type_nested_value_tuple_4x3x2.leo similarity index 100% rename from compiler/otests/array/type_nested_value_tuple_4x3x2.leo rename to compiler/_otests/array/type_nested_value_tuple_4x3x2.leo diff --git a/compiler/otests/array/type_nested_value_tuple_4x3x2_fail.leo b/compiler/_otests/array/type_nested_value_tuple_4x3x2_fail.leo similarity index 100% rename from compiler/otests/array/type_nested_value_tuple_4x3x2_fail.leo rename to compiler/_otests/array/type_nested_value_tuple_4x3x2_fail.leo diff --git a/compiler/otests/array/type_tuple_value_nested_3x2.leo b/compiler/_otests/array/type_tuple_value_nested_3x2.leo similarity index 100% rename from compiler/otests/array/type_tuple_value_nested_3x2.leo rename to compiler/_otests/array/type_tuple_value_nested_3x2.leo diff --git a/compiler/otests/array/type_tuple_value_nested_3x2_fail.leo b/compiler/_otests/array/type_tuple_value_nested_3x2_fail.leo similarity index 100% rename from compiler/otests/array/type_tuple_value_nested_3x2_fail.leo rename to compiler/_otests/array/type_tuple_value_nested_3x2_fail.leo diff --git a/compiler/otests/array/type_tuple_value_nested_4x3x2.leo b/compiler/_otests/array/type_tuple_value_nested_4x3x2.leo similarity index 100% rename from compiler/otests/array/type_tuple_value_nested_4x3x2.leo rename to compiler/_otests/array/type_tuple_value_nested_4x3x2.leo diff --git a/compiler/otests/array/type_tuple_value_nested_4x3x2_fail.leo b/compiler/_otests/array/type_tuple_value_nested_4x3x2_fail.leo similarity index 100% rename from compiler/otests/array/type_tuple_value_nested_4x3x2_fail.leo rename to compiler/_otests/array/type_tuple_value_nested_4x3x2_fail.leo diff --git a/compiler/otests/array/type_tuple_value_tuple_3x2.leo b/compiler/_otests/array/type_tuple_value_tuple_3x2.leo similarity index 100% rename from compiler/otests/array/type_tuple_value_tuple_3x2.leo rename to compiler/_otests/array/type_tuple_value_tuple_3x2.leo diff --git a/compiler/otests/array/type_tuple_value_tuple_3x2_fail.leo b/compiler/_otests/array/type_tuple_value_tuple_3x2_fail.leo similarity index 100% rename from compiler/otests/array/type_tuple_value_tuple_3x2_fail.leo rename to compiler/_otests/array/type_tuple_value_tuple_3x2_fail.leo diff --git a/compiler/otests/array/type_tuple_value_tuple_4x3x2.leo b/compiler/_otests/array/type_tuple_value_tuple_4x3x2.leo similarity index 100% rename from compiler/otests/array/type_tuple_value_tuple_4x3x2.leo rename to compiler/_otests/array/type_tuple_value_tuple_4x3x2.leo diff --git a/compiler/otests/array/type_tuple_value_tuple_4x3x2_fail.leo b/compiler/_otests/array/type_tuple_value_tuple_4x3x2_fail.leo similarity index 100% rename from compiler/otests/array/type_tuple_value_tuple_4x3x2_fail.leo rename to compiler/_otests/array/type_tuple_value_tuple_4x3x2_fail.leo diff --git a/compiler/otests/array/variable_slice_fail.leo b/compiler/_otests/array/variable_slice_fail.leo similarity index 100% rename from compiler/otests/array/variable_slice_fail.leo rename to compiler/_otests/array/variable_slice_fail.leo diff --git a/compiler/otests/boolean/all.leo b/compiler/_otests/boolean/all.leo similarity index 100% rename from compiler/otests/boolean/all.leo rename to compiler/_otests/boolean/all.leo diff --git a/compiler/otests/boolean/assert_eq_input.leo b/compiler/_otests/boolean/assert_eq_input.leo similarity index 100% rename from compiler/otests/boolean/assert_eq_input.leo rename to compiler/_otests/boolean/assert_eq_input.leo diff --git a/compiler/otests/boolean/conditional_mut.leo b/compiler/_otests/boolean/conditional_mut.leo similarity index 100% rename from compiler/otests/boolean/conditional_mut.leo rename to compiler/_otests/boolean/conditional_mut.leo diff --git a/compiler/otests/boolean/false_and_false.leo b/compiler/_otests/boolean/false_and_false.leo similarity index 100% rename from compiler/otests/boolean/false_and_false.leo rename to compiler/_otests/boolean/false_and_false.leo diff --git a/compiler/otests/boolean/false_or_false.leo b/compiler/_otests/boolean/false_or_false.leo similarity index 100% rename from compiler/otests/boolean/false_or_false.leo rename to compiler/_otests/boolean/false_or_false.leo diff --git a/compiler/otests/boolean/input/registers_false.in b/compiler/_otests/boolean/input/registers_false.in similarity index 100% rename from compiler/otests/boolean/input/registers_false.in rename to compiler/_otests/boolean/input/registers_false.in diff --git a/compiler/otests/boolean/input/registers_true.in b/compiler/_otests/boolean/input/registers_true.in similarity index 100% rename from compiler/otests/boolean/input/registers_true.in rename to compiler/_otests/boolean/input/registers_true.in diff --git a/compiler/otests/boolean/input/true_false.in b/compiler/_otests/boolean/input/true_false.in similarity index 100% rename from compiler/otests/boolean/input/true_false.in rename to compiler/_otests/boolean/input/true_false.in diff --git a/compiler/otests/boolean/input/true_true.in b/compiler/_otests/boolean/input/true_true.in similarity index 100% rename from compiler/otests/boolean/input/true_true.in rename to compiler/_otests/boolean/input/true_true.in diff --git a/compiler/otests/boolean/mod.rs b/compiler/_otests/boolean/mod.rs similarity index 100% rename from compiler/otests/boolean/mod.rs rename to compiler/_otests/boolean/mod.rs diff --git a/compiler/otests/boolean/not_false.leo b/compiler/_otests/boolean/not_false.leo similarity index 100% rename from compiler/otests/boolean/not_false.leo rename to compiler/_otests/boolean/not_false.leo diff --git a/compiler/otests/boolean/not_mutable.leo b/compiler/_otests/boolean/not_mutable.leo similarity index 100% rename from compiler/otests/boolean/not_mutable.leo rename to compiler/_otests/boolean/not_mutable.leo diff --git a/compiler/otests/boolean/not_true.leo b/compiler/_otests/boolean/not_true.leo similarity index 100% rename from compiler/otests/boolean/not_true.leo rename to compiler/_otests/boolean/not_true.leo diff --git a/compiler/otests/boolean/not_u32.leo b/compiler/_otests/boolean/not_u32.leo similarity index 100% rename from compiler/otests/boolean/not_u32.leo rename to compiler/_otests/boolean/not_u32.leo diff --git a/compiler/otests/boolean/output/registers_false.out b/compiler/_otests/boolean/output/registers_false.out similarity index 100% rename from compiler/otests/boolean/output/registers_false.out rename to compiler/_otests/boolean/output/registers_false.out diff --git a/compiler/otests/boolean/output/registers_true.out b/compiler/_otests/boolean/output/registers_true.out similarity index 100% rename from compiler/otests/boolean/output/registers_true.out rename to compiler/_otests/boolean/output/registers_true.out diff --git a/compiler/otests/boolean/output_register.leo b/compiler/_otests/boolean/output_register.leo similarity index 100% rename from compiler/otests/boolean/output_register.leo rename to compiler/_otests/boolean/output_register.leo diff --git a/compiler/otests/boolean/true_and_false.leo b/compiler/_otests/boolean/true_and_false.leo similarity index 100% rename from compiler/otests/boolean/true_and_false.leo rename to compiler/_otests/boolean/true_and_false.leo diff --git a/compiler/otests/boolean/true_and_true.leo b/compiler/_otests/boolean/true_and_true.leo similarity index 100% rename from compiler/otests/boolean/true_and_true.leo rename to compiler/_otests/boolean/true_and_true.leo diff --git a/compiler/otests/boolean/true_and_u32.leo b/compiler/_otests/boolean/true_and_u32.leo similarity index 100% rename from compiler/otests/boolean/true_and_u32.leo rename to compiler/_otests/boolean/true_and_u32.leo diff --git a/compiler/otests/boolean/true_or_false.leo b/compiler/_otests/boolean/true_or_false.leo similarity index 100% rename from compiler/otests/boolean/true_or_false.leo rename to compiler/_otests/boolean/true_or_false.leo diff --git a/compiler/otests/boolean/true_or_true.leo b/compiler/_otests/boolean/true_or_true.leo similarity index 100% rename from compiler/otests/boolean/true_or_true.leo rename to compiler/_otests/boolean/true_or_true.leo diff --git a/compiler/otests/boolean/true_or_u32.leo b/compiler/_otests/boolean/true_or_u32.leo similarity index 100% rename from compiler/otests/boolean/true_or_u32.leo rename to compiler/_otests/boolean/true_or_u32.leo diff --git a/compiler/otests/canonicalization/array_expansion.json b/compiler/_otests/canonicalization/array_expansion.json similarity index 100% rename from compiler/otests/canonicalization/array_expansion.json rename to compiler/_otests/canonicalization/array_expansion.json diff --git a/compiler/otests/canonicalization/array_expansion.leo b/compiler/_otests/canonicalization/array_expansion.leo similarity index 100% rename from compiler/otests/canonicalization/array_expansion.leo rename to compiler/_otests/canonicalization/array_expansion.leo diff --git a/compiler/otests/canonicalization/array_size_zero_fail.leo b/compiler/_otests/canonicalization/array_size_zero_fail.leo similarity index 100% rename from compiler/otests/canonicalization/array_size_zero_fail.leo rename to compiler/_otests/canonicalization/array_size_zero_fail.leo diff --git a/compiler/otests/canonicalization/big_self_in_circuit_replacement.json b/compiler/_otests/canonicalization/big_self_in_circuit_replacement.json similarity index 100% rename from compiler/otests/canonicalization/big_self_in_circuit_replacement.json rename to compiler/_otests/canonicalization/big_self_in_circuit_replacement.json diff --git a/compiler/otests/canonicalization/big_self_in_circuit_replacement.leo b/compiler/_otests/canonicalization/big_self_in_circuit_replacement.leo similarity index 100% rename from compiler/otests/canonicalization/big_self_in_circuit_replacement.leo rename to compiler/_otests/canonicalization/big_self_in_circuit_replacement.leo diff --git a/compiler/otests/canonicalization/big_self_outside_circuit_fail.leo b/compiler/_otests/canonicalization/big_self_outside_circuit_fail.leo similarity index 100% rename from compiler/otests/canonicalization/big_self_outside_circuit_fail.leo rename to compiler/_otests/canonicalization/big_self_outside_circuit_fail.leo diff --git a/compiler/otests/canonicalization/compound_assignment.json b/compiler/_otests/canonicalization/compound_assignment.json similarity index 100% rename from compiler/otests/canonicalization/compound_assignment.json rename to compiler/_otests/canonicalization/compound_assignment.json diff --git a/compiler/otests/canonicalization/compound_assignment.leo b/compiler/_otests/canonicalization/compound_assignment.leo similarity index 100% rename from compiler/otests/canonicalization/compound_assignment.leo rename to compiler/_otests/canonicalization/compound_assignment.leo diff --git a/compiler/otests/canonicalization/illegal_array_range_fail.leo b/compiler/_otests/canonicalization/illegal_array_range_fail.leo similarity index 100% rename from compiler/otests/canonicalization/illegal_array_range_fail.leo rename to compiler/_otests/canonicalization/illegal_array_range_fail.leo diff --git a/compiler/otests/canonicalization/input/array_expansion.in b/compiler/_otests/canonicalization/input/array_expansion.in similarity index 100% rename from compiler/otests/canonicalization/input/array_expansion.in rename to compiler/_otests/canonicalization/input/array_expansion.in diff --git a/compiler/otests/canonicalization/mod.rs b/compiler/_otests/canonicalization/mod.rs similarity index 100% rename from compiler/otests/canonicalization/mod.rs rename to compiler/_otests/canonicalization/mod.rs diff --git a/compiler/otests/circuits/const_self_variable.leo b/compiler/_otests/circuits/const_self_variable.leo similarity index 100% rename from compiler/otests/circuits/const_self_variable.leo rename to compiler/_otests/circuits/const_self_variable.leo diff --git a/compiler/otests/circuits/const_self_variable_fail.leo b/compiler/_otests/circuits/const_self_variable_fail.leo similarity index 100% rename from compiler/otests/circuits/const_self_variable_fail.leo rename to compiler/_otests/circuits/const_self_variable_fail.leo diff --git a/compiler/otests/circuits/define_circuit_inside_circuit_function.leo b/compiler/_otests/circuits/define_circuit_inside_circuit_function.leo similarity index 100% rename from compiler/otests/circuits/define_circuit_inside_circuit_function.leo rename to compiler/_otests/circuits/define_circuit_inside_circuit_function.leo diff --git a/compiler/otests/circuits/duplicate_name_context.leo b/compiler/_otests/circuits/duplicate_name_context.leo similarity index 100% rename from compiler/otests/circuits/duplicate_name_context.leo rename to compiler/_otests/circuits/duplicate_name_context.leo diff --git a/compiler/otests/circuits/inline.leo b/compiler/_otests/circuits/inline.leo similarity index 100% rename from compiler/otests/circuits/inline.leo rename to compiler/_otests/circuits/inline.leo diff --git a/compiler/otests/circuits/inline_fail.leo b/compiler/_otests/circuits/inline_fail.leo similarity index 100% rename from compiler/otests/circuits/inline_fail.leo rename to compiler/_otests/circuits/inline_fail.leo diff --git a/compiler/otests/circuits/inline_member_fail.leo b/compiler/_otests/circuits/inline_member_fail.leo similarity index 100% rename from compiler/otests/circuits/inline_member_fail.leo rename to compiler/_otests/circuits/inline_member_fail.leo diff --git a/compiler/otests/circuits/inline_member_pass.leo b/compiler/_otests/circuits/inline_member_pass.leo similarity index 100% rename from compiler/otests/circuits/inline_member_pass.leo rename to compiler/_otests/circuits/inline_member_pass.leo diff --git a/compiler/otests/circuits/inline_undefined.leo b/compiler/_otests/circuits/inline_undefined.leo similarity index 100% rename from compiler/otests/circuits/inline_undefined.leo rename to compiler/_otests/circuits/inline_undefined.leo diff --git a/compiler/otests/circuits/member_function.leo b/compiler/_otests/circuits/member_function.leo similarity index 100% rename from compiler/otests/circuits/member_function.leo rename to compiler/_otests/circuits/member_function.leo diff --git a/compiler/otests/circuits/member_function_fail.leo b/compiler/_otests/circuits/member_function_fail.leo similarity index 100% rename from compiler/otests/circuits/member_function_fail.leo rename to compiler/_otests/circuits/member_function_fail.leo diff --git a/compiler/otests/circuits/member_function_invalid.leo b/compiler/_otests/circuits/member_function_invalid.leo similarity index 100% rename from compiler/otests/circuits/member_function_invalid.leo rename to compiler/_otests/circuits/member_function_invalid.leo diff --git a/compiler/otests/circuits/member_function_nested.leo b/compiler/_otests/circuits/member_function_nested.leo similarity index 100% rename from compiler/otests/circuits/member_function_nested.leo rename to compiler/_otests/circuits/member_function_nested.leo diff --git a/compiler/otests/circuits/member_static_function.leo b/compiler/_otests/circuits/member_static_function.leo similarity index 100% rename from compiler/otests/circuits/member_static_function.leo rename to compiler/_otests/circuits/member_static_function.leo diff --git a/compiler/otests/circuits/member_static_function_invalid.leo b/compiler/_otests/circuits/member_static_function_invalid.leo similarity index 100% rename from compiler/otests/circuits/member_static_function_invalid.leo rename to compiler/_otests/circuits/member_static_function_invalid.leo diff --git a/compiler/otests/circuits/member_static_function_nested.leo b/compiler/_otests/circuits/member_static_function_nested.leo similarity index 100% rename from compiler/otests/circuits/member_static_function_nested.leo rename to compiler/_otests/circuits/member_static_function_nested.leo diff --git a/compiler/otests/circuits/member_static_function_undefined.leo b/compiler/_otests/circuits/member_static_function_undefined.leo similarity index 100% rename from compiler/otests/circuits/member_static_function_undefined.leo rename to compiler/_otests/circuits/member_static_function_undefined.leo diff --git a/compiler/otests/circuits/member_variable.leo b/compiler/_otests/circuits/member_variable.leo similarity index 100% rename from compiler/otests/circuits/member_variable.leo rename to compiler/_otests/circuits/member_variable.leo diff --git a/compiler/otests/circuits/member_variable_and_function.leo b/compiler/_otests/circuits/member_variable_and_function.leo similarity index 100% rename from compiler/otests/circuits/member_variable_and_function.leo rename to compiler/_otests/circuits/member_variable_and_function.leo diff --git a/compiler/otests/circuits/member_variable_fail.leo b/compiler/_otests/circuits/member_variable_fail.leo similarity index 100% rename from compiler/otests/circuits/member_variable_fail.leo rename to compiler/_otests/circuits/member_variable_fail.leo diff --git a/compiler/otests/circuits/mod.rs b/compiler/_otests/circuits/mod.rs similarity index 100% rename from compiler/otests/circuits/mod.rs rename to compiler/_otests/circuits/mod.rs diff --git a/compiler/otests/circuits/mut_function_fail.leo b/compiler/_otests/circuits/mut_function_fail.leo similarity index 100% rename from compiler/otests/circuits/mut_function_fail.leo rename to compiler/_otests/circuits/mut_function_fail.leo diff --git a/compiler/otests/circuits/mut_self_function_fail.leo b/compiler/_otests/circuits/mut_self_function_fail.leo similarity index 100% rename from compiler/otests/circuits/mut_self_function_fail.leo rename to compiler/_otests/circuits/mut_self_function_fail.leo diff --git a/compiler/otests/circuits/mut_self_static_function_fail.leo b/compiler/_otests/circuits/mut_self_static_function_fail.leo similarity index 100% rename from compiler/otests/circuits/mut_self_static_function_fail.leo rename to compiler/_otests/circuits/mut_self_static_function_fail.leo diff --git a/compiler/otests/circuits/mut_self_variable.leo b/compiler/_otests/circuits/mut_self_variable.leo similarity index 100% rename from compiler/otests/circuits/mut_self_variable.leo rename to compiler/_otests/circuits/mut_self_variable.leo diff --git a/compiler/otests/circuits/mut_self_variable_branch.leo b/compiler/_otests/circuits/mut_self_variable_branch.leo similarity index 100% rename from compiler/otests/circuits/mut_self_variable_branch.leo rename to compiler/_otests/circuits/mut_self_variable_branch.leo diff --git a/compiler/otests/circuits/mut_self_variable_conditional.leo b/compiler/_otests/circuits/mut_self_variable_conditional.leo similarity index 100% rename from compiler/otests/circuits/mut_self_variable_conditional.leo rename to compiler/_otests/circuits/mut_self_variable_conditional.leo diff --git a/compiler/otests/circuits/mut_self_variable_fail.leo b/compiler/_otests/circuits/mut_self_variable_fail.leo similarity index 100% rename from compiler/otests/circuits/mut_self_variable_fail.leo rename to compiler/_otests/circuits/mut_self_variable_fail.leo diff --git a/compiler/otests/circuits/mut_static_function_fail.leo b/compiler/_otests/circuits/mut_static_function_fail.leo similarity index 100% rename from compiler/otests/circuits/mut_static_function_fail.leo rename to compiler/_otests/circuits/mut_static_function_fail.leo diff --git a/compiler/otests/circuits/mut_variable.leo b/compiler/_otests/circuits/mut_variable.leo similarity index 100% rename from compiler/otests/circuits/mut_variable.leo rename to compiler/_otests/circuits/mut_variable.leo diff --git a/compiler/otests/circuits/mut_variable_fail.leo b/compiler/_otests/circuits/mut_variable_fail.leo similarity index 100% rename from compiler/otests/circuits/mut_variable_fail.leo rename to compiler/_otests/circuits/mut_variable_fail.leo diff --git a/compiler/otests/circuits/mutable_call_immutable_context.leo b/compiler/_otests/circuits/mutable_call_immutable_context.leo similarity index 100% rename from compiler/otests/circuits/mutable_call_immutable_context.leo rename to compiler/_otests/circuits/mutable_call_immutable_context.leo diff --git a/compiler/otests/circuits/pedersen_mock.leo b/compiler/_otests/circuits/pedersen_mock.leo similarity index 100% rename from compiler/otests/circuits/pedersen_mock.leo rename to compiler/_otests/circuits/pedersen_mock.leo diff --git a/compiler/otests/circuits/self_circuit.leo b/compiler/_otests/circuits/self_circuit.leo similarity index 100% rename from compiler/otests/circuits/self_circuit.leo rename to compiler/_otests/circuits/self_circuit.leo diff --git a/compiler/otests/circuits/self_fail.leo b/compiler/_otests/circuits/self_fail.leo similarity index 100% rename from compiler/otests/circuits/self_fail.leo rename to compiler/_otests/circuits/self_fail.leo diff --git a/compiler/otests/circuits/self_member.leo b/compiler/_otests/circuits/self_member.leo similarity index 100% rename from compiler/otests/circuits/self_member.leo rename to compiler/_otests/circuits/self_member.leo diff --git a/compiler/otests/circuits/self_member_invalid.leo b/compiler/_otests/circuits/self_member_invalid.leo similarity index 100% rename from compiler/otests/circuits/self_member_invalid.leo rename to compiler/_otests/circuits/self_member_invalid.leo diff --git a/compiler/otests/circuits/self_member_undefined.leo b/compiler/_otests/circuits/self_member_undefined.leo similarity index 100% rename from compiler/otests/circuits/self_member_undefined.leo rename to compiler/_otests/circuits/self_member_undefined.leo diff --git a/compiler/otests/compiler/main.leo b/compiler/_otests/compiler/main.leo similarity index 100% rename from compiler/otests/compiler/main.leo rename to compiler/_otests/compiler/main.leo diff --git a/compiler/otests/compiler/mod.rs b/compiler/_otests/compiler/mod.rs similarity index 100% rename from compiler/otests/compiler/mod.rs rename to compiler/_otests/compiler/mod.rs diff --git a/compiler/otests/console/assert.leo b/compiler/_otests/console/assert.leo similarity index 100% rename from compiler/otests/console/assert.leo rename to compiler/_otests/console/assert.leo diff --git a/compiler/otests/console/conditional_assert.leo b/compiler/_otests/console/conditional_assert.leo similarity index 100% rename from compiler/otests/console/conditional_assert.leo rename to compiler/_otests/console/conditional_assert.leo diff --git a/compiler/otests/console/debug.leo b/compiler/_otests/console/debug.leo similarity index 100% rename from compiler/otests/console/debug.leo rename to compiler/_otests/console/debug.leo diff --git a/compiler/otests/console/error.leo b/compiler/_otests/console/error.leo similarity index 100% rename from compiler/otests/console/error.leo rename to compiler/_otests/console/error.leo diff --git a/compiler/otests/console/input/input_equal.in b/compiler/_otests/console/input/input_equal.in similarity index 100% rename from compiler/otests/console/input/input_equal.in rename to compiler/_otests/console/input/input_equal.in diff --git a/compiler/otests/console/input/input_unequal.in b/compiler/_otests/console/input/input_unequal.in similarity index 100% rename from compiler/otests/console/input/input_unequal.in rename to compiler/_otests/console/input/input_unequal.in diff --git a/compiler/otests/console/log.leo b/compiler/_otests/console/log.leo similarity index 100% rename from compiler/otests/console/log.leo rename to compiler/_otests/console/log.leo diff --git a/compiler/otests/console/log_conditional.leo b/compiler/_otests/console/log_conditional.leo similarity index 100% rename from compiler/otests/console/log_conditional.leo rename to compiler/_otests/console/log_conditional.leo diff --git a/compiler/otests/console/log_fail.leo b/compiler/_otests/console/log_fail.leo similarity index 100% rename from compiler/otests/console/log_fail.leo rename to compiler/_otests/console/log_fail.leo diff --git a/compiler/otests/console/log_input.leo b/compiler/_otests/console/log_input.leo similarity index 100% rename from compiler/otests/console/log_input.leo rename to compiler/_otests/console/log_input.leo diff --git a/compiler/otests/console/log_parameter.leo b/compiler/_otests/console/log_parameter.leo similarity index 100% rename from compiler/otests/console/log_parameter.leo rename to compiler/_otests/console/log_parameter.leo diff --git a/compiler/otests/console/log_parameter_fail_empty.leo b/compiler/_otests/console/log_parameter_fail_empty.leo similarity index 100% rename from compiler/otests/console/log_parameter_fail_empty.leo rename to compiler/_otests/console/log_parameter_fail_empty.leo diff --git a/compiler/otests/console/log_parameter_fail_none.leo b/compiler/_otests/console/log_parameter_fail_none.leo similarity index 100% rename from compiler/otests/console/log_parameter_fail_none.leo rename to compiler/_otests/console/log_parameter_fail_none.leo diff --git a/compiler/otests/console/log_parameter_fail_unknown.leo b/compiler/_otests/console/log_parameter_fail_unknown.leo similarity index 100% rename from compiler/otests/console/log_parameter_fail_unknown.leo rename to compiler/_otests/console/log_parameter_fail_unknown.leo diff --git a/compiler/otests/console/log_parameter_many.leo b/compiler/_otests/console/log_parameter_many.leo similarity index 100% rename from compiler/otests/console/log_parameter_many.leo rename to compiler/_otests/console/log_parameter_many.leo diff --git a/compiler/otests/console/mod.rs b/compiler/_otests/console/mod.rs similarity index 100% rename from compiler/otests/console/mod.rs rename to compiler/_otests/console/mod.rs diff --git a/compiler/otests/core/core_circuit_invalid.leo b/compiler/_otests/core/core_circuit_invalid.leo similarity index 100% rename from compiler/otests/core/core_circuit_invalid.leo rename to compiler/_otests/core/core_circuit_invalid.leo diff --git a/compiler/otests/core/core_circuit_star_fail.leo b/compiler/_otests/core/core_circuit_star_fail.leo similarity index 100% rename from compiler/otests/core/core_circuit_star_fail.leo rename to compiler/_otests/core/core_circuit_star_fail.leo diff --git a/compiler/otests/core/core_package_invalid.leo b/compiler/_otests/core/core_package_invalid.leo similarity index 100% rename from compiler/otests/core/core_package_invalid.leo rename to compiler/_otests/core/core_package_invalid.leo diff --git a/compiler/otests/core/core_unstable_package_invalid.leo b/compiler/_otests/core/core_unstable_package_invalid.leo similarity index 100% rename from compiler/otests/core/core_unstable_package_invalid.leo rename to compiler/_otests/core/core_unstable_package_invalid.leo diff --git a/compiler/otests/core/mod.rs b/compiler/_otests/core/mod.rs similarity index 100% rename from compiler/otests/core/mod.rs rename to compiler/_otests/core/mod.rs diff --git a/compiler/otests/core/packages/mod.rs b/compiler/_otests/core/packages/mod.rs similarity index 100% rename from compiler/otests/core/packages/mod.rs rename to compiler/_otests/core/packages/mod.rs diff --git a/compiler/otests/core/packages/unstable/blake2s/arguments_length_fail.leo b/compiler/_otests/core/packages/unstable/blake2s/arguments_length_fail.leo similarity index 100% rename from compiler/otests/core/packages/unstable/blake2s/arguments_length_fail.leo rename to compiler/_otests/core/packages/unstable/blake2s/arguments_length_fail.leo diff --git a/compiler/otests/core/packages/unstable/blake2s/arguments_type_fail.leo b/compiler/_otests/core/packages/unstable/blake2s/arguments_type_fail.leo similarity index 100% rename from compiler/otests/core/packages/unstable/blake2s/arguments_type_fail.leo rename to compiler/_otests/core/packages/unstable/blake2s/arguments_type_fail.leo diff --git a/compiler/otests/core/packages/unstable/blake2s/blake2s_input.leo b/compiler/_otests/core/packages/unstable/blake2s/blake2s_input.leo similarity index 100% rename from compiler/otests/core/packages/unstable/blake2s/blake2s_input.leo rename to compiler/_otests/core/packages/unstable/blake2s/blake2s_input.leo diff --git a/compiler/otests/core/packages/unstable/blake2s/blake2s_random.leo b/compiler/_otests/core/packages/unstable/blake2s/blake2s_random.leo similarity index 100% rename from compiler/otests/core/packages/unstable/blake2s/blake2s_random.leo rename to compiler/_otests/core/packages/unstable/blake2s/blake2s_random.leo diff --git a/compiler/otests/core/packages/unstable/blake2s/inputs/valid_input.in b/compiler/_otests/core/packages/unstable/blake2s/inputs/valid_input.in similarity index 100% rename from compiler/otests/core/packages/unstable/blake2s/inputs/valid_input.in rename to compiler/_otests/core/packages/unstable/blake2s/inputs/valid_input.in diff --git a/compiler/otests/core/packages/unstable/blake2s/mod.rs b/compiler/_otests/core/packages/unstable/blake2s/mod.rs similarity index 100% rename from compiler/otests/core/packages/unstable/blake2s/mod.rs rename to compiler/_otests/core/packages/unstable/blake2s/mod.rs diff --git a/compiler/otests/core/packages/unstable/blake2s/outputs/valid_output.out b/compiler/_otests/core/packages/unstable/blake2s/outputs/valid_output.out similarity index 100% rename from compiler/otests/core/packages/unstable/blake2s/outputs/valid_output.out rename to compiler/_otests/core/packages/unstable/blake2s/outputs/valid_output.out diff --git a/compiler/otests/core/packages/unstable/mod.rs b/compiler/_otests/core/packages/unstable/mod.rs similarity index 100% rename from compiler/otests/core/packages/unstable/mod.rs rename to compiler/_otests/core/packages/unstable/mod.rs diff --git a/compiler/otests/core/unstable_blake2s.leo b/compiler/_otests/core/unstable_blake2s.leo similarity index 100% rename from compiler/otests/core/unstable_blake2s.leo rename to compiler/_otests/core/unstable_blake2s.leo diff --git a/compiler/otests/definition/mod.rs b/compiler/_otests/definition/mod.rs similarity index 100% rename from compiler/otests/definition/mod.rs rename to compiler/_otests/definition/mod.rs diff --git a/compiler/otests/definition/out_of_order.leo b/compiler/_otests/definition/out_of_order.leo similarity index 100% rename from compiler/otests/definition/out_of_order.leo rename to compiler/_otests/definition/out_of_order.leo diff --git a/compiler/otests/definition/out_of_order_with_import.leo b/compiler/_otests/definition/out_of_order_with_import.leo similarity index 100% rename from compiler/otests/definition/out_of_order_with_import.leo rename to compiler/_otests/definition/out_of_order_with_import.leo diff --git a/compiler/otests/field/add.leo b/compiler/_otests/field/add.leo similarity index 100% rename from compiler/otests/field/add.leo rename to compiler/_otests/field/add.leo diff --git a/compiler/otests/field/console_assert.leo b/compiler/_otests/field/console_assert.leo similarity index 100% rename from compiler/otests/field/console_assert.leo rename to compiler/_otests/field/console_assert.leo diff --git a/compiler/otests/field/div.leo b/compiler/_otests/field/div.leo similarity index 100% rename from compiler/otests/field/div.leo rename to compiler/_otests/field/div.leo diff --git a/compiler/otests/field/eq.leo b/compiler/_otests/field/eq.leo similarity index 100% rename from compiler/otests/field/eq.leo rename to compiler/_otests/field/eq.leo diff --git a/compiler/otests/field/field.leo b/compiler/_otests/field/field.leo similarity index 100% rename from compiler/otests/field/field.leo rename to compiler/_otests/field/field.leo diff --git a/compiler/otests/field/input/register_one.in b/compiler/_otests/field/input/register_one.in similarity index 100% rename from compiler/otests/field/input/register_one.in rename to compiler/_otests/field/input/register_one.in diff --git a/compiler/otests/field/input/register_zero.in b/compiler/_otests/field/input/register_zero.in similarity index 100% rename from compiler/otests/field/input/register_zero.in rename to compiler/_otests/field/input/register_zero.in diff --git a/compiler/otests/field/mod.rs b/compiler/_otests/field/mod.rs similarity index 100% rename from compiler/otests/field/mod.rs rename to compiler/_otests/field/mod.rs diff --git a/compiler/otests/field/mul.leo b/compiler/_otests/field/mul.leo similarity index 100% rename from compiler/otests/field/mul.leo rename to compiler/_otests/field/mul.leo diff --git a/compiler/otests/field/negate.leo b/compiler/_otests/field/negate.leo similarity index 100% rename from compiler/otests/field/negate.leo rename to compiler/_otests/field/negate.leo diff --git a/compiler/otests/field/no_space_between_literal.leo b/compiler/_otests/field/no_space_between_literal.leo similarity index 100% rename from compiler/otests/field/no_space_between_literal.leo rename to compiler/_otests/field/no_space_between_literal.leo diff --git a/compiler/otests/field/output/register_one.out b/compiler/_otests/field/output/register_one.out similarity index 100% rename from compiler/otests/field/output/register_one.out rename to compiler/_otests/field/output/register_one.out diff --git a/compiler/otests/field/output/register_zero.out b/compiler/_otests/field/output/register_zero.out similarity index 100% rename from compiler/otests/field/output/register_zero.out rename to compiler/_otests/field/output/register_zero.out diff --git a/compiler/otests/field/output_register.leo b/compiler/_otests/field/output_register.leo similarity index 100% rename from compiler/otests/field/output_register.leo rename to compiler/_otests/field/output_register.leo diff --git a/compiler/otests/field/sub.leo b/compiler/_otests/field/sub.leo similarity index 100% rename from compiler/otests/field/sub.leo rename to compiler/_otests/field/sub.leo diff --git a/compiler/otests/field/ternary.leo b/compiler/_otests/field/ternary.leo similarity index 100% rename from compiler/otests/field/ternary.leo rename to compiler/_otests/field/ternary.leo diff --git a/compiler/otests/function/array_input.leo b/compiler/_otests/function/array_input.leo similarity index 100% rename from compiler/otests/function/array_input.leo rename to compiler/_otests/function/array_input.leo diff --git a/compiler/otests/function/array_params_direct_call.leo b/compiler/_otests/function/array_params_direct_call.leo similarity index 100% rename from compiler/otests/function/array_params_direct_call.leo rename to compiler/_otests/function/array_params_direct_call.leo diff --git a/compiler/otests/function/conditional_return.leo b/compiler/_otests/function/conditional_return.leo similarity index 100% rename from compiler/otests/function/conditional_return.leo rename to compiler/_otests/function/conditional_return.leo diff --git a/compiler/otests/function/duplicate_definition.leo b/compiler/_otests/function/duplicate_definition.leo similarity index 100% rename from compiler/otests/function/duplicate_definition.leo rename to compiler/_otests/function/duplicate_definition.leo diff --git a/compiler/otests/function/empty.leo b/compiler/_otests/function/empty.leo similarity index 100% rename from compiler/otests/function/empty.leo rename to compiler/_otests/function/empty.leo diff --git a/compiler/otests/function/input/conditional_return.in b/compiler/_otests/function/input/conditional_return.in similarity index 100% rename from compiler/otests/function/input/conditional_return.in rename to compiler/_otests/function/input/conditional_return.in diff --git a/compiler/otests/function/input/newlines.in b/compiler/_otests/function/input/newlines.in similarity index 100% rename from compiler/otests/function/input/newlines.in rename to compiler/_otests/function/input/newlines.in diff --git a/compiler/otests/function/input/registers.in b/compiler/_otests/function/input/registers.in similarity index 100% rename from compiler/otests/function/input/registers.in rename to compiler/_otests/function/input/registers.in diff --git a/compiler/otests/function/iteration.leo b/compiler/_otests/function/iteration.leo similarity index 100% rename from compiler/otests/function/iteration.leo rename to compiler/_otests/function/iteration.leo diff --git a/compiler/otests/function/iteration_repeated.leo b/compiler/_otests/function/iteration_repeated.leo similarity index 100% rename from compiler/otests/function/iteration_repeated.leo rename to compiler/_otests/function/iteration_repeated.leo diff --git a/compiler/otests/function/mod.rs b/compiler/_otests/function/mod.rs similarity index 100% rename from compiler/otests/function/mod.rs rename to compiler/_otests/function/mod.rs diff --git a/compiler/otests/function/multiple_returns.leo b/compiler/_otests/function/multiple_returns.leo similarity index 100% rename from compiler/otests/function/multiple_returns.leo rename to compiler/_otests/function/multiple_returns.leo diff --git a/compiler/otests/function/multiple_returns_fail.leo b/compiler/_otests/function/multiple_returns_fail.leo similarity index 100% rename from compiler/otests/function/multiple_returns_fail.leo rename to compiler/_otests/function/multiple_returns_fail.leo diff --git a/compiler/otests/function/multiple_returns_fail_conditional.leo b/compiler/_otests/function/multiple_returns_fail_conditional.leo similarity index 100% rename from compiler/otests/function/multiple_returns_fail_conditional.leo rename to compiler/_otests/function/multiple_returns_fail_conditional.leo diff --git a/compiler/otests/function/multiple_returns_main.leo b/compiler/_otests/function/multiple_returns_main.leo similarity index 100% rename from compiler/otests/function/multiple_returns_main.leo rename to compiler/_otests/function/multiple_returns_main.leo diff --git a/compiler/otests/function/newlines.leo b/compiler/_otests/function/newlines.leo similarity index 100% rename from compiler/otests/function/newlines.leo rename to compiler/_otests/function/newlines.leo diff --git a/compiler/otests/function/output/conditional_return.out b/compiler/_otests/function/output/conditional_return.out similarity index 100% rename from compiler/otests/function/output/conditional_return.out rename to compiler/_otests/function/output/conditional_return.out diff --git a/compiler/otests/function/output/newlines.out b/compiler/_otests/function/output/newlines.out similarity index 100% rename from compiler/otests/function/output/newlines.out rename to compiler/_otests/function/output/newlines.out diff --git a/compiler/otests/function/output/registers.out b/compiler/_otests/function/output/registers.out similarity index 100% rename from compiler/otests/function/output/registers.out rename to compiler/_otests/function/output/registers.out diff --git a/compiler/otests/function/repeated.leo b/compiler/_otests/function/repeated.leo similarity index 100% rename from compiler/otests/function/repeated.leo rename to compiler/_otests/function/repeated.leo diff --git a/compiler/otests/function/return.leo b/compiler/_otests/function/return.leo similarity index 100% rename from compiler/otests/function/return.leo rename to compiler/_otests/function/return.leo diff --git a/compiler/otests/function/return_array_nested_fail.leo b/compiler/_otests/function/return_array_nested_fail.leo similarity index 100% rename from compiler/otests/function/return_array_nested_fail.leo rename to compiler/_otests/function/return_array_nested_fail.leo diff --git a/compiler/otests/function/return_array_nested_pass.leo b/compiler/_otests/function/return_array_nested_pass.leo similarity index 100% rename from compiler/otests/function/return_array_nested_pass.leo rename to compiler/_otests/function/return_array_nested_pass.leo diff --git a/compiler/otests/function/return_array_tuple_fail.leo b/compiler/_otests/function/return_array_tuple_fail.leo similarity index 100% rename from compiler/otests/function/return_array_tuple_fail.leo rename to compiler/_otests/function/return_array_tuple_fail.leo diff --git a/compiler/otests/function/return_array_tuple_pass.leo b/compiler/_otests/function/return_array_tuple_pass.leo similarity index 100% rename from compiler/otests/function/return_array_tuple_pass.leo rename to compiler/_otests/function/return_array_tuple_pass.leo diff --git a/compiler/otests/function/return_tuple.leo b/compiler/_otests/function/return_tuple.leo similarity index 100% rename from compiler/otests/function/return_tuple.leo rename to compiler/_otests/function/return_tuple.leo diff --git a/compiler/otests/function/return_tuple_conditional.leo b/compiler/_otests/function/return_tuple_conditional.leo similarity index 100% rename from compiler/otests/function/return_tuple_conditional.leo rename to compiler/_otests/function/return_tuple_conditional.leo diff --git a/compiler/otests/function/scope_fail.leo b/compiler/_otests/function/scope_fail.leo similarity index 100% rename from compiler/otests/function/scope_fail.leo rename to compiler/_otests/function/scope_fail.leo diff --git a/compiler/otests/function/undefined.leo b/compiler/_otests/function/undefined.leo similarity index 100% rename from compiler/otests/function/undefined.leo rename to compiler/_otests/function/undefined.leo diff --git a/compiler/otests/function/value_unchanged.leo b/compiler/_otests/function/value_unchanged.leo similarity index 100% rename from compiler/otests/function/value_unchanged.leo rename to compiler/_otests/function/value_unchanged.leo diff --git a/compiler/otests/global_consts/global_const_types.leo b/compiler/_otests/global_consts/global_const_types.leo similarity index 100% rename from compiler/otests/global_consts/global_const_types.leo rename to compiler/_otests/global_consts/global_const_types.leo diff --git a/compiler/otests/global_consts/mod.rs b/compiler/_otests/global_consts/mod.rs similarity index 100% rename from compiler/otests/global_consts/mod.rs rename to compiler/_otests/global_consts/mod.rs diff --git a/compiler/otests/global_consts/modify_global_const.leo b/compiler/_otests/global_consts/modify_global_const.leo similarity index 100% rename from compiler/otests/global_consts/modify_global_const.leo rename to compiler/_otests/global_consts/modify_global_const.leo diff --git a/compiler/otests/group/add.leo b/compiler/_otests/group/add.leo similarity index 100% rename from compiler/otests/group/add.leo rename to compiler/_otests/group/add.leo diff --git a/compiler/otests/group/assert_eq.leo b/compiler/_otests/group/assert_eq.leo similarity index 100% rename from compiler/otests/group/assert_eq.leo rename to compiler/_otests/group/assert_eq.leo diff --git a/compiler/otests/group/both_sign_high.leo b/compiler/_otests/group/both_sign_high.leo similarity index 100% rename from compiler/otests/group/both_sign_high.leo rename to compiler/_otests/group/both_sign_high.leo diff --git a/compiler/otests/group/both_sign_inferred.leo b/compiler/_otests/group/both_sign_inferred.leo similarity index 100% rename from compiler/otests/group/both_sign_inferred.leo rename to compiler/_otests/group/both_sign_inferred.leo diff --git a/compiler/otests/group/both_sign_low.leo b/compiler/_otests/group/both_sign_low.leo similarity index 100% rename from compiler/otests/group/both_sign_low.leo rename to compiler/_otests/group/both_sign_low.leo diff --git a/compiler/otests/group/eq.leo b/compiler/_otests/group/eq.leo similarity index 100% rename from compiler/otests/group/eq.leo rename to compiler/_otests/group/eq.leo diff --git a/compiler/otests/group/input.leo b/compiler/_otests/group/input.leo similarity index 100% rename from compiler/otests/group/input.leo rename to compiler/_otests/group/input.leo diff --git a/compiler/otests/group/input/invalid.in b/compiler/_otests/group/input/invalid.in similarity index 100% rename from compiler/otests/group/input/invalid.in rename to compiler/_otests/group/input/invalid.in diff --git a/compiler/otests/group/input/point.in b/compiler/_otests/group/input/point.in similarity index 100% rename from compiler/otests/group/input/point.in rename to compiler/_otests/group/input/point.in diff --git a/compiler/otests/group/input/valid.in b/compiler/_otests/group/input/valid.in similarity index 100% rename from compiler/otests/group/input/valid.in rename to compiler/_otests/group/input/valid.in diff --git a/compiler/otests/group/mod.rs b/compiler/_otests/group/mod.rs similarity index 100% rename from compiler/otests/group/mod.rs rename to compiler/_otests/group/mod.rs diff --git a/compiler/otests/group/negate.leo b/compiler/_otests/group/negate.leo similarity index 100% rename from compiler/otests/group/negate.leo rename to compiler/_otests/group/negate.leo diff --git a/compiler/otests/group/no_space_between_literal.leo b/compiler/_otests/group/no_space_between_literal.leo similarity index 100% rename from compiler/otests/group/no_space_between_literal.leo rename to compiler/_otests/group/no_space_between_literal.leo diff --git a/compiler/otests/group/one.leo b/compiler/_otests/group/one.leo similarity index 100% rename from compiler/otests/group/one.leo rename to compiler/_otests/group/one.leo diff --git a/compiler/otests/group/point.leo b/compiler/_otests/group/point.leo similarity index 100% rename from compiler/otests/group/point.leo rename to compiler/_otests/group/point.leo diff --git a/compiler/otests/group/point_input.leo b/compiler/_otests/group/point_input.leo similarity index 100% rename from compiler/otests/group/point_input.leo rename to compiler/_otests/group/point_input.leo diff --git a/compiler/otests/group/positive_and_negative.leo b/compiler/_otests/group/positive_and_negative.leo similarity index 100% rename from compiler/otests/group/positive_and_negative.leo rename to compiler/_otests/group/positive_and_negative.leo diff --git a/compiler/otests/group/sub.leo b/compiler/_otests/group/sub.leo similarity index 100% rename from compiler/otests/group/sub.leo rename to compiler/_otests/group/sub.leo diff --git a/compiler/otests/group/ternary.leo b/compiler/_otests/group/ternary.leo similarity index 100% rename from compiler/otests/group/ternary.leo rename to compiler/_otests/group/ternary.leo diff --git a/compiler/otests/group/x_and_y.leo b/compiler/_otests/group/x_and_y.leo similarity index 100% rename from compiler/otests/group/x_and_y.leo rename to compiler/_otests/group/x_and_y.leo diff --git a/compiler/otests/group/x_sign_high.leo b/compiler/_otests/group/x_sign_high.leo similarity index 100% rename from compiler/otests/group/x_sign_high.leo rename to compiler/_otests/group/x_sign_high.leo diff --git a/compiler/otests/group/x_sign_inferred.leo b/compiler/_otests/group/x_sign_inferred.leo similarity index 100% rename from compiler/otests/group/x_sign_inferred.leo rename to compiler/_otests/group/x_sign_inferred.leo diff --git a/compiler/otests/group/x_sign_low.leo b/compiler/_otests/group/x_sign_low.leo similarity index 100% rename from compiler/otests/group/x_sign_low.leo rename to compiler/_otests/group/x_sign_low.leo diff --git a/compiler/otests/group/y_sign_high.leo b/compiler/_otests/group/y_sign_high.leo similarity index 100% rename from compiler/otests/group/y_sign_high.leo rename to compiler/_otests/group/y_sign_high.leo diff --git a/compiler/otests/group/y_sign_inferred.leo b/compiler/_otests/group/y_sign_inferred.leo similarity index 100% rename from compiler/otests/group/y_sign_inferred.leo rename to compiler/_otests/group/y_sign_inferred.leo diff --git a/compiler/otests/group/y_sign_low.leo b/compiler/_otests/group/y_sign_low.leo similarity index 100% rename from compiler/otests/group/y_sign_low.leo rename to compiler/_otests/group/y_sign_low.leo diff --git a/compiler/otests/group/zero.leo b/compiler/_otests/group/zero.leo similarity index 100% rename from compiler/otests/group/zero.leo rename to compiler/_otests/group/zero.leo diff --git a/compiler/otests/import/alias.leo b/compiler/_otests/import/alias.leo similarity index 100% rename from compiler/otests/import/alias.leo rename to compiler/_otests/import/alias.leo diff --git a/compiler/otests/import/basic.leo b/compiler/_otests/import/basic.leo similarity index 100% rename from compiler/otests/import/basic.leo rename to compiler/_otests/import/basic.leo diff --git a/compiler/otests/import/imports/bar/.gitignore b/compiler/_otests/import/imports/bar/.gitignore similarity index 100% rename from compiler/otests/import/imports/bar/.gitignore rename to compiler/_otests/import/imports/bar/.gitignore diff --git a/compiler/otests/import/imports/bar/Leo.toml b/compiler/_otests/import/imports/bar/Leo.toml similarity index 100% rename from compiler/otests/import/imports/bar/Leo.toml rename to compiler/_otests/import/imports/bar/Leo.toml diff --git a/compiler/otests/import/imports/bar/src/bat/bat.leo b/compiler/_otests/import/imports/bar/src/bat/bat.leo similarity index 100% rename from compiler/otests/import/imports/bar/src/bat/bat.leo rename to compiler/_otests/import/imports/bar/src/bat/bat.leo diff --git a/compiler/otests/import/imports/bar/src/baz.leo b/compiler/_otests/import/imports/bar/src/baz.leo similarity index 100% rename from compiler/otests/import/imports/bar/src/baz.leo rename to compiler/_otests/import/imports/bar/src/baz.leo diff --git a/compiler/otests/import/imports/bar/src/lib.leo b/compiler/_otests/import/imports/bar/src/lib.leo similarity index 100% rename from compiler/otests/import/imports/bar/src/lib.leo rename to compiler/_otests/import/imports/bar/src/lib.leo diff --git a/compiler/otests/import/imports/car/.gitignore b/compiler/_otests/import/imports/car/.gitignore similarity index 100% rename from compiler/otests/import/imports/car/.gitignore rename to compiler/_otests/import/imports/car/.gitignore diff --git a/compiler/otests/import/imports/car/Leo.toml b/compiler/_otests/import/imports/car/Leo.toml similarity index 100% rename from compiler/otests/import/imports/car/Leo.toml rename to compiler/_otests/import/imports/car/Leo.toml diff --git a/compiler/otests/import/imports/car/src/lib.leo b/compiler/_otests/import/imports/car/src/lib.leo similarity index 100% rename from compiler/otests/import/imports/car/src/lib.leo rename to compiler/_otests/import/imports/car/src/lib.leo diff --git a/compiler/otests/import/many_import.leo b/compiler/_otests/import/many_import.leo similarity index 100% rename from compiler/otests/import/many_import.leo rename to compiler/_otests/import/many_import.leo diff --git a/compiler/otests/import/many_import_star.leo b/compiler/_otests/import/many_import_star.leo similarity index 100% rename from compiler/otests/import/many_import_star.leo rename to compiler/_otests/import/many_import_star.leo diff --git a/compiler/otests/import/mod.rs b/compiler/_otests/import/mod.rs similarity index 100% rename from compiler/otests/import/mod.rs rename to compiler/_otests/import/mod.rs diff --git a/compiler/otests/import/multiple.leo b/compiler/_otests/import/multiple.leo similarity index 100% rename from compiler/otests/import/multiple.leo rename to compiler/_otests/import/multiple.leo diff --git a/compiler/otests/import/names.leo b/compiler/_otests/import/names.leo similarity index 100% rename from compiler/otests/import/names.leo rename to compiler/_otests/import/names.leo diff --git a/compiler/otests/import/names_a_dash.leo b/compiler/_otests/import/names_a_dash.leo similarity index 100% rename from compiler/otests/import/names_a_dash.leo rename to compiler/_otests/import/names_a_dash.leo diff --git a/compiler/otests/import/names_dash_a.leo b/compiler/_otests/import/names_dash_a.leo similarity index 100% rename from compiler/otests/import/names_dash_a.leo rename to compiler/_otests/import/names_dash_a.leo diff --git a/compiler/otests/import/names_dollar.leo b/compiler/_otests/import/names_dollar.leo similarity index 100% rename from compiler/otests/import/names_dollar.leo rename to compiler/_otests/import/names_dollar.leo diff --git a/compiler/otests/import/names_underscore.leo b/compiler/_otests/import/names_underscore.leo similarity index 100% rename from compiler/otests/import/names_underscore.leo rename to compiler/_otests/import/names_underscore.leo diff --git a/compiler/otests/import/src/a-9.leo b/compiler/_otests/import/src/a-9.leo similarity index 100% rename from compiler/otests/import/src/a-9.leo rename to compiler/_otests/import/src/a-9.leo diff --git a/compiler/otests/import/src/a0-f.leo b/compiler/_otests/import/src/a0-f.leo similarity index 100% rename from compiler/otests/import/src/a0-f.leo rename to compiler/_otests/import/src/a0-f.leo diff --git a/compiler/otests/import/src/hello-world.leo b/compiler/_otests/import/src/hello-world.leo similarity index 100% rename from compiler/otests/import/src/hello-world.leo rename to compiler/_otests/import/src/hello-world.leo diff --git a/compiler/otests/import/src/test-import.leo b/compiler/_otests/import/src/test-import.leo similarity index 100% rename from compiler/otests/import/src/test-import.leo rename to compiler/_otests/import/src/test-import.leo diff --git a/compiler/otests/import/star.leo b/compiler/_otests/import/star.leo similarity index 100% rename from compiler/otests/import/star.leo rename to compiler/_otests/import/star.leo diff --git a/compiler/otests/import/star_fail.leo b/compiler/_otests/import/star_fail.leo similarity index 100% rename from compiler/otests/import/star_fail.leo rename to compiler/_otests/import/star_fail.leo diff --git a/compiler/otests/input_files/mod.rs b/compiler/_otests/input_files/mod.rs similarity index 100% rename from compiler/otests/input_files/mod.rs rename to compiler/_otests/input_files/mod.rs diff --git a/compiler/otests/input_files/program_input/input/main.in b/compiler/_otests/input_files/program_input/input/main.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main.in rename to compiler/_otests/input_files/program_input/input/main.in diff --git a/compiler/otests/input_files/program_input/input/main_array.in b/compiler/_otests/input_files/program_input/input/main_array.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main_array.in rename to compiler/_otests/input_files/program_input/input/main_array.in diff --git a/compiler/otests/input_files/program_input/input/main_array_fail.in b/compiler/_otests/input_files/program_input/input/main_array_fail.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main_array_fail.in rename to compiler/_otests/input_files/program_input/input/main_array_fail.in diff --git a/compiler/otests/input_files/program_input/input/main_fail_name.in b/compiler/_otests/input_files/program_input/input/main_fail_name.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main_fail_name.in rename to compiler/_otests/input_files/program_input/input/main_fail_name.in diff --git a/compiler/otests/input_files/program_input/input/main_fail_type.in b/compiler/_otests/input_files/program_input/input/main_fail_type.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main_fail_type.in rename to compiler/_otests/input_files/program_input/input/main_fail_type.in diff --git a/compiler/otests/input_files/program_input/input/main_field.in b/compiler/_otests/input_files/program_input/input/main_field.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main_field.in rename to compiler/_otests/input_files/program_input/input/main_field.in diff --git a/compiler/otests/input_files/program_input/input/main_group.in b/compiler/_otests/input_files/program_input/input/main_group.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main_group.in rename to compiler/_otests/input_files/program_input/input/main_group.in diff --git a/compiler/otests/input_files/program_input/input/main_multi_dimension_array.in b/compiler/_otests/input_files/program_input/input/main_multi_dimension_array.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main_multi_dimension_array.in rename to compiler/_otests/input_files/program_input/input/main_multi_dimension_array.in diff --git a/compiler/otests/input_files/program_input/input/main_multiple.in b/compiler/_otests/input_files/program_input/input/main_multiple.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main_multiple.in rename to compiler/_otests/input_files/program_input/input/main_multiple.in diff --git a/compiler/otests/input_files/program_input/input/main_tuple_fail.in b/compiler/_otests/input_files/program_input/input/main_tuple_fail.in similarity index 100% rename from compiler/otests/input_files/program_input/input/main_tuple_fail.in rename to compiler/_otests/input_files/program_input/input/main_tuple_fail.in diff --git a/compiler/otests/input_files/program_input/main.leo b/compiler/_otests/input_files/program_input/main.leo similarity index 100% rename from compiler/otests/input_files/program_input/main.leo rename to compiler/_otests/input_files/program_input/main.leo diff --git a/compiler/otests/input_files/program_input/main_array.leo b/compiler/_otests/input_files/program_input/main_array.leo similarity index 100% rename from compiler/otests/input_files/program_input/main_array.leo rename to compiler/_otests/input_files/program_input/main_array.leo diff --git a/compiler/otests/input_files/program_input/main_array_fail.leo b/compiler/_otests/input_files/program_input/main_array_fail.leo similarity index 100% rename from compiler/otests/input_files/program_input/main_array_fail.leo rename to compiler/_otests/input_files/program_input/main_array_fail.leo diff --git a/compiler/otests/input_files/program_input/main_field.leo b/compiler/_otests/input_files/program_input/main_field.leo similarity index 100% rename from compiler/otests/input_files/program_input/main_field.leo rename to compiler/_otests/input_files/program_input/main_field.leo diff --git a/compiler/otests/input_files/program_input/main_group.leo b/compiler/_otests/input_files/program_input/main_group.leo similarity index 100% rename from compiler/otests/input_files/program_input/main_group.leo rename to compiler/_otests/input_files/program_input/main_group.leo diff --git a/compiler/otests/input_files/program_input/main_multi_dimension_array.leo b/compiler/_otests/input_files/program_input/main_multi_dimension_array.leo similarity index 100% rename from compiler/otests/input_files/program_input/main_multi_dimension_array.leo rename to compiler/_otests/input_files/program_input/main_multi_dimension_array.leo diff --git a/compiler/otests/input_files/program_input/main_multiple.leo b/compiler/_otests/input_files/program_input/main_multiple.leo similarity index 100% rename from compiler/otests/input_files/program_input/main_multiple.leo rename to compiler/_otests/input_files/program_input/main_multiple.leo diff --git a/compiler/otests/input_files/program_input/main_tuple_fail.leo b/compiler/_otests/input_files/program_input/main_tuple_fail.leo similarity index 100% rename from compiler/otests/input_files/program_input/main_tuple_fail.leo rename to compiler/_otests/input_files/program_input/main_tuple_fail.leo diff --git a/compiler/otests/input_files/program_input/mod.rs b/compiler/_otests/input_files/program_input/mod.rs similarity index 100% rename from compiler/otests/input_files/program_input/mod.rs rename to compiler/_otests/input_files/program_input/mod.rs diff --git a/compiler/otests/input_files/program_input_and_program_state/access.leo b/compiler/_otests/input_files/program_input_and_program_state/access.leo similarity index 100% rename from compiler/otests/input_files/program_input_and_program_state/access.leo rename to compiler/_otests/input_files/program_input_and_program_state/access.leo diff --git a/compiler/otests/input_files/program_input_and_program_state/input/basic.in b/compiler/_otests/input_files/program_input_and_program_state/input/basic.in similarity index 100% rename from compiler/otests/input_files/program_input_and_program_state/input/basic.in rename to compiler/_otests/input_files/program_input_and_program_state/input/basic.in diff --git a/compiler/otests/input_files/program_input_and_program_state/input/basic.state b/compiler/_otests/input_files/program_input_and_program_state/input/basic.state similarity index 100% rename from compiler/otests/input_files/program_input_and_program_state/input/basic.state rename to compiler/_otests/input_files/program_input_and_program_state/input/basic.state diff --git a/compiler/otests/input_files/program_input_and_program_state/input/token_withdraw.in b/compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.in similarity index 100% rename from compiler/otests/input_files/program_input_and_program_state/input/token_withdraw.in rename to compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.in diff --git a/compiler/otests/input_files/program_input_and_program_state/input/token_withdraw.state b/compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.state similarity index 100% rename from compiler/otests/input_files/program_input_and_program_state/input/token_withdraw.state rename to compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.state diff --git a/compiler/otests/input_files/program_input_and_program_state/mod.rs b/compiler/_otests/input_files/program_input_and_program_state/mod.rs similarity index 100% rename from compiler/otests/input_files/program_input_and_program_state/mod.rs rename to compiler/_otests/input_files/program_input_and_program_state/mod.rs diff --git a/compiler/otests/input_files/program_input_constants/input/main.in b/compiler/_otests/input_files/program_input_constants/input/main.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main.in rename to compiler/_otests/input_files/program_input_constants/input/main.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_array.in b/compiler/_otests/input_files/program_input_constants/input/main_array.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_array.in rename to compiler/_otests/input_files/program_input_constants/input/main_array.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_array_fail.in b/compiler/_otests/input_files/program_input_constants/input/main_array_fail.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_array_fail.in rename to compiler/_otests/input_files/program_input_constants/input/main_array_fail.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_double_declaration_fail.in b/compiler/_otests/input_files/program_input_constants/input/main_double_declaration_fail.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_double_declaration_fail.in rename to compiler/_otests/input_files/program_input_constants/input/main_double_declaration_fail.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_fail_name.in b/compiler/_otests/input_files/program_input_constants/input/main_fail_name.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_fail_name.in rename to compiler/_otests/input_files/program_input_constants/input/main_fail_name.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_fail_type.in b/compiler/_otests/input_files/program_input_constants/input/main_fail_type.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_fail_type.in rename to compiler/_otests/input_files/program_input_constants/input/main_fail_type.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_field.in b/compiler/_otests/input_files/program_input_constants/input/main_field.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_field.in rename to compiler/_otests/input_files/program_input_constants/input/main_field.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_group.in b/compiler/_otests/input_files/program_input_constants/input/main_group.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_group.in rename to compiler/_otests/input_files/program_input_constants/input/main_group.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_multi_dimension_array.in b/compiler/_otests/input_files/program_input_constants/input/main_multi_dimension_array.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_multi_dimension_array.in rename to compiler/_otests/input_files/program_input_constants/input/main_multi_dimension_array.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_multiple.in b/compiler/_otests/input_files/program_input_constants/input/main_multiple.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_multiple.in rename to compiler/_otests/input_files/program_input_constants/input/main_multiple.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_not_const_input_fail.in b/compiler/_otests/input_files/program_input_constants/input/main_not_const_input_fail.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_not_const_input_fail.in rename to compiler/_otests/input_files/program_input_constants/input/main_not_const_input_fail.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_tuple_fail.in b/compiler/_otests/input_files/program_input_constants/input/main_tuple_fail.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_tuple_fail.in rename to compiler/_otests/input_files/program_input_constants/input/main_tuple_fail.in diff --git a/compiler/otests/input_files/program_input_constants/input/main_type_mismatch.in b/compiler/_otests/input_files/program_input_constants/input/main_type_mismatch.in similarity index 100% rename from compiler/otests/input_files/program_input_constants/input/main_type_mismatch.in rename to compiler/_otests/input_files/program_input_constants/input/main_type_mismatch.in diff --git a/compiler/otests/input_files/program_input_constants/main.leo b/compiler/_otests/input_files/program_input_constants/main.leo similarity index 100% rename from compiler/otests/input_files/program_input_constants/main.leo rename to compiler/_otests/input_files/program_input_constants/main.leo diff --git a/compiler/otests/input_files/program_input_constants/main_array.leo b/compiler/_otests/input_files/program_input_constants/main_array.leo similarity index 100% rename from compiler/otests/input_files/program_input_constants/main_array.leo rename to compiler/_otests/input_files/program_input_constants/main_array.leo diff --git a/compiler/otests/input_files/program_input_constants/main_array_fail.leo b/compiler/_otests/input_files/program_input_constants/main_array_fail.leo similarity index 100% rename from compiler/otests/input_files/program_input_constants/main_array_fail.leo rename to compiler/_otests/input_files/program_input_constants/main_array_fail.leo diff --git a/compiler/otests/input_files/program_input_constants/main_field.leo b/compiler/_otests/input_files/program_input_constants/main_field.leo similarity index 100% rename from compiler/otests/input_files/program_input_constants/main_field.leo rename to compiler/_otests/input_files/program_input_constants/main_field.leo diff --git a/compiler/otests/input_files/program_input_constants/main_group.leo b/compiler/_otests/input_files/program_input_constants/main_group.leo similarity index 100% rename from compiler/otests/input_files/program_input_constants/main_group.leo rename to compiler/_otests/input_files/program_input_constants/main_group.leo diff --git a/compiler/otests/input_files/program_input_constants/main_multi_dimension_array.leo b/compiler/_otests/input_files/program_input_constants/main_multi_dimension_array.leo similarity index 100% rename from compiler/otests/input_files/program_input_constants/main_multi_dimension_array.leo rename to compiler/_otests/input_files/program_input_constants/main_multi_dimension_array.leo diff --git a/compiler/otests/input_files/program_input_constants/main_multiple.leo b/compiler/_otests/input_files/program_input_constants/main_multiple.leo similarity index 100% rename from compiler/otests/input_files/program_input_constants/main_multiple.leo rename to compiler/_otests/input_files/program_input_constants/main_multiple.leo diff --git a/compiler/otests/input_files/program_input_constants/main_tuple_fail.leo b/compiler/_otests/input_files/program_input_constants/main_tuple_fail.leo similarity index 100% rename from compiler/otests/input_files/program_input_constants/main_tuple_fail.leo rename to compiler/_otests/input_files/program_input_constants/main_tuple_fail.leo diff --git a/compiler/otests/input_files/program_input_constants/mod.rs b/compiler/_otests/input_files/program_input_constants/mod.rs similarity index 100% rename from compiler/otests/input_files/program_input_constants/mod.rs rename to compiler/_otests/input_files/program_input_constants/mod.rs diff --git a/compiler/otests/input_files/program_registers/input/array.in b/compiler/_otests/input_files/program_registers/input/array.in similarity index 100% rename from compiler/otests/input_files/program_registers/input/array.in rename to compiler/_otests/input_files/program_registers/input/array.in diff --git a/compiler/otests/input_files/program_registers/input/main.in b/compiler/_otests/input_files/program_registers/input/main.in similarity index 100% rename from compiler/otests/input_files/program_registers/input/main.in rename to compiler/_otests/input_files/program_registers/input/main.in diff --git a/compiler/otests/input_files/program_registers/mod.rs b/compiler/_otests/input_files/program_registers/mod.rs similarity index 100% rename from compiler/otests/input_files/program_registers/mod.rs rename to compiler/_otests/input_files/program_registers/mod.rs diff --git a/compiler/otests/input_files/program_registers/output/registers_array.out b/compiler/_otests/input_files/program_registers/output/registers_array.out similarity index 100% rename from compiler/otests/input_files/program_registers/output/registers_array.out rename to compiler/_otests/input_files/program_registers/output/registers_array.out diff --git a/compiler/otests/input_files/program_registers/output/registers_pass.out b/compiler/_otests/input_files/program_registers/output/registers_pass.out similarity index 100% rename from compiler/otests/input_files/program_registers/output/registers_pass.out rename to compiler/_otests/input_files/program_registers/output/registers_pass.out diff --git a/compiler/otests/input_files/program_registers/registers_array.leo b/compiler/_otests/input_files/program_registers/registers_array.leo similarity index 100% rename from compiler/otests/input_files/program_registers/registers_array.leo rename to compiler/_otests/input_files/program_registers/registers_array.leo diff --git a/compiler/otests/input_files/program_registers/registers_fail.leo b/compiler/_otests/input_files/program_registers/registers_fail.leo similarity index 100% rename from compiler/otests/input_files/program_registers/registers_fail.leo rename to compiler/_otests/input_files/program_registers/registers_fail.leo diff --git a/compiler/otests/input_files/program_registers/registers_pass.leo b/compiler/_otests/input_files/program_registers/registers_pass.leo similarity index 100% rename from compiler/otests/input_files/program_registers/registers_pass.leo rename to compiler/_otests/input_files/program_registers/registers_pass.leo diff --git a/compiler/otests/input_files/program_state/access_all.leo b/compiler/_otests/input_files/program_state/access_all.leo similarity index 100% rename from compiler/otests/input_files/program_state/access_all.leo rename to compiler/_otests/input_files/program_state/access_all.leo diff --git a/compiler/otests/input_files/program_state/access_state.leo b/compiler/_otests/input_files/program_state/access_state.leo similarity index 100% rename from compiler/otests/input_files/program_state/access_state.leo rename to compiler/_otests/input_files/program_state/access_state.leo diff --git a/compiler/otests/input_files/program_state/input/basic.state b/compiler/_otests/input_files/program_state/input/basic.state similarity index 100% rename from compiler/otests/input_files/program_state/input/basic.state rename to compiler/_otests/input_files/program_state/input/basic.state diff --git a/compiler/otests/input_files/program_state/input/section_invalid.state b/compiler/_otests/input_files/program_state/input/section_invalid.state similarity index 100% rename from compiler/otests/input_files/program_state/input/section_invalid.state rename to compiler/_otests/input_files/program_state/input/section_invalid.state diff --git a/compiler/otests/input_files/program_state/input/section_undefined.state b/compiler/_otests/input_files/program_state/input/section_undefined.state similarity index 100% rename from compiler/otests/input_files/program_state/input/section_undefined.state rename to compiler/_otests/input_files/program_state/input/section_undefined.state diff --git a/compiler/otests/input_files/program_state/input/token_withdraw.state b/compiler/_otests/input_files/program_state/input/token_withdraw.state similarity index 100% rename from compiler/otests/input_files/program_state/input/token_withdraw.state rename to compiler/_otests/input_files/program_state/input/token_withdraw.state diff --git a/compiler/otests/input_files/program_state/input/visibility_fail.state b/compiler/_otests/input_files/program_state/input/visibility_fail.state similarity index 100% rename from compiler/otests/input_files/program_state/input/visibility_fail.state rename to compiler/_otests/input_files/program_state/input/visibility_fail.state diff --git a/compiler/otests/input_files/program_state/mod.rs b/compiler/_otests/input_files/program_state/mod.rs similarity index 100% rename from compiler/otests/input_files/program_state/mod.rs rename to compiler/_otests/input_files/program_state/mod.rs diff --git a/compiler/otests/integers/i128/add.leo b/compiler/_otests/integers/i128/add.leo similarity index 100% rename from compiler/otests/integers/i128/add.leo rename to compiler/_otests/integers/i128/add.leo diff --git a/compiler/otests/integers/i128/console_assert.leo b/compiler/_otests/integers/i128/console_assert.leo similarity index 100% rename from compiler/otests/integers/i128/console_assert.leo rename to compiler/_otests/integers/i128/console_assert.leo diff --git a/compiler/otests/integers/i128/div.leo b/compiler/_otests/integers/i128/div.leo similarity index 100% rename from compiler/otests/integers/i128/div.leo rename to compiler/_otests/integers/i128/div.leo diff --git a/compiler/otests/integers/i128/eq.leo b/compiler/_otests/integers/i128/eq.leo similarity index 100% rename from compiler/otests/integers/i128/eq.leo rename to compiler/_otests/integers/i128/eq.leo diff --git a/compiler/otests/integers/i128/ge.leo b/compiler/_otests/integers/i128/ge.leo similarity index 100% rename from compiler/otests/integers/i128/ge.leo rename to compiler/_otests/integers/i128/ge.leo diff --git a/compiler/otests/integers/i128/gt.leo b/compiler/_otests/integers/i128/gt.leo similarity index 100% rename from compiler/otests/integers/i128/gt.leo rename to compiler/_otests/integers/i128/gt.leo diff --git a/compiler/otests/integers/i128/input.leo b/compiler/_otests/integers/i128/input.leo similarity index 100% rename from compiler/otests/integers/i128/input.leo rename to compiler/_otests/integers/i128/input.leo diff --git a/compiler/otests/integers/i128/le.leo b/compiler/_otests/integers/i128/le.leo similarity index 100% rename from compiler/otests/integers/i128/le.leo rename to compiler/_otests/integers/i128/le.leo diff --git a/compiler/otests/integers/i128/lt.leo b/compiler/_otests/integers/i128/lt.leo similarity index 100% rename from compiler/otests/integers/i128/lt.leo rename to compiler/_otests/integers/i128/lt.leo diff --git a/compiler/otests/integers/i128/max.leo b/compiler/_otests/integers/i128/max.leo similarity index 100% rename from compiler/otests/integers/i128/max.leo rename to compiler/_otests/integers/i128/max.leo diff --git a/compiler/otests/integers/i128/max_fail.leo b/compiler/_otests/integers/i128/max_fail.leo similarity index 100% rename from compiler/otests/integers/i128/max_fail.leo rename to compiler/_otests/integers/i128/max_fail.leo diff --git a/compiler/otests/integers/i128/min.leo b/compiler/_otests/integers/i128/min.leo similarity index 100% rename from compiler/otests/integers/i128/min.leo rename to compiler/_otests/integers/i128/min.leo diff --git a/compiler/otests/integers/i128/min_fail.leo b/compiler/_otests/integers/i128/min_fail.leo similarity index 100% rename from compiler/otests/integers/i128/min_fail.leo rename to compiler/_otests/integers/i128/min_fail.leo diff --git a/compiler/otests/integers/i128/mod.rs b/compiler/_otests/integers/i128/mod.rs similarity index 100% rename from compiler/otests/integers/i128/mod.rs rename to compiler/_otests/integers/i128/mod.rs diff --git a/compiler/otests/integers/i128/mul.leo b/compiler/_otests/integers/i128/mul.leo similarity index 100% rename from compiler/otests/integers/i128/mul.leo rename to compiler/_otests/integers/i128/mul.leo diff --git a/compiler/otests/integers/i128/ne.leo b/compiler/_otests/integers/i128/ne.leo similarity index 100% rename from compiler/otests/integers/i128/ne.leo rename to compiler/_otests/integers/i128/ne.leo diff --git a/compiler/otests/integers/i128/negate.leo b/compiler/_otests/integers/i128/negate.leo similarity index 100% rename from compiler/otests/integers/i128/negate.leo rename to compiler/_otests/integers/i128/negate.leo diff --git a/compiler/otests/integers/i128/negate_min.leo b/compiler/_otests/integers/i128/negate_min.leo similarity index 100% rename from compiler/otests/integers/i128/negate_min.leo rename to compiler/_otests/integers/i128/negate_min.leo diff --git a/compiler/otests/integers/i128/negate_zero.leo b/compiler/_otests/integers/i128/negate_zero.leo similarity index 100% rename from compiler/otests/integers/i128/negate_zero.leo rename to compiler/_otests/integers/i128/negate_zero.leo diff --git a/compiler/otests/integers/i128/no_space_between_literal.leo b/compiler/_otests/integers/i128/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/i128/no_space_between_literal.leo rename to compiler/_otests/integers/i128/no_space_between_literal.leo diff --git a/compiler/otests/integers/i128/pow.leo b/compiler/_otests/integers/i128/pow.leo similarity index 100% rename from compiler/otests/integers/i128/pow.leo rename to compiler/_otests/integers/i128/pow.leo diff --git a/compiler/otests/integers/i128/sub.leo b/compiler/_otests/integers/i128/sub.leo similarity index 100% rename from compiler/otests/integers/i128/sub.leo rename to compiler/_otests/integers/i128/sub.leo diff --git a/compiler/otests/integers/i128/ternary.leo b/compiler/_otests/integers/i128/ternary.leo similarity index 100% rename from compiler/otests/integers/i128/ternary.leo rename to compiler/_otests/integers/i128/ternary.leo diff --git a/compiler/otests/integers/i16/add.leo b/compiler/_otests/integers/i16/add.leo similarity index 100% rename from compiler/otests/integers/i16/add.leo rename to compiler/_otests/integers/i16/add.leo diff --git a/compiler/otests/integers/i16/console_assert.leo b/compiler/_otests/integers/i16/console_assert.leo similarity index 100% rename from compiler/otests/integers/i16/console_assert.leo rename to compiler/_otests/integers/i16/console_assert.leo diff --git a/compiler/otests/integers/i16/div.leo b/compiler/_otests/integers/i16/div.leo similarity index 100% rename from compiler/otests/integers/i16/div.leo rename to compiler/_otests/integers/i16/div.leo diff --git a/compiler/otests/integers/i16/eq.leo b/compiler/_otests/integers/i16/eq.leo similarity index 100% rename from compiler/otests/integers/i16/eq.leo rename to compiler/_otests/integers/i16/eq.leo diff --git a/compiler/otests/integers/i16/ge.leo b/compiler/_otests/integers/i16/ge.leo similarity index 100% rename from compiler/otests/integers/i16/ge.leo rename to compiler/_otests/integers/i16/ge.leo diff --git a/compiler/otests/integers/i16/gt.leo b/compiler/_otests/integers/i16/gt.leo similarity index 100% rename from compiler/otests/integers/i16/gt.leo rename to compiler/_otests/integers/i16/gt.leo diff --git a/compiler/otests/integers/i16/input.leo b/compiler/_otests/integers/i16/input.leo similarity index 100% rename from compiler/otests/integers/i16/input.leo rename to compiler/_otests/integers/i16/input.leo diff --git a/compiler/otests/integers/i16/le.leo b/compiler/_otests/integers/i16/le.leo similarity index 100% rename from compiler/otests/integers/i16/le.leo rename to compiler/_otests/integers/i16/le.leo diff --git a/compiler/otests/integers/i16/lt.leo b/compiler/_otests/integers/i16/lt.leo similarity index 100% rename from compiler/otests/integers/i16/lt.leo rename to compiler/_otests/integers/i16/lt.leo diff --git a/compiler/otests/integers/i16/max.leo b/compiler/_otests/integers/i16/max.leo similarity index 100% rename from compiler/otests/integers/i16/max.leo rename to compiler/_otests/integers/i16/max.leo diff --git a/compiler/otests/integers/i16/max_fail.leo b/compiler/_otests/integers/i16/max_fail.leo similarity index 100% rename from compiler/otests/integers/i16/max_fail.leo rename to compiler/_otests/integers/i16/max_fail.leo diff --git a/compiler/otests/integers/i16/min.leo b/compiler/_otests/integers/i16/min.leo similarity index 100% rename from compiler/otests/integers/i16/min.leo rename to compiler/_otests/integers/i16/min.leo diff --git a/compiler/otests/integers/i16/min_fail.leo b/compiler/_otests/integers/i16/min_fail.leo similarity index 100% rename from compiler/otests/integers/i16/min_fail.leo rename to compiler/_otests/integers/i16/min_fail.leo diff --git a/compiler/otests/integers/i16/mod.rs b/compiler/_otests/integers/i16/mod.rs similarity index 100% rename from compiler/otests/integers/i16/mod.rs rename to compiler/_otests/integers/i16/mod.rs diff --git a/compiler/otests/integers/i16/mul.leo b/compiler/_otests/integers/i16/mul.leo similarity index 100% rename from compiler/otests/integers/i16/mul.leo rename to compiler/_otests/integers/i16/mul.leo diff --git a/compiler/otests/integers/i16/ne.leo b/compiler/_otests/integers/i16/ne.leo similarity index 100% rename from compiler/otests/integers/i16/ne.leo rename to compiler/_otests/integers/i16/ne.leo diff --git a/compiler/otests/integers/i16/negate.leo b/compiler/_otests/integers/i16/negate.leo similarity index 100% rename from compiler/otests/integers/i16/negate.leo rename to compiler/_otests/integers/i16/negate.leo diff --git a/compiler/otests/integers/i16/negate_min.leo b/compiler/_otests/integers/i16/negate_min.leo similarity index 100% rename from compiler/otests/integers/i16/negate_min.leo rename to compiler/_otests/integers/i16/negate_min.leo diff --git a/compiler/otests/integers/i16/negate_zero.leo b/compiler/_otests/integers/i16/negate_zero.leo similarity index 100% rename from compiler/otests/integers/i16/negate_zero.leo rename to compiler/_otests/integers/i16/negate_zero.leo diff --git a/compiler/otests/integers/i16/no_space_between_literal.leo b/compiler/_otests/integers/i16/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/i16/no_space_between_literal.leo rename to compiler/_otests/integers/i16/no_space_between_literal.leo diff --git a/compiler/otests/integers/i16/pow.leo b/compiler/_otests/integers/i16/pow.leo similarity index 100% rename from compiler/otests/integers/i16/pow.leo rename to compiler/_otests/integers/i16/pow.leo diff --git a/compiler/otests/integers/i16/sub.leo b/compiler/_otests/integers/i16/sub.leo similarity index 100% rename from compiler/otests/integers/i16/sub.leo rename to compiler/_otests/integers/i16/sub.leo diff --git a/compiler/otests/integers/i16/ternary.leo b/compiler/_otests/integers/i16/ternary.leo similarity index 100% rename from compiler/otests/integers/i16/ternary.leo rename to compiler/_otests/integers/i16/ternary.leo diff --git a/compiler/otests/integers/i32/add.leo b/compiler/_otests/integers/i32/add.leo similarity index 100% rename from compiler/otests/integers/i32/add.leo rename to compiler/_otests/integers/i32/add.leo diff --git a/compiler/otests/integers/i32/console_assert.leo b/compiler/_otests/integers/i32/console_assert.leo similarity index 100% rename from compiler/otests/integers/i32/console_assert.leo rename to compiler/_otests/integers/i32/console_assert.leo diff --git a/compiler/otests/integers/i32/div.leo b/compiler/_otests/integers/i32/div.leo similarity index 100% rename from compiler/otests/integers/i32/div.leo rename to compiler/_otests/integers/i32/div.leo diff --git a/compiler/otests/integers/i32/eq.leo b/compiler/_otests/integers/i32/eq.leo similarity index 100% rename from compiler/otests/integers/i32/eq.leo rename to compiler/_otests/integers/i32/eq.leo diff --git a/compiler/otests/integers/i32/ge.leo b/compiler/_otests/integers/i32/ge.leo similarity index 100% rename from compiler/otests/integers/i32/ge.leo rename to compiler/_otests/integers/i32/ge.leo diff --git a/compiler/otests/integers/i32/gt.leo b/compiler/_otests/integers/i32/gt.leo similarity index 100% rename from compiler/otests/integers/i32/gt.leo rename to compiler/_otests/integers/i32/gt.leo diff --git a/compiler/otests/integers/i32/input.leo b/compiler/_otests/integers/i32/input.leo similarity index 100% rename from compiler/otests/integers/i32/input.leo rename to compiler/_otests/integers/i32/input.leo diff --git a/compiler/otests/integers/i32/le.leo b/compiler/_otests/integers/i32/le.leo similarity index 100% rename from compiler/otests/integers/i32/le.leo rename to compiler/_otests/integers/i32/le.leo diff --git a/compiler/otests/integers/i32/lt.leo b/compiler/_otests/integers/i32/lt.leo similarity index 100% rename from compiler/otests/integers/i32/lt.leo rename to compiler/_otests/integers/i32/lt.leo diff --git a/compiler/otests/integers/i32/max.leo b/compiler/_otests/integers/i32/max.leo similarity index 100% rename from compiler/otests/integers/i32/max.leo rename to compiler/_otests/integers/i32/max.leo diff --git a/compiler/otests/integers/i32/max_fail.leo b/compiler/_otests/integers/i32/max_fail.leo similarity index 100% rename from compiler/otests/integers/i32/max_fail.leo rename to compiler/_otests/integers/i32/max_fail.leo diff --git a/compiler/otests/integers/i32/min.leo b/compiler/_otests/integers/i32/min.leo similarity index 100% rename from compiler/otests/integers/i32/min.leo rename to compiler/_otests/integers/i32/min.leo diff --git a/compiler/otests/integers/i32/min_fail.leo b/compiler/_otests/integers/i32/min_fail.leo similarity index 100% rename from compiler/otests/integers/i32/min_fail.leo rename to compiler/_otests/integers/i32/min_fail.leo diff --git a/compiler/otests/integers/i32/mod.rs b/compiler/_otests/integers/i32/mod.rs similarity index 100% rename from compiler/otests/integers/i32/mod.rs rename to compiler/_otests/integers/i32/mod.rs diff --git a/compiler/otests/integers/i32/mul.leo b/compiler/_otests/integers/i32/mul.leo similarity index 100% rename from compiler/otests/integers/i32/mul.leo rename to compiler/_otests/integers/i32/mul.leo diff --git a/compiler/otests/integers/i32/ne.leo b/compiler/_otests/integers/i32/ne.leo similarity index 100% rename from compiler/otests/integers/i32/ne.leo rename to compiler/_otests/integers/i32/ne.leo diff --git a/compiler/otests/integers/i32/negate.leo b/compiler/_otests/integers/i32/negate.leo similarity index 100% rename from compiler/otests/integers/i32/negate.leo rename to compiler/_otests/integers/i32/negate.leo diff --git a/compiler/otests/integers/i32/negate_min.leo b/compiler/_otests/integers/i32/negate_min.leo similarity index 100% rename from compiler/otests/integers/i32/negate_min.leo rename to compiler/_otests/integers/i32/negate_min.leo diff --git a/compiler/otests/integers/i32/negate_zero.leo b/compiler/_otests/integers/i32/negate_zero.leo similarity index 100% rename from compiler/otests/integers/i32/negate_zero.leo rename to compiler/_otests/integers/i32/negate_zero.leo diff --git a/compiler/otests/integers/i32/no_space_between_literal.leo b/compiler/_otests/integers/i32/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/i32/no_space_between_literal.leo rename to compiler/_otests/integers/i32/no_space_between_literal.leo diff --git a/compiler/otests/integers/i32/pow.leo b/compiler/_otests/integers/i32/pow.leo similarity index 100% rename from compiler/otests/integers/i32/pow.leo rename to compiler/_otests/integers/i32/pow.leo diff --git a/compiler/otests/integers/i32/sub.leo b/compiler/_otests/integers/i32/sub.leo similarity index 100% rename from compiler/otests/integers/i32/sub.leo rename to compiler/_otests/integers/i32/sub.leo diff --git a/compiler/otests/integers/i32/ternary.leo b/compiler/_otests/integers/i32/ternary.leo similarity index 100% rename from compiler/otests/integers/i32/ternary.leo rename to compiler/_otests/integers/i32/ternary.leo diff --git a/compiler/otests/integers/i64/add.leo b/compiler/_otests/integers/i64/add.leo similarity index 100% rename from compiler/otests/integers/i64/add.leo rename to compiler/_otests/integers/i64/add.leo diff --git a/compiler/otests/integers/i64/console_assert.leo b/compiler/_otests/integers/i64/console_assert.leo similarity index 100% rename from compiler/otests/integers/i64/console_assert.leo rename to compiler/_otests/integers/i64/console_assert.leo diff --git a/compiler/otests/integers/i64/div.leo b/compiler/_otests/integers/i64/div.leo similarity index 100% rename from compiler/otests/integers/i64/div.leo rename to compiler/_otests/integers/i64/div.leo diff --git a/compiler/otests/integers/i64/eq.leo b/compiler/_otests/integers/i64/eq.leo similarity index 100% rename from compiler/otests/integers/i64/eq.leo rename to compiler/_otests/integers/i64/eq.leo diff --git a/compiler/otests/integers/i64/ge.leo b/compiler/_otests/integers/i64/ge.leo similarity index 100% rename from compiler/otests/integers/i64/ge.leo rename to compiler/_otests/integers/i64/ge.leo diff --git a/compiler/otests/integers/i64/gt.leo b/compiler/_otests/integers/i64/gt.leo similarity index 100% rename from compiler/otests/integers/i64/gt.leo rename to compiler/_otests/integers/i64/gt.leo diff --git a/compiler/otests/integers/i64/input.leo b/compiler/_otests/integers/i64/input.leo similarity index 100% rename from compiler/otests/integers/i64/input.leo rename to compiler/_otests/integers/i64/input.leo diff --git a/compiler/otests/integers/i64/le.leo b/compiler/_otests/integers/i64/le.leo similarity index 100% rename from compiler/otests/integers/i64/le.leo rename to compiler/_otests/integers/i64/le.leo diff --git a/compiler/otests/integers/i64/lt.leo b/compiler/_otests/integers/i64/lt.leo similarity index 100% rename from compiler/otests/integers/i64/lt.leo rename to compiler/_otests/integers/i64/lt.leo diff --git a/compiler/otests/integers/i64/max.leo b/compiler/_otests/integers/i64/max.leo similarity index 100% rename from compiler/otests/integers/i64/max.leo rename to compiler/_otests/integers/i64/max.leo diff --git a/compiler/otests/integers/i64/max_fail.leo b/compiler/_otests/integers/i64/max_fail.leo similarity index 100% rename from compiler/otests/integers/i64/max_fail.leo rename to compiler/_otests/integers/i64/max_fail.leo diff --git a/compiler/otests/integers/i64/min.leo b/compiler/_otests/integers/i64/min.leo similarity index 100% rename from compiler/otests/integers/i64/min.leo rename to compiler/_otests/integers/i64/min.leo diff --git a/compiler/otests/integers/i64/min_fail.leo b/compiler/_otests/integers/i64/min_fail.leo similarity index 100% rename from compiler/otests/integers/i64/min_fail.leo rename to compiler/_otests/integers/i64/min_fail.leo diff --git a/compiler/otests/integers/i64/mod.rs b/compiler/_otests/integers/i64/mod.rs similarity index 100% rename from compiler/otests/integers/i64/mod.rs rename to compiler/_otests/integers/i64/mod.rs diff --git a/compiler/otests/integers/i64/mul.leo b/compiler/_otests/integers/i64/mul.leo similarity index 100% rename from compiler/otests/integers/i64/mul.leo rename to compiler/_otests/integers/i64/mul.leo diff --git a/compiler/otests/integers/i64/ne.leo b/compiler/_otests/integers/i64/ne.leo similarity index 100% rename from compiler/otests/integers/i64/ne.leo rename to compiler/_otests/integers/i64/ne.leo diff --git a/compiler/otests/integers/i64/negate.leo b/compiler/_otests/integers/i64/negate.leo similarity index 100% rename from compiler/otests/integers/i64/negate.leo rename to compiler/_otests/integers/i64/negate.leo diff --git a/compiler/otests/integers/i64/negate_min.leo b/compiler/_otests/integers/i64/negate_min.leo similarity index 100% rename from compiler/otests/integers/i64/negate_min.leo rename to compiler/_otests/integers/i64/negate_min.leo diff --git a/compiler/otests/integers/i64/negate_zero.leo b/compiler/_otests/integers/i64/negate_zero.leo similarity index 100% rename from compiler/otests/integers/i64/negate_zero.leo rename to compiler/_otests/integers/i64/negate_zero.leo diff --git a/compiler/otests/integers/i64/no_space_between_literal.leo b/compiler/_otests/integers/i64/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/i64/no_space_between_literal.leo rename to compiler/_otests/integers/i64/no_space_between_literal.leo diff --git a/compiler/otests/integers/i64/pow.leo b/compiler/_otests/integers/i64/pow.leo similarity index 100% rename from compiler/otests/integers/i64/pow.leo rename to compiler/_otests/integers/i64/pow.leo diff --git a/compiler/otests/integers/i64/sub.leo b/compiler/_otests/integers/i64/sub.leo similarity index 100% rename from compiler/otests/integers/i64/sub.leo rename to compiler/_otests/integers/i64/sub.leo diff --git a/compiler/otests/integers/i64/ternary.leo b/compiler/_otests/integers/i64/ternary.leo similarity index 100% rename from compiler/otests/integers/i64/ternary.leo rename to compiler/_otests/integers/i64/ternary.leo diff --git a/compiler/otests/integers/i8/add.leo b/compiler/_otests/integers/i8/add.leo similarity index 100% rename from compiler/otests/integers/i8/add.leo rename to compiler/_otests/integers/i8/add.leo diff --git a/compiler/otests/integers/i8/console_assert.leo b/compiler/_otests/integers/i8/console_assert.leo similarity index 100% rename from compiler/otests/integers/i8/console_assert.leo rename to compiler/_otests/integers/i8/console_assert.leo diff --git a/compiler/otests/integers/i8/div.leo b/compiler/_otests/integers/i8/div.leo similarity index 100% rename from compiler/otests/integers/i8/div.leo rename to compiler/_otests/integers/i8/div.leo diff --git a/compiler/otests/integers/i8/eq.leo b/compiler/_otests/integers/i8/eq.leo similarity index 100% rename from compiler/otests/integers/i8/eq.leo rename to compiler/_otests/integers/i8/eq.leo diff --git a/compiler/otests/integers/i8/ge.leo b/compiler/_otests/integers/i8/ge.leo similarity index 100% rename from compiler/otests/integers/i8/ge.leo rename to compiler/_otests/integers/i8/ge.leo diff --git a/compiler/otests/integers/i8/gt.leo b/compiler/_otests/integers/i8/gt.leo similarity index 100% rename from compiler/otests/integers/i8/gt.leo rename to compiler/_otests/integers/i8/gt.leo diff --git a/compiler/otests/integers/i8/input.leo b/compiler/_otests/integers/i8/input.leo similarity index 100% rename from compiler/otests/integers/i8/input.leo rename to compiler/_otests/integers/i8/input.leo diff --git a/compiler/otests/integers/i8/le.leo b/compiler/_otests/integers/i8/le.leo similarity index 100% rename from compiler/otests/integers/i8/le.leo rename to compiler/_otests/integers/i8/le.leo diff --git a/compiler/otests/integers/i8/lt.leo b/compiler/_otests/integers/i8/lt.leo similarity index 100% rename from compiler/otests/integers/i8/lt.leo rename to compiler/_otests/integers/i8/lt.leo diff --git a/compiler/otests/integers/i8/max.leo b/compiler/_otests/integers/i8/max.leo similarity index 100% rename from compiler/otests/integers/i8/max.leo rename to compiler/_otests/integers/i8/max.leo diff --git a/compiler/otests/integers/i8/max_fail.leo b/compiler/_otests/integers/i8/max_fail.leo similarity index 100% rename from compiler/otests/integers/i8/max_fail.leo rename to compiler/_otests/integers/i8/max_fail.leo diff --git a/compiler/otests/integers/i8/min.leo b/compiler/_otests/integers/i8/min.leo similarity index 100% rename from compiler/otests/integers/i8/min.leo rename to compiler/_otests/integers/i8/min.leo diff --git a/compiler/otests/integers/i8/min_fail.leo b/compiler/_otests/integers/i8/min_fail.leo similarity index 100% rename from compiler/otests/integers/i8/min_fail.leo rename to compiler/_otests/integers/i8/min_fail.leo diff --git a/compiler/otests/integers/i8/mod.rs b/compiler/_otests/integers/i8/mod.rs similarity index 100% rename from compiler/otests/integers/i8/mod.rs rename to compiler/_otests/integers/i8/mod.rs diff --git a/compiler/otests/integers/i8/mul.leo b/compiler/_otests/integers/i8/mul.leo similarity index 100% rename from compiler/otests/integers/i8/mul.leo rename to compiler/_otests/integers/i8/mul.leo diff --git a/compiler/otests/integers/i8/ne.leo b/compiler/_otests/integers/i8/ne.leo similarity index 100% rename from compiler/otests/integers/i8/ne.leo rename to compiler/_otests/integers/i8/ne.leo diff --git a/compiler/otests/integers/i8/negate.leo b/compiler/_otests/integers/i8/negate.leo similarity index 100% rename from compiler/otests/integers/i8/negate.leo rename to compiler/_otests/integers/i8/negate.leo diff --git a/compiler/otests/integers/i8/negate_min.leo b/compiler/_otests/integers/i8/negate_min.leo similarity index 100% rename from compiler/otests/integers/i8/negate_min.leo rename to compiler/_otests/integers/i8/negate_min.leo diff --git a/compiler/otests/integers/i8/negate_zero.leo b/compiler/_otests/integers/i8/negate_zero.leo similarity index 100% rename from compiler/otests/integers/i8/negate_zero.leo rename to compiler/_otests/integers/i8/negate_zero.leo diff --git a/compiler/otests/integers/i8/no_space_between_literal.leo b/compiler/_otests/integers/i8/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/i8/no_space_between_literal.leo rename to compiler/_otests/integers/i8/no_space_between_literal.leo diff --git a/compiler/otests/integers/i8/pow.leo b/compiler/_otests/integers/i8/pow.leo similarity index 100% rename from compiler/otests/integers/i8/pow.leo rename to compiler/_otests/integers/i8/pow.leo diff --git a/compiler/otests/integers/i8/sub.leo b/compiler/_otests/integers/i8/sub.leo similarity index 100% rename from compiler/otests/integers/i8/sub.leo rename to compiler/_otests/integers/i8/sub.leo diff --git a/compiler/otests/integers/i8/ternary.leo b/compiler/_otests/integers/i8/ternary.leo similarity index 100% rename from compiler/otests/integers/i8/ternary.leo rename to compiler/_otests/integers/i8/ternary.leo diff --git a/compiler/otests/integers/int_macro.rs b/compiler/_otests/integers/int_macro.rs similarity index 100% rename from compiler/otests/integers/int_macro.rs rename to compiler/_otests/integers/int_macro.rs diff --git a/compiler/otests/integers/integer_tester.rs b/compiler/_otests/integers/integer_tester.rs similarity index 100% rename from compiler/otests/integers/integer_tester.rs rename to compiler/_otests/integers/integer_tester.rs diff --git a/compiler/otests/integers/mod.rs b/compiler/_otests/integers/mod.rs similarity index 100% rename from compiler/otests/integers/mod.rs rename to compiler/_otests/integers/mod.rs diff --git a/compiler/otests/integers/u128/add.leo b/compiler/_otests/integers/u128/add.leo similarity index 100% rename from compiler/otests/integers/u128/add.leo rename to compiler/_otests/integers/u128/add.leo diff --git a/compiler/otests/integers/u128/console_assert.leo b/compiler/_otests/integers/u128/console_assert.leo similarity index 100% rename from compiler/otests/integers/u128/console_assert.leo rename to compiler/_otests/integers/u128/console_assert.leo diff --git a/compiler/otests/integers/u128/div.leo b/compiler/_otests/integers/u128/div.leo similarity index 100% rename from compiler/otests/integers/u128/div.leo rename to compiler/_otests/integers/u128/div.leo diff --git a/compiler/otests/integers/u128/eq.leo b/compiler/_otests/integers/u128/eq.leo similarity index 100% rename from compiler/otests/integers/u128/eq.leo rename to compiler/_otests/integers/u128/eq.leo diff --git a/compiler/otests/integers/u128/ge.leo b/compiler/_otests/integers/u128/ge.leo similarity index 100% rename from compiler/otests/integers/u128/ge.leo rename to compiler/_otests/integers/u128/ge.leo diff --git a/compiler/otests/integers/u128/gt.leo b/compiler/_otests/integers/u128/gt.leo similarity index 100% rename from compiler/otests/integers/u128/gt.leo rename to compiler/_otests/integers/u128/gt.leo diff --git a/compiler/otests/integers/u128/input.leo b/compiler/_otests/integers/u128/input.leo similarity index 100% rename from compiler/otests/integers/u128/input.leo rename to compiler/_otests/integers/u128/input.leo diff --git a/compiler/otests/integers/u128/le.leo b/compiler/_otests/integers/u128/le.leo similarity index 100% rename from compiler/otests/integers/u128/le.leo rename to compiler/_otests/integers/u128/le.leo diff --git a/compiler/otests/integers/u128/lt.leo b/compiler/_otests/integers/u128/lt.leo similarity index 100% rename from compiler/otests/integers/u128/lt.leo rename to compiler/_otests/integers/u128/lt.leo diff --git a/compiler/otests/integers/u128/max.leo b/compiler/_otests/integers/u128/max.leo similarity index 100% rename from compiler/otests/integers/u128/max.leo rename to compiler/_otests/integers/u128/max.leo diff --git a/compiler/otests/integers/u128/max_fail.leo b/compiler/_otests/integers/u128/max_fail.leo similarity index 100% rename from compiler/otests/integers/u128/max_fail.leo rename to compiler/_otests/integers/u128/max_fail.leo diff --git a/compiler/otests/integers/u128/min.leo b/compiler/_otests/integers/u128/min.leo similarity index 100% rename from compiler/otests/integers/u128/min.leo rename to compiler/_otests/integers/u128/min.leo diff --git a/compiler/otests/integers/u128/min_fail.leo b/compiler/_otests/integers/u128/min_fail.leo similarity index 100% rename from compiler/otests/integers/u128/min_fail.leo rename to compiler/_otests/integers/u128/min_fail.leo diff --git a/compiler/otests/integers/u128/mod.rs b/compiler/_otests/integers/u128/mod.rs similarity index 100% rename from compiler/otests/integers/u128/mod.rs rename to compiler/_otests/integers/u128/mod.rs diff --git a/compiler/otests/integers/u128/mul.leo b/compiler/_otests/integers/u128/mul.leo similarity index 100% rename from compiler/otests/integers/u128/mul.leo rename to compiler/_otests/integers/u128/mul.leo diff --git a/compiler/otests/integers/u128/ne.leo b/compiler/_otests/integers/u128/ne.leo similarity index 100% rename from compiler/otests/integers/u128/ne.leo rename to compiler/_otests/integers/u128/ne.leo diff --git a/compiler/otests/integers/u128/no_space_between_literal.leo b/compiler/_otests/integers/u128/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/u128/no_space_between_literal.leo rename to compiler/_otests/integers/u128/no_space_between_literal.leo diff --git a/compiler/otests/integers/u128/pow.leo b/compiler/_otests/integers/u128/pow.leo similarity index 100% rename from compiler/otests/integers/u128/pow.leo rename to compiler/_otests/integers/u128/pow.leo diff --git a/compiler/otests/integers/u128/sub.leo b/compiler/_otests/integers/u128/sub.leo similarity index 100% rename from compiler/otests/integers/u128/sub.leo rename to compiler/_otests/integers/u128/sub.leo diff --git a/compiler/otests/integers/u128/ternary.leo b/compiler/_otests/integers/u128/ternary.leo similarity index 100% rename from compiler/otests/integers/u128/ternary.leo rename to compiler/_otests/integers/u128/ternary.leo diff --git a/compiler/otests/integers/u16/add.leo b/compiler/_otests/integers/u16/add.leo similarity index 100% rename from compiler/otests/integers/u16/add.leo rename to compiler/_otests/integers/u16/add.leo diff --git a/compiler/otests/integers/u16/console_assert.leo b/compiler/_otests/integers/u16/console_assert.leo similarity index 100% rename from compiler/otests/integers/u16/console_assert.leo rename to compiler/_otests/integers/u16/console_assert.leo diff --git a/compiler/otests/integers/u16/div.leo b/compiler/_otests/integers/u16/div.leo similarity index 100% rename from compiler/otests/integers/u16/div.leo rename to compiler/_otests/integers/u16/div.leo diff --git a/compiler/otests/integers/u16/eq.leo b/compiler/_otests/integers/u16/eq.leo similarity index 100% rename from compiler/otests/integers/u16/eq.leo rename to compiler/_otests/integers/u16/eq.leo diff --git a/compiler/otests/integers/u16/ge.leo b/compiler/_otests/integers/u16/ge.leo similarity index 100% rename from compiler/otests/integers/u16/ge.leo rename to compiler/_otests/integers/u16/ge.leo diff --git a/compiler/otests/integers/u16/gt.leo b/compiler/_otests/integers/u16/gt.leo similarity index 100% rename from compiler/otests/integers/u16/gt.leo rename to compiler/_otests/integers/u16/gt.leo diff --git a/compiler/otests/integers/u16/input.leo b/compiler/_otests/integers/u16/input.leo similarity index 100% rename from compiler/otests/integers/u16/input.leo rename to compiler/_otests/integers/u16/input.leo diff --git a/compiler/otests/integers/u16/le.leo b/compiler/_otests/integers/u16/le.leo similarity index 100% rename from compiler/otests/integers/u16/le.leo rename to compiler/_otests/integers/u16/le.leo diff --git a/compiler/otests/integers/u16/lt.leo b/compiler/_otests/integers/u16/lt.leo similarity index 100% rename from compiler/otests/integers/u16/lt.leo rename to compiler/_otests/integers/u16/lt.leo diff --git a/compiler/otests/integers/u16/max.leo b/compiler/_otests/integers/u16/max.leo similarity index 100% rename from compiler/otests/integers/u16/max.leo rename to compiler/_otests/integers/u16/max.leo diff --git a/compiler/otests/integers/u16/max_fail.leo b/compiler/_otests/integers/u16/max_fail.leo similarity index 100% rename from compiler/otests/integers/u16/max_fail.leo rename to compiler/_otests/integers/u16/max_fail.leo diff --git a/compiler/otests/integers/u16/min.leo b/compiler/_otests/integers/u16/min.leo similarity index 100% rename from compiler/otests/integers/u16/min.leo rename to compiler/_otests/integers/u16/min.leo diff --git a/compiler/otests/integers/u16/min_fail.leo b/compiler/_otests/integers/u16/min_fail.leo similarity index 100% rename from compiler/otests/integers/u16/min_fail.leo rename to compiler/_otests/integers/u16/min_fail.leo diff --git a/compiler/otests/integers/u16/mod.rs b/compiler/_otests/integers/u16/mod.rs similarity index 100% rename from compiler/otests/integers/u16/mod.rs rename to compiler/_otests/integers/u16/mod.rs diff --git a/compiler/otests/integers/u16/mul.leo b/compiler/_otests/integers/u16/mul.leo similarity index 100% rename from compiler/otests/integers/u16/mul.leo rename to compiler/_otests/integers/u16/mul.leo diff --git a/compiler/otests/integers/u16/ne.leo b/compiler/_otests/integers/u16/ne.leo similarity index 100% rename from compiler/otests/integers/u16/ne.leo rename to compiler/_otests/integers/u16/ne.leo diff --git a/compiler/otests/integers/u16/no_space_between_literal.leo b/compiler/_otests/integers/u16/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/u16/no_space_between_literal.leo rename to compiler/_otests/integers/u16/no_space_between_literal.leo diff --git a/compiler/otests/integers/u16/pow.leo b/compiler/_otests/integers/u16/pow.leo similarity index 100% rename from compiler/otests/integers/u16/pow.leo rename to compiler/_otests/integers/u16/pow.leo diff --git a/compiler/otests/integers/u16/sub.leo b/compiler/_otests/integers/u16/sub.leo similarity index 100% rename from compiler/otests/integers/u16/sub.leo rename to compiler/_otests/integers/u16/sub.leo diff --git a/compiler/otests/integers/u16/ternary.leo b/compiler/_otests/integers/u16/ternary.leo similarity index 100% rename from compiler/otests/integers/u16/ternary.leo rename to compiler/_otests/integers/u16/ternary.leo diff --git a/compiler/otests/integers/u32/add.leo b/compiler/_otests/integers/u32/add.leo similarity index 100% rename from compiler/otests/integers/u32/add.leo rename to compiler/_otests/integers/u32/add.leo diff --git a/compiler/otests/integers/u32/console_assert.leo b/compiler/_otests/integers/u32/console_assert.leo similarity index 100% rename from compiler/otests/integers/u32/console_assert.leo rename to compiler/_otests/integers/u32/console_assert.leo diff --git a/compiler/otests/integers/u32/div.leo b/compiler/_otests/integers/u32/div.leo similarity index 100% rename from compiler/otests/integers/u32/div.leo rename to compiler/_otests/integers/u32/div.leo diff --git a/compiler/otests/integers/u32/eq.leo b/compiler/_otests/integers/u32/eq.leo similarity index 100% rename from compiler/otests/integers/u32/eq.leo rename to compiler/_otests/integers/u32/eq.leo diff --git a/compiler/otests/integers/u32/ge.leo b/compiler/_otests/integers/u32/ge.leo similarity index 100% rename from compiler/otests/integers/u32/ge.leo rename to compiler/_otests/integers/u32/ge.leo diff --git a/compiler/otests/integers/u32/gt.leo b/compiler/_otests/integers/u32/gt.leo similarity index 100% rename from compiler/otests/integers/u32/gt.leo rename to compiler/_otests/integers/u32/gt.leo diff --git a/compiler/otests/integers/u32/input.leo b/compiler/_otests/integers/u32/input.leo similarity index 100% rename from compiler/otests/integers/u32/input.leo rename to compiler/_otests/integers/u32/input.leo diff --git a/compiler/otests/integers/u32/le.leo b/compiler/_otests/integers/u32/le.leo similarity index 100% rename from compiler/otests/integers/u32/le.leo rename to compiler/_otests/integers/u32/le.leo diff --git a/compiler/otests/integers/u32/lt.leo b/compiler/_otests/integers/u32/lt.leo similarity index 100% rename from compiler/otests/integers/u32/lt.leo rename to compiler/_otests/integers/u32/lt.leo diff --git a/compiler/otests/integers/u32/max.leo b/compiler/_otests/integers/u32/max.leo similarity index 100% rename from compiler/otests/integers/u32/max.leo rename to compiler/_otests/integers/u32/max.leo diff --git a/compiler/otests/integers/u32/max_fail.leo b/compiler/_otests/integers/u32/max_fail.leo similarity index 100% rename from compiler/otests/integers/u32/max_fail.leo rename to compiler/_otests/integers/u32/max_fail.leo diff --git a/compiler/otests/integers/u32/min.leo b/compiler/_otests/integers/u32/min.leo similarity index 100% rename from compiler/otests/integers/u32/min.leo rename to compiler/_otests/integers/u32/min.leo diff --git a/compiler/otests/integers/u32/min_fail.leo b/compiler/_otests/integers/u32/min_fail.leo similarity index 100% rename from compiler/otests/integers/u32/min_fail.leo rename to compiler/_otests/integers/u32/min_fail.leo diff --git a/compiler/otests/integers/u32/mod.rs b/compiler/_otests/integers/u32/mod.rs similarity index 100% rename from compiler/otests/integers/u32/mod.rs rename to compiler/_otests/integers/u32/mod.rs diff --git a/compiler/otests/integers/u32/mul.leo b/compiler/_otests/integers/u32/mul.leo similarity index 100% rename from compiler/otests/integers/u32/mul.leo rename to compiler/_otests/integers/u32/mul.leo diff --git a/compiler/otests/integers/u32/ne.leo b/compiler/_otests/integers/u32/ne.leo similarity index 100% rename from compiler/otests/integers/u32/ne.leo rename to compiler/_otests/integers/u32/ne.leo diff --git a/compiler/otests/integers/u32/no_space_between_literal.leo b/compiler/_otests/integers/u32/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/u32/no_space_between_literal.leo rename to compiler/_otests/integers/u32/no_space_between_literal.leo diff --git a/compiler/otests/integers/u32/pow.leo b/compiler/_otests/integers/u32/pow.leo similarity index 100% rename from compiler/otests/integers/u32/pow.leo rename to compiler/_otests/integers/u32/pow.leo diff --git a/compiler/otests/integers/u32/sub.leo b/compiler/_otests/integers/u32/sub.leo similarity index 100% rename from compiler/otests/integers/u32/sub.leo rename to compiler/_otests/integers/u32/sub.leo diff --git a/compiler/otests/integers/u32/ternary.leo b/compiler/_otests/integers/u32/ternary.leo similarity index 100% rename from compiler/otests/integers/u32/ternary.leo rename to compiler/_otests/integers/u32/ternary.leo diff --git a/compiler/otests/integers/u64/add.leo b/compiler/_otests/integers/u64/add.leo similarity index 100% rename from compiler/otests/integers/u64/add.leo rename to compiler/_otests/integers/u64/add.leo diff --git a/compiler/otests/integers/u64/console_assert.leo b/compiler/_otests/integers/u64/console_assert.leo similarity index 100% rename from compiler/otests/integers/u64/console_assert.leo rename to compiler/_otests/integers/u64/console_assert.leo diff --git a/compiler/otests/integers/u64/div.leo b/compiler/_otests/integers/u64/div.leo similarity index 100% rename from compiler/otests/integers/u64/div.leo rename to compiler/_otests/integers/u64/div.leo diff --git a/compiler/otests/integers/u64/eq.leo b/compiler/_otests/integers/u64/eq.leo similarity index 100% rename from compiler/otests/integers/u64/eq.leo rename to compiler/_otests/integers/u64/eq.leo diff --git a/compiler/otests/integers/u64/ge.leo b/compiler/_otests/integers/u64/ge.leo similarity index 100% rename from compiler/otests/integers/u64/ge.leo rename to compiler/_otests/integers/u64/ge.leo diff --git a/compiler/otests/integers/u64/gt.leo b/compiler/_otests/integers/u64/gt.leo similarity index 100% rename from compiler/otests/integers/u64/gt.leo rename to compiler/_otests/integers/u64/gt.leo diff --git a/compiler/otests/integers/u64/input.leo b/compiler/_otests/integers/u64/input.leo similarity index 100% rename from compiler/otests/integers/u64/input.leo rename to compiler/_otests/integers/u64/input.leo diff --git a/compiler/otests/integers/u64/le.leo b/compiler/_otests/integers/u64/le.leo similarity index 100% rename from compiler/otests/integers/u64/le.leo rename to compiler/_otests/integers/u64/le.leo diff --git a/compiler/otests/integers/u64/lt.leo b/compiler/_otests/integers/u64/lt.leo similarity index 100% rename from compiler/otests/integers/u64/lt.leo rename to compiler/_otests/integers/u64/lt.leo diff --git a/compiler/otests/integers/u64/max.leo b/compiler/_otests/integers/u64/max.leo similarity index 100% rename from compiler/otests/integers/u64/max.leo rename to compiler/_otests/integers/u64/max.leo diff --git a/compiler/otests/integers/u64/max_fail.leo b/compiler/_otests/integers/u64/max_fail.leo similarity index 100% rename from compiler/otests/integers/u64/max_fail.leo rename to compiler/_otests/integers/u64/max_fail.leo diff --git a/compiler/otests/integers/u64/min.leo b/compiler/_otests/integers/u64/min.leo similarity index 100% rename from compiler/otests/integers/u64/min.leo rename to compiler/_otests/integers/u64/min.leo diff --git a/compiler/otests/integers/u64/min_fail.leo b/compiler/_otests/integers/u64/min_fail.leo similarity index 100% rename from compiler/otests/integers/u64/min_fail.leo rename to compiler/_otests/integers/u64/min_fail.leo diff --git a/compiler/otests/integers/u64/mod.rs b/compiler/_otests/integers/u64/mod.rs similarity index 100% rename from compiler/otests/integers/u64/mod.rs rename to compiler/_otests/integers/u64/mod.rs diff --git a/compiler/otests/integers/u64/mul.leo b/compiler/_otests/integers/u64/mul.leo similarity index 100% rename from compiler/otests/integers/u64/mul.leo rename to compiler/_otests/integers/u64/mul.leo diff --git a/compiler/otests/integers/u64/ne.leo b/compiler/_otests/integers/u64/ne.leo similarity index 100% rename from compiler/otests/integers/u64/ne.leo rename to compiler/_otests/integers/u64/ne.leo diff --git a/compiler/otests/integers/u64/no_space_between_literal.leo b/compiler/_otests/integers/u64/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/u64/no_space_between_literal.leo rename to compiler/_otests/integers/u64/no_space_between_literal.leo diff --git a/compiler/otests/integers/u64/pow.leo b/compiler/_otests/integers/u64/pow.leo similarity index 100% rename from compiler/otests/integers/u64/pow.leo rename to compiler/_otests/integers/u64/pow.leo diff --git a/compiler/otests/integers/u64/sub.leo b/compiler/_otests/integers/u64/sub.leo similarity index 100% rename from compiler/otests/integers/u64/sub.leo rename to compiler/_otests/integers/u64/sub.leo diff --git a/compiler/otests/integers/u64/ternary.leo b/compiler/_otests/integers/u64/ternary.leo similarity index 100% rename from compiler/otests/integers/u64/ternary.leo rename to compiler/_otests/integers/u64/ternary.leo diff --git a/compiler/otests/integers/u8/add.leo b/compiler/_otests/integers/u8/add.leo similarity index 100% rename from compiler/otests/integers/u8/add.leo rename to compiler/_otests/integers/u8/add.leo diff --git a/compiler/otests/integers/u8/console_assert.leo b/compiler/_otests/integers/u8/console_assert.leo similarity index 100% rename from compiler/otests/integers/u8/console_assert.leo rename to compiler/_otests/integers/u8/console_assert.leo diff --git a/compiler/otests/integers/u8/div.leo b/compiler/_otests/integers/u8/div.leo similarity index 100% rename from compiler/otests/integers/u8/div.leo rename to compiler/_otests/integers/u8/div.leo diff --git a/compiler/otests/integers/u8/eq.leo b/compiler/_otests/integers/u8/eq.leo similarity index 100% rename from compiler/otests/integers/u8/eq.leo rename to compiler/_otests/integers/u8/eq.leo diff --git a/compiler/otests/integers/u8/ge.leo b/compiler/_otests/integers/u8/ge.leo similarity index 100% rename from compiler/otests/integers/u8/ge.leo rename to compiler/_otests/integers/u8/ge.leo diff --git a/compiler/otests/integers/u8/gt.leo b/compiler/_otests/integers/u8/gt.leo similarity index 100% rename from compiler/otests/integers/u8/gt.leo rename to compiler/_otests/integers/u8/gt.leo diff --git a/compiler/otests/integers/u8/input.leo b/compiler/_otests/integers/u8/input.leo similarity index 100% rename from compiler/otests/integers/u8/input.leo rename to compiler/_otests/integers/u8/input.leo diff --git a/compiler/otests/integers/u8/le.leo b/compiler/_otests/integers/u8/le.leo similarity index 100% rename from compiler/otests/integers/u8/le.leo rename to compiler/_otests/integers/u8/le.leo diff --git a/compiler/otests/integers/u8/lt.leo b/compiler/_otests/integers/u8/lt.leo similarity index 100% rename from compiler/otests/integers/u8/lt.leo rename to compiler/_otests/integers/u8/lt.leo diff --git a/compiler/otests/integers/u8/max.leo b/compiler/_otests/integers/u8/max.leo similarity index 100% rename from compiler/otests/integers/u8/max.leo rename to compiler/_otests/integers/u8/max.leo diff --git a/compiler/otests/integers/u8/max_fail.leo b/compiler/_otests/integers/u8/max_fail.leo similarity index 100% rename from compiler/otests/integers/u8/max_fail.leo rename to compiler/_otests/integers/u8/max_fail.leo diff --git a/compiler/otests/integers/u8/min.leo b/compiler/_otests/integers/u8/min.leo similarity index 100% rename from compiler/otests/integers/u8/min.leo rename to compiler/_otests/integers/u8/min.leo diff --git a/compiler/otests/integers/u8/min_fail.leo b/compiler/_otests/integers/u8/min_fail.leo similarity index 100% rename from compiler/otests/integers/u8/min_fail.leo rename to compiler/_otests/integers/u8/min_fail.leo diff --git a/compiler/otests/integers/u8/mod.rs b/compiler/_otests/integers/u8/mod.rs similarity index 100% rename from compiler/otests/integers/u8/mod.rs rename to compiler/_otests/integers/u8/mod.rs diff --git a/compiler/otests/integers/u8/mul.leo b/compiler/_otests/integers/u8/mul.leo similarity index 100% rename from compiler/otests/integers/u8/mul.leo rename to compiler/_otests/integers/u8/mul.leo diff --git a/compiler/otests/integers/u8/ne.leo b/compiler/_otests/integers/u8/ne.leo similarity index 100% rename from compiler/otests/integers/u8/ne.leo rename to compiler/_otests/integers/u8/ne.leo diff --git a/compiler/otests/integers/u8/no_space_between_literal.leo b/compiler/_otests/integers/u8/no_space_between_literal.leo similarity index 100% rename from compiler/otests/integers/u8/no_space_between_literal.leo rename to compiler/_otests/integers/u8/no_space_between_literal.leo diff --git a/compiler/otests/integers/u8/pow.leo b/compiler/_otests/integers/u8/pow.leo similarity index 100% rename from compiler/otests/integers/u8/pow.leo rename to compiler/_otests/integers/u8/pow.leo diff --git a/compiler/otests/integers/u8/sub.leo b/compiler/_otests/integers/u8/sub.leo similarity index 100% rename from compiler/otests/integers/u8/sub.leo rename to compiler/_otests/integers/u8/sub.leo diff --git a/compiler/otests/integers/u8/ternary.leo b/compiler/_otests/integers/u8/ternary.leo similarity index 100% rename from compiler/otests/integers/u8/ternary.leo rename to compiler/_otests/integers/u8/ternary.leo diff --git a/compiler/otests/integers/uint_macro.rs b/compiler/_otests/integers/uint_macro.rs similarity index 100% rename from compiler/otests/integers/uint_macro.rs rename to compiler/_otests/integers/uint_macro.rs diff --git a/compiler/otests/mod.rs b/compiler/_otests/mod.rs similarity index 100% rename from compiler/otests/mod.rs rename to compiler/_otests/mod.rs diff --git a/compiler/otests/mutability/array.leo b/compiler/_otests/mutability/array.leo similarity index 100% rename from compiler/otests/mutability/array.leo rename to compiler/_otests/mutability/array.leo diff --git a/compiler/otests/mutability/array_mut.leo b/compiler/_otests/mutability/array_mut.leo similarity index 100% rename from compiler/otests/mutability/array_mut.leo rename to compiler/_otests/mutability/array_mut.leo diff --git a/compiler/otests/mutability/array_splice_mut.leo b/compiler/_otests/mutability/array_splice_mut.leo similarity index 100% rename from compiler/otests/mutability/array_splice_mut.leo rename to compiler/_otests/mutability/array_splice_mut.leo diff --git a/compiler/otests/mutability/array_tuple_mut.leo b/compiler/_otests/mutability/array_tuple_mut.leo similarity index 100% rename from compiler/otests/mutability/array_tuple_mut.leo rename to compiler/_otests/mutability/array_tuple_mut.leo diff --git a/compiler/otests/mutability/circuit.leo b/compiler/_otests/mutability/circuit.leo similarity index 100% rename from compiler/otests/mutability/circuit.leo rename to compiler/_otests/mutability/circuit.leo diff --git a/compiler/otests/mutability/circuit_function_mut.leo b/compiler/_otests/mutability/circuit_function_mut.leo similarity index 100% rename from compiler/otests/mutability/circuit_function_mut.leo rename to compiler/_otests/mutability/circuit_function_mut.leo diff --git a/compiler/otests/mutability/circuit_mut.leo b/compiler/_otests/mutability/circuit_mut.leo similarity index 100% rename from compiler/otests/mutability/circuit_mut.leo rename to compiler/_otests/mutability/circuit_mut.leo diff --git a/compiler/otests/mutability/circuit_static_function_mut.leo b/compiler/_otests/mutability/circuit_static_function_mut.leo similarity index 100% rename from compiler/otests/mutability/circuit_static_function_mut.leo rename to compiler/_otests/mutability/circuit_static_function_mut.leo diff --git a/compiler/otests/mutability/circuit_variable_mut.leo b/compiler/_otests/mutability/circuit_variable_mut.leo similarity index 100% rename from compiler/otests/mutability/circuit_variable_mut.leo rename to compiler/_otests/mutability/circuit_variable_mut.leo diff --git a/compiler/otests/mutability/cond_mut.leo b/compiler/_otests/mutability/cond_mut.leo similarity index 100% rename from compiler/otests/mutability/cond_mut.leo rename to compiler/_otests/mutability/cond_mut.leo diff --git a/compiler/otests/mutability/const.leo b/compiler/_otests/mutability/const.leo similarity index 100% rename from compiler/otests/mutability/const.leo rename to compiler/_otests/mutability/const.leo diff --git a/compiler/otests/mutability/function_input.leo b/compiler/_otests/mutability/function_input.leo similarity index 100% rename from compiler/otests/mutability/function_input.leo rename to compiler/_otests/mutability/function_input.leo diff --git a/compiler/otests/mutability/function_input_mut.leo b/compiler/_otests/mutability/function_input_mut.leo similarity index 100% rename from compiler/otests/mutability/function_input_mut.leo rename to compiler/_otests/mutability/function_input_mut.leo diff --git a/compiler/otests/mutability/let.leo b/compiler/_otests/mutability/let.leo similarity index 100% rename from compiler/otests/mutability/let.leo rename to compiler/_otests/mutability/let.leo diff --git a/compiler/otests/mutability/let_mut.leo b/compiler/_otests/mutability/let_mut.leo similarity index 100% rename from compiler/otests/mutability/let_mut.leo rename to compiler/_otests/mutability/let_mut.leo diff --git a/compiler/otests/mutability/let_mut_nested.leo b/compiler/_otests/mutability/let_mut_nested.leo similarity index 100% rename from compiler/otests/mutability/let_mut_nested.leo rename to compiler/_otests/mutability/let_mut_nested.leo diff --git a/compiler/otests/mutability/mod.rs b/compiler/_otests/mutability/mod.rs similarity index 100% rename from compiler/otests/mutability/mod.rs rename to compiler/_otests/mutability/mod.rs diff --git a/compiler/otests/mutability/swap.leo b/compiler/_otests/mutability/swap.leo similarity index 100% rename from compiler/otests/mutability/swap.leo rename to compiler/_otests/mutability/swap.leo diff --git a/compiler/otests/statements/block.leo b/compiler/_otests/statements/block.leo similarity index 100% rename from compiler/otests/statements/block.leo rename to compiler/_otests/statements/block.leo diff --git a/compiler/otests/statements/conditional/assert.leo b/compiler/_otests/statements/conditional/assert.leo similarity index 100% rename from compiler/otests/statements/conditional/assert.leo rename to compiler/_otests/statements/conditional/assert.leo diff --git a/compiler/otests/statements/conditional/chain.leo b/compiler/_otests/statements/conditional/chain.leo similarity index 100% rename from compiler/otests/statements/conditional/chain.leo rename to compiler/_otests/statements/conditional/chain.leo diff --git a/compiler/otests/statements/conditional/cond_switch.leo b/compiler/_otests/statements/conditional/cond_switch.leo similarity index 100% rename from compiler/otests/statements/conditional/cond_switch.leo rename to compiler/_otests/statements/conditional/cond_switch.leo diff --git a/compiler/otests/statements/conditional/for_loop.leo b/compiler/_otests/statements/conditional/for_loop.leo similarity index 100% rename from compiler/otests/statements/conditional/for_loop.leo rename to compiler/_otests/statements/conditional/for_loop.leo diff --git a/compiler/otests/statements/conditional/input/cond_switch.in b/compiler/_otests/statements/conditional/input/cond_switch.in similarity index 100% rename from compiler/otests/statements/conditional/input/cond_switch.in rename to compiler/_otests/statements/conditional/input/cond_switch.in diff --git a/compiler/otests/statements/conditional/input/registers_one.in b/compiler/_otests/statements/conditional/input/registers_one.in similarity index 100% rename from compiler/otests/statements/conditional/input/registers_one.in rename to compiler/_otests/statements/conditional/input/registers_one.in diff --git a/compiler/otests/statements/conditional/input/registers_zero.in b/compiler/_otests/statements/conditional/input/registers_zero.in similarity index 100% rename from compiler/otests/statements/conditional/input/registers_zero.in rename to compiler/_otests/statements/conditional/input/registers_zero.in diff --git a/compiler/otests/statements/conditional/mod.rs b/compiler/_otests/statements/conditional/mod.rs similarity index 100% rename from compiler/otests/statements/conditional/mod.rs rename to compiler/_otests/statements/conditional/mod.rs diff --git a/compiler/otests/statements/conditional/multiple_returns.leo b/compiler/_otests/statements/conditional/multiple_returns.leo similarity index 100% rename from compiler/otests/statements/conditional/multiple_returns.leo rename to compiler/_otests/statements/conditional/multiple_returns.leo diff --git a/compiler/otests/statements/conditional/mutate.leo b/compiler/_otests/statements/conditional/mutate.leo similarity index 100% rename from compiler/otests/statements/conditional/mutate.leo rename to compiler/_otests/statements/conditional/mutate.leo diff --git a/compiler/otests/statements/conditional/nested.leo b/compiler/_otests/statements/conditional/nested.leo similarity index 100% rename from compiler/otests/statements/conditional/nested.leo rename to compiler/_otests/statements/conditional/nested.leo diff --git a/compiler/otests/statements/conditional/output/cond_switch.out b/compiler/_otests/statements/conditional/output/cond_switch.out similarity index 100% rename from compiler/otests/statements/conditional/output/cond_switch.out rename to compiler/_otests/statements/conditional/output/cond_switch.out diff --git a/compiler/otests/statements/conditional/output/registers_one.out b/compiler/_otests/statements/conditional/output/registers_one.out similarity index 100% rename from compiler/otests/statements/conditional/output/registers_one.out rename to compiler/_otests/statements/conditional/output/registers_one.out diff --git a/compiler/otests/statements/conditional/output/registers_zero.out b/compiler/_otests/statements/conditional/output/registers_zero.out similarity index 100% rename from compiler/otests/statements/conditional/output/registers_zero.out rename to compiler/_otests/statements/conditional/output/registers_zero.out diff --git a/compiler/otests/statements/iteration_basic.leo b/compiler/_otests/statements/iteration_basic.leo similarity index 100% rename from compiler/otests/statements/iteration_basic.leo rename to compiler/_otests/statements/iteration_basic.leo diff --git a/compiler/otests/statements/iteration_input.in b/compiler/_otests/statements/iteration_input.in similarity index 100% rename from compiler/otests/statements/iteration_input.in rename to compiler/_otests/statements/iteration_input.in diff --git a/compiler/otests/statements/iteration_input.leo b/compiler/_otests/statements/iteration_input.leo similarity index 100% rename from compiler/otests/statements/iteration_input.leo rename to compiler/_otests/statements/iteration_input.leo diff --git a/compiler/otests/statements/iteration_type_fail.leo b/compiler/_otests/statements/iteration_type_fail.leo similarity index 100% rename from compiler/otests/statements/iteration_type_fail.leo rename to compiler/_otests/statements/iteration_type_fail.leo diff --git a/compiler/otests/statements/iteration_variable.leo b/compiler/_otests/statements/iteration_variable.leo similarity index 100% rename from compiler/otests/statements/iteration_variable.leo rename to compiler/_otests/statements/iteration_variable.leo diff --git a/compiler/otests/statements/mod.rs b/compiler/_otests/statements/mod.rs similarity index 100% rename from compiler/otests/statements/mod.rs rename to compiler/_otests/statements/mod.rs diff --git a/compiler/otests/statements/num_returns_fail.leo b/compiler/_otests/statements/num_returns_fail.leo similarity index 100% rename from compiler/otests/statements/num_returns_fail.leo rename to compiler/_otests/statements/num_returns_fail.leo diff --git a/compiler/otests/statements/ternary_basic.leo b/compiler/_otests/statements/ternary_basic.leo similarity index 100% rename from compiler/otests/statements/ternary_basic.leo rename to compiler/_otests/statements/ternary_basic.leo diff --git a/compiler/otests/statements/ternary_non_const_conditional_fail.leo b/compiler/_otests/statements/ternary_non_const_conditional_fail.leo similarity index 100% rename from compiler/otests/statements/ternary_non_const_conditional_fail.leo rename to compiler/_otests/statements/ternary_non_const_conditional_fail.leo diff --git a/compiler/otests/syntax/compare_mismatched_types.leo b/compiler/_otests/syntax/compare_mismatched_types.leo similarity index 100% rename from compiler/otests/syntax/compare_mismatched_types.leo rename to compiler/_otests/syntax/compare_mismatched_types.leo diff --git a/compiler/otests/syntax/identifiers/address_fail.leo b/compiler/_otests/syntax/identifiers/address_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/address_fail.leo rename to compiler/_otests/syntax/identifiers/address_fail.leo diff --git a/compiler/otests/syntax/identifiers/console_fail.leo b/compiler/_otests/syntax/identifiers/console_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/console_fail.leo rename to compiler/_otests/syntax/identifiers/console_fail.leo diff --git a/compiler/otests/syntax/identifiers/field_fail.leo b/compiler/_otests/syntax/identifiers/field_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/field_fail.leo rename to compiler/_otests/syntax/identifiers/field_fail.leo diff --git a/compiler/otests/syntax/identifiers/group_fail.leo b/compiler/_otests/syntax/identifiers/group_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/group_fail.leo rename to compiler/_otests/syntax/identifiers/group_fail.leo diff --git a/compiler/otests/syntax/identifiers/i8_fail.leo b/compiler/_otests/syntax/identifiers/i8_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/i8_fail.leo rename to compiler/_otests/syntax/identifiers/i8_fail.leo diff --git a/compiler/otests/syntax/identifiers/input_fail.leo b/compiler/_otests/syntax/identifiers/input_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/input_fail.leo rename to compiler/_otests/syntax/identifiers/input_fail.leo diff --git a/compiler/otests/syntax/identifiers/mod.rs b/compiler/_otests/syntax/identifiers/mod.rs similarity index 100% rename from compiler/otests/syntax/identifiers/mod.rs rename to compiler/_otests/syntax/identifiers/mod.rs diff --git a/compiler/otests/syntax/identifiers/self_keyword_fail.leo b/compiler/_otests/syntax/identifiers/self_keyword_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/self_keyword_fail.leo rename to compiler/_otests/syntax/identifiers/self_keyword_fail.leo diff --git a/compiler/otests/syntax/identifiers/self_type_fail.leo b/compiler/_otests/syntax/identifiers/self_type_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/self_type_fail.leo rename to compiler/_otests/syntax/identifiers/self_type_fail.leo diff --git a/compiler/otests/syntax/identifiers/true_fail.leo b/compiler/_otests/syntax/identifiers/true_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/true_fail.leo rename to compiler/_otests/syntax/identifiers/true_fail.leo diff --git a/compiler/otests/syntax/identifiers/u8_fail.leo b/compiler/_otests/syntax/identifiers/u8_fail.leo similarity index 100% rename from compiler/otests/syntax/identifiers/u8_fail.leo rename to compiler/_otests/syntax/identifiers/u8_fail.leo diff --git a/compiler/otests/syntax/input_semicolon.leo b/compiler/_otests/syntax/input_semicolon.leo similarity index 100% rename from compiler/otests/syntax/input_semicolon.leo rename to compiler/_otests/syntax/input_semicolon.leo diff --git a/compiler/otests/syntax/mod.rs b/compiler/_otests/syntax/mod.rs similarity index 100% rename from compiler/otests/syntax/mod.rs rename to compiler/_otests/syntax/mod.rs diff --git a/compiler/otests/syntax/semicolon.leo b/compiler/_otests/syntax/semicolon.leo similarity index 100% rename from compiler/otests/syntax/semicolon.leo rename to compiler/_otests/syntax/semicolon.leo diff --git a/compiler/otests/syntax/undefined.leo b/compiler/_otests/syntax/undefined.leo similarity index 100% rename from compiler/otests/syntax/undefined.leo rename to compiler/_otests/syntax/undefined.leo diff --git a/compiler/otests/tuples/access.leo b/compiler/_otests/tuples/access.leo similarity index 100% rename from compiler/otests/tuples/access.leo rename to compiler/_otests/tuples/access.leo diff --git a/compiler/otests/tuples/basic.leo b/compiler/_otests/tuples/basic.leo similarity index 100% rename from compiler/otests/tuples/basic.leo rename to compiler/_otests/tuples/basic.leo diff --git a/compiler/otests/tuples/function.leo b/compiler/_otests/tuples/function.leo similarity index 100% rename from compiler/otests/tuples/function.leo rename to compiler/_otests/tuples/function.leo diff --git a/compiler/otests/tuples/function_multiple.leo b/compiler/_otests/tuples/function_multiple.leo similarity index 100% rename from compiler/otests/tuples/function_multiple.leo rename to compiler/_otests/tuples/function_multiple.leo diff --git a/compiler/otests/tuples/function_typed.leo b/compiler/_otests/tuples/function_typed.leo similarity index 100% rename from compiler/otests/tuples/function_typed.leo rename to compiler/_otests/tuples/function_typed.leo diff --git a/compiler/otests/tuples/input.leo b/compiler/_otests/tuples/input.leo similarity index 100% rename from compiler/otests/tuples/input.leo rename to compiler/_otests/tuples/input.leo diff --git a/compiler/otests/tuples/inputs/input.in b/compiler/_otests/tuples/inputs/input.in similarity index 100% rename from compiler/otests/tuples/inputs/input.in rename to compiler/_otests/tuples/inputs/input.in diff --git a/compiler/otests/tuples/mod.rs b/compiler/_otests/tuples/mod.rs similarity index 100% rename from compiler/otests/tuples/mod.rs rename to compiler/_otests/tuples/mod.rs diff --git a/compiler/otests/tuples/multiple.leo b/compiler/_otests/tuples/multiple.leo similarity index 100% rename from compiler/otests/tuples/multiple.leo rename to compiler/_otests/tuples/multiple.leo diff --git a/compiler/otests/tuples/multiple_typed.leo b/compiler/_otests/tuples/multiple_typed.leo similarity index 100% rename from compiler/otests/tuples/multiple_typed.leo rename to compiler/_otests/tuples/multiple_typed.leo diff --git a/compiler/otests/tuples/nested.leo b/compiler/_otests/tuples/nested.leo similarity index 100% rename from compiler/otests/tuples/nested.leo rename to compiler/_otests/tuples/nested.leo diff --git a/compiler/otests/tuples/nested_access.leo b/compiler/_otests/tuples/nested_access.leo similarity index 100% rename from compiler/otests/tuples/nested_access.leo rename to compiler/_otests/tuples/nested_access.leo diff --git a/compiler/otests/tuples/nested_typed.leo b/compiler/_otests/tuples/nested_typed.leo similarity index 100% rename from compiler/otests/tuples/nested_typed.leo rename to compiler/_otests/tuples/nested_typed.leo diff --git a/compiler/otests/tuples/typed.leo b/compiler/_otests/tuples/typed.leo similarity index 100% rename from compiler/otests/tuples/typed.leo rename to compiler/_otests/tuples/typed.leo diff --git a/compiler/otests/type_inference/basic.json b/compiler/_otests/type_inference/basic.json similarity index 100% rename from compiler/otests/type_inference/basic.json rename to compiler/_otests/type_inference/basic.json diff --git a/compiler/otests/type_inference/basic.leo b/compiler/_otests/type_inference/basic.leo similarity index 100% rename from compiler/otests/type_inference/basic.leo rename to compiler/_otests/type_inference/basic.leo diff --git a/compiler/otests/type_inference/for_loop_and_compound.json b/compiler/_otests/type_inference/for_loop_and_compound.json similarity index 100% rename from compiler/otests/type_inference/for_loop_and_compound.json rename to compiler/_otests/type_inference/for_loop_and_compound.json diff --git a/compiler/otests/type_inference/for_loop_and_compound.leo b/compiler/_otests/type_inference/for_loop_and_compound.leo similarity index 100% rename from compiler/otests/type_inference/for_loop_and_compound.leo rename to compiler/_otests/type_inference/for_loop_and_compound.leo diff --git a/compiler/otests/type_inference/mod.rs b/compiler/_otests/type_inference/mod.rs similarity index 100% rename from compiler/otests/type_inference/mod.rs rename to compiler/_otests/type_inference/mod.rs diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs index 631e923f38..8676703570 100644 --- a/compiler/src/lib.rs +++ b/compiler/src/lib.rs @@ -65,6 +65,3 @@ pub use phases::*; pub mod option; pub use option::*; - -#[cfg(test)] -mod test; diff --git a/compiler/src/output/mod.rs b/compiler/src/output/mod.rs index 44d6cf0827..539cef7351 100644 --- a/compiler/src/output/mod.rs +++ b/compiler/src/output/mod.rs @@ -53,17 +53,12 @@ impl fmt::Display for Output { } } -// impl Into for Output { -// fn into(self) -> OutputBytes { -// OutputBytes::from(self.to_string().into_bytes()) -// } -// } - -// impl From for OutputBytes { -// fn from(a: Output) -> Self { - -// } -// } +#[allow(clippy::from_over_into)] +impl Into for Output { + fn into(self) -> OutputBytes { + OutputBytes::from(self.to_string().into_bytes()) + } +} impl Output { pub fn new<'a, F: PrimeField, G: GroupType>( diff --git a/compiler/tests/canonicalization/array_expansion.json b/compiler/tests/canonicalization/array_expansion.json new file mode 100644 index 0000000000..4b4f324e0d --- /dev/null +++ b/compiler/tests/canonicalization/array_expansion.json @@ -0,0 +1,359 @@ +{ + "name": "", + "expected_input": [], + "imports": [], + "circuits": {}, + "global_consts": {}, + "functions": { + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(a: [group; (2, 1)]) {\\\"}\"}": { + "annotations": [], + "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(a: [group; (2, 1)]) {\\\"}\"}", + "input": [ + { + "Variable": { + "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(a: [group; (2, 1)]) {\\\"}\"}", + "const_": false, + "mutable": true, + "type_": { + "Array": [ + { + "Array": [ + "Group", + [ + { + "value": "1" + } + ] + ] + }, + [ + { + "value": "2" + } + ] + ] + }, + "span": { + "line_start": 1, + "line_stop": 1, + "col_start": 15, + "col_stop": 16, + "path": "", + "content": "function main(a: [group; (2, 1)]) {" + } + } + } + ], + "output": { + "Tuple": [] + }, + "block": { + "statements": [ + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let b = [true; (6, 5, 4, 3, 2)];\\\"}\"}", + "span": { + "line_start": 2, + "line_stop": 2, + "col_start": 7, + "col_stop": 8, + "path": "", + "content": " let b = [true; (6, 5, 4, 3, 2)];" + } + } + ], + "type_": null, + "value": { + "ArrayInit": { + "element": { + "ArrayInit": { + "element": { + "ArrayInit": { + "element": { + "ArrayInit": { + "element": { + "ArrayInit": { + "element": { + "Value": { + "Boolean": [ + "true", + { + "line_start": 2, + "line_stop": 2, + "col_start": 12, + "col_stop": 16, + "path": "", + "content": " let b = [true; (6, 5, 4, 3, 2)];" + } + ] + } + }, + "dimensions": [ + { + "value": "2" + } + ], + "span": { + "line_start": 2, + "line_stop": 2, + "col_start": 11, + "col_stop": 34, + "path": "", + "content": " let b = [true; (6, 5, 4, 3, 2)];" + } + } + }, + "dimensions": [ + { + "value": "3" + } + ], + "span": { + "line_start": 2, + "line_stop": 2, + "col_start": 11, + "col_stop": 34, + "path": "", + "content": " let b = [true; (6, 5, 4, 3, 2)];" + } + } + }, + "dimensions": [ + { + "value": "4" + } + ], + "span": { + "line_start": 2, + "line_stop": 2, + "col_start": 11, + "col_stop": 34, + "path": "", + "content": " let b = [true; (6, 5, 4, 3, 2)];" + } + } + }, + "dimensions": [ + { + "value": "5" + } + ], + "span": { + "line_start": 2, + "line_stop": 2, + "col_start": 11, + "col_stop": 34, + "path": "", + "content": " let b = [true; (6, 5, 4, 3, 2)];" + } + } + }, + "dimensions": [ + { + "value": "6" + } + ], + "span": { + "line_start": 2, + "line_stop": 2, + "col_start": 11, + "col_stop": 34, + "path": "", + "content": " let b = [true; (6, 5, 4, 3, 2)];" + } + } + }, + "span": { + "line_start": 2, + "line_stop": 2, + "col_start": 3, + "col_stop": 34, + "path": "", + "content": " let b = [true; (6, 5, 4, 3, 2)];" + } + } + }, + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let c: [u32; (1, 2)] = [0u32; (1, 2)];\\\"}\"}", + "span": { + "line_start": 3, + "line_stop": 3, + "col_start": 7, + "col_stop": 8, + "path": "", + "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" + } + } + ], + "type_": { + "Array": [ + { + "Array": [ + { + "IntegerType": "U32" + }, + [ + { + "value": "2" + } + ] + ] + }, + [ + { + "value": "1" + } + ] + ] + }, + "value": { + "ArrayInit": { + "element": { + "ArrayInit": { + "element": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 3, + "line_stop": 3, + "col_start": 27, + "col_stop": 31, + "path": "", + "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" + } + ] + } + }, + "dimensions": [ + { + "value": "2" + } + ], + "span": { + "line_start": 3, + "line_stop": 3, + "col_start": 26, + "col_stop": 40, + "path": "", + "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" + } + } + }, + "dimensions": [ + { + "value": "1" + } + ], + "span": { + "line_start": 3, + "line_stop": 3, + "col_start": 26, + "col_stop": 40, + "path": "", + "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" + } + } + }, + "span": { + "line_start": 3, + "line_stop": 3, + "col_start": 3, + "col_stop": 40, + "path": "", + "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" + } + } + }, + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let d = [0i8; (1)];\\\"}\"}", + "span": { + "line_start": 4, + "line_stop": 4, + "col_start": 7, + "col_stop": 8, + "path": "", + "content": " let d = [0i8; (1)];" + } + } + ], + "type_": null, + "value": { + "ArrayInit": { + "element": { + "Value": { + "Integer": [ + "I8", + "0", + { + "line_start": 4, + "line_stop": 4, + "col_start": 12, + "col_stop": 15, + "path": "", + "content": " let d = [0i8; (1)];" + } + ] + } + }, + "dimensions": [ + { + "value": "1" + } + ], + "span": { + "line_start": 4, + "line_stop": 4, + "col_start": 11, + "col_stop": 21, + "path": "", + "content": " let d = [0i8; (1)];" + } + } + }, + "span": { + "line_start": 4, + "line_stop": 4, + "col_start": 3, + "col_stop": 21, + "path": "", + "content": " let d = [0i8; (1)];" + } + } + } + ], + "span": { + "line_start": 1, + "line_stop": 7, + "col_start": 35, + "col_stop": 2, + "path": "", + "content": "function main(a: [group; (2, 1)]) {\n...\n}" + } + }, + "span": { + "line_start": 1, + "line_stop": 7, + "col_start": 1, + "col_stop": 2, + "path": "", + "content": "function main(a: [group; (2, 1)]) {\n...\n}\n\n\n\n" + } + } + } +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/array_expansion.leo b/compiler/tests/canonicalization/array_expansion.leo new file mode 100644 index 0000000000..c83d9ce2c4 --- /dev/null +++ b/compiler/tests/canonicalization/array_expansion.leo @@ -0,0 +1,7 @@ +function main(a: [group; (2, 1)]) { + let b = [true; (6, 5, 4, 3, 2)]; + let c: [u32; (1, 2)] = [0u32; (1, 2)]; + let d = [0i8; (1)]; + // let d = [true; 0]; + // let e = [true; (0)]; +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/array_size_zero_fail.leo b/compiler/tests/canonicalization/array_size_zero_fail.leo new file mode 100644 index 0000000000..b90563dc4d --- /dev/null +++ b/compiler/tests/canonicalization/array_size_zero_fail.leo @@ -0,0 +1,3 @@ +function main() { + let a = [true; (0)]; +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/big_self_in_circuit_replacement.json b/compiler/tests/canonicalization/big_self_in_circuit_replacement.json new file mode 100644 index 0000000000..ac4384991a --- /dev/null +++ b/compiler/tests/canonicalization/big_self_in_circuit_replacement.json @@ -0,0 +1,219 @@ +{ + "name": "", + "expected_input": [], + "imports": [], + "circuits": { + "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": { + "circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", + "members": [ + { + "CircuitVariable": [ + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: u32\\\"}\"}", + { + "IntegerType": "U32" + } + ] + }, + { + "CircuitFunction": { + "annotations": [], + "identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new() -> Self {\\\"}\"}", + "input": [], + "output": { + "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" + }, + "block": { + "statements": [ + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let new: Self = Self {\\\"}\"}", + "span": { + "line_start": 5, + "line_stop": 5, + "col_start": 9, + "col_stop": 12, + "path": "", + "content": " let new: Self = Self {" + } + } + ], + "type_": { + "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" + }, + "value": { + "CircuitInit": { + "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", + "members": [ + { + "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: 1u32\\\"}\"}", + "expression": { + "Value": { + "Integer": [ + "U32", + "1", + { + "line_start": 6, + "line_stop": 6, + "col_start": 10, + "col_stop": 14, + "path": "", + "content": " x: 1u32" + } + ] + } + } + } + ], + "span": { + "line_start": 5, + "line_stop": 7, + "col_start": 21, + "col_stop": 6, + "path": "", + "content": " let new: Self = Self {\n...\n };" + } + } + }, + "span": { + "line_start": 5, + "line_stop": 7, + "col_start": 5, + "col_stop": 6, + "path": "", + "content": " let new: Self = Self {\n...\n };" + } + } + }, + { + "Return": { + "expression": { + "Identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return new\\\"}\"}" + }, + "span": { + "line_start": 9, + "line_stop": 9, + "col_start": 5, + "col_stop": 15, + "path": "", + "content": " return new" + } + } + } + ], + "span": { + "line_start": 4, + "line_stop": 10, + "col_start": 26, + "col_stop": 4, + "path": "", + "content": " function new() -> Self {\n...\n }" + } + }, + "span": { + "line_start": 4, + "line_stop": 10, + "col_start": 3, + "col_stop": 4, + "path": "", + "content": " function new() -> Self {\n...\n }\n\n\n\n" + } + } + } + ] + } + }, + "global_consts": {}, + "functions": { + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { + "annotations": [], + "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", + "input": [], + "output": { + "Tuple": [] + }, + "block": { + "statements": [ + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}", + "span": { + "line_start": 14, + "line_stop": 14, + "col_start": 7, + "col_stop": 10, + "path": "", + "content": " let foo: Foo = Foo::new();" + } + } + ], + "type_": { + "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}" + }, + "value": { + "Call": { + "function": { + "CircuitStaticFunctionAccess": { + "circuit": { + "Identifier": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}" + }, + "name": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}", + "span": { + "line_start": 14, + "line_stop": 14, + "col_start": 18, + "col_stop": 26, + "path": "", + "content": " let foo: Foo = Foo::new();" + } + } + }, + "arguments": [], + "span": { + "line_start": 14, + "line_stop": 14, + "col_start": 18, + "col_stop": 28, + "path": "", + "content": " let foo: Foo = Foo::new();" + } + } + }, + "span": { + "line_start": 14, + "line_stop": 14, + "col_start": 3, + "col_stop": 28, + "path": "", + "content": " let foo: Foo = Foo::new();" + } + } + } + ], + "span": { + "line_start": 13, + "line_stop": 15, + "col_start": 17, + "col_stop": 2, + "path": "", + "content": "function main() {\n...\n}" + } + }, + "span": { + "line_start": 13, + "line_stop": 15, + "col_start": 1, + "col_stop": 2, + "path": "", + "content": "function main() {\n...\n}" + } + } + } +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/big_self_in_circuit_replacement.leo b/compiler/tests/canonicalization/big_self_in_circuit_replacement.leo new file mode 100644 index 0000000000..4081e46cbf --- /dev/null +++ b/compiler/tests/canonicalization/big_self_in_circuit_replacement.leo @@ -0,0 +1,15 @@ +circuit Foo { + x: u32 + + function new() -> Self { + let new: Self = Self { + x: 1u32 + }; + + return new; + } +} + +function main() { + let foo: Foo = Foo::new(); +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/big_self_outside_circuit_fail.leo b/compiler/tests/canonicalization/big_self_outside_circuit_fail.leo new file mode 100644 index 0000000000..6f5100adde --- /dev/null +++ b/compiler/tests/canonicalization/big_self_outside_circuit_fail.leo @@ -0,0 +1,15 @@ +circuit Foo { + x: u32 + + function new() -> Self { + let new: Self = Self { + x: 1u32 + }; + + return new; + } +} + +function main() { + let foo: Self = Foo::new(); +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/compound_assignment.json b/compiler/tests/canonicalization/compound_assignment.json new file mode 100644 index 0000000000..49ba0bdf78 --- /dev/null +++ b/compiler/tests/canonicalization/compound_assignment.json @@ -0,0 +1,2033 @@ +{ + "name": "", + "expected_input": [], + "imports": [], + "global_consts": {}, + "circuits": { + "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": { + "circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", + "members": [ + { + "CircuitVariable": [ + "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" f: u8,\\\"}\"}", + { + "IntegerType": "U8" + } + ] + }, + { + "CircuitVariable": [ + "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y: (u8, u8),\\\"}\"}", + { + "Tuple": [ + { + "IntegerType": "U8" + }, + { + "IntegerType": "U8" + } + ] + } + ] + }, + { + "CircuitFunction": { + "annotations": [], + "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function z (mut self) -> u16 {\\\"}\"}", + "input": [ + { + "MutSelfKeyword": "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function z (mut self) -> u16 {\\\"}\"}" + } + ], + "output": { + "IntegerType": "U16" + }, + "block": { + "statements": [ + { + "Assign": { + "operation": "Assign", + "assignee": { + "identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}", + "accesses": [ + { + "Member": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}" + }, + { + "Tuple": [ + { + "value": "0" + }, + { + "line_start": 6, + "line_stop": 6, + "col_start": 5, + "col_stop": 13, + "path": "", + "content": " self.y.0 += 1u8;" + } + ] + } + ], + "span": { + "line_start": 6, + "line_stop": 6, + "col_start": 5, + "col_stop": 13, + "path": "", + "content": " self.y.0 += 1u8;" + } + }, + "value": { + "Binary": { + "left": { + "TupleAccess": { + "tuple": { + "CircuitMemberAccess": { + "circuit": { + "Identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}" + }, + "name": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}", + "span": { + "line_start": 6, + "line_stop": 6, + "col_start": 5, + "col_stop": 20, + "path": "", + "content": " self.y.0 += 1u8;" + } + } + }, + "index": { + "value": "0" + }, + "span": { + "line_start": 6, + "line_stop": 6, + "col_start": 5, + "col_stop": 20, + "path": "", + "content": " self.y.0 += 1u8;" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 6, + "line_stop": 6, + "col_start": 17, + "col_stop": 20, + "path": "", + "content": " self.y.0 += 1u8;" + } + ] + } + }, + "op": "Add", + "span": { + "line_start": 6, + "line_stop": 6, + "col_start": 5, + "col_stop": 20, + "path": "", + "content": " self.y.0 += 1u8;" + } + } + }, + "span": { + "line_start": 6, + "line_stop": 6, + "col_start": 5, + "col_stop": 20, + "path": "", + "content": " self.y.0 += 1u8;" + } + } + }, + { + "Return": { + "expression": { + "Value": { + "Integer": [ + "U16", + "1", + { + "line_start": 7, + "line_stop": 7, + "col_start": 12, + "col_stop": 16, + "path": "", + "content": " return 1u16" + } + ] + } + }, + "span": { + "line_start": 7, + "line_stop": 7, + "col_start": 5, + "col_stop": 16, + "path": "", + "content": " return 1u16" + } + } + } + ], + "span": { + "line_start": 5, + "line_stop": 8, + "col_start": 32, + "col_stop": 4, + "path": "", + "content": " function z (mut self) -> u16 {\n...\n }" + } + }, + "span": { + "line_start": 5, + "line_stop": 8, + "col_start": 3, + "col_stop": 4, + "path": "", + "content": " function z (mut self) -> u16 {\n...\n }\n" + } + } + } + ] + } + }, + "functions": { + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { + "annotations": [], + "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", + "input": [], + "output": { + "Tuple": [] + }, + "block": { + "statements": [ + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x = 10u32;\\\"}\"}", + "span": { + "line_start": 11, + "line_stop": 11, + "col_start": 7, + "col_stop": 8, + "path": "", + "content": " let x = 10u32;" + } + } + ], + "type_": { + "IntegerType": "U32" + }, + "value": { + "Value": { + "Integer": [ + "U32", + "10", + { + "line_start": 11, + "line_stop": 11, + "col_start": 11, + "col_stop": 16, + "path": "", + "content": " let x = 10u32;" + } + ] + } + }, + "span": { + "line_start": 11, + "line_stop": 11, + "col_start": 3, + "col_stop": 16, + "path": "", + "content": " let x = 10u32;" + } + } + }, + { + "Assign": { + "operation": "Assign", + "assignee": { + "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x += 20;\\\"}\"}", + "accesses": [], + "span": { + "line_start": 12, + "line_stop": 12, + "col_start": 3, + "col_stop": 4, + "path": "", + "content": " x += 20;" + } + }, + "value": { + "Binary": { + "left": { + "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x += 20;\\\"}\"}" + }, + "right": { + "Value": { + "Integer": [ + "U32", + "20", + { + "line_start": 12, + "line_stop": 12, + "col_start": 8, + "col_stop": 10, + "path": "", + "content": " x += 20;" + } + ] + } + }, + "op": "Add", + "span": { + "line_start": 12, + "line_stop": 12, + "col_start": 3, + "col_stop": 10, + "path": "", + "content": " x += 20;" + } + } + }, + "span": { + "line_start": 12, + "line_stop": 12, + "col_start": 3, + "col_stop": 10, + "path": "", + "content": " x += 20;" + } + } + }, + { + "Console": { + "function": { + "Assert": { + "Binary": { + "left": { + "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(x == 30u32);\\\"}\"}" + }, + "right": { + "Value": { + "Integer": [ + "U32", + "30", + { + "line_start": 13, + "line_stop": 13, + "col_start": 23, + "col_stop": 28, + "path": "", + "content": " console.assert(x == 30u32);" + } + ] + } + }, + "op": "Eq", + "span": { + "line_start": 13, + "line_stop": 13, + "col_start": 18, + "col_stop": 28, + "path": "", + "content": " console.assert(x == 30u32);" + } + } + } + }, + "span": { + "line_start": 13, + "line_stop": 13, + "col_start": 3, + "col_stop": 28, + "path": "", + "content": " console.assert(x == 30u32);" + } + } + }, + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y = [1u8, 2u8];\\\"}\"}", + "span": { + "line_start": 15, + "line_stop": 15, + "col_start": 7, + "col_stop": 8, + "path": "", + "content": " let y = [1u8, 2u8];" + } + } + ], + "type_": { + "Array": [ + { + "IntegerType": "U8" + }, + [ + { + "value": "2" + } + ] + ] + }, + "value": { + "ArrayInline": { + "elements": [ + { + "Expression": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 15, + "line_stop": 15, + "col_start": 12, + "col_stop": 15, + "path": "", + "content": " let y = [1u8, 2u8];" + } + ] + } + } + }, + { + "Expression": { + "Value": { + "Integer": [ + "U8", + "2", + { + "line_start": 15, + "line_stop": 15, + "col_start": 17, + "col_stop": 20, + "path": "", + "content": " let y = [1u8, 2u8];" + } + ] + } + } + } + ], + "span": { + "line_start": 15, + "line_stop": 15, + "col_start": 11, + "col_stop": 21, + "path": "", + "content": " let y = [1u8, 2u8];" + } + } + }, + "span": { + "line_start": 15, + "line_stop": 15, + "col_start": 3, + "col_stop": 21, + "path": "", + "content": " let y = [1u8, 2u8];" + } + } + }, + { + "Assign": { + "operation": "Assign", + "assignee": { + "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0] += 3u8;\\\"}\"}", + "accesses": [ + { + "ArrayIndex": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 16, + "line_stop": 16, + "col_start": 5, + "col_stop": 6, + "path": "", + "content": " y[0] += 3u8;" + } + ] + } + } + } + ], + "span": { + "line_start": 16, + "line_stop": 16, + "col_start": 3, + "col_stop": 7, + "path": "", + "content": " y[0] += 3u8;" + } + }, + "value": { + "Binary": { + "left": { + "ArrayAccess": { + "array": { + "Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0] += 3u8;\\\"}\"}" + }, + "index": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 16, + "line_stop": 16, + "col_start": 5, + "col_stop": 6, + "path": "", + "content": " y[0] += 3u8;" + } + ] + } + }, + "span": { + "line_start": 16, + "line_stop": 16, + "col_start": 3, + "col_stop": 14, + "path": "", + "content": " y[0] += 3u8;" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "3", + { + "line_start": 16, + "line_stop": 16, + "col_start": 11, + "col_stop": 14, + "path": "", + "content": " y[0] += 3u8;" + } + ] + } + }, + "op": "Add", + "span": { + "line_start": 16, + "line_stop": 16, + "col_start": 3, + "col_stop": 14, + "path": "", + "content": " y[0] += 3u8;" + } + } + }, + "span": { + "line_start": 16, + "line_stop": 16, + "col_start": 3, + "col_stop": 14, + "path": "", + "content": " y[0] += 3u8;" + } + } + }, + { + "Console": { + "function": { + "Assert": { + "Binary": { + "left": { + "ArrayAccess": { + "array": { + "Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(y[0] == 4u8);\\\"}\"}" + }, + "index": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 17, + "line_stop": 17, + "col_start": 20, + "col_stop": 21, + "path": "", + "content": " console.assert(y[0] == 4u8);" + } + ] + } + }, + "span": { + "line_start": 17, + "line_stop": 17, + "col_start": 18, + "col_stop": 22, + "path": "", + "content": " console.assert(y[0] == 4u8);" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "4", + { + "line_start": 17, + "line_stop": 17, + "col_start": 26, + "col_stop": 29, + "path": "", + "content": " console.assert(y[0] == 4u8);" + } + ] + } + }, + "op": "Eq", + "span": { + "line_start": 17, + "line_stop": 17, + "col_start": 18, + "col_stop": 29, + "path": "", + "content": " console.assert(y[0] == 4u8);" + } + } + } + }, + "span": { + "line_start": 17, + "line_stop": 17, + "col_start": 3, + "col_stop": 29, + "path": "", + "content": " console.assert(y[0] == 4u8);" + } + } + }, + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let z = (1u8, 2u8);\\\"}\"}", + "span": { + "line_start": 19, + "line_stop": 19, + "col_start": 7, + "col_stop": 8, + "path": "", + "content": " let z = (1u8, 2u8);" + } + } + ], + "type_": { + "Tuple": [ + { + "IntegerType": "U8" + }, + { + "IntegerType": "U8" + } + ] + }, + "value": { + "TupleInit": { + "elements": [ + { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 19, + "line_stop": 19, + "col_start": 12, + "col_stop": 15, + "path": "", + "content": " let z = (1u8, 2u8);" + } + ] + } + }, + { + "Value": { + "Integer": [ + "U8", + "2", + { + "line_start": 19, + "line_stop": 19, + "col_start": 17, + "col_stop": 20, + "path": "", + "content": " let z = (1u8, 2u8);" + } + ] + } + } + ], + "span": { + "line_start": 19, + "line_stop": 19, + "col_start": 11, + "col_stop": 21, + "path": "", + "content": " let z = (1u8, 2u8);" + } + } + }, + "span": { + "line_start": 19, + "line_stop": 19, + "col_start": 3, + "col_stop": 21, + "path": "", + "content": " let z = (1u8, 2u8);" + } + } + }, + { + "Assign": { + "operation": "Assign", + "assignee": { + "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z.1 += 3u8;\\\"}\"}", + "accesses": [ + { + "Tuple": [ + { + "value": "1" + }, + { + "line_start": 20, + "line_stop": 20, + "col_start": 3, + "col_stop": 6, + "path": "", + "content": " z.1 += 3u8;" + } + ] + } + ], + "span": { + "line_start": 20, + "line_stop": 20, + "col_start": 3, + "col_stop": 6, + "path": "", + "content": " z.1 += 3u8;" + } + }, + "value": { + "Binary": { + "left": { + "TupleAccess": { + "tuple": { + "Identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z.1 += 3u8;\\\"}\"}" + }, + "index": { + "value": "1" + }, + "span": { + "line_start": 20, + "line_stop": 20, + "col_start": 3, + "col_stop": 13, + "path": "", + "content": " z.1 += 3u8;" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "3", + { + "line_start": 20, + "line_stop": 20, + "col_start": 10, + "col_stop": 13, + "path": "", + "content": " z.1 += 3u8;" + } + ] + } + }, + "op": "Add", + "span": { + "line_start": 20, + "line_stop": 20, + "col_start": 3, + "col_stop": 13, + "path": "", + "content": " z.1 += 3u8;" + } + } + }, + "span": { + "line_start": 20, + "line_stop": 20, + "col_start": 3, + "col_stop": 13, + "path": "", + "content": " z.1 += 3u8;" + } + } + }, + { + "Console": { + "function": { + "Assert": { + "Binary": { + "left": { + "TupleAccess": { + "tuple": { + "Identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(z.1 == 5u8);\\\"}\"}" + }, + "index": { + "value": "1" + }, + "span": { + "line_start": 21, + "line_stop": 21, + "col_start": 18, + "col_stop": 21, + "path": "", + "content": " console.assert(z.1 == 5u8);" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "5", + { + "line_start": 21, + "line_stop": 21, + "col_start": 25, + "col_stop": 28, + "path": "", + "content": " console.assert(z.1 == 5u8);" + } + ] + } + }, + "op": "Eq", + "span": { + "line_start": 21, + "line_stop": 21, + "col_start": 18, + "col_stop": 28, + "path": "", + "content": " console.assert(z.1 == 5u8);" + } + } + } + }, + "span": { + "line_start": 21, + "line_stop": 21, + "col_start": 3, + "col_stop": 28, + "path": "", + "content": " console.assert(z.1 == 5u8);" + } + } + }, + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", + "span": { + "line_start": 23, + "line_stop": 23, + "col_start": 7, + "col_stop": 10, + "path": "", + "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" + } + } + ], + "type_": { + "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" + }, + "value": { + "CircuitInit": { + "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", + "members": [ + { + "identifier": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", + "expression": { + "Value": { + "Integer": [ + "U8", + "6", + { + "line_start": 23, + "line_stop": 23, + "col_start": 22, + "col_stop": 25, + "path": "", + "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" + } + ] + } + } + }, + { + "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", + "expression": { + "TupleInit": { + "elements": [ + { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 23, + "line_stop": 23, + "col_start": 31, + "col_stop": 34, + "path": "", + "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" + } + ] + } + }, + { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 23, + "line_stop": 23, + "col_start": 36, + "col_stop": 39, + "path": "", + "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" + } + ] + } + } + ], + "span": { + "line_start": 23, + "line_stop": 23, + "col_start": 30, + "col_stop": 40, + "path": "", + "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" + } + } + } + } + ], + "span": { + "line_start": 23, + "line_stop": 23, + "col_start": 13, + "col_stop": 42, + "path": "", + "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" + } + } + }, + "span": { + "line_start": 23, + "line_stop": 23, + "col_start": 3, + "col_stop": 42, + "path": "", + "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" + } + } + }, + { + "Assign": { + "operation": "Assign", + "assignee": { + "identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":3,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}", + "accesses": [ + { + "Member": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}" + } + ], + "span": { + "line_start": 24, + "line_stop": 24, + "col_start": 3, + "col_stop": 8, + "path": "", + "content": " foo.f += 2u8;" + } + }, + "value": { + "Binary": { + "left": { + "CircuitMemberAccess": { + "circuit": { + "Identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":3,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}" + }, + "name": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}", + "span": { + "line_start": 24, + "line_stop": 24, + "col_start": 3, + "col_stop": 15, + "path": "", + "content": " foo.f += 2u8;" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "2", + { + "line_start": 24, + "line_stop": 24, + "col_start": 12, + "col_stop": 15, + "path": "", + "content": " foo.f += 2u8;" + } + ] + } + }, + "op": "Add", + "span": { + "line_start": 24, + "line_stop": 24, + "col_start": 3, + "col_stop": 15, + "path": "", + "content": " foo.f += 2u8;" + } + } + }, + "span": { + "line_start": 24, + "line_stop": 24, + "col_start": 3, + "col_stop": 15, + "path": "", + "content": " foo.f += 2u8;" + } + } + }, + { + "Console": { + "function": { + "Assert": { + "Binary": { + "left": { + "CircuitMemberAccess": { + "circuit": { + "Identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(foo.f == 8u8);\\\"}\"}" + }, + "name": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(foo.f == 8u8);\\\"}\"}", + "span": { + "line_start": 25, + "line_stop": 25, + "col_start": 18, + "col_stop": 23, + "path": "", + "content": " console.assert(foo.f == 8u8);" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "8", + { + "line_start": 25, + "line_stop": 25, + "col_start": 27, + "col_stop": 30, + "path": "", + "content": " console.assert(foo.f == 8u8);" + } + ] + } + }, + "op": "Eq", + "span": { + "line_start": 25, + "line_stop": 25, + "col_start": 18, + "col_stop": 30, + "path": "", + "content": " console.assert(foo.f == 8u8);" + } + } + } + }, + "span": { + "line_start": 25, + "line_stop": 25, + "col_start": 3, + "col_stop": 30, + "path": "", + "content": " console.assert(foo.f == 8u8);" + } + } + }, + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":7,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let complex = 2u8;\\\"}\"}", + "span": { + "line_start": 27, + "line_stop": 27, + "col_start": 7, + "col_stop": 14, + "path": "", + "content": " let complex = 2u8;" + } + } + ], + "type_": { + "IntegerType": "U8" + }, + "value": { + "Value": { + "Integer": [ + "U8", + "2", + { + "line_start": 27, + "line_stop": 27, + "col_start": 17, + "col_stop": 20, + "path": "", + "content": " let complex = 2u8;" + } + ] + } + }, + "span": { + "line_start": 27, + "line_stop": 27, + "col_start": 3, + "col_stop": 20, + "path": "", + "content": " let complex = 2u8;" + } + } + }, + { + "Assign": { + "operation": "Assign", + "assignee": { + "identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":3,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" complex += 22u8 - 2u8+ 1u8;\\\"}\"}", + "accesses": [], + "span": { + "line_start": 28, + "line_stop": 28, + "col_start": 3, + "col_stop": 10, + "path": "", + "content": " complex += 22u8 - 2u8+ 1u8;" + } + }, + "value": { + "Binary": { + "left": { + "Identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":3,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" complex += 22u8 - 2u8+ 1u8;\\\"}\"}" + }, + "right": { + "Binary": { + "left": { + "Binary": { + "left": { + "Value": { + "Integer": [ + "U8", + "22", + { + "line_start": 28, + "line_stop": 28, + "col_start": 14, + "col_stop": 18, + "path": "", + "content": " complex += 22u8 - 2u8+ 1u8;" + } + ] + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "2", + { + "line_start": 28, + "line_stop": 28, + "col_start": 21, + "col_stop": 24, + "path": "", + "content": " complex += 22u8 - 2u8+ 1u8;" + } + ] + } + }, + "op": "Sub", + "span": { + "line_start": 28, + "line_stop": 28, + "col_start": 14, + "col_stop": 24, + "path": "", + "content": " complex += 22u8 - 2u8+ 1u8;" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 28, + "line_stop": 28, + "col_start": 26, + "col_stop": 29, + "path": "", + "content": " complex += 22u8 - 2u8+ 1u8;" + } + ] + } + }, + "op": "Add", + "span": { + "line_start": 28, + "line_stop": 28, + "col_start": 14, + "col_stop": 29, + "path": "", + "content": " complex += 22u8 - 2u8+ 1u8;" + } + } + }, + "op": "Add", + "span": { + "line_start": 28, + "line_stop": 28, + "col_start": 3, + "col_stop": 29, + "path": "", + "content": " complex += 22u8 - 2u8+ 1u8;" + } + } + }, + "span": { + "line_start": 28, + "line_stop": 28, + "col_start": 3, + "col_stop": 29, + "path": "", + "content": " complex += 22u8 - 2u8+ 1u8;" + } + } + }, + { + "Console": { + "function": { + "Assert": { + "Binary": { + "left": { + "Identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":18,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(complex == 23u8);\\\"}\"}" + }, + "right": { + "Value": { + "Integer": [ + "U8", + "23", + { + "line_start": 29, + "line_stop": 29, + "col_start": 29, + "col_stop": 33, + "path": "", + "content": " console.assert(complex == 23u8);" + } + ] + } + }, + "op": "Eq", + "span": { + "line_start": 29, + "line_stop": 29, + "col_start": 18, + "col_stop": 33, + "path": "", + "content": " console.assert(complex == 23u8);" + } + } + } + }, + "span": { + "line_start": 29, + "line_stop": 29, + "col_start": 3, + "col_stop": 33, + "path": "", + "content": " console.assert(complex == 23u8);" + } + } + }, + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let a = [[0u8; 1]; 4];\\\"}\"}", + "span": { + "line_start": 30, + "line_stop": 30, + "col_start": 7, + "col_stop": 8, + "path": "", + "content": " let a = [[0u8; 1]; 4];" + } + } + ], + "type_": { + "Array": [ + { + "Array": [ + { + "IntegerType": "U8" + }, + [ + { + "value": "1" + } + ] + ] + }, + [ + { + "value": "4" + } + ] + ] + }, + "value": { + "ArrayInit": { + "element": { + "ArrayInit": { + "element": { + "Value": { + "Integer": [ + "U8", + "0", + { + "line_start": 30, + "line_stop": 30, + "col_start": 13, + "col_stop": 16, + "path": "", + "content": " let a = [[0u8; 1]; 4];" + } + ] + } + }, + "dimensions": [ + { + "value": "1" + } + ], + "span": { + "line_start": 30, + "line_stop": 30, + "col_start": 12, + "col_stop": 20, + "path": "", + "content": " let a = [[0u8; 1]; 4];" + } + } + }, + "dimensions": [ + { + "value": "4" + } + ], + "span": { + "line_start": 30, + "line_stop": 30, + "col_start": 11, + "col_stop": 24, + "path": "", + "content": " let a = [[0u8; 1]; 4];" + } + } + }, + "span": { + "line_start": 30, + "line_stop": 30, + "col_start": 3, + "col_stop": 24, + "path": "", + "content": " let a = [[0u8; 1]; 4];" + } + } + }, + { + "Assign": { + "operation": "Assign", + "assignee": { + "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" a[2][0] += 1u8;\\\"}\"}", + "accesses": [ + { + "ArrayIndex": { + "Value": { + "Integer": [ + "U32", + "2", + { + "line_start": 31, + "line_stop": 31, + "col_start": 5, + "col_stop": 6, + "path": "", + "content": " a[2][0] += 1u8;" + } + ] + } + } + }, + { + "ArrayIndex": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 31, + "line_stop": 31, + "col_start": 8, + "col_stop": 9, + "path": "", + "content": " a[2][0] += 1u8;" + } + ] + } + } + } + ], + "span": { + "line_start": 31, + "line_stop": 31, + "col_start": 3, + "col_stop": 10, + "path": "", + "content": " a[2][0] += 1u8;" + } + }, + "value": { + "Binary": { + "left": { + "ArrayAccess": { + "array": { + "ArrayAccess": { + "array": { + "Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" a[2][0] += 1u8;\\\"}\"}" + }, + "index": { + "Value": { + "Integer": [ + "U32", + "2", + { + "line_start": 31, + "line_stop": 31, + "col_start": 5, + "col_stop": 6, + "path": "", + "content": " a[2][0] += 1u8;" + } + ] + } + }, + "span": { + "line_start": 31, + "line_stop": 31, + "col_start": 3, + "col_stop": 17, + "path": "", + "content": " a[2][0] += 1u8;" + } + } + }, + "index": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 31, + "line_stop": 31, + "col_start": 8, + "col_stop": 9, + "path": "", + "content": " a[2][0] += 1u8;" + } + ] + } + }, + "span": { + "line_start": 31, + "line_stop": 31, + "col_start": 3, + "col_stop": 17, + "path": "", + "content": " a[2][0] += 1u8;" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 31, + "line_stop": 31, + "col_start": 14, + "col_stop": 17, + "path": "", + "content": " a[2][0] += 1u8;" + } + ] + } + }, + "op": "Add", + "span": { + "line_start": 31, + "line_stop": 31, + "col_start": 3, + "col_stop": 17, + "path": "", + "content": " a[2][0] += 1u8;" + } + } + }, + "span": { + "line_start": 31, + "line_stop": 31, + "col_start": 3, + "col_stop": 17, + "path": "", + "content": " a[2][0] += 1u8;" + } + } + }, + { + "Console": { + "function": { + "Assert": { + "Binary": { + "left": { + "ArrayAccess": { + "array": { + "ArrayAccess": { + "array": { + "Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(a[2][0] == 1u8);\\\"}\"}" + }, + "index": { + "Value": { + "Integer": [ + "U32", + "2", + { + "line_start": 32, + "line_stop": 32, + "col_start": 20, + "col_stop": 21, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + ] + } + }, + "span": { + "line_start": 32, + "line_stop": 32, + "col_start": 18, + "col_stop": 22, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + } + }, + "index": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 32, + "line_stop": 32, + "col_start": 23, + "col_stop": 24, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + ] + } + }, + "span": { + "line_start": 32, + "line_stop": 32, + "col_start": 18, + "col_stop": 25, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 32, + "line_stop": 32, + "col_start": 29, + "col_stop": 32, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + ] + } + }, + "op": "Eq", + "span": { + "line_start": 32, + "line_stop": 32, + "col_start": 18, + "col_stop": 32, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + } + } + }, + "span": { + "line_start": 32, + "line_stop": 32, + "col_start": 3, + "col_stop": 32, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + } + }, + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let b = [0u8; (4, 1)];\\\"}\"}", + "span": { + "line_start": 34, + "line_stop": 34, + "col_start": 7, + "col_stop": 8, + "path": "", + "content": " let b = [0u8; (4, 1)];" + } + } + ], + "type_": { + "Array": [ + { + "Array": [ + { + "IntegerType": "U8" + }, + [ + { + "value": "1" + } + ] + ] + }, + [ + { + "value": "4" + } + ] + ] + }, + "value": { + "ArrayInit": { + "element": { + "ArrayInit": { + "element": { + "Value": { + "Integer": [ + "U8", + "0", + { + "line_start": 34, + "line_stop": 34, + "col_start": 12, + "col_stop": 15, + "path": "", + "content": " let b = [0u8; (4, 1)];" + } + ] + } + }, + "dimensions": [ + { + "value": "1" + } + ], + "span": { + "line_start": 34, + "line_stop": 34, + "col_start": 11, + "col_stop": 24, + "path": "", + "content": " let b = [0u8; (4, 1)];" + } + } + }, + "dimensions": [ + { + "value": "4" + } + ], + "span": { + "line_start": 34, + "line_stop": 34, + "col_start": 11, + "col_stop": 24, + "path": "", + "content": " let b = [0u8; (4, 1)];" + } + } + }, + "span": { + "line_start": 34, + "line_stop": 34, + "col_start": 3, + "col_stop": 24, + "path": "", + "content": " let b = [0u8; (4, 1)];" + } + } + }, + { + "Assign": { + "operation": "Assign", + "assignee": { + "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" b[2][0] += 1u8;\\\"}\"}", + "accesses": [ + { + "ArrayIndex": { + "Value": { + "Integer": [ + "U32", + "2", + { + "line_start": 35, + "line_stop": 35, + "col_start": 5, + "col_stop": 6, + "path": "", + "content": " b[2][0] += 1u8;" + } + ] + } + } + }, + { + "ArrayIndex": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 35, + "line_stop": 35, + "col_start": 8, + "col_stop": 9, + "path": "", + "content": " b[2][0] += 1u8;" + } + ] + } + } + } + ], + "span": { + "line_start": 35, + "line_stop": 35, + "col_start": 3, + "col_stop": 10, + "path": "", + "content": " b[2][0] += 1u8;" + } + }, + "value": { + "Binary": { + "left": { + "ArrayAccess": { + "array": { + "ArrayAccess": { + "array": { + "Identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" b[2][0] += 1u8;\\\"}\"}" + }, + "index": { + "Value": { + "Integer": [ + "U32", + "2", + { + "line_start": 35, + "line_stop": 35, + "col_start": 5, + "col_stop": 6, + "path": "", + "content": " b[2][0] += 1u8;" + } + ] + } + }, + "span": { + "line_start": 35, + "line_stop": 35, + "col_start": 3, + "col_stop": 17, + "path": "", + "content": " b[2][0] += 1u8;" + } + } + }, + "index": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 35, + "line_stop": 35, + "col_start": 8, + "col_stop": 9, + "path": "", + "content": " b[2][0] += 1u8;" + } + ] + } + }, + "span": { + "line_start": 35, + "line_stop": 35, + "col_start": 3, + "col_stop": 17, + "path": "", + "content": " b[2][0] += 1u8;" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 35, + "line_stop": 35, + "col_start": 14, + "col_stop": 17, + "path": "", + "content": " b[2][0] += 1u8;" + } + ] + } + }, + "op": "Add", + "span": { + "line_start": 35, + "line_stop": 35, + "col_start": 3, + "col_stop": 17, + "path": "", + "content": " b[2][0] += 1u8;" + } + } + }, + "span": { + "line_start": 35, + "line_stop": 35, + "col_start": 3, + "col_stop": 17, + "path": "", + "content": " b[2][0] += 1u8;" + } + } + }, + { + "Console": { + "function": { + "Assert": { + "Binary": { + "left": { + "ArrayAccess": { + "array": { + "ArrayAccess": { + "array": { + "Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(a[2][0] == 1u8);\\\"}\"}" + }, + "index": { + "Value": { + "Integer": [ + "U32", + "2", + { + "line_start": 36, + "line_stop": 36, + "col_start": 20, + "col_stop": 21, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + ] + } + }, + "span": { + "line_start": 36, + "line_stop": 36, + "col_start": 18, + "col_stop": 22, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + } + }, + "index": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 36, + "line_stop": 36, + "col_start": 23, + "col_stop": 24, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + ] + } + }, + "span": { + "line_start": 36, + "line_stop": 36, + "col_start": 18, + "col_stop": 25, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + } + }, + "right": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 36, + "line_stop": 36, + "col_start": 29, + "col_stop": 32, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + ] + } + }, + "op": "Eq", + "span": { + "line_start": 36, + "line_stop": 36, + "col_start": 18, + "col_stop": 32, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + } + } + }, + "span": { + "line_start": 36, + "line_stop": 36, + "col_start": 3, + "col_stop": 32, + "path": "", + "content": " console.assert(a[2][0] == 1u8);" + } + } + } + ], + "span": { + "line_start": 10, + "line_stop": 37, + "col_start": 17, + "col_stop": 2, + "path": "", + "content": "function main() {\n...\n}" + } + }, + "span": { + "line_start": 10, + "line_stop": 37, + "col_start": 1, + "col_stop": 2, + "path": "", + "content": "function main() {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + } + } + } +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/compound_assignment.leo b/compiler/tests/canonicalization/compound_assignment.leo new file mode 100644 index 0000000000..1a6f2171fe --- /dev/null +++ b/compiler/tests/canonicalization/compound_assignment.leo @@ -0,0 +1,37 @@ +circuit Foo { + f: u8, + y: (u8, u8), + + function z (mut self) -> u16 { + self.y.0 += 1u8; + return 1u16; + } +} +function main() { + let x = 10u32; + x += 20; + console.assert(x == 30u32); + + let y = [1u8, 2u8]; + y[0] += 3u8; + console.assert(y[0] == 4u8); + + let z = (1u8, 2u8); + z.1 += 3u8; + console.assert(z.1 == 5u8); + + let foo = Foo { f: 6u8, y: (1u8, 1u8) }; + foo.f += 2u8; + console.assert(foo.f == 8u8); + + let complex = 2u8; + complex += 22u8 - 2u8+ 1u8; + console.assert(complex == 23u8); + let a = [[0u8; 1]; 4]; + a[2][0] += 1u8; + console.assert(a[2][0] == 1u8); + + let b = [0u8; (4, 1)]; + b[2][0] += 1u8; + console.assert(a[2][0] == 1u8); +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/illegal_array_range_fail.leo b/compiler/tests/canonicalization/illegal_array_range_fail.leo new file mode 100644 index 0000000000..af14957712 --- /dev/null +++ b/compiler/tests/canonicalization/illegal_array_range_fail.leo @@ -0,0 +1,4 @@ +function main () { + let x = [1u32; 5]; + x[..2] += 1; +} \ No newline at end of file diff --git a/compiler/tests/canonicalization/input/array_expansion.in b/compiler/tests/canonicalization/input/array_expansion.in new file mode 100644 index 0000000000..072fb7677c --- /dev/null +++ b/compiler/tests/canonicalization/input/array_expansion.in @@ -0,0 +1,2 @@ +[main] +a: [group; (2, 1)] = [1group; (2, 1)]; \ No newline at end of file diff --git a/compiler/tests/canonicalization/mod.rs b/compiler/tests/canonicalization/mod.rs new file mode 100644 index 0000000000..f420b2370c --- /dev/null +++ b/compiler/tests/canonicalization/mod.rs @@ -0,0 +1,97 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, parse_program, parse_program_with_input}; +use leo_ast::Ast; +use leo_parser::parser; + +pub fn parse_program_ast(file_string: &str) -> Ast { + const TEST_PROGRAM_PATH: &str = ""; + let test_program_file_path = std::path::PathBuf::from(TEST_PROGRAM_PATH); + + let mut ast = Ast::new( + parser::parse(test_program_file_path.to_str().expect("unwrap fail"), &file_string) + .expect("Failed to parse file."), + ); + ast.canonicalize().expect("Failed to canonicalize program."); + + ast +} + +#[test] +fn test_big_self_in_circuit_replacement() { + // Check program is valid. + let program_string = include_str!("big_self_in_circuit_replacement.leo"); + let program = parse_program(program_string).unwrap(); + assert_satisfied(program); + + // Check we get expected ast. + let ast = parse_program_ast(program_string); + let expected_json = include_str!("big_self_in_circuit_replacement.json"); + let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); + + assert_eq!(expected_ast, ast); +} + +#[test] +fn test_big_self_outside_circuit_fail() { + // Check program is invalid. + let program_string = include_str!("big_self_outside_circuit_fail.leo"); + let program = parse_program(program_string); + assert!(program.is_err()); +} + +#[test] +fn test_array_expansion() { + let program_string = include_str!("array_expansion.leo"); + let input_string = include_str!("input/array_expansion.in"); + let program = parse_program_with_input(program_string, input_string).unwrap(); + assert_satisfied(program); + + let ast = parse_program_ast(program_string); + let expected_json = include_str!("array_expansion.json"); + let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); + + assert_eq!(expected_ast, ast); +} + +#[test] +fn test_array_size_zero_fail() { + let program_string = include_str!("array_size_zero_fail.leo"); + let program = parse_program(program_string); + assert!(program.is_err()); +} + +#[test] +fn test_compound_assignment() { + let program_string = include_str!("compound_assignment.leo"); + let program = parse_program(program_string).unwrap(); + assert_satisfied(program); + + let ast = parse_program_ast(program_string); + let expected_json = include_str!("compound_assignment.json"); + let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); + + assert_eq!(expected_ast, ast); +} + +#[test] +fn test_illegal_array_range_fail() { + // Check program is invalid. + let program_string = include_str!("illegal_array_range_fail.leo"); + let program = parse_program(program_string); + assert!(program.is_err()); +} diff --git a/compiler/otests/compiler_output/empty.out b/compiler/tests/compiler_output/empty.out similarity index 100% rename from compiler/otests/compiler_output/empty.out rename to compiler/tests/compiler_output/empty.out diff --git a/compiler/tests/mod.rs b/compiler/tests/mod.rs new file mode 100644 index 0000000000..94d18cf9d9 --- /dev/null +++ b/compiler/tests/mod.rs @@ -0,0 +1,124 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +// allow the use of EdwardsTestCompiler::parse_program_from_string for tests + +#![allow(deprecated)] + +pub mod canonicalization; +pub mod test; +pub mod type_inference; + +use leo_asg::{new_alloc_context, new_context, AsgContext}; +use leo_compiler::{ + compiler::Compiler, + errors::CompilerError, + group::targets::edwards_bls12::EdwardsGroupType, + ConstrainedValue, + OutputBytes, +}; + +use snarkvm_curves::edwards_bls12::Fq; +use snarkvm_r1cs::TestConstraintSystem; + +use std::path::PathBuf; + +pub const TEST_OUTPUT_DIRECTORY: &str = "/output/"; +const EMPTY_FILE: &str = ""; + +pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; +pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; + +//convenience function for tests, leaks memory +pub(crate) fn make_test_context() -> AsgContext<'static> { + let allocator = Box::leak(Box::new(new_alloc_context())); + new_context(allocator) +} + +fn new_compiler() -> EdwardsTestCompiler { + let program_name = "test".to_string(); + let path = PathBuf::from("/test/src/main.leo"); + let output_dir = PathBuf::from(TEST_OUTPUT_DIRECTORY); + + EdwardsTestCompiler::new(program_name, path, output_dir, make_test_context(), None) +} + +pub(crate) fn parse_program(program_string: &str) -> Result { + let mut compiler = new_compiler(); + + compiler.parse_program_from_string(program_string)?; + + Ok(compiler) +} + +pub fn parse_program_with_input( + program_string: &str, + input_string: &str, +) -> Result { + let mut compiler = new_compiler(); + let path = PathBuf::new(); + + compiler.parse_input(input_string, &path, EMPTY_FILE, &path)?; + compiler.parse_program_from_string(program_string)?; + + Ok(compiler) +} + +pub fn parse_program_with_state( + program_string: &str, + state_string: &str, +) -> Result { + let mut compiler = new_compiler(); + let path = PathBuf::new(); + + compiler.parse_input(EMPTY_FILE, &path, state_string, &path)?; + compiler.parse_program_from_string(program_string)?; + + Ok(compiler) +} + +pub fn parse_program_with_input_and_state( + program_string: &str, + input_string: &str, + state_string: &str, +) -> Result { + let mut compiler = new_compiler(); + let path = PathBuf::new(); + + compiler.parse_input(input_string, &path, state_string, &path)?; + compiler.parse_program_from_string(&program_string)?; + + Ok(compiler) +} + +pub(crate) fn get_output(program: EdwardsTestCompiler) -> OutputBytes { + // synthesize the circuit on the test constraint system + let mut cs = TestConstraintSystem::::new(); + let output = program.compile_constraints(&mut cs).unwrap(); + + // assert the constraint system is satisfied + assert!(cs.is_satisfied()); + + output.into() +} + +pub(crate) fn assert_satisfied(program: EdwardsTestCompiler) { + let empty_output_bytes = include_bytes!("compiler_output/empty.out"); + let res = get_output(program); + + // assert that the output is empty + assert_eq!(empty_output_bytes, res.bytes().as_slice()); +} diff --git a/compiler/src/test.rs b/compiler/tests/test.rs similarity index 98% rename from compiler/src/test.rs rename to compiler/tests/test.rs index 1b52a8a675..b3de34189d 100644 --- a/compiler/src/test.rs +++ b/compiler/tests/test.rs @@ -25,7 +25,7 @@ use leo_test_framework::{ use serde_yaml::Value; use snarkvm_curves::{bls12_377::Bls12_377, edwards_bls12::Fq}; -use crate::{compiler::Compiler, errors::CompilerError, targets::edwards_bls12::EdwardsGroupType, Output}; +use leo_compiler::{compiler::Compiler, errors::CompilerError, targets::edwards_bls12::EdwardsGroupType, Output}; pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; // pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; diff --git a/compiler/tests/type_inference/basic.json b/compiler/tests/type_inference/basic.json new file mode 100644 index 0000000000..3b89375e2a --- /dev/null +++ b/compiler/tests/type_inference/basic.json @@ -0,0 +1,1008 @@ +{ + "name": "", + "expected_input": [], + "imports": [], + "circuits": { + "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}": { + "circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}", + "members": [] + } + }, + "global_consts": { + "ONE": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"ONE\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const ONE = 1u8;\\\"}\"}", + "span": { + "line_start": 7, + "line_stop": 7, + "col_start": 7, + "col_stop": 10, + "path": "", + "content": "const ONE = 1u8;" + } + } + ], + "type_": { + "IntegerType": "U8" + }, + "value": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 7, + "line_stop": 7, + "col_start": 13, + "col_stop": 16, + "path": "", + "content": "const ONE = 1u8;" + } + ] + } + }, + "span": { + "line_start": 7, + "line_stop": 7, + "col_start": 1, + "col_stop": 16, + "path": "", + "content": "const ONE = 1u8;" + } + } + }, + "functions": { + "{\"name\":\"two\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function two() -> u8 {\\\"}\"}": { + "annotations": [], + "identifier": "{\"name\":\"two\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function two() -> u8 {\\\"}\"}", + "input": [], + "output": { + "IntegerType": "U8" + }, + "block": { + "statements": [ + { + "Return": { + "expression": { + "Value": { + "Integer": [ + "U8", + "2", + { + "line_start": 4, + "line_stop": 4, + "col_start": 10, + "col_stop": 13, + "path": "", + "content": " return 2u8;" + } + ] + } + }, + "span": { + "line_start": 4, + "line_stop": 4, + "col_start": 3, + "col_stop": 13, + "path": "", + "content": " return 2u8;" + } + } + } + ], + "span": { + "line_start": 3, + "line_stop": 5, + "col_start": 22, + "col_stop": 2, + "path": "", + "content": "function two() -> u8 {\n...\n}" + } + }, + "span": { + "line_start": 3, + "line_stop": 5, + "col_start": 1, + "col_stop": 2, + "path": "", + "content": "function two() -> u8 {\n...\n}" + } + }, + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { + "annotations": [], + "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", + "input": [], + "output": { + "Tuple": [] + }, + "block": { + "statements": [ + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const a = 1u8;\\\"}\"}", + "span": { + "line_start": 10, + "line_stop": 10, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const a = 1u8;" + } + } + ], + "type_": { + "IntegerType": "U8" + }, + "value": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 10, + "line_stop": 10, + "col_start": 13, + "col_stop": 16, + "path": "", + "content": " const a = 1u8;" + } + ] + } + }, + "span": { + "line_start": 10, + "line_stop": 10, + "col_start": 3, + "col_stop": 16, + "path": "", + "content": " const a = 1u8;" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const b = 1field;\\\"}\"}", + "span": { + "line_start": 11, + "line_stop": 11, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const b = 1field;" + } + } + ], + "type_": "Field", + "value": { + "Value": { + "Field": [ + "1", + { + "line_start": 11, + "line_stop": 11, + "col_start": 13, + "col_stop": 19, + "path": "", + "content": " const b = 1field;" + } + ] + } + }, + "span": { + "line_start": 11, + "line_stop": 11, + "col_start": 3, + "col_stop": 19, + "path": "", + "content": " const b = 1field;" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const c = 1group;\\\"}\"}", + "span": { + "line_start": 12, + "line_stop": 12, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const c = 1group;" + } + } + ], + "type_": "Group", + "value": { + "Value": { + "Group": { + "Single": [ + "1", + { + "line_start": 12, + "line_stop": 12, + "col_start": 13, + "col_stop": 19, + "path": "", + "content": " const c = 1group;" + } + ] + } + } + }, + "span": { + "line_start": 12, + "line_stop": 12, + "col_start": 3, + "col_stop": 19, + "path": "", + "content": " const c = 1group;" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const d = (0, 1)group;\\\"}\"}", + "span": { + "line_start": 13, + "line_stop": 13, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const d = (0, 1)group;" + } + } + ], + "type_": "Group", + "value": { + "Value": { + "Group": { + "Tuple": { + "x": { + "Number": [ + "0", + { + "line_start": 13, + "line_stop": 13, + "col_start": 14, + "col_stop": 15, + "path": "", + "content": " const d = (0, 1)group;" + } + ] + }, + "y": { + "Number": [ + "1", + { + "line_start": 13, + "line_stop": 13, + "col_start": 17, + "col_stop": 18, + "path": "", + "content": " const d = (0, 1)group;" + } + ] + }, + "span": { + "line_start": 13, + "line_stop": 13, + "col_start": 14, + "col_stop": 24, + "path": "", + "content": " const d = (0, 1)group;" + } + } + } + } + }, + "span": { + "line_start": 13, + "line_stop": 13, + "col_start": 3, + "col_stop": 24, + "path": "", + "content": " const d = (0, 1)group;" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}", + "span": { + "line_start": 14, + "line_stop": 14, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + } + } + ], + "type_": "Address", + "value": { + "Value": { + "Address": [ + "aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8", + { + "line_start": 14, + "line_stop": 14, + "col_start": 13, + "col_stop": 76, + "path": "", + "content": " const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + } + ] + } + }, + "span": { + "line_start": 14, + "line_stop": 14, + "col_start": 3, + "col_stop": 76, + "path": "", + "content": " const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const f = two();\\\"}\"}", + "span": { + "line_start": 15, + "line_stop": 15, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const f = two();" + } + } + ], + "type_": { + "IntegerType": "U8" + }, + "value": { + "Call": { + "function": { + "Identifier": "{\"name\":\"two\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const f = two();\\\"}\"}" + }, + "arguments": [], + "span": { + "line_start": 15, + "line_stop": 15, + "col_start": 13, + "col_stop": 18, + "path": "", + "content": " const f = two();" + } + } + }, + "span": { + "line_start": 15, + "line_stop": 15, + "col_start": 3, + "col_stop": 18, + "path": "", + "content": " const f = two();" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"g\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const g = [0u8; (3, 2)];\\\"}\"}", + "span": { + "line_start": 16, + "line_stop": 16, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const g = [0u8; (3, 2)];" + } + } + ], + "type_": { + "Array": [ + { + "Array": [ + { + "IntegerType": "U8" + }, + [ + { + "value": "2" + } + ] + ] + }, + [ + { + "value": "3" + } + ] + ] + }, + "value": { + "ArrayInit": { + "element": { + "ArrayInit": { + "element": { + "Value": { + "Integer": [ + "U8", + "0", + { + "line_start": 16, + "line_stop": 16, + "col_start": 14, + "col_stop": 17, + "path": "", + "content": " const g = [0u8; (3, 2)];" + } + ] + } + }, + "dimensions": [ + { + "value": "2" + } + ], + "span": { + "line_start": 16, + "line_stop": 16, + "col_start": 13, + "col_stop": 26, + "path": "", + "content": " const g = [0u8; (3, 2)];" + } + } + }, + "dimensions": [ + { + "value": "3" + } + ], + "span": { + "line_start": 16, + "line_stop": 16, + "col_start": 13, + "col_stop": 26, + "path": "", + "content": " const g = [0u8; (3, 2)];" + } + } + }, + "span": { + "line_start": 16, + "line_stop": 16, + "col_start": 3, + "col_stop": 26, + "path": "", + "content": " const g = [0u8; (3, 2)];" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"h\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const h = [[0u8; 3]; 2];\\\"}\"}", + "span": { + "line_start": 17, + "line_stop": 17, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const h = [[0u8; 3]; 2];" + } + } + ], + "type_": { + "Array": [ + { + "Array": [ + { + "IntegerType": "U8" + }, + [ + { + "value": "3" + } + ] + ] + }, + [ + { + "value": "2" + } + ] + ] + }, + "value": { + "ArrayInit": { + "element": { + "ArrayInit": { + "element": { + "Value": { + "Integer": [ + "U8", + "0", + { + "line_start": 17, + "line_stop": 17, + "col_start": 15, + "col_stop": 18, + "path": "", + "content": " const h = [[0u8; 3]; 2];" + } + ] + } + }, + "dimensions": [ + { + "value": "3" + } + ], + "span": { + "line_start": 17, + "line_stop": 17, + "col_start": 14, + "col_stop": 22, + "path": "", + "content": " const h = [[0u8; 3]; 2];" + } + } + }, + "dimensions": [ + { + "value": "2" + } + ], + "span": { + "line_start": 17, + "line_stop": 17, + "col_start": 13, + "col_stop": 26, + "path": "", + "content": " const h = [[0u8; 3]; 2];" + } + } + }, + "span": { + "line_start": 17, + "line_stop": 17, + "col_start": 3, + "col_stop": 26, + "path": "", + "content": " const h = [[0u8; 3]; 2];" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const i = [1u8, 1u8, 1u8];\\\"}\"}", + "span": { + "line_start": 18, + "line_stop": 18, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const i = [1u8, 1u8, 1u8];" + } + } + ], + "type_": { + "Array": [ + { + "IntegerType": "U8" + }, + [ + { + "value": "3" + } + ] + ] + }, + "value": { + "ArrayInline": { + "elements": [ + { + "Expression": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 18, + "line_stop": 18, + "col_start": 14, + "col_stop": 17, + "path": "", + "content": " const i = [1u8, 1u8, 1u8];" + } + ] + } + } + }, + { + "Expression": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 18, + "line_stop": 18, + "col_start": 19, + "col_stop": 22, + "path": "", + "content": " const i = [1u8, 1u8, 1u8];" + } + ] + } + } + }, + { + "Expression": { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 18, + "line_stop": 18, + "col_start": 24, + "col_stop": 27, + "path": "", + "content": " const i = [1u8, 1u8, 1u8];" + } + ] + } + } + } + ], + "span": { + "line_start": 18, + "line_stop": 18, + "col_start": 13, + "col_stop": 28, + "path": "", + "content": " const i = [1u8, 1u8, 1u8];" + } + } + }, + "span": { + "line_start": 18, + "line_stop": 18, + "col_start": 3, + "col_stop": 28, + "path": "", + "content": " const i = [1u8, 1u8, 1u8];" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const j = true;\\\"}\"}", + "span": { + "line_start": 19, + "line_stop": 19, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const j = true;" + } + } + ], + "type_": "Boolean", + "value": { + "Value": { + "Boolean": [ + "true", + { + "line_start": 19, + "line_stop": 19, + "col_start": 13, + "col_stop": 17, + "path": "", + "content": " const j = true;" + } + ] + } + }, + "span": { + "line_start": 19, + "line_stop": 19, + "col_start": 3, + "col_stop": 17, + "path": "", + "content": " const j = true;" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"k\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const k = (1u8, 1u8);\\\"}\"}", + "span": { + "line_start": 20, + "line_stop": 20, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const k = (1u8, 1u8);" + } + } + ], + "type_": { + "Tuple": [ + { + "IntegerType": "U8" + }, + { + "IntegerType": "U8" + } + ] + }, + "value": { + "TupleInit": { + "elements": [ + { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 20, + "line_stop": 20, + "col_start": 14, + "col_stop": 17, + "path": "", + "content": " const k = (1u8, 1u8);" + } + ] + } + }, + { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 20, + "line_stop": 20, + "col_start": 19, + "col_stop": 22, + "path": "", + "content": " const k = (1u8, 1u8);" + } + ] + } + } + ], + "span": { + "line_start": 20, + "line_stop": 20, + "col_start": 13, + "col_stop": 23, + "path": "", + "content": " const k = (1u8, 1u8);" + } + } + }, + "span": { + "line_start": 20, + "line_stop": 20, + "col_start": 3, + "col_stop": 23, + "path": "", + "content": " const k = (1u8, 1u8);" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"l\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const l = (1u8, 1u8, true);\\\"}\"}", + "span": { + "line_start": 21, + "line_stop": 21, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const l = (1u8, 1u8, true);" + } + } + ], + "type_": { + "Tuple": [ + { + "IntegerType": "U8" + }, + { + "IntegerType": "U8" + }, + "Boolean" + ] + }, + "value": { + "TupleInit": { + "elements": [ + { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 21, + "line_stop": 21, + "col_start": 14, + "col_stop": 17, + "path": "", + "content": " const l = (1u8, 1u8, true);" + } + ] + } + }, + { + "Value": { + "Integer": [ + "U8", + "1", + { + "line_start": 21, + "line_stop": 21, + "col_start": 19, + "col_stop": 22, + "path": "", + "content": " const l = (1u8, 1u8, true);" + } + ] + } + }, + { + "Value": { + "Boolean": [ + "true", + { + "line_start": 21, + "line_stop": 21, + "col_start": 24, + "col_stop": 28, + "path": "", + "content": " const l = (1u8, 1u8, true);" + } + ] + } + } + ], + "span": { + "line_start": 21, + "line_stop": 21, + "col_start": 13, + "col_stop": 29, + "path": "", + "content": " const l = (1u8, 1u8, true);" + } + } + }, + "span": { + "line_start": 21, + "line_stop": 21, + "col_start": 3, + "col_stop": 29, + "path": "", + "content": " const l = (1u8, 1u8, true);" + } + } + }, + { + "Definition": { + "declaration_type": "Const", + "variable_names": [ + { + "mutable": false, + "identifier": "{\"name\":\"m\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const m = Foo {};\\\"}\"}", + "span": { + "line_start": 22, + "line_stop": 22, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " const m = Foo {};" + } + } + ], + "type_": { + "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}" + }, + "value": { + "CircuitInit": { + "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const m = Foo {};\\\"}\"}", + "members": [], + "span": { + "line_start": 22, + "line_stop": 22, + "col_start": 13, + "col_stop": 19, + "path": "", + "content": " const m = Foo {};" + } + } + }, + "span": { + "line_start": 22, + "line_stop": 22, + "col_start": 3, + "col_stop": 19, + "path": "", + "content": " const m = Foo {};" + } + } + } + ], + "span": { + "line_start": 9, + "line_stop": 23, + "col_start": 17, + "col_stop": 2, + "path": "", + "content": "function main() {\n...\n}" + } + }, + "span": { + "line_start": 9, + "line_stop": 23, + "col_start": 1, + "col_stop": 2, + "path": "", + "content": "function main() {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n" + } + } + } +} diff --git a/compiler/tests/type_inference/basic.leo b/compiler/tests/type_inference/basic.leo new file mode 100644 index 0000000000..af4df0c19f --- /dev/null +++ b/compiler/tests/type_inference/basic.leo @@ -0,0 +1,23 @@ +circuit Foo {} + +function two() -> u8 { + return 2u8; +} + +const ONE = 1u8; + +function main() { + const a = 1u8; + const b = 1field; + const c = 1group; + const d = (0, 1)group; + const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; + const f = two(); + const g = [0u8; (3, 2)]; + const h = [[0u8; 3]; 2]; + const i = [1u8, 1u8, 1u8]; + const j = true; + const k = (1u8, 1u8); + const l = (1u8, 1u8, true); + const m = Foo {}; +} \ No newline at end of file diff --git a/compiler/tests/type_inference/for_loop_and_compound.json b/compiler/tests/type_inference/for_loop_and_compound.json new file mode 100644 index 0000000000..b8abddd38a --- /dev/null +++ b/compiler/tests/type_inference/for_loop_and_compound.json @@ -0,0 +1,243 @@ +{ + "name": "", + "expected_input": [], + "imports": [], + "circuits": {}, + "global_consts": {}, + "functions": { + "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { + "annotations": [], + "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", + "input": [], + "output": { + "Tuple": [] + }, + "block": { + "statements": [ + { + "Definition": { + "declaration_type": "Let", + "variable_names": [ + { + "mutable": true, + "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x = 10u16;\\\"}\"}", + "span": { + "line_start": 2, + "line_stop": 2, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " let x = 10u16;" + } + } + ], + "type_": { + "IntegerType": "U16" + }, + "value": { + "Value": { + "Integer": [ + "U16", + "10", + { + "line_start": 2, + "line_stop": 2, + "col_start": 13, + "col_stop": 18, + "path": "", + "content": " let x = 10u16;" + } + ] + } + }, + "span": { + "line_start": 2, + "line_stop": 2, + "col_start": 5, + "col_stop": 18, + "path": "", + "content": " let x = 10u16;" + } + } + }, + { + "Iteration": { + "variable": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for i in 0..3 {\\\"}\"}", + "start": { + "Value": { + "Integer": [ + "U32", + "0", + { + "line_start": 3, + "line_stop": 3, + "col_start": 14, + "col_stop": 15, + "path": "", + "content": " for i in 0..3 {" + } + ] + } + }, + "stop": { + "Value": { + "Integer": [ + "U32", + "3", + { + "line_start": 3, + "line_stop": 3, + "col_start": 17, + "col_stop": 18, + "path": "", + "content": " for i in 0..3 {" + } + ] + } + }, + "block": { + "statements": [ + { + "Assign": { + "operation": "Assign", + "assignee": { + "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x -= 1;\\\"}\"}", + "accesses": [], + "span": { + "line_start": 4, + "line_stop": 4, + "col_start": 9, + "col_stop": 10, + "path": "", + "content": " x -= 1;" + } + }, + "value": { + "Binary": { + "left": { + "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x -= 1;\\\"}\"}" + }, + "right": { + "Value": { + "Integer": [ + "U16", + "1", + { + "line_start": 4, + "line_stop": 4, + "col_start": 14, + "col_stop": 15, + "path": "", + "content": " x -= 1;" + } + ] + } + }, + "op": "Sub", + "span": { + "line_start": 4, + "line_stop": 4, + "col_start": 9, + "col_stop": 15, + "path": "", + "content": " x -= 1;" + } + } + }, + "span": { + "line_start": 4, + "line_stop": 4, + "col_start": 9, + "col_stop": 15, + "path": "", + "content": " x -= 1;" + } + } + } + ], + "span": { + "line_start": 3, + "line_stop": 5, + "col_start": 19, + "col_stop": 6, + "path": "", + "content": " for i in 0..3 {\n...\n }" + } + }, + "span": { + "line_start": 3, + "line_stop": 5, + "col_start": 5, + "col_stop": 6, + "path": "", + "content": " for i in 0..3 {\n...\n }" + } + } + }, + { + "Console": { + "function": { + "Assert": { + "Binary": { + "left": { + "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(x == 7u16);\\\"}\"}" + }, + "right": { + "Value": { + "Integer": [ + "U16", + "7", + { + "line_start": 6, + "line_stop": 6, + "col_start": 25, + "col_stop": 29, + "path": "", + "content": " console.assert(x == 7u16);" + } + ] + } + }, + "op": "Eq", + "span": { + "line_start": 6, + "line_stop": 6, + "col_start": 20, + "col_stop": 29, + "path": "", + "content": " console.assert(x == 7u16);" + } + } + } + }, + "span": { + "line_start": 6, + "line_stop": 6, + "col_start": 5, + "col_stop": 29, + "path": "", + "content": " console.assert(x == 7u16);" + } + } + } + ], + "span": { + "line_start": 1, + "line_stop": 7, + "col_start": 17, + "col_stop": 2, + "path": "", + "content": "function main() {\n...\n}" + } + }, + "span": { + "line_start": 1, + "line_stop": 7, + "col_start": 1, + "col_stop": 2, + "path": "", + "content": "function main() {\n...\n}\n\n\n\n" + } + } + } + } \ No newline at end of file diff --git a/compiler/tests/type_inference/for_loop_and_compound.leo b/compiler/tests/type_inference/for_loop_and_compound.leo new file mode 100644 index 0000000000..92c27ff24b --- /dev/null +++ b/compiler/tests/type_inference/for_loop_and_compound.leo @@ -0,0 +1,7 @@ +function main() { + let x = 10u16; + for i in 0..3 { + x -= 1; + } + console.assert(x == 7u16); +} \ No newline at end of file diff --git a/compiler/tests/type_inference/mod.rs b/compiler/tests/type_inference/mod.rs new file mode 100644 index 0000000000..30f859b099 --- /dev/null +++ b/compiler/tests/type_inference/mod.rs @@ -0,0 +1,85 @@ +// Copyright (C) 2019-2021 Aleo Systems Inc. +// This file is part of the Leo library. + +// The Leo library is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// The Leo library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with the Leo library. If not, see . + +use crate::{assert_satisfied, parse_program}; +#[allow(unused)] +use leo_asg::{new_context, Asg, AsgContext}; +use leo_ast::Ast; +use leo_compiler::TypeInferencePhase; +use leo_imports::ImportParser; +use leo_parser::parser; + +thread_local! { + static THREAD_GLOBAL_CONTEXT: AsgContext<'static> = { + let leaked = Box::leak(Box::new(leo_asg::new_alloc_context())); + leo_asg::new_context(leaked) + } +} + +pub fn thread_leaked_context() -> AsgContext<'static> { + THREAD_GLOBAL_CONTEXT.with(|f| *f) +} + +pub fn parse_program_ast(file_string: &str) -> Ast { + const TEST_PROGRAM_PATH: &str = ""; + let test_program_file_path = std::path::PathBuf::from(TEST_PROGRAM_PATH); + + let mut ast = Ast::new( + parser::parse(test_program_file_path.to_str().expect("unwrap fail"), &file_string) + .expect("Failed to parse file."), + ); + ast.canonicalize().expect("Failed to canonicalize program."); + + let program = ast.clone().into_repr(); + let asg = Asg::new(thread_leaked_context(), &program, &mut ImportParser::default()) + .expect("Failed to create ASG from AST"); + + let new_ast = TypeInferencePhase::default() + .phase_ast(&program, &asg.into_repr()) + .expect("Failed to produce type inference ast."); + + new_ast +} + +#[test] +fn test_basic() { + // Check program is valid. + let program_string = include_str!("basic.leo"); + let program = parse_program(program_string).unwrap(); + assert_satisfied(program); + + // Check we get expected ast. + let ast = parse_program_ast(program_string); + let expected_json = include_str!("basic.json"); + let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); + + assert_eq!(expected_ast, ast); +} + +#[test] +fn test_for_loop_and_compound() { + // Check program is valid. + let program_string = include_str!("for_loop_and_compound.leo"); + let program = parse_program(program_string).unwrap(); + assert_satisfied(program); + + // Check we get expected ast. + let ast = parse_program_ast(program_string); + let expected_json = include_str!("for_loop_and_compound.json"); + let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); + + assert_eq!(expected_ast, ast); +} diff --git a/tests/compiler/_field/mod.rs b/tests/compiler/_field/mod.rs deleted file mode 100644 index f5ccb6c116..0000000000 --- a/tests/compiler/_field/mod.rs +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_compiler_error, generate_main_input, parse_program}; -use leo_ast::InputValue; - -use snarkvm_curves::edwards_bls12::Fq; -use snarkvm_utilities::bytes::ToBytes; - -use num_bigint::BigUint; -use rand::{Rng, SeedableRng}; -use rand_xorshift::XorShiftRng; - -// Helper function to convert field element into decimal base 10 string -pub fn field_to_decimal_string(f: Fq) -> String { - // write field to buffer - - let mut buf = Vec::new(); - - f.write(&mut buf).unwrap(); - - // convert to big integer - - let f_bigint = BigUint::from_bytes_le(&buf); - - f_bigint.to_str_radix(10) -} - -#[test] -fn test_negate() { - use std::ops::Neg; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b = a.neg(); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - - let program_string = include_str!("negate.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_field() { - let program_string = include_str!("field.leo"); - let mut program = parse_program(program_string).unwrap(); - - assert_satisfied(program) -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let mut program = parse_program(program_string).unwrap(); - - expect_compiler_error(program) -} - -#[test] -fn test_add() { - use std::ops::Add; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - let c = a.add(&b); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - let c_string = field_to_decimal_string(c); - - let program_string = include_str!("add.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Field(c_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_sub() { - use std::ops::Sub; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - let c = a.sub(&b); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - let c_string = field_to_decimal_string(c); - - let program_string = include_str!("sub.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Field(c_string))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_div() { - use std::ops::Div; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - let c = a.div(&b); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - let c_string = field_to_decimal_string(c); - - let program_string = include_str!("div.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Field(c_string))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_mul() { - use std::ops::Mul; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - let c = a.mul(&b); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - let c_string = field_to_decimal_string(c); - - let program_string = include_str!("mul.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Field(c_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_eq() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - - // test equal - - let program_string = include_str!("eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string.clone()))), - ("b", Some(InputValue::Field(a_string.clone()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.eq(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } -} - -#[test] -fn test_console_assert_pass() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - - let a_string = field_to_decimal_string(a); - - let program_string = include_str!("console_assert.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string.clone()))), - ("b", Some(InputValue::Field(a_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } -} - -#[test] -fn test_console_assert_fail() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - - if a == b { - continue; - } - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - - let program_string = include_str!("console_assert.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } -} - -#[test] -fn test_ternary() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - - let program_string = include_str!("ternary.leo"); - let mut program = parse_program(program_string).unwrap(); - - // true -> field a - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(true))), - ("a", Some(InputValue::Field(a_string.clone()))), - ("b", Some(InputValue::Field(b_string.clone()))), - ("c", Some(InputValue::Field(a_string.clone()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - let mut program = parse_program(program_string).unwrap(); - - // false -> field b - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(false))), - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string.clone()))), - ("c", Some(InputValue::Field(b_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -// -// pub fn output_one(program: EdwardsTestCompiler) { -// let expected = include_str!("output_/register_one.out"); -// let actual = get_output(program); -// -// assert_eq!(expected, actual.program_string().as_slice()); -// } -// -// pub fn output_zero(program: EdwardsTestCompiler) { -// let expected = include_str!("output_/register_zero.out"); -// let actual = get_output(program); -// -// assert_eq!(expected, actual.program_string().as_slice()); -// } -// -// #[test] -// fn test_registers() { -// let program_bytes = include_str!("output_register.leo"); -// let one_input_bytes = include_str!("input/register_one.in"); -// let zero_input_bytes = include_str!("input/register_zero.in"); -// -// // test 1field input register => 1field output register -// let program = parse_program_with_input(program_bytes, one_input_bytes).unwrap(); -// -// output_one(program); -// -// // test 0field input register => 0field output register -// let program = parse_program_with_input(program_bytes, zero_input_bytes).unwrap(); -// -// output_zero(program); -// } diff --git a/tests/compiler/_group/mod.rs b/tests/compiler/_group/mod.rs deleted file mode 100644 index f4cf84448c..0000000000 --- a/tests/compiler/_group/mod.rs +++ /dev/null @@ -1,407 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, expect_compiler_error, expect_synthesis_error, field::field_to_decimal_string, - generate_main_input, parse_program, parse_program_with_input, -}; -use leo_ast::{GroupCoordinate, GroupTuple, GroupValue, InputValue, Span}; - -use snarkvm_curves::edwards_bls12::EdwardsAffine; - -use rand::{Rng, SeedableRng}; -use rand_xorshift::XorShiftRng; - -pub fn group_element_to_input_value(g: EdwardsAffine) -> GroupValue { - let x = field_to_decimal_string(g.x); - let y = field_to_decimal_string(g.y); - - format!("({}, {})", x, y); - - let fake_span = Span { - text: "".to_string(), - line: 0, - start: 0, - end: 0, - }; - - GroupValue::Tuple(GroupTuple { - x: GroupCoordinate::Number(x, fake_span), - y: GroupCoordinate::Number(y, fake_span), - span: fake_span, - }) -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let mut program = parse_program(program_string).unwrap(); - - expect_compiler_error(program) -} - -#[test] -fn test_one() { - let program_string = include_str!("one.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_zero() { - let program_string = include_str!("zero.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_point() { - let program_string = include_str!("point.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_x_sign_high() { - let program_string = include_str!("x_sign_high.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_x_sign_low() { - let program_string = include_str!("x_sign_low.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_x_sign_inferred() { - let program_string = include_str!("x_sign_inferred.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_y_sign_high() { - let program_string = include_str!("y_sign_high.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_y_sign_low() { - let program_string = include_str!("y_sign_low.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_y_sign_inferred() { - let program_string = include_str!("y_sign_inferred.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_both_sign_high() { - let program_string = include_str!("both_sign_high.leo"); - - let program = parse_program(program_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_both_sign_low() { - let program_string = include_str!("both_sign_low.leo"); - - let program = parse_program(program_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_both_sign_inferred() { - let program_string = include_str!("both_sign_inferred.leo"); - - let program = parse_program(program_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_point_input() { - let program_string = include_str!("point_input.leo"); - let input_bytes = include_str!("input/point.in"); - - let program = parse_program_with_input(program_string, input_bytes).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input() { - let program_string = include_str!("input.leo"); - let input_string_pass = include_str!("input/valid.in"); - let input_string_fail = include_str!("input/invalid.in"); - - let program = parse_program_with_input(program_string, input_string_pass).unwrap(); - - assert_satisfied(program); - - let program = parse_program_with_input(program_string, input_string_fail).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_negate() { - use std::ops::Neg; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b = a.neg(); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - - let program_string = include_str!("negate.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_add() { - use std::ops::Add; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - let c = a.add(&b); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - let c_element = group_element_to_input_value(c); - - let program_string = include_str!("add.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ("c", Some(InputValue::Group(c_element))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_sub() { - use std::ops::Sub; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - let c = a.sub(&b); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - let c_element = group_element_to_input_value(c); - - let program_string = include_str!("sub.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ("c", Some(InputValue::Group(c_element))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_console_assert_pass() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - - let a_element = group_element_to_input_value(a); - - let program_string = include_str!("assert_eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element.clone()))), - ("b", Some(InputValue::Group(a_element))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } -} - -#[test] -fn test_console_assert_fail() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - - if a == b { - continue; - } - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - - let program_string = include_str!("assert_eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } -} - -#[test] -fn test_eq() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - - // test equal - - let program_string = include_str!("eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element.clone()))), - ("b", Some(InputValue::Group(a_element.clone()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.eq(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } -} - -#[test] -fn test_ternary() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - - let program_string = include_str!("ternary.leo"); - let mut program = parse_program(program_string).unwrap(); - - // true -> field a - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(true))), - ("a", Some(InputValue::Group(a_element.clone()))), - ("b", Some(InputValue::Group(b_element.clone()))), - ("c", Some(InputValue::Group(a_element.clone()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - let mut program = parse_program(program_string).unwrap(); - - // false -> field b - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(false))), - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element.clone()))), - ("c", Some(InputValue::Group(b_element))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -#[test] -fn test_positive_and_negative() { - let program_string = include_str!("positive_and_negative.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} From 17b59fe96fd1e5ac33b52c73f40b6caa0cc9fd5e Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 12 May 2021 19:45:01 +0300 Subject: [PATCH 22/26] remove otests folder --- .../_otests/address/console_assert_fail.leo | 6 - .../_otests/address/console_assert_pass.leo | 6 - compiler/_otests/address/empty.leo | 3 - compiler/_otests/address/equal.leo | 3 - compiler/_otests/address/implicit_invalid.leo | 3 - compiler/_otests/address/implicit_valid.leo | 3 - compiler/_otests/address/input.leo | 5 - compiler/_otests/address/invalid_length.leo | 3 - compiler/_otests/address/invalid_prefix.leo | 3 - compiler/_otests/address/mod.rs | 139 -- compiler/_otests/address/ternary.leo | 8 - compiler/_otests/address/valid.leo | 3 - compiler/_otests/array/initializer.leo | 3 - compiler/_otests/array/initializer_fail.leo | 3 - compiler/_otests/array/initializer_input.leo | 3 - compiler/_otests/array/inline.leo | 3 - .../_otests/array/input/initializer_fail.in | 2 - compiler/_otests/array/input/inline_fail.leo | 3 - .../_otests/array/input/input_nested_3x2.in | 2 - .../array/input/input_nested_3x2_fail.in | 2 - .../_otests/array/input/input_tuple_3x2.in | 2 - .../array/input/input_tuple_3x2_fail.in | 2 - .../_otests/array/input/registers_ones.in | 2 - .../_otests/array/input/registers_zeros.in | 2 - compiler/_otests/array/input/six_zeros.in | 2 - compiler/_otests/array/input/three_ones.in | 2 - .../input/type_nested_value_nested_3x2.in | 2 - .../type_nested_value_nested_3x2_fail.in | 2 - .../input/type_nested_value_nested_4x3x2.in | 2 - .../type_nested_value_nested_4x3x2_fail.in | 2 - .../input/type_nested_value_tuple_3x2.in | 2 - .../input/type_nested_value_tuple_3x2_fail.in | 2 - .../input/type_nested_value_tuple_4x3x2.in | 2 - .../type_nested_value_tuple_4x3x2_fail.in | 2 - .../input/type_tuple_value_nested_3x2.in | 2 - .../input/type_tuple_value_nested_3x2_fail.in | 2 - .../input/type_tuple_value_nested_4x3x2.in | 2 - .../type_tuple_value_nested_4x3x2_fail.in | 2 - .../array/input/type_tuple_value_tuple_3x2.in | 2 - .../input/type_tuple_value_tuple_3x2_fail.in | 2 - .../input/type_tuple_value_tuple_4x3x2.in | 2 - .../type_tuple_value_tuple_4x3x2_fail.in | 2 - compiler/_otests/array/input_nested_3x2.leo | 3 - .../_otests/array/input_nested_3x2_fail.leo | 3 - compiler/_otests/array/input_tuple_3x2.leo | 3 - .../_otests/array/input_tuple_3x2_fail.leo | 3 - compiler/_otests/array/mod.rs | 716 ------ .../_otests/array/multi_fail_initializer.leo | 3 - compiler/_otests/array/multi_fail_inline.leo | 4 - compiler/_otests/array/multi_initializer.leo | 7 - .../_otests/array/multi_initializer_fail.leo | 3 - compiler/_otests/array/nested.leo | 4 - compiler/_otests/array/nested_3x2_value.leo | 8 - .../_otests/array/nested_3x2_value_fail.leo | 4 - .../_otests/array/output/registers_ones.out | 2 - .../_otests/array/output/registers_zeros.out | 2 - compiler/_otests/array/registers.leo | 3 - compiler/_otests/array/slice.leo | 6 - compiler/_otests/array/slice_lower.leo | 8 - compiler/_otests/array/spread.leo | 7 - compiler/_otests/array/tuple_3x2_value.leo | 8 - .../_otests/array/tuple_3x2_value_fail.leo | 4 - compiler/_otests/array/type_fail.leo | 3 - compiler/_otests/array/type_input_3x2.leo | 5 - compiler/_otests/array/type_input_4x3x2.leo | 8 - .../array/type_nested_value_nested_3x2.leo | 7 - .../type_nested_value_nested_3x2_fail.leo | 3 - .../array/type_nested_value_nested_4x3x2.leo | 10 - .../type_nested_value_nested_4x3x2_fail.leo | 3 - .../array/type_nested_value_tuple_3x2.leo | 7 - .../type_nested_value_tuple_3x2_fail.leo | 3 - .../array/type_nested_value_tuple_4x3x2.leo | 10 - .../type_nested_value_tuple_4x3x2_fail.leo | 3 - .../array/type_tuple_value_nested_3x2.leo | 7 - .../type_tuple_value_nested_3x2_fail.leo | 3 - .../array/type_tuple_value_nested_4x3x2.leo | 10 - .../type_tuple_value_nested_4x3x2_fail.leo | 3 - .../array/type_tuple_value_tuple_3x2.leo | 7 - .../array/type_tuple_value_tuple_3x2_fail.leo | 3 - .../array/type_tuple_value_tuple_4x3x2.leo | 10 - .../type_tuple_value_tuple_4x3x2_fail.leo | 3 - .../_otests/array/variable_slice_fail.leo | 7 - compiler/_otests/boolean/all.leo | 8 - compiler/_otests/boolean/assert_eq_input.leo | 3 - compiler/_otests/boolean/conditional_mut.leo | 6 - compiler/_otests/boolean/false_and_false.leo | 5 - compiler/_otests/boolean/false_or_false.leo | 5 - .../_otests/boolean/input/registers_false.in | 2 - .../_otests/boolean/input/registers_true.in | 2 - compiler/_otests/boolean/input/true_false.in | 3 - compiler/_otests/boolean/input/true_true.in | 3 - compiler/_otests/boolean/mod.rs | 196 -- compiler/_otests/boolean/not_false.leo | 3 - compiler/_otests/boolean/not_mutable.leo | 4 - compiler/_otests/boolean/not_true.leo | 3 - compiler/_otests/boolean/not_u32.leo | 3 - .../boolean/output/registers_false.out | 2 - .../_otests/boolean/output/registers_true.out | 2 - compiler/_otests/boolean/output_register.leo | 3 - compiler/_otests/boolean/true_and_false.leo | 5 - compiler/_otests/boolean/true_and_true.leo | 5 - compiler/_otests/boolean/true_and_u32.leo | 3 - compiler/_otests/boolean/true_or_false.leo | 5 - compiler/_otests/boolean/true_or_true.leo | 5 - compiler/_otests/boolean/true_or_u32.leo | 3 - .../canonicalization/array_expansion.json | 359 --- .../canonicalization/array_expansion.leo | 7 - .../canonicalization/array_size_zero_fail.leo | 3 - .../big_self_in_circuit_replacement.json | 219 -- .../big_self_in_circuit_replacement.leo | 15 - .../big_self_outside_circuit_fail.leo | 15 - .../canonicalization/compound_assignment.json | 2033 ----------------- .../canonicalization/compound_assignment.leo | 37 - .../illegal_array_range_fail.leo | 4 - .../canonicalization/input/array_expansion.in | 2 - compiler/_otests/canonicalization/mod.rs | 97 - .../_otests/circuits/const_self_variable.leo | 13 - .../circuits/const_self_variable_fail.leo | 13 - ...define_circuit_inside_circuit_function.leo | 13 - .../circuits/duplicate_name_context.leo | 13 - compiler/_otests/circuits/inline.leo | 7 - compiler/_otests/circuits/inline_fail.leo | 7 - .../_otests/circuits/inline_member_fail.leo | 8 - .../_otests/circuits/inline_member_pass.leo | 13 - .../_otests/circuits/inline_undefined.leo | 3 - compiler/_otests/circuits/member_function.leo | 13 - .../_otests/circuits/member_function_fail.leo | 10 - .../circuits/member_function_invalid.leo | 10 - .../circuits/member_function_nested.leo | 18 - .../circuits/member_static_function.leo | 11 - .../member_static_function_invalid.leo | 9 - .../member_static_function_nested.leo | 15 - .../member_static_function_undefined.leo | 9 - compiler/_otests/circuits/member_variable.leo | 9 - .../circuits/member_variable_and_function.leo | 15 - .../_otests/circuits/member_variable_fail.leo | 9 - compiler/_otests/circuits/mod.rs | 318 --- .../_otests/circuits/mut_function_fail.leo | 11 - .../circuits/mut_self_function_fail.leo | 15 - .../mut_self_static_function_fail.leo | 15 - .../_otests/circuits/mut_self_variable.leo | 22 - .../circuits/mut_self_variable_branch.leo | 32 - .../mut_self_variable_conditional.leo | 15 - .../circuits/mut_self_variable_fail.leo | 13 - .../circuits/mut_static_function_fail.leo | 9 - compiler/_otests/circuits/mut_variable.leo | 17 - .../_otests/circuits/mut_variable_fail.leo | 9 - .../mutable_call_immutable_context.leo | 25 - compiler/_otests/circuits/pedersen_mock.leo | 27 - compiler/_otests/circuits/self_circuit.leo | 9 - compiler/_otests/circuits/self_fail.leo | 3 - compiler/_otests/circuits/self_member.leo | 14 - .../_otests/circuits/self_member_invalid.leo | 12 - .../circuits/self_member_undefined.leo | 10 - compiler/_otests/compiler/main.leo | 3 - compiler/_otests/compiler/mod.rs | 47 - compiler/_otests/console/assert.leo | 3 - .../_otests/console/conditional_assert.leo | 7 - compiler/_otests/console/debug.leo | 3 - compiler/_otests/console/error.leo | 3 - compiler/_otests/console/input/input_equal.in | 3 - .../_otests/console/input/input_unequal.in | 3 - compiler/_otests/console/log.leo | 3 - compiler/_otests/console/log_conditional.leo | 6 - compiler/_otests/console/log_fail.leo | 3 - compiler/_otests/console/log_input.leo | 3 - compiler/_otests/console/log_parameter.leo | 3 - .../console/log_parameter_fail_empty.leo | 3 - .../console/log_parameter_fail_none.leo | 3 - .../console/log_parameter_fail_unknown.leo | 3 - .../_otests/console/log_parameter_many.leo | 3 - compiler/_otests/console/mod.rs | 169 -- .../_otests/core/core_circuit_invalid.leo | 3 - .../_otests/core/core_circuit_star_fail.leo | 3 - .../_otests/core/core_package_invalid.leo | 3 - .../core/core_unstable_package_invalid.leo | 3 - compiler/_otests/core/mod.rs | 59 - compiler/_otests/core/packages/mod.rs | 17 - .../blake2s/arguments_length_fail.leo | 9 - .../unstable/blake2s/arguments_type_fail.leo | 10 - .../unstable/blake2s/blake2s_input.leo | 5 - .../unstable/blake2s/blake2s_random.leo | 7 - .../unstable/blake2s/inputs/valid_input.in | 6 - .../core/packages/unstable/blake2s/mod.rs | 106 - .../unstable/blake2s/outputs/valid_output.out | 2 - .../_otests/core/packages/unstable/mod.rs | 17 - compiler/_otests/core/unstable_blake2s.leo | 10 - compiler/_otests/definition/mod.rs | 38 - compiler/_otests/definition/out_of_order.leo | 6 - .../definition/out_of_order_with_import.leo | 7 - compiler/_otests/field/add.leo | 3 - compiler/_otests/field/console_assert.leo | 3 - compiler/_otests/field/div.leo | 3 - compiler/_otests/field/eq.leo | 3 - compiler/_otests/field/field.leo | 4 - compiler/_otests/field/input/register_one.in | 2 - compiler/_otests/field/input/register_zero.in | 2 - compiler/_otests/field/mod.rs | 369 --- compiler/_otests/field/mul.leo | 3 - compiler/_otests/field/negate.leo | 3 - .../field/no_space_between_literal.leo | 3 - .../_otests/field/output/register_one.out | 2 - .../_otests/field/output/register_zero.out | 2 - compiler/_otests/field/output_register.leo | 3 - compiler/_otests/field/sub.leo | 3 - compiler/_otests/field/ternary.leo | 5 - compiler/_otests/function/array_input.leo | 6 - .../function/array_params_direct_call.leo | 9 - .../_otests/function/conditional_return.leo | 7 - .../_otests/function/duplicate_definition.leo | 7 - compiler/_otests/function/empty.leo | 5 - .../function/input/conditional_return.in | 5 - compiler/_otests/function/input/newlines.in | 7 - compiler/_otests/function/input/registers.in | 3 - compiler/_otests/function/iteration.leo | 13 - .../_otests/function/iteration_repeated.leo | 15 - compiler/_otests/function/mod.rs | 221 -- .../_otests/function/multiple_returns.leo | 10 - .../function/multiple_returns_fail.leo | 7 - .../multiple_returns_fail_conditional.leo | 9 - .../function/multiple_returns_main.leo | 3 - compiler/_otests/function/newlines.leo | 9 - .../function/output/conditional_return.out | 2 - compiler/_otests/function/output/newlines.out | 3 - .../_otests/function/output/registers.out | 3 - compiler/_otests/function/repeated.leo | 9 - compiler/_otests/function/return.leo | 7 - .../function/return_array_nested_fail.leo | 7 - .../function/return_array_nested_pass.leo | 12 - .../function/return_array_tuple_fail.leo | 7 - .../function/return_array_tuple_pass.leo | 12 - compiler/_otests/function/return_tuple.leo | 11 - .../function/return_tuple_conditional.leo | 15 - compiler/_otests/function/scope_fail.leo | 8 - compiler/_otests/function/undefined.leo | 3 - compiler/_otests/function/value_unchanged.leo | 19 - .../global_consts/global_const_types.leo | 46 - compiler/_otests/global_consts/mod.rs | 36 - .../global_consts/modify_global_const.leo | 6 - compiler/_otests/group/add.leo | 3 - compiler/_otests/group/assert_eq.leo | 3 - compiler/_otests/group/both_sign_high.leo | 3 - compiler/_otests/group/both_sign_inferred.leo | 3 - compiler/_otests/group/both_sign_low.leo | 3 - compiler/_otests/group/eq.leo | 3 - compiler/_otests/group/input.leo | 3 - compiler/_otests/group/input/invalid.in | 3 - compiler/_otests/group/input/point.in | 2 - compiler/_otests/group/input/valid.in | 3 - compiler/_otests/group/mod.rs | 407 ---- compiler/_otests/group/negate.leo | 3 - .../group/no_space_between_literal.leo | 3 - compiler/_otests/group/one.leo | 3 - compiler/_otests/group/point.leo | 3 - compiler/_otests/group/point_input.leo | 3 - .../_otests/group/positive_and_negative.leo | 10 - compiler/_otests/group/sub.leo | 3 - compiler/_otests/group/ternary.leo | 5 - compiler/_otests/group/x_and_y.leo | 3 - compiler/_otests/group/x_sign_high.leo | 3 - compiler/_otests/group/x_sign_inferred.leo | 3 - compiler/_otests/group/x_sign_low.leo | 3 - compiler/_otests/group/y_sign_high.leo | 3 - compiler/_otests/group/y_sign_inferred.leo | 3 - compiler/_otests/group/y_sign_low.leo | 3 - compiler/_otests/group/zero.leo | 3 - compiler/_otests/import/alias.leo | 7 - compiler/_otests/import/basic.leo | 5 - .../_otests/import/imports/bar/.gitignore | 1 - compiler/_otests/import/imports/bar/Leo.toml | 3 - .../import/imports/bar/src/bat/bat.leo | 3 - .../_otests/import/imports/bar/src/baz.leo | 9 - .../_otests/import/imports/bar/src/lib.leo | 3 - .../_otests/import/imports/car/.gitignore | 1 - compiler/_otests/import/imports/car/Leo.toml | 3 - .../_otests/import/imports/car/src/lib.leo | 3 - compiler/_otests/import/many_import.leo | 27 - compiler/_otests/import/many_import_star.leo | 20 - compiler/_otests/import/mod.rs | 154 -- compiler/_otests/import/multiple.leo | 10 - compiler/_otests/import/names.leo | 5 - compiler/_otests/import/names_a_dash.leo | 3 - compiler/_otests/import/names_dash_a.leo | 3 - compiler/_otests/import/names_dollar.leo | 3 - compiler/_otests/import/names_underscore.leo | 3 - compiler/_otests/import/src/a-9.leo | 1 - compiler/_otests/import/src/a0-f.leo | 1 - compiler/_otests/import/src/hello-world.leo | 1 - compiler/_otests/import/src/test-import.leo | 8 - compiler/_otests/import/star.leo | 7 - compiler/_otests/import/star_fail.leo | 4 - compiler/_otests/input_files/mod.rs | 21 - .../input_files/program_input/input/main.in | 2 - .../program_input/input/main_array.in | 2 - .../program_input/input/main_array_fail.in | 2 - .../program_input/input/main_fail_name.in | 2 - .../program_input/input/main_fail_type.in | 2 - .../program_input/input/main_field.in | 3 - .../program_input/input/main_group.in | 4 - .../input/main_multi_dimension_array.in | 2 - .../program_input/input/main_multiple.in | 3 - .../program_input/input/main_tuple_fail.in | 2 - .../input_files/program_input/main.leo | 3 - .../input_files/program_input/main_array.leo | 4 - .../program_input/main_array_fail.leo | 3 - .../input_files/program_input/main_field.leo | 5 - .../input_files/program_input/main_group.leo | 6 - .../main_multi_dimension_array.leo | 9 - .../program_input/main_multiple.leo | 4 - .../program_input/main_tuple_fail.leo | 3 - .../_otests/input_files/program_input/mod.rs | 125 - .../access.leo | 11 - .../input/basic.in | 5 - .../input/basic.state | 12 - .../input/token_withdraw.in | 6 - .../input/token_withdraw.state | 24 - .../program_input_and_program_state/mod.rs | 44 - .../program_input_constants/input/main.in | 2 - .../input/main_array.in | 2 - .../input/main_array_fail.in | 2 - .../input/main_double_declaration_fail.in | 5 - .../input/main_fail_name.in | 2 - .../input/main_fail_type.in | 2 - .../input/main_field.in | 3 - .../input/main_group.in | 4 - .../input/main_multi_dimension_array.in | 2 - .../input/main_multiple.in | 3 - .../input/main_not_const_input_fail.in | 2 - .../input/main_tuple_fail.in | 2 - .../input/main_type_mismatch.in | 2 - .../program_input_constants/main.leo | 3 - .../program_input_constants/main_array.leo | 4 - .../main_array_fail.leo | 3 - .../program_input_constants/main_field.leo | 5 - .../program_input_constants/main_group.leo | 6 - .../main_multi_dimension_array.leo | 9 - .../program_input_constants/main_multiple.leo | 4 - .../main_tuple_fail.leo | 3 - .../program_input_constants/mod.rs | 145 -- .../program_registers/input/array.in | 2 - .../program_registers/input/main.in | 4 - .../input_files/program_registers/mod.rs | 53 - .../output/registers_array.out | 2 - .../output/registers_pass.out | 2 - .../program_registers/registers_array.leo | 3 - .../program_registers/registers_fail.leo | 3 - .../program_registers/registers_pass.leo | 3 - .../input_files/program_state/access_all.leo | 8 - .../program_state/access_state.leo | 3 - .../program_state/input/basic.state | 10 - .../program_state/input/section_invalid.state | 4 - .../input/section_undefined.state | 4 - .../program_state/input/token_withdraw.state | 24 - .../program_state/input/visibility_fail.state | 1 - .../_otests/input_files/program_state/mod.rs | 78 - compiler/_otests/integers/i128/add.leo | 3 - .../_otests/integers/i128/console_assert.leo | 3 - compiler/_otests/integers/i128/div.leo | 3 - compiler/_otests/integers/i128/eq.leo | 3 - compiler/_otests/integers/i128/ge.leo | 3 - compiler/_otests/integers/i128/gt.leo | 3 - compiler/_otests/integers/i128/input.leo | 3 - compiler/_otests/integers/i128/le.leo | 3 - compiler/_otests/integers/i128/lt.leo | 3 - compiler/_otests/integers/i128/max.leo | 3 - compiler/_otests/integers/i128/max_fail.leo | 3 - compiler/_otests/integers/i128/min.leo | 3 - compiler/_otests/integers/i128/min_fail.leo | 3 - compiler/_otests/integers/i128/mod.rs | 142 -- compiler/_otests/integers/i128/mul.leo | 3 - compiler/_otests/integers/i128/ne.leo | 3 - compiler/_otests/integers/i128/negate.leo | 3 - compiler/_otests/integers/i128/negate_min.leo | 4 - .../_otests/integers/i128/negate_zero.leo | 5 - .../i128/no_space_between_literal.leo | 3 - compiler/_otests/integers/i128/pow.leo | 3 - compiler/_otests/integers/i128/sub.leo | 3 - compiler/_otests/integers/i128/ternary.leo | 5 - compiler/_otests/integers/i16/add.leo | 3 - .../_otests/integers/i16/console_assert.leo | 3 - compiler/_otests/integers/i16/div.leo | 3 - compiler/_otests/integers/i16/eq.leo | 3 - compiler/_otests/integers/i16/ge.leo | 3 - compiler/_otests/integers/i16/gt.leo | 3 - compiler/_otests/integers/i16/input.leo | 3 - compiler/_otests/integers/i16/le.leo | 3 - compiler/_otests/integers/i16/lt.leo | 3 - compiler/_otests/integers/i16/max.leo | 3 - compiler/_otests/integers/i16/max_fail.leo | 3 - compiler/_otests/integers/i16/min.leo | 3 - compiler/_otests/integers/i16/min_fail.leo | 3 - compiler/_otests/integers/i16/mod.rs | 141 -- compiler/_otests/integers/i16/mul.leo | 3 - compiler/_otests/integers/i16/ne.leo | 3 - compiler/_otests/integers/i16/negate.leo | 3 - compiler/_otests/integers/i16/negate_min.leo | 4 - compiler/_otests/integers/i16/negate_zero.leo | 5 - .../integers/i16/no_space_between_literal.leo | 3 - compiler/_otests/integers/i16/pow.leo | 3 - compiler/_otests/integers/i16/sub.leo | 3 - compiler/_otests/integers/i16/ternary.leo | 5 - compiler/_otests/integers/i32/add.leo | 3 - .../_otests/integers/i32/console_assert.leo | 3 - compiler/_otests/integers/i32/div.leo | 3 - compiler/_otests/integers/i32/eq.leo | 3 - compiler/_otests/integers/i32/ge.leo | 3 - compiler/_otests/integers/i32/gt.leo | 3 - compiler/_otests/integers/i32/input.leo | 3 - compiler/_otests/integers/i32/le.leo | 3 - compiler/_otests/integers/i32/lt.leo | 3 - compiler/_otests/integers/i32/max.leo | 3 - compiler/_otests/integers/i32/max_fail.leo | 3 - compiler/_otests/integers/i32/min.leo | 3 - compiler/_otests/integers/i32/min_fail.leo | 3 - compiler/_otests/integers/i32/mod.rs | 141 -- compiler/_otests/integers/i32/mul.leo | 3 - compiler/_otests/integers/i32/ne.leo | 3 - compiler/_otests/integers/i32/negate.leo | 3 - compiler/_otests/integers/i32/negate_min.leo | 4 - compiler/_otests/integers/i32/negate_zero.leo | 5 - .../integers/i32/no_space_between_literal.leo | 3 - compiler/_otests/integers/i32/pow.leo | 3 - compiler/_otests/integers/i32/sub.leo | 3 - compiler/_otests/integers/i32/ternary.leo | 5 - compiler/_otests/integers/i64/add.leo | 3 - .../_otests/integers/i64/console_assert.leo | 3 - compiler/_otests/integers/i64/div.leo | 3 - compiler/_otests/integers/i64/eq.leo | 3 - compiler/_otests/integers/i64/ge.leo | 3 - compiler/_otests/integers/i64/gt.leo | 3 - compiler/_otests/integers/i64/input.leo | 3 - compiler/_otests/integers/i64/le.leo | 3 - compiler/_otests/integers/i64/lt.leo | 3 - compiler/_otests/integers/i64/max.leo | 3 - compiler/_otests/integers/i64/max_fail.leo | 3 - compiler/_otests/integers/i64/min.leo | 3 - compiler/_otests/integers/i64/min_fail.leo | 3 - compiler/_otests/integers/i64/mod.rs | 142 -- compiler/_otests/integers/i64/mul.leo | 3 - compiler/_otests/integers/i64/ne.leo | 3 - compiler/_otests/integers/i64/negate.leo | 3 - compiler/_otests/integers/i64/negate_min.leo | 4 - compiler/_otests/integers/i64/negate_zero.leo | 5 - .../integers/i64/no_space_between_literal.leo | 3 - compiler/_otests/integers/i64/pow.leo | 3 - compiler/_otests/integers/i64/sub.leo | 3 - compiler/_otests/integers/i64/ternary.leo | 5 - compiler/_otests/integers/i8/add.leo | 3 - .../_otests/integers/i8/console_assert.leo | 3 - compiler/_otests/integers/i8/div.leo | 3 - compiler/_otests/integers/i8/eq.leo | 3 - compiler/_otests/integers/i8/ge.leo | 3 - compiler/_otests/integers/i8/gt.leo | 3 - compiler/_otests/integers/i8/input.leo | 3 - compiler/_otests/integers/i8/le.leo | 3 - compiler/_otests/integers/i8/lt.leo | 3 - compiler/_otests/integers/i8/max.leo | 3 - compiler/_otests/integers/i8/max_fail.leo | 3 - compiler/_otests/integers/i8/min.leo | 3 - compiler/_otests/integers/i8/min_fail.leo | 3 - compiler/_otests/integers/i8/mod.rs | 141 -- compiler/_otests/integers/i8/mul.leo | 3 - compiler/_otests/integers/i8/ne.leo | 3 - compiler/_otests/integers/i8/negate.leo | 3 - compiler/_otests/integers/i8/negate_min.leo | 4 - compiler/_otests/integers/i8/negate_zero.leo | 5 - .../integers/i8/no_space_between_literal.leo | 3 - compiler/_otests/integers/i8/pow.leo | 3 - compiler/_otests/integers/i8/sub.leo | 3 - compiler/_otests/integers/i8/ternary.leo | 5 - compiler/_otests/integers/int_macro.rs | 538 ----- compiler/_otests/integers/integer_tester.rs | 83 - compiler/_otests/integers/mod.rs | 37 - compiler/_otests/integers/u128/add.leo | 3 - .../_otests/integers/u128/console_assert.leo | 3 - compiler/_otests/integers/u128/div.leo | 3 - compiler/_otests/integers/u128/eq.leo | 3 - compiler/_otests/integers/u128/ge.leo | 3 - compiler/_otests/integers/u128/gt.leo | 3 - compiler/_otests/integers/u128/input.leo | 3 - compiler/_otests/integers/u128/le.leo | 3 - compiler/_otests/integers/u128/lt.leo | 3 - compiler/_otests/integers/u128/max.leo | 3 - compiler/_otests/integers/u128/max_fail.leo | 3 - compiler/_otests/integers/u128/min.leo | 3 - compiler/_otests/integers/u128/min_fail.leo | 3 - compiler/_otests/integers/u128/mod.rs | 126 - compiler/_otests/integers/u128/mul.leo | 3 - compiler/_otests/integers/u128/ne.leo | 3 - .../u128/no_space_between_literal.leo | 3 - compiler/_otests/integers/u128/pow.leo | 3 - compiler/_otests/integers/u128/sub.leo | 3 - compiler/_otests/integers/u128/ternary.leo | 5 - compiler/_otests/integers/u16/add.leo | 3 - .../_otests/integers/u16/console_assert.leo | 3 - compiler/_otests/integers/u16/div.leo | 3 - compiler/_otests/integers/u16/eq.leo | 3 - compiler/_otests/integers/u16/ge.leo | 3 - compiler/_otests/integers/u16/gt.leo | 3 - compiler/_otests/integers/u16/input.leo | 3 - compiler/_otests/integers/u16/le.leo | 3 - compiler/_otests/integers/u16/lt.leo | 3 - compiler/_otests/integers/u16/max.leo | 3 - compiler/_otests/integers/u16/max_fail.leo | 3 - compiler/_otests/integers/u16/min.leo | 3 - compiler/_otests/integers/u16/min_fail.leo | 3 - compiler/_otests/integers/u16/mod.rs | 126 - compiler/_otests/integers/u16/mul.leo | 3 - compiler/_otests/integers/u16/ne.leo | 3 - .../integers/u16/no_space_between_literal.leo | 3 - compiler/_otests/integers/u16/pow.leo | 3 - compiler/_otests/integers/u16/sub.leo | 3 - compiler/_otests/integers/u16/ternary.leo | 5 - compiler/_otests/integers/u32/add.leo | 3 - .../_otests/integers/u32/console_assert.leo | 3 - compiler/_otests/integers/u32/div.leo | 3 - compiler/_otests/integers/u32/eq.leo | 3 - compiler/_otests/integers/u32/ge.leo | 3 - compiler/_otests/integers/u32/gt.leo | 3 - compiler/_otests/integers/u32/input.leo | 3 - compiler/_otests/integers/u32/le.leo | 3 - compiler/_otests/integers/u32/lt.leo | 3 - compiler/_otests/integers/u32/max.leo | 3 - compiler/_otests/integers/u32/max_fail.leo | 3 - compiler/_otests/integers/u32/min.leo | 3 - compiler/_otests/integers/u32/min_fail.leo | 3 - compiler/_otests/integers/u32/mod.rs | 126 - compiler/_otests/integers/u32/mul.leo | 3 - compiler/_otests/integers/u32/ne.leo | 3 - .../integers/u32/no_space_between_literal.leo | 3 - compiler/_otests/integers/u32/pow.leo | 3 - compiler/_otests/integers/u32/sub.leo | 3 - compiler/_otests/integers/u32/ternary.leo | 5 - compiler/_otests/integers/u64/add.leo | 3 - .../_otests/integers/u64/console_assert.leo | 3 - compiler/_otests/integers/u64/div.leo | 3 - compiler/_otests/integers/u64/eq.leo | 3 - compiler/_otests/integers/u64/ge.leo | 3 - compiler/_otests/integers/u64/gt.leo | 3 - compiler/_otests/integers/u64/input.leo | 3 - compiler/_otests/integers/u64/le.leo | 3 - compiler/_otests/integers/u64/lt.leo | 3 - compiler/_otests/integers/u64/max.leo | 3 - compiler/_otests/integers/u64/max_fail.leo | 3 - compiler/_otests/integers/u64/min.leo | 3 - compiler/_otests/integers/u64/min_fail.leo | 3 - compiler/_otests/integers/u64/mod.rs | 126 - compiler/_otests/integers/u64/mul.leo | 3 - compiler/_otests/integers/u64/ne.leo | 3 - .../integers/u64/no_space_between_literal.leo | 3 - compiler/_otests/integers/u64/pow.leo | 3 - compiler/_otests/integers/u64/sub.leo | 3 - compiler/_otests/integers/u64/ternary.leo | 5 - compiler/_otests/integers/u8/add.leo | 3 - .../_otests/integers/u8/console_assert.leo | 3 - compiler/_otests/integers/u8/div.leo | 3 - compiler/_otests/integers/u8/eq.leo | 3 - compiler/_otests/integers/u8/ge.leo | 3 - compiler/_otests/integers/u8/gt.leo | 3 - compiler/_otests/integers/u8/input.leo | 3 - compiler/_otests/integers/u8/le.leo | 3 - compiler/_otests/integers/u8/lt.leo | 3 - compiler/_otests/integers/u8/max.leo | 3 - compiler/_otests/integers/u8/max_fail.leo | 3 - compiler/_otests/integers/u8/min.leo | 3 - compiler/_otests/integers/u8/min_fail.leo | 3 - compiler/_otests/integers/u8/mod.rs | 126 - compiler/_otests/integers/u8/mul.leo | 3 - compiler/_otests/integers/u8/ne.leo | 3 - .../integers/u8/no_space_between_literal.leo | 3 - compiler/_otests/integers/u8/pow.leo | 3 - compiler/_otests/integers/u8/sub.leo | 3 - compiler/_otests/integers/u8/ternary.leo | 5 - compiler/_otests/integers/uint_macro.rs | 476 ---- compiler/_otests/mod.rs | 200 -- compiler/_otests/mutability/array.leo | 5 - compiler/_otests/mutability/array_mut.leo | 7 - .../_otests/mutability/array_splice_mut.leo | 9 - .../_otests/mutability/array_tuple_mut.leo | 8 - compiler/_otests/mutability/circuit.leo | 9 - .../mutability/circuit_function_mut.leo | 9 - compiler/_otests/mutability/circuit_mut.leo | 11 - .../circuit_static_function_mut.leo | 9 - .../mutability/circuit_variable_mut.leo | 11 - compiler/_otests/mutability/cond_mut.leo | 7 - compiler/_otests/mutability/const.leo | 5 - .../_otests/mutability/function_input.leo | 4 - .../_otests/mutability/function_input_mut.leo | 6 - compiler/_otests/mutability/let.leo | 5 - compiler/_otests/mutability/let_mut.leo | 7 - .../_otests/mutability/let_mut_nested.leo | 5 - compiler/_otests/mutability/mod.rs | 157 -- compiler/_otests/mutability/swap.leo | 20 - compiler/_otests/statements/block.leo | 9 - .../_otests/statements/conditional/assert.leo | 7 - .../_otests/statements/conditional/chain.leo | 13 - .../statements/conditional/cond_switch.leo | 9 - .../statements/conditional/for_loop.leo | 13 - .../conditional/input/cond_switch.in | 5 - .../conditional/input/registers_one.in | 2 - .../conditional/input/registers_zero.in | 2 - .../_otests/statements/conditional/mod.rs | 236 -- .../conditional/multiple_returns.leo | 7 - .../_otests/statements/conditional/mutate.leo | 15 - .../_otests/statements/conditional/nested.leo | 12 - .../conditional/output/cond_switch.out | 2 - .../conditional/output/registers_one.out | 2 - .../conditional/output/registers_zero.out | 2 - .../_otests/statements/iteration_basic.leo | 8 - .../_otests/statements/iteration_input.in | 2 - .../_otests/statements/iteration_input.leo | 5 - .../statements/iteration_type_fail.leo | 9 - .../_otests/statements/iteration_variable.leo | 7 - compiler/_otests/statements/mod.rs | 107 - .../_otests/statements/num_returns_fail.leo | 3 - compiler/_otests/statements/ternary_basic.leo | 5 - .../ternary_non_const_conditional_fail.leo | 4 - .../syntax/compare_mismatched_types.leo | 3 - .../syntax/identifiers/address_fail.leo | 3 - .../syntax/identifiers/console_fail.leo | 3 - .../_otests/syntax/identifiers/field_fail.leo | 3 - .../_otests/syntax/identifiers/group_fail.leo | 3 - .../_otests/syntax/identifiers/i8_fail.leo | 3 - .../_otests/syntax/identifiers/input_fail.leo | 3 - compiler/_otests/syntax/identifiers/mod.rs | 97 - .../syntax/identifiers/self_keyword_fail.leo | 3 - .../syntax/identifiers/self_type_fail.leo | 3 - .../_otests/syntax/identifiers/true_fail.leo | 3 - .../_otests/syntax/identifiers/u8_fail.leo | 3 - compiler/_otests/syntax/input_semicolon.leo | 2 - compiler/_otests/syntax/mod.rs | 62 - compiler/_otests/syntax/semicolon.leo | 3 - compiler/_otests/syntax/undefined.leo | 3 - compiler/_otests/tuples/access.leo | 6 - compiler/_otests/tuples/basic.leo | 3 - compiler/_otests/tuples/function.leo | 10 - compiler/_otests/tuples/function_multiple.leo | 10 - compiler/_otests/tuples/function_typed.leo | 10 - compiler/_otests/tuples/input.leo | 3 - compiler/_otests/tuples/inputs/input.in | 2 - compiler/_otests/tuples/mod.rs | 122 - compiler/_otests/tuples/multiple.leo | 6 - compiler/_otests/tuples/multiple_typed.leo | 6 - compiler/_otests/tuples/nested.leo | 4 - compiler/_otests/tuples/nested_access.leo | 8 - compiler/_otests/tuples/nested_typed.leo | 4 - compiler/_otests/tuples/typed.leo | 3 - compiler/_otests/type_inference/basic.json | 1008 -------- compiler/_otests/type_inference/basic.leo | 23 - .../type_inference/for_loop_and_compound.json | 243 -- .../type_inference/for_loop_and_compound.leo | 7 - compiler/_otests/type_inference/mod.rs | 85 - 652 files changed, 13940 deletions(-) delete mode 100644 compiler/_otests/address/console_assert_fail.leo delete mode 100644 compiler/_otests/address/console_assert_pass.leo delete mode 100644 compiler/_otests/address/empty.leo delete mode 100644 compiler/_otests/address/equal.leo delete mode 100644 compiler/_otests/address/implicit_invalid.leo delete mode 100644 compiler/_otests/address/implicit_valid.leo delete mode 100644 compiler/_otests/address/input.leo delete mode 100644 compiler/_otests/address/invalid_length.leo delete mode 100644 compiler/_otests/address/invalid_prefix.leo delete mode 100644 compiler/_otests/address/mod.rs delete mode 100644 compiler/_otests/address/ternary.leo delete mode 100644 compiler/_otests/address/valid.leo delete mode 100644 compiler/_otests/array/initializer.leo delete mode 100644 compiler/_otests/array/initializer_fail.leo delete mode 100644 compiler/_otests/array/initializer_input.leo delete mode 100644 compiler/_otests/array/inline.leo delete mode 100644 compiler/_otests/array/input/initializer_fail.in delete mode 100644 compiler/_otests/array/input/inline_fail.leo delete mode 100644 compiler/_otests/array/input/input_nested_3x2.in delete mode 100644 compiler/_otests/array/input/input_nested_3x2_fail.in delete mode 100644 compiler/_otests/array/input/input_tuple_3x2.in delete mode 100644 compiler/_otests/array/input/input_tuple_3x2_fail.in delete mode 100644 compiler/_otests/array/input/registers_ones.in delete mode 100644 compiler/_otests/array/input/registers_zeros.in delete mode 100644 compiler/_otests/array/input/six_zeros.in delete mode 100644 compiler/_otests/array/input/three_ones.in delete mode 100644 compiler/_otests/array/input/type_nested_value_nested_3x2.in delete mode 100644 compiler/_otests/array/input/type_nested_value_nested_3x2_fail.in delete mode 100644 compiler/_otests/array/input/type_nested_value_nested_4x3x2.in delete mode 100644 compiler/_otests/array/input/type_nested_value_nested_4x3x2_fail.in delete mode 100644 compiler/_otests/array/input/type_nested_value_tuple_3x2.in delete mode 100644 compiler/_otests/array/input/type_nested_value_tuple_3x2_fail.in delete mode 100644 compiler/_otests/array/input/type_nested_value_tuple_4x3x2.in delete mode 100644 compiler/_otests/array/input/type_nested_value_tuple_4x3x2_fail.in delete mode 100644 compiler/_otests/array/input/type_tuple_value_nested_3x2.in delete mode 100644 compiler/_otests/array/input/type_tuple_value_nested_3x2_fail.in delete mode 100644 compiler/_otests/array/input/type_tuple_value_nested_4x3x2.in delete mode 100644 compiler/_otests/array/input/type_tuple_value_nested_4x3x2_fail.in delete mode 100644 compiler/_otests/array/input/type_tuple_value_tuple_3x2.in delete mode 100644 compiler/_otests/array/input/type_tuple_value_tuple_3x2_fail.in delete mode 100644 compiler/_otests/array/input/type_tuple_value_tuple_4x3x2.in delete mode 100644 compiler/_otests/array/input/type_tuple_value_tuple_4x3x2_fail.in delete mode 100644 compiler/_otests/array/input_nested_3x2.leo delete mode 100644 compiler/_otests/array/input_nested_3x2_fail.leo delete mode 100644 compiler/_otests/array/input_tuple_3x2.leo delete mode 100644 compiler/_otests/array/input_tuple_3x2_fail.leo delete mode 100644 compiler/_otests/array/mod.rs delete mode 100644 compiler/_otests/array/multi_fail_initializer.leo delete mode 100644 compiler/_otests/array/multi_fail_inline.leo delete mode 100644 compiler/_otests/array/multi_initializer.leo delete mode 100644 compiler/_otests/array/multi_initializer_fail.leo delete mode 100644 compiler/_otests/array/nested.leo delete mode 100644 compiler/_otests/array/nested_3x2_value.leo delete mode 100644 compiler/_otests/array/nested_3x2_value_fail.leo delete mode 100644 compiler/_otests/array/output/registers_ones.out delete mode 100644 compiler/_otests/array/output/registers_zeros.out delete mode 100644 compiler/_otests/array/registers.leo delete mode 100644 compiler/_otests/array/slice.leo delete mode 100644 compiler/_otests/array/slice_lower.leo delete mode 100644 compiler/_otests/array/spread.leo delete mode 100644 compiler/_otests/array/tuple_3x2_value.leo delete mode 100644 compiler/_otests/array/tuple_3x2_value_fail.leo delete mode 100644 compiler/_otests/array/type_fail.leo delete mode 100644 compiler/_otests/array/type_input_3x2.leo delete mode 100644 compiler/_otests/array/type_input_4x3x2.leo delete mode 100644 compiler/_otests/array/type_nested_value_nested_3x2.leo delete mode 100644 compiler/_otests/array/type_nested_value_nested_3x2_fail.leo delete mode 100644 compiler/_otests/array/type_nested_value_nested_4x3x2.leo delete mode 100644 compiler/_otests/array/type_nested_value_nested_4x3x2_fail.leo delete mode 100644 compiler/_otests/array/type_nested_value_tuple_3x2.leo delete mode 100644 compiler/_otests/array/type_nested_value_tuple_3x2_fail.leo delete mode 100644 compiler/_otests/array/type_nested_value_tuple_4x3x2.leo delete mode 100644 compiler/_otests/array/type_nested_value_tuple_4x3x2_fail.leo delete mode 100644 compiler/_otests/array/type_tuple_value_nested_3x2.leo delete mode 100644 compiler/_otests/array/type_tuple_value_nested_3x2_fail.leo delete mode 100644 compiler/_otests/array/type_tuple_value_nested_4x3x2.leo delete mode 100644 compiler/_otests/array/type_tuple_value_nested_4x3x2_fail.leo delete mode 100644 compiler/_otests/array/type_tuple_value_tuple_3x2.leo delete mode 100644 compiler/_otests/array/type_tuple_value_tuple_3x2_fail.leo delete mode 100644 compiler/_otests/array/type_tuple_value_tuple_4x3x2.leo delete mode 100644 compiler/_otests/array/type_tuple_value_tuple_4x3x2_fail.leo delete mode 100644 compiler/_otests/array/variable_slice_fail.leo delete mode 100644 compiler/_otests/boolean/all.leo delete mode 100644 compiler/_otests/boolean/assert_eq_input.leo delete mode 100644 compiler/_otests/boolean/conditional_mut.leo delete mode 100644 compiler/_otests/boolean/false_and_false.leo delete mode 100644 compiler/_otests/boolean/false_or_false.leo delete mode 100644 compiler/_otests/boolean/input/registers_false.in delete mode 100644 compiler/_otests/boolean/input/registers_true.in delete mode 100644 compiler/_otests/boolean/input/true_false.in delete mode 100644 compiler/_otests/boolean/input/true_true.in delete mode 100644 compiler/_otests/boolean/mod.rs delete mode 100644 compiler/_otests/boolean/not_false.leo delete mode 100644 compiler/_otests/boolean/not_mutable.leo delete mode 100644 compiler/_otests/boolean/not_true.leo delete mode 100644 compiler/_otests/boolean/not_u32.leo delete mode 100644 compiler/_otests/boolean/output/registers_false.out delete mode 100644 compiler/_otests/boolean/output/registers_true.out delete mode 100644 compiler/_otests/boolean/output_register.leo delete mode 100644 compiler/_otests/boolean/true_and_false.leo delete mode 100644 compiler/_otests/boolean/true_and_true.leo delete mode 100644 compiler/_otests/boolean/true_and_u32.leo delete mode 100644 compiler/_otests/boolean/true_or_false.leo delete mode 100644 compiler/_otests/boolean/true_or_true.leo delete mode 100644 compiler/_otests/boolean/true_or_u32.leo delete mode 100644 compiler/_otests/canonicalization/array_expansion.json delete mode 100644 compiler/_otests/canonicalization/array_expansion.leo delete mode 100644 compiler/_otests/canonicalization/array_size_zero_fail.leo delete mode 100644 compiler/_otests/canonicalization/big_self_in_circuit_replacement.json delete mode 100644 compiler/_otests/canonicalization/big_self_in_circuit_replacement.leo delete mode 100644 compiler/_otests/canonicalization/big_self_outside_circuit_fail.leo delete mode 100644 compiler/_otests/canonicalization/compound_assignment.json delete mode 100644 compiler/_otests/canonicalization/compound_assignment.leo delete mode 100644 compiler/_otests/canonicalization/illegal_array_range_fail.leo delete mode 100644 compiler/_otests/canonicalization/input/array_expansion.in delete mode 100644 compiler/_otests/canonicalization/mod.rs delete mode 100644 compiler/_otests/circuits/const_self_variable.leo delete mode 100644 compiler/_otests/circuits/const_self_variable_fail.leo delete mode 100644 compiler/_otests/circuits/define_circuit_inside_circuit_function.leo delete mode 100644 compiler/_otests/circuits/duplicate_name_context.leo delete mode 100644 compiler/_otests/circuits/inline.leo delete mode 100644 compiler/_otests/circuits/inline_fail.leo delete mode 100644 compiler/_otests/circuits/inline_member_fail.leo delete mode 100644 compiler/_otests/circuits/inline_member_pass.leo delete mode 100644 compiler/_otests/circuits/inline_undefined.leo delete mode 100644 compiler/_otests/circuits/member_function.leo delete mode 100644 compiler/_otests/circuits/member_function_fail.leo delete mode 100644 compiler/_otests/circuits/member_function_invalid.leo delete mode 100644 compiler/_otests/circuits/member_function_nested.leo delete mode 100644 compiler/_otests/circuits/member_static_function.leo delete mode 100644 compiler/_otests/circuits/member_static_function_invalid.leo delete mode 100644 compiler/_otests/circuits/member_static_function_nested.leo delete mode 100644 compiler/_otests/circuits/member_static_function_undefined.leo delete mode 100644 compiler/_otests/circuits/member_variable.leo delete mode 100644 compiler/_otests/circuits/member_variable_and_function.leo delete mode 100644 compiler/_otests/circuits/member_variable_fail.leo delete mode 100644 compiler/_otests/circuits/mod.rs delete mode 100644 compiler/_otests/circuits/mut_function_fail.leo delete mode 100644 compiler/_otests/circuits/mut_self_function_fail.leo delete mode 100644 compiler/_otests/circuits/mut_self_static_function_fail.leo delete mode 100644 compiler/_otests/circuits/mut_self_variable.leo delete mode 100644 compiler/_otests/circuits/mut_self_variable_branch.leo delete mode 100644 compiler/_otests/circuits/mut_self_variable_conditional.leo delete mode 100644 compiler/_otests/circuits/mut_self_variable_fail.leo delete mode 100644 compiler/_otests/circuits/mut_static_function_fail.leo delete mode 100644 compiler/_otests/circuits/mut_variable.leo delete mode 100644 compiler/_otests/circuits/mut_variable_fail.leo delete mode 100644 compiler/_otests/circuits/mutable_call_immutable_context.leo delete mode 100644 compiler/_otests/circuits/pedersen_mock.leo delete mode 100644 compiler/_otests/circuits/self_circuit.leo delete mode 100644 compiler/_otests/circuits/self_fail.leo delete mode 100644 compiler/_otests/circuits/self_member.leo delete mode 100644 compiler/_otests/circuits/self_member_invalid.leo delete mode 100644 compiler/_otests/circuits/self_member_undefined.leo delete mode 100644 compiler/_otests/compiler/main.leo delete mode 100644 compiler/_otests/compiler/mod.rs delete mode 100644 compiler/_otests/console/assert.leo delete mode 100644 compiler/_otests/console/conditional_assert.leo delete mode 100644 compiler/_otests/console/debug.leo delete mode 100644 compiler/_otests/console/error.leo delete mode 100644 compiler/_otests/console/input/input_equal.in delete mode 100644 compiler/_otests/console/input/input_unequal.in delete mode 100644 compiler/_otests/console/log.leo delete mode 100644 compiler/_otests/console/log_conditional.leo delete mode 100644 compiler/_otests/console/log_fail.leo delete mode 100644 compiler/_otests/console/log_input.leo delete mode 100644 compiler/_otests/console/log_parameter.leo delete mode 100644 compiler/_otests/console/log_parameter_fail_empty.leo delete mode 100644 compiler/_otests/console/log_parameter_fail_none.leo delete mode 100644 compiler/_otests/console/log_parameter_fail_unknown.leo delete mode 100644 compiler/_otests/console/log_parameter_many.leo delete mode 100644 compiler/_otests/console/mod.rs delete mode 100644 compiler/_otests/core/core_circuit_invalid.leo delete mode 100644 compiler/_otests/core/core_circuit_star_fail.leo delete mode 100644 compiler/_otests/core/core_package_invalid.leo delete mode 100644 compiler/_otests/core/core_unstable_package_invalid.leo delete mode 100644 compiler/_otests/core/mod.rs delete mode 100644 compiler/_otests/core/packages/mod.rs delete mode 100644 compiler/_otests/core/packages/unstable/blake2s/arguments_length_fail.leo delete mode 100644 compiler/_otests/core/packages/unstable/blake2s/arguments_type_fail.leo delete mode 100644 compiler/_otests/core/packages/unstable/blake2s/blake2s_input.leo delete mode 100644 compiler/_otests/core/packages/unstable/blake2s/blake2s_random.leo delete mode 100644 compiler/_otests/core/packages/unstable/blake2s/inputs/valid_input.in delete mode 100644 compiler/_otests/core/packages/unstable/blake2s/mod.rs delete mode 100644 compiler/_otests/core/packages/unstable/blake2s/outputs/valid_output.out delete mode 100644 compiler/_otests/core/packages/unstable/mod.rs delete mode 100644 compiler/_otests/core/unstable_blake2s.leo delete mode 100644 compiler/_otests/definition/mod.rs delete mode 100644 compiler/_otests/definition/out_of_order.leo delete mode 100644 compiler/_otests/definition/out_of_order_with_import.leo delete mode 100644 compiler/_otests/field/add.leo delete mode 100644 compiler/_otests/field/console_assert.leo delete mode 100644 compiler/_otests/field/div.leo delete mode 100644 compiler/_otests/field/eq.leo delete mode 100644 compiler/_otests/field/field.leo delete mode 100644 compiler/_otests/field/input/register_one.in delete mode 100644 compiler/_otests/field/input/register_zero.in delete mode 100644 compiler/_otests/field/mod.rs delete mode 100644 compiler/_otests/field/mul.leo delete mode 100644 compiler/_otests/field/negate.leo delete mode 100644 compiler/_otests/field/no_space_between_literal.leo delete mode 100644 compiler/_otests/field/output/register_one.out delete mode 100644 compiler/_otests/field/output/register_zero.out delete mode 100644 compiler/_otests/field/output_register.leo delete mode 100644 compiler/_otests/field/sub.leo delete mode 100644 compiler/_otests/field/ternary.leo delete mode 100644 compiler/_otests/function/array_input.leo delete mode 100644 compiler/_otests/function/array_params_direct_call.leo delete mode 100644 compiler/_otests/function/conditional_return.leo delete mode 100644 compiler/_otests/function/duplicate_definition.leo delete mode 100644 compiler/_otests/function/empty.leo delete mode 100644 compiler/_otests/function/input/conditional_return.in delete mode 100644 compiler/_otests/function/input/newlines.in delete mode 100644 compiler/_otests/function/input/registers.in delete mode 100644 compiler/_otests/function/iteration.leo delete mode 100644 compiler/_otests/function/iteration_repeated.leo delete mode 100644 compiler/_otests/function/mod.rs delete mode 100644 compiler/_otests/function/multiple_returns.leo delete mode 100644 compiler/_otests/function/multiple_returns_fail.leo delete mode 100644 compiler/_otests/function/multiple_returns_fail_conditional.leo delete mode 100644 compiler/_otests/function/multiple_returns_main.leo delete mode 100644 compiler/_otests/function/newlines.leo delete mode 100644 compiler/_otests/function/output/conditional_return.out delete mode 100644 compiler/_otests/function/output/newlines.out delete mode 100644 compiler/_otests/function/output/registers.out delete mode 100644 compiler/_otests/function/repeated.leo delete mode 100644 compiler/_otests/function/return.leo delete mode 100644 compiler/_otests/function/return_array_nested_fail.leo delete mode 100644 compiler/_otests/function/return_array_nested_pass.leo delete mode 100644 compiler/_otests/function/return_array_tuple_fail.leo delete mode 100644 compiler/_otests/function/return_array_tuple_pass.leo delete mode 100644 compiler/_otests/function/return_tuple.leo delete mode 100644 compiler/_otests/function/return_tuple_conditional.leo delete mode 100644 compiler/_otests/function/scope_fail.leo delete mode 100644 compiler/_otests/function/undefined.leo delete mode 100644 compiler/_otests/function/value_unchanged.leo delete mode 100644 compiler/_otests/global_consts/global_const_types.leo delete mode 100644 compiler/_otests/global_consts/mod.rs delete mode 100644 compiler/_otests/global_consts/modify_global_const.leo delete mode 100644 compiler/_otests/group/add.leo delete mode 100644 compiler/_otests/group/assert_eq.leo delete mode 100644 compiler/_otests/group/both_sign_high.leo delete mode 100644 compiler/_otests/group/both_sign_inferred.leo delete mode 100644 compiler/_otests/group/both_sign_low.leo delete mode 100644 compiler/_otests/group/eq.leo delete mode 100644 compiler/_otests/group/input.leo delete mode 100644 compiler/_otests/group/input/invalid.in delete mode 100644 compiler/_otests/group/input/point.in delete mode 100644 compiler/_otests/group/input/valid.in delete mode 100644 compiler/_otests/group/mod.rs delete mode 100644 compiler/_otests/group/negate.leo delete mode 100644 compiler/_otests/group/no_space_between_literal.leo delete mode 100644 compiler/_otests/group/one.leo delete mode 100644 compiler/_otests/group/point.leo delete mode 100644 compiler/_otests/group/point_input.leo delete mode 100644 compiler/_otests/group/positive_and_negative.leo delete mode 100644 compiler/_otests/group/sub.leo delete mode 100644 compiler/_otests/group/ternary.leo delete mode 100644 compiler/_otests/group/x_and_y.leo delete mode 100644 compiler/_otests/group/x_sign_high.leo delete mode 100644 compiler/_otests/group/x_sign_inferred.leo delete mode 100644 compiler/_otests/group/x_sign_low.leo delete mode 100644 compiler/_otests/group/y_sign_high.leo delete mode 100644 compiler/_otests/group/y_sign_inferred.leo delete mode 100644 compiler/_otests/group/y_sign_low.leo delete mode 100644 compiler/_otests/group/zero.leo delete mode 100644 compiler/_otests/import/alias.leo delete mode 100644 compiler/_otests/import/basic.leo delete mode 100755 compiler/_otests/import/imports/bar/.gitignore delete mode 100755 compiler/_otests/import/imports/bar/Leo.toml delete mode 100755 compiler/_otests/import/imports/bar/src/bat/bat.leo delete mode 100755 compiler/_otests/import/imports/bar/src/baz.leo delete mode 100755 compiler/_otests/import/imports/bar/src/lib.leo delete mode 100755 compiler/_otests/import/imports/car/.gitignore delete mode 100755 compiler/_otests/import/imports/car/Leo.toml delete mode 100755 compiler/_otests/import/imports/car/src/lib.leo delete mode 100644 compiler/_otests/import/many_import.leo delete mode 100644 compiler/_otests/import/many_import_star.leo delete mode 100644 compiler/_otests/import/mod.rs delete mode 100644 compiler/_otests/import/multiple.leo delete mode 100644 compiler/_otests/import/names.leo delete mode 100644 compiler/_otests/import/names_a_dash.leo delete mode 100644 compiler/_otests/import/names_dash_a.leo delete mode 100644 compiler/_otests/import/names_dollar.leo delete mode 100644 compiler/_otests/import/names_underscore.leo delete mode 100644 compiler/_otests/import/src/a-9.leo delete mode 100644 compiler/_otests/import/src/a0-f.leo delete mode 100644 compiler/_otests/import/src/hello-world.leo delete mode 100644 compiler/_otests/import/src/test-import.leo delete mode 100644 compiler/_otests/import/star.leo delete mode 100644 compiler/_otests/import/star_fail.leo delete mode 100644 compiler/_otests/input_files/mod.rs delete mode 100644 compiler/_otests/input_files/program_input/input/main.in delete mode 100644 compiler/_otests/input_files/program_input/input/main_array.in delete mode 100644 compiler/_otests/input_files/program_input/input/main_array_fail.in delete mode 100644 compiler/_otests/input_files/program_input/input/main_fail_name.in delete mode 100644 compiler/_otests/input_files/program_input/input/main_fail_type.in delete mode 100644 compiler/_otests/input_files/program_input/input/main_field.in delete mode 100644 compiler/_otests/input_files/program_input/input/main_group.in delete mode 100644 compiler/_otests/input_files/program_input/input/main_multi_dimension_array.in delete mode 100644 compiler/_otests/input_files/program_input/input/main_multiple.in delete mode 100644 compiler/_otests/input_files/program_input/input/main_tuple_fail.in delete mode 100644 compiler/_otests/input_files/program_input/main.leo delete mode 100644 compiler/_otests/input_files/program_input/main_array.leo delete mode 100644 compiler/_otests/input_files/program_input/main_array_fail.leo delete mode 100644 compiler/_otests/input_files/program_input/main_field.leo delete mode 100644 compiler/_otests/input_files/program_input/main_group.leo delete mode 100644 compiler/_otests/input_files/program_input/main_multi_dimension_array.leo delete mode 100644 compiler/_otests/input_files/program_input/main_multiple.leo delete mode 100644 compiler/_otests/input_files/program_input/main_tuple_fail.leo delete mode 100644 compiler/_otests/input_files/program_input/mod.rs delete mode 100644 compiler/_otests/input_files/program_input_and_program_state/access.leo delete mode 100644 compiler/_otests/input_files/program_input_and_program_state/input/basic.in delete mode 100644 compiler/_otests/input_files/program_input_and_program_state/input/basic.state delete mode 100644 compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.in delete mode 100644 compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.state delete mode 100644 compiler/_otests/input_files/program_input_and_program_state/mod.rs delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_array.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_array_fail.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_double_declaration_fail.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_fail_name.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_fail_type.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_field.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_group.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_multi_dimension_array.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_multiple.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_not_const_input_fail.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_tuple_fail.in delete mode 100644 compiler/_otests/input_files/program_input_constants/input/main_type_mismatch.in delete mode 100644 compiler/_otests/input_files/program_input_constants/main.leo delete mode 100644 compiler/_otests/input_files/program_input_constants/main_array.leo delete mode 100644 compiler/_otests/input_files/program_input_constants/main_array_fail.leo delete mode 100644 compiler/_otests/input_files/program_input_constants/main_field.leo delete mode 100644 compiler/_otests/input_files/program_input_constants/main_group.leo delete mode 100644 compiler/_otests/input_files/program_input_constants/main_multi_dimension_array.leo delete mode 100644 compiler/_otests/input_files/program_input_constants/main_multiple.leo delete mode 100644 compiler/_otests/input_files/program_input_constants/main_tuple_fail.leo delete mode 100644 compiler/_otests/input_files/program_input_constants/mod.rs delete mode 100644 compiler/_otests/input_files/program_registers/input/array.in delete mode 100644 compiler/_otests/input_files/program_registers/input/main.in delete mode 100644 compiler/_otests/input_files/program_registers/mod.rs delete mode 100644 compiler/_otests/input_files/program_registers/output/registers_array.out delete mode 100644 compiler/_otests/input_files/program_registers/output/registers_pass.out delete mode 100644 compiler/_otests/input_files/program_registers/registers_array.leo delete mode 100644 compiler/_otests/input_files/program_registers/registers_fail.leo delete mode 100644 compiler/_otests/input_files/program_registers/registers_pass.leo delete mode 100644 compiler/_otests/input_files/program_state/access_all.leo delete mode 100644 compiler/_otests/input_files/program_state/access_state.leo delete mode 100644 compiler/_otests/input_files/program_state/input/basic.state delete mode 100644 compiler/_otests/input_files/program_state/input/section_invalid.state delete mode 100644 compiler/_otests/input_files/program_state/input/section_undefined.state delete mode 100644 compiler/_otests/input_files/program_state/input/token_withdraw.state delete mode 100644 compiler/_otests/input_files/program_state/input/visibility_fail.state delete mode 100644 compiler/_otests/input_files/program_state/mod.rs delete mode 100644 compiler/_otests/integers/i128/add.leo delete mode 100644 compiler/_otests/integers/i128/console_assert.leo delete mode 100644 compiler/_otests/integers/i128/div.leo delete mode 100644 compiler/_otests/integers/i128/eq.leo delete mode 100644 compiler/_otests/integers/i128/ge.leo delete mode 100644 compiler/_otests/integers/i128/gt.leo delete mode 100644 compiler/_otests/integers/i128/input.leo delete mode 100644 compiler/_otests/integers/i128/le.leo delete mode 100644 compiler/_otests/integers/i128/lt.leo delete mode 100644 compiler/_otests/integers/i128/max.leo delete mode 100644 compiler/_otests/integers/i128/max_fail.leo delete mode 100644 compiler/_otests/integers/i128/min.leo delete mode 100644 compiler/_otests/integers/i128/min_fail.leo delete mode 100644 compiler/_otests/integers/i128/mod.rs delete mode 100644 compiler/_otests/integers/i128/mul.leo delete mode 100644 compiler/_otests/integers/i128/ne.leo delete mode 100644 compiler/_otests/integers/i128/negate.leo delete mode 100644 compiler/_otests/integers/i128/negate_min.leo delete mode 100644 compiler/_otests/integers/i128/negate_zero.leo delete mode 100644 compiler/_otests/integers/i128/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/i128/pow.leo delete mode 100644 compiler/_otests/integers/i128/sub.leo delete mode 100644 compiler/_otests/integers/i128/ternary.leo delete mode 100644 compiler/_otests/integers/i16/add.leo delete mode 100644 compiler/_otests/integers/i16/console_assert.leo delete mode 100644 compiler/_otests/integers/i16/div.leo delete mode 100644 compiler/_otests/integers/i16/eq.leo delete mode 100644 compiler/_otests/integers/i16/ge.leo delete mode 100644 compiler/_otests/integers/i16/gt.leo delete mode 100644 compiler/_otests/integers/i16/input.leo delete mode 100644 compiler/_otests/integers/i16/le.leo delete mode 100644 compiler/_otests/integers/i16/lt.leo delete mode 100644 compiler/_otests/integers/i16/max.leo delete mode 100644 compiler/_otests/integers/i16/max_fail.leo delete mode 100644 compiler/_otests/integers/i16/min.leo delete mode 100644 compiler/_otests/integers/i16/min_fail.leo delete mode 100644 compiler/_otests/integers/i16/mod.rs delete mode 100644 compiler/_otests/integers/i16/mul.leo delete mode 100644 compiler/_otests/integers/i16/ne.leo delete mode 100644 compiler/_otests/integers/i16/negate.leo delete mode 100644 compiler/_otests/integers/i16/negate_min.leo delete mode 100644 compiler/_otests/integers/i16/negate_zero.leo delete mode 100644 compiler/_otests/integers/i16/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/i16/pow.leo delete mode 100644 compiler/_otests/integers/i16/sub.leo delete mode 100644 compiler/_otests/integers/i16/ternary.leo delete mode 100644 compiler/_otests/integers/i32/add.leo delete mode 100644 compiler/_otests/integers/i32/console_assert.leo delete mode 100644 compiler/_otests/integers/i32/div.leo delete mode 100644 compiler/_otests/integers/i32/eq.leo delete mode 100644 compiler/_otests/integers/i32/ge.leo delete mode 100644 compiler/_otests/integers/i32/gt.leo delete mode 100644 compiler/_otests/integers/i32/input.leo delete mode 100644 compiler/_otests/integers/i32/le.leo delete mode 100644 compiler/_otests/integers/i32/lt.leo delete mode 100644 compiler/_otests/integers/i32/max.leo delete mode 100644 compiler/_otests/integers/i32/max_fail.leo delete mode 100644 compiler/_otests/integers/i32/min.leo delete mode 100644 compiler/_otests/integers/i32/min_fail.leo delete mode 100644 compiler/_otests/integers/i32/mod.rs delete mode 100644 compiler/_otests/integers/i32/mul.leo delete mode 100644 compiler/_otests/integers/i32/ne.leo delete mode 100644 compiler/_otests/integers/i32/negate.leo delete mode 100644 compiler/_otests/integers/i32/negate_min.leo delete mode 100644 compiler/_otests/integers/i32/negate_zero.leo delete mode 100644 compiler/_otests/integers/i32/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/i32/pow.leo delete mode 100644 compiler/_otests/integers/i32/sub.leo delete mode 100644 compiler/_otests/integers/i32/ternary.leo delete mode 100644 compiler/_otests/integers/i64/add.leo delete mode 100644 compiler/_otests/integers/i64/console_assert.leo delete mode 100644 compiler/_otests/integers/i64/div.leo delete mode 100644 compiler/_otests/integers/i64/eq.leo delete mode 100644 compiler/_otests/integers/i64/ge.leo delete mode 100644 compiler/_otests/integers/i64/gt.leo delete mode 100644 compiler/_otests/integers/i64/input.leo delete mode 100644 compiler/_otests/integers/i64/le.leo delete mode 100644 compiler/_otests/integers/i64/lt.leo delete mode 100644 compiler/_otests/integers/i64/max.leo delete mode 100644 compiler/_otests/integers/i64/max_fail.leo delete mode 100644 compiler/_otests/integers/i64/min.leo delete mode 100644 compiler/_otests/integers/i64/min_fail.leo delete mode 100644 compiler/_otests/integers/i64/mod.rs delete mode 100644 compiler/_otests/integers/i64/mul.leo delete mode 100644 compiler/_otests/integers/i64/ne.leo delete mode 100644 compiler/_otests/integers/i64/negate.leo delete mode 100644 compiler/_otests/integers/i64/negate_min.leo delete mode 100644 compiler/_otests/integers/i64/negate_zero.leo delete mode 100644 compiler/_otests/integers/i64/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/i64/pow.leo delete mode 100644 compiler/_otests/integers/i64/sub.leo delete mode 100644 compiler/_otests/integers/i64/ternary.leo delete mode 100644 compiler/_otests/integers/i8/add.leo delete mode 100644 compiler/_otests/integers/i8/console_assert.leo delete mode 100644 compiler/_otests/integers/i8/div.leo delete mode 100644 compiler/_otests/integers/i8/eq.leo delete mode 100644 compiler/_otests/integers/i8/ge.leo delete mode 100644 compiler/_otests/integers/i8/gt.leo delete mode 100644 compiler/_otests/integers/i8/input.leo delete mode 100644 compiler/_otests/integers/i8/le.leo delete mode 100644 compiler/_otests/integers/i8/lt.leo delete mode 100644 compiler/_otests/integers/i8/max.leo delete mode 100644 compiler/_otests/integers/i8/max_fail.leo delete mode 100644 compiler/_otests/integers/i8/min.leo delete mode 100644 compiler/_otests/integers/i8/min_fail.leo delete mode 100644 compiler/_otests/integers/i8/mod.rs delete mode 100644 compiler/_otests/integers/i8/mul.leo delete mode 100644 compiler/_otests/integers/i8/ne.leo delete mode 100644 compiler/_otests/integers/i8/negate.leo delete mode 100644 compiler/_otests/integers/i8/negate_min.leo delete mode 100644 compiler/_otests/integers/i8/negate_zero.leo delete mode 100644 compiler/_otests/integers/i8/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/i8/pow.leo delete mode 100644 compiler/_otests/integers/i8/sub.leo delete mode 100644 compiler/_otests/integers/i8/ternary.leo delete mode 100644 compiler/_otests/integers/int_macro.rs delete mode 100644 compiler/_otests/integers/integer_tester.rs delete mode 100644 compiler/_otests/integers/mod.rs delete mode 100644 compiler/_otests/integers/u128/add.leo delete mode 100644 compiler/_otests/integers/u128/console_assert.leo delete mode 100644 compiler/_otests/integers/u128/div.leo delete mode 100644 compiler/_otests/integers/u128/eq.leo delete mode 100644 compiler/_otests/integers/u128/ge.leo delete mode 100644 compiler/_otests/integers/u128/gt.leo delete mode 100644 compiler/_otests/integers/u128/input.leo delete mode 100644 compiler/_otests/integers/u128/le.leo delete mode 100644 compiler/_otests/integers/u128/lt.leo delete mode 100644 compiler/_otests/integers/u128/max.leo delete mode 100644 compiler/_otests/integers/u128/max_fail.leo delete mode 100644 compiler/_otests/integers/u128/min.leo delete mode 100644 compiler/_otests/integers/u128/min_fail.leo delete mode 100644 compiler/_otests/integers/u128/mod.rs delete mode 100644 compiler/_otests/integers/u128/mul.leo delete mode 100644 compiler/_otests/integers/u128/ne.leo delete mode 100644 compiler/_otests/integers/u128/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/u128/pow.leo delete mode 100644 compiler/_otests/integers/u128/sub.leo delete mode 100644 compiler/_otests/integers/u128/ternary.leo delete mode 100644 compiler/_otests/integers/u16/add.leo delete mode 100644 compiler/_otests/integers/u16/console_assert.leo delete mode 100644 compiler/_otests/integers/u16/div.leo delete mode 100644 compiler/_otests/integers/u16/eq.leo delete mode 100644 compiler/_otests/integers/u16/ge.leo delete mode 100644 compiler/_otests/integers/u16/gt.leo delete mode 100644 compiler/_otests/integers/u16/input.leo delete mode 100644 compiler/_otests/integers/u16/le.leo delete mode 100644 compiler/_otests/integers/u16/lt.leo delete mode 100644 compiler/_otests/integers/u16/max.leo delete mode 100644 compiler/_otests/integers/u16/max_fail.leo delete mode 100644 compiler/_otests/integers/u16/min.leo delete mode 100644 compiler/_otests/integers/u16/min_fail.leo delete mode 100644 compiler/_otests/integers/u16/mod.rs delete mode 100644 compiler/_otests/integers/u16/mul.leo delete mode 100644 compiler/_otests/integers/u16/ne.leo delete mode 100644 compiler/_otests/integers/u16/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/u16/pow.leo delete mode 100644 compiler/_otests/integers/u16/sub.leo delete mode 100644 compiler/_otests/integers/u16/ternary.leo delete mode 100644 compiler/_otests/integers/u32/add.leo delete mode 100644 compiler/_otests/integers/u32/console_assert.leo delete mode 100644 compiler/_otests/integers/u32/div.leo delete mode 100644 compiler/_otests/integers/u32/eq.leo delete mode 100644 compiler/_otests/integers/u32/ge.leo delete mode 100644 compiler/_otests/integers/u32/gt.leo delete mode 100644 compiler/_otests/integers/u32/input.leo delete mode 100644 compiler/_otests/integers/u32/le.leo delete mode 100644 compiler/_otests/integers/u32/lt.leo delete mode 100644 compiler/_otests/integers/u32/max.leo delete mode 100644 compiler/_otests/integers/u32/max_fail.leo delete mode 100644 compiler/_otests/integers/u32/min.leo delete mode 100644 compiler/_otests/integers/u32/min_fail.leo delete mode 100644 compiler/_otests/integers/u32/mod.rs delete mode 100644 compiler/_otests/integers/u32/mul.leo delete mode 100644 compiler/_otests/integers/u32/ne.leo delete mode 100644 compiler/_otests/integers/u32/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/u32/pow.leo delete mode 100644 compiler/_otests/integers/u32/sub.leo delete mode 100644 compiler/_otests/integers/u32/ternary.leo delete mode 100644 compiler/_otests/integers/u64/add.leo delete mode 100644 compiler/_otests/integers/u64/console_assert.leo delete mode 100644 compiler/_otests/integers/u64/div.leo delete mode 100644 compiler/_otests/integers/u64/eq.leo delete mode 100644 compiler/_otests/integers/u64/ge.leo delete mode 100644 compiler/_otests/integers/u64/gt.leo delete mode 100644 compiler/_otests/integers/u64/input.leo delete mode 100644 compiler/_otests/integers/u64/le.leo delete mode 100644 compiler/_otests/integers/u64/lt.leo delete mode 100644 compiler/_otests/integers/u64/max.leo delete mode 100644 compiler/_otests/integers/u64/max_fail.leo delete mode 100644 compiler/_otests/integers/u64/min.leo delete mode 100644 compiler/_otests/integers/u64/min_fail.leo delete mode 100644 compiler/_otests/integers/u64/mod.rs delete mode 100644 compiler/_otests/integers/u64/mul.leo delete mode 100644 compiler/_otests/integers/u64/ne.leo delete mode 100644 compiler/_otests/integers/u64/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/u64/pow.leo delete mode 100644 compiler/_otests/integers/u64/sub.leo delete mode 100644 compiler/_otests/integers/u64/ternary.leo delete mode 100644 compiler/_otests/integers/u8/add.leo delete mode 100644 compiler/_otests/integers/u8/console_assert.leo delete mode 100644 compiler/_otests/integers/u8/div.leo delete mode 100644 compiler/_otests/integers/u8/eq.leo delete mode 100644 compiler/_otests/integers/u8/ge.leo delete mode 100644 compiler/_otests/integers/u8/gt.leo delete mode 100644 compiler/_otests/integers/u8/input.leo delete mode 100644 compiler/_otests/integers/u8/le.leo delete mode 100644 compiler/_otests/integers/u8/lt.leo delete mode 100644 compiler/_otests/integers/u8/max.leo delete mode 100644 compiler/_otests/integers/u8/max_fail.leo delete mode 100644 compiler/_otests/integers/u8/min.leo delete mode 100644 compiler/_otests/integers/u8/min_fail.leo delete mode 100644 compiler/_otests/integers/u8/mod.rs delete mode 100644 compiler/_otests/integers/u8/mul.leo delete mode 100644 compiler/_otests/integers/u8/ne.leo delete mode 100644 compiler/_otests/integers/u8/no_space_between_literal.leo delete mode 100644 compiler/_otests/integers/u8/pow.leo delete mode 100644 compiler/_otests/integers/u8/sub.leo delete mode 100644 compiler/_otests/integers/u8/ternary.leo delete mode 100644 compiler/_otests/integers/uint_macro.rs delete mode 100644 compiler/_otests/mod.rs delete mode 100644 compiler/_otests/mutability/array.leo delete mode 100644 compiler/_otests/mutability/array_mut.leo delete mode 100644 compiler/_otests/mutability/array_splice_mut.leo delete mode 100644 compiler/_otests/mutability/array_tuple_mut.leo delete mode 100644 compiler/_otests/mutability/circuit.leo delete mode 100644 compiler/_otests/mutability/circuit_function_mut.leo delete mode 100644 compiler/_otests/mutability/circuit_mut.leo delete mode 100644 compiler/_otests/mutability/circuit_static_function_mut.leo delete mode 100644 compiler/_otests/mutability/circuit_variable_mut.leo delete mode 100644 compiler/_otests/mutability/cond_mut.leo delete mode 100644 compiler/_otests/mutability/const.leo delete mode 100644 compiler/_otests/mutability/function_input.leo delete mode 100644 compiler/_otests/mutability/function_input_mut.leo delete mode 100644 compiler/_otests/mutability/let.leo delete mode 100644 compiler/_otests/mutability/let_mut.leo delete mode 100644 compiler/_otests/mutability/let_mut_nested.leo delete mode 100644 compiler/_otests/mutability/mod.rs delete mode 100644 compiler/_otests/mutability/swap.leo delete mode 100644 compiler/_otests/statements/block.leo delete mode 100644 compiler/_otests/statements/conditional/assert.leo delete mode 100644 compiler/_otests/statements/conditional/chain.leo delete mode 100644 compiler/_otests/statements/conditional/cond_switch.leo delete mode 100644 compiler/_otests/statements/conditional/for_loop.leo delete mode 100644 compiler/_otests/statements/conditional/input/cond_switch.in delete mode 100644 compiler/_otests/statements/conditional/input/registers_one.in delete mode 100644 compiler/_otests/statements/conditional/input/registers_zero.in delete mode 100644 compiler/_otests/statements/conditional/mod.rs delete mode 100644 compiler/_otests/statements/conditional/multiple_returns.leo delete mode 100644 compiler/_otests/statements/conditional/mutate.leo delete mode 100644 compiler/_otests/statements/conditional/nested.leo delete mode 100644 compiler/_otests/statements/conditional/output/cond_switch.out delete mode 100644 compiler/_otests/statements/conditional/output/registers_one.out delete mode 100644 compiler/_otests/statements/conditional/output/registers_zero.out delete mode 100644 compiler/_otests/statements/iteration_basic.leo delete mode 100644 compiler/_otests/statements/iteration_input.in delete mode 100644 compiler/_otests/statements/iteration_input.leo delete mode 100644 compiler/_otests/statements/iteration_type_fail.leo delete mode 100644 compiler/_otests/statements/iteration_variable.leo delete mode 100644 compiler/_otests/statements/mod.rs delete mode 100644 compiler/_otests/statements/num_returns_fail.leo delete mode 100644 compiler/_otests/statements/ternary_basic.leo delete mode 100644 compiler/_otests/statements/ternary_non_const_conditional_fail.leo delete mode 100644 compiler/_otests/syntax/compare_mismatched_types.leo delete mode 100644 compiler/_otests/syntax/identifiers/address_fail.leo delete mode 100644 compiler/_otests/syntax/identifiers/console_fail.leo delete mode 100644 compiler/_otests/syntax/identifiers/field_fail.leo delete mode 100644 compiler/_otests/syntax/identifiers/group_fail.leo delete mode 100644 compiler/_otests/syntax/identifiers/i8_fail.leo delete mode 100644 compiler/_otests/syntax/identifiers/input_fail.leo delete mode 100644 compiler/_otests/syntax/identifiers/mod.rs delete mode 100644 compiler/_otests/syntax/identifiers/self_keyword_fail.leo delete mode 100644 compiler/_otests/syntax/identifiers/self_type_fail.leo delete mode 100644 compiler/_otests/syntax/identifiers/true_fail.leo delete mode 100644 compiler/_otests/syntax/identifiers/u8_fail.leo delete mode 100644 compiler/_otests/syntax/input_semicolon.leo delete mode 100644 compiler/_otests/syntax/mod.rs delete mode 100644 compiler/_otests/syntax/semicolon.leo delete mode 100644 compiler/_otests/syntax/undefined.leo delete mode 100644 compiler/_otests/tuples/access.leo delete mode 100644 compiler/_otests/tuples/basic.leo delete mode 100644 compiler/_otests/tuples/function.leo delete mode 100644 compiler/_otests/tuples/function_multiple.leo delete mode 100644 compiler/_otests/tuples/function_typed.leo delete mode 100644 compiler/_otests/tuples/input.leo delete mode 100644 compiler/_otests/tuples/inputs/input.in delete mode 100644 compiler/_otests/tuples/mod.rs delete mode 100644 compiler/_otests/tuples/multiple.leo delete mode 100644 compiler/_otests/tuples/multiple_typed.leo delete mode 100644 compiler/_otests/tuples/nested.leo delete mode 100644 compiler/_otests/tuples/nested_access.leo delete mode 100644 compiler/_otests/tuples/nested_typed.leo delete mode 100644 compiler/_otests/tuples/typed.leo delete mode 100644 compiler/_otests/type_inference/basic.json delete mode 100644 compiler/_otests/type_inference/basic.leo delete mode 100644 compiler/_otests/type_inference/for_loop_and_compound.json delete mode 100644 compiler/_otests/type_inference/for_loop_and_compound.leo delete mode 100644 compiler/_otests/type_inference/mod.rs diff --git a/compiler/_otests/address/console_assert_fail.leo b/compiler/_otests/address/console_assert_fail.leo deleted file mode 100644 index e8b9099843..0000000000 --- a/compiler/_otests/address/console_assert_fail.leo +++ /dev/null @@ -1,6 +0,0 @@ -function main() { - const address_1 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - const address_2 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9; - - console.assert(address_1 == address_2); -} \ No newline at end of file diff --git a/compiler/_otests/address/console_assert_pass.leo b/compiler/_otests/address/console_assert_pass.leo deleted file mode 100644 index 214d01c4a8..0000000000 --- a/compiler/_otests/address/console_assert_pass.leo +++ /dev/null @@ -1,6 +0,0 @@ -function main() { - const address_1 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - const address_2 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - - console.assert(address_1 == address_2); -} \ No newline at end of file diff --git a/compiler/_otests/address/empty.leo b/compiler/_otests/address/empty.leo deleted file mode 100644 index 305a77de5b..0000000000 --- a/compiler/_otests/address/empty.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const owner = address(); -} \ No newline at end of file diff --git a/compiler/_otests/address/equal.leo b/compiler/_otests/address/equal.leo deleted file mode 100644 index 9012a8c49d..0000000000 --- a/compiler/_otests/address/equal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: address, b: address, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/address/implicit_invalid.leo b/compiler/_otests/address/implicit_invalid.leo deleted file mode 100644 index aadc38a6d8..0000000000 --- a/compiler/_otests/address/implicit_invalid.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const public_key_string: address = zleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; -} \ No newline at end of file diff --git a/compiler/_otests/address/implicit_valid.leo b/compiler/_otests/address/implicit_valid.leo deleted file mode 100644 index 75bcbaa8a1..0000000000 --- a/compiler/_otests/address/implicit_valid.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const public_key_string: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; -} \ No newline at end of file diff --git a/compiler/_otests/address/input.leo b/compiler/_otests/address/input.leo deleted file mode 100644 index 506abb0fff..0000000000 --- a/compiler/_otests/address/input.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(owner: address) { - const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - - console.assert(owner == sender); -} \ No newline at end of file diff --git a/compiler/_otests/address/invalid_length.leo b/compiler/_otests/address/invalid_length.leo deleted file mode 100644 index 42692ded3f..0000000000 --- a/compiler/_otests/address/invalid_length.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const public_key_string = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j88; -} \ No newline at end of file diff --git a/compiler/_otests/address/invalid_prefix.leo b/compiler/_otests/address/invalid_prefix.leo deleted file mode 100644 index cd87e404a4..0000000000 --- a/compiler/_otests/address/invalid_prefix.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const public_key_string = address(zleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8); -} \ No newline at end of file diff --git a/compiler/_otests/address/mod.rs b/compiler/_otests/address/mod.rs deleted file mode 100644 index b0193ffbdf..0000000000 --- a/compiler/_otests/address/mod.rs +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_asg_error, expect_compiler_error, generate_main_input, parse_program}; -use leo_ast::InputValue; - -static TEST_ADDRESS_1: &str = "aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8"; -static TEST_ADDRESS_2: &str = "aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r"; - -#[test] -fn test_valid() { - let program_string = include_str!("valid.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program) -} - -#[test] -fn test_invalid_prefix() { - let program_string = include_str!("invalid_prefix.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_invalid_length() { - let program_string = include_str!("invalid_length.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_empty() { - let program_string = include_str!("empty.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_implicit_valid() { - let program_string = include_str!("implicit_valid.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_implicit_invalid() { - let program_string = include_str!("implicit_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_console_assert_pass() { - let program_string = include_str!("console_assert_pass.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_console_assert_fail() { - let program_string = include_str!("console_assert_fail.leo"); - let program = parse_program(program_string).unwrap(); - - let _output = expect_compiler_error(program); -} - -#[test] -fn test_ternary() { - let program_string = include_str!("ternary.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(true))), - ("c", Some(InputValue::Address(TEST_ADDRESS_1.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(false))), - ("c", Some(InputValue::Address(TEST_ADDRESS_2.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -#[test] -fn test_equal() { - let program_string = include_str!("equal.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Address(TEST_ADDRESS_1.to_string()))), - ("b", Some(InputValue::Address(TEST_ADDRESS_1.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Address(TEST_ADDRESS_1.to_string()))), - ("b", Some(InputValue::Address(TEST_ADDRESS_2.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} diff --git a/compiler/_otests/address/ternary.leo b/compiler/_otests/address/ternary.leo deleted file mode 100644 index 65a8eea1e7..0000000000 --- a/compiler/_otests/address/ternary.leo +++ /dev/null @@ -1,8 +0,0 @@ -function main(s: bool, c: address) { - const a = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - const b = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r; - - let r = s ? a: b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/address/valid.leo b/compiler/_otests/address/valid.leo deleted file mode 100644 index 6d693efe78..0000000000 --- a/compiler/_otests/address/valid.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const public_key_string = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; -} \ No newline at end of file diff --git a/compiler/_otests/array/initializer.leo b/compiler/_otests/array/initializer.leo deleted file mode 100644 index 51ac19f68f..0000000000 --- a/compiler/_otests/array/initializer.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: [u8; 3]) { - console.assert(a == [1u8; 3]); -} \ No newline at end of file diff --git a/compiler/_otests/array/initializer_fail.leo b/compiler/_otests/array/initializer_fail.leo deleted file mode 100644 index 3b2e7785cc..0000000000 --- a/compiler/_otests/array/initializer_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: [u8; 3]) { - console.assert(a == [1u8; -3]); -} \ No newline at end of file diff --git a/compiler/_otests/array/initializer_input.leo b/compiler/_otests/array/initializer_input.leo deleted file mode 100644 index 4b886159dc..0000000000 --- a/compiler/_otests/array/initializer_input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: [u8; (3, 2)]) { - console.assert(a == [0u8; (3, 2)]); -} \ No newline at end of file diff --git a/compiler/_otests/array/inline.leo b/compiler/_otests/array/inline.leo deleted file mode 100644 index 8c5c98ae50..0000000000 --- a/compiler/_otests/array/inline.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: [u8; 3]) { - console.assert(a == [1u8, 1u8, 1u8]); -} \ No newline at end of file diff --git a/compiler/_otests/array/input/initializer_fail.in b/compiler/_otests/array/input/initializer_fail.in deleted file mode 100644 index 0ff699aa13..0000000000 --- a/compiler/_otests/array/input/initializer_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0u8; (2, 2)]; diff --git a/compiler/_otests/array/input/inline_fail.leo b/compiler/_otests/array/input/inline_fail.leo deleted file mode 100644 index 72fd3be66c..0000000000 --- a/compiler/_otests/array/input/inline_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a = [1u8, bool]; -} diff --git a/compiler/_otests/array/input/input_nested_3x2.in b/compiler/_otests/array/input/input_nested_3x2.in deleted file mode 100644 index 9eaafe9bdd..0000000000 --- a/compiler/_otests/array/input/input_nested_3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [[0u8; 2]; 3]; diff --git a/compiler/_otests/array/input/input_nested_3x2_fail.in b/compiler/_otests/array/input/input_nested_3x2_fail.in deleted file mode 100644 index d1c114a08b..0000000000 --- a/compiler/_otests/array/input/input_nested_3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [[0u8; 3]; 2)]; diff --git a/compiler/_otests/array/input/input_tuple_3x2.in b/compiler/_otests/array/input/input_tuple_3x2.in deleted file mode 100644 index 1c0bd495ec..0000000000 --- a/compiler/_otests/array/input/input_tuple_3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0u8; (3, 2)]; diff --git a/compiler/_otests/array/input/input_tuple_3x2_fail.in b/compiler/_otests/array/input/input_tuple_3x2_fail.in deleted file mode 100644 index c281d9d464..0000000000 --- a/compiler/_otests/array/input/input_tuple_3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0u8; (2, 3)]; diff --git a/compiler/_otests/array/input/registers_ones.in b/compiler/_otests/array/input/registers_ones.in deleted file mode 100644 index fab79f69a0..0000000000 --- a/compiler/_otests/array/input/registers_ones.in +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: [u8; 3] = [1u8, 1u8, 1u8]; diff --git a/compiler/_otests/array/input/registers_zeros.in b/compiler/_otests/array/input/registers_zeros.in deleted file mode 100644 index e9aa65cf9b..0000000000 --- a/compiler/_otests/array/input/registers_zeros.in +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: [u8; 3] = [0u8, 0u8, 0u8]; diff --git a/compiler/_otests/array/input/six_zeros.in b/compiler/_otests/array/input/six_zeros.in deleted file mode 100644 index 9f9880807c..0000000000 --- a/compiler/_otests/array/input/six_zeros.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0; (3, 2)]; \ No newline at end of file diff --git a/compiler/_otests/array/input/three_ones.in b/compiler/_otests/array/input/three_ones.in deleted file mode 100644 index 80d095f864..0000000000 --- a/compiler/_otests/array/input/three_ones.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; 3] = [1, 1, 1]; \ No newline at end of file diff --git a/compiler/_otests/array/input/type_nested_value_nested_3x2.in b/compiler/_otests/array/input/type_nested_value_nested_3x2.in deleted file mode 100644 index 21fc9b953f..0000000000 --- a/compiler/_otests/array/input/type_nested_value_nested_3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [[u8; 2]; 3] = [[0; 2]; 3]; diff --git a/compiler/_otests/array/input/type_nested_value_nested_3x2_fail.in b/compiler/_otests/array/input/type_nested_value_nested_3x2_fail.in deleted file mode 100644 index 280b38b909..0000000000 --- a/compiler/_otests/array/input/type_nested_value_nested_3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) diff --git a/compiler/_otests/array/input/type_nested_value_nested_4x3x2.in b/compiler/_otests/array/input/type_nested_value_nested_4x3x2.in deleted file mode 100644 index 53ca13b024..0000000000 --- a/compiler/_otests/array/input/type_nested_value_nested_4x3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; diff --git a/compiler/_otests/array/input/type_nested_value_nested_4x3x2_fail.in b/compiler/_otests/array/input/type_nested_value_nested_4x3x2_fail.in deleted file mode 100644 index 11f44a76a4..0000000000 --- a/compiler/_otests/array/input/type_nested_value_nested_4x3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) diff --git a/compiler/_otests/array/input/type_nested_value_tuple_3x2.in b/compiler/_otests/array/input/type_nested_value_tuple_3x2.in deleted file mode 100644 index 689e164b73..0000000000 --- a/compiler/_otests/array/input/type_nested_value_tuple_3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [[u8; 2]; 3] = [0; (3, 2)]; diff --git a/compiler/_otests/array/input/type_nested_value_tuple_3x2_fail.in b/compiler/_otests/array/input/type_nested_value_tuple_3x2_fail.in deleted file mode 100644 index 4a43d7d816..0000000000 --- a/compiler/_otests/array/input/type_nested_value_tuple_3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) diff --git a/compiler/_otests/array/input/type_nested_value_tuple_4x3x2.in b/compiler/_otests/array/input/type_nested_value_tuple_4x3x2.in deleted file mode 100644 index 649a7154ad..0000000000 --- a/compiler/_otests/array/input/type_nested_value_tuple_4x3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; diff --git a/compiler/_otests/array/input/type_nested_value_tuple_4x3x2_fail.in b/compiler/_otests/array/input/type_nested_value_tuple_4x3x2_fail.in deleted file mode 100644 index eed469d6ac..0000000000 --- a/compiler/_otests/array/input/type_nested_value_tuple_4x3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) diff --git a/compiler/_otests/array/input/type_tuple_value_nested_3x2.in b/compiler/_otests/array/input/type_tuple_value_nested_3x2.in deleted file mode 100644 index cb3943365b..0000000000 --- a/compiler/_otests/array/input/type_tuple_value_nested_3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [[0; 2]; 3]; diff --git a/compiler/_otests/array/input/type_tuple_value_nested_3x2_fail.in b/compiler/_otests/array/input/type_tuple_value_nested_3x2_fail.in deleted file mode 100644 index c787cbffd9..0000000000 --- a/compiler/_otests/array/input/type_tuple_value_nested_3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) diff --git a/compiler/_otests/array/input/type_tuple_value_nested_4x3x2.in b/compiler/_otests/array/input/type_tuple_value_nested_4x3x2.in deleted file mode 100644 index 8105eae543..0000000000 --- a/compiler/_otests/array/input/type_tuple_value_nested_4x3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; diff --git a/compiler/_otests/array/input/type_tuple_value_nested_4x3x2_fail.in b/compiler/_otests/array/input/type_tuple_value_nested_4x3x2_fail.in deleted file mode 100644 index 3e194e590d..0000000000 --- a/compiler/_otests/array/input/type_tuple_value_nested_4x3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) diff --git a/compiler/_otests/array/input/type_tuple_value_tuple_3x2.in b/compiler/_otests/array/input/type_tuple_value_tuple_3x2.in deleted file mode 100644 index cbfeb6d5f1..0000000000 --- a/compiler/_otests/array/input/type_tuple_value_tuple_3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0; (3, 2)]; diff --git a/compiler/_otests/array/input/type_tuple_value_tuple_3x2_fail.in b/compiler/_otests/array/input/type_tuple_value_tuple_3x2_fail.in deleted file mode 100644 index 3409e8aaa9..0000000000 --- a/compiler/_otests/array/input/type_tuple_value_tuple_3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) diff --git a/compiler/_otests/array/input/type_tuple_value_tuple_4x3x2.in b/compiler/_otests/array/input/type_tuple_value_tuple_4x3x2.in deleted file mode 100644 index 6fd97ee2d2..0000000000 --- a/compiler/_otests/array/input/type_tuple_value_tuple_4x3x2.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; diff --git a/compiler/_otests/array/input/type_tuple_value_tuple_4x3x2_fail.in b/compiler/_otests/array/input/type_tuple_value_tuple_4x3x2_fail.in deleted file mode 100644 index d6de4af3c5..0000000000 --- a/compiler/_otests/array/input/type_tuple_value_tuple_4x3x2_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) diff --git a/compiler/_otests/array/input_nested_3x2.leo b/compiler/_otests/array/input_nested_3x2.leo deleted file mode 100644 index b7e59a5dc0..0000000000 --- a/compiler/_otests/array/input_nested_3x2.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: [u8; (3, 2)]) { - console.assert(a == [[0u8; 2]; 3]); -} diff --git a/compiler/_otests/array/input_nested_3x2_fail.leo b/compiler/_otests/array/input_nested_3x2_fail.leo deleted file mode 100644 index 1f5bf7b334..0000000000 --- a/compiler/_otests/array/input_nested_3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: [u8; (3, 2)]) { - console.assert(a == [[0u8; 2]; 3)]); // This should be written the right way as this test is for the input file. -} diff --git a/compiler/_otests/array/input_tuple_3x2.leo b/compiler/_otests/array/input_tuple_3x2.leo deleted file mode 100644 index 4c3c001f41..0000000000 --- a/compiler/_otests/array/input_tuple_3x2.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: [u8; (3, 2)]) { - console.assert(a == [0u8; (3, 2)]); -} diff --git a/compiler/_otests/array/input_tuple_3x2_fail.leo b/compiler/_otests/array/input_tuple_3x2_fail.leo deleted file mode 100644 index 4c3c001f41..0000000000 --- a/compiler/_otests/array/input_tuple_3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: [u8; (3, 2)]) { - console.assert(a == [0u8; (3, 2)]); -} diff --git a/compiler/_otests/array/mod.rs b/compiler/_otests/array/mod.rs deleted file mode 100644 index 7acbd1af2f..0000000000 --- a/compiler/_otests/array/mod.rs +++ /dev/null @@ -1,716 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - get_output, - parse_program, - parse_program_with_input, - EdwardsTestCompiler, -}; - -pub fn output_ones(program: EdwardsTestCompiler) { - 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 actual = get_output(program); - - assert!(expected.eq(actual.bytes().as_slice())); -} - -// Registers - -#[test] -fn test_registers() { - let program_string = include_str!("registers.leo"); - let ones_input_string = include_str!("input/registers_ones.in"); - let zeros_input_string = include_str!("input/registers_zeros.in"); - - // test ones input register => ones output register - let program = parse_program_with_input(program_string, ones_input_string).unwrap(); - - output_ones(program); - - // test zeros input register => zeros output register - let program = parse_program_with_input(program_string, zeros_input_string).unwrap(); - - output_zeros(program); -} - -// Expressions - -#[test] -fn test_inline() { - let program_string = include_str!("inline.leo"); - let input_string = include_str!("input/three_ones.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_nested() { - let program_string = include_str!("nested.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_inline_fail() { - let program_string = include_str!("inline.leo"); - let program = parse_program(program_string).unwrap(); - - let _err = expect_compiler_error(program); -} - -#[test] -fn test_initializer() { - let program_string = include_str!("initializer.leo"); - let input_string = include_str!("input/three_ones.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_initializer_fail() { - let program_string = include_str!("initializer_fail.leo"); - let input_string = include_str!("input/three_ones.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_initializer_input() { - let program_string = include_str!("initializer_input.leo"); - let input_string = include_str!("input/six_zeros.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_initializer_input_fail() { - let program_string = include_str!("initializer_input.leo"); - let input_string = include_str!("input/initializer_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_nested_3x2() { - let program_string = include_str!("input_nested_3x2.leo"); - let input_string = include_str!("input/input_nested_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_nested_3x2_fail() { - let program_string = include_str!("input_nested_3x2_fail.leo"); - let input_string = include_str!("input/input_nested_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_tuple_3x2() { - let program_string = include_str!("input_tuple_3x2.leo"); - let input_string = include_str!("input/input_tuple_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_tuple_3x2_fail() { - let program_string = include_str!("input_tuple_3x2_fail.leo"); - let input_string = include_str!("input/input_tuple_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_multi_fail_initializer() { - let program_string = include_str!("multi_fail_initializer.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_multi_inline_fail() { - let program_string = include_str!("multi_fail_inline.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_multi_initializer() { - let program_string = include_str!("multi_initializer.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_multi_initializer_fail() { - let program_string = include_str!("multi_initializer_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_nested_3x2_value() { - let program_string = include_str!("nested_3x2_value.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_nested_3x2_value_fail() { - let program_string = include_str!("nested_3x2_value_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_tuple_3x2_value() { - let program_string = include_str!("tuple_3x2_value.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_tuple_3x2_value_fail() { - let program_string = include_str!("tuple_3x2_value_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_spread() { - let program_string = include_str!("spread.leo"); - let input_string = include_str!("input/three_ones.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_slice() { - let program_string = include_str!("slice.leo"); - let input_string = include_str!("input/three_ones.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_slice_lower() { - let program_string = include_str!("slice_lower.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// Array type tests - -#[test] -fn test_type_fail() { - let program_string = include_str!("type_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_type_nested_value_nested_3x2() { - let program_string = include_str!("type_nested_value_nested_3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_nested_value_nested_3x2_fail() { - let program_string = include_str!("type_nested_value_nested_3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_nested_value_nested_4x3x2() { - let program_string = include_str!("type_nested_value_nested_4x3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_nested_value_nested_4x3x2_fail() { - let program_string = include_str!("type_nested_value_nested_4x3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_nested_value_tuple_3x2() { - let program_string = include_str!("type_nested_value_tuple_3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_nested_value_tuple_3x2_fail() { - let program_string = include_str!("type_nested_value_tuple_3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_nested_value_tuple_4x3x2() { - let program_string = include_str!("type_nested_value_tuple_4x3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_nested_value_tuple_4x3x2_fail() { - let program_string = include_str!("type_nested_value_tuple_4x3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_tuple_value_nested_3x2() { - let program_string = include_str!("type_tuple_value_nested_3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_tuple_value_nested_3x2_fail() { - let program_string = include_str!("type_tuple_value_nested_3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_tuple_value_nested_4x3x2() { - let program_string = include_str!("type_tuple_value_nested_4x3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_tuple_value_nested_4x3x2_fail() { - let program_string = include_str!("type_tuple_value_nested_4x3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_tuple_value_tuple_3x2() { - let program_string = include_str!("type_tuple_value_tuple_3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_tuple_value_tuple_3x2_fail() { - let program_string = include_str!("type_tuple_value_tuple_3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_type_tuple_value_tuple_4x3x2() { - let program_string = include_str!("type_tuple_value_tuple_4x3x2.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_type_tuple_value_tuple_4x3x2_fail() { - let program_string = include_str!("type_tuple_value_tuple_4x3x2_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Tests for nested multi-dimensional arrays as input to the program - -#[test] -fn test_input_type_nested_value_nested_3x2() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_nested_value_nested_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_nested_value_nested_3x2_fail() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_nested_value_nested_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_nested_value_nested_4x3x2() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_nested_value_nested_4x3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_nested_value_nested_4x3x2_fail() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_nested_value_nested_4x3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_nested_value_tuple_3x2() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_nested_value_tuple_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_nested_value_tuple_3x2_fail() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_nested_value_tuple_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_nested_value_tuple_4x3x2() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_nested_value_tuple_4x3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program) -} - -#[test] -fn test_input_type_nested_value_tuple_4x3x2_fail() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_nested_value_tuple_4x3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -// Tests for multi-dimensional arrays using tuple syntax as input to the program - -#[test] -fn test_input_type_tuple_value_nested_3x2() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_tuple_value_nested_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_tuple_value_nested_3x2_fail() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_tuple_value_nested_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_tuple_value_nested_4x3x2() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_tuple_value_nested_4x3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_tuple_value_nested_4x3x2_fail() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_tuple_value_nested_4x3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_tuple_value_tuple_3x2() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_tuple_value_tuple_3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_tuple_value_tuple_3x2_fail() { - let program_string = include_str!("type_input_3x2.leo"); - let input_string = include_str!("input/type_tuple_value_tuple_3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_type_tuple_value_tuple_4x3x2() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_tuple_value_tuple_4x3x2.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_type_tuple_value_tuple_4x3x2_fail() { - let program_string = include_str!("type_input_4x3x2.leo"); - let input_string = include_str!("input/type_tuple_value_tuple_4x3x2_fail.in"); - let syntax_error = parse_program_with_input(program_string, input_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_variable_slice_fail() { - let program_string = include_str!("variable_slice_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_index() { - let program_string = r#" - function main(i: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert(2 == b[i]); - console.assert(3 == b[2]); - } - "#; - let input_string = r#" - [main] - i: u32 = 1; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_index_bounds_fail() { - let program_string = r#" - function main(i: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert(2 == b[i]); - } - "#; - let input_string = r#" - [main] - i: u32 = 4; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_const_array_index_bounds_fail() { - let program_string = r#" - function main() { - let b = [1u8, 2, 3, 4]; - const i: u32 = 4; - - console.assert(2 == b[i]); - } - "#; - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_range_index() { - let program_string = r#" - function main(i: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([1u8, 2] == b[0..i]); - console.assert([3u8, 4] == b[i..4]); - } - "#; - let input_string = r#" - [main] - i: u32 = 2; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_range_index_dyn() { - let program_string = r#" - function main(i: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([1u8, 2] == b[..i]); - console.assert([3u8, 4] == b[i..]); - } - "#; - let input_string = r#" - [main] - i: u32 = 2; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_range_index_full_dyn() { - let program_string = r#" - function main(i: u32, y: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([3u8, 4] == b[i..y]); - } - "#; - let input_string = r#" - [main] - i: u32 = 2; - y: u32 = 4; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_range_index_out_of_bounds_fail() { - let program_string = r#" - function main() { - let b = [1u8, 2, 3, 4]; - - console.assert([1, 2] == b[3..5]); - } - "#; - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_range_index_invalid_bounds_fail() { - let program_string = r#" - function main() { - let b = [1u8, 2, 3, 4]; - - console.assert([1, 2] == b[2..1]); - } - "#; - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_range_index_full_dyn_resized_fail() { - let program_string = r#" - function main(i: u32, y: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([3u8, 4] == b[i..y]); - } - "#; - let input_string = r#" - [main] - i: u32 = 1; - y: u32 = 4; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_array_range_index_full_dyn_bounds_fail() { - let program_string = r#" - function main(i: u32, y: u32) { - let b = [1u8, 2, 3, 4]; - - console.assert([3u8, 4] == b[i..y]); - } - "#; - let input_string = r#" - [main] - i: u32 = 3; - y: u32 = 5; - "#; - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_compiler_error(program); -} diff --git a/compiler/_otests/array/multi_fail_initializer.leo b/compiler/_otests/array/multi_fail_initializer.leo deleted file mode 100644 index be1ab315bd..0000000000 --- a/compiler/_otests/array/multi_fail_initializer.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions -} \ No newline at end of file diff --git a/compiler/_otests/array/multi_fail_inline.leo b/compiler/_otests/array/multi_fail_inline.leo deleted file mode 100644 index 49c9296798..0000000000 --- a/compiler/_otests/array/multi_fail_inline.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - const arr: [u8; (2, 2)] = [[1u8, 1u8], - [1u8]]; // incorrect dimensions -} \ No newline at end of file diff --git a/compiler/_otests/array/multi_initializer.leo b/compiler/_otests/array/multi_initializer.leo deleted file mode 100644 index 6133542ef0..0000000000 --- a/compiler/_otests/array/multi_initializer.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - const a: [u8; (2, 2, 2)] = [1u8; (2, 2, 2)]; - - const b: [u8; (2, 2, 2)] = [[[1u8; 2]; 2]; 2]; - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/multi_initializer_fail.leo b/compiler/_otests/array/multi_initializer_fail.leo deleted file mode 100644 index e38a8fdaee..0000000000 --- a/compiler/_otests/array/multi_initializer_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions -} \ No newline at end of file diff --git a/compiler/_otests/array/nested.leo b/compiler/_otests/array/nested.leo deleted file mode 100644 index 80fc5511bf..0000000000 --- a/compiler/_otests/array/nested.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main () { - const x = [false; (2, 2)]; - const y: bool = x[0][0]; -} diff --git a/compiler/_otests/array/nested_3x2_value.leo b/compiler/_otests/array/nested_3x2_value.leo deleted file mode 100644 index c5f64c997e..0000000000 --- a/compiler/_otests/array/nested_3x2_value.leo +++ /dev/null @@ -1,8 +0,0 @@ -// Multidimensional array syntax in leo -function main() { - const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline - - const b: [u32; (3, 2)] = [[0; 2]; 3]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/nested_3x2_value_fail.leo b/compiler/_otests/array/nested_3x2_value_fail.leo deleted file mode 100644 index a187a51991..0000000000 --- a/compiler/_otests/array/nested_3x2_value_fail.leo +++ /dev/null @@ -1,4 +0,0 @@ -// Multidimensional array syntax in leo -function main() { - const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/_otests/array/output/registers_ones.out b/compiler/_otests/array/output/registers_ones.out deleted file mode 100644 index 05a8842ec3..0000000000 --- a/compiler/_otests/array/output/registers_ones.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: [u8; 3] = [1, 1, 1]; diff --git a/compiler/_otests/array/output/registers_zeros.out b/compiler/_otests/array/output/registers_zeros.out deleted file mode 100644 index 4fdb9f3359..0000000000 --- a/compiler/_otests/array/output/registers_zeros.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: [u8; 3] = [0, 0, 0]; diff --git a/compiler/_otests/array/registers.leo b/compiler/_otests/array/registers.leo deleted file mode 100644 index 98d129207f..0000000000 --- a/compiler/_otests/array/registers.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() -> [u8; 3] { - return input.registers.r; -} diff --git a/compiler/_otests/array/slice.leo b/compiler/_otests/array/slice.leo deleted file mode 100644 index 9ff83dbbb8..0000000000 --- a/compiler/_otests/array/slice.leo +++ /dev/null @@ -1,6 +0,0 @@ -// `{from}..{to}` copies the elements of one array into another exclusively -function main(a: [u8; 3]) { - const b = [1u8; 4]; - - console.assert(a == b[0..3]); -} diff --git a/compiler/_otests/array/slice_lower.leo b/compiler/_otests/array/slice_lower.leo deleted file mode 100644 index 0af6fbd937..0000000000 --- a/compiler/_otests/array/slice_lower.leo +++ /dev/null @@ -1,8 +0,0 @@ -function main() { - const arr: [u32; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8]; - const expected: [u32; 2] = [0, 1]; - - const actual = arr[..2]; // Should produce [0, 1] - - console.assert(expected == actual); -} \ No newline at end of file diff --git a/compiler/_otests/array/spread.leo b/compiler/_otests/array/spread.leo deleted file mode 100644 index 8bd2861aae..0000000000 --- a/compiler/_otests/array/spread.leo +++ /dev/null @@ -1,7 +0,0 @@ -// A spread operator `...` copies the elements of one array into another -function main(a: [u8; 3]) { - const b = [1u8, 1u8]; - const c = [1u8, ...b]; - - console.assert(a == c); -} \ No newline at end of file diff --git a/compiler/_otests/array/tuple_3x2_value.leo b/compiler/_otests/array/tuple_3x2_value.leo deleted file mode 100644 index b6659539d5..0000000000 --- a/compiler/_otests/array/tuple_3x2_value.leo +++ /dev/null @@ -1,8 +0,0 @@ -// Multidimensional array syntax in leo -function main() { - const a = [[0u32, 0u32], [0u32, 0u32], [0u32, 0u32]]; // inline - - const b: [u32; (3, 2)] = [0; (3, 2)]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/tuple_3x2_value_fail.leo b/compiler/_otests/array/tuple_3x2_value_fail.leo deleted file mode 100644 index 78593ab696..0000000000 --- a/compiler/_otests/array/tuple_3x2_value_fail.leo +++ /dev/null @@ -1,4 +0,0 @@ -// Multidimensional array syntax in leo -function main() { - const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) -} diff --git a/compiler/_otests/array/type_fail.leo b/compiler/_otests/array/type_fail.leo deleted file mode 100644 index 356bba976a..0000000000 --- a/compiler/_otests/array/type_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: [u8; -2] = [0u32; 2]; -} \ No newline at end of file diff --git a/compiler/_otests/array/type_input_3x2.leo b/compiler/_otests/array/type_input_3x2.leo deleted file mode 100644 index ea60a0cc24..0000000000 --- a/compiler/_otests/array/type_input_3x2.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(a: [[u8; 2]; 3]) { - const b = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_input_4x3x2.leo b/compiler/_otests/array/type_input_4x3x2.leo deleted file mode 100644 index 2d9c4cff22..0000000000 --- a/compiler/_otests/array/type_input_4x3x2.leo +++ /dev/null @@ -1,8 +0,0 @@ -function main(a: [[[u8; 2]; 3]; 4]) { - const b = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_nested_value_nested_3x2.leo b/compiler/_otests/array/type_nested_value_nested_3x2.leo deleted file mode 100644 index bcf5bae674..0000000000 --- a/compiler/_otests/array/type_nested_value_nested_3x2.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - - const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_nested_value_nested_3x2_fail.leo b/compiler/_otests/array/type_nested_value_nested_3x2_fail.leo deleted file mode 100644 index 56c8916fb0..0000000000 --- a/compiler/_otests/array/type_nested_value_nested_3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file diff --git a/compiler/_otests/array/type_nested_value_nested_4x3x2.leo b/compiler/_otests/array/type_nested_value_nested_4x3x2.leo deleted file mode 100644 index 1691fa26c7..0000000000 --- a/compiler/_otests/array/type_nested_value_nested_4x3x2.leo +++ /dev/null @@ -1,10 +0,0 @@ -function main() { - const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - const b: [[[u8; 2]; 3]; 4] = [[[0; 2]; 3]; 4]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_nested_value_nested_4x3x2_fail.leo b/compiler/_otests/array/type_nested_value_nested_4x3x2_fail.leo deleted file mode 100644 index 480327a91d..0000000000 --- a/compiler/_otests/array/type_nested_value_nested_4x3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file diff --git a/compiler/_otests/array/type_nested_value_tuple_3x2.leo b/compiler/_otests/array/type_nested_value_tuple_3x2.leo deleted file mode 100644 index 5f14084d55..0000000000 --- a/compiler/_otests/array/type_nested_value_tuple_3x2.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - - const b: [[u8; 2]; 3] = [0; (3, 2)]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_nested_value_tuple_3x2_fail.leo b/compiler/_otests/array/type_nested_value_tuple_3x2_fail.leo deleted file mode 100644 index 3bfb559615..0000000000 --- a/compiler/_otests/array/type_nested_value_tuple_3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file diff --git a/compiler/_otests/array/type_nested_value_tuple_4x3x2.leo b/compiler/_otests/array/type_nested_value_tuple_4x3x2.leo deleted file mode 100644 index 88a5143bd2..0000000000 --- a/compiler/_otests/array/type_nested_value_tuple_4x3x2.leo +++ /dev/null @@ -1,10 +0,0 @@ -function main() { - const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - const b: [[[u8; 2]; 3]; 4] = [0; (4, 3, 2)]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_nested_value_tuple_4x3x2_fail.leo b/compiler/_otests/array/type_nested_value_tuple_4x3x2_fail.leo deleted file mode 100644 index ce1219a37b..0000000000 --- a/compiler/_otests/array/type_nested_value_tuple_4x3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file diff --git a/compiler/_otests/array/type_tuple_value_nested_3x2.leo b/compiler/_otests/array/type_tuple_value_nested_3x2.leo deleted file mode 100644 index 81195e03a1..0000000000 --- a/compiler/_otests/array/type_tuple_value_nested_3x2.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - - const b: [u8; (3, 2)] = [[0; 2]; 3]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_tuple_value_nested_3x2_fail.leo b/compiler/_otests/array/type_tuple_value_nested_3x2_fail.leo deleted file mode 100644 index e84f025a9f..0000000000 --- a/compiler/_otests/array/type_tuple_value_nested_3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file diff --git a/compiler/_otests/array/type_tuple_value_nested_4x3x2.leo b/compiler/_otests/array/type_tuple_value_nested_4x3x2.leo deleted file mode 100644 index 322a6f7601..0000000000 --- a/compiler/_otests/array/type_tuple_value_nested_4x3x2.leo +++ /dev/null @@ -1,10 +0,0 @@ -function main() { - const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - const b: [u8; (4, 3, 2)] = [[[0; 2]; 3]; 4]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_tuple_value_nested_4x3x2_fail.leo b/compiler/_otests/array/type_tuple_value_nested_4x3x2_fail.leo deleted file mode 100644 index cbb7ccbf76..0000000000 --- a/compiler/_otests/array/type_tuple_value_nested_4x3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file diff --git a/compiler/_otests/array/type_tuple_value_tuple_3x2.leo b/compiler/_otests/array/type_tuple_value_tuple_3x2.leo deleted file mode 100644 index d451a9c1a8..0000000000 --- a/compiler/_otests/array/type_tuple_value_tuple_3x2.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline - - const b: [u8; (3, 2)] = [0; (3, 2)]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_tuple_value_tuple_3x2_fail.leo b/compiler/_otests/array/type_tuple_value_tuple_3x2_fail.leo deleted file mode 100644 index 884a75db9d..0000000000 --- a/compiler/_otests/array/type_tuple_value_tuple_3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering) -} \ No newline at end of file diff --git a/compiler/_otests/array/type_tuple_value_tuple_4x3x2.leo b/compiler/_otests/array/type_tuple_value_tuple_4x3x2.leo deleted file mode 100644 index 1205b1dc9c..0000000000 --- a/compiler/_otests/array/type_tuple_value_tuple_4x3x2.leo +++ /dev/null @@ -1,10 +0,0 @@ -function main() { - const a = [[[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]], - [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]]; // inline - - const b: [u8; (4, 3, 2)] = [0; (4, 3, 2)]; // initializer - - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/array/type_tuple_value_tuple_4x3x2_fail.leo b/compiler/_otests/array/type_tuple_value_tuple_4x3x2_fail.leo deleted file mode 100644 index 31e2a5e552..0000000000 --- a/compiler/_otests/array/type_tuple_value_tuple_4x3x2_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order) -} \ No newline at end of file diff --git a/compiler/_otests/array/variable_slice_fail.leo b/compiler/_otests/array/variable_slice_fail.leo deleted file mode 100644 index e79d64112f..0000000000 --- a/compiler/_otests/array/variable_slice_fail.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - const a = [1u8; 10]; - for i in 0..10 { - const x = a[i..10]; - console.debug("{}", x); - } -} \ No newline at end of file diff --git a/compiler/_otests/boolean/all.leo b/compiler/_otests/boolean/all.leo deleted file mode 100644 index 64fe8a795a..0000000000 --- a/compiler/_otests/boolean/all.leo +++ /dev/null @@ -1,8 +0,0 @@ -// !(true && (false || true)) -function main() { - const a = true; - const b = false || a; - const c = !(true && b); - - console.assert(c == false); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/assert_eq_input.leo b/compiler/_otests/boolean/assert_eq_input.leo deleted file mode 100644 index 8a796e5bbd..0000000000 --- a/compiler/_otests/boolean/assert_eq_input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: bool, b: bool) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/conditional_mut.leo b/compiler/_otests/boolean/conditional_mut.leo deleted file mode 100644 index cebf82ab00..0000000000 --- a/compiler/_otests/boolean/conditional_mut.leo +++ /dev/null @@ -1,6 +0,0 @@ -function main () { - let x = true; - if x { - const y = 0u8; - } -} \ No newline at end of file diff --git a/compiler/_otests/boolean/false_and_false.leo b/compiler/_otests/boolean/false_and_false.leo deleted file mode 100644 index 03dfabab4d..0000000000 --- a/compiler/_otests/boolean/false_and_false.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = false && false; - - console.assert(a == false); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/false_or_false.leo b/compiler/_otests/boolean/false_or_false.leo deleted file mode 100644 index 7ea710802c..0000000000 --- a/compiler/_otests/boolean/false_or_false.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = false || false; - - console.assert(a == false); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/input/registers_false.in b/compiler/_otests/boolean/input/registers_false.in deleted file mode 100644 index f41110cca8..0000000000 --- a/compiler/_otests/boolean/input/registers_false.in +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: bool = false; \ No newline at end of file diff --git a/compiler/_otests/boolean/input/registers_true.in b/compiler/_otests/boolean/input/registers_true.in deleted file mode 100644 index a51a0e2dc2..0000000000 --- a/compiler/_otests/boolean/input/registers_true.in +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: bool = true; \ No newline at end of file diff --git a/compiler/_otests/boolean/input/true_false.in b/compiler/_otests/boolean/input/true_false.in deleted file mode 100644 index b786a3ab5f..0000000000 --- a/compiler/_otests/boolean/input/true_false.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -a: bool = true; -b: bool = false; \ No newline at end of file diff --git a/compiler/_otests/boolean/input/true_true.in b/compiler/_otests/boolean/input/true_true.in deleted file mode 100644 index 2ce5aff495..0000000000 --- a/compiler/_otests/boolean/input/true_true.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -a: bool = true; -b: bool = true; \ No newline at end of file diff --git a/compiler/_otests/boolean/mod.rs b/compiler/_otests/boolean/mod.rs deleted file mode 100644 index 4051bf83d9..0000000000 --- a/compiler/_otests/boolean/mod.rs +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - get_output, - parse_program, - parse_program_with_input, - EdwardsTestCompiler, -}; - -pub fn output_true(program: EdwardsTestCompiler) { - 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 actual = get_output(program); - - assert_eq!(expected, actual.bytes().as_slice()); -} - -#[test] -fn test_input_pass() { - let program_string = include_str!("assert_eq_input.leo"); - let input_string = include_str!("input/true_true.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_fail() { - let program_string = include_str!("assert_eq_input.leo"); - let input_string = include_str!("input/true_false.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_registers() { - let program_string = include_str!("output_register.leo"); - let true_input_string = include_str!("input/registers_true.in"); - let false_input_string = include_str!("input/registers_false.in"); - - // test true input register => true output register - let program = parse_program_with_input(program_string, true_input_string).unwrap(); - - output_true(program); - - // test false input register => false output register - let program = parse_program_with_input(program_string, false_input_string).unwrap(); - - output_false(program); -} - -// Boolean not ! - -#[test] -fn test_not_true() { - let program_string = include_str!("not_true.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_not_false() { - let program_string = include_str!("not_false.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_not_mutable() { - let program_string = include_str!("not_mutable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_conditional_mut() { - let program_string = include_str!("conditional_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_not_u32() { - let program_string = include_str!("not_u32.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Boolean or || - -#[test] -fn test_true_or_true() { - let program_string = include_str!("true_or_true.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_true_or_false() { - let program_string = include_str!("true_or_false.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_false_or_false() { - let program_string = include_str!("false_or_false.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_true_or_u32() { - let program_string = include_str!("true_or_u32.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Boolean and && - -#[test] -fn test_true_and_true() { - let program_string = include_str!("true_and_true.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_true_and_false() { - let program_string = include_str!("true_and_false.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_false_and_false() { - let program_string = include_str!("false_and_false.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_true_and_u32() { - let program_string = include_str!("true_and_u32.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// All - -#[test] -fn test_all() { - let program_string = include_str!("all.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/boolean/not_false.leo b/compiler/_otests/boolean/not_false.leo deleted file mode 100644 index 796b616871..0000000000 --- a/compiler/_otests/boolean/not_false.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.assert(!false == true); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/not_mutable.leo b/compiler/_otests/boolean/not_mutable.leo deleted file mode 100644 index 92588434e4..0000000000 --- a/compiler/_otests/boolean/not_mutable.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main () { - const b = false; - const a = !b; -} \ No newline at end of file diff --git a/compiler/_otests/boolean/not_true.leo b/compiler/_otests/boolean/not_true.leo deleted file mode 100644 index 8c87dffabb..0000000000 --- a/compiler/_otests/boolean/not_true.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.assert(!true == false); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/not_u32.leo b/compiler/_otests/boolean/not_u32.leo deleted file mode 100644 index 44491d785b..0000000000 --- a/compiler/_otests/boolean/not_u32.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() -> bool { - console.assert(!1u32 == 0u32); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/output/registers_false.out b/compiler/_otests/boolean/output/registers_false.out deleted file mode 100644 index 8ddb2792bd..0000000000 --- a/compiler/_otests/boolean/output/registers_false.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: bool = false; diff --git a/compiler/_otests/boolean/output/registers_true.out b/compiler/_otests/boolean/output/registers_true.out deleted file mode 100644 index ef0ca15b25..0000000000 --- a/compiler/_otests/boolean/output/registers_true.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: bool = true; diff --git a/compiler/_otests/boolean/output_register.leo b/compiler/_otests/boolean/output_register.leo deleted file mode 100644 index 6273b0a1df..0000000000 --- a/compiler/_otests/boolean/output_register.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() -> bool { - return input.registers.r; -} diff --git a/compiler/_otests/boolean/true_and_false.leo b/compiler/_otests/boolean/true_and_false.leo deleted file mode 100644 index 336dde7558..0000000000 --- a/compiler/_otests/boolean/true_and_false.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = true && false; - - console.assert(a == false); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/true_and_true.leo b/compiler/_otests/boolean/true_and_true.leo deleted file mode 100644 index dae445dcf8..0000000000 --- a/compiler/_otests/boolean/true_and_true.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = true && true; - - console.assert(a == true); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/true_and_u32.leo b/compiler/_otests/boolean/true_and_u32.leo deleted file mode 100644 index ad3ead9040..0000000000 --- a/compiler/_otests/boolean/true_and_u32.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a = true && 1u32; -} \ No newline at end of file diff --git a/compiler/_otests/boolean/true_or_false.leo b/compiler/_otests/boolean/true_or_false.leo deleted file mode 100644 index 216e473cdb..0000000000 --- a/compiler/_otests/boolean/true_or_false.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = true || false; - - console.assert(a == true); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/true_or_true.leo b/compiler/_otests/boolean/true_or_true.leo deleted file mode 100644 index fea8628b9f..0000000000 --- a/compiler/_otests/boolean/true_or_true.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = true || true; - - console.assert(a == true); -} \ No newline at end of file diff --git a/compiler/_otests/boolean/true_or_u32.leo b/compiler/_otests/boolean/true_or_u32.leo deleted file mode 100644 index 38dab727b9..0000000000 --- a/compiler/_otests/boolean/true_or_u32.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a = true || 1u32; -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/array_expansion.json b/compiler/_otests/canonicalization/array_expansion.json deleted file mode 100644 index 4b4f324e0d..0000000000 --- a/compiler/_otests/canonicalization/array_expansion.json +++ /dev/null @@ -1,359 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": {}, - "global_consts": {}, - "functions": { - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(a: [group; (2, 1)]) {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(a: [group; (2, 1)]) {\\\"}\"}", - "input": [ - { - "Variable": { - "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(a: [group; (2, 1)]) {\\\"}\"}", - "const_": false, - "mutable": true, - "type_": { - "Array": [ - { - "Array": [ - "Group", - [ - { - "value": "1" - } - ] - ] - }, - [ - { - "value": "2" - } - ] - ] - }, - "span": { - "line_start": 1, - "line_stop": 1, - "col_start": 15, - "col_stop": 16, - "path": "", - "content": "function main(a: [group; (2, 1)]) {" - } - } - } - ], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let b = [true; (6, 5, 4, 3, 2)];\\\"}\"}", - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - ], - "type_": null, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Boolean": [ - "true", - { - "line_start": 2, - "line_stop": 2, - "col_start": 12, - "col_stop": 16, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - ] - } - }, - "dimensions": [ - { - "value": "2" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "3" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "4" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "5" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "6" - } - ], - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 11, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 3, - "col_stop": 34, - "path": "", - "content": " let b = [true; (6, 5, 4, 3, 2)];" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let c: [u32; (1, 2)] = [0u32; (1, 2)];\\\"}\"}", - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - } - ], - "type_": { - "Array": [ - { - "Array": [ - { - "IntegerType": "U32" - }, - [ - { - "value": "2" - } - ] - ] - }, - [ - { - "value": "1" - } - ] - ] - }, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 3, - "line_stop": 3, - "col_start": 27, - "col_stop": 31, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - ] - } - }, - "dimensions": [ - { - "value": "2" - } - ], - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 26, - "col_stop": 40, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - } - }, - "dimensions": [ - { - "value": "1" - } - ], - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 26, - "col_stop": 40, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - } - }, - "span": { - "line_start": 3, - "line_stop": 3, - "col_start": 3, - "col_stop": 40, - "path": "", - "content": " let c: [u32; (1, 2)] = [0u32; (1, 2)];" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let d = [0i8; (1)];\\\"}\"}", - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let d = [0i8; (1)];" - } - } - ], - "type_": null, - "value": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "I8", - "0", - { - "line_start": 4, - "line_stop": 4, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " let d = [0i8; (1)];" - } - ] - } - }, - "dimensions": [ - { - "value": "1" - } - ], - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 11, - "col_stop": 21, - "path": "", - "content": " let d = [0i8; (1)];" - } - } - }, - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 3, - "col_stop": 21, - "path": "", - "content": " let d = [0i8; (1)];" - } - } - } - ], - "span": { - "line_start": 1, - "line_stop": 7, - "col_start": 35, - "col_stop": 2, - "path": "", - "content": "function main(a: [group; (2, 1)]) {\n...\n}" - } - }, - "span": { - "line_start": 1, - "line_stop": 7, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main(a: [group; (2, 1)]) {\n...\n}\n\n\n\n" - } - } - } -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/array_expansion.leo b/compiler/_otests/canonicalization/array_expansion.leo deleted file mode 100644 index c83d9ce2c4..0000000000 --- a/compiler/_otests/canonicalization/array_expansion.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main(a: [group; (2, 1)]) { - let b = [true; (6, 5, 4, 3, 2)]; - let c: [u32; (1, 2)] = [0u32; (1, 2)]; - let d = [0i8; (1)]; - // let d = [true; 0]; - // let e = [true; (0)]; -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/array_size_zero_fail.leo b/compiler/_otests/canonicalization/array_size_zero_fail.leo deleted file mode 100644 index b90563dc4d..0000000000 --- a/compiler/_otests/canonicalization/array_size_zero_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - let a = [true; (0)]; -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/big_self_in_circuit_replacement.json b/compiler/_otests/canonicalization/big_self_in_circuit_replacement.json deleted file mode 100644 index ac4384991a..0000000000 --- a/compiler/_otests/canonicalization/big_self_in_circuit_replacement.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": { - "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": { - "circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", - "members": [ - { - "CircuitVariable": [ - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: u32\\\"}\"}", - { - "IntegerType": "U32" - } - ] - }, - { - "CircuitFunction": { - "annotations": [], - "identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new() -> Self {\\\"}\"}", - "input": [], - "output": { - "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let new: Self = Self {\\\"}\"}", - "span": { - "line_start": 5, - "line_stop": 5, - "col_start": 9, - "col_stop": 12, - "path": "", - "content": " let new: Self = Self {" - } - } - ], - "type_": { - "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" - }, - "value": { - "CircuitInit": { - "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", - "members": [ - { - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: 1u32\\\"}\"}", - "expression": { - "Value": { - "Integer": [ - "U32", - "1", - { - "line_start": 6, - "line_stop": 6, - "col_start": 10, - "col_stop": 14, - "path": "", - "content": " x: 1u32" - } - ] - } - } - } - ], - "span": { - "line_start": 5, - "line_stop": 7, - "col_start": 21, - "col_stop": 6, - "path": "", - "content": " let new: Self = Self {\n...\n };" - } - } - }, - "span": { - "line_start": 5, - "line_stop": 7, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " let new: Self = Self {\n...\n };" - } - } - }, - { - "Return": { - "expression": { - "Identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return new\\\"}\"}" - }, - "span": { - "line_start": 9, - "line_stop": 9, - "col_start": 5, - "col_stop": 15, - "path": "", - "content": " return new" - } - } - } - ], - "span": { - "line_start": 4, - "line_stop": 10, - "col_start": 26, - "col_stop": 4, - "path": "", - "content": " function new() -> Self {\n...\n }" - } - }, - "span": { - "line_start": 4, - "line_stop": 10, - "col_start": 3, - "col_stop": 4, - "path": "", - "content": " function new() -> Self {\n...\n }\n\n\n\n" - } - } - } - ] - } - }, - "global_consts": {}, - "functions": { - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}", - "span": { - "line_start": 14, - "line_stop": 14, - "col_start": 7, - "col_stop": 10, - "path": "", - "content": " let foo: Foo = Foo::new();" - } - } - ], - "type_": { - "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}" - }, - "value": { - "Call": { - "function": { - "CircuitStaticFunctionAccess": { - "circuit": { - "Identifier": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}" - }, - "name": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo: Foo = Foo::new();\\\"}\"}", - "span": { - "line_start": 14, - "line_stop": 14, - "col_start": 18, - "col_stop": 26, - "path": "", - "content": " let foo: Foo = Foo::new();" - } - } - }, - "arguments": [], - "span": { - "line_start": 14, - "line_stop": 14, - "col_start": 18, - "col_stop": 28, - "path": "", - "content": " let foo: Foo = Foo::new();" - } - } - }, - "span": { - "line_start": 14, - "line_stop": 14, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " let foo: Foo = Foo::new();" - } - } - } - ], - "span": { - "line_start": 13, - "line_stop": 15, - "col_start": 17, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - }, - "span": { - "line_start": 13, - "line_stop": 15, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - } - } -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/big_self_in_circuit_replacement.leo b/compiler/_otests/canonicalization/big_self_in_circuit_replacement.leo deleted file mode 100644 index 4081e46cbf..0000000000 --- a/compiler/_otests/canonicalization/big_self_in_circuit_replacement.leo +++ /dev/null @@ -1,15 +0,0 @@ -circuit Foo { - x: u32 - - function new() -> Self { - let new: Self = Self { - x: 1u32 - }; - - return new; - } -} - -function main() { - let foo: Foo = Foo::new(); -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/big_self_outside_circuit_fail.leo b/compiler/_otests/canonicalization/big_self_outside_circuit_fail.leo deleted file mode 100644 index 6f5100adde..0000000000 --- a/compiler/_otests/canonicalization/big_self_outside_circuit_fail.leo +++ /dev/null @@ -1,15 +0,0 @@ -circuit Foo { - x: u32 - - function new() -> Self { - let new: Self = Self { - x: 1u32 - }; - - return new; - } -} - -function main() { - let foo: Self = Foo::new(); -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/compound_assignment.json b/compiler/_otests/canonicalization/compound_assignment.json deleted file mode 100644 index 49ba0bdf78..0000000000 --- a/compiler/_otests/canonicalization/compound_assignment.json +++ /dev/null @@ -1,2033 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "global_consts": {}, - "circuits": { - "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": { - "circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}", - "members": [ - { - "CircuitVariable": [ - "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" f: u8,\\\"}\"}", - { - "IntegerType": "U8" - } - ] - }, - { - "CircuitVariable": [ - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y: (u8, u8),\\\"}\"}", - { - "Tuple": [ - { - "IntegerType": "U8" - }, - { - "IntegerType": "U8" - } - ] - } - ] - }, - { - "CircuitFunction": { - "annotations": [], - "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function z (mut self) -> u16 {\\\"}\"}", - "input": [ - { - "MutSelfKeyword": "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function z (mut self) -> u16 {\\\"}\"}" - } - ], - "output": { - "IntegerType": "U16" - }, - "block": { - "statements": [ - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}", - "accesses": [ - { - "Member": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}" - }, - { - "Tuple": [ - { - "value": "0" - }, - { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 13, - "path": "", - "content": " self.y.0 += 1u8;" - } - ] - } - ], - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 13, - "path": "", - "content": " self.y.0 += 1u8;" - } - }, - "value": { - "Binary": { - "left": { - "TupleAccess": { - "tuple": { - "CircuitMemberAccess": { - "circuit": { - "Identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}" - }, - "name": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}", - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - } - }, - "index": { - "value": "0" - }, - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 6, - "line_stop": 6, - "col_start": 17, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - } - }, - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 20, - "path": "", - "content": " self.y.0 += 1u8;" - } - } - }, - { - "Return": { - "expression": { - "Value": { - "Integer": [ - "U16", - "1", - { - "line_start": 7, - "line_stop": 7, - "col_start": 12, - "col_stop": 16, - "path": "", - "content": " return 1u16" - } - ] - } - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 5, - "col_stop": 16, - "path": "", - "content": " return 1u16" - } - } - } - ], - "span": { - "line_start": 5, - "line_stop": 8, - "col_start": 32, - "col_stop": 4, - "path": "", - "content": " function z (mut self) -> u16 {\n...\n }" - } - }, - "span": { - "line_start": 5, - "line_stop": 8, - "col_start": 3, - "col_stop": 4, - "path": "", - "content": " function z (mut self) -> u16 {\n...\n }\n" - } - } - } - ] - } - }, - "functions": { - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x = 10u32;\\\"}\"}", - "span": { - "line_start": 11, - "line_stop": 11, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let x = 10u32;" - } - } - ], - "type_": { - "IntegerType": "U32" - }, - "value": { - "Value": { - "Integer": [ - "U32", - "10", - { - "line_start": 11, - "line_stop": 11, - "col_start": 11, - "col_stop": 16, - "path": "", - "content": " let x = 10u32;" - } - ] - } - }, - "span": { - "line_start": 11, - "line_stop": 11, - "col_start": 3, - "col_stop": 16, - "path": "", - "content": " let x = 10u32;" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x += 20;\\\"}\"}", - "accesses": [], - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 3, - "col_stop": 4, - "path": "", - "content": " x += 20;" - } - }, - "value": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x += 20;\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U32", - "20", - { - "line_start": 12, - "line_stop": 12, - "col_start": 8, - "col_stop": 10, - "path": "", - "content": " x += 20;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " x += 20;" - } - } - }, - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " x += 20;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(x == 30u32);\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U32", - "30", - { - "line_start": 13, - "line_stop": 13, - "col_start": 23, - "col_stop": 28, - "path": "", - "content": " console.assert(x == 30u32);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 18, - "col_stop": 28, - "path": "", - "content": " console.assert(x == 30u32);" - } - } - } - }, - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " console.assert(x == 30u32);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y = [1u8, 2u8];\\\"}\"}", - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let y = [1u8, 2u8];" - } - } - ], - "type_": { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "2" - } - ] - ] - }, - "value": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 15, - "line_stop": 15, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " let y = [1u8, 2u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 15, - "line_stop": 15, - "col_start": 17, - "col_stop": 20, - "path": "", - "content": " let y = [1u8, 2u8];" - } - ] - } - } - } - ], - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 11, - "col_stop": 21, - "path": "", - "content": " let y = [1u8, 2u8];" - } - } - }, - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 3, - "col_stop": 21, - "path": "", - "content": " let y = [1u8, 2u8];" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0] += 3u8;\\\"}\"}", - "accesses": [ - { - "ArrayIndex": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 16, - "line_stop": 16, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " y[0] += 3u8;" - } - ] - } - } - } - ], - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 3, - "col_stop": 7, - "path": "", - "content": " y[0] += 3u8;" - } - }, - "value": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0] += 3u8;\\\"}\"}" - }, - "index": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 16, - "line_stop": 16, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " y[0] += 3u8;" - } - ] - } - }, - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 3, - "col_stop": 14, - "path": "", - "content": " y[0] += 3u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "3", - { - "line_start": 16, - "line_stop": 16, - "col_start": 11, - "col_stop": 14, - "path": "", - "content": " y[0] += 3u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 3, - "col_stop": 14, - "path": "", - "content": " y[0] += 3u8;" - } - } - }, - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 3, - "col_stop": 14, - "path": "", - "content": " y[0] += 3u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(y[0] == 4u8);\\\"}\"}" - }, - "index": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 17, - "line_stop": 17, - "col_start": 20, - "col_stop": 21, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - ] - } - }, - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 18, - "col_stop": 22, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "4", - { - "line_start": 17, - "line_stop": 17, - "col_start": 26, - "col_stop": 29, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 18, - "col_stop": 29, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - } - } - }, - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 3, - "col_stop": 29, - "path": "", - "content": " console.assert(y[0] == 4u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let z = (1u8, 2u8);\\\"}\"}", - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let z = (1u8, 2u8);" - } - } - ], - "type_": { - "Tuple": [ - { - "IntegerType": "U8" - }, - { - "IntegerType": "U8" - } - ] - }, - "value": { - "TupleInit": { - "elements": [ - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 19, - "line_stop": 19, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " let z = (1u8, 2u8);" - } - ] - } - }, - { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 19, - "line_stop": 19, - "col_start": 17, - "col_stop": 20, - "path": "", - "content": " let z = (1u8, 2u8);" - } - ] - } - } - ], - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 11, - "col_stop": 21, - "path": "", - "content": " let z = (1u8, 2u8);" - } - } - }, - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 3, - "col_stop": 21, - "path": "", - "content": " let z = (1u8, 2u8);" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z.1 += 3u8;\\\"}\"}", - "accesses": [ - { - "Tuple": [ - { - "value": "1" - }, - { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 6, - "path": "", - "content": " z.1 += 3u8;" - } - ] - } - ], - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 6, - "path": "", - "content": " z.1 += 3u8;" - } - }, - "value": { - "Binary": { - "left": { - "TupleAccess": { - "tuple": { - "Identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z.1 += 3u8;\\\"}\"}" - }, - "index": { - "value": "1" - }, - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 13, - "path": "", - "content": " z.1 += 3u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "3", - { - "line_start": 20, - "line_stop": 20, - "col_start": 10, - "col_stop": 13, - "path": "", - "content": " z.1 += 3u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 13, - "path": "", - "content": " z.1 += 3u8;" - } - } - }, - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 13, - "path": "", - "content": " z.1 += 3u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "TupleAccess": { - "tuple": { - "Identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(z.1 == 5u8);\\\"}\"}" - }, - "index": { - "value": "1" - }, - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 18, - "col_stop": 21, - "path": "", - "content": " console.assert(z.1 == 5u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "5", - { - "line_start": 21, - "line_stop": 21, - "col_start": 25, - "col_stop": 28, - "path": "", - "content": " console.assert(z.1 == 5u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 18, - "col_stop": 28, - "path": "", - "content": " console.assert(z.1 == 5u8);" - } - } - } - }, - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " console.assert(z.1 == 5u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 7, - "col_stop": 10, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - } - ], - "type_": { - "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}" - }, - "value": { - "CircuitInit": { - "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", - "members": [ - { - "identifier": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", - "expression": { - "Value": { - "Integer": [ - "U8", - "6", - { - "line_start": 23, - "line_stop": 23, - "col_start": 22, - "col_stop": 25, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - ] - } - } - }, - { - "identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}", - "expression": { - "TupleInit": { - "elements": [ - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 23, - "line_stop": 23, - "col_start": 31, - "col_stop": 34, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - ] - } - }, - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 23, - "line_stop": 23, - "col_start": 36, - "col_stop": 39, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - ] - } - } - ], - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 30, - "col_stop": 40, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - } - } - } - ], - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 13, - "col_stop": 42, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - } - }, - "span": { - "line_start": 23, - "line_stop": 23, - "col_start": 3, - "col_stop": 42, - "path": "", - "content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":3,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}", - "accesses": [ - { - "Member": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}" - } - ], - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 3, - "col_stop": 8, - "path": "", - "content": " foo.f += 2u8;" - } - }, - "value": { - "Binary": { - "left": { - "CircuitMemberAccess": { - "circuit": { - "Identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":3,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}" - }, - "name": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}", - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 3, - "col_stop": 15, - "path": "", - "content": " foo.f += 2u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 24, - "line_stop": 24, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " foo.f += 2u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 3, - "col_stop": 15, - "path": "", - "content": " foo.f += 2u8;" - } - } - }, - "span": { - "line_start": 24, - "line_stop": 24, - "col_start": 3, - "col_stop": 15, - "path": "", - "content": " foo.f += 2u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "CircuitMemberAccess": { - "circuit": { - "Identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(foo.f == 8u8);\\\"}\"}" - }, - "name": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(foo.f == 8u8);\\\"}\"}", - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 18, - "col_stop": 23, - "path": "", - "content": " console.assert(foo.f == 8u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "8", - { - "line_start": 25, - "line_stop": 25, - "col_start": 27, - "col_stop": 30, - "path": "", - "content": " console.assert(foo.f == 8u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 18, - "col_stop": 30, - "path": "", - "content": " console.assert(foo.f == 8u8);" - } - } - } - }, - "span": { - "line_start": 25, - "line_stop": 25, - "col_start": 3, - "col_stop": 30, - "path": "", - "content": " console.assert(foo.f == 8u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":7,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let complex = 2u8;\\\"}\"}", - "span": { - "line_start": 27, - "line_stop": 27, - "col_start": 7, - "col_stop": 14, - "path": "", - "content": " let complex = 2u8;" - } - } - ], - "type_": { - "IntegerType": "U8" - }, - "value": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 27, - "line_stop": 27, - "col_start": 17, - "col_stop": 20, - "path": "", - "content": " let complex = 2u8;" - } - ] - } - }, - "span": { - "line_start": 27, - "line_stop": 27, - "col_start": 3, - "col_stop": 20, - "path": "", - "content": " let complex = 2u8;" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":3,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" complex += 22u8 - 2u8+ 1u8;\\\"}\"}", - "accesses": [], - "span": { - "line_start": 28, - "line_stop": 28, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - }, - "value": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":3,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" complex += 22u8 - 2u8+ 1u8;\\\"}\"}" - }, - "right": { - "Binary": { - "left": { - "Binary": { - "left": { - "Value": { - "Integer": [ - "U8", - "22", - { - "line_start": 28, - "line_stop": 28, - "col_start": 14, - "col_stop": 18, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - ] - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 28, - "line_stop": 28, - "col_start": 21, - "col_stop": 24, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - ] - } - }, - "op": "Sub", - "span": { - "line_start": 28, - "line_stop": 28, - "col_start": 14, - "col_stop": 24, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 28, - "line_stop": 28, - "col_start": 26, - "col_stop": 29, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 28, - "line_stop": 28, - "col_start": 14, - "col_stop": 29, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - } - }, - "op": "Add", - "span": { - "line_start": 28, - "line_stop": 28, - "col_start": 3, - "col_stop": 29, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - } - }, - "span": { - "line_start": 28, - "line_stop": 28, - "col_start": 3, - "col_stop": 29, - "path": "", - "content": " complex += 22u8 - 2u8+ 1u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":18,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(complex == 23u8);\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U8", - "23", - { - "line_start": 29, - "line_stop": 29, - "col_start": 29, - "col_stop": 33, - "path": "", - "content": " console.assert(complex == 23u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 29, - "line_stop": 29, - "col_start": 18, - "col_stop": 33, - "path": "", - "content": " console.assert(complex == 23u8);" - } - } - } - }, - "span": { - "line_start": 29, - "line_stop": 29, - "col_start": 3, - "col_stop": 33, - "path": "", - "content": " console.assert(complex == 23u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let a = [[0u8; 1]; 4];\\\"}\"}", - "span": { - "line_start": 30, - "line_stop": 30, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - } - ], - "type_": { - "Array": [ - { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "1" - } - ] - ] - }, - [ - { - "value": "4" - } - ] - ] - }, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U8", - "0", - { - "line_start": 30, - "line_stop": 30, - "col_start": 13, - "col_stop": 16, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - ] - } - }, - "dimensions": [ - { - "value": "1" - } - ], - "span": { - "line_start": 30, - "line_stop": 30, - "col_start": 12, - "col_stop": 20, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - } - }, - "dimensions": [ - { - "value": "4" - } - ], - "span": { - "line_start": 30, - "line_stop": 30, - "col_start": 11, - "col_stop": 24, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - } - }, - "span": { - "line_start": 30, - "line_stop": 30, - "col_start": 3, - "col_stop": 24, - "path": "", - "content": " let a = [[0u8; 1]; 4];" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" a[2][0] += 1u8;\\\"}\"}", - "accesses": [ - { - "ArrayIndex": { - "Value": { - "Integer": [ - "U32", - "2", - { - "line_start": 31, - "line_stop": 31, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - } - }, - { - "ArrayIndex": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 31, - "line_stop": 31, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - } - } - ], - "span": { - "line_start": 31, - "line_stop": 31, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " a[2][0] += 1u8;" - } - }, - "value": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" a[2][0] += 1u8;\\\"}\"}" - }, - "index": { - "Value": { - "Integer": [ - "U32", - "2", - { - "line_start": 31, - "line_stop": 31, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - }, - "span": { - "line_start": 31, - "line_stop": 31, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - } - }, - "index": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 31, - "line_stop": 31, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - }, - "span": { - "line_start": 31, - "line_stop": 31, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 31, - "line_stop": 31, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 31, - "line_stop": 31, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - } - }, - "span": { - "line_start": 31, - "line_stop": 31, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " a[2][0] += 1u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(a[2][0] == 1u8);\\\"}\"}" - }, - "index": { - "Value": { - "Integer": [ - "U32", - "2", - { - "line_start": 32, - "line_stop": 32, - "col_start": 20, - "col_stop": 21, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "span": { - "line_start": 32, - "line_stop": 32, - "col_start": 18, - "col_stop": 22, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - "index": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 32, - "line_stop": 32, - "col_start": 23, - "col_stop": 24, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "span": { - "line_start": 32, - "line_stop": 32, - "col_start": 18, - "col_stop": 25, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 32, - "line_stop": 32, - "col_start": 29, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 32, - "line_stop": 32, - "col_start": 18, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - } - }, - "span": { - "line_start": 32, - "line_stop": 32, - "col_start": 3, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let b = [0u8; (4, 1)];\\\"}\"}", - "span": { - "line_start": 34, - "line_stop": 34, - "col_start": 7, - "col_stop": 8, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - } - ], - "type_": { - "Array": [ - { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "1" - } - ] - ] - }, - [ - { - "value": "4" - } - ] - ] - }, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U8", - "0", - { - "line_start": 34, - "line_stop": 34, - "col_start": 12, - "col_stop": 15, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - ] - } - }, - "dimensions": [ - { - "value": "1" - } - ], - "span": { - "line_start": 34, - "line_stop": 34, - "col_start": 11, - "col_stop": 24, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - } - }, - "dimensions": [ - { - "value": "4" - } - ], - "span": { - "line_start": 34, - "line_stop": 34, - "col_start": 11, - "col_stop": 24, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - } - }, - "span": { - "line_start": 34, - "line_stop": 34, - "col_start": 3, - "col_stop": 24, - "path": "", - "content": " let b = [0u8; (4, 1)];" - } - } - }, - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" b[2][0] += 1u8;\\\"}\"}", - "accesses": [ - { - "ArrayIndex": { - "Value": { - "Integer": [ - "U32", - "2", - { - "line_start": 35, - "line_stop": 35, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - } - }, - { - "ArrayIndex": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 35, - "line_stop": 35, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - } - } - ], - "span": { - "line_start": 35, - "line_stop": 35, - "col_start": 3, - "col_stop": 10, - "path": "", - "content": " b[2][0] += 1u8;" - } - }, - "value": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" b[2][0] += 1u8;\\\"}\"}" - }, - "index": { - "Value": { - "Integer": [ - "U32", - "2", - { - "line_start": 35, - "line_stop": 35, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - }, - "span": { - "line_start": 35, - "line_stop": 35, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - } - }, - "index": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 35, - "line_stop": 35, - "col_start": 8, - "col_stop": 9, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - }, - "span": { - "line_start": 35, - "line_stop": 35, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 35, - "line_stop": 35, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - ] - } - }, - "op": "Add", - "span": { - "line_start": 35, - "line_stop": 35, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - } - }, - "span": { - "line_start": 35, - "line_stop": 35, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " b[2][0] += 1u8;" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "ArrayAccess": { - "array": { - "ArrayAccess": { - "array": { - "Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(a[2][0] == 1u8);\\\"}\"}" - }, - "index": { - "Value": { - "Integer": [ - "U32", - "2", - { - "line_start": 36, - "line_stop": 36, - "col_start": 20, - "col_stop": 21, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "span": { - "line_start": 36, - "line_stop": 36, - "col_start": 18, - "col_stop": 22, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - "index": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 36, - "line_stop": 36, - "col_start": 23, - "col_stop": 24, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "span": { - "line_start": 36, - "line_stop": 36, - "col_start": 18, - "col_stop": 25, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - }, - "right": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 36, - "line_stop": 36, - "col_start": 29, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 36, - "line_stop": 36, - "col_start": 18, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - } - }, - "span": { - "line_start": 36, - "line_stop": 36, - "col_start": 3, - "col_stop": 32, - "path": "", - "content": " console.assert(a[2][0] == 1u8);" - } - } - } - ], - "span": { - "line_start": 10, - "line_stop": 37, - "col_start": 17, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - }, - "span": { - "line_start": 10, - "line_stop": 37, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" - } - } - } -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/compound_assignment.leo b/compiler/_otests/canonicalization/compound_assignment.leo deleted file mode 100644 index 1a6f2171fe..0000000000 --- a/compiler/_otests/canonicalization/compound_assignment.leo +++ /dev/null @@ -1,37 +0,0 @@ -circuit Foo { - f: u8, - y: (u8, u8), - - function z (mut self) -> u16 { - self.y.0 += 1u8; - return 1u16; - } -} -function main() { - let x = 10u32; - x += 20; - console.assert(x == 30u32); - - let y = [1u8, 2u8]; - y[0] += 3u8; - console.assert(y[0] == 4u8); - - let z = (1u8, 2u8); - z.1 += 3u8; - console.assert(z.1 == 5u8); - - let foo = Foo { f: 6u8, y: (1u8, 1u8) }; - foo.f += 2u8; - console.assert(foo.f == 8u8); - - let complex = 2u8; - complex += 22u8 - 2u8+ 1u8; - console.assert(complex == 23u8); - let a = [[0u8; 1]; 4]; - a[2][0] += 1u8; - console.assert(a[2][0] == 1u8); - - let b = [0u8; (4, 1)]; - b[2][0] += 1u8; - console.assert(a[2][0] == 1u8); -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/illegal_array_range_fail.leo b/compiler/_otests/canonicalization/illegal_array_range_fail.leo deleted file mode 100644 index af14957712..0000000000 --- a/compiler/_otests/canonicalization/illegal_array_range_fail.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main () { - let x = [1u32; 5]; - x[..2] += 1; -} \ No newline at end of file diff --git a/compiler/_otests/canonicalization/input/array_expansion.in b/compiler/_otests/canonicalization/input/array_expansion.in deleted file mode 100644 index 072fb7677c..0000000000 --- a/compiler/_otests/canonicalization/input/array_expansion.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: [group; (2, 1)] = [1group; (2, 1)]; \ No newline at end of file diff --git a/compiler/_otests/canonicalization/mod.rs b/compiler/_otests/canonicalization/mod.rs deleted file mode 100644 index f420b2370c..0000000000 --- a/compiler/_otests/canonicalization/mod.rs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_program, parse_program_with_input}; -use leo_ast::Ast; -use leo_parser::parser; - -pub fn parse_program_ast(file_string: &str) -> Ast { - const TEST_PROGRAM_PATH: &str = ""; - let test_program_file_path = std::path::PathBuf::from(TEST_PROGRAM_PATH); - - let mut ast = Ast::new( - parser::parse(test_program_file_path.to_str().expect("unwrap fail"), &file_string) - .expect("Failed to parse file."), - ); - ast.canonicalize().expect("Failed to canonicalize program."); - - ast -} - -#[test] -fn test_big_self_in_circuit_replacement() { - // Check program is valid. - let program_string = include_str!("big_self_in_circuit_replacement.leo"); - let program = parse_program(program_string).unwrap(); - assert_satisfied(program); - - // Check we get expected ast. - let ast = parse_program_ast(program_string); - let expected_json = include_str!("big_self_in_circuit_replacement.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} - -#[test] -fn test_big_self_outside_circuit_fail() { - // Check program is invalid. - let program_string = include_str!("big_self_outside_circuit_fail.leo"); - let program = parse_program(program_string); - assert!(program.is_err()); -} - -#[test] -fn test_array_expansion() { - let program_string = include_str!("array_expansion.leo"); - let input_string = include_str!("input/array_expansion.in"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - assert_satisfied(program); - - let ast = parse_program_ast(program_string); - let expected_json = include_str!("array_expansion.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} - -#[test] -fn test_array_size_zero_fail() { - let program_string = include_str!("array_size_zero_fail.leo"); - let program = parse_program(program_string); - assert!(program.is_err()); -} - -#[test] -fn test_compound_assignment() { - let program_string = include_str!("compound_assignment.leo"); - let program = parse_program(program_string).unwrap(); - assert_satisfied(program); - - let ast = parse_program_ast(program_string); - let expected_json = include_str!("compound_assignment.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} - -#[test] -fn test_illegal_array_range_fail() { - // Check program is invalid. - let program_string = include_str!("illegal_array_range_fail.leo"); - let program = parse_program(program_string); - assert!(program.is_err()); -} diff --git a/compiler/_otests/circuits/const_self_variable.leo b/compiler/_otests/circuits/const_self_variable.leo deleted file mode 100644 index 8ba32ba0df..0000000000 --- a/compiler/_otests/circuits/const_self_variable.leo +++ /dev/null @@ -1,13 +0,0 @@ -circuit Foo { - a: u8, - - function use_a(const self) -> u8 { - return self.a + 1; - } -} - -function main() { - let f = Foo { a: 0u8 }; - - console.assert(1u8 == f.use_a()); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/const_self_variable_fail.leo b/compiler/_otests/circuits/const_self_variable_fail.leo deleted file mode 100644 index fca9620946..0000000000 --- a/compiler/_otests/circuits/const_self_variable_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -circuit Foo { - a: u8, - - function set_a(const self, new: u8) { - self.a = new; - } -} - -function main() { - let f = Foo { a: 0u8 }; - - f.set_a(1u8); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/define_circuit_inside_circuit_function.leo b/compiler/_otests/circuits/define_circuit_inside_circuit_function.leo deleted file mode 100644 index cedabf2185..0000000000 --- a/compiler/_otests/circuits/define_circuit_inside_circuit_function.leo +++ /dev/null @@ -1,13 +0,0 @@ -circuit Foo { - a: u32, -} - -circuit Bar { - function bar() { - const f = Foo { a: 0u32 }; - } -} - -function main() { - const b = Bar::bar(); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/duplicate_name_context.leo b/compiler/_otests/circuits/duplicate_name_context.leo deleted file mode 100644 index 8644d27fcb..0000000000 --- a/compiler/_otests/circuits/duplicate_name_context.leo +++ /dev/null @@ -1,13 +0,0 @@ -circuit Bar { - b2: u32 - - function add_five(z:u32) -> u32 { - return z+5u32; - } -} - -function main () { - const Bar = 66u32; - const k1 = Bar{ b2: 30u32 }; - const k2 = Bar::add_five(55u32); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/inline.leo b/compiler/_otests/circuits/inline.leo deleted file mode 100644 index 9ba06f4191..0000000000 --- a/compiler/_otests/circuits/inline.leo +++ /dev/null @@ -1,7 +0,0 @@ -circuit Foo { - x: u32 -} - -function main() { - const a = Foo { x: 1u32 }; -} \ No newline at end of file diff --git a/compiler/_otests/circuits/inline_fail.leo b/compiler/_otests/circuits/inline_fail.leo deleted file mode 100644 index 01597005fb..0000000000 --- a/compiler/_otests/circuits/inline_fail.leo +++ /dev/null @@ -1,7 +0,0 @@ -circuit Foo { - x: u32 -} - -function main() { - const a = Foo { y: 0u32 }; -} \ No newline at end of file diff --git a/compiler/_otests/circuits/inline_member_fail.leo b/compiler/_otests/circuits/inline_member_fail.leo deleted file mode 100644 index 59f6d7992b..0000000000 --- a/compiler/_otests/circuits/inline_member_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -circuit Foo { - x: u8 -} - -function main() { - const y: u8 = 1; - const a = Foo { y }; -} \ No newline at end of file diff --git a/compiler/_otests/circuits/inline_member_pass.leo b/compiler/_otests/circuits/inline_member_pass.leo deleted file mode 100644 index 6fd7f7dff7..0000000000 --- a/compiler/_otests/circuits/inline_member_pass.leo +++ /dev/null @@ -1,13 +0,0 @@ -circuit Foo { - x: u8 - - function new(x: u8) -> Self { - return Self { x }; - } -} - -function main() { - const x: u8 = 1; - const a = Foo { x }; - const b = Foo::new(x); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/inline_undefined.leo b/compiler/_otests/circuits/inline_undefined.leo deleted file mode 100644 index 40c4cf722c..0000000000 --- a/compiler/_otests/circuits/inline_undefined.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a = Foo { }; -} \ No newline at end of file diff --git a/compiler/_otests/circuits/member_function.leo b/compiler/_otests/circuits/member_function.leo deleted file mode 100644 index eee44be448..0000000000 --- a/compiler/_otests/circuits/member_function.leo +++ /dev/null @@ -1,13 +0,0 @@ -circuit Foo { - x: u32, - - function echo(self) -> u32 { - return self.x; - } -} - -function main() { - const a = Foo { x: 1u32 }; - - console.assert(a.echo() == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/member_function_fail.leo b/compiler/_otests/circuits/member_function_fail.leo deleted file mode 100644 index 57b15383a3..0000000000 --- a/compiler/_otests/circuits/member_function_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main() { - const a = Foo { }; - const err = a.echoed(1u32); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/member_function_invalid.leo b/compiler/_otests/circuits/member_function_invalid.leo deleted file mode 100644 index 7283cf144d..0000000000 --- a/compiler/_otests/circuits/member_function_invalid.leo +++ /dev/null @@ -1,10 +0,0 @@ -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main() { - const a = Foo { }; - const err = a.echo(1u32); // echo is a static function and must be accessed using `::` -} \ No newline at end of file diff --git a/compiler/_otests/circuits/member_function_nested.leo b/compiler/_otests/circuits/member_function_nested.leo deleted file mode 100644 index b8bf172947..0000000000 --- a/compiler/_otests/circuits/member_function_nested.leo +++ /dev/null @@ -1,18 +0,0 @@ -circuit Foo { - x: u32, - - function add_x(self, y: u32) -> u32 { - return self.x + y; - } - - function call_add_x(self, y: u32) -> u32 { - return self.add_x(y); - } -} - -function main() { - const a = Foo { x: 1u32 }; - const b = a.add_x(1u32); - - console.assert(b == 2u32); -} diff --git a/compiler/_otests/circuits/member_static_function.leo b/compiler/_otests/circuits/member_static_function.leo deleted file mode 100644 index 68f6065754..0000000000 --- a/compiler/_otests/circuits/member_static_function.leo +++ /dev/null @@ -1,11 +0,0 @@ -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main() { - const a = Foo::echo(1u32); - - console.assert(a == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/member_static_function_invalid.leo b/compiler/_otests/circuits/member_static_function_invalid.leo deleted file mode 100644 index b886cff8fa..0000000000 --- a/compiler/_otests/circuits/member_static_function_invalid.leo +++ /dev/null @@ -1,9 +0,0 @@ -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main() { - const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::` -} \ No newline at end of file diff --git a/compiler/_otests/circuits/member_static_function_nested.leo b/compiler/_otests/circuits/member_static_function_nested.leo deleted file mode 100644 index ef536e3f6e..0000000000 --- a/compiler/_otests/circuits/member_static_function_nested.leo +++ /dev/null @@ -1,15 +0,0 @@ -circuit Foo { - function qux() {} - - function bar() { - Self::qux(); - } - - function baz() { - Self::bar(); - } -} - -function main() { - Foo::baz(); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/member_static_function_undefined.leo b/compiler/_otests/circuits/member_static_function_undefined.leo deleted file mode 100644 index 121c80e34c..0000000000 --- a/compiler/_otests/circuits/member_static_function_undefined.leo +++ /dev/null @@ -1,9 +0,0 @@ -circuit Foo { - function echo(x: u32) -> u32 { - return x; - } -} - -function main() { - const err = Foo::echoed(1u32); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/member_variable.leo b/compiler/_otests/circuits/member_variable.leo deleted file mode 100644 index a3f3fbe7e6..0000000000 --- a/compiler/_otests/circuits/member_variable.leo +++ /dev/null @@ -1,9 +0,0 @@ -circuit Foo { - x: u32, -} - -function main() { - const a = Foo { x: 1u32 }; - - console.assert(a.x == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/member_variable_and_function.leo b/compiler/_otests/circuits/member_variable_and_function.leo deleted file mode 100644 index f90cdca072..0000000000 --- a/compiler/_otests/circuits/member_variable_and_function.leo +++ /dev/null @@ -1,15 +0,0 @@ -circuit Foo { - foo: u32, - - function bar() -> u32 { - return 1u32; - } -} - -function main() { - const a = Foo { foo: 1 }; - - const b = a.foo + Foo::bar(); - - console.assert(b == 2u32); -} diff --git a/compiler/_otests/circuits/member_variable_fail.leo b/compiler/_otests/circuits/member_variable_fail.leo deleted file mode 100644 index fdf42068d5..0000000000 --- a/compiler/_otests/circuits/member_variable_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -circuit Foo { - x: u32 -} - -function main() { - const a = Foo { x: 1u32 }; - - const err = a.y; -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mod.rs b/compiler/_otests/circuits/mod.rs deleted file mode 100644 index 093e2263e1..0000000000 --- a/compiler/_otests/circuits/mod.rs +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_asg_error, parse_program}; - -// Expressions - -#[test] -fn test_inline() { - let program_string = include_str!("inline.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_inline_fail() { - let program_string = include_str!("inline_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_inline_undefined() { - let program_string = include_str!("inline_undefined.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Members - -#[test] -fn test_member_variable() { - let program_string = include_str!("member_variable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_variable_fail() { - let program_string = include_str!("member_variable_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_member_variable_and_function() { - let program_string = include_str!("member_variable_and_function.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_function() { - let program_string = include_str!("member_function.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_function_fail() { - let program_string = include_str!("member_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_member_function_invalid() { - let program_string = include_str!("member_function_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_member_function_nested() { - let program_string = include_str!("member_function_nested.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_static_function() { - let program_string = include_str!("member_static_function.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_static_function_nested() { - let program_string = include_str!("member_static_function_nested.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_member_static_function_invalid() { - let program_string = include_str!("member_static_function_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error) -} - -#[test] -fn test_member_static_function_undefined() { - let program_string = include_str!("member_static_function_undefined.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error) -} - -// Constant -#[test] -fn test_const_self_variable() { - let program_string = include_str!("const_self_variable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_const_self_variable_fail() { - let program_string = include_str!("const_self_variable_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Mutability - -#[test] -fn test_mutate_function_fail() { - let program_string = include_str!("mut_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_self_variable() { - let program_string = include_str!("mut_self_variable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutate_self_variable_branch() { - let program_string = include_str!("mut_self_variable_branch.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutate_self_variable_conditional() { - let program_string = include_str!("mut_self_variable_conditional.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutate_self_variable_fail() { - let program_string = include_str!("mut_self_variable_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_self_function_fail() { - let program_string = include_str!("mut_self_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_self_static_function_fail() { - let program_string = include_str!("mut_self_static_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_static_function_fail() { - let program_string = include_str!("mut_static_function_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_mutate_variable() { - let program_string = include_str!("mut_variable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutate_variable_fail() { - let program_string = include_str!("mut_variable_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Self - -#[test] -fn test_self_fail() { - let program_string = include_str!("self_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_self_member_pass() { - let program_string = include_str!("self_member.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_self_member_invalid() { - let program_string = include_str!("self_member_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_self_member_undefined() { - let program_string = include_str!("self_member_undefined.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Inline circuit member - -#[test] -fn test_inline_member_pass() { - let program_string = include_str!("inline_member_pass.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_inline_member_fail() { - let program_string = include_str!("inline_member_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// All - -#[test] -fn test_pedersen_mock() { - let program_string = include_str!("pedersen_mock.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_define_circuit_inside_circuit_function() { - let program_string = include_str!("define_circuit_inside_circuit_function.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_duplicate_name_context() { - let program_string = include_str!("duplicate_name_context.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_mutable_call_immutable_context() { - let program_string = include_str!("mutable_call_immutable_context.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/circuits/mut_function_fail.leo b/compiler/_otests/circuits/mut_function_fail.leo deleted file mode 100644 index 44583810dd..0000000000 --- a/compiler/_otests/circuits/mut_function_fail.leo +++ /dev/null @@ -1,11 +0,0 @@ -circuit Foo { - a: u8, - - function bar() {} -} - -function main() { - let f = Foo { a: 0u8 }; - - f.bar = 1u8; -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mut_self_function_fail.leo b/compiler/_otests/circuits/mut_self_function_fail.leo deleted file mode 100644 index b81b18e743..0000000000 --- a/compiler/_otests/circuits/mut_self_function_fail.leo +++ /dev/null @@ -1,15 +0,0 @@ -circuit Foo { - a: u8, - - function bar() {} - - function set_a(mut self, new: u8) { - self.bar = new; - } -} - -function main() { - let f = Foo { a: 0u8 }; - - f.set_a(1u8); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mut_self_static_function_fail.leo b/compiler/_otests/circuits/mut_self_static_function_fail.leo deleted file mode 100644 index b81b18e743..0000000000 --- a/compiler/_otests/circuits/mut_self_static_function_fail.leo +++ /dev/null @@ -1,15 +0,0 @@ -circuit Foo { - a: u8, - - function bar() {} - - function set_a(mut self, new: u8) { - self.bar = new; - } -} - -function main() { - let f = Foo { a: 0u8 }; - - f.set_a(1u8); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mut_self_variable.leo b/compiler/_otests/circuits/mut_self_variable.leo deleted file mode 100644 index dc2047d872..0000000000 --- a/compiler/_otests/circuits/mut_self_variable.leo +++ /dev/null @@ -1,22 +0,0 @@ -circuit Foo { - a: u8, - - function set_a(mut self, new: u8) { - self.a = new; - console.assert(self.a == new); - } -} - -function main() { - let f = Foo { a: 0u8 }; - - console.assert(f.a == 0u8); - - f.set_a(1u8); - - console.assert(f.a == 1u8); - - f.set_a(2u8); - - console.assert(f.a == 2u8); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mut_self_variable_branch.leo b/compiler/_otests/circuits/mut_self_variable_branch.leo deleted file mode 100644 index 1c2f126f08..0000000000 --- a/compiler/_otests/circuits/mut_self_variable_branch.leo +++ /dev/null @@ -1,32 +0,0 @@ -circuit Foo { - a: u8, - - function set_a(mut self, condition: bool, new: u8) { - if condition { - self.a = new; - console.assert(self.a == new); - } - } -} - -function main() { - let f = Foo { a: 0u8 }; - - console.assert(f.a == 0u8); - - f.set_a(false, 1u8); - - console.assert(f.a == 0u8); - - f.set_a(true, 1u8); - - console.assert(f.a == 1u8); - - f.set_a(false, 2u8); - - console.assert(f.a == 1u8); - - f.set_a(true, 2u8); - - console.assert(f.a == 2u8); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mut_self_variable_conditional.leo b/compiler/_otests/circuits/mut_self_variable_conditional.leo deleted file mode 100644 index 61a5e354dc..0000000000 --- a/compiler/_otests/circuits/mut_self_variable_conditional.leo +++ /dev/null @@ -1,15 +0,0 @@ -function main() { - let f = Foo { a: 0u32 }; - - f.bar(); -} - -circuit Foo { - a: u32 - - function bar(mut self) { - if true { - self.a = 5u32; // Mutating a variable inside a conditional statement should work. - } - } -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mut_self_variable_fail.leo b/compiler/_otests/circuits/mut_self_variable_fail.leo deleted file mode 100644 index 4db62a4d3e..0000000000 --- a/compiler/_otests/circuits/mut_self_variable_fail.leo +++ /dev/null @@ -1,13 +0,0 @@ -circuit Foo { - a: u8, - - function set_a(self, new: u8) { - self.a = new; - } -} - -function main() { - let f = Foo { a: 0u8 }; - - f.set_a(1u8); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mut_static_function_fail.leo b/compiler/_otests/circuits/mut_static_function_fail.leo deleted file mode 100644 index e7db3a1df9..0000000000 --- a/compiler/_otests/circuits/mut_static_function_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -circuit Foo { - function bar() {} -} - -function main() { - let f = Foo { a: 0u8 }; - - f.bar = 1u8; -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mut_variable.leo b/compiler/_otests/circuits/mut_variable.leo deleted file mode 100644 index ddc7412038..0000000000 --- a/compiler/_otests/circuits/mut_variable.leo +++ /dev/null @@ -1,17 +0,0 @@ -circuit Foo { - a: u8, -} - -function main() { - let f = Foo { a: 0u8 }; - - console.assert(f.a == 0u8); - - f.a = 1u8; - - console.assert(f.a == 1u8); - - f.a = 2u8; - - console.assert(f.a == 2u8); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mut_variable_fail.leo b/compiler/_otests/circuits/mut_variable_fail.leo deleted file mode 100644 index e116b33d5c..0000000000 --- a/compiler/_otests/circuits/mut_variable_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -circuit Foo { - a: u8, -} - -function main() { - const f = Foo { a: 0u8 }; - - f.a = 1u8; -} \ No newline at end of file diff --git a/compiler/_otests/circuits/mutable_call_immutable_context.leo b/compiler/_otests/circuits/mutable_call_immutable_context.leo deleted file mode 100644 index d235d11cb7..0000000000 --- a/compiler/_otests/circuits/mutable_call_immutable_context.leo +++ /dev/null @@ -1,25 +0,0 @@ -circuit TestMe { - x: u8, - - function test_me(mut self) -> u8 { - self.x += 1; - return self.x; - } - - function new() -> Self { - return Self { x: 1u8 }; - } -} - -function my_fn() -> TestMe { - return TestMe { x: 0u8 }; -} - -function main () { - const t = TestMe {x: 6u8}.test_me(); - console.assert(t == 7u8); - const u = my_fn().test_me(); - console.assert(u == 1u8); - const v = TestMe::new().test_me(); - console.assert(v == 2u8); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/pedersen_mock.leo b/compiler/_otests/circuits/pedersen_mock.leo deleted file mode 100644 index 7f2dc12180..0000000000 --- a/compiler/_otests/circuits/pedersen_mock.leo +++ /dev/null @@ -1,27 +0,0 @@ -circuit PedersenHash { - parameters: [u32; 512] - - function new(const parameters: [u32; 512]) -> Self { - return Self { parameters: parameters }; - } - - function hash(self, const bits: [bool; 512]) -> u32 { - let digest: u32 = 0; - for i in 0..512 { - let base = bits[i] ? self.parameters[i] : 0u32; - digest += base; - } - return digest; - } -} - -// The 'pedersen_hash' main function. -function main() { - const parameters = [0u32; 512]; - const pedersen = PedersenHash::new(parameters); - const hash_input: [bool; 512] = [true; 512]; - - const res = pedersen.hash(hash_input); - - console.assert(res == 0u32); -} diff --git a/compiler/_otests/circuits/self_circuit.leo b/compiler/_otests/circuits/self_circuit.leo deleted file mode 100644 index 6faa42278b..0000000000 --- a/compiler/_otests/circuits/self_circuit.leo +++ /dev/null @@ -1,9 +0,0 @@ -circuit Foo { - static function new() -> Self { - return Self { }; - } -} - -function main() { - const a = Foo::new(); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/self_fail.leo b/compiler/_otests/circuits/self_fail.leo deleted file mode 100644 index e4e878dc89..0000000000 --- a/compiler/_otests/circuits/self_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - Self::main(); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/self_member.leo b/compiler/_otests/circuits/self_member.leo deleted file mode 100644 index 237baac9de..0000000000 --- a/compiler/_otests/circuits/self_member.leo +++ /dev/null @@ -1,14 +0,0 @@ -circuit Foo { - f: u32, - - function bar(self) -> u32 { - return self.f; - } -} - -function main() { - const a = Foo { f: 1u32 }; - const b = a.bar(); - - console.assert(b == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/self_member_invalid.leo b/compiler/_otests/circuits/self_member_invalid.leo deleted file mode 100644 index 7283b3260a..0000000000 --- a/compiler/_otests/circuits/self_member_invalid.leo +++ /dev/null @@ -1,12 +0,0 @@ -circuit Foo { - f: u32, - - function bar() -> u32 { - return f; - } -} - -function main() -> u32 { - const foo = Foo { f: 1u32 }; - const err = foo.bar(); -} \ No newline at end of file diff --git a/compiler/_otests/circuits/self_member_undefined.leo b/compiler/_otests/circuits/self_member_undefined.leo deleted file mode 100644 index 8b52d305a3..0000000000 --- a/compiler/_otests/circuits/self_member_undefined.leo +++ /dev/null @@ -1,10 +0,0 @@ -circuit Foo { - function bar() -> u32 { - return self.f; - } -} - -function main() { - const foo = Foo { }; - const err = foo.bar(); -} \ No newline at end of file diff --git a/compiler/_otests/compiler/main.leo b/compiler/_otests/compiler/main.leo deleted file mode 100644 index ed25576751..0000000000 --- a/compiler/_otests/compiler/main.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u32 = 1 + 2; -} \ No newline at end of file diff --git a/compiler/_otests/compiler/mod.rs b/compiler/_otests/compiler/mod.rs deleted file mode 100644 index 7d5a25ce01..0000000000 --- a/compiler/_otests/compiler/mod.rs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{get_output, EdwardsTestCompiler}; - -use std::{env::current_dir, path::PathBuf}; - -static MAIN_FILE_NAME: &str = "tests/compiler/main.leo"; - -// Compiler tests rely on knowledge of local directories. They should be run locally only. - -#[test] -#[ignore] -fn test_parse_program_from_string() { - // Parse program from string with compiler. - let program_string = include_str!("main.leo"); - let context = crate::make_test_context(); - let mut compiler_no_path = EdwardsTestCompiler::new("".to_string(), PathBuf::new(), PathBuf::new(), context, None); - - compiler_no_path.parse_program_from_string(program_string).unwrap(); - - // Parse program from file path with compiler. - let mut local = current_dir().unwrap(); - local.push(MAIN_FILE_NAME); - - let compiler_with_path = - EdwardsTestCompiler::parse_program_without_input("".to_string(), local, PathBuf::new(), context, None).unwrap(); - - // Compare output bytes. - let expected_output = get_output(compiler_no_path); - let actual_output = get_output(compiler_with_path); - - assert_eq!(expected_output, actual_output); -} diff --git a/compiler/_otests/console/assert.leo b/compiler/_otests/console/assert.leo deleted file mode 100644 index ba6be77256..0000000000 --- a/compiler/_otests/console/assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: bool) { - console.assert(a == true); -} \ No newline at end of file diff --git a/compiler/_otests/console/conditional_assert.leo b/compiler/_otests/console/conditional_assert.leo deleted file mode 100644 index f2c1591e9c..0000000000 --- a/compiler/_otests/console/conditional_assert.leo +++ /dev/null @@ -1,7 +0,0 @@ -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/_otests/console/debug.leo b/compiler/_otests/console/debug.leo deleted file mode 100644 index 54e6eb539f..0000000000 --- a/compiler/_otests/console/debug.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.debug("hello debug"); -} \ No newline at end of file diff --git a/compiler/_otests/console/error.leo b/compiler/_otests/console/error.leo deleted file mode 100644 index 86d13f8cee..0000000000 --- a/compiler/_otests/console/error.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.error("hello error"); -} \ No newline at end of file diff --git a/compiler/_otests/console/input/input_equal.in b/compiler/_otests/console/input/input_equal.in deleted file mode 100644 index c147902071..0000000000 --- a/compiler/_otests/console/input/input_equal.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -a: u32 = 1; -b: u32 = 1; diff --git a/compiler/_otests/console/input/input_unequal.in b/compiler/_otests/console/input/input_unequal.in deleted file mode 100644 index 37e9e6a578..0000000000 --- a/compiler/_otests/console/input/input_unequal.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -a: u32 = 1; -b: u32 = 0; diff --git a/compiler/_otests/console/log.leo b/compiler/_otests/console/log.leo deleted file mode 100644 index a190ca4ba9..0000000000 --- a/compiler/_otests/console/log.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.log("hello world"); -} \ No newline at end of file diff --git a/compiler/_otests/console/log_conditional.leo b/compiler/_otests/console/log_conditional.leo deleted file mode 100644 index a9fdb6e698..0000000000 --- a/compiler/_otests/console/log_conditional.leo +++ /dev/null @@ -1,6 +0,0 @@ -// Conditionally add two u32 integers and log the result to the console. -function main(a: u32, b: u32) { - if a == b { - console.log("{}=={}",a,b); // This line should not fail. - } -} \ No newline at end of file diff --git a/compiler/_otests/console/log_fail.leo b/compiler/_otests/console/log_fail.leo deleted file mode 100644 index dafa6bea8e..0000000000 --- a/compiler/_otests/console/log_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.log( hello ); -} \ No newline at end of file diff --git a/compiler/_otests/console/log_input.leo b/compiler/_otests/console/log_input.leo deleted file mode 100644 index c4fd0a8b12..0000000000 --- a/compiler/_otests/console/log_input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: bool) { - console.log("a = {}", a); -} \ No newline at end of file diff --git a/compiler/_otests/console/log_parameter.leo b/compiler/_otests/console/log_parameter.leo deleted file mode 100644 index ebcb931a2b..0000000000 --- a/compiler/_otests/console/log_parameter.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.log("{}", 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/console/log_parameter_fail_empty.leo b/compiler/_otests/console/log_parameter_fail_empty.leo deleted file mode 100644 index 81b42c0919..0000000000 --- a/compiler/_otests/console/log_parameter_fail_empty.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.log("{}"); -} \ No newline at end of file diff --git a/compiler/_otests/console/log_parameter_fail_none.leo b/compiler/_otests/console/log_parameter_fail_none.leo deleted file mode 100644 index c92fdfbb2d..0000000000 --- a/compiler/_otests/console/log_parameter_fail_none.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.log("", 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/console/log_parameter_fail_unknown.leo b/compiler/_otests/console/log_parameter_fail_unknown.leo deleted file mode 100644 index 757f4c27c3..0000000000 --- a/compiler/_otests/console/log_parameter_fail_unknown.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.log("{}", a); -} \ No newline at end of file diff --git a/compiler/_otests/console/log_parameter_many.leo b/compiler/_otests/console/log_parameter_many.leo deleted file mode 100644 index 60455ebbb0..0000000000 --- a/compiler/_otests/console/log_parameter_many.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.log("{} {}", 1u32, true); -} \ No newline at end of file diff --git a/compiler/_otests/console/mod.rs b/compiler/_otests/console/mod.rs deleted file mode 100644 index d3ce931675..0000000000 --- a/compiler/_otests/console/mod.rs +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - parse_program, - parse_program_with_input, -}; -use leo_ast::InputValue; - -#[test] -fn test_log() { - let program_string = include_str!("log.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_log_fail() { - let program_string = include_str!("log_fail.leo"); - - assert!(parse_program(program_string).is_err()); -} - -#[test] -fn test_log_parameter() { - let program_string = include_str!("log_parameter.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_log_parameter_many() { - let program_string = include_str!("log_parameter_many.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_log_parameter_fail_empty() { - let program_string = include_str!("log_parameter_fail_empty.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_log_parameter_fail_none() { - let program_string = include_str!("log_parameter_fail_empty.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_log_parameter_fail_unknown() { - let program_string = include_str!("log_parameter_fail_unknown.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_log_input() { - let program_string = include_str!("log_input.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(true)))]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -#[test] -fn test_log_conditional() { - let program_string = include_str!("log_conditional.leo"); - let input_equal_string = include_str!("input/input_equal.in"); - - let program = parse_program_with_input(program_string, input_equal_string).unwrap(); - - assert_satisfied(program); - - let input_unequal_string = include_str!("input/input_unequal.in"); - - let program = parse_program_with_input(program_string, input_unequal_string).unwrap(); - - assert_satisfied(program); -} - -// Debug - -#[test] -fn test_debug() { - let program_string = include_str!("debug.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// Error - -#[test] -fn test_error() { - let program_string = include_str!("error.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// Assertion - -#[test] -fn test_assert() { - let program_string = include_str!("assert.leo"); - let mut program = parse_program(program_string).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(program_string).unwrap(); - - let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(false)))]); - - program.set_main_input(main_input); - - expect_compiler_error(program); -} - -#[test] -fn test_conditional_assert() { - let program_string = include_str!("conditional_assert.leo"); - let mut program = parse_program(program_string).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(program_string).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/_otests/core/core_circuit_invalid.leo b/compiler/_otests/core/core_circuit_invalid.leo deleted file mode 100644 index 4a42bda032..0000000000 --- a/compiler/_otests/core/core_circuit_invalid.leo +++ /dev/null @@ -1,3 +0,0 @@ -import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package - -function main() {} diff --git a/compiler/_otests/core/core_circuit_star_fail.leo b/compiler/_otests/core/core_circuit_star_fail.leo deleted file mode 100644 index 14b54b0d69..0000000000 --- a/compiler/_otests/core/core_circuit_star_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -import core.*; // You cannot import all dependencies from core at once - -function main() {} diff --git a/compiler/_otests/core/core_package_invalid.leo b/compiler/_otests/core/core_package_invalid.leo deleted file mode 100644 index 7cbcf93ecc..0000000000 --- a/compiler/_otests/core/core_package_invalid.leo +++ /dev/null @@ -1,3 +0,0 @@ -import core.bad_circuit; // `bad_circuit` is not a core package - -function main() {} diff --git a/compiler/_otests/core/core_unstable_package_invalid.leo b/compiler/_otests/core/core_unstable_package_invalid.leo deleted file mode 100644 index 35e6c0d1ba..0000000000 --- a/compiler/_otests/core/core_unstable_package_invalid.leo +++ /dev/null @@ -1,3 +0,0 @@ -import core.unstable.bad_circuit; // `bad_circuit` is not a core unstable package - -function main() {} diff --git a/compiler/_otests/core/mod.rs b/compiler/_otests/core/mod.rs deleted file mode 100644 index c4a6bb48a5..0000000000 --- a/compiler/_otests/core/mod.rs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod packages; - -use crate::{assert_satisfied, expect_asg_error, parse_program}; - -#[test] -fn test_core_circuit_invalid() { - let program_string = include_str!("core_package_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_core_circuit_star_fail() { - let program_string = include_str!("core_circuit_star_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_core_package_invalid() { - let program_string = include_str!("core_package_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_core_unstable_package_invalid() { - let program_string = include_str!("core_unstable_package_invalid.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_unstable_blake2s_sanity() { - let program_string = include_str!("unstable_blake2s.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/core/packages/mod.rs b/compiler/_otests/core/packages/mod.rs deleted file mode 100644 index 6093aa3391..0000000000 --- a/compiler/_otests/core/packages/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod unstable; diff --git a/compiler/_otests/core/packages/unstable/blake2s/arguments_length_fail.leo b/compiler/_otests/core/packages/unstable/blake2s/arguments_length_fail.leo deleted file mode 100644 index 614490432d..0000000000 --- a/compiler/_otests/core/packages/unstable/blake2s/arguments_length_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -import core.unstable.blake2s.Blake2s; - -function main() { - const seed: [u8; 32] = [0; 32]; - - const result = Blake2s::hash(seed); // function `hash` takes 2 arguments - - console.log("Result: {}", result); -} diff --git a/compiler/_otests/core/packages/unstable/blake2s/arguments_type_fail.leo b/compiler/_otests/core/packages/unstable/blake2s/arguments_type_fail.leo deleted file mode 100644 index f80e7b0205..0000000000 --- a/compiler/_otests/core/packages/unstable/blake2s/arguments_type_fail.leo +++ /dev/null @@ -1,10 +0,0 @@ -import core.unstable.blake2s.Blake2s; - -function main() { - const seed: [u8; 32] = [0; 32]; - const message: [u16; 32] = [0; 32]; // message should be type [u8; 32] - - const result = Blake2s::hash(seed, message); - - console.log("Result: {}", result); -} diff --git a/compiler/_otests/core/packages/unstable/blake2s/blake2s_input.leo b/compiler/_otests/core/packages/unstable/blake2s/blake2s_input.leo deleted file mode 100644 index 51de777341..0000000000 --- a/compiler/_otests/core/packages/unstable/blake2s/blake2s_input.leo +++ /dev/null @@ -1,5 +0,0 @@ -import core.unstable.blake2s.Blake2s; - -function main(seed: [u8; 32], message: [u8; 32]) -> [u8; 32] { - return Blake2s::hash(seed, message); -} diff --git a/compiler/_otests/core/packages/unstable/blake2s/blake2s_random.leo b/compiler/_otests/core/packages/unstable/blake2s/blake2s_random.leo deleted file mode 100644 index 72aef44932..0000000000 --- a/compiler/_otests/core/packages/unstable/blake2s/blake2s_random.leo +++ /dev/null @@ -1,7 +0,0 @@ -import core.unstable.blake2s.Blake2s; - -function main(seed: [u8; 32], message: [u8; 32], expected: [u8; 32]) { - let actual = Blake2s::hash(seed, message); - - console.assert(expected == actual); -} diff --git a/compiler/_otests/core/packages/unstable/blake2s/inputs/valid_input.in b/compiler/_otests/core/packages/unstable/blake2s/inputs/valid_input.in deleted file mode 100644 index 6f5064f41d..0000000000 --- a/compiler/_otests/core/packages/unstable/blake2s/inputs/valid_input.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -seed: [u8; 32] = [0; 32]; -message: [u8; 32] = [0; 32]; - -[registers] -r0: [u8; 32] = [0; 32]; \ No newline at end of file diff --git a/compiler/_otests/core/packages/unstable/blake2s/mod.rs b/compiler/_otests/core/packages/unstable/blake2s/mod.rs deleted file mode 100644 index ce9a23b2f3..0000000000 --- a/compiler/_otests/core/packages/unstable/blake2s/mod.rs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - generate_main_input, - get_output, - parse_program, - parse_program_with_input, -}; - -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U8Type, UnsignedIntegerType}; -use rand::Rng; -use rand_core::SeedableRng; -use rand_xorshift::XorShiftRng; -use snarkvm_algorithms::{prf::blake2s::Blake2s as B2SPRF, traits::PRF}; - -#[test] -fn test_arguments_length_fail() { - let program_string = include_str!("arguments_length_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_arguments_type_fail() { - let program_string = include_str!("arguments_type_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_blake2s_input() { - let input_string = include_str!("inputs/valid_input.in"); - let program_string = include_str!("blake2s_input.leo"); - let expected_string = include_str!("outputs/valid_output.out"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let actual_bytes = get_output(program); - let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); - - assert_eq!(expected_string, actual_string) -} - -#[test] -fn test_blake2s_random() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - let mut seed = [0u8; 32]; - rng.fill(&mut seed); - - let mut message = [0u8; 32]; - rng.fill(&mut message); - - // Use snarkvm-algorithms blake2s evaluate to get expected value - let expected = B2SPRF::evaluate(&seed, &message).unwrap().to_vec(); - - // Create program input values for seed, message, and expected values - let seed_input_value = bytes_gadget_to_input(seed.to_vec()); - let message_input_value = bytes_gadget_to_input(message.to_vec()); - let expected_value = bytes_gadget_to_input(expected); - - // The `blake2s_random.leo` program will compute a blake2s hash digest and compare it against - // the expected value - let bytes = include_str!("blake2s_random.leo"); - let mut program = parse_program(bytes).unwrap(); - - let main_input = generate_main_input(vec![ - ("seed", Some(seed_input_value)), - ("message", Some(message_input_value)), - ("expected", Some(expected_value)), - ]); - - // Load input values into Leo program - program.set_main_input(main_input); - - assert_satisfied(program); -} - -fn bytes_gadget_to_input(bytes: Vec) -> InputValue { - let u8_type = IntegerType::Unsigned(UnsignedIntegerType::U8Type(U8Type {})); - let bytes = bytes - .into_iter() - .map(|byte| InputValue::Integer(u8_type.clone(), byte.to_string())) - .collect::>(); - - InputValue::Array(bytes) -} diff --git a/compiler/_otests/core/packages/unstable/blake2s/outputs/valid_output.out b/compiler/_otests/core/packages/unstable/blake2s/outputs/valid_output.out deleted file mode 100644 index f8f60f3e4e..0000000000 --- a/compiler/_otests/core/packages/unstable/blake2s/outputs/valid_output.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r0: [u8; 32] = [174, 9, 219, 124, 213, 79, 66, 180, 144, 239, 9, 182, 188, 84, 26, 246, 136, 228, 149, 155, 184, 197, 63, 53, 154, 111, 86, 227, 138, 180, 84, 163]; diff --git a/compiler/_otests/core/packages/unstable/mod.rs b/compiler/_otests/core/packages/unstable/mod.rs deleted file mode 100644 index 16304197fe..0000000000 --- a/compiler/_otests/core/packages/unstable/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -pub mod blake2s; diff --git a/compiler/_otests/core/unstable_blake2s.leo b/compiler/_otests/core/unstable_blake2s.leo deleted file mode 100644 index c430d9a837..0000000000 --- a/compiler/_otests/core/unstable_blake2s.leo +++ /dev/null @@ -1,10 +0,0 @@ -import core.unstable.blake2s.Blake2s; - -function main() { - const seed: [u8; 32] = [0; 32]; - const message: [u8; 32] = [0; 32]; - - const result = Blake2s::hash(seed, message); - - console.log("Result: {}", result); -} diff --git a/compiler/_otests/definition/mod.rs b/compiler/_otests/definition/mod.rs deleted file mode 100644 index e5faf8b2de..0000000000 --- a/compiler/_otests/definition/mod.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, import::set_local_dir, parse_program}; - -#[test] -fn test_out_of_order() { - let program_string = include_str!("out_of_order.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_out_of_order_with_import() { - set_local_dir(); - - let program_string = include_str!("out_of_order_with_import.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/definition/out_of_order.leo b/compiler/_otests/definition/out_of_order.leo deleted file mode 100644 index 69d46d0e74..0000000000 --- a/compiler/_otests/definition/out_of_order.leo +++ /dev/null @@ -1,6 +0,0 @@ -@test -function fake_test() {} - -function main() {} - -circuit Foo {} \ No newline at end of file diff --git a/compiler/_otests/definition/out_of_order_with_import.leo b/compiler/_otests/definition/out_of_order_with_import.leo deleted file mode 100644 index 04e5ddf12b..0000000000 --- a/compiler/_otests/definition/out_of_order_with_import.leo +++ /dev/null @@ -1,7 +0,0 @@ -test function fake_test() {} - -function main() {} - -import test_import.foo; - -circuit Foo {} \ No newline at end of file diff --git a/compiler/_otests/field/add.leo b/compiler/_otests/field/add.leo deleted file mode 100644 index 8dc2c7df4e..0000000000 --- a/compiler/_otests/field/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: field, b: field, c: field) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/field/console_assert.leo b/compiler/_otests/field/console_assert.leo deleted file mode 100644 index c7224bcea5..0000000000 --- a/compiler/_otests/field/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: field, b: field) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/field/div.leo b/compiler/_otests/field/div.leo deleted file mode 100644 index 028b06fad2..0000000000 --- a/compiler/_otests/field/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: field, b: field, c: field) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/field/eq.leo b/compiler/_otests/field/eq.leo deleted file mode 100644 index e64307d8de..0000000000 --- a/compiler/_otests/field/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: field, b: field, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/field/field.leo b/compiler/_otests/field/field.leo deleted file mode 100644 index 5d5732e906..0000000000 --- a/compiler/_otests/field/field.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - const negOneField: field = -1field; - const oneField = 1field; -} \ No newline at end of file diff --git a/compiler/_otests/field/input/register_one.in b/compiler/_otests/field/input/register_one.in deleted file mode 100644 index 50ca7c02dd..0000000000 --- a/compiler/_otests/field/input/register_one.in +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: field = 1; \ No newline at end of file diff --git a/compiler/_otests/field/input/register_zero.in b/compiler/_otests/field/input/register_zero.in deleted file mode 100644 index 15d3fe0c68..0000000000 --- a/compiler/_otests/field/input/register_zero.in +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: field = 0; \ No newline at end of file diff --git a/compiler/_otests/field/mod.rs b/compiler/_otests/field/mod.rs deleted file mode 100644 index f5ccb6c116..0000000000 --- a/compiler/_otests/field/mod.rs +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_compiler_error, generate_main_input, parse_program}; -use leo_ast::InputValue; - -use snarkvm_curves::edwards_bls12::Fq; -use snarkvm_utilities::bytes::ToBytes; - -use num_bigint::BigUint; -use rand::{Rng, SeedableRng}; -use rand_xorshift::XorShiftRng; - -// Helper function to convert field element into decimal base 10 string -pub fn field_to_decimal_string(f: Fq) -> String { - // write field to buffer - - let mut buf = Vec::new(); - - f.write(&mut buf).unwrap(); - - // convert to big integer - - let f_bigint = BigUint::from_bytes_le(&buf); - - f_bigint.to_str_radix(10) -} - -#[test] -fn test_negate() { - use std::ops::Neg; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b = a.neg(); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - - let program_string = include_str!("negate.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_field() { - let program_string = include_str!("field.leo"); - let mut program = parse_program(program_string).unwrap(); - - assert_satisfied(program) -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let mut program = parse_program(program_string).unwrap(); - - expect_compiler_error(program) -} - -#[test] -fn test_add() { - use std::ops::Add; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - let c = a.add(&b); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - let c_string = field_to_decimal_string(c); - - let program_string = include_str!("add.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Field(c_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_sub() { - use std::ops::Sub; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - let c = a.sub(&b); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - let c_string = field_to_decimal_string(c); - - let program_string = include_str!("sub.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Field(c_string))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_div() { - use std::ops::Div; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - let c = a.div(&b); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - let c_string = field_to_decimal_string(c); - - let program_string = include_str!("div.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Field(c_string))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_mul() { - use std::ops::Mul; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - let c = a.mul(&b); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - let c_string = field_to_decimal_string(c); - - let program_string = include_str!("mul.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Field(c_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_eq() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - - // test equal - - let program_string = include_str!("eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string.clone()))), - ("b", Some(InputValue::Field(a_string.clone()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.eq(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } -} - -#[test] -fn test_console_assert_pass() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - - let a_string = field_to_decimal_string(a); - - let program_string = include_str!("console_assert.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string.clone()))), - ("b", Some(InputValue::Field(a_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } -} - -#[test] -fn test_console_assert_fail() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - - if a == b { - continue; - } - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - - let program_string = include_str!("console_assert.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } -} - -#[test] -fn test_ternary() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - let a: Fq = rng.gen(); - let b: Fq = rng.gen(); - - let a_string = field_to_decimal_string(a); - let b_string = field_to_decimal_string(b); - - let program_string = include_str!("ternary.leo"); - let mut program = parse_program(program_string).unwrap(); - - // true -> field a - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(true))), - ("a", Some(InputValue::Field(a_string.clone()))), - ("b", Some(InputValue::Field(b_string.clone()))), - ("c", Some(InputValue::Field(a_string.clone()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - let mut program = parse_program(program_string).unwrap(); - - // false -> field b - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(false))), - ("a", Some(InputValue::Field(a_string))), - ("b", Some(InputValue::Field(b_string.clone()))), - ("c", Some(InputValue::Field(b_string))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -// -// pub fn output_one(program: EdwardsTestCompiler) { -// let expected = include_str!("output_/register_one.out"); -// let actual = get_output(program); -// -// assert_eq!(expected, actual.program_string().as_slice()); -// } -// -// pub fn output_zero(program: EdwardsTestCompiler) { -// let expected = include_str!("output_/register_zero.out"); -// let actual = get_output(program); -// -// assert_eq!(expected, actual.program_string().as_slice()); -// } -// -// #[test] -// fn test_registers() { -// let program_bytes = include_str!("output_register.leo"); -// let one_input_bytes = include_str!("input/register_one.in"); -// let zero_input_bytes = include_str!("input/register_zero.in"); -// -// // test 1field input register => 1field output register -// let program = parse_program_with_input(program_bytes, one_input_bytes).unwrap(); -// -// output_one(program); -// -// // test 0field input register => 0field output register -// let program = parse_program_with_input(program_bytes, zero_input_bytes).unwrap(); -// -// output_zero(program); -// } diff --git a/compiler/_otests/field/mul.leo b/compiler/_otests/field/mul.leo deleted file mode 100644 index 7df7c83830..0000000000 --- a/compiler/_otests/field/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: field, b: field, c: field) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/field/negate.leo b/compiler/_otests/field/negate.leo deleted file mode 100644 index 94c730207a..0000000000 --- a/compiler/_otests/field/negate.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: field, b: field) { - console.assert(-a == b); -} \ No newline at end of file diff --git a/compiler/_otests/field/no_space_between_literal.leo b/compiler/_otests/field/no_space_between_literal.leo deleted file mode 100644 index 9ac9dcd5db..0000000000 --- a/compiler/_otests/field/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const f = 1 field; -} \ No newline at end of file diff --git a/compiler/_otests/field/output/register_one.out b/compiler/_otests/field/output/register_one.out deleted file mode 100644 index 16556c1c51..0000000000 --- a/compiler/_otests/field/output/register_one.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: field = 1; diff --git a/compiler/_otests/field/output/register_zero.out b/compiler/_otests/field/output/register_zero.out deleted file mode 100644 index 2ba759ffc8..0000000000 --- a/compiler/_otests/field/output/register_zero.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: field = 0; diff --git a/compiler/_otests/field/output_register.leo b/compiler/_otests/field/output_register.leo deleted file mode 100644 index e27a3947bd..0000000000 --- a/compiler/_otests/field/output_register.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(registers) -> field { - return registers.r; -} \ No newline at end of file diff --git a/compiler/_otests/field/sub.leo b/compiler/_otests/field/sub.leo deleted file mode 100644 index 2c84b24647..0000000000 --- a/compiler/_otests/field/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: field, b: field, c: field) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/field/ternary.leo b/compiler/_otests/field/ternary.leo deleted file mode 100644 index 05cb161b46..0000000000 --- a/compiler/_otests/field/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: field, b: field, c: field) { - const r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/function/array_input.leo b/compiler/_otests/function/array_input.leo deleted file mode 100644 index 899c0e4af6..0000000000 --- a/compiler/_otests/function/array_input.leo +++ /dev/null @@ -1,6 +0,0 @@ -function foo(a: [u8; 1]) {} - -function main() { - const a: [u16; 1] = [1; 1]; - foo(a); -} \ No newline at end of file diff --git a/compiler/_otests/function/array_params_direct_call.leo b/compiler/_otests/function/array_params_direct_call.leo deleted file mode 100644 index 86762aabc7..0000000000 --- a/compiler/_otests/function/array_params_direct_call.leo +++ /dev/null @@ -1,9 +0,0 @@ -function do_nothing(arr: [u32; 2]) {} - -function main() { - const arr: [u32; 2] = [0; 2]; - - do_nothing(arr); - do_nothing([...arr]); - do_nothing(arr[0u32..]); -} \ No newline at end of file diff --git a/compiler/_otests/function/conditional_return.leo b/compiler/_otests/function/conditional_return.leo deleted file mode 100644 index e27dd7aea5..0000000000 --- a/compiler/_otests/function/conditional_return.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main(x: u8) -> u8 { - if x == 2u8 { - return 3u8; - } else { - return 4u8; - } -} \ No newline at end of file diff --git a/compiler/_otests/function/duplicate_definition.leo b/compiler/_otests/function/duplicate_definition.leo deleted file mode 100644 index cddc9ce7f2..0000000000 --- a/compiler/_otests/function/duplicate_definition.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - console.log("{}", 1u8); -} - -function main() { - console.log("{}", 2u8); -} \ No newline at end of file diff --git a/compiler/_otests/function/empty.leo b/compiler/_otests/function/empty.leo deleted file mode 100644 index f06c976158..0000000000 --- a/compiler/_otests/function/empty.leo +++ /dev/null @@ -1,5 +0,0 @@ -function empty() { } - -function main() { - empty(); -} \ No newline at end of file diff --git a/compiler/_otests/function/input/conditional_return.in b/compiler/_otests/function/input/conditional_return.in deleted file mode 100644 index d2d57dc93c..0000000000 --- a/compiler/_otests/function/input/conditional_return.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -x: u8 = 1u8; - -[registers] -x: u8 = 0; diff --git a/compiler/_otests/function/input/newlines.in b/compiler/_otests/function/input/newlines.in deleted file mode 100644 index fbd23658c0..0000000000 --- a/compiler/_otests/function/input/newlines.in +++ /dev/null @@ -1,7 +0,0 @@ -[main] -a: u32 = 0; -b: u32 = 0; - -[registers] -a: u32 = 0; -b: u32 = 0; \ No newline at end of file diff --git a/compiler/_otests/function/input/registers.in b/compiler/_otests/function/input/registers.in deleted file mode 100644 index 306191c516..0000000000 --- a/compiler/_otests/function/input/registers.in +++ /dev/null @@ -1,3 +0,0 @@ -[registers] -a: bool = true; -b: bool = false; diff --git a/compiler/_otests/function/iteration.leo b/compiler/_otests/function/iteration.leo deleted file mode 100644 index 9be86b5a7c..0000000000 --- a/compiler/_otests/function/iteration.leo +++ /dev/null @@ -1,13 +0,0 @@ -function one() -> u32 { - return 1u32; -} - -function main() { - let a = 0u32; - - for i in 0..10 { - a += one(); - } - - console.assert(a == 10u32); -} \ No newline at end of file diff --git a/compiler/_otests/function/iteration_repeated.leo b/compiler/_otests/function/iteration_repeated.leo deleted file mode 100644 index ef4f992d96..0000000000 --- a/compiler/_otests/function/iteration_repeated.leo +++ /dev/null @@ -1,15 +0,0 @@ -function iteration() -> u32 { - let a = 0u32; - - for i in 0..10 { - a += 1; - } - - return a; -} - -function main() { - const total = iteration() + iteration(); - - console.assert(total == 20); -} \ No newline at end of file diff --git a/compiler/_otests/function/mod.rs b/compiler/_otests/function/mod.rs deleted file mode 100644 index 8dfb865d90..0000000000 --- a/compiler/_otests/function/mod.rs +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_asg_error, get_output, parse_program, parse_program_with_input}; - -#[test] -fn test_conditional_return() { - let input_string = include_str!("input/conditional_return.in"); - let program_string = include_str!("conditional_return.leo"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let expected_string = include_str!("output/conditional_return.out"); - let actual_bytes = get_output(program); - let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); - - assert_eq!(expected_string, actual_string); -} - -#[test] -fn test_empty() { - let program_string = include_str!("empty.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_iteration() { - let program_string = include_str!("iteration.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_iteration_repeated() { - let program_string = include_str!("iteration_repeated.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_newlines() { - let input_string = include_str!("input/newlines.in"); - let program_string = include_str!("newlines.leo"); - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let expected_string = include_str!("output/newlines.out"); - let actual_bytes = get_output(program); - let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); - - assert_eq!(expected_string, actual_string); -} - -#[test] -fn test_multiple_returns() { - let program_string = include_str!("multiple_returns.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_multiple_returns_fail() { - let program_string = include_str!("multiple_returns_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_multiple_returns_fail_conditional() { - let program_string = include_str!("multiple_returns_fail_conditional.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_multiple_returns_main() { - let program_string = include_str!("multiple_returns_main.leo"); - let input_string = include_str!("input/registers.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let expected_string = include_str!("output/registers.out"); - let actual_bytes = get_output(program); - let actual_string = std::str::from_utf8(actual_bytes.bytes().as_slice()).unwrap(); - - assert_eq!(expected_string, actual_string); -} - -#[test] -fn test_repeated_function_call() { - let program_string = include_str!("repeated.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_return() { - let program_string = include_str!("return.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_scope_fail() { - let program_string = include_str!("scope_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_undefined() { - let program_string = include_str!("undefined.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_value_unchanged() { - let program_string = include_str!("value_unchanged.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_input() { - let program_string = include_str!("array_input.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error) -} - -// Test return multidimensional arrays - -#[test] -fn test_return_array_nested_fail() { - let program_string = include_str!("return_array_nested_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_return_array_nested_pass() { - let program_string = include_str!("return_array_nested_pass.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_return_array_tuple_fail() { - let program_string = include_str!("return_array_tuple_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_return_array_tuple_pass() { - let program_string = include_str!("return_array_tuple_pass.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// Test return tuples - -#[test] -fn test_return_tuple() { - let program_string = include_str!("return_tuple.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_return_tuple_conditional() { - let program_string = include_str!("return_tuple_conditional.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_params_direct_call() { - let program_string = include_str!("array_params_direct_call.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_duplicate_function_definition() { - let program_string = include_str!("duplicate_definition.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} diff --git a/compiler/_otests/function/multiple_returns.leo b/compiler/_otests/function/multiple_returns.leo deleted file mode 100644 index 73797c6ca3..0000000000 --- a/compiler/_otests/function/multiple_returns.leo +++ /dev/null @@ -1,10 +0,0 @@ -function tuple() -> (bool, bool) { - return (true, false); -} - -function main() { - const (a, b) = tuple(); - - console.assert(a == true); - console.assert(b == false); -} \ No newline at end of file diff --git a/compiler/_otests/function/multiple_returns_fail.leo b/compiler/_otests/function/multiple_returns_fail.leo deleted file mode 100644 index c4539bb1a0..0000000000 --- a/compiler/_otests/function/multiple_returns_fail.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main () -> i8 { - if true { - return 1i8; //ignored - } - return 2i8; //ignored - return 3i8; //returns -} diff --git a/compiler/_otests/function/multiple_returns_fail_conditional.leo b/compiler/_otests/function/multiple_returns_fail_conditional.leo deleted file mode 100644 index ded39534a4..0000000000 --- a/compiler/_otests/function/multiple_returns_fail_conditional.leo +++ /dev/null @@ -1,9 +0,0 @@ -function main () -> u16 { - if false { - const a = 1u16; - const b = a + 1u16; - return b; - } else if false { - return 0u16; - } -} \ No newline at end of file diff --git a/compiler/_otests/function/multiple_returns_main.leo b/compiler/_otests/function/multiple_returns_main.leo deleted file mode 100644 index 8590cdd71e..0000000000 --- a/compiler/_otests/function/multiple_returns_main.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() -> (bool, bool) { - return (input.registers.a, input.registers.b); -} diff --git a/compiler/_otests/function/newlines.leo b/compiler/_otests/function/newlines.leo deleted file mode 100644 index e0b10dead1..0000000000 --- a/compiler/_otests/function/newlines.leo +++ /dev/null @@ -1,9 +0,0 @@ -function main( - a: u32, - b: u32, -) -> ( - u32, - u32, -) { - return (a, b); -} \ No newline at end of file diff --git a/compiler/_otests/function/output/conditional_return.out b/compiler/_otests/function/output/conditional_return.out deleted file mode 100644 index 29d80c1cfc..0000000000 --- a/compiler/_otests/function/output/conditional_return.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -x: u8 = 4; diff --git a/compiler/_otests/function/output/newlines.out b/compiler/_otests/function/output/newlines.out deleted file mode 100644 index 197a64cc63..0000000000 --- a/compiler/_otests/function/output/newlines.out +++ /dev/null @@ -1,3 +0,0 @@ -[registers] -a: u32 = 0; -b: u32 = 0; diff --git a/compiler/_otests/function/output/registers.out b/compiler/_otests/function/output/registers.out deleted file mode 100644 index 306191c516..0000000000 --- a/compiler/_otests/function/output/registers.out +++ /dev/null @@ -1,3 +0,0 @@ -[registers] -a: bool = true; -b: bool = false; diff --git a/compiler/_otests/function/repeated.leo b/compiler/_otests/function/repeated.leo deleted file mode 100644 index 2f9bc43d77..0000000000 --- a/compiler/_otests/function/repeated.leo +++ /dev/null @@ -1,9 +0,0 @@ -function one() -> bool { - return true; -} - -function main() { - const a = one() && one(); - - console.assert(a == true); -} \ No newline at end of file diff --git a/compiler/_otests/function/return.leo b/compiler/_otests/function/return.leo deleted file mode 100644 index e839700ee3..0000000000 --- a/compiler/_otests/function/return.leo +++ /dev/null @@ -1,7 +0,0 @@ -function one() -> u32 { - return 1u32; -} - -function main() { - console.assert(one() == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/function/return_array_nested_fail.leo b/compiler/_otests/function/return_array_nested_fail.leo deleted file mode 100644 index 0db89a09e3..0000000000 --- a/compiler/_otests/function/return_array_nested_fail.leo +++ /dev/null @@ -1,7 +0,0 @@ -function array_3x2_tuple() -> [[u8; 2]; 3] { - return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]` -} - -function main() { - const b = array_3x2_tuple(); -} \ No newline at end of file diff --git a/compiler/_otests/function/return_array_nested_pass.leo b/compiler/_otests/function/return_array_nested_pass.leo deleted file mode 100644 index c7586f3f08..0000000000 --- a/compiler/_otests/function/return_array_nested_pass.leo +++ /dev/null @@ -1,12 +0,0 @@ -function array_3x2_nested() -> [[u8; 2]; 3] { - return [[0u8; 2]; 3]; -} - -function array_3x2_tuple() -> [[u8; 2]; 3] { - return [0u8; (3, 2)]; -} - -function main() { - const a = array_3x2_nested(); - const b = array_3x2_tuple(); -} \ No newline at end of file diff --git a/compiler/_otests/function/return_array_tuple_fail.leo b/compiler/_otests/function/return_array_tuple_fail.leo deleted file mode 100644 index d2afcd2790..0000000000 --- a/compiler/_otests/function/return_array_tuple_fail.leo +++ /dev/null @@ -1,7 +0,0 @@ -function array_3x2_nested() -> [u8; (3, 2)] { - return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]` -} - -function main() { - const a = array_3x2_nested(); -} \ No newline at end of file diff --git a/compiler/_otests/function/return_array_tuple_pass.leo b/compiler/_otests/function/return_array_tuple_pass.leo deleted file mode 100644 index 6f5a63e806..0000000000 --- a/compiler/_otests/function/return_array_tuple_pass.leo +++ /dev/null @@ -1,12 +0,0 @@ -function array_3x2_nested() -> [u8; (3, 2)] { - return [[0u8; 2]; 3]; -} - -function array_3x2_tuple() -> [u8; (3, 2)] { - return [0u8; (3, 2)]; -} - -function main() { - const a = array_3x2_nested(); - const b = array_3x2_tuple(); -} \ No newline at end of file diff --git a/compiler/_otests/function/return_tuple.leo b/compiler/_otests/function/return_tuple.leo deleted file mode 100644 index 24328aeaaa..0000000000 --- a/compiler/_otests/function/return_tuple.leo +++ /dev/null @@ -1,11 +0,0 @@ -// Returns a tuple of tuples. -function tuples() -> ((u8, u8), u32) { - const a: (u8, u8) = (1, 2); - const b: u32 = 3; - - return (a, b); -} - -function main() { - const t = tuples(); -} \ No newline at end of file diff --git a/compiler/_otests/function/return_tuple_conditional.leo b/compiler/_otests/function/return_tuple_conditional.leo deleted file mode 100644 index b8040d47ec..0000000000 --- a/compiler/_otests/function/return_tuple_conditional.leo +++ /dev/null @@ -1,15 +0,0 @@ -// Returns a tuple using a conditional "if" statement. -function tuple_conditional () -> ( - i64, - i64 -) { - if true { - return (1, 1); - } else { - return (2, 2); - } -} - -function main() { - const t = tuple_conditional(); -} \ No newline at end of file diff --git a/compiler/_otests/function/scope_fail.leo b/compiler/_otests/function/scope_fail.leo deleted file mode 100644 index 693682d297..0000000000 --- a/compiler/_otests/function/scope_fail.leo +++ /dev/null @@ -1,8 +0,0 @@ -function foo() -> field { - return myGlobal; -} - -function main() { - const myGlobal = 42field; - const err = foo(); -} \ No newline at end of file diff --git a/compiler/_otests/function/undefined.leo b/compiler/_otests/function/undefined.leo deleted file mode 100644 index e1db3b9f09..0000000000 --- a/compiler/_otests/function/undefined.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - my_function(); -} \ No newline at end of file diff --git a/compiler/_otests/function/value_unchanged.leo b/compiler/_otests/function/value_unchanged.leo deleted file mode 100644 index e116736316..0000000000 --- a/compiler/_otests/function/value_unchanged.leo +++ /dev/null @@ -1,19 +0,0 @@ -// Functions input in leo are pass-by-value. -// -// Program execution: -// line 15: variable `a` is defined with value `1`. -// line 16: value `1` is copied and passed into function `bad_mutate()`. -// line 10: variable `x` is defined with value `1`. -// line 11: variable `x` is set to value `0`. -// line 18: program returns the value of `a`. - -function bad_mutate(x: u32) { - x = 0; // <- does not change `a` -} - -function main() { - const a = 1u32; - bad_mutate(a); - - console.assert(a == 1u32); // <- value `a` is still `1u32` -} \ No newline at end of file diff --git a/compiler/_otests/global_consts/global_const_types.leo b/compiler/_otests/global_consts/global_const_types.leo deleted file mode 100644 index 8819e55662..0000000000 --- a/compiler/_otests/global_consts/global_const_types.leo +++ /dev/null @@ -1,46 +0,0 @@ -const basic: u32 = 8; -const array: [u8; (3, 2)] = [[0u8; 2]; 3]; -const tuple = (1u32, 2u32); -const (a, b) = (1u32, 2u32); -const simple_group: group = 1group; -const complex_group = (_, 1)group; -const field_test: field = 2; -const use_another_const = basic + 1; -const foo = Foo { width: 10, height: 20 }; -const uno = uno(); - -circuit Foo { - width: u32, - height: u32, -} - -function uno() -> u32 { - return 1u32 -} - -function main() { - // basic test - console.assert(basic == 8u32); - // array test - console.assert(array[0][0] == 0); - console.assert(array[2][1] == 0); - // tuple test - let (x, y) = (1u32, 2u32); - console.assert(x == 1u32); - console.assert(y == 2u32); - // tuple extraction test - console.assert(a == 1u32); - console.assert(b == 2u32); - // group test - console.assert(simple_group == 1group); - console.assert(complex_group == (_, 1)group); - // field test - console.assert(field_test == 2field); - // use another const test - console.assert(use_another_const == 9u32); - // circuit test - console.assert(foo.width == 10u32); - console.assert(foo.height == 20u32); - // function test - console.assert(uno == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/global_consts/mod.rs b/compiler/_otests/global_consts/mod.rs deleted file mode 100644 index dd143bdabe..0000000000 --- a/compiler/_otests/global_consts/mod.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_compiler_error, parse_program}; - - -#[test] -fn test_global_consts() { - let program_string = include_str!("global_consts.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_modify_global_const() { - let program_string = include_str!("modify_global_const.leo"); - - let program = parse_program(program_string).unwrap(); - - assert!(parse_program(program_string).is_err()); -} \ No newline at end of file diff --git a/compiler/_otests/global_consts/modify_global_const.leo b/compiler/_otests/global_consts/modify_global_const.leo deleted file mode 100644 index 762baad00a..0000000000 --- a/compiler/_otests/global_consts/modify_global_const.leo +++ /dev/null @@ -1,6 +0,0 @@ -const basic: u32 = 8; - -function main() { - // Cannot re-assign! - basic = 2u32; -} \ No newline at end of file diff --git a/compiler/_otests/group/add.leo b/compiler/_otests/group/add.leo deleted file mode 100644 index bb84df2d6c..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/assert_eq.leo b/compiler/_otests/group/assert_eq.leo deleted file mode 100644 index 3886a07bbf..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/both_sign_high.leo b/compiler/_otests/group/both_sign_high.leo deleted file mode 100644 index 4c93573e1e..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/both_sign_inferred.leo b/compiler/_otests/group/both_sign_inferred.leo deleted file mode 100644 index 0bbd360ba0..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/both_sign_low.leo b/compiler/_otests/group/both_sign_low.leo deleted file mode 100644 index 1cb4f46c55..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/eq.leo b/compiler/_otests/group/eq.leo deleted file mode 100644 index 89701d9c99..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/input.leo b/compiler/_otests/group/input.leo deleted file mode 100644 index 3886a07bbf..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/input/invalid.in b/compiler/_otests/group/input/invalid.in deleted file mode 100644 index d55c096738..0000000000 --- a/compiler/_otests/group/input/invalid.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -a: group = (1, 0)group; -b: group = (+, +)group; diff --git a/compiler/_otests/group/input/point.in b/compiler/_otests/group/input/point.in deleted file mode 100644 index 9d49d9d847..0000000000 --- a/compiler/_otests/group/input/point.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: group = (7374112779530666882856915975292384652154477718021969292781165691637980424078, 3435195339177955418892975564890903138308061187980579490487898366607011481796)group; \ No newline at end of file diff --git a/compiler/_otests/group/input/valid.in b/compiler/_otests/group/input/valid.in deleted file mode 100644 index 651a28bea6..0000000000 --- a/compiler/_otests/group/input/valid.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -a: group = (0, -)group; -b: group = (0, _)group; diff --git a/compiler/_otests/group/mod.rs b/compiler/_otests/group/mod.rs deleted file mode 100644 index f4cf84448c..0000000000 --- a/compiler/_otests/group/mod.rs +++ /dev/null @@ -1,407 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, expect_compiler_error, expect_synthesis_error, field::field_to_decimal_string, - generate_main_input, parse_program, parse_program_with_input, -}; -use leo_ast::{GroupCoordinate, GroupTuple, GroupValue, InputValue, Span}; - -use snarkvm_curves::edwards_bls12::EdwardsAffine; - -use rand::{Rng, SeedableRng}; -use rand_xorshift::XorShiftRng; - -pub fn group_element_to_input_value(g: EdwardsAffine) -> GroupValue { - let x = field_to_decimal_string(g.x); - let y = field_to_decimal_string(g.y); - - format!("({}, {})", x, y); - - let fake_span = Span { - text: "".to_string(), - line: 0, - start: 0, - end: 0, - }; - - GroupValue::Tuple(GroupTuple { - x: GroupCoordinate::Number(x, fake_span), - y: GroupCoordinate::Number(y, fake_span), - span: fake_span, - }) -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let mut program = parse_program(program_string).unwrap(); - - expect_compiler_error(program) -} - -#[test] -fn test_one() { - let program_string = include_str!("one.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_zero() { - let program_string = include_str!("zero.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_point() { - let program_string = include_str!("point.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_x_sign_high() { - let program_string = include_str!("x_sign_high.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_x_sign_low() { - let program_string = include_str!("x_sign_low.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_x_sign_inferred() { - let program_string = include_str!("x_sign_inferred.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_y_sign_high() { - let program_string = include_str!("y_sign_high.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_y_sign_low() { - let program_string = include_str!("y_sign_low.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_y_sign_inferred() { - let program_string = include_str!("y_sign_inferred.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_both_sign_high() { - let program_string = include_str!("both_sign_high.leo"); - - let program = parse_program(program_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_both_sign_low() { - let program_string = include_str!("both_sign_low.leo"); - - let program = parse_program(program_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_both_sign_inferred() { - let program_string = include_str!("both_sign_inferred.leo"); - - let program = parse_program(program_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_point_input() { - let program_string = include_str!("point_input.leo"); - let input_bytes = include_str!("input/point.in"); - - let program = parse_program_with_input(program_string, input_bytes).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input() { - let program_string = include_str!("input.leo"); - let input_string_pass = include_str!("input/valid.in"); - let input_string_fail = include_str!("input/invalid.in"); - - let program = parse_program_with_input(program_string, input_string_pass).unwrap(); - - assert_satisfied(program); - - let program = parse_program_with_input(program_string, input_string_fail).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_negate() { - use std::ops::Neg; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b = a.neg(); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - - let program_string = include_str!("negate.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_add() { - use std::ops::Add; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - let c = a.add(&b); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - let c_element = group_element_to_input_value(c); - - let program_string = include_str!("add.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ("c", Some(InputValue::Group(c_element))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_sub() { - use std::ops::Sub; - - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - let c = a.sub(&b); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - let c_element = group_element_to_input_value(c); - - let program_string = include_str!("sub.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ("c", Some(InputValue::Group(c_element))), - ]); - program.set_main_input(main_input); - - assert_satisfied(program) - } -} - -#[test] -fn test_console_assert_pass() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - - let a_element = group_element_to_input_value(a); - - let program_string = include_str!("assert_eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element.clone()))), - ("b", Some(InputValue::Group(a_element))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } -} - -#[test] -fn test_console_assert_fail() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - - if a == b { - continue; - } - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - - let program_string = include_str!("assert_eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } -} - -#[test] -fn test_eq() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - for _ in 0..10 { - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - - // test equal - - let program_string = include_str!("eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element.clone()))), - ("b", Some(InputValue::Group(a_element.clone()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.eq(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } -} - -#[test] -fn test_ternary() { - let mut rng = XorShiftRng::seed_from_u64(1231275789u64); - - let a: EdwardsAffine = rng.gen(); - let b: EdwardsAffine = rng.gen(); - - let a_element = group_element_to_input_value(a); - let b_element = group_element_to_input_value(b); - - let program_string = include_str!("ternary.leo"); - let mut program = parse_program(program_string).unwrap(); - - // true -> field a - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(true))), - ("a", Some(InputValue::Group(a_element.clone()))), - ("b", Some(InputValue::Group(b_element.clone()))), - ("c", Some(InputValue::Group(a_element.clone()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - let mut program = parse_program(program_string).unwrap(); - - // false -> field b - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(false))), - ("a", Some(InputValue::Group(a_element))), - ("b", Some(InputValue::Group(b_element.clone()))), - ("c", Some(InputValue::Group(b_element))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -#[test] -fn test_positive_and_negative() { - let program_string = include_str!("positive_and_negative.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/group/negate.leo b/compiler/_otests/group/negate.leo deleted file mode 100644 index 506d8d73ce..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/no_space_between_literal.leo b/compiler/_otests/group/no_space_between_literal.leo deleted file mode 100644 index af53e5dffe..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/one.leo b/compiler/_otests/group/one.leo deleted file mode 100644 index 510110150b..0000000000 --- a/compiler/_otests/group/one.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = 1group; -} \ No newline at end of file diff --git a/compiler/_otests/group/point.leo b/compiler/_otests/group/point.leo deleted file mode 100644 index 5e68415a0d..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/point_input.leo b/compiler/_otests/group/point_input.leo deleted file mode 100644 index a3a8e63bd3..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/positive_and_negative.leo b/compiler/_otests/group/positive_and_negative.leo deleted file mode 100644 index 5d29e36ef2..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/sub.leo b/compiler/_otests/group/sub.leo deleted file mode 100644 index dfe82d8e31..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/ternary.leo b/compiler/_otests/group/ternary.leo deleted file mode 100644 index 97fba1f5b6..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/x_and_y.leo b/compiler/_otests/group/x_and_y.leo deleted file mode 100644 index a350a7ad6b..0000000000 --- a/compiler/_otests/group/x_and_y.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(element: group) { - const b = element; -} \ No newline at end of file diff --git a/compiler/_otests/group/x_sign_high.leo b/compiler/_otests/group/x_sign_high.leo deleted file mode 100644 index f38b54ad9a..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/x_sign_inferred.leo b/compiler/_otests/group/x_sign_inferred.leo deleted file mode 100644 index 02c5ac988b..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/x_sign_low.leo b/compiler/_otests/group/x_sign_low.leo deleted file mode 100644 index ad74d18b64..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/y_sign_high.leo b/compiler/_otests/group/y_sign_high.leo deleted file mode 100644 index af2a20149d..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/y_sign_inferred.leo b/compiler/_otests/group/y_sign_inferred.leo deleted file mode 100644 index a4efa6a982..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/y_sign_low.leo b/compiler/_otests/group/y_sign_low.leo deleted file mode 100644 index f557ed0d35..0000000000 --- a/compiler/_otests/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/compiler/_otests/group/zero.leo b/compiler/_otests/group/zero.leo deleted file mode 100644 index 6cdd4c960e..0000000000 --- a/compiler/_otests/group/zero.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const element = 0group; -} \ No newline at end of file diff --git a/compiler/_otests/import/alias.leo b/compiler/_otests/import/alias.leo deleted file mode 100644 index 72b5157a2e..0000000000 --- a/compiler/_otests/import/alias.leo +++ /dev/null @@ -1,7 +0,0 @@ -import test-import.foo as bar; -import bar.baz.ONE as UNO; - -function main() { - console.assert(bar() == 1u32); - console.assert(UNO == 1u8); -} diff --git a/compiler/_otests/import/basic.leo b/compiler/_otests/import/basic.leo deleted file mode 100644 index 53d243efaa..0000000000 --- a/compiler/_otests/import/basic.leo +++ /dev/null @@ -1,5 +0,0 @@ -import test-import.foo; - -function main() { - console.assert(foo() == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/import/imports/bar/.gitignore b/compiler/_otests/import/imports/bar/.gitignore deleted file mode 100755 index ea1472ec1f..0000000000 --- a/compiler/_otests/import/imports/bar/.gitignore +++ /dev/null @@ -1 +0,0 @@ -output/ diff --git a/compiler/_otests/import/imports/bar/Leo.toml b/compiler/_otests/import/imports/bar/Leo.toml deleted file mode 100755 index 8e22d51a95..0000000000 --- a/compiler/_otests/import/imports/bar/Leo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[package] -name = "bar" -version = "0.1.0" diff --git a/compiler/_otests/import/imports/bar/src/bat/bat.leo b/compiler/_otests/import/imports/bar/src/bat/bat.leo deleted file mode 100755 index a7d2fc83d4..0000000000 --- a/compiler/_otests/import/imports/bar/src/bat/bat.leo +++ /dev/null @@ -1,3 +0,0 @@ -circuit Bat { - t: u32 -} \ No newline at end of file diff --git a/compiler/_otests/import/imports/bar/src/baz.leo b/compiler/_otests/import/imports/bar/src/baz.leo deleted file mode 100755 index 25fee7f3e5..0000000000 --- a/compiler/_otests/import/imports/bar/src/baz.leo +++ /dev/null @@ -1,9 +0,0 @@ -circuit Baz { - z: u32 -} - -circuit Bazzar { - a: u32 -} - -const ONE: u8 = 1; \ No newline at end of file diff --git a/compiler/_otests/import/imports/bar/src/lib.leo b/compiler/_otests/import/imports/bar/src/lib.leo deleted file mode 100755 index c169f5935e..0000000000 --- a/compiler/_otests/import/imports/bar/src/lib.leo +++ /dev/null @@ -1,3 +0,0 @@ -circuit Bar { - r: u32 -} \ No newline at end of file diff --git a/compiler/_otests/import/imports/car/.gitignore b/compiler/_otests/import/imports/car/.gitignore deleted file mode 100755 index ea1472ec1f..0000000000 --- a/compiler/_otests/import/imports/car/.gitignore +++ /dev/null @@ -1 +0,0 @@ -output/ diff --git a/compiler/_otests/import/imports/car/Leo.toml b/compiler/_otests/import/imports/car/Leo.toml deleted file mode 100755 index 15b76f1d76..0000000000 --- a/compiler/_otests/import/imports/car/Leo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[package] -name = "car" -version = "0.1.0" diff --git a/compiler/_otests/import/imports/car/src/lib.leo b/compiler/_otests/import/imports/car/src/lib.leo deleted file mode 100755 index b1e037fd38..0000000000 --- a/compiler/_otests/import/imports/car/src/lib.leo +++ /dev/null @@ -1,3 +0,0 @@ -circuit Car { - c: u32 -} \ No newline at end of file diff --git a/compiler/_otests/import/many_import.leo b/compiler/_otests/import/many_import.leo deleted file mode 100644 index 06fd7051df..0000000000 --- a/compiler/_otests/import/many_import.leo +++ /dev/null @@ -1,27 +0,0 @@ -import test-import.( // local import - Point, - foo, -); - -import bar.( // imports directory import - Bar, - baz.(Baz, Bazzar, ONE), - bat.bat.Bat, -); - -import car.Car; // imports directory import - -function main() { - const point = Point { x: 1u32, y: 1u32 }; - const foo = foo(); - - const bar = Bar { r: 1u32 }; - const baz = Baz { z: 1u32 }; - const bazzar = Bazzar { a: 1u32 }; - const bat = Bat { t: 1u32 }; - - const car = Car { c: 1u32 }; - - console.assert(car.c == 1u32); - console.assert(ONE == 1u8); -} \ No newline at end of file diff --git a/compiler/_otests/import/many_import_star.leo b/compiler/_otests/import/many_import_star.leo deleted file mode 100644 index 5e20fc31aa..0000000000 --- a/compiler/_otests/import/many_import_star.leo +++ /dev/null @@ -1,20 +0,0 @@ -import test-import.*; // local import - -import bar.*; // imports directory import -import bar.baz.*; // imports directory import -import bar.bat.bat.*; // imports directory import -import car.*; // imports directory import - -function main() { - const point = Point { x: 1u32, y: 1u32 }; - const foo = foo(); - - const bar = Bar { r: 1u32 }; - const bat = Bat { t: 1u32 }; - const baz = Baz { z: 1u32 }; - - const car = Car { c: 1u32 }; - - console.assert(car.c == 1u32); - console.assert(ONE == 1u8); -} \ No newline at end of file diff --git a/compiler/_otests/import/mod.rs b/compiler/_otests/import/mod.rs deleted file mode 100644 index 1a3440b577..0000000000 --- a/compiler/_otests/import/mod.rs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_program}; - -use std::env::{current_dir, set_current_dir}; - -static TEST_SOURCE_DIRECTORY: &str = "tests/import"; - -// Import tests rely on knowledge of local directories. They should be run locally only. - -pub fn set_local_dir() { - let mut local = current_dir().unwrap(); - local.push(TEST_SOURCE_DIRECTORY); - - set_current_dir(local).unwrap(); -} - -#[test] -#[ignore] -fn test_basic() { - set_local_dir(); - - let program_string = include_str!("basic.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_multiple() { - set_local_dir(); - - let program_string = include_str!("multiple.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_star() { - set_local_dir(); - - let program_string = include_str!("star.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_star_fail() { - set_local_dir(); - - let program_string = include_str!("star_fail.leo"); - assert!(parse_program(program_string).is_err()); -} - -#[test] -#[ignore] -fn test_alias() { - set_local_dir(); - - let program_string = include_str!("alias.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// naming tests -#[test] -#[ignore] -fn test_names_pass() { - set_local_dir(); - - let program_string = include_str!("names.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_names_fail_1() { - set_local_dir(); - - let program_string = include_str!("names_dash_a.leo"); - assert!(parse_program(program_string).is_err()); -} - -#[test] -#[ignore] -fn test_names_fail_2() { - set_local_dir(); - - let program_string = include_str!("names_a_dash.leo"); - assert!(parse_program(program_string).is_err()); -} - -#[test] -#[ignore] -fn test_names_fail_3() { - set_local_dir(); - - let program_string = include_str!("names_underscore.leo"); - assert!(parse_program(program_string).is_err()); -} - -#[test] -#[ignore] -fn test_names_fail_4() { - set_local_dir(); - - let program_string = include_str!("names_dollar.leo"); - assert!(parse_program(program_string).is_err()); -} - -// more complex tests -#[test] -#[ignore] -fn test_many_import() { - set_local_dir(); - - let program_string = include_str!("many_import.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -#[ignore] -fn test_many_import_star() { - set_local_dir(); - - let program_string = include_str!("many_import_star.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/import/multiple.leo b/compiler/_otests/import/multiple.leo deleted file mode 100644 index 4bd181c02d..0000000000 --- a/compiler/_otests/import/multiple.leo +++ /dev/null @@ -1,10 +0,0 @@ -import test-import.( - Point, - foo -); - -function main() { - const a = Point { x: 1u32, y: 0u32 }; - - console.assert(a.x == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/import/names.leo b/compiler/_otests/import/names.leo deleted file mode 100644 index d3ce50829a..0000000000 --- a/compiler/_otests/import/names.leo +++ /dev/null @@ -1,5 +0,0 @@ -import a0-f.foo; -import a-9.bar; -import hello-world.hello; - -function main() {} \ No newline at end of file diff --git a/compiler/_otests/import/names_a_dash.leo b/compiler/_otests/import/names_a_dash.leo deleted file mode 100644 index ec136176b2..0000000000 --- a/compiler/_otests/import/names_a_dash.leo +++ /dev/null @@ -1,3 +0,0 @@ -import a-.foo; - -function main() {} \ No newline at end of file diff --git a/compiler/_otests/import/names_dash_a.leo b/compiler/_otests/import/names_dash_a.leo deleted file mode 100644 index 95ccb7e4a5..0000000000 --- a/compiler/_otests/import/names_dash_a.leo +++ /dev/null @@ -1,3 +0,0 @@ -import -a.foo; - -function main() {} \ No newline at end of file diff --git a/compiler/_otests/import/names_dollar.leo b/compiler/_otests/import/names_dollar.leo deleted file mode 100644 index e4eaec3719..0000000000 --- a/compiler/_otests/import/names_dollar.leo +++ /dev/null @@ -1,3 +0,0 @@ -import money$.foo; - -function main() {} \ No newline at end of file diff --git a/compiler/_otests/import/names_underscore.leo b/compiler/_otests/import/names_underscore.leo deleted file mode 100644 index c5822ebadd..0000000000 --- a/compiler/_otests/import/names_underscore.leo +++ /dev/null @@ -1,3 +0,0 @@ -import hello_world.foo; - -function main() {} \ No newline at end of file diff --git a/compiler/_otests/import/src/a-9.leo b/compiler/_otests/import/src/a-9.leo deleted file mode 100644 index 8cd9f87f14..0000000000 --- a/compiler/_otests/import/src/a-9.leo +++ /dev/null @@ -1 +0,0 @@ -function bar() {} \ No newline at end of file diff --git a/compiler/_otests/import/src/a0-f.leo b/compiler/_otests/import/src/a0-f.leo deleted file mode 100644 index c99ad3b713..0000000000 --- a/compiler/_otests/import/src/a0-f.leo +++ /dev/null @@ -1 +0,0 @@ -function foo() {} \ No newline at end of file diff --git a/compiler/_otests/import/src/hello-world.leo b/compiler/_otests/import/src/hello-world.leo deleted file mode 100644 index 2d96e74c4c..0000000000 --- a/compiler/_otests/import/src/hello-world.leo +++ /dev/null @@ -1 +0,0 @@ -function hello() {} \ No newline at end of file diff --git a/compiler/_otests/import/src/test-import.leo b/compiler/_otests/import/src/test-import.leo deleted file mode 100644 index 9a57d433f4..0000000000 --- a/compiler/_otests/import/src/test-import.leo +++ /dev/null @@ -1,8 +0,0 @@ -circuit Point { - x: u32 - y: u32 -} - -function foo() -> u32 { - return 1u32; -} \ No newline at end of file diff --git a/compiler/_otests/import/star.leo b/compiler/_otests/import/star.leo deleted file mode 100644 index 69d0791627..0000000000 --- a/compiler/_otests/import/star.leo +++ /dev/null @@ -1,7 +0,0 @@ -import test-import.*; - -function main() { - const a = Point { x: 1u32, y: 0u32 }; - - console.assert(foo() == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/import/star_fail.leo b/compiler/_otests/import/star_fail.leo deleted file mode 100644 index 47f2efeda7..0000000000 --- a/compiler/_otests/import/star_fail.leo +++ /dev/null @@ -1,4 +0,0 @@ -// importing `*` from a directory is illegal -import bar.bat.*; - -function main() {} \ No newline at end of file diff --git a/compiler/_otests/input_files/mod.rs b/compiler/_otests/input_files/mod.rs deleted file mode 100644 index af220752b8..0000000000 --- a/compiler/_otests/input_files/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -mod program_input; -mod program_input_and_program_state; -mod program_input_constants; -mod program_registers; -mod program_state; diff --git a/compiler/_otests/input_files/program_input/input/main.in b/compiler/_otests/input_files/program_input/input/main.in deleted file mode 100644 index 16ba5231af..0000000000 --- a/compiler/_otests/input_files/program_input/input/main.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: bool = true; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/input/main_array.in b/compiler/_otests/input_files/program_input/input/main_array.in deleted file mode 100644 index 34db280b2e..0000000000 --- a/compiler/_otests/input_files/program_input/input/main_array.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -x: [i16; 1] = [0i16; 1]; diff --git a/compiler/_otests/input_files/program_input/input/main_array_fail.in b/compiler/_otests/input_files/program_input/input/main_array_fail.in deleted file mode 100644 index efdc161ee4..0000000000 --- a/compiler/_otests/input_files/program_input/input/main_array_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -x: [i16; 1] = [0i16; 1]; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/input/main_fail_name.in b/compiler/_otests/input_files/program_input/input/main_fail_name.in deleted file mode 100644 index 411529499c..0000000000 --- a/compiler/_otests/input_files/program_input/input/main_fail_name.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -bad_name: bool = true; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/input/main_fail_type.in b/compiler/_otests/input_files/program_input/input/main_fail_type.in deleted file mode 100644 index a5cf30c8cc..0000000000 --- a/compiler/_otests/input_files/program_input/input/main_fail_type.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: u8 = 1; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/input/main_field.in b/compiler/_otests/input_files/program_input/input/main_field.in deleted file mode 100644 index fe9eebbd56..0000000000 --- a/compiler/_otests/input_files/program_input/input/main_field.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -a: field = 1; -b: field = -1; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/input/main_group.in b/compiler/_otests/input_files/program_input/input/main_group.in deleted file mode 100644 index 2a7aecd0ad..0000000000 --- a/compiler/_otests/input_files/program_input/input/main_group.in +++ /dev/null @@ -1,4 +0,0 @@ -[main] -a: group = 1group; -b: group = -1group; -c: group = (0, -1)group; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/input/main_multi_dimension_array.in b/compiler/_otests/input_files/program_input/input/main_multi_dimension_array.in deleted file mode 100644 index e62ec2f232..0000000000 --- a/compiler/_otests/input_files/program_input/input/main_multi_dimension_array.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/input/main_multiple.in b/compiler/_otests/input_files/program_input/input/main_multiple.in deleted file mode 100644 index 546c971bf8..0000000000 --- a/compiler/_otests/input_files/program_input/input/main_multiple.in +++ /dev/null @@ -1,3 +0,0 @@ -[main] -a: bool = true; -b: bool = false; diff --git a/compiler/_otests/input_files/program_input/input/main_tuple_fail.in b/compiler/_otests/input_files/program_input/input/main_tuple_fail.in deleted file mode 100644 index aada924c29..0000000000 --- a/compiler/_otests/input_files/program_input/input/main_tuple_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -x: (u8, bool) = (10, true); // wrong size here; main expects (u8, bool, u8) \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/main.leo b/compiler/_otests/input_files/program_input/main.leo deleted file mode 100644 index ba6be77256..0000000000 --- a/compiler/_otests/input_files/program_input/main.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: bool) { - console.assert(a == true); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/main_array.leo b/compiler/_otests/input_files/program_input/main_array.leo deleted file mode 100644 index dd7f265457..0000000000 --- a/compiler/_otests/input_files/program_input/main_array.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main (x: [i16; 1]) { - console.log("{}", x); - console.assert(x[0] == 0); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/main_array_fail.leo b/compiler/_otests/input_files/program_input/main_array_fail.leo deleted file mode 100644 index d8c6f301d8..0000000000 --- a/compiler/_otests/input_files/program_input/main_array_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(x: [i16; 2]){ - console.log("x: {}", x); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/main_field.leo b/compiler/_otests/input_files/program_input/main_field.leo deleted file mode 100644 index 19bf456ee7..0000000000 --- a/compiler/_otests/input_files/program_input/main_field.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(a: field, b: field) { - // Change to assert when == is implemented for field. - console.log("a: {}", a); - console.log("b: {}", b); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/main_group.leo b/compiler/_otests/input_files/program_input/main_group.leo deleted file mode 100644 index b7795ac7e7..0000000000 --- a/compiler/_otests/input_files/program_input/main_group.leo +++ /dev/null @@ -1,6 +0,0 @@ -function main(a: group, b: group, c: group) { - // Change to assert when == is implemented for group. - console.log("a: {}", a); - console.log("b: {}", b); - console.log("c: {}", c); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/main_multi_dimension_array.leo b/compiler/_otests/input_files/program_input/main_multi_dimension_array.leo deleted file mode 100644 index 7c89cc1082..0000000000 --- a/compiler/_otests/input_files/program_input/main_multi_dimension_array.leo +++ /dev/null @@ -1,9 +0,0 @@ -function main(x: [i16; (2, 2, 3)]){ - console.log("x: {}", x); - - const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; - console.log("y: {}", y); - - console.assert(x[0][0][0] == y[0][0][0]); - console.assert(x[1][1][2] == y[1][1][2]); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/main_multiple.leo b/compiler/_otests/input_files/program_input/main_multiple.leo deleted file mode 100644 index eb5ef8d1f6..0000000000 --- a/compiler/_otests/input_files/program_input/main_multiple.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main(a: bool, b: bool) { - console.assert(a == true); - console.assert(b == false); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/main_tuple_fail.leo b/compiler/_otests/input_files/program_input/main_tuple_fail.leo deleted file mode 100644 index 7874773eff..0000000000 --- a/compiler/_otests/input_files/program_input/main_tuple_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(x: (u8, bool, u8)) { - console.log("x: {}", x); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input/mod.rs b/compiler/_otests/input_files/program_input/mod.rs deleted file mode 100644 index 9fa79b9790..0000000000 --- a/compiler/_otests/input_files/program_input/mod.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_compiler_error, parse_program_with_input, EdwardsTestCompiler}; -use leo_compiler::errors::CompilerError; - -fn expect_fail(program: EdwardsTestCompiler) { - match expect_compiler_error(program) { - CompilerError::FunctionError(_) => {} - err => panic!("expected input parser error, got {:?}", err), - } -} - -#[test] -fn test_input_pass() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_array_fail() { - let program_string = include_str!("main_array.leo"); - let input_string = include_str!("input/main_array.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_multi_dimension_array() { - let program_string = include_str!("main_multi_dimension_array.leo"); - let input_string = include_str!("input/main_multi_dimension_array.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_fail_name() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_fail_name.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_fail_type() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_fail_type.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_multiple() { - let program_string = include_str!("main_multiple.leo"); - let input_string = include_str!("input/main_multiple.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_array_dimensions_mismatch() { - let program_string = include_str!("main_array_fail.leo"); - let input_string = include_str!("input/main_array_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_tuple_size_mismatch() { - let program_string = include_str!("main_tuple_fail.leo"); - let input_string = include_str!("input/main_tuple_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_field_input() { - let program_string = include_str!("main_field.leo"); - let input_string = include_str!("input/main_field.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_group_input() { - let program_string = include_str!("main_group.leo"); - let input_string = include_str!("input/main_group.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/input_files/program_input_and_program_state/access.leo b/compiler/_otests/input_files/program_input_and_program_state/access.leo deleted file mode 100644 index 819f6c6c1e..0000000000 --- a/compiler/_otests/input_files/program_input_and_program_state/access.leo +++ /dev/null @@ -1,11 +0,0 @@ -function main(data: [u8; 32]) { - console.assert(input.registers.value_balance == 0u64); - - console.assert(input.state.leaf_index == 0u32); - - console.assert(input.record.value == 5u64); - - console.assert(input.state_leaf.network_id == 0u8); - - console.assert(data == [0u8; 32]); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_and_program_state/input/basic.in b/compiler/_otests/input_files/program_input_and_program_state/input/basic.in deleted file mode 100644 index b62eee0443..0000000000 --- a/compiler/_otests/input_files/program_input_and_program_state/input/basic.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: bool = true; - -[registers] -b: bool = true; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_and_program_state/input/basic.state b/compiler/_otests/input_files/program_input_and_program_state/input/basic.state deleted file mode 100644 index 78706190fe..0000000000 --- a/compiler/_otests/input_files/program_input_and_program_state/input/basic.state +++ /dev/null @@ -1,12 +0,0 @@ -[[public]] - -[state] -a: bool = true; - -[[private]] - -[record] -a: bool = true; - -[state_leaf] -a: bool = true; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.in b/compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.in deleted file mode 100644 index 0d4ece3b1c..0000000000 --- a/compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.in +++ /dev/null @@ -1,6 +0,0 @@ -[main] -data: [u8; 32] = [0u8; 32]; - -[registers] -token_id: [u8; 32] = [0u8; 32]; -value_balance: u64 = 0; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.state b/compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.state deleted file mode 100644 index 219fc44776..0000000000 --- a/compiler/_otests/input_files/program_input_and_program_state/input/token_withdraw.state +++ /dev/null @@ -1,24 +0,0 @@ -[[public]] - -[state] -leaf_index: u32 = 0; -root: [u8; 32] = [0u8; 32]; - -[[private]] - -[record] -serial_number: [u8; 32] = [0u8; 32]; -commitment: [u8; 32] = [0u8; 32]; -owner: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; -value: u64 = 5; -payload: [u8; 32] = [0u8; 32]; -birth_program_id: [u8; 32] = [0u8; 32]; -death_program_id: [u8; 32] = [0u8; 32]; -serial_number_nonce: [u8; 32] = [0u8; 32]; -commitment_randomness: [u8; 32] = [0u8; 32]; - -[state_leaf] -path: [u8; 128] = [0u8; 128]; -memo: [u8; 32] = [0u8; 32]; -network_id: u8 = 0; -leaf_randomness: [u8; 32] = [0u8; 32]; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_and_program_state/mod.rs b/compiler/_otests/input_files/program_input_and_program_state/mod.rs deleted file mode 100644 index 25541030ab..0000000000 --- a/compiler/_otests/input_files/program_input_and_program_state/mod.rs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_input_and_state, parse_program_with_input_and_state}; - -#[test] -fn test_basic() { - let input_string = include_str!("input/basic.in"); - let state_string = include_str!("input/basic.state"); - - parse_input_and_state(input_string, state_string).unwrap(); -} - -#[test] -fn test_full() { - let input_string = include_str!("input/token_withdraw.in"); - let state_string = include_str!("input/token_withdraw.state"); - - parse_input_and_state(input_string, state_string).unwrap(); -} - -#[test] -fn test_access() { - let program_string = include_str!("access.leo"); - let input_string = include_str!("input/token_withdraw.in"); - let state_string = include_str!("input/token_withdraw.state"); - - let program = parse_program_with_input_and_state(program_string, input_string, state_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/input_files/program_input_constants/input/main.in b/compiler/_otests/input_files/program_input_constants/input/main.in deleted file mode 100644 index 625ffc1ffb..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -a: bool = true; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_array.in b/compiler/_otests/input_files/program_input_constants/input/main_array.in deleted file mode 100644 index 3fe6502e8f..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_array.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -x: [i16; 1] = [0i16; 1]; diff --git a/compiler/_otests/input_files/program_input_constants/input/main_array_fail.in b/compiler/_otests/input_files/program_input_constants/input/main_array_fail.in deleted file mode 100644 index e63331af22..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_array_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -x: [i16; 1] = [0i16; 1]; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_double_declaration_fail.in b/compiler/_otests/input_files/program_input_constants/input/main_double_declaration_fail.in deleted file mode 100644 index fcc95402a3..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_double_declaration_fail.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -a: bool = true; - -[constants] -a: bool = false; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_fail_name.in b/compiler/_otests/input_files/program_input_constants/input/main_fail_name.in deleted file mode 100644 index 0cae21cc28..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_fail_name.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -bad_name: bool = true; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_fail_type.in b/compiler/_otests/input_files/program_input_constants/input/main_fail_type.in deleted file mode 100644 index 0bb8f694fd..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_fail_type.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -a: u8 = 1; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_field.in b/compiler/_otests/input_files/program_input_constants/input/main_field.in deleted file mode 100644 index deea2a01a3..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_field.in +++ /dev/null @@ -1,3 +0,0 @@ -[constants] -a: field = 1; -b: field = -1; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_group.in b/compiler/_otests/input_files/program_input_constants/input/main_group.in deleted file mode 100644 index 52e52dc6a8..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_group.in +++ /dev/null @@ -1,4 +0,0 @@ -[constants] -a: group = 1group; -b: group = -1group; -c: group = (0, -1)group; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_multi_dimension_array.in b/compiler/_otests/input_files/program_input_constants/input/main_multi_dimension_array.in deleted file mode 100644 index 0d052ae99b..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_multi_dimension_array.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_multiple.in b/compiler/_otests/input_files/program_input_constants/input/main_multiple.in deleted file mode 100644 index 3e61056b7b..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_multiple.in +++ /dev/null @@ -1,3 +0,0 @@ -[constants] -a: bool = true; -b: bool = false; diff --git a/compiler/_otests/input_files/program_input_constants/input/main_not_const_input_fail.in b/compiler/_otests/input_files/program_input_constants/input/main_not_const_input_fail.in deleted file mode 100644 index b2aaee854e..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_not_const_input_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: bool = true; // expecting const a, not main a \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_tuple_fail.in b/compiler/_otests/input_files/program_input_constants/input/main_tuple_fail.in deleted file mode 100644 index 4341911fba..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_tuple_fail.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -x: (u8, bool) = (10, true); // wrong size here; main expects (u8, bool, u8) \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/input/main_type_mismatch.in b/compiler/_otests/input_files/program_input_constants/input/main_type_mismatch.in deleted file mode 100644 index d50f65428d..0000000000 --- a/compiler/_otests/input_files/program_input_constants/input/main_type_mismatch.in +++ /dev/null @@ -1,2 +0,0 @@ -[constants] -a: u8 = 10; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/main.leo b/compiler/_otests/input_files/program_input_constants/main.leo deleted file mode 100644 index 0c33516ba8..0000000000 --- a/compiler/_otests/input_files/program_input_constants/main.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(const a: bool) { - console.assert(a == true); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/main_array.leo b/compiler/_otests/input_files/program_input_constants/main_array.leo deleted file mode 100644 index aa592183da..0000000000 --- a/compiler/_otests/input_files/program_input_constants/main_array.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main (const x: [i16; 1]) { - console.log("{}", x); - console.assert(x[0] == 0); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/main_array_fail.leo b/compiler/_otests/input_files/program_input_constants/main_array_fail.leo deleted file mode 100644 index 6e7656f9b9..0000000000 --- a/compiler/_otests/input_files/program_input_constants/main_array_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(const x: [i16; 2]){ - console.log("x: {}", x); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/main_field.leo b/compiler/_otests/input_files/program_input_constants/main_field.leo deleted file mode 100644 index 60fc67fc74..0000000000 --- a/compiler/_otests/input_files/program_input_constants/main_field.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(const a: field, const b: field) { - // Change to assert when == is implemented for field. - console.log("a: {}", a); - console.log("b: {}", b); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/main_group.leo b/compiler/_otests/input_files/program_input_constants/main_group.leo deleted file mode 100644 index 93accf710d..0000000000 --- a/compiler/_otests/input_files/program_input_constants/main_group.leo +++ /dev/null @@ -1,6 +0,0 @@ -function main(const a: group, const b: group, const c: group) { - // Change to assert when == is implemented for group. - console.log("a: {}", a); - console.log("b: {}", b); - console.log("c: {}", c); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/main_multi_dimension_array.leo b/compiler/_otests/input_files/program_input_constants/main_multi_dimension_array.leo deleted file mode 100644 index 56a1b3c7cf..0000000000 --- a/compiler/_otests/input_files/program_input_constants/main_multi_dimension_array.leo +++ /dev/null @@ -1,9 +0,0 @@ -function main(const x: [i16; (2, 2, 3)]){ - console.log("x: {}", x); - - let y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; - console.log("y: {}", y); - - console.assert(x[0][0][0] == y[0][0][0]); - console.assert(x[1][1][2] == y[1][1][2]); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/main_multiple.leo b/compiler/_otests/input_files/program_input_constants/main_multiple.leo deleted file mode 100644 index 2c2179cc3d..0000000000 --- a/compiler/_otests/input_files/program_input_constants/main_multiple.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main(const a: bool, const b: bool) { - console.assert(a == true); - console.assert(b == false); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/main_tuple_fail.leo b/compiler/_otests/input_files/program_input_constants/main_tuple_fail.leo deleted file mode 100644 index 639ec42835..0000000000 --- a/compiler/_otests/input_files/program_input_constants/main_tuple_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(const x: (u8, bool, u8)) { - console.log("x: {}", x); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_input_constants/mod.rs b/compiler/_otests/input_files/program_input_constants/mod.rs deleted file mode 100644 index 284aef6312..0000000000 --- a/compiler/_otests/input_files/program_input_constants/mod.rs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_compiler_error, parse_program_with_input, EdwardsTestCompiler}; -use leo_compiler::errors::CompilerError; - -fn expect_fail(program: EdwardsTestCompiler) { - match expect_compiler_error(program) { - CompilerError::FunctionError(_) => {} - err => panic!("expected input parser error, got {:?}", err), - } -} - -#[test] -fn test_input_pass() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_array_fail() { - let program_string = include_str!("main_array.leo"); - let input_string = include_str!("input/main_array.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_multi_dimension_array() { - let program_string = include_str!("main_multi_dimension_array.leo"); - let input_string = include_str!("input/main_multi_dimension_array.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_fail_name() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_fail_name.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_fail_type() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_fail_type.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_multiple() { - let program_string = include_str!("main_multiple.leo"); - let input_string = include_str!("input/main_multiple.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_input_array_dimensions_mismatch() { - let program_string = include_str!("main_array_fail.leo"); - let input_string = include_str!("input/main_array_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_input_double_declaration() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_double_declaration_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_non_constant_input() { - let program_string = include_str!("main.leo"); - let input_string = include_str!("input/main_not_const_input_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_tuple_size_mismatch() { - let program_string = include_str!("main_tuple_fail.leo"); - let input_string = include_str!("input/main_tuple_fail.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_fail(program); -} - -#[test] -fn test_field_input() { - let program_string = include_str!("main_field.leo"); - let input_string = include_str!("input/main_field.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_group_input() { - let program_string = include_str!("main_group.leo"); - let input_string = include_str!("input/main_group.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/input_files/program_registers/input/array.in b/compiler/_otests/input_files/program_registers/input/array.in deleted file mode 100644 index a952dda5a6..0000000000 --- a/compiler/_otests/input_files/program_registers/input/array.in +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r2: [[u8; 4]; 2] = [[0u64, 0u64, 0u64, 0u64], [0u64, 0u64, 0u64, 0u64]]; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_registers/input/main.in b/compiler/_otests/input_files/program_registers/input/main.in deleted file mode 100644 index 1bff5e584f..0000000000 --- a/compiler/_otests/input_files/program_registers/input/main.in +++ /dev/null @@ -1,4 +0,0 @@ -[main] - -[registers] -r: u8 = 0u8; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_registers/mod.rs b/compiler/_otests/input_files/program_registers/mod.rs deleted file mode 100644 index b172c141e0..0000000000 --- a/compiler/_otests/input_files/program_registers/mod.rs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{expect_compiler_error, get_output, parse_program_with_input}; - -#[test] -fn test_registers_pass() { - let program_string = include_str!("registers_pass.leo"); - let input_string = include_str!("input/main.in"); - let expected = include_bytes!("output/registers_pass.out"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let actual = get_output(program); - - assert!(expected.eq(actual.bytes().as_slice())); -} - -#[test] -fn test_registers_fail() { - let program_string = include_str!("registers_fail.leo"); - let input_string = include_str!("input/main.in"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - expect_compiler_error(program); -} - -#[test] -fn test_registers_array() { - let program_string = include_str!("registers_array.leo"); - let input_string = include_str!("input/array.in"); - let expected = include_bytes!("output/registers_array.out"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let actual = get_output(program); - - assert!(expected.eq(actual.bytes().as_slice())); -} diff --git a/compiler/_otests/input_files/program_registers/output/registers_array.out b/compiler/_otests/input_files/program_registers/output/registers_array.out deleted file mode 100644 index 20294ac107..0000000000 --- a/compiler/_otests/input_files/program_registers/output/registers_array.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r2: [[u8; 4]; 2] = [[1, 2, 3, 4], [5, 6, 7, 8]]; diff --git a/compiler/_otests/input_files/program_registers/output/registers_pass.out b/compiler/_otests/input_files/program_registers/output/registers_pass.out deleted file mode 100644 index e26ba9195e..0000000000 --- a/compiler/_otests/input_files/program_registers/output/registers_pass.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: u8 = 1; diff --git a/compiler/_otests/input_files/program_registers/registers_array.leo b/compiler/_otests/input_files/program_registers/registers_array.leo deleted file mode 100644 index 324515c13f..0000000000 --- a/compiler/_otests/input_files/program_registers/registers_array.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main () -> [[u8; 4]; 2] { - return [[1u8, 2u8, 3u8, 4u8], [5u8, 6u8, 7u8, 8u8]]; -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_registers/registers_fail.leo b/compiler/_otests/input_files/program_registers/registers_fail.leo deleted file mode 100644 index 78af2bb5d8..0000000000 --- a/compiler/_otests/input_files/program_registers/registers_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() -> bool { - return false; -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_registers/registers_pass.leo b/compiler/_otests/input_files/program_registers/registers_pass.leo deleted file mode 100644 index ff5ef4a0cd..0000000000 --- a/compiler/_otests/input_files/program_registers/registers_pass.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() -> u8 { - return 1u8; -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_state/access_all.leo b/compiler/_otests/input_files/program_state/access_all.leo deleted file mode 100644 index bf85a3f722..0000000000 --- a/compiler/_otests/input_files/program_state/access_all.leo +++ /dev/null @@ -1,8 +0,0 @@ -function main() { - console.assert(input.state.root == [0u8; 32]); - - const expected: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - //console.assert(input.record.owner, expected); - - console.assert(input.state_leaf.network_id == 0u8); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_state/access_state.leo b/compiler/_otests/input_files/program_state/access_state.leo deleted file mode 100644 index a7afe50a5f..0000000000 --- a/compiler/_otests/input_files/program_state/access_state.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - console.assert(input.state.root == [0u8; 32]); -} \ No newline at end of file diff --git a/compiler/_otests/input_files/program_state/input/basic.state b/compiler/_otests/input_files/program_state/input/basic.state deleted file mode 100644 index 2f40f7f1c4..0000000000 --- a/compiler/_otests/input_files/program_state/input/basic.state +++ /dev/null @@ -1,10 +0,0 @@ -[[public]] -[state] -root: bool = true; - -[[private]] -[record] -id: bool = false; - -[state_leaf] -leaf: bool = true; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_state/input/section_invalid.state b/compiler/_otests/input_files/program_state/input/section_invalid.state deleted file mode 100644 index 955b881192..0000000000 --- a/compiler/_otests/input_files/program_state/input/section_invalid.state +++ /dev/null @@ -1,4 +0,0 @@ -[[public]] - -[record] -a: bool = true; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_state/input/section_undefined.state b/compiler/_otests/input_files/program_state/input/section_undefined.state deleted file mode 100644 index 5f881cbb29..0000000000 --- a/compiler/_otests/input_files/program_state/input/section_undefined.state +++ /dev/null @@ -1,4 +0,0 @@ -[[public]] - -[invalid] -a: bool = true; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_state/input/token_withdraw.state b/compiler/_otests/input_files/program_state/input/token_withdraw.state deleted file mode 100644 index 219fc44776..0000000000 --- a/compiler/_otests/input_files/program_state/input/token_withdraw.state +++ /dev/null @@ -1,24 +0,0 @@ -[[public]] - -[state] -leaf_index: u32 = 0; -root: [u8; 32] = [0u8; 32]; - -[[private]] - -[record] -serial_number: [u8; 32] = [0u8; 32]; -commitment: [u8; 32] = [0u8; 32]; -owner: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; -value: u64 = 5; -payload: [u8; 32] = [0u8; 32]; -birth_program_id: [u8; 32] = [0u8; 32]; -death_program_id: [u8; 32] = [0u8; 32]; -serial_number_nonce: [u8; 32] = [0u8; 32]; -commitment_randomness: [u8; 32] = [0u8; 32]; - -[state_leaf] -path: [u8; 128] = [0u8; 128]; -memo: [u8; 32] = [0u8; 32]; -network_id: u8 = 0; -leaf_randomness: [u8; 32] = [0u8; 32]; \ No newline at end of file diff --git a/compiler/_otests/input_files/program_state/input/visibility_fail.state b/compiler/_otests/input_files/program_state/input/visibility_fail.state deleted file mode 100644 index c5928ddcbd..0000000000 --- a/compiler/_otests/input_files/program_state/input/visibility_fail.state +++ /dev/null @@ -1 +0,0 @@ -[[pure]] \ No newline at end of file diff --git a/compiler/_otests/input_files/program_state/mod.rs b/compiler/_otests/input_files/program_state/mod.rs deleted file mode 100644 index c5959196f5..0000000000 --- a/compiler/_otests/input_files/program_state/mod.rs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_program_with_state, parse_state}; - -#[test] -fn test_basic() { - let state_string = include_str!("input/basic.state"); - - parse_state(state_string).unwrap(); -} - -#[test] -fn test_token_withdraw() { - let state_string = include_str!("input/token_withdraw.state"); - - parse_state(state_string).unwrap(); -} - -#[test] -fn test_access_state() { - let program_string = include_str!("access_state.leo"); - let state_string = include_str!("input/token_withdraw.state"); - - let program = parse_program_with_state(program_string, state_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_access_all() { - let program_string = include_str!("access_all.leo"); - let state_string = include_str!("input/token_withdraw.state"); - - let program = parse_program_with_state(program_string, state_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_visibility_fail() { - let state_string = include_str!("input/visibility_fail.state"); - - let is_err = parse_state(state_string).is_err(); - - assert!(is_err); -} - -#[test] -fn test_section_undefined() { - let state_string = include_str!("input/section_undefined.state"); - - let is_err = parse_state(state_string).is_err(); - - assert!(is_err); -} - -#[test] -fn test_section_invalid() { - let state_string = include_str!("input/section_invalid.state"); - - let is_err = parse_state(state_string).is_err(); - - assert!(is_err); -} diff --git a/compiler/_otests/integers/i128/add.leo b/compiler/_otests/integers/i128/add.leo deleted file mode 100644 index e35648f545..0000000000 --- a/compiler/_otests/integers/i128/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/console_assert.leo b/compiler/_otests/integers/i128/console_assert.leo deleted file mode 100644 index c89021f609..0000000000 --- a/compiler/_otests/integers/i128/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/div.leo b/compiler/_otests/integers/i128/div.leo deleted file mode 100644 index ffaeae19a8..0000000000 --- a/compiler/_otests/integers/i128/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/eq.leo b/compiler/_otests/integers/i128/eq.leo deleted file mode 100644 index f4beddc8fc..0000000000 --- a/compiler/_otests/integers/i128/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/ge.leo b/compiler/_otests/integers/i128/ge.leo deleted file mode 100644 index 1fbbd68073..0000000000 --- a/compiler/_otests/integers/i128/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/gt.leo b/compiler/_otests/integers/i128/gt.leo deleted file mode 100644 index 27849afbe8..0000000000 --- a/compiler/_otests/integers/i128/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/input.leo b/compiler/_otests/integers/i128/input.leo deleted file mode 100644 index c89021f609..0000000000 --- a/compiler/_otests/integers/i128/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/le.leo b/compiler/_otests/integers/i128/le.leo deleted file mode 100644 index ea0c3c9e1d..0000000000 --- a/compiler/_otests/integers/i128/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/lt.leo b/compiler/_otests/integers/i128/lt.leo deleted file mode 100644 index bde4def85c..0000000000 --- a/compiler/_otests/integers/i128/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/max.leo b/compiler/_otests/integers/i128/max.leo deleted file mode 100644 index 5ba44213e1..0000000000 --- a/compiler/_otests/integers/i128/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i128 = 170141183460469231731687303715884105727; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/max_fail.leo b/compiler/_otests/integers/i128/max_fail.leo deleted file mode 100644 index a9a46afd7f..0000000000 --- a/compiler/_otests/integers/i128/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i128 = 170141183460469231731687303715884105728; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/min.leo b/compiler/_otests/integers/i128/min.leo deleted file mode 100644 index 19509a3fb0..0000000000 --- a/compiler/_otests/integers/i128/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i128 = -170141183460469231731687303715884105728; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/min_fail.leo b/compiler/_otests/integers/i128/min_fail.leo deleted file mode 100644 index 918f0e439d..0000000000 --- a/compiler/_otests/integers/i128/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i128 = -170141183460469231731687303715884105729; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/mod.rs b/compiler/_otests/integers/i128/mod.rs deleted file mode 100644 index ead011f14e..0000000000 --- a/compiler/_otests/integers/i128/mod.rs +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I128Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI128, - i128, - IntegerType::Signed(SignedIntegerType::I128Type(I128Type {})), - Int128 -); - -#[test] -fn test_i128_min() { - TestI128::test_min(); -} - -#[test] -fn test_i128_min_fail() { - TestI128::test_min_fail(); -} - -#[test] -fn test_i128_max() { - TestI128::test_max(); -} - -#[test] -fn test_i128_max_fail() { - TestI128::test_max_fail(); -} - -#[test] -fn test_i128_neg() { - TestI128::test_negate(); -} - -#[test] -fn test_i128_neg_max_fail() { - TestI128::test_negate_min_fail(); -} - -#[test] -fn test_i128_neg_zero() { - TestI128::test_negate_zero(); -} - -#[test] -fn test_i128_add() { - TestI128::test_add(); -} - -#[test] -fn test_i128_sub() { - TestI128::test_sub(); -} - -#[test] -fn test_i128_mul() { - TestI128::test_mul(); -} - -#[test] -#[ignore] // takes several minutes -fn test_i128_div() { - TestI128::test_div(); -} - -#[test] -fn test_i128_pow() { - TestI128::test_pow(); -} - -#[test] -fn test_i128_eq() { - TestI128::test_eq(); -} - -#[test] -fn test_i128_ne() { - TestI128::test_ne(); -} - -#[test] -fn test_i128_ge() { - TestI128::test_ge(); -} - -#[test] -fn test_i128_gt() { - TestI128::test_gt(); -} - -#[test] -fn test_i128_le() { - TestI128::test_le(); -} - -#[test] -fn test_i128_lt() { - TestI128::test_lt(); -} - -#[test] -fn test_i128_assert_eq() { - TestI128::test_console_assert(); -} - -#[test] -fn test_i128_ternary() { - TestI128::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/i128/mul.leo b/compiler/_otests/integers/i128/mul.leo deleted file mode 100644 index 25b902d53c..0000000000 --- a/compiler/_otests/integers/i128/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/ne.leo b/compiler/_otests/integers/i128/ne.leo deleted file mode 100644 index dae148b49c..0000000000 --- a/compiler/_otests/integers/i128/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/negate.leo b/compiler/_otests/integers/i128/negate.leo deleted file mode 100644 index 437ee06390..0000000000 --- a/compiler/_otests/integers/i128/negate.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128) { - console.assert(-a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/negate_min.leo b/compiler/_otests/integers/i128/negate_min.leo deleted file mode 100644 index c9de272960..0000000000 --- a/compiler/_otests/integers/i128/negate_min.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - const a: i128 = -170141183460469231731687303715884105728; - const b = -a; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/negate_zero.leo b/compiler/_otests/integers/i128/negate_zero.leo deleted file mode 100644 index e079baf393..0000000000 --- a/compiler/_otests/integers/i128/negate_zero.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = 0i128; - - console.assert(-a == 0i128); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/no_space_between_literal.leo b/compiler/_otests/integers/i128/no_space_between_literal.leo deleted file mode 100644 index 3142fb5724..0000000000 --- a/compiler/_otests/integers/i128/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 i128; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/pow.leo b/compiler/_otests/integers/i128/pow.leo deleted file mode 100644 index 05536aad51..0000000000 --- a/compiler/_otests/integers/i128/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/sub.leo b/compiler/_otests/integers/i128/sub.leo deleted file mode 100644 index 3a723eec49..0000000000 --- a/compiler/_otests/integers/i128/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i128, b: i128, c: i128) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i128/ternary.leo b/compiler/_otests/integers/i128/ternary.leo deleted file mode 100644 index a923c428e6..0000000000 --- a/compiler/_otests/integers/i128/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: i128, b: i128, c: i128) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/add.leo b/compiler/_otests/integers/i16/add.leo deleted file mode 100644 index 556ae65c3a..0000000000 --- a/compiler/_otests/integers/i16/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: i16) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/console_assert.leo b/compiler/_otests/integers/i16/console_assert.leo deleted file mode 100644 index 3afb25b207..0000000000 --- a/compiler/_otests/integers/i16/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/div.leo b/compiler/_otests/integers/i16/div.leo deleted file mode 100644 index 6d0c8f4614..0000000000 --- a/compiler/_otests/integers/i16/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: i16) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/eq.leo b/compiler/_otests/integers/i16/eq.leo deleted file mode 100644 index 338e3e50f6..0000000000 --- a/compiler/_otests/integers/i16/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/ge.leo b/compiler/_otests/integers/i16/ge.leo deleted file mode 100644 index 68a4d40bf8..0000000000 --- a/compiler/_otests/integers/i16/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/gt.leo b/compiler/_otests/integers/i16/gt.leo deleted file mode 100644 index 75d9bfb612..0000000000 --- a/compiler/_otests/integers/i16/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/input.leo b/compiler/_otests/integers/i16/input.leo deleted file mode 100644 index 3afb25b207..0000000000 --- a/compiler/_otests/integers/i16/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/le.leo b/compiler/_otests/integers/i16/le.leo deleted file mode 100644 index ff112c7fbc..0000000000 --- a/compiler/_otests/integers/i16/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/lt.leo b/compiler/_otests/integers/i16/lt.leo deleted file mode 100644 index 46c57aabe6..0000000000 --- a/compiler/_otests/integers/i16/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/max.leo b/compiler/_otests/integers/i16/max.leo deleted file mode 100644 index 2b70b3cc56..0000000000 --- a/compiler/_otests/integers/i16/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i16 = 32767; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/max_fail.leo b/compiler/_otests/integers/i16/max_fail.leo deleted file mode 100644 index 209bcc6518..0000000000 --- a/compiler/_otests/integers/i16/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i16 = 32768; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/min.leo b/compiler/_otests/integers/i16/min.leo deleted file mode 100644 index 3d05bef95a..0000000000 --- a/compiler/_otests/integers/i16/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i16 = -32768; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/min_fail.leo b/compiler/_otests/integers/i16/min_fail.leo deleted file mode 100644 index 13d7c8b7f2..0000000000 --- a/compiler/_otests/integers/i16/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i16 = -32769; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/mod.rs b/compiler/_otests/integers/i16/mod.rs deleted file mode 100644 index 6f415a0877..0000000000 --- a/compiler/_otests/integers/i16/mod.rs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I16Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI16, - i16, - IntegerType::Signed(SignedIntegerType::I16Type(I16Type {})), - Int16 -); - -#[test] -fn test_i16_min() { - TestI16::test_min(); -} - -#[test] -fn test_i16_min_fail() { - TestI16::test_min_fail(); -} - -#[test] -fn test_i16_max() { - TestI16::test_max(); -} - -#[test] -fn test_i16_max_fail() { - TestI16::test_max_fail(); -} - -#[test] -fn test_i16_neg() { - TestI16::test_negate(); -} - -#[test] -fn test_i16_neg_max_fail() { - TestI16::test_negate_min_fail(); -} - -#[test] -fn test_i16_neg_zero() { - TestI16::test_negate_zero(); -} - -#[test] -fn test_i16_add() { - TestI16::test_add(); -} - -#[test] -fn test_i16_sub() { - TestI16::test_sub(); -} - -#[test] -fn test_i16_mul() { - TestI16::test_mul(); -} - -#[test] -fn test_i16_div() { - TestI16::test_div(); -} - -#[test] -fn test_i16_pow() { - TestI16::test_pow(); -} - -#[test] -fn test_i16_eq() { - TestI16::test_eq(); -} - -#[test] -fn test_i16_ne() { - TestI16::test_ne(); -} - -#[test] -fn test_i16_ge() { - TestI16::test_ge(); -} - -#[test] -fn test_i16_gt() { - TestI16::test_gt(); -} - -#[test] -fn test_i16_le() { - TestI16::test_le(); -} - -#[test] -fn test_i16_lt() { - TestI16::test_lt(); -} - -#[test] -fn test_i16_console_assert() { - TestI16::test_console_assert(); -} - -#[test] -fn test_i16_ternary() { - TestI16::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/i16/mul.leo b/compiler/_otests/integers/i16/mul.leo deleted file mode 100644 index 6fd19b703a..0000000000 --- a/compiler/_otests/integers/i16/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: i16) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/ne.leo b/compiler/_otests/integers/i16/ne.leo deleted file mode 100644 index f0a9472678..0000000000 --- a/compiler/_otests/integers/i16/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/negate.leo b/compiler/_otests/integers/i16/negate.leo deleted file mode 100644 index 1d2644dce7..0000000000 --- a/compiler/_otests/integers/i16/negate.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16) { - console.assert(-a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/negate_min.leo b/compiler/_otests/integers/i16/negate_min.leo deleted file mode 100644 index d52a356396..0000000000 --- a/compiler/_otests/integers/i16/negate_min.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - const a = -32768i16; - const b = -a; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/negate_zero.leo b/compiler/_otests/integers/i16/negate_zero.leo deleted file mode 100644 index 20f8a4fba7..0000000000 --- a/compiler/_otests/integers/i16/negate_zero.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = 0i16; - - console.assert(-a == 0i16); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/no_space_between_literal.leo b/compiler/_otests/integers/i16/no_space_between_literal.leo deleted file mode 100644 index 96c6b2a914..0000000000 --- a/compiler/_otests/integers/i16/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 i16; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/pow.leo b/compiler/_otests/integers/i16/pow.leo deleted file mode 100644 index 769d2d2fbb..0000000000 --- a/compiler/_otests/integers/i16/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: i16) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/sub.leo b/compiler/_otests/integers/i16/sub.leo deleted file mode 100644 index e935935187..0000000000 --- a/compiler/_otests/integers/i16/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i16, b: i16, c: i16) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i16/ternary.leo b/compiler/_otests/integers/i16/ternary.leo deleted file mode 100644 index 4586b87bb4..0000000000 --- a/compiler/_otests/integers/i16/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: i16, b: i16, c: i16) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/add.leo b/compiler/_otests/integers/i32/add.leo deleted file mode 100644 index 3d8fb1b1d2..0000000000 --- a/compiler/_otests/integers/i32/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/console_assert.leo b/compiler/_otests/integers/i32/console_assert.leo deleted file mode 100644 index a2d6980e9a..0000000000 --- a/compiler/_otests/integers/i32/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/div.leo b/compiler/_otests/integers/i32/div.leo deleted file mode 100644 index 3189a354f0..0000000000 --- a/compiler/_otests/integers/i32/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/eq.leo b/compiler/_otests/integers/i32/eq.leo deleted file mode 100644 index bac7af0be0..0000000000 --- a/compiler/_otests/integers/i32/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/ge.leo b/compiler/_otests/integers/i32/ge.leo deleted file mode 100644 index 362521fc82..0000000000 --- a/compiler/_otests/integers/i32/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/gt.leo b/compiler/_otests/integers/i32/gt.leo deleted file mode 100644 index 63ddcaa85c..0000000000 --- a/compiler/_otests/integers/i32/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/input.leo b/compiler/_otests/integers/i32/input.leo deleted file mode 100644 index a2d6980e9a..0000000000 --- a/compiler/_otests/integers/i32/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/le.leo b/compiler/_otests/integers/i32/le.leo deleted file mode 100644 index 948c66b1fc..0000000000 --- a/compiler/_otests/integers/i32/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/lt.leo b/compiler/_otests/integers/i32/lt.leo deleted file mode 100644 index 72a8fb0d53..0000000000 --- a/compiler/_otests/integers/i32/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/max.leo b/compiler/_otests/integers/i32/max.leo deleted file mode 100644 index 074c75f1a6..0000000000 --- a/compiler/_otests/integers/i32/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i32 = 2147483647; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/max_fail.leo b/compiler/_otests/integers/i32/max_fail.leo deleted file mode 100644 index af2877ff5e..0000000000 --- a/compiler/_otests/integers/i32/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i32 = 2147483648; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/min.leo b/compiler/_otests/integers/i32/min.leo deleted file mode 100644 index 8436268ce6..0000000000 --- a/compiler/_otests/integers/i32/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i32 = -2147483648; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/min_fail.leo b/compiler/_otests/integers/i32/min_fail.leo deleted file mode 100644 index 11a683b087..0000000000 --- a/compiler/_otests/integers/i32/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i32 = -2147483649; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/mod.rs b/compiler/_otests/integers/i32/mod.rs deleted file mode 100644 index b8a6925ac2..0000000000 --- a/compiler/_otests/integers/i32/mod.rs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I32Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI32, - i32, - IntegerType::Signed(SignedIntegerType::I32Type(I32Type {})), - Int32 -); - -#[test] -fn test_i32_min() { - TestI32::test_min(); -} - -#[test] -fn test_i32_min_fail() { - TestI32::test_min_fail(); -} - -#[test] -fn test_i32_max() { - TestI32::test_max(); -} - -#[test] -fn test_i32_max_fail() { - TestI32::test_max_fail(); -} - -#[test] -fn test_i32_neg() { - TestI32::test_negate(); -} - -#[test] -fn test_i32_neg_max_fail() { - TestI32::test_negate_min_fail(); -} - -#[test] -fn test_i32_neg_zero() { - TestI32::test_negate_zero(); -} - -#[test] -fn test_i32_add() { - TestI32::test_add(); -} - -#[test] -fn test_i32_sub() { - TestI32::test_sub(); -} - -#[test] -fn test_i32_mul() { - TestI32::test_mul(); -} - -#[test] -fn test_i32_div() { - TestI32::test_div(); -} - -#[test] -fn test_i32_pow() { - TestI32::test_pow(); -} - -#[test] -fn test_i32_eq() { - TestI32::test_eq(); -} - -#[test] -fn test_i32_ne() { - TestI32::test_ne(); -} - -#[test] -fn test_i32_ge() { - TestI32::test_ge(); -} - -#[test] -fn test_i32_gt() { - TestI32::test_gt(); -} - -#[test] -fn test_i32_le() { - TestI32::test_le(); -} - -#[test] -fn test_i32_lt() { - TestI32::test_lt(); -} - -#[test] -fn test_i32_console_assert() { - TestI32::test_console_assert(); -} - -#[test] -fn test_i32_ternary() { - TestI32::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/i32/mul.leo b/compiler/_otests/integers/i32/mul.leo deleted file mode 100644 index 50ba5b4128..0000000000 --- a/compiler/_otests/integers/i32/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/ne.leo b/compiler/_otests/integers/i32/ne.leo deleted file mode 100644 index dcc1a185d1..0000000000 --- a/compiler/_otests/integers/i32/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/negate.leo b/compiler/_otests/integers/i32/negate.leo deleted file mode 100644 index eef94c934f..0000000000 --- a/compiler/_otests/integers/i32/negate.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32) { - console.assert(-a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/negate_min.leo b/compiler/_otests/integers/i32/negate_min.leo deleted file mode 100644 index a96455d57a..0000000000 --- a/compiler/_otests/integers/i32/negate_min.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - const a = -2147483648i32; - const b = -a; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/negate_zero.leo b/compiler/_otests/integers/i32/negate_zero.leo deleted file mode 100644 index a3807b1f8a..0000000000 --- a/compiler/_otests/integers/i32/negate_zero.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = 0i32; - - console.assert(-a == 0i32); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/no_space_between_literal.leo b/compiler/_otests/integers/i32/no_space_between_literal.leo deleted file mode 100644 index 845a7f403e..0000000000 --- a/compiler/_otests/integers/i32/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 i32; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/pow.leo b/compiler/_otests/integers/i32/pow.leo deleted file mode 100644 index ebb131e30b..0000000000 --- a/compiler/_otests/integers/i32/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/sub.leo b/compiler/_otests/integers/i32/sub.leo deleted file mode 100644 index 1f054a5ddf..0000000000 --- a/compiler/_otests/integers/i32/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i32, b: i32, c: i32) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i32/ternary.leo b/compiler/_otests/integers/i32/ternary.leo deleted file mode 100644 index 7927c2998b..0000000000 --- a/compiler/_otests/integers/i32/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: i32, b: i32, c: i32) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/add.leo b/compiler/_otests/integers/i64/add.leo deleted file mode 100644 index aefdbb178f..0000000000 --- a/compiler/_otests/integers/i64/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/console_assert.leo b/compiler/_otests/integers/i64/console_assert.leo deleted file mode 100644 index ab9a5d6e91..0000000000 --- a/compiler/_otests/integers/i64/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/div.leo b/compiler/_otests/integers/i64/div.leo deleted file mode 100644 index 142e4ab801..0000000000 --- a/compiler/_otests/integers/i64/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/eq.leo b/compiler/_otests/integers/i64/eq.leo deleted file mode 100644 index 86a234c834..0000000000 --- a/compiler/_otests/integers/i64/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/ge.leo b/compiler/_otests/integers/i64/ge.leo deleted file mode 100644 index e7b453c5dc..0000000000 --- a/compiler/_otests/integers/i64/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/gt.leo b/compiler/_otests/integers/i64/gt.leo deleted file mode 100644 index 9709bad012..0000000000 --- a/compiler/_otests/integers/i64/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/input.leo b/compiler/_otests/integers/i64/input.leo deleted file mode 100644 index ab9a5d6e91..0000000000 --- a/compiler/_otests/integers/i64/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/le.leo b/compiler/_otests/integers/i64/le.leo deleted file mode 100644 index 3e2cfcb711..0000000000 --- a/compiler/_otests/integers/i64/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/lt.leo b/compiler/_otests/integers/i64/lt.leo deleted file mode 100644 index ef4e38eb76..0000000000 --- a/compiler/_otests/integers/i64/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/max.leo b/compiler/_otests/integers/i64/max.leo deleted file mode 100644 index 593f91e110..0000000000 --- a/compiler/_otests/integers/i64/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i64 = 9223372036854775807; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/max_fail.leo b/compiler/_otests/integers/i64/max_fail.leo deleted file mode 100644 index 362b794a2c..0000000000 --- a/compiler/_otests/integers/i64/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i64 = 9223372036854775808; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/min.leo b/compiler/_otests/integers/i64/min.leo deleted file mode 100644 index 794d8fbfac..0000000000 --- a/compiler/_otests/integers/i64/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i64 = -9223372036854775808; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/min_fail.leo b/compiler/_otests/integers/i64/min_fail.leo deleted file mode 100644 index bb260ecc3f..0000000000 --- a/compiler/_otests/integers/i64/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i64 = -9223372036854775809; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/mod.rs b/compiler/_otests/integers/i64/mod.rs deleted file mode 100644 index ccfb06ce68..0000000000 --- a/compiler/_otests/integers/i64/mod.rs +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I64Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI64, - i64, - IntegerType::Signed(SignedIntegerType::I64Type(I64Type {})), - Int64 -); - -#[test] -fn test_i64_min() { - TestI64::test_min(); -} - -#[test] -fn test_i64_min_fail() { - TestI64::test_min_fail(); -} - -#[test] -fn test_i64_max() { - TestI64::test_max(); -} - -#[test] -fn test_i64_max_fail() { - TestI64::test_max_fail(); -} - -#[test] -fn test_i64_neg() { - TestI64::test_negate(); -} - -#[test] -fn test_i64_neg_max_fail() { - TestI64::test_negate_min_fail(); -} - -#[test] -fn test_i64_neg_zero() { - TestI64::test_negate_zero(); -} - -#[test] -fn test_i64_add() { - TestI64::test_add(); -} - -#[test] -fn test_i64_sub() { - TestI64::test_sub(); -} - -#[test] -fn test_i64_mul() { - TestI64::test_mul(); -} - -#[test] -#[ignore] // takes 2 minutes -fn test_i64_div() { - TestI64::test_div(); -} - -#[test] -fn test_i64_pow() { - TestI64::test_pow(); -} - -#[test] -fn test_i64_eq() { - TestI64::test_eq(); -} - -#[test] -fn test_i64_ne() { - TestI64::test_ne(); -} - -#[test] -fn test_i64_ge() { - TestI64::test_ge(); -} - -#[test] -fn test_i64_gt() { - TestI64::test_gt(); -} - -#[test] -fn test_i64_le() { - TestI64::test_le(); -} - -#[test] -fn test_i64_lt() { - TestI64::test_lt(); -} - -#[test] -fn test_i64_console_assert() { - TestI64::test_console_assert(); -} - -#[test] -fn test_i64_ternary() { - TestI64::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/i64/mul.leo b/compiler/_otests/integers/i64/mul.leo deleted file mode 100644 index a3b8bd1da5..0000000000 --- a/compiler/_otests/integers/i64/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/ne.leo b/compiler/_otests/integers/i64/ne.leo deleted file mode 100644 index a2642bb479..0000000000 --- a/compiler/_otests/integers/i64/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/negate.leo b/compiler/_otests/integers/i64/negate.leo deleted file mode 100644 index fe0cdc4d97..0000000000 --- a/compiler/_otests/integers/i64/negate.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64) { - console.assert(-a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/negate_min.leo b/compiler/_otests/integers/i64/negate_min.leo deleted file mode 100644 index daf694491b..0000000000 --- a/compiler/_otests/integers/i64/negate_min.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - const a: i64 = -9223372036854775808; - const b = -a; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/negate_zero.leo b/compiler/_otests/integers/i64/negate_zero.leo deleted file mode 100644 index 81f09c19a3..0000000000 --- a/compiler/_otests/integers/i64/negate_zero.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = 0i64; - - console.assert(-a == 0i64); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/no_space_between_literal.leo b/compiler/_otests/integers/i64/no_space_between_literal.leo deleted file mode 100644 index 7fb6ea9e62..0000000000 --- a/compiler/_otests/integers/i64/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 i64; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/pow.leo b/compiler/_otests/integers/i64/pow.leo deleted file mode 100644 index dca2dace74..0000000000 --- a/compiler/_otests/integers/i64/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/sub.leo b/compiler/_otests/integers/i64/sub.leo deleted file mode 100644 index 4d335e504b..0000000000 --- a/compiler/_otests/integers/i64/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i64, b: i64, c: i64) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i64/ternary.leo b/compiler/_otests/integers/i64/ternary.leo deleted file mode 100644 index 1a2d03a77f..0000000000 --- a/compiler/_otests/integers/i64/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: i64, b: i64, c: i64) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/add.leo b/compiler/_otests/integers/i8/add.leo deleted file mode 100644 index dd71bc7f53..0000000000 --- a/compiler/_otests/integers/i8/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: i8) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/console_assert.leo b/compiler/_otests/integers/i8/console_assert.leo deleted file mode 100644 index 1fc09cb57d..0000000000 --- a/compiler/_otests/integers/i8/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/div.leo b/compiler/_otests/integers/i8/div.leo deleted file mode 100644 index a80d8e6319..0000000000 --- a/compiler/_otests/integers/i8/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: i8) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/eq.leo b/compiler/_otests/integers/i8/eq.leo deleted file mode 100644 index 130cc64b89..0000000000 --- a/compiler/_otests/integers/i8/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/ge.leo b/compiler/_otests/integers/i8/ge.leo deleted file mode 100644 index 3084692c0c..0000000000 --- a/compiler/_otests/integers/i8/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/gt.leo b/compiler/_otests/integers/i8/gt.leo deleted file mode 100644 index d3913b8b24..0000000000 --- a/compiler/_otests/integers/i8/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/input.leo b/compiler/_otests/integers/i8/input.leo deleted file mode 100644 index 1fc09cb57d..0000000000 --- a/compiler/_otests/integers/i8/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/le.leo b/compiler/_otests/integers/i8/le.leo deleted file mode 100644 index 92e011f206..0000000000 --- a/compiler/_otests/integers/i8/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/lt.leo b/compiler/_otests/integers/i8/lt.leo deleted file mode 100644 index eb34b7148e..0000000000 --- a/compiler/_otests/integers/i8/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/max.leo b/compiler/_otests/integers/i8/max.leo deleted file mode 100644 index f20d59ddf4..0000000000 --- a/compiler/_otests/integers/i8/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i8 = 127; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/max_fail.leo b/compiler/_otests/integers/i8/max_fail.leo deleted file mode 100644 index 9e1956024a..0000000000 --- a/compiler/_otests/integers/i8/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i8 = 128; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/min.leo b/compiler/_otests/integers/i8/min.leo deleted file mode 100644 index 7b6db025ea..0000000000 --- a/compiler/_otests/integers/i8/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i8 = -128; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/min_fail.leo b/compiler/_otests/integers/i8/min_fail.leo deleted file mode 100644 index 41170e9b93..0000000000 --- a/compiler/_otests/integers/i8/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: i8 = -129; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/mod.rs b/compiler/_otests/integers/i8/mod.rs deleted file mode 100644 index 5073dda460..0000000000 --- a/compiler/_otests/integers/i8/mod.rs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::{expect_computation_error, IntegerTester}, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{I8Type, IntegerType, SignedIntegerType}; - -test_int!( - TestI8, - i8, - IntegerType::Signed(SignedIntegerType::I8Type(I8Type {})), - Int8 -); - -#[test] -fn test_i8_min() { - TestI8::test_min(); -} - -#[test] -fn test_i8_min_fail() { - TestI8::test_min_fail(); -} - -#[test] -fn test_i8_max() { - TestI8::test_max(); -} - -#[test] -fn test_i8_max_fail() { - TestI8::test_max_fail(); -} - -#[test] -fn test_i8_neg() { - TestI8::test_negate(); -} - -#[test] -fn test_i8_neg_max_fail() { - TestI8::test_negate_min_fail(); -} - -#[test] -fn test_i8_neg_zero() { - TestI8::test_negate_zero(); -} - -#[test] -fn test_i8_add() { - TestI8::test_add(); -} - -#[test] -fn test_i8_sub() { - TestI8::test_sub(); -} - -#[test] -fn test_i8_mul() { - TestI8::test_mul(); -} - -#[test] -fn test_i8_div() { - TestI8::test_div(); -} - -#[test] -fn test_i8_pow() { - TestI8::test_pow(); -} - -#[test] -fn test_i8_eq() { - TestI8::test_eq(); -} - -#[test] -fn test_i8_ne() { - TestI8::test_ne(); -} - -#[test] -fn test_i8_ge() { - TestI8::test_ge(); -} - -#[test] -fn test_i8_gt() { - TestI8::test_gt(); -} - -#[test] -fn test_i8_le() { - TestI8::test_le(); -} - -#[test] -fn test_i8_lt() { - TestI8::test_lt(); -} - -#[test] -fn test_i8_console_assert() { - TestI8::test_console_assert(); -} - -#[test] -fn test_i8_ternary() { - TestI8::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/i8/mul.leo b/compiler/_otests/integers/i8/mul.leo deleted file mode 100644 index 34726fff92..0000000000 --- a/compiler/_otests/integers/i8/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: i8) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/ne.leo b/compiler/_otests/integers/i8/ne.leo deleted file mode 100644 index e5028d404a..0000000000 --- a/compiler/_otests/integers/i8/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/negate.leo b/compiler/_otests/integers/i8/negate.leo deleted file mode 100644 index 2a2266bc56..0000000000 --- a/compiler/_otests/integers/i8/negate.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8) { - console.assert(-a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/negate_min.leo b/compiler/_otests/integers/i8/negate_min.leo deleted file mode 100644 index 7f664a1b78..0000000000 --- a/compiler/_otests/integers/i8/negate_min.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - const a = -128i8; - const b = -a; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/negate_zero.leo b/compiler/_otests/integers/i8/negate_zero.leo deleted file mode 100644 index cc3f4a0828..0000000000 --- a/compiler/_otests/integers/i8/negate_zero.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main() { - const a = 0i8; - - console.assert(-a == 0i8); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/no_space_between_literal.leo b/compiler/_otests/integers/i8/no_space_between_literal.leo deleted file mode 100644 index 7a8eda7ef9..0000000000 --- a/compiler/_otests/integers/i8/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 i8; -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/pow.leo b/compiler/_otests/integers/i8/pow.leo deleted file mode 100644 index 18aeb44b46..0000000000 --- a/compiler/_otests/integers/i8/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: i8) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/sub.leo b/compiler/_otests/integers/i8/sub.leo deleted file mode 100644 index a795bed153..0000000000 --- a/compiler/_otests/integers/i8/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: i8, b: i8, c: i8) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/i8/ternary.leo b/compiler/_otests/integers/i8/ternary.leo deleted file mode 100644 index e1ec1943c9..0000000000 --- a/compiler/_otests/integers/i8/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: i8, b: i8, c: i8) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/int_macro.rs b/compiler/_otests/integers/int_macro.rs deleted file mode 100644 index 7867961fc4..0000000000 --- a/compiler/_otests/integers/int_macro.rs +++ /dev/null @@ -1,538 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -macro_rules! test_int { - ($name: ident, $type_: ty, $integer_type: expr, $gadget: ty) => { - pub struct $name {} - - impl $name { - fn test_negate() { - for _ in 0..10 { - let a: $type_ = rand::random(); - - let b = match a.checked_neg() { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("negate.leo"); - let mut program = parse_program(program_string).unwrap(); - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_negate_min_fail() { - let program_string = include_str!("negate_min.leo"); - let program = parse_program(program_string).unwrap(); - - expect_computation_error(program); - } - - fn test_negate_zero() { - let program_string = include_str!("negate_zero.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); - } - } - - impl IntegerTester for $name { - fn test_min() { - let program_string = include_str!("min.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); - } - - fn test_min_fail() { - let program_string = include_str!("min_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); - } - - fn test_max() { - let program_string = include_str!("max.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); - } - - fn test_max_fail() { - let program_string = include_str!("max_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); - } - - fn test_add() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_add(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("add.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_sub() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - if b.checked_neg().is_none() { - continue; - } - - let c = match a.checked_sub(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("sub.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_mul() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_mul(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("mul.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_div() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // make sure that we can calculate the inverse of each number - // Leo signed integer division is non-wrapping. Thus attempting to calculate a - // division result that wraps should be ignored here. - if a.checked_neg().is_none() { - continue; - } - - let program_string = include_str!("div.leo"); - let mut program = parse_program(program_string).unwrap(); - - // expect an error when dividing by zero - if b == 0 { - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } else { - let c = match a.checked_div(b) { - Some(valid) => valid, - None => continue, - }; - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - } - - fn test_pow() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // rust specific conversion see https://doc.rust-lang.org/std/primitive.u8.html#method.checked_pow - let c = match a.checked_pow(b as u32) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("pow.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_eq() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.eq(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_ne() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test a != a == false - - let program_string = include_str!("ne.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.ne(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_ge() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("ge.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test greater or equal - - let c = a.ge(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_gt() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("gt.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test greater than - - let c = a.gt(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_le() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("le.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test less or equal - - let c = a.le(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_lt() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("lt.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test less or equal - - let c = a.lt(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_console_assert() { - for _ in 0..10 { - let a: $type_ = rand::random(); - - // test equal - let program_string = include_str!("console_assert.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - let b: $type_ = rand::random(); - - if a == b { - continue; - } - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } - } - - fn test_ternary() { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let program_string = include_str!("ternary.leo"); - let mut program = parse_program(program_string).unwrap(); - - // true -> field 1 - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(true))), - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, a.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // false -> field 2 - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(false))), - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - }; -} diff --git a/compiler/_otests/integers/integer_tester.rs b/compiler/_otests/integers/integer_tester.rs deleted file mode 100644 index 23085d5aac..0000000000 --- a/compiler/_otests/integers/integer_tester.rs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{expect_compiler_error, EdwardsTestCompiler}; -use leo_compiler::errors::{CompilerError, ExpressionError, FunctionError, IntegerError, StatementError}; - -pub trait IntegerTester { - /// Tests defining the smalled value that can be represented by the integer type - fn test_min(); - - /// Tests defining the smallest value - 1 - fn test_min_fail(); - - /// Tests defining the largest value that can be represented by the integer type - fn test_max(); - - /// Tests defining the largest value + 1 - fn test_max_fail(); - - /// Tests a non-wrapping addition - fn test_add(); - - /// Tests a non-wrapping subtraction - fn test_sub(); - - /// Tests a non-wrapping multiplication - fn test_mul(); - - /// Tests a non-wrapping division - fn test_div(); - - /// Tests a non-wrapping exponentiation - fn test_pow(); - - /// Tests == evaluation - fn test_eq(); - - /// Tests != evaluation - fn test_ne(); - - /// Tests >= evaluation - fn test_ge(); - - /// Tests > evaluation - fn test_gt(); - - /// Tests <= evaluation - fn test_le(); - - /// Tests < evaluation - fn test_lt(); - - /// Test assert equals constraint keyword - fn test_console_assert(); - - /// Test ternary if bool ? num_1 : num_2; - fn test_ternary(); -} - -pub(crate) fn expect_computation_error(program: EdwardsTestCompiler) { - match expect_compiler_error(program) { - CompilerError::FunctionError(FunctionError::StatementError(StatementError::ExpressionError( - ExpressionError::IntegerError(IntegerError::Error(_)), - ))) => {} - error => panic!( - "Expected integer computation error such as `DivisionByZero`, found {:?}", - error - ), - } -} diff --git a/compiler/_otests/integers/mod.rs b/compiler/_otests/integers/mod.rs deleted file mode 100644 index 0cfd4f643c..0000000000 --- a/compiler/_otests/integers/mod.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -#[macro_use] -pub mod int_macro; - -#[macro_use] -pub mod uint_macro; - -pub mod integer_tester; -pub use self::integer_tester::*; - -// must be below macro definitions! -pub mod u128; -pub mod u16; -pub mod u32; -pub mod u64; -pub mod u8; - -pub mod i128; -pub mod i16; -pub mod i32; -pub mod i64; -pub mod i8; diff --git a/compiler/_otests/integers/u128/add.leo b/compiler/_otests/integers/u128/add.leo deleted file mode 100644 index 6b32042fd5..0000000000 --- a/compiler/_otests/integers/u128/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/console_assert.leo b/compiler/_otests/integers/u128/console_assert.leo deleted file mode 100644 index adab295385..0000000000 --- a/compiler/_otests/integers/u128/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/div.leo b/compiler/_otests/integers/u128/div.leo deleted file mode 100644 index 0d62054eca..0000000000 --- a/compiler/_otests/integers/u128/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/eq.leo b/compiler/_otests/integers/u128/eq.leo deleted file mode 100644 index 2c2acd923a..0000000000 --- a/compiler/_otests/integers/u128/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/ge.leo b/compiler/_otests/integers/u128/ge.leo deleted file mode 100644 index bff7cd321b..0000000000 --- a/compiler/_otests/integers/u128/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/gt.leo b/compiler/_otests/integers/u128/gt.leo deleted file mode 100644 index e8aec0faf2..0000000000 --- a/compiler/_otests/integers/u128/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/input.leo b/compiler/_otests/integers/u128/input.leo deleted file mode 100644 index adab295385..0000000000 --- a/compiler/_otests/integers/u128/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/le.leo b/compiler/_otests/integers/u128/le.leo deleted file mode 100644 index c9e4609136..0000000000 --- a/compiler/_otests/integers/u128/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/lt.leo b/compiler/_otests/integers/u128/lt.leo deleted file mode 100644 index b37057c895..0000000000 --- a/compiler/_otests/integers/u128/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/max.leo b/compiler/_otests/integers/u128/max.leo deleted file mode 100644 index b166ede06b..0000000000 --- a/compiler/_otests/integers/u128/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u128 = 340282366920938463463374607431768211455; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/max_fail.leo b/compiler/_otests/integers/u128/max_fail.leo deleted file mode 100644 index f51c967925..0000000000 --- a/compiler/_otests/integers/u128/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u128 = 340282366920938463463374607431768211456; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/min.leo b/compiler/_otests/integers/u128/min.leo deleted file mode 100644 index 41fbf1a2fe..0000000000 --- a/compiler/_otests/integers/u128/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u128 = 0; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/min_fail.leo b/compiler/_otests/integers/u128/min_fail.leo deleted file mode 100644 index b0d17191ff..0000000000 --- a/compiler/_otests/integers/u128/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u128 = -1; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/mod.rs b/compiler/_otests/integers/u128/mod.rs deleted file mode 100644 index 38677dcb29..0000000000 --- a/compiler/_otests/integers/u128/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U128Type, UnsignedIntegerType}; - -test_uint!( - TestU128, - u128, - IntegerType::Unsigned(UnsignedIntegerType::U128Type(U128Type {})), - UInt128 -); - -#[test] -fn test_u128_min() { - TestU128::test_min(); -} - -#[test] -fn test_u128_min_fail() { - TestU128::test_min_fail(); -} - -#[test] -fn test_u128_max() { - TestU128::test_max(); -} - -#[test] -fn test_u128_max_fail() { - TestU128::test_max_fail(); -} - -#[test] -fn test_u128_add() { - TestU128::test_add(); -} - -#[test] -fn test_u128_sub() { - TestU128::test_sub(); -} - -#[test] -fn test_u128_mul() { - TestU128::test_mul(); -} - -#[test] -fn test_u128_div() { - TestU128::test_div(); -} - -#[test] -fn test_u128_pow() { - TestU128::test_pow(); -} - -#[test] -fn test_u128_eq() { - TestU128::test_eq(); -} - -#[test] -fn test_u128_ne() { - TestU128::test_ne(); -} - -#[test] -fn test_u128_ge() { - TestU128::test_ge(); -} - -#[test] -fn test_u128_gt() { - TestU128::test_gt(); -} - -#[test] -fn test_u128_le() { - TestU128::test_le(); -} - -#[test] -fn test_u128_lt() { - TestU128::test_lt(); -} - -#[test] -fn test_u128_console_assert() { - TestU128::test_console_assert(); -} - -#[test] -fn test_u128_ternary() { - TestU128::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/u128/mul.leo b/compiler/_otests/integers/u128/mul.leo deleted file mode 100644 index c7fdc1530c..0000000000 --- a/compiler/_otests/integers/u128/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/ne.leo b/compiler/_otests/integers/u128/ne.leo deleted file mode 100644 index da3467d01e..0000000000 --- a/compiler/_otests/integers/u128/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/no_space_between_literal.leo b/compiler/_otests/integers/u128/no_space_between_literal.leo deleted file mode 100644 index fc48e7f1ae..0000000000 --- a/compiler/_otests/integers/u128/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 u128; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/pow.leo b/compiler/_otests/integers/u128/pow.leo deleted file mode 100644 index 27614bfa56..0000000000 --- a/compiler/_otests/integers/u128/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/sub.leo b/compiler/_otests/integers/u128/sub.leo deleted file mode 100644 index 2374413505..0000000000 --- a/compiler/_otests/integers/u128/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u128, b: u128, c: u128) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u128/ternary.leo b/compiler/_otests/integers/u128/ternary.leo deleted file mode 100644 index 22e2e67058..0000000000 --- a/compiler/_otests/integers/u128/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: u128, b: u128, c: u128) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/add.leo b/compiler/_otests/integers/u16/add.leo deleted file mode 100644 index f00701181b..0000000000 --- a/compiler/_otests/integers/u16/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/console_assert.leo b/compiler/_otests/integers/u16/console_assert.leo deleted file mode 100644 index 761f0639d0..0000000000 --- a/compiler/_otests/integers/u16/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/div.leo b/compiler/_otests/integers/u16/div.leo deleted file mode 100644 index f1dd3fa463..0000000000 --- a/compiler/_otests/integers/u16/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/eq.leo b/compiler/_otests/integers/u16/eq.leo deleted file mode 100644 index a4b4e78b49..0000000000 --- a/compiler/_otests/integers/u16/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/ge.leo b/compiler/_otests/integers/u16/ge.leo deleted file mode 100644 index 4b1da1b27b..0000000000 --- a/compiler/_otests/integers/u16/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/gt.leo b/compiler/_otests/integers/u16/gt.leo deleted file mode 100644 index 2c5ffbe8eb..0000000000 --- a/compiler/_otests/integers/u16/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/input.leo b/compiler/_otests/integers/u16/input.leo deleted file mode 100644 index 761f0639d0..0000000000 --- a/compiler/_otests/integers/u16/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/le.leo b/compiler/_otests/integers/u16/le.leo deleted file mode 100644 index 49713482d0..0000000000 --- a/compiler/_otests/integers/u16/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/lt.leo b/compiler/_otests/integers/u16/lt.leo deleted file mode 100644 index dae1951231..0000000000 --- a/compiler/_otests/integers/u16/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/max.leo b/compiler/_otests/integers/u16/max.leo deleted file mode 100644 index 56cb2af18d..0000000000 --- a/compiler/_otests/integers/u16/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u16 = 65535; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/max_fail.leo b/compiler/_otests/integers/u16/max_fail.leo deleted file mode 100644 index bb703210e3..0000000000 --- a/compiler/_otests/integers/u16/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u16 = 65536; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/min.leo b/compiler/_otests/integers/u16/min.leo deleted file mode 100644 index 4dee94a1a4..0000000000 --- a/compiler/_otests/integers/u16/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u16 = 0; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/min_fail.leo b/compiler/_otests/integers/u16/min_fail.leo deleted file mode 100644 index 0c61dd7ddf..0000000000 --- a/compiler/_otests/integers/u16/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u16 = -1; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/mod.rs b/compiler/_otests/integers/u16/mod.rs deleted file mode 100644 index 33f88452c1..0000000000 --- a/compiler/_otests/integers/u16/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U16Type, UnsignedIntegerType}; - -test_uint!( - TestU16, - u16, - IntegerType::Unsigned(UnsignedIntegerType::U16Type(U16Type {})), - UInt16 -); - -#[test] -fn test_u16_min() { - TestU16::test_min(); -} - -#[test] -fn test_u16_min_fail() { - TestU16::test_min_fail(); -} - -#[test] -fn test_u16_max() { - TestU16::test_max(); -} - -#[test] -fn test_u16_max_fail() { - TestU16::test_max_fail(); -} - -#[test] -fn test_u16_add() { - TestU16::test_add(); -} - -#[test] -fn test_u16_sub() { - TestU16::test_sub(); -} - -#[test] -fn test_u16_mul() { - TestU16::test_mul(); -} - -#[test] -fn test_u16_div() { - TestU16::test_div(); -} - -#[test] -fn test_u16_pow() { - TestU16::test_pow(); -} - -#[test] -fn test_u16_eq() { - TestU16::test_eq(); -} - -#[test] -fn test_u16_ne() { - TestU16::test_ne(); -} - -#[test] -fn test_u16_ge() { - TestU16::test_ge(); -} - -#[test] -fn test_u16_gt() { - TestU16::test_gt(); -} - -#[test] -fn test_u16_le() { - TestU16::test_le(); -} - -#[test] -fn test_u16_lt() { - TestU16::test_lt(); -} - -#[test] -fn test_u16_console_assert() { - TestU16::test_console_assert(); -} - -#[test] -fn test_u16_ternary() { - TestU16::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/u16/mul.leo b/compiler/_otests/integers/u16/mul.leo deleted file mode 100644 index f2c6f0aac8..0000000000 --- a/compiler/_otests/integers/u16/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/ne.leo b/compiler/_otests/integers/u16/ne.leo deleted file mode 100644 index e90a304cfe..0000000000 --- a/compiler/_otests/integers/u16/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/no_space_between_literal.leo b/compiler/_otests/integers/u16/no_space_between_literal.leo deleted file mode 100644 index 34e125cfc6..0000000000 --- a/compiler/_otests/integers/u16/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 u16; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/pow.leo b/compiler/_otests/integers/u16/pow.leo deleted file mode 100644 index 564c1c51fe..0000000000 --- a/compiler/_otests/integers/u16/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/sub.leo b/compiler/_otests/integers/u16/sub.leo deleted file mode 100644 index 92aae9ac2c..0000000000 --- a/compiler/_otests/integers/u16/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u16, b: u16, c: u16) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u16/ternary.leo b/compiler/_otests/integers/u16/ternary.leo deleted file mode 100644 index 11d836570d..0000000000 --- a/compiler/_otests/integers/u16/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: u16, b: u16, c: u16) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/add.leo b/compiler/_otests/integers/u32/add.leo deleted file mode 100644 index 6f6a2454b4..0000000000 --- a/compiler/_otests/integers/u32/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/console_assert.leo b/compiler/_otests/integers/u32/console_assert.leo deleted file mode 100644 index 32604eb3b8..0000000000 --- a/compiler/_otests/integers/u32/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/div.leo b/compiler/_otests/integers/u32/div.leo deleted file mode 100644 index ed689bd408..0000000000 --- a/compiler/_otests/integers/u32/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/eq.leo b/compiler/_otests/integers/u32/eq.leo deleted file mode 100644 index ca427b3c42..0000000000 --- a/compiler/_otests/integers/u32/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/ge.leo b/compiler/_otests/integers/u32/ge.leo deleted file mode 100644 index 35c1c71829..0000000000 --- a/compiler/_otests/integers/u32/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/gt.leo b/compiler/_otests/integers/u32/gt.leo deleted file mode 100644 index f76df415c4..0000000000 --- a/compiler/_otests/integers/u32/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/input.leo b/compiler/_otests/integers/u32/input.leo deleted file mode 100644 index 32604eb3b8..0000000000 --- a/compiler/_otests/integers/u32/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/le.leo b/compiler/_otests/integers/u32/le.leo deleted file mode 100644 index 9a802f896d..0000000000 --- a/compiler/_otests/integers/u32/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/lt.leo b/compiler/_otests/integers/u32/lt.leo deleted file mode 100644 index 73e5654470..0000000000 --- a/compiler/_otests/integers/u32/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/max.leo b/compiler/_otests/integers/u32/max.leo deleted file mode 100644 index 4a07281b5d..0000000000 --- a/compiler/_otests/integers/u32/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u32 = 4294967295; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/max_fail.leo b/compiler/_otests/integers/u32/max_fail.leo deleted file mode 100644 index 6b1631876e..0000000000 --- a/compiler/_otests/integers/u32/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u32 = 4294967296; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/min.leo b/compiler/_otests/integers/u32/min.leo deleted file mode 100644 index 8077e0ec02..0000000000 --- a/compiler/_otests/integers/u32/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u32 = 0; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/min_fail.leo b/compiler/_otests/integers/u32/min_fail.leo deleted file mode 100644 index c3e3f33225..0000000000 --- a/compiler/_otests/integers/u32/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u32 = -1; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/mod.rs b/compiler/_otests/integers/u32/mod.rs deleted file mode 100644 index 7f2d76d198..0000000000 --- a/compiler/_otests/integers/u32/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U32Type, UnsignedIntegerType}; - -test_uint!( - TestU32, - u32, - IntegerType::Unsigned(UnsignedIntegerType::U32Type(U32Type {})), - UInt32 -); - -#[test] -fn test_u32_min() { - TestU32::test_min(); -} - -#[test] -fn test_u32_min_fail() { - TestU32::test_min_fail(); -} - -#[test] -fn test_u32_max() { - TestU32::test_max(); -} - -#[test] -fn test_u32_max_fail() { - TestU32::test_max_fail(); -} - -#[test] -fn test_u32_add() { - TestU32::test_add(); -} - -#[test] -fn test_u32_sub() { - TestU32::test_sub(); -} - -#[test] -fn test_u32_mul() { - TestU32::test_mul(); -} - -#[test] -fn test_u32_div() { - TestU32::test_div(); -} - -#[test] -fn test_u32_pow() { - TestU32::test_pow(); -} - -#[test] -fn test_u32_eq() { - TestU32::test_eq(); -} - -#[test] -fn test_u32_ne() { - TestU32::test_ne(); -} - -#[test] -fn test_u32_ge() { - TestU32::test_ge(); -} - -#[test] -fn test_u32_gt() { - TestU32::test_gt(); -} - -#[test] -fn test_u32_le() { - TestU32::test_le(); -} - -#[test] -fn test_u32_lt() { - TestU32::test_lt(); -} - -#[test] -fn test_u32_console_assert() { - TestU32::test_console_assert(); -} - -#[test] -fn test_u32_ternary() { - TestU32::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/u32/mul.leo b/compiler/_otests/integers/u32/mul.leo deleted file mode 100644 index a77a85477b..0000000000 --- a/compiler/_otests/integers/u32/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/ne.leo b/compiler/_otests/integers/u32/ne.leo deleted file mode 100644 index 00ee1a9989..0000000000 --- a/compiler/_otests/integers/u32/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/no_space_between_literal.leo b/compiler/_otests/integers/u32/no_space_between_literal.leo deleted file mode 100644 index 83b3caca55..0000000000 --- a/compiler/_otests/integers/u32/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 u32; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/pow.leo b/compiler/_otests/integers/u32/pow.leo deleted file mode 100644 index b82496ff77..0000000000 --- a/compiler/_otests/integers/u32/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/sub.leo b/compiler/_otests/integers/u32/sub.leo deleted file mode 100644 index 54480bd4bc..0000000000 --- a/compiler/_otests/integers/u32/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u32, b: u32, c: u32) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u32/ternary.leo b/compiler/_otests/integers/u32/ternary.leo deleted file mode 100644 index 3c96a7236c..0000000000 --- a/compiler/_otests/integers/u32/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: u32, b: u32, c: u32) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/add.leo b/compiler/_otests/integers/u64/add.leo deleted file mode 100644 index 28abe51201..0000000000 --- a/compiler/_otests/integers/u64/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/console_assert.leo b/compiler/_otests/integers/u64/console_assert.leo deleted file mode 100644 index ac1d6d40c3..0000000000 --- a/compiler/_otests/integers/u64/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/div.leo b/compiler/_otests/integers/u64/div.leo deleted file mode 100644 index 059da236bb..0000000000 --- a/compiler/_otests/integers/u64/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/eq.leo b/compiler/_otests/integers/u64/eq.leo deleted file mode 100644 index 990b2dad2d..0000000000 --- a/compiler/_otests/integers/u64/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/ge.leo b/compiler/_otests/integers/u64/ge.leo deleted file mode 100644 index 46ba36ceff..0000000000 --- a/compiler/_otests/integers/u64/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/gt.leo b/compiler/_otests/integers/u64/gt.leo deleted file mode 100644 index 7d3032c7f5..0000000000 --- a/compiler/_otests/integers/u64/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/input.leo b/compiler/_otests/integers/u64/input.leo deleted file mode 100644 index ac1d6d40c3..0000000000 --- a/compiler/_otests/integers/u64/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/le.leo b/compiler/_otests/integers/u64/le.leo deleted file mode 100644 index 625b38d2d9..0000000000 --- a/compiler/_otests/integers/u64/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/lt.leo b/compiler/_otests/integers/u64/lt.leo deleted file mode 100644 index ed379f7341..0000000000 --- a/compiler/_otests/integers/u64/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/max.leo b/compiler/_otests/integers/u64/max.leo deleted file mode 100644 index f14ac7ce64..0000000000 --- a/compiler/_otests/integers/u64/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u64 = 18446744073709551615; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/max_fail.leo b/compiler/_otests/integers/u64/max_fail.leo deleted file mode 100644 index d606c83585..0000000000 --- a/compiler/_otests/integers/u64/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u64 = 18446744073709551616; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/min.leo b/compiler/_otests/integers/u64/min.leo deleted file mode 100644 index b1da40b14c..0000000000 --- a/compiler/_otests/integers/u64/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u64 = 0; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/min_fail.leo b/compiler/_otests/integers/u64/min_fail.leo deleted file mode 100644 index e58f1897e6..0000000000 --- a/compiler/_otests/integers/u64/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u64 = -1; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/mod.rs b/compiler/_otests/integers/u64/mod.rs deleted file mode 100644 index 1a2af24ddd..0000000000 --- a/compiler/_otests/integers/u64/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U64Type, UnsignedIntegerType}; - -test_uint!( - TestU64, - u64, - IntegerType::Unsigned(UnsignedIntegerType::U64Type(U64Type {})), - UInt64 -); - -#[test] -fn test_u64_min() { - TestU64::test_min(); -} - -#[test] -fn test_u64_min_fail() { - TestU64::test_min_fail(); -} - -#[test] -fn test_u64_max() { - TestU64::test_max(); -} - -#[test] -fn test_u64_max_fail() { - TestU64::test_max_fail(); -} - -#[test] -fn test_u64_add() { - TestU64::test_add(); -} - -#[test] -fn test_u64_sub() { - TestU64::test_sub(); -} - -#[test] -fn test_u64_mul() { - TestU64::test_mul(); -} - -#[test] -fn test_u64_div() { - TestU64::test_div(); -} - -#[test] -fn test_u64_pow() { - TestU64::test_pow(); -} - -#[test] -fn test_u64_eq() { - TestU64::test_eq(); -} - -#[test] -fn test_u64_ne() { - TestU64::test_ne(); -} - -#[test] -fn test_u64_ge() { - TestU64::test_ge(); -} - -#[test] -fn test_u64_gt() { - TestU64::test_gt(); -} - -#[test] -fn test_u64_le() { - TestU64::test_le(); -} - -#[test] -fn test_u64_lt() { - TestU64::test_lt(); -} - -#[test] -fn test_u64_console_assert() { - TestU64::test_console_assert(); -} - -#[test] -fn test_u64_ternary() { - TestU64::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/u64/mul.leo b/compiler/_otests/integers/u64/mul.leo deleted file mode 100644 index 2633e6780c..0000000000 --- a/compiler/_otests/integers/u64/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/ne.leo b/compiler/_otests/integers/u64/ne.leo deleted file mode 100644 index e47acbb1de..0000000000 --- a/compiler/_otests/integers/u64/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/no_space_between_literal.leo b/compiler/_otests/integers/u64/no_space_between_literal.leo deleted file mode 100644 index 852fd5c2aa..0000000000 --- a/compiler/_otests/integers/u64/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 u64; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/pow.leo b/compiler/_otests/integers/u64/pow.leo deleted file mode 100644 index 64f0694ed1..0000000000 --- a/compiler/_otests/integers/u64/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/sub.leo b/compiler/_otests/integers/u64/sub.leo deleted file mode 100644 index 9961f0f7b7..0000000000 --- a/compiler/_otests/integers/u64/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u64, b: u64, c: u64) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u64/ternary.leo b/compiler/_otests/integers/u64/ternary.leo deleted file mode 100644 index 4c4ddd8e0c..0000000000 --- a/compiler/_otests/integers/u64/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: u64, b: u64, c: u64) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/add.leo b/compiler/_otests/integers/u8/add.leo deleted file mode 100644 index 1b40e304d2..0000000000 --- a/compiler/_otests/integers/u8/add.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a + b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/console_assert.leo b/compiler/_otests/integers/u8/console_assert.leo deleted file mode 100644 index 4d99dc106c..0000000000 --- a/compiler/_otests/integers/u8/console_assert.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/div.leo b/compiler/_otests/integers/u8/div.leo deleted file mode 100644 index 945aa94c30..0000000000 --- a/compiler/_otests/integers/u8/div.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a / b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/eq.leo b/compiler/_otests/integers/u8/eq.leo deleted file mode 100644 index c2a487b0e7..0000000000 --- a/compiler/_otests/integers/u8/eq.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a == b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/ge.leo b/compiler/_otests/integers/u8/ge.leo deleted file mode 100644 index d819422276..0000000000 --- a/compiler/_otests/integers/u8/ge.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a >= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/gt.leo b/compiler/_otests/integers/u8/gt.leo deleted file mode 100644 index 87843f575f..0000000000 --- a/compiler/_otests/integers/u8/gt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a > b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/input.leo b/compiler/_otests/integers/u8/input.leo deleted file mode 100644 index 4d99dc106c..0000000000 --- a/compiler/_otests/integers/u8/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8) { - console.assert(a == b); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/le.leo b/compiler/_otests/integers/u8/le.leo deleted file mode 100644 index 2607b7f3d1..0000000000 --- a/compiler/_otests/integers/u8/le.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a <= b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/lt.leo b/compiler/_otests/integers/u8/lt.leo deleted file mode 100644 index 7495d0fe37..0000000000 --- a/compiler/_otests/integers/u8/lt.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a < b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/max.leo b/compiler/_otests/integers/u8/max.leo deleted file mode 100644 index 03e82c9a5e..0000000000 --- a/compiler/_otests/integers/u8/max.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u8 = 255; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/max_fail.leo b/compiler/_otests/integers/u8/max_fail.leo deleted file mode 100644 index 01bb544601..0000000000 --- a/compiler/_otests/integers/u8/max_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u8 = 256; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/min.leo b/compiler/_otests/integers/u8/min.leo deleted file mode 100644 index 1db08a07b5..0000000000 --- a/compiler/_otests/integers/u8/min.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u8 = 0; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/min_fail.leo b/compiler/_otests/integers/u8/min_fail.leo deleted file mode 100644 index 3cd8d46de7..0000000000 --- a/compiler/_otests/integers/u8/min_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: u8 = -1; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/mod.rs b/compiler/_otests/integers/u8/mod.rs deleted file mode 100644 index f1fb2b0fab..0000000000 --- a/compiler/_otests/integers/u8/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_asg_error, - expect_compiler_error, - generate_main_input, - integers::IntegerTester, - parse_program, -}; -use leo_ast::InputValue; -use leo_input::types::{IntegerType, U8Type, UnsignedIntegerType}; - -test_uint!( - TestU8, - u8, - IntegerType::Unsigned(UnsignedIntegerType::U8Type(U8Type {})), - UInt8 -); - -#[test] -fn test_u8_min() { - TestU8::test_min(); -} - -#[test] -fn test_u8_min_fail() { - TestU8::test_min_fail(); -} - -#[test] -fn test_u8_max() { - TestU8::test_max(); -} - -#[test] -fn test_u8_max_fail() { - TestU8::test_max_fail(); -} - -#[test] -fn test_u8_add() { - TestU8::test_add(); -} - -#[test] -fn test_u8_sub() { - TestU8::test_sub(); -} - -#[test] -fn test_u8_mul() { - TestU8::test_mul(); -} - -#[test] -fn test_u8_div() { - TestU8::test_div(); -} - -#[test] -fn test_u8_pow() { - TestU8::test_pow(); -} - -#[test] -fn test_u8_eq() { - TestU8::test_eq(); -} - -#[test] -fn test_u8_ne() { - TestU8::test_ne(); -} - -#[test] -fn test_u8_ge() { - TestU8::test_ge(); -} - -#[test] -fn test_u8_gt() { - TestU8::test_gt(); -} - -#[test] -fn test_u8_le() { - TestU8::test_le(); -} - -#[test] -fn test_u8_lt() { - TestU8::test_lt(); -} - -#[test] -fn test_u8_console_assert() { - TestU8::test_console_assert(); -} - -#[test] -fn test_u8_ternary() { - TestU8::test_ternary(); -} - -#[test] -fn test_no_space_between_literal() { - let program_string = include_str!("no_space_between_literal.leo"); - let program = parse_program(program_string); - - assert!(program.is_err()); -} diff --git a/compiler/_otests/integers/u8/mul.leo b/compiler/_otests/integers/u8/mul.leo deleted file mode 100644 index 11acf4688b..0000000000 --- a/compiler/_otests/integers/u8/mul.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a * b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/ne.leo b/compiler/_otests/integers/u8/ne.leo deleted file mode 100644 index e75194a2f2..0000000000 --- a/compiler/_otests/integers/u8/ne.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: bool) { - console.assert(a != b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/no_space_between_literal.leo b/compiler/_otests/integers/u8/no_space_between_literal.leo deleted file mode 100644 index 64eba2a083..0000000000 --- a/compiler/_otests/integers/u8/no_space_between_literal.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i = 1 u8; -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/pow.leo b/compiler/_otests/integers/u8/pow.leo deleted file mode 100644 index 928ab73b0d..0000000000 --- a/compiler/_otests/integers/u8/pow.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a ** b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/sub.leo b/compiler/_otests/integers/u8/sub.leo deleted file mode 100644 index 1335409c29..0000000000 --- a/compiler/_otests/integers/u8/sub.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: u8, b: u8, c: u8) { - console.assert(a - b == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/u8/ternary.leo b/compiler/_otests/integers/u8/ternary.leo deleted file mode 100644 index 1b436aa054..0000000000 --- a/compiler/_otests/integers/u8/ternary.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(s: bool, a: u8, b: u8, c: u8) { - let r = s ? a : b; - - console.assert(r == c); -} \ No newline at end of file diff --git a/compiler/_otests/integers/uint_macro.rs b/compiler/_otests/integers/uint_macro.rs deleted file mode 100644 index 393ed1c7a6..0000000000 --- a/compiler/_otests/integers/uint_macro.rs +++ /dev/null @@ -1,476 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -macro_rules! test_uint { - ($name: ident, $type_: ty, $integer_type: expr, $gadget: ty) => { - pub struct $name {} - - impl IntegerTester for $name { - fn test_min() { - let program_string = include_str!("min.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); - } - - fn test_min_fail() { - let program_string = include_str!("min_fail.leo"); - let program = parse_program(program_string).err().unwrap(); - - expect_asg_error(program); - } - - fn test_max() { - let program_string = include_str!("max.leo"); - let error = parse_program(program_string).unwrap(); - - assert_satisfied(error); - } - - fn test_max_fail() { - let program_string = include_str!("max_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); - } - - fn test_add() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_add(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("add.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_sub() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_sub(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("sub.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_mul() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_mul(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("mul.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_div() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let c = match a.checked_div(b) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("div.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_pow() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // rust specific conversion see https://doc.rust-lang.org/std/primitive.u8.html#method.checked_pow - let c = match a.checked_pow(b as u32) { - Some(valid) => valid, - None => continue, - }; - - let program_string = include_str!("pow.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, c.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_eq() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("eq.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.eq(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_ne() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test a != a == false - - let program_string = include_str!("ne.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - - let c = a.ne(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_ge() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("ge.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test greater or equal - - let c = a.ge(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_gt() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("gt.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test greater than - - let c = a.gt(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_le() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("le.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test less or equal - - let c = a.le(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_lt() { - for _ in 0..10 { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - // test equal - - let program_string = include_str!("lt.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ("c", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test less or equal - - let c = a.lt(&b); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Boolean(c))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - - fn test_console_assert() { - for _ in 0..10 { - let a: $type_ = rand::random(); - - // test equal - let program_string = include_str!("console_assert.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, a.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // test not equal - let b: $type_ = rand::random(); - - if a == b { - continue; - } - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - expect_compiler_error(program); - } - } - - fn test_ternary() { - let a: $type_ = rand::random(); - let b: $type_ = rand::random(); - - let program_string = include_str!("ternary.leo"); - let mut program = parse_program(program_string).unwrap(); - - // true -> field 1 - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(true))), - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, a.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - // false -> field 2 - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("s", Some(InputValue::Boolean(false))), - ("a", Some(InputValue::Integer($integer_type, a.to_string()))), - ("b", Some(InputValue::Integer($integer_type, b.to_string()))), - ("c", Some(InputValue::Integer($integer_type, b.to_string()))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - } - } - }; -} diff --git a/compiler/_otests/mod.rs b/compiler/_otests/mod.rs deleted file mode 100644 index aeb93c6eab..0000000000 --- a/compiler/_otests/mod.rs +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -// allow the use of EdwardsTestCompiler::parse_program_from_string for tests - -#![allow(deprecated)] - -pub mod address; -pub mod array; -pub mod boolean; -pub mod canonicalization; -pub mod circuits; -pub mod compiler; -pub mod console; -pub mod core; -pub mod definition; -// pub mod field; -pub mod function; -// pub mod group; -pub mod import; -pub mod input_files; -pub mod integers; -pub mod mutability; -pub mod statements; -pub mod syntax; -pub mod tuples; -pub mod type_inference; - -use leo_asg::{new_alloc_context, new_context, AsgContext}; -use leo_ast::{InputValue, MainInput}; -use leo_compiler::{ - compiler::Compiler, - errors::CompilerError, - group::targets::edwards_bls12::EdwardsGroupType, - ConstrainedValue, - OutputBytes, -}; -use leo_input::types::{IntegerType, U32Type, UnsignedIntegerType}; - -use snarkvm_curves::edwards_bls12::Fq; -use snarkvm_r1cs::TestConstraintSystem; - -use std::path::PathBuf; - -pub const TEST_OUTPUT_DIRECTORY: &str = "/output/"; -const EMPTY_FILE: &str = ""; - -pub type EdwardsTestCompiler = Compiler<'static, Fq, EdwardsGroupType>; -pub type EdwardsConstrainedValue = ConstrainedValue<'static, Fq, EdwardsGroupType>; - -//convenience function for tests, leaks memory -pub(crate) fn make_test_context() -> AsgContext<'static> { - let allocator = Box::leak(Box::new(new_alloc_context())); - new_context(allocator) -} - -fn new_compiler() -> EdwardsTestCompiler { - let program_name = "test".to_string(); - let path = PathBuf::from("/test/src/main.leo"); - let output_dir = PathBuf::from(TEST_OUTPUT_DIRECTORY); - - EdwardsTestCompiler::new(program_name, path, output_dir, make_test_context(), None) -} - -pub(crate) fn parse_program(program_string: &str) -> Result { - let mut compiler = new_compiler(); - - compiler.parse_program_from_string(program_string)?; - - Ok(compiler) -} - -pub(crate) fn parse_input(input_string: &str) -> Result { - let mut compiler = new_compiler(); - let path = PathBuf::new(); - - compiler.parse_input(input_string, &path, EMPTY_FILE, &path)?; - - Ok(compiler) -} - -pub(crate) fn parse_state(state_string: &str) -> Result { - let mut compiler = new_compiler(); - let path = PathBuf::new(); - - compiler.parse_input(EMPTY_FILE, &path, state_string, &path)?; - - Ok(compiler) -} - -pub(crate) fn parse_input_and_state( - input_string: &str, - state_string: &str, -) -> Result { - let mut compiler = new_compiler(); - let path = PathBuf::new(); - - compiler.parse_input(input_string, &path, state_string, &path)?; - - Ok(compiler) -} - -pub fn parse_program_with_input( - program_string: &str, - input_string: &str, -) -> Result { - let mut compiler = new_compiler(); - let path = PathBuf::new(); - - compiler.parse_input(input_string, &path, EMPTY_FILE, &path)?; - compiler.parse_program_from_string(program_string)?; - - Ok(compiler) -} - -pub fn parse_program_with_state( - program_string: &str, - state_string: &str, -) -> Result { - let mut compiler = new_compiler(); - let path = PathBuf::new(); - - compiler.parse_input(EMPTY_FILE, &path, state_string, &path)?; - compiler.parse_program_from_string(program_string)?; - - Ok(compiler) -} - -pub fn parse_program_with_input_and_state( - program_string: &str, - input_string: &str, - state_string: &str, -) -> Result { - let mut compiler = new_compiler(); - let path = PathBuf::new(); - - compiler.parse_input(input_string, &path, state_string, &path)?; - compiler.parse_program_from_string(&program_string)?; - - Ok(compiler) -} - -pub(crate) fn get_output(program: EdwardsTestCompiler) -> OutputBytes { - // synthesize the circuit on the test constraint system - let mut cs = TestConstraintSystem::::new(); - let output = program.compile_constraints(&mut cs).unwrap(); - - // assert the constraint system is satisfied - assert!(cs.is_satisfied()); - - output -} - -pub(crate) fn assert_satisfied(program: EdwardsTestCompiler) { - let empty_output_bytes = include_bytes!("compiler_output/empty.out"); - let res = get_output(program); - - // assert that the output is empty - assert_eq!(empty_output_bytes, res.bytes().as_slice()); -} - -pub(crate) fn expect_compiler_error(program: EdwardsTestCompiler) -> CompilerError { - let mut cs = TestConstraintSystem::::new(); - program.compile_constraints(&mut cs).unwrap_err() -} - -pub(crate) fn expect_asg_error(error: CompilerError) { - assert!(matches!(error, CompilerError::AsgConvertError(_))) -} - -pub(crate) fn generate_main_input(input: Vec<(&str, Option)>) -> MainInput { - let mut main_input = MainInput::new(); - - for (name, value) in input { - main_input.insert(name.to_string(), value); - } - - main_input -} - -#[allow(clippy::unnecessary_wraps)] // consumers expect an optional value -pub(crate) fn generate_test_input_u32(number: u32) -> Option { - Some(InputValue::Integer( - IntegerType::Unsigned(UnsignedIntegerType::U32Type(U32Type {})), - number.to_string(), - )) -} diff --git a/compiler/_otests/mutability/array.leo b/compiler/_otests/mutability/array.leo deleted file mode 100644 index ea63baaad2..0000000000 --- a/compiler/_otests/mutability/array.leo +++ /dev/null @@ -1,5 +0,0 @@ -// Arrays are immutable by default. -function main() { - const a = [1u32]; - a[0] = 0; -} \ No newline at end of file diff --git a/compiler/_otests/mutability/array_mut.leo b/compiler/_otests/mutability/array_mut.leo deleted file mode 100644 index 5d4db3b68a..0000000000 --- a/compiler/_otests/mutability/array_mut.leo +++ /dev/null @@ -1,7 +0,0 @@ -// Adding the `mut` keyword makes an array variable mutable. -function main() { - let a = [1u32]; - a[0] = 0; - - console.assert(a[0] == 0u32); -} \ No newline at end of file diff --git a/compiler/_otests/mutability/array_splice_mut.leo b/compiler/_otests/mutability/array_splice_mut.leo deleted file mode 100644 index d13216600a..0000000000 --- a/compiler/_otests/mutability/array_splice_mut.leo +++ /dev/null @@ -1,9 +0,0 @@ -// Adding the `mut` keyword makes an array variable mutable. -function main() { - let a = [1u32, 2u32, 3u32]; - a[0u32..2u32] = [4u32, 5u32]; - - console.assert(a[0] == 4u32); - console.assert(a[1] == 5u32); - console.assert(a[2] == 3u32); -} \ No newline at end of file diff --git a/compiler/_otests/mutability/array_tuple_mut.leo b/compiler/_otests/mutability/array_tuple_mut.leo deleted file mode 100644 index ed323d46da..0000000000 --- a/compiler/_otests/mutability/array_tuple_mut.leo +++ /dev/null @@ -1,8 +0,0 @@ -// Adding the `mut` keyword makes an array variable mutable. -function main() { - let a = [(1u32, 2u32)]; - a[0u32].1 = 3u32; - - console.assert(a[0u32].0 == 1u32); - console.assert(a[0u32].1 == 3u32); -} \ No newline at end of file diff --git a/compiler/_otests/mutability/circuit.leo b/compiler/_otests/mutability/circuit.leo deleted file mode 100644 index 508595ef16..0000000000 --- a/compiler/_otests/mutability/circuit.leo +++ /dev/null @@ -1,9 +0,0 @@ -// Circuits are immutable by default. -circuit Foo { - x: u32 -} - -function main() { - const a = Foo { x: 1 }; - a.x = 0; -} \ No newline at end of file diff --git a/compiler/_otests/mutability/circuit_function_mut.leo b/compiler/_otests/mutability/circuit_function_mut.leo deleted file mode 100644 index c1bc941c94..0000000000 --- a/compiler/_otests/mutability/circuit_function_mut.leo +++ /dev/null @@ -1,9 +0,0 @@ -// Adding the `mut` keyword makes a circuit variable mutable. -circuit Foo { - function bar() {} -} - -function main() { - let a = Foo { x: 1 }; - a.bar = 0; -} \ No newline at end of file diff --git a/compiler/_otests/mutability/circuit_mut.leo b/compiler/_otests/mutability/circuit_mut.leo deleted file mode 100644 index f7067db11e..0000000000 --- a/compiler/_otests/mutability/circuit_mut.leo +++ /dev/null @@ -1,11 +0,0 @@ -// Adding the `mut` keyword makes a circuit variable mutable. -circuit Foo { - x: u32 -} - -function main() { - let a = Foo { x: 1 }; - a.x = 0; - - console.assert(a.x == 0u32); -} \ No newline at end of file diff --git a/compiler/_otests/mutability/circuit_static_function_mut.leo b/compiler/_otests/mutability/circuit_static_function_mut.leo deleted file mode 100644 index c1bc941c94..0000000000 --- a/compiler/_otests/mutability/circuit_static_function_mut.leo +++ /dev/null @@ -1,9 +0,0 @@ -// Adding the `mut` keyword makes a circuit variable mutable. -circuit Foo { - function bar() {} -} - -function main() { - let a = Foo { x: 1 }; - a.bar = 0; -} \ No newline at end of file diff --git a/compiler/_otests/mutability/circuit_variable_mut.leo b/compiler/_otests/mutability/circuit_variable_mut.leo deleted file mode 100644 index f7067db11e..0000000000 --- a/compiler/_otests/mutability/circuit_variable_mut.leo +++ /dev/null @@ -1,11 +0,0 @@ -// Adding the `mut` keyword makes a circuit variable mutable. -circuit Foo { - x: u32 -} - -function main() { - let a = Foo { x: 1 }; - a.x = 0; - - console.assert(a.x == 0u32); -} \ No newline at end of file diff --git a/compiler/_otests/mutability/cond_mut.leo b/compiler/_otests/mutability/cond_mut.leo deleted file mode 100644 index 11e19b2645..0000000000 --- a/compiler/_otests/mutability/cond_mut.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main () { - let x = 100i8; - if false { - x = 1i8; - x *= 100i8; - } -} \ No newline at end of file diff --git a/compiler/_otests/mutability/const.leo b/compiler/_otests/mutability/const.leo deleted file mode 100644 index 6201e7c5af..0000000000 --- a/compiler/_otests/mutability/const.leo +++ /dev/null @@ -1,5 +0,0 @@ -// Let variables are immutable by default. -function main() { - const a = 1u32; - a = 0; -} \ No newline at end of file diff --git a/compiler/_otests/mutability/function_input.leo b/compiler/_otests/mutability/function_input.leo deleted file mode 100644 index 18d035574b..0000000000 --- a/compiler/_otests/mutability/function_input.leo +++ /dev/null @@ -1,4 +0,0 @@ -// Const function input are immutable. -function main(const a: bool) { - a = false; -} \ No newline at end of file diff --git a/compiler/_otests/mutability/function_input_mut.leo b/compiler/_otests/mutability/function_input_mut.leo deleted file mode 100644 index 98739d78c7..0000000000 --- a/compiler/_otests/mutability/function_input_mut.leo +++ /dev/null @@ -1,6 +0,0 @@ -// Function input are mutable by default. -function main(a: bool) { - a = true; - - console.assert(a == true); -} \ No newline at end of file diff --git a/compiler/_otests/mutability/let.leo b/compiler/_otests/mutability/let.leo deleted file mode 100644 index 105730adb7..0000000000 --- a/compiler/_otests/mutability/let.leo +++ /dev/null @@ -1,5 +0,0 @@ -// Variables are immutable by default. -function main() { - const a = 1u32; - a = 0; -} \ No newline at end of file diff --git a/compiler/_otests/mutability/let_mut.leo b/compiler/_otests/mutability/let_mut.leo deleted file mode 100644 index cd1060d0d2..0000000000 --- a/compiler/_otests/mutability/let_mut.leo +++ /dev/null @@ -1,7 +0,0 @@ -// Adding the `mut` keyword makes a variable mutable. -function main() { - let a = 1u32; - a = 0; - - console.assert(a == 0u32); -} \ No newline at end of file diff --git a/compiler/_otests/mutability/let_mut_nested.leo b/compiler/_otests/mutability/let_mut_nested.leo deleted file mode 100644 index ace4bfb8b4..0000000000 --- a/compiler/_otests/mutability/let_mut_nested.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main () { - let x = 2u8; - let y = x; - let z = y / 2u8; -} \ No newline at end of file diff --git a/compiler/_otests/mutability/mod.rs b/compiler/_otests/mutability/mod.rs deleted file mode 100644 index e0df21fb4e..0000000000 --- a/compiler/_otests/mutability/mod.rs +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_asg_error, generate_main_input, parse_program}; -use leo_ast::InputValue; - -#[test] -fn test_let() { - let program_string = include_str!("let.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_let_mut() { - let program_string = include_str!("let_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_let_mut_nested() { - let program_string = include_str!("let_mut_nested.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_const_fail() { - let program_string = include_str!("const.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_cond_mut() { - let program_string = include_str!("cond_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array() { - let program_string = include_str!("array.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_array_mut() { - let program_string = include_str!("array_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_tuple_mut() { - let bytes = include_str!("array_tuple_mut.leo"); - let program = parse_program(bytes).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_array_splice_mut() { - let bytes = include_str!("array_splice_mut.leo"); - let program = parse_program(bytes).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_circuit() { - let program_string = include_str!("circuit.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_circuit_mut() { - let program_string = include_str!("circuit_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_circuit_variable_mut() { - let program_string = include_str!("circuit_variable_mut.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_circuit_function_mut() { - let program_string = include_str!("circuit_function_mut.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_circuit_static_function_mut() { - let program_string = include_str!("circuit_static_function_mut.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_function_input() { - let program_string = include_str!("function_input.leo"); - let error = parse_program(program_string).err().unwrap(); - expect_asg_error(error); -} - -#[test] -fn test_function_input_mut() { - let program_string = include_str!("function_input_mut.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(true)))]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -#[test] -fn test_swap() { - let program_string = include_str!("swap.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/mutability/swap.leo b/compiler/_otests/mutability/swap.leo deleted file mode 100644 index 05fb661085..0000000000 --- a/compiler/_otests/mutability/swap.leo +++ /dev/null @@ -1,20 +0,0 @@ -// Swap two elements of an array. -function swap(a: [u32; 2], const i: u32, const j: u32) -> [u32; 2] { - let t = a[i]; - a[i] = a[j]; - a[j] = t; - return a; -} - -function main() { - let arr: [u32; 2] = [0, 1]; - const expected: [u32; 2] = [1, 0]; - - // Do swap. - let actual = swap(arr, 0, 1); - - // Check result. - for i in 0..2 { - console.assert(expected[i] == actual[i]); - } -} \ No newline at end of file diff --git a/compiler/_otests/statements/block.leo b/compiler/_otests/statements/block.leo deleted file mode 100644 index ca8da645ec..0000000000 --- a/compiler/_otests/statements/block.leo +++ /dev/null @@ -1,9 +0,0 @@ -function main() { - let x = 4u32; - - { - x = 5u32; - } - - console.assert(x == 5u32); -} \ No newline at end of file diff --git a/compiler/_otests/statements/conditional/assert.leo b/compiler/_otests/statements/conditional/assert.leo deleted file mode 100644 index f3d20b461d..0000000000 --- a/compiler/_otests/statements/conditional/assert.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main(a: u32) { - if a == 1 { - console.assert(a == 1); - } else { - console.assert(a == 0); - } -} diff --git a/compiler/_otests/statements/conditional/chain.leo b/compiler/_otests/statements/conditional/chain.leo deleted file mode 100644 index 44d4e86243..0000000000 --- a/compiler/_otests/statements/conditional/chain.leo +++ /dev/null @@ -1,13 +0,0 @@ -function main(a: u32, b: u32) { - let c = 0u32; - - if a == 1 { - c = 1; - } else if a == 2 { - c = 2; - } else { - c = 3; - } - - console.assert(c == b); -} \ No newline at end of file diff --git a/compiler/_otests/statements/conditional/cond_switch.leo b/compiler/_otests/statements/conditional/cond_switch.leo deleted file mode 100644 index 6f2228635b..0000000000 --- a/compiler/_otests/statements/conditional/cond_switch.leo +++ /dev/null @@ -1,9 +0,0 @@ -function main (x: bool) -> bool { - if false { - return x; - } else if x { - return false; - } else { - return false; - } -} \ No newline at end of file diff --git a/compiler/_otests/statements/conditional/for_loop.leo b/compiler/_otests/statements/conditional/for_loop.leo deleted file mode 100644 index 79df649236..0000000000 --- a/compiler/_otests/statements/conditional/for_loop.leo +++ /dev/null @@ -1,13 +0,0 @@ -function main(a: bool) { - let b = 0u32; - - if a { - for i in 0..4 { - b += i; - } - } - - let r: u32 = a ? 6 : 0; - - console.assert(r == b); -} diff --git a/compiler/_otests/statements/conditional/input/cond_switch.in b/compiler/_otests/statements/conditional/input/cond_switch.in deleted file mode 100644 index b5abb29c2e..0000000000 --- a/compiler/_otests/statements/conditional/input/cond_switch.in +++ /dev/null @@ -1,5 +0,0 @@ -[main] -x: bool = true; - -[registers] -r: bool = false; \ No newline at end of file diff --git a/compiler/_otests/statements/conditional/input/registers_one.in b/compiler/_otests/statements/conditional/input/registers_one.in deleted file mode 100644 index be39f343fa..0000000000 --- a/compiler/_otests/statements/conditional/input/registers_one.in +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -a: u32 = 1; diff --git a/compiler/_otests/statements/conditional/input/registers_zero.in b/compiler/_otests/statements/conditional/input/registers_zero.in deleted file mode 100644 index ae20e35199..0000000000 --- a/compiler/_otests/statements/conditional/input/registers_zero.in +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -a: u32 = 0; diff --git a/compiler/_otests/statements/conditional/mod.rs b/compiler/_otests/statements/conditional/mod.rs deleted file mode 100644 index c57f7974de..0000000000 --- a/compiler/_otests/statements/conditional/mod.rs +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{ - assert_satisfied, - expect_compiler_error, - generate_main_input, - generate_test_input_u32, - get_output, - parse_program, - parse_program_with_input, - EdwardsTestCompiler, -}; -use leo_ast::InputValue; - -#[test] -fn test_assert() { - let program_string = include_str!("assert.leo"); - let mut program_1_pass = parse_program(program_string).unwrap(); - let mut program_0_pass = program_1_pass.clone(); - let mut program_2_fail = program_1_pass.clone(); - - // Check that an input value of 1 satisfies the constraint system - - let main_input = generate_main_input(vec![("a", generate_test_input_u32(1))]); - - program_1_pass.set_main_input(main_input); - - assert_satisfied(program_1_pass); - - // Check that an input value of 0 satisfies the constraint system - - let main_input = generate_main_input(vec![("a", generate_test_input_u32(0))]); - - program_0_pass.set_main_input(main_input); - - assert_satisfied(program_0_pass); - - // Check that an input value of 2 does not satisfy the constraint system - - let main_input = generate_main_input(vec![("a", generate_test_input_u32(2))]); - - program_2_fail.set_main_input(main_input); - - expect_compiler_error(program_2_fail); -} - -#[test] -fn test_mutate() { - let program_string = include_str!("mutate.leo"); - let mut program_1_pass = parse_program(program_string).unwrap(); - let mut program_0_pass = program_1_pass.clone(); - - // Check that an input value of 1 satisfies the constraint system - - let main_input = generate_main_input(vec![("a", generate_test_input_u32(1))]); - - program_1_pass.set_main_input(main_input); - - assert_satisfied(program_1_pass); - - // Check that an input value of 0 satisfies the constraint system - - let main_input = generate_main_input(vec![("a", generate_test_input_u32(0))]); - - program_0_pass.set_main_input(main_input); - - assert_satisfied(program_0_pass); -} - -#[test] -fn test_for_loop() { - let program_string = include_str!("for_loop.leo"); - let mut program_true_6 = parse_program(program_string).unwrap(); - let mut program_false_0 = program_true_6.clone(); - - // Check that an input value of true satisfies the constraint system - - let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(true)))]); - - program_true_6.set_main_input(main_input); - - assert_satisfied(program_true_6); - - // Check that an input value of false satisfies the constraint system - - let main_input = generate_main_input(vec![("a", Some(InputValue::Boolean(false)))]); - - program_false_0.set_main_input(main_input); - - assert_satisfied(program_false_0); -} - -#[test] -fn test_chain() { - let program_string = include_str!("chain.leo"); - let mut program_1_1 = parse_program(program_string).unwrap(); - let mut program_2_2 = program_1_1.clone(); - let mut program_4_3 = program_1_1.clone(); - - // Check that an input of 1 outputs 1 - - let main_input = generate_main_input(vec![ - ("a", generate_test_input_u32(1)), - ("b", generate_test_input_u32(1)), - ]); - - program_1_1.set_main_input(main_input); - - assert_satisfied(program_1_1); - - // Check that an input of 2 outputs 2 - - let main_input = generate_main_input(vec![ - ("a", generate_test_input_u32(2)), - ("b", generate_test_input_u32(2)), - ]); - - program_2_2.set_main_input(main_input); - - assert_satisfied(program_2_2); - - // Check that an input of 4 outputs 3 - - let main_input = generate_main_input(vec![ - ("a", generate_test_input_u32(4)), - ("b", generate_test_input_u32(3)), - ]); - - program_4_3.set_main_input(main_input); - - assert_satisfied(program_4_3); -} - -#[test] -fn test_nested() { - let program_string = include_str!("nested.leo"); - let mut program_true_true_3 = parse_program(program_string).unwrap(); - let mut program_true_false_1 = program_true_true_3.clone(); - let mut program_false_false_0 = program_true_true_3.clone(); - - // Check that an input value of true true outputs 3 - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Boolean(true))), - ("b", Some(InputValue::Boolean(true))), - ("c", generate_test_input_u32(3)), - ]); - - program_true_true_3.set_main_input(main_input); - - assert_satisfied(program_true_true_3); - - // Check that an input value of true false outputs 1 - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Boolean(true))), - ("b", Some(InputValue::Boolean(false))), - ("c", generate_test_input_u32(1)), - ]); - - program_true_false_1.set_main_input(main_input); - - assert_satisfied(program_true_false_1); - - // Check that an input value of false false outputs 0 - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Boolean(false))), - ("b", Some(InputValue::Boolean(false))), - ("c", generate_test_input_u32(0)), - ]); - - program_false_false_0.set_main_input(main_input); - - assert_satisfied(program_false_false_0); -} - -fn output_one(program: EdwardsTestCompiler) { - let expected = include_bytes!("output/registers_one.out"); - let actual = get_output(program); - - assert_eq!(expected, actual.bytes().as_slice()); -} - -fn output_zero(program: EdwardsTestCompiler) { - let expected = include_bytes!("output/registers_zero.out"); - let actual = get_output(program); - - assert_eq!(expected, actual.bytes().as_slice()); -} - -#[test] -fn test_multiple_returns() { - let program_string = include_str!("multiple_returns.leo"); - - // Check that an input value of 1 writes 1 to the output registers - - let registers_one_string = include_str!("input/registers_one.in"); - let program = parse_program_with_input(program_string, registers_one_string).unwrap(); - - output_one(program); - - // Check that an input value of 0 writes 0 to the output registers - - let registers_zero_string = include_str!("input/registers_zero.in"); - let program = parse_program_with_input(program_string, registers_zero_string).unwrap(); - - output_zero(program); -} - -#[test] -fn test_cond_switch() { - let input_string = include_str!("input/cond_switch.in"); - let program_string = include_str!("cond_switch.leo"); - let expect_output = include_bytes!("output/cond_switch.out"); - - let program = parse_program_with_input(program_string, input_string).unwrap(); - - let actual_output = get_output(program); - - assert_eq!(expect_output, actual_output.bytes().as_slice()); -} diff --git a/compiler/_otests/statements/conditional/multiple_returns.leo b/compiler/_otests/statements/conditional/multiple_returns.leo deleted file mode 100644 index f2b9e499c2..0000000000 --- a/compiler/_otests/statements/conditional/multiple_returns.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() -> u32 { - if input.registers.a == 0u32 { - return 0u32; - } else { - return 1u32; - } -} \ No newline at end of file diff --git a/compiler/_otests/statements/conditional/mutate.leo b/compiler/_otests/statements/conditional/mutate.leo deleted file mode 100644 index 9bb124eefd..0000000000 --- a/compiler/_otests/statements/conditional/mutate.leo +++ /dev/null @@ -1,15 +0,0 @@ -function main(a: u32) { - let b = 5u32; - - if a == 1 { - b = 1; - } else { - b = 0; - } - - if a == 1 { - console.assert(b == 1); - } else { - console.assert(b == 0); - } -} diff --git a/compiler/_otests/statements/conditional/nested.leo b/compiler/_otests/statements/conditional/nested.leo deleted file mode 100644 index 1849c2a339..0000000000 --- a/compiler/_otests/statements/conditional/nested.leo +++ /dev/null @@ -1,12 +0,0 @@ -function main(a: bool, b: bool, c: u32) { - let d = 0u32; - - if a { - d += 1; - if b { - d += 2; - } - } - - console.assert(d == c); -} \ No newline at end of file diff --git a/compiler/_otests/statements/conditional/output/cond_switch.out b/compiler/_otests/statements/conditional/output/cond_switch.out deleted file mode 100644 index 8ddb2792bd..0000000000 --- a/compiler/_otests/statements/conditional/output/cond_switch.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -r: bool = false; diff --git a/compiler/_otests/statements/conditional/output/registers_one.out b/compiler/_otests/statements/conditional/output/registers_one.out deleted file mode 100644 index be39f343fa..0000000000 --- a/compiler/_otests/statements/conditional/output/registers_one.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -a: u32 = 1; diff --git a/compiler/_otests/statements/conditional/output/registers_zero.out b/compiler/_otests/statements/conditional/output/registers_zero.out deleted file mode 100644 index ae20e35199..0000000000 --- a/compiler/_otests/statements/conditional/output/registers_zero.out +++ /dev/null @@ -1,2 +0,0 @@ -[registers] -a: u32 = 0; diff --git a/compiler/_otests/statements/iteration_basic.leo b/compiler/_otests/statements/iteration_basic.leo deleted file mode 100644 index 5d74e69a1f..0000000000 --- a/compiler/_otests/statements/iteration_basic.leo +++ /dev/null @@ -1,8 +0,0 @@ -function main() { - let x = 4u32; - for i in 0..3 { - x -= 1; - } - - console.assert(x == 1u32); -} \ No newline at end of file diff --git a/compiler/_otests/statements/iteration_input.in b/compiler/_otests/statements/iteration_input.in deleted file mode 100644 index 8d27f19dde..0000000000 --- a/compiler/_otests/statements/iteration_input.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -x: u8 = 1; \ No newline at end of file diff --git a/compiler/_otests/statements/iteration_input.leo b/compiler/_otests/statements/iteration_input.leo deleted file mode 100644 index 0ab62ab310..0000000000 --- a/compiler/_otests/statements/iteration_input.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(x: u8) { - for i in 0..x { - console.log("{}", i); - } -} \ No newline at end of file diff --git a/compiler/_otests/statements/iteration_type_fail.leo b/compiler/_otests/statements/iteration_type_fail.leo deleted file mode 100644 index 8ce5665176..0000000000 --- a/compiler/_otests/statements/iteration_type_fail.leo +++ /dev/null @@ -1,9 +0,0 @@ -// code sample is from fuzzing bug -// https://github.com/AleoHQ/leo/issues/758 -function main ( - x: u8, -) { - for y in 0u8..10u8 { - let z = y > x; - } -} diff --git a/compiler/_otests/statements/iteration_variable.leo b/compiler/_otests/statements/iteration_variable.leo deleted file mode 100644 index 67bb166236..0000000000 --- a/compiler/_otests/statements/iteration_variable.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - const x: u32 = 5; - - for i in 0..x { - console.log("{}", i); - } -} \ No newline at end of file diff --git a/compiler/_otests/statements/mod.rs b/compiler/_otests/statements/mod.rs deleted file mode 100644 index 847df96083..0000000000 --- a/compiler/_otests/statements/mod.rs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, expect_asg_error, generate_main_input, parse_program, parse_program_with_input}; -use leo_ast::InputValue; - -pub mod conditional; - -// Ternary if {bool}? {expression} : {expression}; - -#[test] -fn test_ternary_basic() { - let program_string = include_str!("ternary_basic.leo"); - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Boolean(true))), - ("b", Some(InputValue::Boolean(true))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); - - let mut program = parse_program(program_string).unwrap(); - - let main_input = generate_main_input(vec![ - ("a", Some(InputValue::Boolean(false))), - ("b", Some(InputValue::Boolean(false))), - ]); - - program.set_main_input(main_input); - - assert_satisfied(program); -} - -#[test] -fn test_ternary_non_const_conditional_fail() { - let program_string = include_str!("ternary_non_const_conditional_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -// Iteration for i {start}..{stop} { statements } - -#[test] -fn test_iteration_basic() { - let program_string = include_str!("iteration_basic.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_num_returns_fail() { - let program_string = include_str!("num_returns_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_block() { - let bytes = include_str!("block.leo"); - let program = parse_program(bytes).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_iteration_input() { - let input_string = include_str!("iteration_input.in"); - let program_string = include_str!("iteration_input.leo"); - let error = parse_program_with_input(program_string, input_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_iteration_wrong_type() { - let program_string = include_str!("iteration_type_fail.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn test_iteration_variable() { - let program_string = include_str!("iteration_variable.leo"); - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} diff --git a/compiler/_otests/statements/num_returns_fail.leo b/compiler/_otests/statements/num_returns_fail.leo deleted file mode 100644 index e8d491caed..0000000000 --- a/compiler/_otests/statements/num_returns_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() -> (bool, bool) { - return true; -} \ No newline at end of file diff --git a/compiler/_otests/statements/ternary_basic.leo b/compiler/_otests/statements/ternary_basic.leo deleted file mode 100644 index 675b681fa9..0000000000 --- a/compiler/_otests/statements/ternary_basic.leo +++ /dev/null @@ -1,5 +0,0 @@ -function main(a: bool, b: bool) { - let c = a ? true : false; - - let d = c == b; -} \ No newline at end of file diff --git a/compiler/_otests/statements/ternary_non_const_conditional_fail.leo b/compiler/_otests/statements/ternary_non_const_conditional_fail.leo deleted file mode 100644 index 1800775590..0000000000 --- a/compiler/_otests/statements/ternary_non_const_conditional_fail.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - let x = 3u8; - const y = x > 2u8? 1u8 : 2u8; -} diff --git a/compiler/_otests/syntax/compare_mismatched_types.leo b/compiler/_otests/syntax/compare_mismatched_types.leo deleted file mode 100644 index 1ac81ab098..0000000000 --- a/compiler/_otests/syntax/compare_mismatched_types.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a = -5i8 > 342u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/address_fail.leo b/compiler/_otests/syntax/identifiers/address_fail.leo deleted file mode 100644 index b39ea75df6..0000000000 --- a/compiler/_otests/syntax/identifiers/address_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const address = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/console_fail.leo b/compiler/_otests/syntax/identifiers/console_fail.leo deleted file mode 100644 index c0229dd624..0000000000 --- a/compiler/_otests/syntax/identifiers/console_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const console = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/field_fail.leo b/compiler/_otests/syntax/identifiers/field_fail.leo deleted file mode 100644 index 33bb3118d8..0000000000 --- a/compiler/_otests/syntax/identifiers/field_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const field = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/group_fail.leo b/compiler/_otests/syntax/identifiers/group_fail.leo deleted file mode 100644 index db71c8a792..0000000000 --- a/compiler/_otests/syntax/identifiers/group_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const group = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/i8_fail.leo b/compiler/_otests/syntax/identifiers/i8_fail.leo deleted file mode 100644 index a2d868f9f5..0000000000 --- a/compiler/_otests/syntax/identifiers/i8_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const i8 = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/input_fail.leo b/compiler/_otests/syntax/identifiers/input_fail.leo deleted file mode 100644 index 0053565a6f..0000000000 --- a/compiler/_otests/syntax/identifiers/input_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const input = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/mod.rs b/compiler/_otests/syntax/identifiers/mod.rs deleted file mode 100644 index aeebdaf884..0000000000 --- a/compiler/_otests/syntax/identifiers/mod.rs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::parse_program; - -#[test] -fn test_address_name_fail() { - let program_string = include_str!("address_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_console_name_fail() { - let program_string = include_str!("console_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_field_name_fail() { - let program_string = include_str!("field_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_group_name_fail() { - let program_string = include_str!("group_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_i8_name_fail() { - let program_string = include_str!("i8_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_input_name_fail() { - let program_string = include_str!("input_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_self_type_name_fail() { - let program_string = include_str!("self_type_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_self_keyword_name_fail() { - let program_string = include_str!("self_keyword_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_true_name_fail() { - let program_string = include_str!("true_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} - -#[test] -fn test_u8_name_fail() { - let program_string = include_str!("u8_fail.leo"); - let syntax_error = parse_program(program_string).is_err(); - - assert!(syntax_error); -} diff --git a/compiler/_otests/syntax/identifiers/self_keyword_fail.leo b/compiler/_otests/syntax/identifiers/self_keyword_fail.leo deleted file mode 100644 index 79bc4d6e96..0000000000 --- a/compiler/_otests/syntax/identifiers/self_keyword_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const Self = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/self_type_fail.leo b/compiler/_otests/syntax/identifiers/self_type_fail.leo deleted file mode 100644 index 79bc4d6e96..0000000000 --- a/compiler/_otests/syntax/identifiers/self_type_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const Self = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/true_fail.leo b/compiler/_otests/syntax/identifiers/true_fail.leo deleted file mode 100644 index b39ea75df6..0000000000 --- a/compiler/_otests/syntax/identifiers/true_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const address = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/identifiers/u8_fail.leo b/compiler/_otests/syntax/identifiers/u8_fail.leo deleted file mode 100644 index 4a48780a29..0000000000 --- a/compiler/_otests/syntax/identifiers/u8_fail.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const u8 = 0u32; -} \ No newline at end of file diff --git a/compiler/_otests/syntax/input_semicolon.leo b/compiler/_otests/syntax/input_semicolon.leo deleted file mode 100644 index 464f954529..0000000000 --- a/compiler/_otests/syntax/input_semicolon.leo +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: u32 = 5 \ No newline at end of file diff --git a/compiler/_otests/syntax/mod.rs b/compiler/_otests/syntax/mod.rs deleted file mode 100644 index 009835c15d..0000000000 --- a/compiler/_otests/syntax/mod.rs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{expect_asg_error, parse_input, parse_program}; -use leo_compiler::errors::CompilerError; -use leo_input::InputParserError; - -pub mod identifiers; - -#[test] -#[ignore] -fn test_semicolon() { - let program_string = include_str!("semicolon.leo"); - let error = parse_program(program_string).err().unwrap(); - - match error { - CompilerError::SyntaxError(_) => {} - _ => panic!("test_semicolon failed the wrong expected error, should be a ParserError"), - } -} - -#[test] -fn test_undefined() { - let program_string = include_str!("undefined.leo"); - let error = parse_program(program_string).err().unwrap(); - - expect_asg_error(error); -} - -#[test] -fn input_syntax_error() { - let input_string = include_str!("input_semicolon.leo"); - let error = parse_input(input_string).err().unwrap(); - - // Expect an input parser error. - match error { - CompilerError::InputParserError(InputParserError::SyntaxError(_)) => {} - _ => panic!("input syntax error should be a ParserError"), - } -} - -#[test] -fn test_compare_mismatched_types() { - let program_string = include_str!("compare_mismatched_types.leo"); - let error = parse_program(program_string).err().unwrap(); - - // Expect a type inference error. - crate::expect_asg_error(error); -} diff --git a/compiler/_otests/syntax/semicolon.leo b/compiler/_otests/syntax/semicolon.leo deleted file mode 100644 index f1deb29e37..0000000000 --- a/compiler/_otests/syntax/semicolon.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a = 0 -} \ No newline at end of file diff --git a/compiler/_otests/syntax/undefined.leo b/compiler/_otests/syntax/undefined.leo deleted file mode 100644 index 0ab97f6cb0..0000000000 --- a/compiler/_otests/syntax/undefined.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() -> bool { - return a; -} \ No newline at end of file diff --git a/compiler/_otests/tuples/access.leo b/compiler/_otests/tuples/access.leo deleted file mode 100644 index 9277f4ecc5..0000000000 --- a/compiler/_otests/tuples/access.leo +++ /dev/null @@ -1,6 +0,0 @@ -function main() { - const a = (true, false); - - console.assert(a.0 == true); - console.assert(a.1 == false); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/basic.leo b/compiler/_otests/tuples/basic.leo deleted file mode 100644 index 2e777f2797..0000000000 --- a/compiler/_otests/tuples/basic.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a = (true, false); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/function.leo b/compiler/_otests/tuples/function.leo deleted file mode 100644 index a5a0dda085..0000000000 --- a/compiler/_otests/tuples/function.leo +++ /dev/null @@ -1,10 +0,0 @@ -function foo() -> (bool, bool) { - return (true, false); -} - -function main() { - const a = foo(); - - console.assert(a.0 == true); - console.assert(a.1 == false); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/function_multiple.leo b/compiler/_otests/tuples/function_multiple.leo deleted file mode 100644 index 09688207cd..0000000000 --- a/compiler/_otests/tuples/function_multiple.leo +++ /dev/null @@ -1,10 +0,0 @@ -function foo() -> (bool, bool) { - return (true, false); -} - -function main() { - const (a, b) = foo(); - - console.assert(a == true); - console.assert(b == false); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/function_typed.leo b/compiler/_otests/tuples/function_typed.leo deleted file mode 100644 index ebd2e1201d..0000000000 --- a/compiler/_otests/tuples/function_typed.leo +++ /dev/null @@ -1,10 +0,0 @@ -function foo() -> (bool, bool) { - return (true, false); -} - -function main() { - const a: (bool, bool) = foo(); - - console.assert(a.0 == true); - console.assert(a.1 == false); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/input.leo b/compiler/_otests/tuples/input.leo deleted file mode 100644 index f7672a3b03..0000000000 --- a/compiler/_otests/tuples/input.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main(a: (bool, bool)) { - -} \ No newline at end of file diff --git a/compiler/_otests/tuples/inputs/input.in b/compiler/_otests/tuples/inputs/input.in deleted file mode 100644 index d27b342df7..0000000000 --- a/compiler/_otests/tuples/inputs/input.in +++ /dev/null @@ -1,2 +0,0 @@ -[main] -a: (bool, bool) = (true, true); \ No newline at end of file diff --git a/compiler/_otests/tuples/mod.rs b/compiler/_otests/tuples/mod.rs deleted file mode 100644 index 67798288a6..0000000000 --- a/compiler/_otests/tuples/mod.rs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_program}; - -#[test] -fn test_tuple_basic() { - let program_string = include_str!("basic.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_tuple_access() { - let program_string = include_str!("access.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_tuple_typed() { - let program_string = include_str!("typed.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_multiple() { - let program_string = include_str!("multiple.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_multiple_typed() { - let program_string = include_str!("multiple_typed.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_function() { - let program_string = include_str!("function.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_function_typed() { - let program_string = include_str!("function_typed.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_function_multiple() { - let progam_string = include_str!("function_multiple.leo"); - - let program = parse_program(progam_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_nested() { - let program_string = include_str!("nested.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_nested_access() { - let program_string = include_str!("nested_access.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -#[test] -fn test_nested_typed() { - let program_string = include_str!("nested_typed.leo"); - - let program = parse_program(program_string).unwrap(); - - assert_satisfied(program); -} - -// #[test] -// fn test_input() { -// let input_string = include_str!("inputs/input.in"); -// let program_string = include_str!("") -// } diff --git a/compiler/_otests/tuples/multiple.leo b/compiler/_otests/tuples/multiple.leo deleted file mode 100644 index 2cb003b0e1..0000000000 --- a/compiler/_otests/tuples/multiple.leo +++ /dev/null @@ -1,6 +0,0 @@ -function main() { - const (a, b) = (true, false); - - console.assert(a == true); - console.assert(b == false); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/multiple_typed.leo b/compiler/_otests/tuples/multiple_typed.leo deleted file mode 100644 index bbe4a01858..0000000000 --- a/compiler/_otests/tuples/multiple_typed.leo +++ /dev/null @@ -1,6 +0,0 @@ -function main() { - const (a, b): (bool, bool) = (true, false); - - console.assert(a == true); - console.assert(b == false); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/nested.leo b/compiler/_otests/tuples/nested.leo deleted file mode 100644 index bbdb2394a8..0000000000 --- a/compiler/_otests/tuples/nested.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - const a = (true, false); - const b = (true, a); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/nested_access.leo b/compiler/_otests/tuples/nested_access.leo deleted file mode 100644 index f21fa59bba..0000000000 --- a/compiler/_otests/tuples/nested_access.leo +++ /dev/null @@ -1,8 +0,0 @@ -function main() { - const a = (true, false); - const b = (true, a); - - console.assert(b.0 == true); - console.assert(b.1.0 == true); - console.assert(b.1.1 == false); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/nested_typed.leo b/compiler/_otests/tuples/nested_typed.leo deleted file mode 100644 index 44a10b2a3e..0000000000 --- a/compiler/_otests/tuples/nested_typed.leo +++ /dev/null @@ -1,4 +0,0 @@ -function main() { - const a = (true, false); - const b: (bool, (bool, bool)) = (true, a); -} \ No newline at end of file diff --git a/compiler/_otests/tuples/typed.leo b/compiler/_otests/tuples/typed.leo deleted file mode 100644 index 8f623fc148..0000000000 --- a/compiler/_otests/tuples/typed.leo +++ /dev/null @@ -1,3 +0,0 @@ -function main() { - const a: (bool, bool) = (true, false); -} \ No newline at end of file diff --git a/compiler/_otests/type_inference/basic.json b/compiler/_otests/type_inference/basic.json deleted file mode 100644 index 3b89375e2a..0000000000 --- a/compiler/_otests/type_inference/basic.json +++ /dev/null @@ -1,1008 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": { - "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}": { - "circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}", - "members": [] - } - }, - "global_consts": { - "ONE": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"ONE\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const ONE = 1u8;\\\"}\"}", - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 7, - "col_stop": 10, - "path": "", - "content": "const ONE = 1u8;" - } - } - ], - "type_": { - "IntegerType": "U8" - }, - "value": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 7, - "line_stop": 7, - "col_start": 13, - "col_stop": 16, - "path": "", - "content": "const ONE = 1u8;" - } - ] - } - }, - "span": { - "line_start": 7, - "line_stop": 7, - "col_start": 1, - "col_stop": 16, - "path": "", - "content": "const ONE = 1u8;" - } - } - }, - "functions": { - "{\"name\":\"two\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function two() -> u8 {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"two\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function two() -> u8 {\\\"}\"}", - "input": [], - "output": { - "IntegerType": "U8" - }, - "block": { - "statements": [ - { - "Return": { - "expression": { - "Value": { - "Integer": [ - "U8", - "2", - { - "line_start": 4, - "line_stop": 4, - "col_start": 10, - "col_stop": 13, - "path": "", - "content": " return 2u8;" - } - ] - } - }, - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 3, - "col_stop": 13, - "path": "", - "content": " return 2u8;" - } - } - } - ], - "span": { - "line_start": 3, - "line_stop": 5, - "col_start": 22, - "col_stop": 2, - "path": "", - "content": "function two() -> u8 {\n...\n}" - } - }, - "span": { - "line_start": 3, - "line_stop": 5, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function two() -> u8 {\n...\n}" - } - }, - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const a = 1u8;\\\"}\"}", - "span": { - "line_start": 10, - "line_stop": 10, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const a = 1u8;" - } - } - ], - "type_": { - "IntegerType": "U8" - }, - "value": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 10, - "line_stop": 10, - "col_start": 13, - "col_stop": 16, - "path": "", - "content": " const a = 1u8;" - } - ] - } - }, - "span": { - "line_start": 10, - "line_stop": 10, - "col_start": 3, - "col_stop": 16, - "path": "", - "content": " const a = 1u8;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const b = 1field;\\\"}\"}", - "span": { - "line_start": 11, - "line_stop": 11, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const b = 1field;" - } - } - ], - "type_": "Field", - "value": { - "Value": { - "Field": [ - "1", - { - "line_start": 11, - "line_stop": 11, - "col_start": 13, - "col_stop": 19, - "path": "", - "content": " const b = 1field;" - } - ] - } - }, - "span": { - "line_start": 11, - "line_stop": 11, - "col_start": 3, - "col_stop": 19, - "path": "", - "content": " const b = 1field;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const c = 1group;\\\"}\"}", - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const c = 1group;" - } - } - ], - "type_": "Group", - "value": { - "Value": { - "Group": { - "Single": [ - "1", - { - "line_start": 12, - "line_stop": 12, - "col_start": 13, - "col_stop": 19, - "path": "", - "content": " const c = 1group;" - } - ] - } - } - }, - "span": { - "line_start": 12, - "line_stop": 12, - "col_start": 3, - "col_stop": 19, - "path": "", - "content": " const c = 1group;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const d = (0, 1)group;\\\"}\"}", - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const d = (0, 1)group;" - } - } - ], - "type_": "Group", - "value": { - "Value": { - "Group": { - "Tuple": { - "x": { - "Number": [ - "0", - { - "line_start": 13, - "line_stop": 13, - "col_start": 14, - "col_stop": 15, - "path": "", - "content": " const d = (0, 1)group;" - } - ] - }, - "y": { - "Number": [ - "1", - { - "line_start": 13, - "line_stop": 13, - "col_start": 17, - "col_stop": 18, - "path": "", - "content": " const d = (0, 1)group;" - } - ] - }, - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 14, - "col_stop": 24, - "path": "", - "content": " const d = (0, 1)group;" - } - } - } - } - }, - "span": { - "line_start": 13, - "line_stop": 13, - "col_start": 3, - "col_stop": 24, - "path": "", - "content": " const d = (0, 1)group;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}", - "span": { - "line_start": 14, - "line_stop": 14, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - } - } - ], - "type_": "Address", - "value": { - "Value": { - "Address": [ - "aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8", - { - "line_start": 14, - "line_stop": 14, - "col_start": 13, - "col_stop": 76, - "path": "", - "content": " const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - } - ] - } - }, - "span": { - "line_start": 14, - "line_stop": 14, - "col_start": 3, - "col_stop": 76, - "path": "", - "content": " const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const f = two();\\\"}\"}", - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const f = two();" - } - } - ], - "type_": { - "IntegerType": "U8" - }, - "value": { - "Call": { - "function": { - "Identifier": "{\"name\":\"two\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const f = two();\\\"}\"}" - }, - "arguments": [], - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 13, - "col_stop": 18, - "path": "", - "content": " const f = two();" - } - } - }, - "span": { - "line_start": 15, - "line_stop": 15, - "col_start": 3, - "col_stop": 18, - "path": "", - "content": " const f = two();" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"g\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const g = [0u8; (3, 2)];\\\"}\"}", - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - } - ], - "type_": { - "Array": [ - { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "2" - } - ] - ] - }, - [ - { - "value": "3" - } - ] - ] - }, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U8", - "0", - { - "line_start": 16, - "line_stop": 16, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - ] - } - }, - "dimensions": [ - { - "value": "2" - } - ], - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 13, - "col_stop": 26, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - } - }, - "dimensions": [ - { - "value": "3" - } - ], - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 13, - "col_stop": 26, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - } - }, - "span": { - "line_start": 16, - "line_stop": 16, - "col_start": 3, - "col_stop": 26, - "path": "", - "content": " const g = [0u8; (3, 2)];" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"h\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const h = [[0u8; 3]; 2];\\\"}\"}", - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - } - ], - "type_": { - "Array": [ - { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "3" - } - ] - ] - }, - [ - { - "value": "2" - } - ] - ] - }, - "value": { - "ArrayInit": { - "element": { - "ArrayInit": { - "element": { - "Value": { - "Integer": [ - "U8", - "0", - { - "line_start": 17, - "line_stop": 17, - "col_start": 15, - "col_stop": 18, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - ] - } - }, - "dimensions": [ - { - "value": "3" - } - ], - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 14, - "col_stop": 22, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - } - }, - "dimensions": [ - { - "value": "2" - } - ], - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 13, - "col_stop": 26, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - } - }, - "span": { - "line_start": 17, - "line_stop": 17, - "col_start": 3, - "col_stop": 26, - "path": "", - "content": " const h = [[0u8; 3]; 2];" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const i = [1u8, 1u8, 1u8];\\\"}\"}", - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - } - ], - "type_": { - "Array": [ - { - "IntegerType": "U8" - }, - [ - { - "value": "3" - } - ] - ] - }, - "value": { - "ArrayInline": { - "elements": [ - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 18, - "line_stop": 18, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 18, - "line_stop": 18, - "col_start": 19, - "col_stop": 22, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - ] - } - } - }, - { - "Expression": { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 18, - "line_stop": 18, - "col_start": 24, - "col_stop": 27, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - ] - } - } - } - ], - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 13, - "col_stop": 28, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - } - }, - "span": { - "line_start": 18, - "line_stop": 18, - "col_start": 3, - "col_stop": 28, - "path": "", - "content": " const i = [1u8, 1u8, 1u8];" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"j\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const j = true;\\\"}\"}", - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const j = true;" - } - } - ], - "type_": "Boolean", - "value": { - "Value": { - "Boolean": [ - "true", - { - "line_start": 19, - "line_stop": 19, - "col_start": 13, - "col_stop": 17, - "path": "", - "content": " const j = true;" - } - ] - } - }, - "span": { - "line_start": 19, - "line_stop": 19, - "col_start": 3, - "col_stop": 17, - "path": "", - "content": " const j = true;" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"k\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const k = (1u8, 1u8);\\\"}\"}", - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const k = (1u8, 1u8);" - } - } - ], - "type_": { - "Tuple": [ - { - "IntegerType": "U8" - }, - { - "IntegerType": "U8" - } - ] - }, - "value": { - "TupleInit": { - "elements": [ - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 20, - "line_stop": 20, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " const k = (1u8, 1u8);" - } - ] - } - }, - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 20, - "line_stop": 20, - "col_start": 19, - "col_stop": 22, - "path": "", - "content": " const k = (1u8, 1u8);" - } - ] - } - } - ], - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 13, - "col_stop": 23, - "path": "", - "content": " const k = (1u8, 1u8);" - } - } - }, - "span": { - "line_start": 20, - "line_stop": 20, - "col_start": 3, - "col_stop": 23, - "path": "", - "content": " const k = (1u8, 1u8);" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"l\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const l = (1u8, 1u8, true);\\\"}\"}", - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - } - ], - "type_": { - "Tuple": [ - { - "IntegerType": "U8" - }, - { - "IntegerType": "U8" - }, - "Boolean" - ] - }, - "value": { - "TupleInit": { - "elements": [ - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 21, - "line_stop": 21, - "col_start": 14, - "col_stop": 17, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - ] - } - }, - { - "Value": { - "Integer": [ - "U8", - "1", - { - "line_start": 21, - "line_stop": 21, - "col_start": 19, - "col_stop": 22, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - ] - } - }, - { - "Value": { - "Boolean": [ - "true", - { - "line_start": 21, - "line_stop": 21, - "col_start": 24, - "col_stop": 28, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - ] - } - } - ], - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 13, - "col_stop": 29, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - } - }, - "span": { - "line_start": 21, - "line_stop": 21, - "col_start": 3, - "col_stop": 29, - "path": "", - "content": " const l = (1u8, 1u8, true);" - } - } - }, - { - "Definition": { - "declaration_type": "Const", - "variable_names": [ - { - "mutable": false, - "identifier": "{\"name\":\"m\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const m = Foo {};\\\"}\"}", - "span": { - "line_start": 22, - "line_stop": 22, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " const m = Foo {};" - } - } - ], - "type_": { - "Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {}\\\"}\"}" - }, - "value": { - "CircuitInit": { - "name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const m = Foo {};\\\"}\"}", - "members": [], - "span": { - "line_start": 22, - "line_stop": 22, - "col_start": 13, - "col_stop": 19, - "path": "", - "content": " const m = Foo {};" - } - } - }, - "span": { - "line_start": 22, - "line_stop": 22, - "col_start": 3, - "col_stop": 19, - "path": "", - "content": " const m = Foo {};" - } - } - } - ], - "span": { - "line_start": 9, - "line_stop": 23, - "col_start": 17, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - }, - "span": { - "line_start": 9, - "line_stop": 23, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n" - } - } - } -} diff --git a/compiler/_otests/type_inference/basic.leo b/compiler/_otests/type_inference/basic.leo deleted file mode 100644 index af4df0c19f..0000000000 --- a/compiler/_otests/type_inference/basic.leo +++ /dev/null @@ -1,23 +0,0 @@ -circuit Foo {} - -function two() -> u8 { - return 2u8; -} - -const ONE = 1u8; - -function main() { - const a = 1u8; - const b = 1field; - const c = 1group; - const d = (0, 1)group; - const e = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; - const f = two(); - const g = [0u8; (3, 2)]; - const h = [[0u8; 3]; 2]; - const i = [1u8, 1u8, 1u8]; - const j = true; - const k = (1u8, 1u8); - const l = (1u8, 1u8, true); - const m = Foo {}; -} \ No newline at end of file diff --git a/compiler/_otests/type_inference/for_loop_and_compound.json b/compiler/_otests/type_inference/for_loop_and_compound.json deleted file mode 100644 index b8abddd38a..0000000000 --- a/compiler/_otests/type_inference/for_loop_and_compound.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "name": "", - "expected_input": [], - "imports": [], - "circuits": {}, - "global_consts": {}, - "functions": { - "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": { - "annotations": [], - "identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}", - "input": [], - "output": { - "Tuple": [] - }, - "block": { - "statements": [ - { - "Definition": { - "declaration_type": "Let", - "variable_names": [ - { - "mutable": true, - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x = 10u16;\\\"}\"}", - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " let x = 10u16;" - } - } - ], - "type_": { - "IntegerType": "U16" - }, - "value": { - "Value": { - "Integer": [ - "U16", - "10", - { - "line_start": 2, - "line_stop": 2, - "col_start": 13, - "col_stop": 18, - "path": "", - "content": " let x = 10u16;" - } - ] - } - }, - "span": { - "line_start": 2, - "line_stop": 2, - "col_start": 5, - "col_stop": 18, - "path": "", - "content": " let x = 10u16;" - } - } - }, - { - "Iteration": { - "variable": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for i in 0..3 {\\\"}\"}", - "start": { - "Value": { - "Integer": [ - "U32", - "0", - { - "line_start": 3, - "line_stop": 3, - "col_start": 14, - "col_stop": 15, - "path": "", - "content": " for i in 0..3 {" - } - ] - } - }, - "stop": { - "Value": { - "Integer": [ - "U32", - "3", - { - "line_start": 3, - "line_stop": 3, - "col_start": 17, - "col_stop": 18, - "path": "", - "content": " for i in 0..3 {" - } - ] - } - }, - "block": { - "statements": [ - { - "Assign": { - "operation": "Assign", - "assignee": { - "identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x -= 1;\\\"}\"}", - "accesses": [], - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 9, - "col_stop": 10, - "path": "", - "content": " x -= 1;" - } - }, - "value": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x -= 1;\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U16", - "1", - { - "line_start": 4, - "line_stop": 4, - "col_start": 14, - "col_stop": 15, - "path": "", - "content": " x -= 1;" - } - ] - } - }, - "op": "Sub", - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 9, - "col_stop": 15, - "path": "", - "content": " x -= 1;" - } - } - }, - "span": { - "line_start": 4, - "line_stop": 4, - "col_start": 9, - "col_stop": 15, - "path": "", - "content": " x -= 1;" - } - } - } - ], - "span": { - "line_start": 3, - "line_stop": 5, - "col_start": 19, - "col_stop": 6, - "path": "", - "content": " for i in 0..3 {\n...\n }" - } - }, - "span": { - "line_start": 3, - "line_stop": 5, - "col_start": 5, - "col_stop": 6, - "path": "", - "content": " for i in 0..3 {\n...\n }" - } - } - }, - { - "Console": { - "function": { - "Assert": { - "Binary": { - "left": { - "Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(x == 7u16);\\\"}\"}" - }, - "right": { - "Value": { - "Integer": [ - "U16", - "7", - { - "line_start": 6, - "line_stop": 6, - "col_start": 25, - "col_stop": 29, - "path": "", - "content": " console.assert(x == 7u16);" - } - ] - } - }, - "op": "Eq", - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 20, - "col_stop": 29, - "path": "", - "content": " console.assert(x == 7u16);" - } - } - } - }, - "span": { - "line_start": 6, - "line_stop": 6, - "col_start": 5, - "col_stop": 29, - "path": "", - "content": " console.assert(x == 7u16);" - } - } - } - ], - "span": { - "line_start": 1, - "line_stop": 7, - "col_start": 17, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}" - } - }, - "span": { - "line_start": 1, - "line_stop": 7, - "col_start": 1, - "col_stop": 2, - "path": "", - "content": "function main() {\n...\n}\n\n\n\n" - } - } - } - } \ No newline at end of file diff --git a/compiler/_otests/type_inference/for_loop_and_compound.leo b/compiler/_otests/type_inference/for_loop_and_compound.leo deleted file mode 100644 index 92c27ff24b..0000000000 --- a/compiler/_otests/type_inference/for_loop_and_compound.leo +++ /dev/null @@ -1,7 +0,0 @@ -function main() { - let x = 10u16; - for i in 0..3 { - x -= 1; - } - console.assert(x == 7u16); -} \ No newline at end of file diff --git a/compiler/_otests/type_inference/mod.rs b/compiler/_otests/type_inference/mod.rs deleted file mode 100644 index 30f859b099..0000000000 --- a/compiler/_otests/type_inference/mod.rs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2019-2021 Aleo Systems Inc. -// This file is part of the Leo library. - -// The Leo library is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// The Leo library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with the Leo library. If not, see . - -use crate::{assert_satisfied, parse_program}; -#[allow(unused)] -use leo_asg::{new_context, Asg, AsgContext}; -use leo_ast::Ast; -use leo_compiler::TypeInferencePhase; -use leo_imports::ImportParser; -use leo_parser::parser; - -thread_local! { - static THREAD_GLOBAL_CONTEXT: AsgContext<'static> = { - let leaked = Box::leak(Box::new(leo_asg::new_alloc_context())); - leo_asg::new_context(leaked) - } -} - -pub fn thread_leaked_context() -> AsgContext<'static> { - THREAD_GLOBAL_CONTEXT.with(|f| *f) -} - -pub fn parse_program_ast(file_string: &str) -> Ast { - const TEST_PROGRAM_PATH: &str = ""; - let test_program_file_path = std::path::PathBuf::from(TEST_PROGRAM_PATH); - - let mut ast = Ast::new( - parser::parse(test_program_file_path.to_str().expect("unwrap fail"), &file_string) - .expect("Failed to parse file."), - ); - ast.canonicalize().expect("Failed to canonicalize program."); - - let program = ast.clone().into_repr(); - let asg = Asg::new(thread_leaked_context(), &program, &mut ImportParser::default()) - .expect("Failed to create ASG from AST"); - - let new_ast = TypeInferencePhase::default() - .phase_ast(&program, &asg.into_repr()) - .expect("Failed to produce type inference ast."); - - new_ast -} - -#[test] -fn test_basic() { - // Check program is valid. - let program_string = include_str!("basic.leo"); - let program = parse_program(program_string).unwrap(); - assert_satisfied(program); - - // Check we get expected ast. - let ast = parse_program_ast(program_string); - let expected_json = include_str!("basic.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} - -#[test] -fn test_for_loop_and_compound() { - // Check program is valid. - let program_string = include_str!("for_loop_and_compound.leo"); - let program = parse_program(program_string).unwrap(); - assert_satisfied(program); - - // Check we get expected ast. - let ast = parse_program_ast(program_string); - let expected_json = include_str!("for_loop_and_compound.json"); - let expected_ast: Ast = Ast::from_json_string(expected_json).expect("Unable to parse json."); - - assert_eq!(expected_ast, ast); -} From e2492ba9e468253ce8695bfbb7093dfb034ca257 Mon Sep 17 00:00:00 2001 From: damirka Date: Wed, 12 May 2021 20:47:03 +0300 Subject: [PATCH 23/26] more constraints checks --- compiler/tests/mod.rs | 5 ++++- tests/compiler/circuits/const_self_variable.leo | 5 +++-- .../circuits/duplicate_name_context.leo | 5 ++++- tests/compiler/circuits/input/dummy.in | 6 ++++++ tests/compiler/circuits/member_function.leo | 9 +++------ .../circuits/member_static_function.leo | 9 +++------ .../circuits/member_static_function_nested.leo | 5 ++++- tests/compiler/circuits/member_variable.leo | 9 +++------ .../circuits/member_variable_and_function.leo | 9 +++------ tests/compiler/circuits/mut_self_variable.leo | 11 +++-------- .../circuits/mut_self_variable_branch.leo | 17 +++-------------- .../circuits/mut_self_variable_conditional.leo | 5 ++++- tests/compiler/circuits/mut_variable.leo | 10 +++------- .../circuits/mutable_call_immutable_context.leo | 7 +++---- tests/compiler/circuits/self_circuit.leo | 2 +- tests/compiler/circuits/self_member.leo | 7 ++++--- .../circuits/const_self_variable.leo.out | 17 ++++++++++------- .../circuits/duplicate_name_context.leo.out | 17 ++++++++++------- .../compiler/circuits/member_function.leo.out | 12 ++++++------ .../circuits/member_static_function.leo.out | 12 ++++++------ .../member_static_function_nested.leo.out | 17 ++++++++++------- .../compiler/circuits/member_variable.leo.out | 12 ++++++------ .../member_variable_and_function.leo.out | 12 ++++++------ .../compiler/circuits/mut_self_variable.leo.out | 17 ++++++++++------- .../circuits/mut_self_variable_branch.leo.out | 17 ++++++++++------- .../mut_self_variable_conditional.leo.out | 17 ++++++++++------- .../compiler/circuits/mut_variable.leo.out | 17 ++++++++++------- .../mutable_call_immutable_context.leo.out | 17 ++++++++++------- .../compiler/circuits/self_member.leo.out | 17 ++++++++++------- 29 files changed, 168 insertions(+), 154 deletions(-) create mode 100644 tests/compiler/circuits/input/dummy.in diff --git a/compiler/tests/mod.rs b/compiler/tests/mod.rs index 94d18cf9d9..e6e454c59e 100644 --- a/compiler/tests/mod.rs +++ b/compiler/tests/mod.rs @@ -18,8 +18,11 @@ #![allow(deprecated)] -pub mod canonicalization; +// Test framework found in /tests/compiler +#[cfg(test)] pub mod test; + +pub mod canonicalization; pub mod type_inference; use leo_asg::{new_alloc_context, new_context, AsgContext}; diff --git a/tests/compiler/circuits/const_self_variable.leo b/tests/compiler/circuits/const_self_variable.leo index 1d849f8fe0..72322c9d2d 100644 --- a/tests/compiler/circuits/const_self_variable.leo +++ b/tests/compiler/circuits/const_self_variable.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit Foo { @@ -11,8 +12,8 @@ circuit Foo { } } -function main() { +function main(y: bool) -> bool { let f = Foo { a: 0u8 }; - console.assert(1u8 == f.use_a()); + return 1u8 == f.use_a() == true; } diff --git a/tests/compiler/circuits/duplicate_name_context.leo b/tests/compiler/circuits/duplicate_name_context.leo index 5173956d6d..7b64611861 100644 --- a/tests/compiler/circuits/duplicate_name_context.leo +++ b/tests/compiler/circuits/duplicate_name_context.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit Bar { @@ -11,8 +12,10 @@ circuit Bar { } } -function main () { +function main(y: bool) -> bool { const Bar = 66u32; const k1 = Bar { b2: 30u32 }; const k2 = Bar::add_five(55u32); + + return y == true; } diff --git a/tests/compiler/circuits/input/dummy.in b/tests/compiler/circuits/input/dummy.in new file mode 100644 index 0000000000..d63f21e6b5 --- /dev/null +++ b/tests/compiler/circuits/input/dummy.in @@ -0,0 +1,6 @@ +[main] +y: bool = true; +x: bool = false; + +[registers] +r0: bool = true; diff --git a/tests/compiler/circuits/member_function.leo b/tests/compiler/circuits/member_function.leo index f5b64e8e19..660110c1dc 100644 --- a/tests/compiler/circuits/member_function.leo +++ b/tests/compiler/circuits/member_function.leo @@ -1,10 +1,7 @@ /* namespace: Compile expectation: Pass -inputs: - - member.in: | - [registers] - r0: bool = false; +input_file: input/dummy.in */ circuit Foo { @@ -15,8 +12,8 @@ circuit Foo { } } -function main() -> bool { +function main(y: bool) -> bool { const a = Foo { x: 1u32 }; - return a.echo() == 1u32; + return a.echo() == 1u32 == true; } diff --git a/tests/compiler/circuits/member_static_function.leo b/tests/compiler/circuits/member_static_function.leo index ab78b0bbc0..3c0fffd542 100644 --- a/tests/compiler/circuits/member_static_function.leo +++ b/tests/compiler/circuits/member_static_function.leo @@ -1,10 +1,7 @@ /* namespace: Compile expectation: Pass -inputs: - - static.in: | - [registers] - r0: bool = false; +input_file: input/dummy.in */ circuit Foo { @@ -13,8 +10,8 @@ circuit Foo { } } -function main() -> bool { +function main(y: bool) -> bool { const a = Foo::echo(1u32); - return a == 1u32; + return a == 1u32 == y; } diff --git a/tests/compiler/circuits/member_static_function_nested.leo b/tests/compiler/circuits/member_static_function_nested.leo index 52e3d0900f..25c309670e 100644 --- a/tests/compiler/circuits/member_static_function_nested.leo +++ b/tests/compiler/circuits/member_static_function_nested.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit Foo { @@ -15,6 +16,8 @@ circuit Foo { } } -function main() { +function main(y: bool) -> bool { Foo::baz(); + + return y == true; } diff --git a/tests/compiler/circuits/member_variable.leo b/tests/compiler/circuits/member_variable.leo index f14178bf6b..db779b49fa 100644 --- a/tests/compiler/circuits/member_variable.leo +++ b/tests/compiler/circuits/member_variable.leo @@ -1,18 +1,15 @@ /* namespace: Compile expectation: Pass -inputs: - - member.in: | - [registers] - r0: bool = false; +input_file: input/dummy.in */ circuit Foo { x: u32, } -function main() -> bool { +function main(y: bool) -> bool { const a = Foo { x: 1u32 }; - return a.x == 1u32; + return a.x == 1u32 == y; } diff --git a/tests/compiler/circuits/member_variable_and_function.leo b/tests/compiler/circuits/member_variable_and_function.leo index 67d28eb539..33d48043bb 100644 --- a/tests/compiler/circuits/member_variable_and_function.leo +++ b/tests/compiler/circuits/member_variable_and_function.leo @@ -1,10 +1,7 @@ /* namespace: Compile expectation: Pass -inputs: - - member.in: | - [registers] - r0: bool = false; +input_file: input/dummy.in */ circuit Foo { @@ -15,9 +12,9 @@ circuit Foo { } } -function main() -> bool { +function main(y: bool) -> bool { const a = Foo { foo: 1 }; const b = a.foo + Foo::bar(); - return b == 2u32; + return b == 2u32 == y; } diff --git a/tests/compiler/circuits/mut_self_variable.leo b/tests/compiler/circuits/mut_self_variable.leo index aa8aa2554a..ea90f9e3d3 100644 --- a/tests/compiler/circuits/mut_self_variable.leo +++ b/tests/compiler/circuits/mut_self_variable.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit Foo { @@ -8,20 +9,14 @@ circuit Foo { function set_a(mut self, new: u8) { self.a = new; - console.assert(self.a == new); } } -function main() { +function main(y: bool) -> bool { let f = Foo { a: 0u8 }; - console.assert(f.a == 0u8); - f.set_a(1u8); - - console.assert(f.a == 1u8); - f.set_a(2u8); - console.assert(f.a == 2u8); + return f.a == 2u8 == y; } diff --git a/tests/compiler/circuits/mut_self_variable_branch.leo b/tests/compiler/circuits/mut_self_variable_branch.leo index 4dd9f7ea61..47148693b6 100644 --- a/tests/compiler/circuits/mut_self_variable_branch.leo +++ b/tests/compiler/circuits/mut_self_variable_branch.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit Foo { @@ -9,29 +10,17 @@ circuit Foo { function set_a(mut self, condition: bool, new: u8) { if condition { self.a = new; - console.assert(self.a == new); } } } -function main() { +function main(y: bool) -> bool { let f = Foo { a: 0u8 }; - console.assert(f.a == 0u8); - f.set_a(false, 1u8); - - console.assert(f.a == 0u8); - f.set_a(true, 1u8); - - console.assert(f.a == 1u8); - f.set_a(false, 2u8); - - console.assert(f.a == 1u8); - f.set_a(true, 2u8); - console.assert(f.a == 2u8); + return f.a == 2u8 == y; } diff --git a/tests/compiler/circuits/mut_self_variable_conditional.leo b/tests/compiler/circuits/mut_self_variable_conditional.leo index 5320a240c3..625460fa97 100644 --- a/tests/compiler/circuits/mut_self_variable_conditional.leo +++ b/tests/compiler/circuits/mut_self_variable_conditional.leo @@ -1,12 +1,15 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main() { +function main(y: bool) -> bool { let f = Foo { a: 0u32 }; f.bar(); + + return y == true; } circuit Foo { diff --git a/tests/compiler/circuits/mut_variable.leo b/tests/compiler/circuits/mut_variable.leo index 970a0068c5..86d26c2cc6 100644 --- a/tests/compiler/circuits/mut_variable.leo +++ b/tests/compiler/circuits/mut_variable.leo @@ -1,22 +1,18 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit Foo { a: u8; } -function main() { +function main(y: bool) -> bool { let f = Foo { a: 0u8 }; - console.assert(f.a == 0u8); - f.a = 1u8; - - console.assert(f.a == 1u8); - f.a = 2u8; - console.assert(f.a == 2u8); + return f.a == 2u8 == true; } diff --git a/tests/compiler/circuits/mutable_call_immutable_context.leo b/tests/compiler/circuits/mutable_call_immutable_context.leo index fb9b1d0fe1..477245a939 100644 --- a/tests/compiler/circuits/mutable_call_immutable_context.leo +++ b/tests/compiler/circuits/mutable_call_immutable_context.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit TestMe { @@ -20,11 +21,9 @@ function my_fn() -> TestMe { return TestMe { x: 0u8 }; } -function main () { +function main(y: bool) -> bool { const t = TestMe {x: 6u8}.test_me(); - console.assert(t == 7u8); const u = my_fn().test_me(); - console.assert(u == 1u8); const v = TestMe::new().test_me(); - console.assert(v == 2u8); + return v == 2u8 == y; } diff --git a/tests/compiler/circuits/self_circuit.leo b/tests/compiler/circuits/self_circuit.leo index 097712f94e..3ec141db2f 100644 --- a/tests/compiler/circuits/self_circuit.leo +++ b/tests/compiler/circuits/self_circuit.leo @@ -12,4 +12,4 @@ circuit Foo { function main() { const a = Foo::new(); -} \ No newline at end of file +} diff --git a/tests/compiler/circuits/self_member.leo b/tests/compiler/circuits/self_member.leo index 053bafbfd8..4cf1f74cf8 100644 --- a/tests/compiler/circuits/self_member.leo +++ b/tests/compiler/circuits/self_member.leo @@ -1,6 +1,7 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ circuit Foo { @@ -11,9 +12,9 @@ circuit Foo { } } -function main() { +function main(y: bool) -> bool { const a = Foo { f: 1u32 }; const b = a.bar(); - console.assert(b == 1u32); -} \ No newline at end of file + return b == 1u32 == y; +} diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/duplicate_name_context.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/member_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_function.leo.out index f54cdfaa9c..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function.leo.out @@ -4,13 +4,13 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: member.in + - input_file: input/dummy.in output: registers: r0: diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out index be68ef6293..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function.leo.out @@ -4,13 +4,13 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: static.in + - input_file: input/dummy.in output: registers: r0: diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_nested.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out index f54cdfaa9c..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable.leo.out @@ -4,13 +4,13 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: member.in + - input_file: input/dummy.in output: registers: r0: diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out index f54cdfaa9c..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_and_function.leo.out @@ -4,13 +4,13 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: member.in + - input_file: input/dummy.in output: registers: r0: diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_branch.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_conditional.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mutable_call_immutable_context.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/circuits/self_member.leo.out b/tests/expectations/compiler/compiler/circuits/self_member.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" From 17744f7f7deea1fbeefdcc5073214925c9ead1ef Mon Sep 17 00:00:00 2001 From: damirka Date: Thu, 13 May 2021 16:56:17 +0300 Subject: [PATCH 24/26] removes import tests, fix ci, add constraint number check, more tests --- compiler/tests/mod.rs | 4 - compiler/tests/test.rs | 13 +- tests/compiler/address/equal.leo | 2 +- .../input/type_nested_value_nested_3x2.in | 1 + .../array/type_nested_value_nested_3x2.leo | 6 +- tests/compiler/console/debug.leo | 6 +- tests/compiler/console/error.leo | 6 +- tests/compiler/console/input/dummy.in | 6 + .../console/{inputs => input}/input_equal.in | 3 + .../{inputs => input}/input_unequal.in | 3 + tests/compiler/console/log.leo | 11 +- tests/compiler/console/log_conditional.leo | 10 +- tests/compiler/console/log_input.leo | 12 +- tests/compiler/console/log_parameter.leo | 6 +- tests/compiler/console/log_parameter_many.leo | 6 +- tests/compiler/core/unstable_blake2s.leo | 6 +- tests/compiler/definition/input/dummy.in | 5 + tests/compiler/definition/out_of_order.leo | 7 +- .../definition/out_of_order_with_import.leo | 7 +- tests/compiler/function/array_input.leo | 4 +- .../function/array_params_direct_call.leo | 5 +- tests/compiler/function/empty.leo | 6 +- tests/compiler/function/input/dummy.in | 1 + tests/compiler/function/iteration.leo | 4 +- .../compiler/function/iteration_repeated.leo | 4 +- tests/compiler/function/multiple_returns.leo | 4 +- tests/compiler/function/repeated.leo | 4 +- tests/compiler/function/return.leo | 4 +- .../function/return_array_nested_pass.leo | 3 +- .../function/return_array_tuple_pass.leo | 3 +- tests/compiler/function/return_tuple.leo | 8 +- .../function/return_tuple_conditional.leo | 6 +- tests/compiler/function/value_unchanged.leo | 4 +- tests/compiler/import/alias.leo | 14 +- tests/compiler/import/basic.leo | 14 +- tests/compiler/import/input/dummy.in | 3 + tests/compiler/import/many_import.leo | 14 +- tests/compiler/import/many_import_star.leo | 14 +- tests/compiler/import/multiple.leo | 14 +- tests/compiler/import/names.leo | 14 +- tests/compiler/import/names_a_dash.leo | 12 - tests/compiler/import/names_a_dash_fail.leo | 10 + tests/compiler/import/names_dash_a.leo | 12 - tests/compiler/import/names_dash_a_fail.leo | 10 + tests/compiler/import/names_dollar.leo | 12 - tests/compiler/import/names_dollar_fail.leo | 10 + tests/compiler/import/names_underscore.leo | 12 - .../compiler/import/names_underscore_fail.leo | 10 + tests/compiler/import/star.leo | 14 +- tests/compiler/import/star_fail.leo | 10 +- .../program_input/input/main_field.in | 4 + .../input_files/program_input/main_field.leo | 4 +- .../program_input_constants/input/main.in | 3 + .../input/main_array.in | 3 + .../input/main_field.in | 6 + .../input/main_group.in | 6 + .../input/main_multi_dimension_array.in | 3 + .../input/main_multiple.in | 3 + .../input/main_tuple.in | 3 + .../program_input_constants/main.leo | 6 +- .../program_input_constants/main_array.leo | 4 +- .../program_input_constants/main_field.leo | 4 +- .../program_input_constants/main_group.leo | 4 +- .../main_multi_dimension_array.leo | 7 +- .../program_input_constants/main_multiple.leo | 4 +- .../program_input_constants/main_tuple.leo | 2 +- .../program_registers/input/array.in | 5 +- .../program_registers/input/main.in | 3 +- .../program_registers/registers_array.leo | 4 +- .../program_registers/registers_pass.leo | 4 +- .../input_files/program_state/basic.leo | 4 +- .../input_files/program_state/input/dummy.in | 3 + tests/compiler/integers/i128/max.leo | 4 +- tests/compiler/integers/i128/min.leo | 4 +- tests/compiler/integers/i128/negate_min.leo | 4 +- tests/compiler/integers/i16/max.leo | 6 +- tests/compiler/integers/i16/min.leo | 6 +- tests/compiler/integers/i16/negate_min.leo | 4 +- tests/compiler/integers/i16/pow.leo | 22 +- tests/compiler/integers/i32/max.leo | 4 +- tests/compiler/integers/i32/min.leo | 4 +- tests/compiler/integers/i32/negate_min.leo | 4 +- tests/compiler/integers/i64/max.leo | 4 +- tests/compiler/integers/i64/min.leo | 4 +- tests/compiler/integers/i64/negate_min.leo | 4 +- tests/compiler/integers/i8/max.leo | 6 +- tests/compiler/integers/i8/min.leo | 6 +- tests/compiler/integers/i8/pow.leo | 22 +- tests/compiler/integers/input/dummy.in | 5 + tests/compiler/integers/u128/max.leo | 4 +- tests/compiler/integers/u128/min.leo | 4 +- tests/compiler/integers/u16/max.leo | 4 +- tests/compiler/integers/u16/min.leo | 4 +- tests/compiler/integers/u16/pow.leo | 22 +- tests/compiler/integers/u32/max.leo | 4 +- tests/compiler/integers/u32/min.leo | 4 +- tests/compiler/integers/u64/max.leo | 4 +- tests/compiler/integers/u64/min.leo | 4 +- tests/compiler/integers/u8/max.leo | 4 +- tests/compiler/integers/u8/min.leo | 4 +- tests/compiler/integers/u8/pow.leo | 22 +- tests/compiler/mutability/array_mut.leo | 4 +- .../compiler/mutability/array_splice_mut.leo | 5 +- tests/compiler/mutability/array_tuple_mut.leo | 5 +- .../mutability/circuit_function_mut.leo | 4 +- .../mutability/circuit_variable_mut.leo | 4 +- tests/compiler/mutability/cond_mut.leo | 4 +- tests/compiler/mutability/input/dummy.in | 1 + .../mutability/{let.leo => let_fail.leo} | 0 tests/compiler/mutability/let_mut.leo | 4 +- tests/compiler/mutability/let_mut_nested.leo | 4 +- .../array/input_nested_3x2_fail.leo.out | 2 +- .../array/multi_fail_initializer.leo.out | 2 +- .../compiler/array/multi_fail_inline.leo.out | 2 +- .../array/multi_initializer_fail.leo.out | 2 +- .../array/nested_3x2_value_fail.leo.out | 2 +- .../array/tuple_3x2_value_fail.leo.out | 2 +- .../compiler/compiler/array/type_fail.leo.out | 2 +- .../type_nested_value_nested_3x2.leo.out | 10 +- .../type_nested_value_nested_3x2_fail.leo.out | 2 +- ...ype_nested_value_nested_4x3x2_fail.leo.out | 2 +- .../type_nested_value_tuple_3x2_fail.leo.out | 2 +- ...type_nested_value_tuple_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_nested_3x2_fail.leo.out | 2 +- ...type_tuple_value_nested_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_4x3x2_fail.leo.out | 2 +- .../array/variable_slice_fail.leo.out | 2 +- .../circuits/const_self_variable_fail.leo.out | 2 +- .../compiler/circuits/inline_fail.leo.out | 2 +- .../circuits/inline_member_fail.leo.out | 2 +- .../circuits/inline_undefined.leo.out | 2 +- .../circuits/member_function_fail.leo.out | 2 +- .../circuits/member_function_invalid.leo.out | 2 +- .../member_static_function_invalid.leo.out | 2 +- .../member_static_function_undefined.leo.out | 2 +- .../circuits/member_variable_fail.leo.out | 2 +- .../circuits/mut_function_fail.leo.out | 2 +- .../circuits/mut_self_function_fail.leo.out | 2 +- .../mut_self_static_function_fail.leo.out | 2 +- .../circuits/mut_self_variable_fail.leo.out | 2 +- .../circuits/mut_static_function_fail.leo.out | 2 +- .../circuits/mut_variable_fail.leo.out | 2 +- .../compiler/circuits/self_circuit.leo.out | 2 +- .../compiler/circuits/self_fail.leo.out | 2 +- .../circuits/self_member_invalid.leo.out | 2 +- .../circuits/self_member_undefined.leo.out | 2 +- .../compiler/compiler/console/debug.leo.out | 17 +- .../compiler/compiler/console/error.leo.out | 17 +- .../compiler/compiler/console/log.leo.out | 18 + .../compiler/console/log_conditional.leo.out | 24 +- .../compiler/console/log_fail.leo.out | 2 +- .../compiler/console/log_input.leo.out | 7 +- .../compiler/console/log_parameter.leo.out | 17 +- .../console/log_parameter_fail_empty.leo.out | 2 +- .../console/log_parameter_fail_none.leo.out | 2 +- .../log_parameter_fail_unknown.leo.out | 2 +- .../console/log_parameter_many.leo.out | 17 +- .../compiler/compiler/core/blake2s.leo.out | 2 +- .../core/core_circuit_invalid.leo.out | 2 +- .../compiler/core/unstable_blake2s.leo.out | 10 +- .../compiler/definition/out_of_order.leo.out | 17 +- .../out_of_order_with_import.leo.out | 17 +- .../compiler/function/array_input.leo.out | 17 +- .../function/array_params_direct_call.leo.out | 17 +- .../duplicate_definition_fail.leo.out | 2 +- .../compiler/compiler/function/empty.leo.out | 17 +- .../compiler/function/iteration.leo.out | 10 +- .../function/iteration_repeated.leo.out | 10 +- .../function/multiple_returns.leo.out | 10 +- .../function/multiple_returns_fail.leo.out | 2 +- .../multiple_returns_fail_conditional.leo.out | 2 +- .../compiler/function/repeated.leo.out | 10 +- .../compiler/compiler/function/return.leo.out | 10 +- .../function/return_array_nested_fail.leo.out | 2 +- .../function/return_array_nested_pass.leo.out | 15 +- .../function/return_array_tuple_fail.leo.out | 2 +- .../function/return_array_tuple_pass.leo.out | 15 +- .../compiler/function/return_tuple.leo.out | 18 +- .../function/return_tuple_conditional.leo.out | 10 +- .../compiler/function/scope_fail.leo.out | 2 +- .../compiler/function/undefined.leo.out | 2 +- .../compiler/function/value_unchanged.leo.out | 10 +- .../global_consts/modify_global_const.leo.out | 2 +- .../compiler/compiler/import/alias.leo.out | 18 - .../compiler/compiler/import/basic.leo.out | 18 - .../compiler/import/many_import.leo.out | 18 - .../compiler/import/many_import_star.leo.out | 18 - .../compiler/compiler/import/multiple.leo.out | 18 - .../compiler/compiler/import/names.leo.out | 15 - .../compiler/import/names_a_dash.leo.out | 5 - .../compiler/import/names_dash_a.leo.out | 5 - .../compiler/import/names_dollar.leo.out | 5 - .../compiler/import/names_underscore.leo.out | 5 - .../compiler/compiler/import/star.leo.out | 18 - .../compiler/import/star_fail.leo.out | 5 - .../program_input/main_array_fail.leo.out | 2 +- .../program_input/main_field.leo.out | 15 +- .../program_input/main_tuple_fail.leo.out | 2 +- .../program_input_constants/main.leo.out | 12 +- .../main_array.leo.out | 10 +- .../main_array_fail.leo.out | 2 +- .../main_field.leo.out | 15 +- .../main_group.leo.out | 15 +- .../main_multi_dimension_array.leo.out | 10 +- .../main_multiple.leo.out | 10 +- .../main_tuple.leo.out | 10 +- .../main_tuple_fail.leo.out | 2 +- .../program_registers/registers_array.leo.out | 12 +- .../program_registers/registers_fail.leo.out | 2 +- .../program_registers/registers_pass.leo.out | 12 +- .../input_files/program_state/basic.leo.out | 10 +- .../compiler/integers/i128/max.leo.out | 17 +- .../compiler/integers/i128/max_fail.leo.out | 2 +- .../compiler/integers/i128/min.leo.out | 17 +- .../compiler/integers/i128/min_fail.leo.out | 2 +- .../compiler/integers/i128/negate_min.leo.out | 17 +- .../i128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i16/max.leo.out | 17 +- .../compiler/integers/i16/max_fail.leo.out | 2 +- .../compiler/integers/i16/min.leo.out | 17 +- .../compiler/integers/i16/min_fail.leo.out | 2 +- .../compiler/integers/i16/negate_min.leo.out | 17 +- .../i16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i16/pow.leo.out | 18 - .../compiler/integers/i32/max.leo.out | 17 +- .../compiler/integers/i32/max_fail.leo.out | 2 +- .../compiler/integers/i32/min.leo.out | 17 +- .../compiler/integers/i32/min_fail.leo.out | 2 +- .../compiler/integers/i32/negate_min.leo.out | 17 +- .../i32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i64/max.leo.out | 17 +- .../compiler/integers/i64/max_fail.leo.out | 2 +- .../compiler/integers/i64/min.leo.out | 17 +- .../compiler/integers/i64/min_fail.leo.out | 2 +- .../compiler/integers/i64/negate_min.leo.out | 17 +- .../i64/no_space_between_literal.leo.out | 2 +- .../compiler/compiler/integers/i8/max.leo.out | 17 +- .../compiler/integers/i8/max_fail.leo.out | 2 +- .../compiler/compiler/integers/i8/min.leo.out | 17 +- .../compiler/integers/i8/min_fail.leo.out | 2 +- .../compiler/integers/i8/negate_min.leo.out | 2 +- .../i8/no_space_between_literal.leo.out | 2 +- .../compiler/compiler/integers/i8/pow.leo.out | 18 - .../compiler/integers/u128/max.leo.out | 17 +- .../compiler/integers/u128/max_fail.leo.out | 2 +- .../compiler/integers/u128/min.leo.out | 17 +- .../compiler/integers/u128/min_fail.leo.out | 2 +- .../u128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u16/max.leo.out | 17 +- .../compiler/integers/u16/max_fail.leo.out | 2 +- .../compiler/integers/u16/min.leo.out | 17 +- .../compiler/integers/u16/min_fail.leo.out | 2 +- .../u16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u16/pow.leo.out | 18 - .../compiler/integers/u32/max.leo.out | 17 +- .../compiler/integers/u32/max_fail.leo.out | 2 +- .../compiler/integers/u32/min.leo.out | 17 +- .../compiler/integers/u32/min_fail.leo.out | 2 +- .../u32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u64/max.leo.out | 17 +- .../compiler/integers/u64/max_fail.leo.out | 2 +- .../compiler/integers/u64/min.leo.out | 17 +- .../compiler/integers/u64/min_fail.leo.out | 2 +- .../u64/no_space_between_literal.leo.out | 2 +- .../compiler/compiler/integers/u8/max.leo.out | 17 +- .../compiler/integers/u8/max_fail.leo.out | 2 +- .../compiler/compiler/integers/u8/min.leo.out | 17 +- .../compiler/integers/u8/min_fail.leo.out | 2 +- .../u8/no_space_between_literal.leo.out | 2 +- .../compiler/compiler/integers/u8/pow.leo.out | 18 - .../compiler/mutability/array_fail.leo.out | 2 +- .../compiler/mutability/array_mut.leo.out | 10 +- .../mutability/array_splice_mut.leo.out | 10 +- .../mutability/array_tuple_mut.leo.out | 10 +- .../compiler/mutability/circuit_fail.leo.out | 2 +- .../mutability/circuit_function_const.leo.out | 2 +- .../mutability/circuit_function_mut.leo.out | 10 +- .../circuit_static_function_mut_fail.leo.out | 2 +- .../mutability/circuit_variable_mut.leo.out | 10 +- .../compiler/mutability/cond_mut.leo.out | 10 +- .../compiler/mutability/const.leo.out | 2 +- .../mutability/function_input.leo.out | 2 +- .../compiler/compiler/mutability/let.leo.out | 5 - .../compiler/mutability/let_fail.leo.out | 5 + .../compiler/mutability/let_mut.leo.out | 10 +- .../mutability/let_mut_nested.leo.out | 10 +- .../statements/ternary_non_const_fail.leo.out | 2 +- .../parser/parser/circuits/big_self.leo.out | 53 - .../parser/parser/circuits/empty.leo.out | 13 - .../circuits/field_and_functions.leo.out | 97 -- .../parser/parser/circuits/fields.leo.out | 19 - .../parser/circuits/fields_fail.leo.out | 5 - .../parser/parser/circuits/functions.leo.out | 91 - .../parser/parser/circuits/mut_self.leo.out | 53 - .../parser/parser/circuits/self.leo.out | 53 - .../expression/access/array_access.leo.out | 267 --- .../access/array_range_access.leo.out | 401 ----- .../parser/expression/access/call.leo.out | 162 -- .../parser/expression/access/circuit.leo.out | 120 -- .../expression/access/circuit_static.leo.out | 120 -- .../parser/expression/access/tuple.leo.out | 109 -- .../parser/expression/array_init.leo.out | 150 -- .../parser/expression/array_init_fail.leo.out | 6 - .../parser/expression/array_inline.leo.out | 317 ---- .../expression/array_inline_fail.leo.out | 9 - .../parser/expression/binary/add.leo.out | 338 ---- .../parser/expression/binary/and.leo.out | 111 -- .../parser/expression/binary/div.leo.out | 180 -- .../parser/expression/binary/eq.leo.out | 338 ---- .../parser/expression/binary/exp.leo.out | 244 --- .../parser/expression/binary/gt.leo.out | 338 ---- .../parser/expression/binary/gte.leo.out | 338 ---- .../parser/expression/binary/lt.leo.out | 338 ---- .../parser/expression/binary/lte.leo.out | 338 ---- .../parser/expression/binary/mul.leo.out | 289 ---- .../parser/expression/binary/ne.leo.out | 338 ---- .../parser/expression/binary/or.leo.out | 338 ---- .../parser/expression/binary/sub.leo.out | 180 -- .../parser/parser/expression/cast.leo.out | 186 --- .../parser/expression/circuit_init.leo.out | 113 -- .../expression/circuit_init_fail.leo.out | 16 - .../parser/parser/expression/ident.leo.out | 23 - .../parser/expression/literal/address.leo.out | 13 - .../expression/literal/address_fail.leo.out | 13 - .../expression/literal/address_parse.leo.out | 40 - .../parser/expression/literal/bool.leo.out | 12 - .../expression/literal/bool_parse.leo.out | 22 - .../parser/expression/literal/comment.leo.out | 22 - .../literal/formatted_string.leo.out | 24 - .../parser/expression/literal/group.leo.out | 648 -------- .../expression/literal/group_fail.leo.out | 13 - .../parser/expression/literal/int.leo.out | 111 -- .../literal/int_parse/field.leo.out | 949 ----------- .../expression/literal/int_parse/i128.leo.out | 1053 ------------ .../expression/literal/int_parse/i16.leo.out | 1053 ------------ .../expression/literal/int_parse/i32.leo.out | 1053 ------------ .../expression/literal/int_parse/i64.leo.out | 1053 ------------ .../expression/literal/int_parse/i8.leo.out | 1053 ------------ .../literal/int_parse/implicit.leo.out | 949 ----------- .../literal/int_parse/mono_group.leo.out | 1053 ------------ .../expression/literal/int_parse/u128.leo.out | 1053 ------------ .../expression/literal/int_parse/u16.leo.out | 1053 ------------ .../expression/literal/int_parse/u32.leo.out | 1053 ------------ .../expression/literal/int_parse/u64.leo.out | 1053 ------------ .../expression/literal/int_parse/u8.leo.out | 1053 ------------ .../expression/literal/postfix_types.leo.out | 62 - .../parser/parser/expression/ternary.leo.out | 72 - .../parser/parser/expression/tuple.leo.out | 94 -- .../parser/expression/unary/negate.leo.out | 120 -- .../parser/expression/unary/not.leo.out | 120 -- .../parser/parser/functions/annotated.leo.out | 58 - .../parser/functions/annotated_param.leo.out | 59 - .../parser/functions/annotated_twice.leo.out | 67 - .../parser/functions/const_input_fail.leo.out | 5 - .../parser/functions/const_param.leo.out | 140 -- .../parser/functions/const_self_bad.leo.out | 50 - .../parser/parser/functions/empty.leo.out | 49 - .../parser/parser/functions/empty2.leo.out | 31 - .../parser/functions/param_array.leo.out | 64 - .../parser/functions/param_circuit.leo.out | 62 - .../parser/functions/param_tuple.leo.out | 64 - .../parser/parser/functions/params.leo.out | 75 - .../parser/functions/params_return.leo.out | 76 - .../parser/parser/functions/return.leo.out | 50 - .../parser/functions/return_tuple.leo.out | 52 - .../parser/parser/import/alias.leo.out | 38 - .../parser/parser/import/basic.leo.out | 38 - .../import/import_empty_list_fail.leo.out | 5 - .../parser/parser/import/many_import.leo.out | 136 -- .../parser/import/many_import_star.leo.out | 170 -- .../parser/parser/import/names.leo.out | 94 -- .../parser/import/names_underscore.leo.out | 38 - .../parser/parser/import/star.leo.out | 36 - .../parser/parser/statement/assign.leo.out | 411 ----- .../parser/parser/statement/block.leo.out | 141 -- .../parser/statement/conditional.leo.out | 230 --- .../parser/parser/statement/console.leo.out | 207 --- .../parser/statement/definition.leo.out | 1473 ----------------- .../parser/statement/definition_fail.leo.out | 27 - .../parser/statement/expression.leo.out | 94 -- .../parser/parser/statement/iteration.leo.out | 203 --- .../parser/parser/statement/return.leo.out | 110 -- .../parser/statement/return_fail.leo.out | 7 - 384 files changed, 1063 insertions(+), 26328 deletions(-) create mode 100644 tests/compiler/console/input/dummy.in rename tests/compiler/console/{inputs => input}/input_equal.in (50%) rename tests/compiler/console/{inputs => input}/input_unequal.in (50%) create mode 100644 tests/compiler/definition/input/dummy.in delete mode 100644 tests/compiler/import/names_a_dash.leo create mode 100644 tests/compiler/import/names_a_dash_fail.leo delete mode 100644 tests/compiler/import/names_dash_a.leo create mode 100644 tests/compiler/import/names_dash_a_fail.leo delete mode 100644 tests/compiler/import/names_dollar.leo create mode 100644 tests/compiler/import/names_dollar_fail.leo delete mode 100644 tests/compiler/import/names_underscore.leo create mode 100644 tests/compiler/import/names_underscore_fail.leo create mode 100644 tests/compiler/integers/input/dummy.in rename tests/compiler/mutability/{let.leo => let_fail.leo} (100%) create mode 100644 tests/expectations/compiler/compiler/console/log.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/alias.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/basic.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/many_import.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/many_import_star.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/multiple.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/names.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/names_a_dash.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/names_dash_a.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/names_dollar.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/names_underscore.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/star.leo.out delete mode 100644 tests/expectations/compiler/compiler/import/star_fail.leo.out delete mode 100644 tests/expectations/compiler/compiler/integers/i16/pow.leo.out delete mode 100644 tests/expectations/compiler/compiler/integers/i8/pow.leo.out delete mode 100644 tests/expectations/compiler/compiler/integers/u16/pow.leo.out delete mode 100644 tests/expectations/compiler/compiler/integers/u8/pow.leo.out delete mode 100644 tests/expectations/compiler/compiler/mutability/let.leo.out create mode 100644 tests/expectations/compiler/compiler/mutability/let_fail.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/big_self.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/empty.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/field_and_functions.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/fields.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/fields_fail.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/functions.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/mut_self.leo.out delete mode 100644 tests/expectations/parser/parser/circuits/self.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/array_access.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/array_range_access.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/call.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/circuit.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/circuit_static.leo.out delete mode 100644 tests/expectations/parser/parser/expression/access/tuple.leo.out delete mode 100644 tests/expectations/parser/parser/expression/array_init.leo.out delete mode 100644 tests/expectations/parser/parser/expression/array_init_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/array_inline.leo.out delete mode 100644 tests/expectations/parser/parser/expression/array_inline_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/add.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/and.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/div.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/eq.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/exp.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/gt.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/gte.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/lt.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/lte.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/mul.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/ne.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/or.leo.out delete mode 100644 tests/expectations/parser/parser/expression/binary/sub.leo.out delete mode 100644 tests/expectations/parser/parser/expression/cast.leo.out delete mode 100644 tests/expectations/parser/parser/expression/circuit_init.leo.out delete mode 100644 tests/expectations/parser/parser/expression/circuit_init_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/ident.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/address.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/address_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/address_parse.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/bool.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/bool_parse.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/comment.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/formatted_string.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/group.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/group_fail.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out delete mode 100644 tests/expectations/parser/parser/expression/literal/postfix_types.leo.out delete mode 100644 tests/expectations/parser/parser/expression/ternary.leo.out delete mode 100644 tests/expectations/parser/parser/expression/tuple.leo.out delete mode 100644 tests/expectations/parser/parser/expression/unary/negate.leo.out delete mode 100644 tests/expectations/parser/parser/expression/unary/not.leo.out delete mode 100644 tests/expectations/parser/parser/functions/annotated.leo.out delete mode 100644 tests/expectations/parser/parser/functions/annotated_param.leo.out delete mode 100644 tests/expectations/parser/parser/functions/annotated_twice.leo.out delete mode 100644 tests/expectations/parser/parser/functions/const_input_fail.leo.out delete mode 100644 tests/expectations/parser/parser/functions/const_param.leo.out delete mode 100644 tests/expectations/parser/parser/functions/const_self_bad.leo.out delete mode 100644 tests/expectations/parser/parser/functions/empty.leo.out delete mode 100644 tests/expectations/parser/parser/functions/empty2.leo.out delete mode 100644 tests/expectations/parser/parser/functions/param_array.leo.out delete mode 100644 tests/expectations/parser/parser/functions/param_circuit.leo.out delete mode 100644 tests/expectations/parser/parser/functions/param_tuple.leo.out delete mode 100644 tests/expectations/parser/parser/functions/params.leo.out delete mode 100644 tests/expectations/parser/parser/functions/params_return.leo.out delete mode 100644 tests/expectations/parser/parser/functions/return.leo.out delete mode 100644 tests/expectations/parser/parser/functions/return_tuple.leo.out delete mode 100644 tests/expectations/parser/parser/import/alias.leo.out delete mode 100644 tests/expectations/parser/parser/import/basic.leo.out delete mode 100644 tests/expectations/parser/parser/import/import_empty_list_fail.leo.out delete mode 100644 tests/expectations/parser/parser/import/many_import.leo.out delete mode 100644 tests/expectations/parser/parser/import/many_import_star.leo.out delete mode 100644 tests/expectations/parser/parser/import/names.leo.out delete mode 100644 tests/expectations/parser/parser/import/names_underscore.leo.out delete mode 100644 tests/expectations/parser/parser/import/star.leo.out delete mode 100644 tests/expectations/parser/parser/statement/assign.leo.out delete mode 100644 tests/expectations/parser/parser/statement/block.leo.out delete mode 100644 tests/expectations/parser/parser/statement/conditional.leo.out delete mode 100644 tests/expectations/parser/parser/statement/console.leo.out delete mode 100644 tests/expectations/parser/parser/statement/definition.leo.out delete mode 100644 tests/expectations/parser/parser/statement/definition_fail.leo.out delete mode 100644 tests/expectations/parser/parser/statement/expression.leo.out delete mode 100644 tests/expectations/parser/parser/statement/iteration.leo.out delete mode 100644 tests/expectations/parser/parser/statement/return.leo.out delete mode 100644 tests/expectations/parser/parser/statement/return_fail.leo.out diff --git a/compiler/tests/mod.rs b/compiler/tests/mod.rs index e6e454c59e..fc51d0f00a 100644 --- a/compiler/tests/mod.rs +++ b/compiler/tests/mod.rs @@ -18,10 +18,6 @@ #![allow(deprecated)] -// Test framework found in /tests/compiler -#[cfg(test)] -pub mod test; - pub mod canonicalization; pub mod type_inference; diff --git a/compiler/tests/test.rs b/compiler/tests/test.rs index b3de34189d..6241682548 100644 --- a/compiler/tests/test.rs +++ b/compiler/tests/test.rs @@ -43,8 +43,8 @@ fn new_compiler(path: PathBuf) -> EdwardsTestCompiler { EdwardsTestCompiler::new(program_name, path, output_dir, make_test_context(), None) } -pub(crate) fn parse_program(program_string: &str, cwd: PathBuf) -> Result { - let mut compiler = new_compiler(cwd); +pub(crate) fn parse_program(program_string: &str, _cwd: PathBuf) -> Result { + let mut compiler = new_compiler("test/file".into()); compiler.parse_program_from_string(program_string)?; @@ -150,6 +150,13 @@ impl Namespace for CompileNamespace { let mut cs: CircuitSynthesizer = Default::default(); let output = parsed.compile_constraints(&mut cs).map_err(|x| x.to_string())?; let circuit: SummarizedCircuit = SerializedCircuit::from(cs).into(); + + if circuit.num_constraints == 0 { + return Err( + "- Circuit has no constraints, use inputs and registers in program to produce them".to_string(), + ); + } + if let Some(last_circuit) = last_circuit.as_ref() { if last_circuit != &circuit { eprintln!( @@ -157,7 +164,7 @@ impl Namespace for CompileNamespace { serde_yaml::to_string(last_circuit).unwrap(), serde_yaml::to_string(&circuit).unwrap() ); - return Err("circuit changed on different input files".to_string()); + return Err("- Circuit changed on different input files".to_string()); } } else { last_circuit = Some(circuit); diff --git a/tests/compiler/address/equal.leo b/tests/compiler/address/equal.leo index 7c42b01792..35127e4cb9 100644 --- a/tests/compiler/address/equal.leo +++ b/tests/compiler/address/equal.leo @@ -10,4 +10,4 @@ function main(x: address) -> bool { const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8; return x == sender; -} \ No newline at end of file +} diff --git a/tests/compiler/array/input/type_nested_value_nested_3x2.in b/tests/compiler/array/input/type_nested_value_nested_3x2.in index cf532b3dde..3374d1d96b 100644 --- a/tests/compiler/array/input/type_nested_value_nested_3x2.in +++ b/tests/compiler/array/input/type_nested_value_nested_3x2.in @@ -1,5 +1,6 @@ [main] a: [[u8; 2]; 3] = [[0; 2]; 3]; + [registers] x: bool = false; diff --git a/tests/compiler/array/type_nested_value_nested_3x2.leo b/tests/compiler/array/type_nested_value_nested_3x2.leo index dbc2c1e6b4..1334df22d8 100644 --- a/tests/compiler/array/type_nested_value_nested_3x2.leo +++ b/tests/compiler/array/type_nested_value_nested_3x2.leo @@ -4,9 +4,9 @@ expectation: Pass input_file: input/type_nested_value_nested_3x2.in */ -function main() -> bool { - const a = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline +function main(a: [[u8; 2]; 3]) -> bool { + const c = [[0u8, 0u8], [0u8, 0u8], [0u8, 0u8]]; // inline const b: [[u8; 2]; 3] = [[0; 2]; 3]; // initializer - return a == b; + return b == a && a == c; } diff --git a/tests/compiler/console/debug.leo b/tests/compiler/console/debug.leo index 27e44a0df6..4b24b6e5fc 100644 --- a/tests/compiler/console/debug.leo +++ b/tests/compiler/console/debug.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main() { +function main(y: bool) -> bool { console.debug("hello debug"); -} \ No newline at end of file + return y == true; +} diff --git a/tests/compiler/console/error.leo b/tests/compiler/console/error.leo index c654b1070a..a2db2fc013 100644 --- a/tests/compiler/console/error.leo +++ b/tests/compiler/console/error.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main() { +function main(y: bool) -> bool { console.error("hello error"); -} \ No newline at end of file + return y == true; +} diff --git a/tests/compiler/console/input/dummy.in b/tests/compiler/console/input/dummy.in new file mode 100644 index 0000000000..6e43b49ecc --- /dev/null +++ b/tests/compiler/console/input/dummy.in @@ -0,0 +1,6 @@ +[main] +y: bool = true; +n: bool = false; + +[registers] +r0: bool = false; diff --git a/tests/compiler/console/inputs/input_equal.in b/tests/compiler/console/input/input_equal.in similarity index 50% rename from tests/compiler/console/inputs/input_equal.in rename to tests/compiler/console/input/input_equal.in index c147902071..b9f602b338 100644 --- a/tests/compiler/console/inputs/input_equal.in +++ b/tests/compiler/console/input/input_equal.in @@ -1,3 +1,6 @@ [main] a: u32 = 1; b: u32 = 1; + +[registers] +r0: bool = true; diff --git a/tests/compiler/console/inputs/input_unequal.in b/tests/compiler/console/input/input_unequal.in similarity index 50% rename from tests/compiler/console/inputs/input_unequal.in rename to tests/compiler/console/input/input_unequal.in index 37e9e6a578..3320fc7439 100644 --- a/tests/compiler/console/inputs/input_unequal.in +++ b/tests/compiler/console/input/input_unequal.in @@ -1,3 +1,6 @@ [main] a: u32 = 1; b: u32 = 0; + +[registers] +r0: bool = true; diff --git a/tests/compiler/console/log.leo b/tests/compiler/console/log.leo index a190ca4ba9..93b96ca095 100644 --- a/tests/compiler/console/log.leo +++ b/tests/compiler/console/log.leo @@ -1,3 +1,10 @@ -function main() { +/* +namespace: Compile +expectation: Pass +input_file: input/dummy.in +*/ + +function main(y: bool) -> bool { console.log("hello world"); -} \ No newline at end of file + return y == true; +} diff --git a/tests/compiler/console/log_conditional.leo b/tests/compiler/console/log_conditional.leo index 47fdb496c4..df637bc018 100644 --- a/tests/compiler/console/log_conditional.leo +++ b/tests/compiler/console/log_conditional.leo @@ -2,13 +2,15 @@ namespace: Compile expectation: Pass input_file: - - inputs/input_unequal.in - - inputs/input_equal.in + - input/input_unequal.in + - input/input_equal.in */ // Conditionally add two u32 integers and log the result to the console. -function main(a: u32, b: u32) { +function main(a: u32, b: u32) -> bool { if a == b { console.log("{}=={}", a, b); // This line should not fail. } -} \ No newline at end of file + + return a == b; +} diff --git a/tests/compiler/console/log_input.leo b/tests/compiler/console/log_input.leo index 531571f55d..233fd18c47 100644 --- a/tests/compiler/console/log_input.leo +++ b/tests/compiler/console/log_input.leo @@ -1,12 +1,10 @@ /* namespace: Compile expectation: Pass -inputs: - - log.in: | - [main] - a: bool = true; +input_file: input/dummy.in */ -function main(a: bool) { - console.log("a = {}", a); -} \ No newline at end of file +function main(y: bool) -> bool { + console.log("a = {}", y); + return y == true; +} diff --git a/tests/compiler/console/log_parameter.leo b/tests/compiler/console/log_parameter.leo index a601800592..6dffd420d1 100644 --- a/tests/compiler/console/log_parameter.leo +++ b/tests/compiler/console/log_parameter.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main() { +function main(y: bool) -> bool { console.log("{}", 1u32); -} \ No newline at end of file + return y == true; +} diff --git a/tests/compiler/console/log_parameter_many.leo b/tests/compiler/console/log_parameter_many.leo index 87e5cf42c7..c83bc92cda 100644 --- a/tests/compiler/console/log_parameter_many.leo +++ b/tests/compiler/console/log_parameter_many.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function main() { +function main(y: bool) -> bool { console.log("{} {}", 1u32, true); -} \ No newline at end of file + return y == true; +} diff --git a/tests/compiler/core/unstable_blake2s.leo b/tests/compiler/core/unstable_blake2s.leo index 5dffb6a34b..1229f457c4 100644 --- a/tests/compiler/core/unstable_blake2s.leo +++ b/tests/compiler/core/unstable_blake2s.leo @@ -3,7 +3,7 @@ namespace: Compile expectation: Pass inputs: - blake.in: | - [constants] + [main] message: [u8; 32] = [0; 32]; [registers] @@ -12,9 +12,9 @@ inputs: import core.unstable.blake2s.Blake2s; -function main(const message: [u8; 32]) -> [u8; 32] { +function main(message: [u8; 32]) -> [u8; 32] { const seed: [u8; 32] = [1; 32]; - const result = Blake2s::hash(seed, message); + let result = Blake2s::hash(seed, message); console.log("Result: {}", result); diff --git a/tests/compiler/definition/input/dummy.in b/tests/compiler/definition/input/dummy.in new file mode 100644 index 0000000000..c962c1fd35 --- /dev/null +++ b/tests/compiler/definition/input/dummy.in @@ -0,0 +1,5 @@ +[main] +y: bool = true; + +[registers] +r0: bool = true; diff --git a/tests/compiler/definition/out_of_order.leo b/tests/compiler/definition/out_of_order.leo index 84886a6023..047b5a2238 100644 --- a/tests/compiler/definition/out_of_order.leo +++ b/tests/compiler/definition/out_of_order.leo @@ -1,11 +1,14 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ @test function fake_test() {} -function main() {} +function main(y: bool) -> bool { + return y == true; +} -circuit Foo {} \ No newline at end of file +circuit Foo {} diff --git a/tests/compiler/definition/out_of_order_with_import.leo b/tests/compiler/definition/out_of_order_with_import.leo index 384e6b701c..4af7ca1b8a 100644 --- a/tests/compiler/definition/out_of_order_with_import.leo +++ b/tests/compiler/definition/out_of_order_with_import.leo @@ -1,14 +1,17 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ @test function fake_test() {} -function main() {} +function main(y: bool) -> bool { + return y == true; +} // use core import to test import order import core.unstable.blake2s.Blake2s; -circuit Foo {} \ No newline at end of file +circuit Foo {} diff --git a/tests/compiler/function/array_input.leo b/tests/compiler/function/array_input.leo index 6e3a1f18ad..1f6f35b01b 100644 --- a/tests/compiler/function/array_input.leo +++ b/tests/compiler/function/array_input.leo @@ -1,11 +1,13 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ function foo(a: [u8; 1]) {} -function main() { +function main(y: bool) -> bool { const a: [u8; 1] = [1; 1]; foo(a); + return y == true; } diff --git a/tests/compiler/function/array_params_direct_call.leo b/tests/compiler/function/array_params_direct_call.leo index 094f0a852e..7cf090e2ff 100644 --- a/tests/compiler/function/array_params_direct_call.leo +++ b/tests/compiler/function/array_params_direct_call.leo @@ -1,14 +1,17 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ function do_nothing(arr: [u32; 2]) {} -function main() { +function main(y: bool) -> bool { const arr: [u32; 2] = [0; 2]; do_nothing(arr); do_nothing([...arr]); do_nothing(arr[0u32..]); + + return y == true; } diff --git a/tests/compiler/function/empty.leo b/tests/compiler/function/empty.leo index 3608a8ebed..f101d15fcc 100644 --- a/tests/compiler/function/empty.leo +++ b/tests/compiler/function/empty.leo @@ -1,10 +1,12 @@ /* namespace: Compile expectation: Pass +input_file: input/dummy.in */ -function empty() { } +function empty() {} -function main() { +function main(y: bool) -> bool { empty(); + return y == true; } diff --git a/tests/compiler/function/input/dummy.in b/tests/compiler/function/input/dummy.in index cfe617343a..af4d5f0da3 100644 --- a/tests/compiler/function/input/dummy.in +++ b/tests/compiler/function/input/dummy.in @@ -1,6 +1,7 @@ [main] a: u32 = 10; b: u32 = 100; +y: bool = true; [registers] r0: bool = true; diff --git a/tests/compiler/function/iteration.leo b/tests/compiler/function/iteration.leo index 58c199e263..109cbb9b45 100644 --- a/tests/compiler/function/iteration.leo +++ b/tests/compiler/function/iteration.leo @@ -8,12 +8,12 @@ function one() -> u32 { return 1u32; } -function main() -> bool { +function main(y: bool) -> bool { let a = 0u32; for i in 0..10 { a += one(); } - return a == 10u32; + return a == 10u32 == y; } diff --git a/tests/compiler/function/iteration_repeated.leo b/tests/compiler/function/iteration_repeated.leo index 30b70bf214..9bff4980b0 100644 --- a/tests/compiler/function/iteration_repeated.leo +++ b/tests/compiler/function/iteration_repeated.leo @@ -14,8 +14,8 @@ function iteration() -> u32 { return a; } -function main() -> bool { +function main(y: bool) -> bool { const total = iteration() + iteration(); - return total == 20; + return total == 20 == y; } diff --git a/tests/compiler/function/multiple_returns.leo b/tests/compiler/function/multiple_returns.leo index 5ec2b2ab48..6ea5112459 100644 --- a/tests/compiler/function/multiple_returns.leo +++ b/tests/compiler/function/multiple_returns.leo @@ -8,8 +8,8 @@ function tuple() -> (bool, bool) { return (true, false); } -function main() -> bool { +function main(y: bool) -> bool { const (a, b) = tuple(); - return a == true && b == false; + return a == true && b == false && y == true; } diff --git a/tests/compiler/function/repeated.leo b/tests/compiler/function/repeated.leo index 71b8cdfa6e..1834ac04f3 100644 --- a/tests/compiler/function/repeated.leo +++ b/tests/compiler/function/repeated.leo @@ -8,8 +8,8 @@ function one() -> bool { return true; } -function main() -> bool { +function main(y: bool) -> bool { const a = one() && one(); - return a == true; + return a == true == y; } diff --git a/tests/compiler/function/return.leo b/tests/compiler/function/return.leo index 4ebe7e3169..2dd1966020 100644 --- a/tests/compiler/function/return.leo +++ b/tests/compiler/function/return.leo @@ -8,6 +8,6 @@ function one() -> u32 { return 1u32; } -function main() -> bool { - return one() == 1u32; +function main(y: bool) -> bool { + return one() == 1u32 == y; } diff --git a/tests/compiler/function/return_array_nested_pass.leo b/tests/compiler/function/return_array_nested_pass.leo index 3427f1ea66..fa373586b1 100644 --- a/tests/compiler/function/return_array_nested_pass.leo +++ b/tests/compiler/function/return_array_nested_pass.leo @@ -12,7 +12,8 @@ function array_3x2_tuple() -> [[u8; 2]; 3] { return [0u8; (3, 2)]; } -function main() { +function main(y: bool) -> bool { const a = array_3x2_nested(); const b = array_3x2_tuple(); + return y == true; } diff --git a/tests/compiler/function/return_array_tuple_pass.leo b/tests/compiler/function/return_array_tuple_pass.leo index 1766eac82c..0ff56abe29 100644 --- a/tests/compiler/function/return_array_tuple_pass.leo +++ b/tests/compiler/function/return_array_tuple_pass.leo @@ -12,7 +12,8 @@ function array_3x2_tuple() -> [u8; (3, 2)] { return [0u8; (3, 2)]; } -function main() { +function main(y: bool) -> bool { const a = array_3x2_nested(); const b = array_3x2_tuple(); + return y == true; } diff --git a/tests/compiler/function/return_tuple.leo b/tests/compiler/function/return_tuple.leo index c01ae681cf..f36a41997a 100644 --- a/tests/compiler/function/return_tuple.leo +++ b/tests/compiler/function/return_tuple.leo @@ -3,6 +3,9 @@ namespace: Compile expectation: Pass inputs: - tuple.in: | + [main] + a: u32 = 100; + [registers] r0: (u8, u8) = (0, 0); r1: u32 = 100; @@ -16,6 +19,7 @@ function tuples() -> ((u8, u8), u32) { return (a, b); } -function main() { - const t = tuples(); +function main(a: u32) -> ((u8, u8), u32) { + const (t1, b) = tuples(); + return (t1, a + b); } diff --git a/tests/compiler/function/return_tuple_conditional.leo b/tests/compiler/function/return_tuple_conditional.leo index 1e0d78269b..55cc2b14cb 100644 --- a/tests/compiler/function/return_tuple_conditional.leo +++ b/tests/compiler/function/return_tuple_conditional.leo @@ -16,6 +16,8 @@ function tuple_conditional () -> ( } } -function main() -> (u32, u32) { - return tuple_conditional(); +function main(a: u32, b: u32) -> (u32, u32) { + let (a1, b1) = tuple_conditional(); + + return (a + a1, b + b1); } diff --git a/tests/compiler/function/value_unchanged.leo b/tests/compiler/function/value_unchanged.leo index 0dc81e52a5..287ddf1f52 100644 --- a/tests/compiler/function/value_unchanged.leo +++ b/tests/compiler/function/value_unchanged.leo @@ -17,9 +17,9 @@ function bad_mutate(x: u32) { x = 0; // <- does not change `a` } -function main() -> bool { +function main(y: bool) -> bool { const a = 1u32; bad_mutate(a); - return a == 1u32; // <- value `a` is still `1u32` + return a == 1u32 == y; // <- value `a` is still `1u32` } diff --git a/tests/compiler/import/alias.leo b/tests/compiler/import/alias.leo index 1b1992b36f..12bb1929a0 100644 --- a/tests/compiler/import/alias.leo +++ b/tests/compiler/import/alias.leo @@ -1,12 +1,10 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: imports -*/ +// namespace: Compile +// expectation: Pass +// input_file: input/dummy.in +// cwd: imports import test-import.foo as bar; -function main() -> bool { - return bar() == 1u32; +function main(y: bool) -> bool { + return bar() == 1u32 == y; } diff --git a/tests/compiler/import/basic.leo b/tests/compiler/import/basic.leo index c1e84ae28e..8961bcf9a9 100644 --- a/tests/compiler/import/basic.leo +++ b/tests/compiler/import/basic.leo @@ -1,12 +1,10 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: imports -*/ +// namespace: Compile +// expectation: Pass +// input_file: input/dummy.in +// cwd: imports import test-import.foo; -function main() -> bool { - return foo() == 1u32; +function main(y: bool) -> bool { + return foo() == 1u32 == true; } diff --git a/tests/compiler/import/input/dummy.in b/tests/compiler/import/input/dummy.in index a663954940..c962c1fd35 100644 --- a/tests/compiler/import/input/dummy.in +++ b/tests/compiler/import/input/dummy.in @@ -1,2 +1,5 @@ +[main] +y: bool = true; + [registers] r0: bool = true; diff --git a/tests/compiler/import/many_import.leo b/tests/compiler/import/many_import.leo index d101b06b97..01c8acfbf4 100644 --- a/tests/compiler/import/many_import.leo +++ b/tests/compiler/import/many_import.leo @@ -1,9 +1,7 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: imports -*/ +// namespace: Compile +// expectation: Pass +// input_file: input/dummy.in +// cwd: imports import test-import.( // local import Point, @@ -18,7 +16,7 @@ import bar.( // imports directory import import car.Car; // imports directory import -function main() -> bool { +function main(y: bool) -> bool { const point = Point { x: 1u32, y: 1u32 }; const foo = foo(); @@ -29,5 +27,5 @@ function main() -> bool { const car = Car { c: 1u32 }; - return car.c == 1u32; + return car.c == 1u32 == y; } diff --git a/tests/compiler/import/many_import_star.leo b/tests/compiler/import/many_import_star.leo index 7df854b06e..9b49a8f9c9 100644 --- a/tests/compiler/import/many_import_star.leo +++ b/tests/compiler/import/many_import_star.leo @@ -1,9 +1,7 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: imports -*/ +// namespace: Compile +// expectation: Pass +// input_file: input/dummy.in +// cwd: imports import test-import.*; // local import @@ -12,7 +10,7 @@ import bar.baz.*; // imports directory import import bar.bat.bat.*; // imports directory import import car.*; // imports directory import -function main() -> bool { +function main(y: bool) -> bool { const point = Point { x: 1u32, y: 1u32 }; const foo = foo(); @@ -22,5 +20,5 @@ function main() -> bool { const car = Car { c: 1u32 }; - return car.c == 1u32; + return car.c == 1u32 == y; } diff --git a/tests/compiler/import/multiple.leo b/tests/compiler/import/multiple.leo index a8445b89ef..aaa6148957 100644 --- a/tests/compiler/import/multiple.leo +++ b/tests/compiler/import/multiple.leo @@ -1,17 +1,15 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: imports -*/ +// namespace: Compile +// expectation: Pass +// input_file: input/dummy.in +// cwd: imports import test-import.( Point, foo ); -function main() -> bool { +function main(y: bool) -> bool { const a = Point { x: 1u32, y: 0u32 }; - return a.x == 1u32; + return a.x == 1u32 == y; } diff --git a/tests/compiler/import/names.leo b/tests/compiler/import/names.leo index c5f2242a55..1ea277e570 100644 --- a/tests/compiler/import/names.leo +++ b/tests/compiler/import/names.leo @@ -1,12 +1,12 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: imports -*/ +// namespace: Compile +// expectation: Pass +// input_file: input/dummy.in +// cwd: imports import a0-f.foo; import a-9.bar; import hello-world.hello; -function main() {} +function main(y: bool) -> bool { + return y == true; +} diff --git a/tests/compiler/import/names_a_dash.leo b/tests/compiler/import/names_a_dash.leo deleted file mode 100644 index 1206c3bdd5..0000000000 --- a/tests/compiler/import/names_a_dash.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -cwd: imports -*/ - -import a-.foo; - -function main() -> bool { - return false; -} diff --git a/tests/compiler/import/names_a_dash_fail.leo b/tests/compiler/import/names_a_dash_fail.leo new file mode 100644 index 0000000000..6b04ecc05c --- /dev/null +++ b/tests/compiler/import/names_a_dash_fail.leo @@ -0,0 +1,10 @@ +// namespace: Compile +// expectation: Fail +// input_file: input/dummy.in +// cwd: imports + +import a-.foo; + +function main() -> bool { + return false; +} diff --git a/tests/compiler/import/names_dash_a.leo b/tests/compiler/import/names_dash_a.leo deleted file mode 100644 index dcc9129fd4..0000000000 --- a/tests/compiler/import/names_dash_a.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -cwd: imports -*/ - -import -a.foo; - -function main() -> bool { - return false; -} diff --git a/tests/compiler/import/names_dash_a_fail.leo b/tests/compiler/import/names_dash_a_fail.leo new file mode 100644 index 0000000000..cb9ca59090 --- /dev/null +++ b/tests/compiler/import/names_dash_a_fail.leo @@ -0,0 +1,10 @@ +// namespace: Compile +// expectation: Fail +// input_file: input/dummy.in +// cwd: imports + +import -a.foo; + +function main() -> bool { + return false; +} diff --git a/tests/compiler/import/names_dollar.leo b/tests/compiler/import/names_dollar.leo deleted file mode 100644 index 24255ce361..0000000000 --- a/tests/compiler/import/names_dollar.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -cwd: imports -*/ - -import money$.foo; - -function main() -> bool { - return false; -} diff --git a/tests/compiler/import/names_dollar_fail.leo b/tests/compiler/import/names_dollar_fail.leo new file mode 100644 index 0000000000..bb24413a0b --- /dev/null +++ b/tests/compiler/import/names_dollar_fail.leo @@ -0,0 +1,10 @@ +// namespace: Compile +// expectation: Fail +// input_file: input/dummy.in +// cwd: imports + +import money$.foo; + +function main() -> bool { + return false; +} diff --git a/tests/compiler/import/names_underscore.leo b/tests/compiler/import/names_underscore.leo deleted file mode 100644 index 85119451e5..0000000000 --- a/tests/compiler/import/names_underscore.leo +++ /dev/null @@ -1,12 +0,0 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -cwd: imports -*/ - -import hello_world.foo; - -function main() -> bool { - return true; -} diff --git a/tests/compiler/import/names_underscore_fail.leo b/tests/compiler/import/names_underscore_fail.leo new file mode 100644 index 0000000000..02a612ec75 --- /dev/null +++ b/tests/compiler/import/names_underscore_fail.leo @@ -0,0 +1,10 @@ +// namespace: Compile +// expectation: Fail +// input_file: input/dummy.in +// cwd: imports + +import hello_world.foo; + +function main() -> bool { + return true; +} diff --git a/tests/compiler/import/star.leo b/tests/compiler/import/star.leo index 02f3ba02fe..82d888e29f 100644 --- a/tests/compiler/import/star.leo +++ b/tests/compiler/import/star.leo @@ -1,14 +1,12 @@ -/* -namespace: Compile -expectation: Pass -input_file: input/dummy.in -cwd: imports -*/ +// namespace: Compile +// expectation: Pass +// input_file: input/dummy.in +// cwd: imports import test-import.*; -function main() -> bool { +function main(y: bool) -> bool { const a = Point { x: 1u32, y: 0u32 }; - return foo() == 1u32; + return foo() == 1u32 == y; } diff --git a/tests/compiler/import/star_fail.leo b/tests/compiler/import/star_fail.leo index 7d500b5d56..746b654eac 100644 --- a/tests/compiler/import/star_fail.leo +++ b/tests/compiler/import/star_fail.leo @@ -1,9 +1,7 @@ -/* -namespace: Compile -expectation: Fail -input_file: input/dummy.in -cwd: imports -*/ +// namespace: Compile +// expectation: Fail +// input_file: input/dummy.in +// cwd: imports // importing `*` from a directory is illegal import bar.bat.*; diff --git a/tests/compiler/input_files/program_input/input/main_field.in b/tests/compiler/input_files/program_input/input/main_field.in index e626fd1b96..789e4de43e 100644 --- a/tests/compiler/input_files/program_input/input/main_field.in +++ b/tests/compiler/input_files/program_input/input/main_field.in @@ -1,3 +1,7 @@ [main] a: field = 1; b: field = -1; +y: bool = true; + +[registers] +r0: bool = false; diff --git a/tests/compiler/input_files/program_input/main_field.leo b/tests/compiler/input_files/program_input/main_field.leo index fbc1a60132..a01bb140d9 100644 --- a/tests/compiler/input_files/program_input/main_field.leo +++ b/tests/compiler/input_files/program_input/main_field.leo @@ -4,8 +4,10 @@ expectation: Pass input_file: input/main_field.in */ -function main(a: field, b: field) { +function main(a: field, b: field, y: bool) -> bool { // Change to assert when == is implemented for field. console.log("a: {}", a); console.log("b: {}", b); + + return y == true; } diff --git a/tests/compiler/input_files/program_input_constants/input/main.in b/tests/compiler/input_files/program_input_constants/input/main.in index ba6c1850b3..3b9dcc2a87 100644 --- a/tests/compiler/input_files/program_input_constants/input/main.in +++ b/tests/compiler/input_files/program_input_constants/input/main.in @@ -1,3 +1,6 @@ +[main] +b: bool = true; + [constants] a: bool = true; diff --git a/tests/compiler/input_files/program_input_constants/input/main_array.in b/tests/compiler/input_files/program_input_constants/input/main_array.in index 0cfd797088..6f7e331085 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_array.in +++ b/tests/compiler/input_files/program_input_constants/input/main_array.in @@ -1,3 +1,6 @@ +[main] +y: bool = true; + [constants] x: [i16; 1] = [0i16; 1]; diff --git a/tests/compiler/input_files/program_input_constants/input/main_field.in b/tests/compiler/input_files/program_input_constants/input/main_field.in index cc7b62e237..5f581d8ee1 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_field.in +++ b/tests/compiler/input_files/program_input_constants/input/main_field.in @@ -1,3 +1,9 @@ +[main] +y: bool = true; + [constants] a: field = 1; b: field = -1; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input_constants/input/main_group.in b/tests/compiler/input_files/program_input_constants/input/main_group.in index 51b14d842a..65922026c4 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_group.in +++ b/tests/compiler/input_files/program_input_constants/input/main_group.in @@ -1,4 +1,10 @@ +[main] +y: bool = true; + [constants] a: group = 1group; b: group = -1group; c: group = (0, -1)group; + +[registers] +r0: bool = true; diff --git a/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in b/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in index 70a12110fd..dc39e2d92c 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in +++ b/tests/compiler/input_files/program_input_constants/input/main_multi_dimension_array.in @@ -1,3 +1,6 @@ +[main] +y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; + [constants] x: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; diff --git a/tests/compiler/input_files/program_input_constants/input/main_multiple.in b/tests/compiler/input_files/program_input_constants/input/main_multiple.in index 70d7afa103..92c9e7b192 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_multiple.in +++ b/tests/compiler/input_files/program_input_constants/input/main_multiple.in @@ -1,3 +1,6 @@ +[main] +y: bool = true; + [constants] a: bool = true; b: bool = false; diff --git a/tests/compiler/input_files/program_input_constants/input/main_tuple.in b/tests/compiler/input_files/program_input_constants/input/main_tuple.in index b6c685dd93..de4cb26a2f 100644 --- a/tests/compiler/input_files/program_input_constants/input/main_tuple.in +++ b/tests/compiler/input_files/program_input_constants/input/main_tuple.in @@ -1,3 +1,6 @@ +[main] +y: bool = true; + [constants] x: (u8, bool, u8) = (10, true, 10); diff --git a/tests/compiler/input_files/program_input_constants/main.leo b/tests/compiler/input_files/program_input_constants/main.leo index c8edc4a9ca..c7df484e15 100644 --- a/tests/compiler/input_files/program_input_constants/main.leo +++ b/tests/compiler/input_files/program_input_constants/main.leo @@ -1,9 +1,9 @@ /* namespace: Compile expectation: Pass -input_file: ../program_input_constants/input/main.in +input_file: input/main.in */ -function main(const a: bool) -> bool { - return a == true; +function main(const a: bool, b: bool) -> bool { + return a == true == b; } diff --git a/tests/compiler/input_files/program_input_constants/main_array.leo b/tests/compiler/input_files/program_input_constants/main_array.leo index 24e6b9bfa9..c9e4ba20d1 100644 --- a/tests/compiler/input_files/program_input_constants/main_array.leo +++ b/tests/compiler/input_files/program_input_constants/main_array.leo @@ -4,7 +4,7 @@ expectation: Pass input_file: input/main_array.in */ -function main(const x: [i16; 1]) -> bool { +function main(const x: [i16; 1], y: bool) -> bool { console.log("{}", x); - return x[0] == 0; + return x[0] == 0 == y; } 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 915ff04e63..c18bf07d9f 100644 --- a/tests/compiler/input_files/program_input_constants/main_field.leo +++ b/tests/compiler/input_files/program_input_constants/main_field.leo @@ -4,8 +4,10 @@ expectation: Pass input_file: input/main_field.in */ -function main(const a: field, const b: field) { +function main(const a: field, const b: field, y: bool) -> bool { // Change to assert when == is implemented for field. console.log("a: {}", a); console.log("b: {}", b); + + return y == true; } 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 a1a4359304..c06d7ff87b 100644 --- a/tests/compiler/input_files/program_input_constants/main_group.leo +++ b/tests/compiler/input_files/program_input_constants/main_group.leo @@ -4,9 +4,11 @@ expectation: Pass input_file: input/main_group.in */ -function main(const a: group, const b: group, const c: group) { +function main(const a: group, const b: group, const c: group, y: bool) -> bool { // Change to assert when == is implemented for group. console.log("a: {}", a); console.log("b: {}", b); console.log("c: {}", c); + + return y == true; } diff --git a/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo b/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo index 0719646360..f13e8da635 100644 --- a/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo +++ b/tests/compiler/input_files/program_input_constants/main_multi_dimension_array.leo @@ -4,11 +4,6 @@ expectation: Pass input_file: input/main_multi_dimension_array.in */ -function main(const x: [i16; (2, 2, 3)]) -> bool { - console.log("x: {}", x); - - const y: [i16; (2, 2, 3)] = [0i16; (2, 2, 3)]; - console.log("y: {}", y); - +function main(const x: [i16; (2, 2, 3)], y: [i16; (2, 2, 3)]) -> bool { return x[0][0][0] == y[0][0][0] && x[1][1][2] == y[1][1][2]; } 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 e84853577e..7f57b8d26c 100644 --- a/tests/compiler/input_files/program_input_constants/main_multiple.leo +++ b/tests/compiler/input_files/program_input_constants/main_multiple.leo @@ -4,6 +4,6 @@ expectation: Pass input_file: input/main_multiple.in */ -function main(const a: bool, const b: bool) -> bool { - return a != b; +function main(const a: bool, const b: bool, y: bool) -> bool { + return a != b == y; } diff --git a/tests/compiler/input_files/program_input_constants/main_tuple.leo b/tests/compiler/input_files/program_input_constants/main_tuple.leo index 1a20e38890..ef0d5e85e7 100644 --- a/tests/compiler/input_files/program_input_constants/main_tuple.leo +++ b/tests/compiler/input_files/program_input_constants/main_tuple.leo @@ -4,6 +4,6 @@ expectation: Pass input_file: input/main_tuple.in */ -function main(const x: (u8, bool, u8)) -> bool { +function main(const x: (u8, bool, u8), y: bool) -> bool { return x.0 == 10 && x.1 == true && x.2 == 10; } diff --git a/tests/compiler/input_files/program_registers/input/array.in b/tests/compiler/input_files/program_registers/input/array.in index a952dda5a6..0d8c059ad8 100644 --- a/tests/compiler/input_files/program_registers/input/array.in +++ b/tests/compiler/input_files/program_registers/input/array.in @@ -1,2 +1,5 @@ +[main] +a: [[u8; 4]; 2] = [[0u64, 0u64, 0u64, 0u64], [0u64, 0u64, 0u64, 0u64]]; + [registers] -r2: [[u8; 4]; 2] = [[0u64, 0u64, 0u64, 0u64], [0u64, 0u64, 0u64, 0u64]]; \ No newline at end of file +r2: [[u8; 4]; 2] = [[0u64, 0u64, 0u64, 0u64], [0u64, 0u64, 0u64, 0u64]]; diff --git a/tests/compiler/input_files/program_registers/input/main.in b/tests/compiler/input_files/program_registers/input/main.in index 1bff5e584f..c026a6e223 100644 --- a/tests/compiler/input_files/program_registers/input/main.in +++ b/tests/compiler/input_files/program_registers/input/main.in @@ -1,4 +1,5 @@ [main] +a: u8 = 100; [registers] -r: u8 = 0u8; \ No newline at end of file +r: u8 = 0u8; diff --git a/tests/compiler/input_files/program_registers/registers_array.leo b/tests/compiler/input_files/program_registers/registers_array.leo index 26c90ab073..520718dbfc 100644 --- a/tests/compiler/input_files/program_registers/registers_array.leo +++ b/tests/compiler/input_files/program_registers/registers_array.leo @@ -4,6 +4,6 @@ expectation: Pass input_file: input/array.in */ -function main () -> [[u8; 4]; 2] { - return [[1u8, 2u8, 3u8, 4u8], [5u8, 6u8, 7u8, 8u8]]; +function main(a: [[u8; 4]; 2]) -> [[u8; 4]; 2] { + return a; } diff --git a/tests/compiler/input_files/program_registers/registers_pass.leo b/tests/compiler/input_files/program_registers/registers_pass.leo index f5afc3337c..2e1bafb304 100644 --- a/tests/compiler/input_files/program_registers/registers_pass.leo +++ b/tests/compiler/input_files/program_registers/registers_pass.leo @@ -4,6 +4,6 @@ expectation: Pass input_file: input/main.in */ -function main() -> u8 { - return 1u8; +function main(a: u8) -> u8 { + return 1u8 + a; } diff --git a/tests/compiler/input_files/program_state/basic.leo b/tests/compiler/input_files/program_state/basic.leo index aeea0b2b3c..a9ee0ed49d 100644 --- a/tests/compiler/input_files/program_state/basic.leo +++ b/tests/compiler/input_files/program_state/basic.leo @@ -5,6 +5,6 @@ state_file: input/basic.state input_file: input/dummy.in */ -function main() -> bool { - return true; +function main(y: bool) -> bool { + return true == y; // hey Yoda } diff --git a/tests/compiler/input_files/program_state/input/dummy.in b/tests/compiler/input_files/program_state/input/dummy.in index 459883ff33..b62f1de0c4 100644 --- a/tests/compiler/input_files/program_state/input/dummy.in +++ b/tests/compiler/input_files/program_state/input/dummy.in @@ -1,2 +1,5 @@ +[main] +y: bool = true; + [registers] r0: bool = false; diff --git a/tests/compiler/integers/i128/max.leo b/tests/compiler/integers/i128/max.leo index ff9c74cf13..451eb7e107 100644 --- a/tests/compiler/integers/i128/max.leo +++ b/tests/compiler/integers/i128/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i128 = 170141183460469231731687303715884105727; + return y == true; } diff --git a/tests/compiler/integers/i128/min.leo b/tests/compiler/integers/i128/min.leo index 23654c3e8f..88ea6b1666 100644 --- a/tests/compiler/integers/i128/min.leo +++ b/tests/compiler/integers/i128/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i128 = -170141183460469231731687303715884105728; + return y == true; } diff --git a/tests/compiler/integers/i128/negate_min.leo b/tests/compiler/integers/i128/negate_min.leo index 115d4ca00f..1997fb3bc8 100644 --- a/tests/compiler/integers/i128/negate_min.leo +++ b/tests/compiler/integers/i128/negate_min.leo @@ -1,9 +1,11 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool{ const a = -128i128; const b = -a; + return b == -a == y; } diff --git a/tests/compiler/integers/i16/max.leo b/tests/compiler/integers/i16/max.leo index d4ad70fe6b..db6e168aea 100644 --- a/tests/compiler/integers/i16/max.leo +++ b/tests/compiler/integers/i16/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i16 = 32767; -} \ No newline at end of file + return y == true; +} diff --git a/tests/compiler/integers/i16/min.leo b/tests/compiler/integers/i16/min.leo index 046a073c1c..e5bad731ca 100644 --- a/tests/compiler/integers/i16/min.leo +++ b/tests/compiler/integers/i16/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i16 = -32768; -} \ No newline at end of file + return y == true; +} diff --git a/tests/compiler/integers/i16/negate_min.leo b/tests/compiler/integers/i16/negate_min.leo index ebefa52864..511535385a 100644 --- a/tests/compiler/integers/i16/negate_min.leo +++ b/tests/compiler/integers/i16/negate_min.leo @@ -1,9 +1,11 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a = -128i16; const b = -a; + return b == -a == y; } diff --git a/tests/compiler/integers/i16/pow.leo b/tests/compiler/integers/i16/pow.leo index eb23bb297c..7ba70d87a1 100644 --- a/tests/compiler/integers/i16/pow.leo +++ b/tests/compiler/integers/i16/pow.leo @@ -1,16 +1,14 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - i16.in: | - [main] - a: i16 = 2; - b: i16 = 2; - c: i16 = 4; +// namespace: Compile +// expectation: Pass +// inputs: +// - i16.in: | +// [main] +// a: i16 = 2; +// b: i16 = 2; +// c: i16 = 4; - [registers] - r0: bool = true; -*/ +// [registers] +// r0: bool = true; function main(a: i16, b: i16, c: i16) -> bool { return a ** b == c; diff --git a/tests/compiler/integers/i32/max.leo b/tests/compiler/integers/i32/max.leo index 0fcc8bf4cb..a0a9b81009 100644 --- a/tests/compiler/integers/i32/max.leo +++ b/tests/compiler/integers/i32/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i32 = 2147483647; + return y == true; } diff --git a/tests/compiler/integers/i32/min.leo b/tests/compiler/integers/i32/min.leo index 714262c52a..a8ba83186c 100644 --- a/tests/compiler/integers/i32/min.leo +++ b/tests/compiler/integers/i32/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i32 = -2147483648; + return y == true; } diff --git a/tests/compiler/integers/i32/negate_min.leo b/tests/compiler/integers/i32/negate_min.leo index 397ba6cebf..c81f0b3d93 100644 --- a/tests/compiler/integers/i32/negate_min.leo +++ b/tests/compiler/integers/i32/negate_min.leo @@ -1,9 +1,11 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool{ const a = -128i32; const b = -a; + return b == -a == y; } diff --git a/tests/compiler/integers/i64/max.leo b/tests/compiler/integers/i64/max.leo index 45187aa446..0b8af8b52a 100644 --- a/tests/compiler/integers/i64/max.leo +++ b/tests/compiler/integers/i64/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i64 = 9223372036854775807; + return y == true; } diff --git a/tests/compiler/integers/i64/min.leo b/tests/compiler/integers/i64/min.leo index 975f2bd897..0cf30d1ebb 100644 --- a/tests/compiler/integers/i64/min.leo +++ b/tests/compiler/integers/i64/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i64 = -9223372036854775808; + return y == true; } diff --git a/tests/compiler/integers/i64/negate_min.leo b/tests/compiler/integers/i64/negate_min.leo index b00ff7b98c..547ede816e 100644 --- a/tests/compiler/integers/i64/negate_min.leo +++ b/tests/compiler/integers/i64/negate_min.leo @@ -1,9 +1,11 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool{ const a = -128i64; const b = -a; + return b == -a == y; } diff --git a/tests/compiler/integers/i8/max.leo b/tests/compiler/integers/i8/max.leo index 7fbe3c9771..58033661fc 100644 --- a/tests/compiler/integers/i8/max.leo +++ b/tests/compiler/integers/i8/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i8 = 127; -} \ No newline at end of file + return y == true; +} diff --git a/tests/compiler/integers/i8/min.leo b/tests/compiler/integers/i8/min.leo index 5c012ffc3a..21c093d355 100644 --- a/tests/compiler/integers/i8/min.leo +++ b/tests/compiler/integers/i8/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: i8 = -128; -} \ No newline at end of file + return y == true; +} diff --git a/tests/compiler/integers/i8/pow.leo b/tests/compiler/integers/i8/pow.leo index b78c650f6a..9487d0aff7 100644 --- a/tests/compiler/integers/i8/pow.leo +++ b/tests/compiler/integers/i8/pow.leo @@ -1,16 +1,14 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - i8.in: | - [main] - a: i8 = 2; - b: i8 = 2; - c: i8 = 4; +// namespace: Compile +// expectation: Pass +// inputs: +// - i8.in: | +// [main] +// a: i8 = 2; +// b: i8 = 2; +// c: i8 = 4; - [registers] - r0: bool = true; -*/ +// [registers] +// r0: bool = true; function main(a: i8, b: i8, c: i8) -> bool { return a ** b == c; diff --git a/tests/compiler/integers/input/dummy.in b/tests/compiler/integers/input/dummy.in new file mode 100644 index 0000000000..c962c1fd35 --- /dev/null +++ b/tests/compiler/integers/input/dummy.in @@ -0,0 +1,5 @@ +[main] +y: bool = true; + +[registers] +r0: bool = true; diff --git a/tests/compiler/integers/u128/max.leo b/tests/compiler/integers/u128/max.leo index 2d09d170c6..722823fe47 100644 --- a/tests/compiler/integers/u128/max.leo +++ b/tests/compiler/integers/u128/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: u128 = 340282366920938463463374607431768211455; + return y == true; } diff --git a/tests/compiler/integers/u128/min.leo b/tests/compiler/integers/u128/min.leo index 3863cbce99..df218a78b7 100644 --- a/tests/compiler/integers/u128/min.leo +++ b/tests/compiler/integers/u128/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool{ const a: u128 = 0; + return y == true; } diff --git a/tests/compiler/integers/u16/max.leo b/tests/compiler/integers/u16/max.leo index b483f758b6..df40f3088e 100644 --- a/tests/compiler/integers/u16/max.leo +++ b/tests/compiler/integers/u16/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: u16 = 65535; + return y == true; } diff --git a/tests/compiler/integers/u16/min.leo b/tests/compiler/integers/u16/min.leo index 0e8946fdec..4a6dea4f6a 100644 --- a/tests/compiler/integers/u16/min.leo +++ b/tests/compiler/integers/u16/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: u16 = 0; + return y == true; } diff --git a/tests/compiler/integers/u16/pow.leo b/tests/compiler/integers/u16/pow.leo index da2f15408c..95ca149755 100644 --- a/tests/compiler/integers/u16/pow.leo +++ b/tests/compiler/integers/u16/pow.leo @@ -1,16 +1,14 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - u16_f.in: | - [main] - a: u16 = 2; - b: u16 = 2; - c: u16 = 4; +// namespace: Compile +// expectation: Pass +// inputs: +// - u16_f.in: | +// [main] +// a: u16 = 2; +// b: u16 = 2; +// c: u16 = 4; - [registers] - r0: bool = true; -*/ +// [registers] +// r0: bool = true; function main(a: u16, b: u16, c: u16) -> bool { return a ** b == c; diff --git a/tests/compiler/integers/u32/max.leo b/tests/compiler/integers/u32/max.leo index 98b9f1df0c..991e0da493 100644 --- a/tests/compiler/integers/u32/max.leo +++ b/tests/compiler/integers/u32/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: u32 = 4294967295; + return y == true; } diff --git a/tests/compiler/integers/u32/min.leo b/tests/compiler/integers/u32/min.leo index 3ef31dda9b..5952dd7fd2 100644 --- a/tests/compiler/integers/u32/min.leo +++ b/tests/compiler/integers/u32/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: u32 = 0; + return y == true; } diff --git a/tests/compiler/integers/u64/max.leo b/tests/compiler/integers/u64/max.leo index f0067949fa..04bedbb635 100644 --- a/tests/compiler/integers/u64/max.leo +++ b/tests/compiler/integers/u64/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: u64 = 18446744073709551615; + return y == true; } diff --git a/tests/compiler/integers/u64/min.leo b/tests/compiler/integers/u64/min.leo index 559cccdb1a..ec7d13bf19 100644 --- a/tests/compiler/integers/u64/min.leo +++ b/tests/compiler/integers/u64/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: u64 = 0; + return y == true; } diff --git a/tests/compiler/integers/u8/max.leo b/tests/compiler/integers/u8/max.leo index 7e1a1822ab..7df85157a6 100644 --- a/tests/compiler/integers/u8/max.leo +++ b/tests/compiler/integers/u8/max.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: u8 = 255; + return y == true; } diff --git a/tests/compiler/integers/u8/min.leo b/tests/compiler/integers/u8/min.leo index c16193901a..ef34b3e3d0 100644 --- a/tests/compiler/integers/u8/min.leo +++ b/tests/compiler/integers/u8/min.leo @@ -1,8 +1,10 @@ /* namespace: Compile expectation: Pass +input_file: ../input/dummy.in */ -function main() { +function main(y: bool) -> bool { const a: u8 = 0; + return y == true; } diff --git a/tests/compiler/integers/u8/pow.leo b/tests/compiler/integers/u8/pow.leo index 5651d25e1f..2c59776540 100644 --- a/tests/compiler/integers/u8/pow.leo +++ b/tests/compiler/integers/u8/pow.leo @@ -1,16 +1,14 @@ -/* -namespace: Compile -expectation: Pass -inputs: - - u8_f.in: | - [main] - a: u8 = 2; - b: u8 = 2; - c: u8 = 4; +// namespace: Compile +// expectation: Pass +// inputs: +// - u8_f.in: | +// [main] +// a: u8 = 2; +// b: u8 = 2; +// c: u8 = 4; - [registers] - r0: bool = true; -*/ +// [registers] +// r0: bool = true; function main(a: u8, b: u8, c: u8) -> bool { return a ** b == c; diff --git a/tests/compiler/mutability/array_mut.leo b/tests/compiler/mutability/array_mut.leo index 63213303de..fb69d10acc 100644 --- a/tests/compiler/mutability/array_mut.leo +++ b/tests/compiler/mutability/array_mut.leo @@ -4,9 +4,9 @@ expectation: Pass input_file: input/dummy.in */ -function main() -> bool { +function main(y: bool) -> bool { let a = [1u32]; a[0] = 0; - return a[0] == 0u32; + return a[0] == 0u32 == y; } diff --git a/tests/compiler/mutability/array_splice_mut.leo b/tests/compiler/mutability/array_splice_mut.leo index 5c3be4d5b9..3de1585cd7 100644 --- a/tests/compiler/mutability/array_splice_mut.leo +++ b/tests/compiler/mutability/array_splice_mut.leo @@ -4,11 +4,12 @@ expectation: Pass input_file: input/dummy.in */ -function main() -> bool { +function main(y: bool) -> bool { let a = [1u32, 2u32, 3u32]; a[0u32..2u32] = [4u32, 5u32]; return a[0] == 4u32 && a[1] == 5u32 - && a[2] == 3u32; + && a[2] == 3u32 + && y == true; } diff --git a/tests/compiler/mutability/array_tuple_mut.leo b/tests/compiler/mutability/array_tuple_mut.leo index 7b3c57da0f..07d8b5db79 100644 --- a/tests/compiler/mutability/array_tuple_mut.leo +++ b/tests/compiler/mutability/array_tuple_mut.leo @@ -4,10 +4,11 @@ expectation: Pass input_file: input/dummy.in */ -function main() -> bool { +function main(y: bool) -> bool { let a = [(1u32, 2u32)]; a[0u32].1 = 3u32; return a[0u32].0 == 1u32 - && a[0u32].1 == 3u32; + && a[0u32].1 == 3u32 + && y == true; } diff --git a/tests/compiler/mutability/circuit_function_mut.leo b/tests/compiler/mutability/circuit_function_mut.leo index 0d734ad54d..466d44fb7f 100644 --- a/tests/compiler/mutability/circuit_function_mut.leo +++ b/tests/compiler/mutability/circuit_function_mut.leo @@ -13,10 +13,10 @@ circuit Foo { } -function main() -> bool { +function main(y: bool) -> bool { let a = Foo { x: 1 }; a.foo(); - return a.x == 10u32; + return a.x == 10u32 == y; } diff --git a/tests/compiler/mutability/circuit_variable_mut.leo b/tests/compiler/mutability/circuit_variable_mut.leo index f7428e5473..1933bd4746 100644 --- a/tests/compiler/mutability/circuit_variable_mut.leo +++ b/tests/compiler/mutability/circuit_variable_mut.leo @@ -9,9 +9,9 @@ circuit Foo { } // Using let makes a circuit variable mutable. -function main() -> bool{ +function main(y: bool) -> bool{ let a = Foo { x: 1 }; a.x = 0; - return a.x == 0u32; + return a.x == 0u32 == y; } diff --git a/tests/compiler/mutability/cond_mut.leo b/tests/compiler/mutability/cond_mut.leo index 7ffe7a0b3d..5626cafccc 100644 --- a/tests/compiler/mutability/cond_mut.leo +++ b/tests/compiler/mutability/cond_mut.leo @@ -4,12 +4,12 @@ expectation: Pass input_file: input/dummy.in */ -function main() -> bool { +function main(y: bool) -> bool { let x = 100i8; if false { x = 1i8; x *= 100i8; } - return x == 100i8; + return x == 100i8 == y; } diff --git a/tests/compiler/mutability/input/dummy.in b/tests/compiler/mutability/input/dummy.in index dee8d1949b..7cbf636d04 100644 --- a/tests/compiler/mutability/input/dummy.in +++ b/tests/compiler/mutability/input/dummy.in @@ -1,5 +1,6 @@ [main] a: bool = true; +y: bool = true; arr: [u32; 2] = [10, 8]; [constants] diff --git a/tests/compiler/mutability/let.leo b/tests/compiler/mutability/let_fail.leo similarity index 100% rename from tests/compiler/mutability/let.leo rename to tests/compiler/mutability/let_fail.leo diff --git a/tests/compiler/mutability/let_mut.leo b/tests/compiler/mutability/let_mut.leo index da47ae2add..804ca80f71 100644 --- a/tests/compiler/mutability/let_mut.leo +++ b/tests/compiler/mutability/let_mut.leo @@ -5,9 +5,9 @@ input_file: input/dummy.in */ // Adding the `mut` keyword makes a variable mutable. -function main() -> bool { +function main(y: bool) -> bool { let a = 1u32; a = 0; - return a == 0u32; + return a == 0u32 == y; } diff --git a/tests/compiler/mutability/let_mut_nested.leo b/tests/compiler/mutability/let_mut_nested.leo index 34def73c71..d73c3b4505 100644 --- a/tests/compiler/mutability/let_mut_nested.leo +++ b/tests/compiler/mutability/let_mut_nested.leo @@ -4,9 +4,9 @@ expectation: Pass input_file: input/dummy.in */ -function main() -> bool { +function main(a: bool) -> bool { let x = 2u8; let y = x; let z = y / 2u8; - return z == 1; + return z == 1 == a; } diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out index fe2d945a7a..62651905cd 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/input_nested_3x2_fail.leo:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" + - " --> test/file:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out index 6d1808725c..13455beddd 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/multi_fail_initializer.leo:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" + - " --> test/file:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out index 6229b578b6..59479fbd5b 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/multi_fail_inline.leo:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" + - " --> test/file:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out index f35aaaa775..d753a57246 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/multi_initializer_fail.leo:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" + - " --> test/file:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out index aea15af86c..09ea6b2cb4 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/nested_3x2_value_fail.leo:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> test/file:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out index aa9292ed1b..50c19711f2 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/tuple_3x2_value_fail.leo:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> test/file:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_fail.leo.out b/tests/expectations/compiler/compiler/array/type_fail.leo.out index 6ee0b01923..201f0f1c5d 100644 --- a/tests/expectations/compiler/compiler/array/type_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_fail.leo:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n = expected '(' -- got '-'" + - " --> test/file:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n = expected '(' -- got '-'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out index a9bc438951..30938ca027 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 143 + num_constraints: 143 + at: f09e0b896fb2cb30fe4bbcf791b4695de26287361de6def1e75e861643d12714 + bt: f97a8f270a0603d5674319afa5e572f5f146f02a36f9387f860a6cf1f8a786cc + ct: 88cc1bad895de526a15b231e1fe8065848e8008bda5e2662f7c9eec9a976ff98 output: - input_file: input/type_nested_value_nested_3x2.in output: diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out index 9b1d6a23cb..c203bdb6f8 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_nested_value_nested_3x2_fail.leo:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> test/file:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out index 29e7dd7ae5..737fe18a70 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_nested_value_nested_4x3x2_fail.leo:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - " --> test/file:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out index ed105638c8..76bf58d9ba 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_nested_value_tuple_3x2_fail.leo:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> test/file:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out index c9a3bd14b5..e9c08c0cf7 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_nested_value_tuple_4x3x2_fail.leo:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - " --> test/file:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out index 5de8770b54..e40f08a0ac 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_tuple_value_nested_3x2_fail.leo:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" + - " --> test/file:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out index 5fb050dcf9..a214963012 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_tuple_value_nested_4x3x2_fail.leo:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - " --> test/file:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out index 41ce984735..369953df87 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_tuple_value_tuple_3x2_fail.leo:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" + - " --> test/file:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out index 9d6bf75f48..1e7ab329ff 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - " --> test/file:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out index 45a24a23ce..b288d3b6de 100644 --- a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/array/variable_slice_fail.leo:6:19\n |\n 6 | const x = a[i..10];\n | ^^^^^^^^\n |\n = array size cannot be inferred, add explicit types" + - " --> test/file:6:19\n |\n 6 | const x = a[i..10];\n | ^^^^^^^^\n |\n = array size cannot be inferred, add explicit types" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out index 63d864e31b..180fc219b5 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/const_self_variable_fail.leo:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" + - " --> test/file:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out index 27c244a96d..8b4961d680 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/inline_fail.leo:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" + - " --> test/file:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out index 300919265d..b70828838a 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/inline_member_fail.leo:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" + - " --> test/file:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out index 46d645b4dc..a9e640ebcc 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/inline_undefined.leo:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n = failed to resolve circuit: 'Foo'" + - " --> test/file:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n = failed to resolve circuit: 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out index eed8ae4a23..f11da89e07 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_function_fail.leo:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" + - " --> test/file:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out index ed5910ffed..e1babd1b4c 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_function_invalid.leo:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n = cannot call static function 'echo' of circuit 'Foo' from target" + - " --> test/file:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n = cannot call static function 'echo' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out index 0415f67d1e..cab6c02ed7 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_static_function_invalid.leo:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n = failed to resolve variable reference 'Foo'" + - " --> test/file:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n = failed to resolve variable reference 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out index 6c9c9e3e36..0db69080dc 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_static_function_undefined.leo:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" + - " --> test/file:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out index 2784191a0d..ea88b55d01 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/member_variable_fail.leo:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n = illegal reference to non-existant member 'y' of circuit 'Foo'" + - " --> test/file:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n = illegal reference to non-existant member 'y' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out index b5694b4b6f..8d0d322c36 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_function_fail.leo:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - " --> test/file:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out index 40c666fed8..6d7af119e7 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_self_function_fail.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - " --> test/file:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out index d1c5d10f1f..6d7af119e7 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_self_static_function_fail.leo:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - " --> test/file:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out index a967b4092c..180fc219b5 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_self_variable_fail.leo:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" + - " --> test/file:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out index 7b87b25cee..b2d36b7225 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_static_function_fail.leo:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n = extra circuit member 'a' for initialization of circuit 'Foo' is not allowed" + - " --> test/file:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n = extra circuit member 'a' for initialization of circuit 'Foo' is not allowed" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out index 569df3cb4f..2a04967ceb 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/mut_variable_fail.leo:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'f'" + - " --> test/file:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'f'" diff --git a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out index 7ca06d2781..e9dc639a11 100644 --- a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/self_circuit.leo:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n = expected 'ident', got 'static'" + - " --> test/file:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n = expected 'ident', got 'static'" diff --git a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out index 08b7aa351a..6fd9390bc0 100644 --- a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/self_fail.leo:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n = failed to resolve circuit: 'Self'" + - " --> test/file:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n = failed to resolve circuit: 'Self'" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out index f458e20c63..a6073f1a43 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/self_member_invalid.leo:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" + - " --> test/file:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out index 99a718bd97..113dc831f6 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/circuits/self_member_undefined.leo:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" + - " --> test/file:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/console/debug.leo.out b/tests/expectations/compiler/compiler/console/debug.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/console/debug.leo.out +++ b/tests/expectations/compiler/compiler/console/debug.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/console/error.leo.out b/tests/expectations/compiler/compiler/console/error.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/console/error.leo.out +++ b/tests/expectations/compiler/compiler/console/error.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" 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..b9b6741851 --- /dev/null +++ b/tests/expectations/compiler/compiler/console/log.leo.out @@ -0,0 +1,18 @@ +--- +namespace: Compile +expectation: Pass +outputs: + - circuit: + num_public_variables: 0 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 + output: + - input_file: input/dummy.in + output: + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/console/log_conditional.leo.out b/tests/expectations/compiler/compiler/console/log_conditional.leo.out index 4097972d60..4a6cdd7ae3 100644 --- a/tests/expectations/compiler/compiler/console/log_conditional.leo.out +++ b/tests/expectations/compiler/compiler/console/log_conditional.leo.out @@ -4,15 +4,21 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 127 - num_constraints: 127 - at: e0e639bf48906da80759e2f98e3205a68a63ae175dcd7c198fe3bf6b1650a84e - bt: 6b92443726163ac0fc32f7c9edace0ec8369e793d24105d93d121cb0bd5c3128 - ct: 7cb2d3f0ccfb9a2e747c6a05bdb52812c4539c836ff62c4e555fac13ef2084d4 + num_private_variables: 190 + num_constraints: 190 + at: 50e55296085087c5ca1fd3d7c3894d10dd4bad60b83c4a7984e8dbf77126e92b + bt: fbf306d0d13bf3d40926ad7adc07f122cb8d065e7e5d55f3416ac30d7ebe7a7c + ct: 97e2acff1b76912c52107342393ec04a09af81353a25f7ce330b8492f41381cf output: - - input_file: inputs/input_unequal.in + - input_file: input/input_unequal.in output: - registers: {} - - input_file: inputs/input_equal.in + registers: + r0: + type: bool + value: "false" + - input_file: input/input_equal.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/console/log_fail.leo.out b/tests/expectations/compiler/compiler/console/log_fail.leo.out index 82295806a3..27abccddf1 100644 --- a/tests/expectations/compiler/compiler/console/log_fail.leo.out +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/console/log_fail.leo:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n = expected 'formatted string', got 'hello'" + - " --> test/file:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n = expected 'formatted string', got 'hello'" diff --git a/tests/expectations/compiler/compiler/console/log_input.leo.out b/tests/expectations/compiler/compiler/console/log_input.leo.out index ec335aa9df..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/console/log_input.leo.out +++ b/tests/expectations/compiler/compiler/console/log_input.leo.out @@ -10,6 +10,9 @@ outputs: bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: log.in + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/console/log_parameter.leo.out b/tests/expectations/compiler/compiler/console/log_parameter.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out index 1080f67054..bd9261ac7b 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/console/log_parameter_fail_empty.leo:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n = function call expected 2 arguments, got 1" + - " --> test/file:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n = function call expected 2 arguments, got 1" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out index a460352a8c..c1c12c5323 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/console/log_parameter_fail_none.leo:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n = function call expected 1 arguments, got 2" + - " --> test/file:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n = function call expected 1 arguments, got 2" 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 index 2c4f7e4e2b..349607b9a3 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/console/log_parameter_fail_unknown.leo:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n = failed to resolve variable reference 'a'" + - " --> test/file:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n = failed to resolve variable reference 'a'" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_many.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/core/blake2s.leo.out b/tests/expectations/compiler/compiler/core/blake2s.leo.out index 89d8334bd2..3eafe6bbea 100644 --- a/tests/expectations/compiler/compiler/core/blake2s.leo.out +++ b/tests/expectations/compiler/compiler/core/blake2s.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/core/blake2s.leo:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" + - " --> test/file:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out index 1bb7a5998f..3eafe6bbea 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/core/core_circuit_invalid.leo:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" + - " --> test/file:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" diff --git a/tests/expectations/compiler/compiler/core/unstable_blake2s.leo.out b/tests/expectations/compiler/compiler/core/unstable_blake2s.leo.out index f74c2b44f3..32b64e0840 100644 --- a/tests/expectations/compiler/compiler/core/unstable_blake2s.leo.out +++ b/tests/expectations/compiler/compiler/core/unstable_blake2s.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 20168 + num_constraints: 20472 + at: 43b5f7bd5efbf13ae0684e3c506e5e28866ce7a29f5d6b1442925913bb07a73b + bt: 4d435c1eac471fb7b40b0d83503e2aa13f49db68fc71d64be84ddc9cb053a15d + ct: 081e529f5d26cb4cea2d8288ad454a8d0b381f2fb81e0bd21b47d4186777504f output: - input_file: blake.in output: diff --git a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out +++ b/tests/expectations/compiler/compiler/definition/out_of_order_with_import.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/array_input.leo.out b/tests/expectations/compiler/compiler/function/array_input.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/array_input.leo.out +++ b/tests/expectations/compiler/compiler/function/array_input.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out +++ b/tests/expectations/compiler/compiler/function/array_params_direct_call.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index 573dc19d2d..ec527423b3 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/duplicate_definition_fail.leo:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" + - " --> test/file:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" diff --git a/tests/expectations/compiler/compiler/function/empty.leo.out b/tests/expectations/compiler/compiler/function/empty.leo.out index 2a650384ef..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/empty.leo.out +++ b/tests/expectations/compiler/compiler/function/empty.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/iteration.leo.out b/tests/expectations/compiler/compiler/function/iteration.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/iteration.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/iteration_repeated.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out index 964b2da6c9..68a7957a5e 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/multiple_returns_fail.leo:4:5\n |\n 4 | if true {\n 5 | ...\n 6 | }\n | ^\n |\n = function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'" + - " --> test/file:4:5\n |\n 4 | if true {\n 5 | ...\n 6 | }\n | ^\n |\n = function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out index 95bf77625e..e175c09bfd 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/multiple_returns_fail_conditional.leo:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n 6 | \n 7 | \n 8 | \n 9 | \n 10 | \n | ^\n |\n = function 'main' missing return for all paths" + - " --> test/file:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n 6 | \n 7 | \n 8 | \n 9 | \n 10 | \n | ^\n |\n = function 'main' missing return for all paths" diff --git a/tests/expectations/compiler/compiler/function/repeated.leo.out b/tests/expectations/compiler/compiler/function/repeated.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/repeated.leo.out +++ b/tests/expectations/compiler/compiler/function/repeated.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/function/return.leo.out b/tests/expectations/compiler/compiler/function/return.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/return.leo.out +++ b/tests/expectations/compiler/compiler/function/return.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out index 8678e0d18d..5841e00d3a 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/return_array_nested_fail.leo:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> test/file:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out index 69627ac35b..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_pass.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out index 84cf26c329..15df66d216 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/return_array_tuple_fail.leo:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> test/file:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out index 69627ac35b..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_pass.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/function/return_tuple.leo.out b/tests/expectations/compiler/compiler/function/return_tuple.leo.out index 7cd74b162a..14ac5cbb7c 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple.leo.out @@ -4,12 +4,18 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 65 + num_constraints: 66 + at: 0c8cb242ee3815f5ea6fdd08873577a6cc51fcfbda8cb5671f0b4dc851939d07 + bt: 32bbce55a7ed95a5b0277ef5ddfa171ad065c5c7c743031d8b0bd8e50e51b0af + ct: 1390f763c4329cb5c51853b83d8d5d6e92d8ea8fed8fc7299285908d14c9d3b4 output: - input_file: tuple.in output: - registers: {} + registers: + r0: + type: "(u8, u8)" + value: "(1, 2)" + r1: + type: u32 + value: "103" diff --git a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out index 040996f183..1e514933cf 100644 --- a/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/return_tuple_conditional.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 130 + num_constraints: 132 + at: 7836d2e1325fb4703563ba9378382f72310a39dff412635938abf6aa59e3e316 + bt: ba2c8bf85cf2734ed977cbe9aa29422a1e6f91a3ac9384a66de46152c5a0dae9 + ct: d3a10973b5ff8e5b494994d909dc9de72e93f8a9d2de5fd5fca1cd3a4a9e1e77 output: - input_file: input/integers.in output: diff --git a/tests/expectations/compiler/compiler/function/scope_fail.leo.out b/tests/expectations/compiler/compiler/function/scope_fail.leo.out index dbaeebd081..82b7a1feb4 100644 --- a/tests/expectations/compiler/compiler/function/scope_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/scope_fail.leo:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n = failed to resolve variable reference 'myGlobal'" + - " --> test/file:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n = failed to resolve variable reference 'myGlobal'" diff --git a/tests/expectations/compiler/compiler/function/undefined.leo.out b/tests/expectations/compiler/compiler/function/undefined.leo.out index 80339fd63c..5f7d648491 100644 --- a/tests/expectations/compiler/compiler/function/undefined.leo.out +++ b/tests/expectations/compiler/compiler/function/undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/function/undefined.leo:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n = failed to resolve function: 'my_function'" + - " --> test/file:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n = failed to resolve function: 'my_function'" diff --git a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/function/value_unchanged.leo.out +++ b/tests/expectations/compiler/compiler/function/value_unchanged.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out index 9358a50c76..8b0bbbbef6 100644 --- a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/global_consts/modify_global_const.leo:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'basic'" + - " --> test/file:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'basic'" diff --git a/tests/expectations/compiler/compiler/import/alias.leo.out b/tests/expectations/compiler/compiler/import/alias.leo.out deleted file mode 100644 index 6b3a98e5ce..0000000000 --- a/tests/expectations/compiler/compiler/import/alias.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - output: - - input_file: input/dummy.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/import/basic.leo.out b/tests/expectations/compiler/compiler/import/basic.leo.out deleted file mode 100644 index 6b3a98e5ce..0000000000 --- a/tests/expectations/compiler/compiler/import/basic.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - output: - - input_file: input/dummy.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/import/many_import.leo.out b/tests/expectations/compiler/compiler/import/many_import.leo.out deleted file mode 100644 index 6b3a98e5ce..0000000000 --- a/tests/expectations/compiler/compiler/import/many_import.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - output: - - input_file: input/dummy.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/import/many_import_star.leo.out b/tests/expectations/compiler/compiler/import/many_import_star.leo.out deleted file mode 100644 index 6b3a98e5ce..0000000000 --- a/tests/expectations/compiler/compiler/import/many_import_star.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - output: - - input_file: input/dummy.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/import/multiple.leo.out b/tests/expectations/compiler/compiler/import/multiple.leo.out deleted file mode 100644 index 6b3a98e5ce..0000000000 --- a/tests/expectations/compiler/compiler/import/multiple.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - output: - - input_file: input/dummy.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/import/names.leo.out b/tests/expectations/compiler/compiler/import/names.leo.out deleted file mode 100644 index 69627ac35b..0000000000 --- a/tests/expectations/compiler/compiler/import/names.leo.out +++ /dev/null @@ -1,15 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - output: - - input_file: input/dummy.in - output: - registers: {} diff --git a/tests/expectations/compiler/compiler/import/names_a_dash.leo.out b/tests/expectations/compiler/compiler/import/names_a_dash.leo.out deleted file mode 100644 index 01e57e6bd4..0000000000 --- a/tests/expectations/compiler/compiler/import/names_a_dash.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Compile -expectation: Fail -outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:3:10\n |\n 3 | import a-.foo;\n | ^\n |\n = expected 'ident', got '.'" diff --git a/tests/expectations/compiler/compiler/import/names_dash_a.leo.out b/tests/expectations/compiler/compiler/import/names_dash_a.leo.out deleted file mode 100644 index 79088f763f..0000000000 --- a/tests/expectations/compiler/compiler/import/names_dash_a.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Compile -expectation: Fail -outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:3:8\n |\n 3 | import -a.foo;\n | ^\n |\n = expected 'ident', got '-'" diff --git a/tests/expectations/compiler/compiler/import/names_dollar.leo.out b/tests/expectations/compiler/compiler/import/names_dollar.leo.out deleted file mode 100644 index edc3407f7d..0000000000 --- a/tests/expectations/compiler/compiler/import/names_dollar.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Compile -expectation: Fail -outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:3:13\n |\n 3 | import money$.foo;\n | ^\n |\n = unexpected token: '$'" diff --git a/tests/expectations/compiler/compiler/import/names_underscore.leo.out b/tests/expectations/compiler/compiler/import/names_underscore.leo.out deleted file mode 100644 index e065c6f031..0000000000 --- a/tests/expectations/compiler/compiler/import/names_underscore.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Compile -expectation: Fail -outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:3:20\n |\n 3 | import hello_world.foo;\n | ^^^\n |\n = Cannot find imported package `hello_world` in source files or import directory." diff --git a/tests/expectations/compiler/compiler/import/star.leo.out b/tests/expectations/compiler/compiler/import/star.leo.out deleted file mode 100644 index 6b3a98e5ce..0000000000 --- a/tests/expectations/compiler/compiler/import/star.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - output: - - input_file: input/dummy.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/import/star_fail.leo.out b/tests/expectations/compiler/compiler/import/star_fail.leo.out deleted file mode 100644 index 1c9e918a30..0000000000 --- a/tests/expectations/compiler/compiler/import/star_fail.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Compile -expectation: Fail -outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports:4:16\n |\n 4 | import bar.bat.*;\n | ^\n |\n = Expected library file `\"/Users/dam/projects/aleo/leo/test-framework/../tests/compiler/import/imports/bar/src/bat/src/lib.leo\"`." diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out index 7b6e84afb8..cf70c35e5a 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_input/main_array_fail.leo:3:1\n |\n 3 | function main(x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 1, found array dimensions 2" + - " --> test/file:3:1\n |\n 3 | function main(x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 1, found array dimensions 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out index d7a82496b8..e4e0975a04 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_field.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 2 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 3 + num_constraints: 1 + at: 9e8541580cdcbb8f5941f983c90dba7736b3911a1a3a55d1394880f187b832c8 + bt: e18039133804a4c53e61e3a975b41a0423337da0df1fad627f00027f3be47b1d + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/main_field.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out index 7694184c47..56fb7e66dc 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_input/main_tuple_fail.leo:3:1\n |\n 3 | function main(x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" + - " --> test/file:3:1\n |\n 3 | function main(x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out index 2c44a3fa29..d78efc7c73 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main.leo.out @@ -4,13 +4,13 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: "../program_input_constants/input/main.in" + - input_file: input/main.in output: registers: r0: diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out index 319c7575a2..d75d62b8b6 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/main_array.in output: diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out index 73a0348b94..2b19d5f2a4 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_input_constants/main_array_fail.leo:3:1\n |\n 3 | function main(const x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 2, found array dimensions 1" + - " --> test/file:3:1\n |\n 3 | function main(const x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 2, found array dimensions 1" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out index 213567a511..95813bdcdf 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_field.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/main_field.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out index fa74af2029..89fbb0f9a4 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_group.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/main_group.in output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out index 214c553e6e..b7dec511c8 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multi_dimension_array.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 223 + num_constraints: 223 + at: 87fe022f8971e90450cc219824d04ea84f08040429143393193aa2de0321759f + bt: 65e18f4e1e32d72f87d238401f8397b5d8ba20e7da7d50cc5930faa5673cdb77 + ct: 389354117abccc4ef9f4822705889f64f1d16b7e0d2adae52005c7b91b0ccabb output: - input_file: input/main_multi_dimension_array.in output: diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out index 37cef1b382..ad02b7c3e4 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_multiple.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/main_multiple.in output: diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out index ce6ad15cdd..3edfe39ca8 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/main_tuple.in output: diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out index d4907ce851..3d6541f25b 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_input_constants/main_tuple_fail.leo:3:1\n |\n 3 | function main(const x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" + - " --> test/file:3:1\n |\n 3 | function main(const x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out index 0388ee9560..11399f4f99 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_array.leo.out @@ -4,15 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 64 + num_constraints: 64 + at: 2517dbbd3bc6f74f73a279bfe223141cdef8fce801edcc2972d568a815e43bcd + bt: 3a136bbbffaef5f4563e06a03444cfe5c512767d8c88a8be5b39034e18fe0081 + ct: 60e36dc4bc844fe8285371cf70c955b79990f094bc50b3401dcac4cbede63e8d output: - input_file: input/array.in output: registers: r2: type: "[[u8; 4]; 2]" - value: "[[1, 2, 3, 4], [5, 6, 7, 8]]" + value: "[[0, 0, 0, 0], [0, 0, 0, 0]]" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index a5e53f9bc4..ae94206394 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/input_files/program_registers/registers_fail.leo:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n | ^\n |\n = Mismatched types. Expected register output type `u8`, found type `bool`." + - " --> test/file:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n | ^\n |\n = Mismatched types. Expected register output type `u8`, found type `bool`." diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out index 2aae6495e7..d538ad5c86 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_pass.leo.out @@ -4,15 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 17 + num_constraints: 18 + at: 54a6bab98206b1a92fff5ae07a6838e5ec25365afa7756a58b492f7a288c8654 + bt: 322eda19d0ceaeddbc296d56bce789cf038e440fd8fbd6e118606a4248844b2c + ct: 748f424d53dc4319858b691a3c593aec6165ed4e67847b32285a436b9e2e7cc1 output: - input_file: input/main.in output: registers: r: type: u8 - value: "1" + value: "101" diff --git a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_state/basic.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/integers/i128/max.leo.out b/tests/expectations/compiler/compiler/integers/i128/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out index be534c6877..210ba97209 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i128/max_fail.leo:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '170141183460469231731687303715884105728'" + - " --> test/file:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '170141183460469231731687303715884105728'" diff --git a/tests/expectations/compiler/compiler/integers/i128/min.leo.out b/tests/expectations/compiler/compiler/integers/i128/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out index 5c5b33430b..899e3687d1 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i128/min_fail.leo:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-170141183460469231731687303715884105729'" + - " --> test/file:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-170141183460469231731687303715884105729'" diff --git a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/negate_min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out index 82beb9beae..07024c00a7 100644 --- a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i128/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i128;\n | ^\n |\n = Unexpected white space between terms 1 and i128" + - " --> test/file:4:15\n |\n 4 | const i = 1 i128;\n | ^\n |\n = Unexpected white space between terms 1 and i128" diff --git a/tests/expectations/compiler/compiler/integers/i16/max.leo.out b/tests/expectations/compiler/compiler/integers/i16/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out index 0cc0d7ab95..9f5c9af108 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i16/max_fail.leo:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n = failed to parse int value '32768'" + - " --> test/file:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n = failed to parse int value '32768'" diff --git a/tests/expectations/compiler/compiler/integers/i16/min.leo.out b/tests/expectations/compiler/compiler/integers/i16/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out index 98b8834029..15201dc44e 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i16/min_fail.leo:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n = failed to parse int value '-32769'" + - " --> test/file:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n = failed to parse int value '-32769'" diff --git a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/negate_min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out index e2b2f4b963..bff37090c2 100644 --- a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i16/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i16;\n | ^\n |\n = Unexpected white space between terms 1 and i16" + - " --> test/file:4:15\n |\n 4 | const i = 1 i16;\n | ^\n |\n = Unexpected white space between terms 1 and i16" diff --git a/tests/expectations/compiler/compiler/integers/i16/pow.leo.out b/tests/expectations/compiler/compiler/integers/i16/pow.leo.out deleted file mode 100644 index cbd7679c80..0000000000 --- a/tests/expectations/compiler/compiler/integers/i16/pow.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 194687 - num_constraints: 194975 - at: 6fbacc0d7dabcccfa86d6925e45ca29c14c4e48426268e433c759b80e4851436 - bt: eff82086d6011254c096316b39532b79c6cc45607db3f7b237f8b9af7e8e2ad4 - ct: 153a20350a404865df65fd2a2eb9f721db89fe0f1d0321eba0c1864f60813b6b - output: - - input_file: i16.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/max.leo.out b/tests/expectations/compiler/compiler/integers/i32/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out index fd3f1d2a11..b190d8a715 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i32/max_fail.leo:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^\n |\n = failed to parse int value '2147483648'" + - " --> test/file:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^\n |\n = failed to parse int value '2147483648'" diff --git a/tests/expectations/compiler/compiler/integers/i32/min.leo.out b/tests/expectations/compiler/compiler/integers/i32/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out index f0eddf0f33..fba28e10cb 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i32/min_fail.leo:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^\n |\n = failed to parse int value '-2147483649'" + - " --> test/file:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^\n |\n = failed to parse int value '-2147483649'" diff --git a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/negate_min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out index bfff55cb4d..580a0e9e8a 100644 --- a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i32/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i32;\n | ^\n |\n = Unexpected white space between terms 1 and i32" + - " --> test/file:4:15\n |\n 4 | const i = 1 i32;\n | ^\n |\n = Unexpected white space between terms 1 and i32" diff --git a/tests/expectations/compiler/compiler/integers/i64/max.leo.out b/tests/expectations/compiler/compiler/integers/i64/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out index 22b6a3253c..a6545dc264 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i64/max_fail.leo:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '9223372036854775808'" + - " --> test/file:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '9223372036854775808'" diff --git a/tests/expectations/compiler/compiler/integers/i64/min.leo.out b/tests/expectations/compiler/compiler/integers/i64/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out index 0dd85392b2..7786b65e52 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i64/min_fail.leo:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-9223372036854775809'" + - " --> test/file:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-9223372036854775809'" diff --git a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/negate_min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out index 47cd46e965..5e64a583ce 100644 --- a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i64/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i64;\n | ^\n |\n = Unexpected white space between terms 1 and i64" + - " --> test/file:4:15\n |\n 4 | const i = 1 i64;\n | ^\n |\n = Unexpected white space between terms 1 and i64" diff --git a/tests/expectations/compiler/compiler/integers/i8/max.leo.out b/tests/expectations/compiler/compiler/integers/i8/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out index bb53d71aa2..348ae5ef94 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/max_fail.leo:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n = failed to parse int value '128'" + - " --> test/file:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n = failed to parse int value '128'" diff --git a/tests/expectations/compiler/compiler/integers/i8/min.leo.out b/tests/expectations/compiler/compiler/integers/i8/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out index 0433fe8027..ae1630e758 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/min_fail.leo:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n = failed to parse int value '-129'" + - " --> test/file:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n = failed to parse int value '-129'" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out index 28d52607ff..6847e5a689 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/negate_min.leo:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n = integer operation failed due to the signed integer error `Overflow`" + - " --> test/file:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n = integer operation failed due to the signed integer error `Overflow`" diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out index 86314aef62..a5492c62a2 100644 --- a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/i8/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" + - " --> test/file:4:15\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" diff --git a/tests/expectations/compiler/compiler/integers/i8/pow.leo.out b/tests/expectations/compiler/compiler/integers/i8/pow.leo.out deleted file mode 100644 index 2b9d1fa103..0000000000 --- a/tests/expectations/compiler/compiler/integers/i8/pow.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 24127 - num_constraints: 24207 - at: 49a5b48f981cfd19732f3438a154250200ab1b349dd1d930731d736e32d95532 - bt: b8979c4494b630792fad6a0b29a53293c7649f3d5fcd45b8c1d2396f970ca0dd - ct: 1acbdb8598982e7bf38d0a531f67d6937a6bd98418c6d382e4201c4a8285df55 - output: - - input_file: i8.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/max.leo.out b/tests/expectations/compiler/compiler/integers/u128/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out index a8d68ec28d..8e6a2d9b7f 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u128/max_fail.leo:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '340282366920938463463374607431768211456'" + - " --> test/file:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '340282366920938463463374607431768211456'" diff --git a/tests/expectations/compiler/compiler/integers/u128/min.leo.out b/tests/expectations/compiler/compiler/integers/u128/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out index b3f0b5025d..9b730487e5 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u128/min_fail.leo:4:21\n |\n 4 | const a: u128 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> test/file:4:21\n |\n 4 | const a: u128 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out index 6190090732..7908870e22 100644 --- a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u128/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u128;\n | ^\n |\n = Unexpected white space between terms 1 and u128" + - " --> test/file:4:15\n |\n 4 | const i = 1 u128;\n | ^\n |\n = Unexpected white space between terms 1 and u128" diff --git a/tests/expectations/compiler/compiler/integers/u16/max.leo.out b/tests/expectations/compiler/compiler/integers/u16/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out index 68b98c5845..9e5e93dd09 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u16/max_fail.leo:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^\n |\n = failed to parse int value '65536'" + - " --> test/file:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^\n |\n = failed to parse int value '65536'" diff --git a/tests/expectations/compiler/compiler/integers/u16/min.leo.out b/tests/expectations/compiler/compiler/integers/u16/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out index 5eec48f390..184bad56e3 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u16/min_fail.leo:4:20\n |\n 4 | const a: u16 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> test/file:4:20\n |\n 4 | const a: u16 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out index 03c73b5848..27c73261b1 100644 --- a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u16/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u16;\n | ^\n |\n = Unexpected white space between terms 1 and u16" + - " --> test/file:4:15\n |\n 4 | const i = 1 u16;\n | ^\n |\n = Unexpected white space between terms 1 and u16" diff --git a/tests/expectations/compiler/compiler/integers/u16/pow.leo.out b/tests/expectations/compiler/compiler/integers/u16/pow.leo.out deleted file mode 100644 index 3db463ad76..0000000000 --- a/tests/expectations/compiler/compiler/integers/u16/pow.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 26847 - num_constraints: 35839 - at: 60e4ca8986bb9be35a32592f396a840e2a589c3313e88c7a7e0560cc90f5aabc - bt: fcc7eca9b990faff84958bccb424d52d122271d4a28f14f7977a0ee13626825f - ct: adfdc17059fec9d5afc537f7a1fa8d2616e48017333a2c0b982568865c1e2122 - output: - - input_file: u16_f.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/max.leo.out b/tests/expectations/compiler/compiler/integers/u32/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out index e6094a8f42..bfe48304a2 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u32/max_fail.leo:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^\n |\n = failed to parse int value '4294967296'" + - " --> test/file:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^\n |\n = failed to parse int value '4294967296'" diff --git a/tests/expectations/compiler/compiler/integers/u32/min.leo.out b/tests/expectations/compiler/compiler/integers/u32/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out index a3f6fdd1f8..4d49e6bc62 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u32/min_fail.leo:4:20\n |\n 4 | const a: u32 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> test/file:4:20\n |\n 4 | const a: u32 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out index e7989f319d..8b66790f68 100644 --- a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u32/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u32;\n | ^\n |\n = Unexpected white space between terms 1 and u32" + - " --> test/file:4:15\n |\n 4 | const i = 1 u32;\n | ^\n |\n = Unexpected white space between terms 1 and u32" diff --git a/tests/expectations/compiler/compiler/integers/u64/max.leo.out b/tests/expectations/compiler/compiler/integers/u64/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out index a8877a835b..0dd5158e25 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u64/max_fail.leo:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '18446744073709551616'" + - " --> test/file:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '18446744073709551616'" diff --git a/tests/expectations/compiler/compiler/integers/u64/min.leo.out b/tests/expectations/compiler/compiler/integers/u64/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out index 8a9ea28fd9..7b80ee91cf 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u64/min_fail.leo:4:20\n |\n 4 | const a: u64 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> test/file:4:20\n |\n 4 | const a: u64 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out index 4a12048b4d..a9f7ae9ad5 100644 --- a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u64/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u64;\n | ^\n |\n = Unexpected white space between terms 1 and u64" + - " --> test/file:4:15\n |\n 4 | const i = 1 u64;\n | ^\n |\n = Unexpected white space between terms 1 and u64" diff --git a/tests/expectations/compiler/compiler/integers/u8/max.leo.out b/tests/expectations/compiler/compiler/integers/u8/max.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out index 8e690fa9bc..debb54ba9b 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u8/max_fail.leo:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^\n |\n = failed to parse int value '256'" + - " --> test/file:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^\n |\n = failed to parse int value '256'" diff --git a/tests/expectations/compiler/compiler/integers/u8/min.leo.out b/tests/expectations/compiler/compiler/integers/u8/min.leo.out index 2a650384ef..a8427152b6 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min.leo.out @@ -4,12 +4,15 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - - input_file: empty + - input_file: "../input/dummy.in" output: - registers: {} + registers: + r0: + type: bool + value: "true" diff --git a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out index ae460d701f..2c4581da1c 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u8/min_fail.leo:4:19\n |\n 4 | const a: u8 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> test/file:4:19\n |\n 4 | const a: u8 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out index db6a0c5669..b69b39472e 100644 --- a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/integers/u8/no_space_between_literal.leo:4:15\n |\n 4 | const i = 1 u8;\n | ^\n |\n = Unexpected white space between terms 1 and u8" + - " --> test/file:4:15\n |\n 4 | const i = 1 u8;\n | ^\n |\n = Unexpected white space between terms 1 and u8" diff --git a/tests/expectations/compiler/compiler/integers/u8/pow.leo.out b/tests/expectations/compiler/compiler/integers/u8/pow.leo.out deleted file mode 100644 index f99e7dbb01..0000000000 --- a/tests/expectations/compiler/compiler/integers/u8/pow.leo.out +++ /dev/null @@ -1,18 +0,0 @@ ---- -namespace: Compile -expectation: Pass -outputs: - - circuit: - num_public_variables: 0 - num_private_variables: 3679 - num_constraints: 4911 - at: fb59ec7f84e731eb117badc47fb61c700d450743c876b67c60193e4aa0cdbf58 - bt: 5575062025be6100312de38fb9901cde8870659224b2148a8ccdf5c442e52247 - ct: 8196252f9e347739efec32ad2533722817c96a34b1a87186539e030d475e7c75 - output: - - input_file: u8_f.in - output: - registers: - r0: - type: bool - value: "true" diff --git a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out index 3369ab9006..c1cd15e521 100644 --- a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/array_fail.leo:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> test/file:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/mutability/array_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_mut.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_splice_mut.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_tuple_mut.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out index d42c174fa2..b2be78a69d 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/circuit_fail.leo:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> test/file:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out index 32e059bbe1..d52c6edb79 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/circuit_function_const.leo:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n = cannot call mutable member function 'foo' of circuit 'Foo' from immutable context" + - " --> test/file:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n = cannot call mutable member function 'foo' of circuit 'Foo' from immutable context" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_mut.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out index d85afcdf07..3cbafa8884 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/circuit_static_function_mut_fail.leo:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n = extra circuit member 'x' for initialization of circuit 'Foo' is not allowed" + - " --> test/file:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n = extra circuit member 'x' for initialization of circuit 'Foo' is not allowed" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_variable_mut.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/cond_mut.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/mutability/const.leo.out b/tests/expectations/compiler/compiler/mutability/const.leo.out index 1a19051cc1..481421aed5 100644 --- a/tests/expectations/compiler/compiler/mutability/const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/const.leo:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> test/file:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out index c760a8685d..101784da91 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/function_input.leo:5:5\n |\n 5 | a = false;\n | ^\n |\n = failed to resolve variable reference 'a'" + - " --> test/file:5:5\n |\n 5 | a = false;\n | ^\n |\n = failed to resolve variable reference 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/let.leo.out b/tests/expectations/compiler/compiler/mutability/let.leo.out deleted file mode 100644 index 9d577f41f2..0000000000 --- a/tests/expectations/compiler/compiler/mutability/let.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Compile -expectation: Fail -outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/mutability/let.leo:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out new file mode 100644 index 0000000000..481421aed5 --- /dev/null +++ b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - " --> test/file:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out index 6b3a98e5ce..b9b6741851 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 0 - num_constraints: 0 - at: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - bt: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 - ct: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945 + num_private_variables: 1 + num_constraints: 1 + at: 042610d0fd1fe6d6ac112138f8755752f44c7d2a00f1b5960574d6da5cda393f + bt: e97756698880ab7555a959a5fb5c6b4e15bd64612aa677adbfe2d0bd91f0a83c + ct: cf1cbb66a638b4860a516671fb74850e6ccf787fe6c4c8d29e9c04efe880bd05 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out index f383798db5..13998e432d 100644 --- a/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_mut_nested.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 17 - num_constraints: 17 - at: 62f2cd41f4b590978ffd9db8160c28a4aa29dc3386880a1c83192adaa60930c8 - bt: 3402e051d99a4c5be395811da2585d8a57577a0e8307aff01ddfe38b238e03ec - ct: d5dcfd364897254307770e70351a0fba77b2db59351d48fedfaa02aff5307e50 + num_private_variables: 18 + num_constraints: 18 + at: 0af86ba5c2862fbd3f6877188bf7b64b0e1c943322d72aa1eeff86e3d4782a66 + bt: 337d485395ace679b31230eee59c92054ba721ca86d569123ddd4625d611b595 + ct: 6c0e1fd41ec8a0fa1ac6c5c845ac3158b5a6846d089b98fab88b4d9b9e41f6a8 output: - input_file: input/dummy.in output: diff --git a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out index fe2b77a905..b38300baea 100644 --- a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out +++ b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/statements/ternary_non_const_fail.leo:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to create const variable(s) 'y' with non constant values." + - " --> test/file:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to create const variable(s) 'y' with non constant values." diff --git a/tests/expectations/parser/parser/circuits/big_self.leo.out b/tests/expectations/parser/parser/circuits/big_self.leo.out deleted file mode 100644 index abdced08ca..0000000000 --- a/tests/expectations/parser/parser/circuits/big_self.leo.out +++ /dev/null @@ -1,53 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() -> Self {\\\"}\"}" - input: [] - output: SelfType - block: - statements: - - Return: - expression: - CircuitInit: - name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return Self {};\\\"}\"}" - members: [] - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 23 - path: test - content: " return Self {};" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 23 - path: test - content: " return Self {};" - span: - line_start: 4 - line_stop: 6 - col_start: 26 - col_stop: 6 - path: test - content: " function x() -> Self {\n...\n }" - span: - line_start: 4 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: test - content: " function x() -> Self {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/empty.leo.out b/tests/expectations/parser/parser/circuits/empty.leo.out deleted file mode 100644 index e826c4097d..0000000000 --- a/tests/expectations/parser/parser/circuits/empty.leo.out +++ /dev/null @@ -1,13 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: [] - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out deleted file mode 100644 index a13e5be7fb..0000000000 --- a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out +++ /dev/null @@ -1,97 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}" - - IntegerType: U32 - - CircuitVariable: - - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32\\\"}\"}" - - IntegerType: U32 - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 7 - line_stop: 7 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 6 - line_stop: 8 - col_start: 18 - col_stop: 6 - path: test - content: " function x() {\n...\n }" - span: - line_start: 6 - line_stop: 8 - col_start: 5 - col_stop: 6 - path: test - content: " function x() {\n...\n }" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 10 - line_stop: 10 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 10 - line_stop: 10 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 9 - line_stop: 11 - col_start: 18 - col_stop: 6 - path: test - content: " function y() {\n...\n }" - span: - line_start: 9 - line_stop: 11 - col_start: 5 - col_stop: 6 - path: test - content: " function y() {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/fields.leo.out b/tests/expectations/parser/parser/circuits/fields.leo.out deleted file mode 100644 index 041cc13554..0000000000 --- a/tests/expectations/parser/parser/circuits/fields.leo.out +++ /dev/null @@ -1,19 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitVariable: - - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32;\\\"}\"}" - - IntegerType: U32 - - CircuitVariable: - - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32;\\\"}\"}" - - IntegerType: U32 - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/fields_fail.leo.out b/tests/expectations/parser/parser/circuits/fields_fail.leo.out deleted file mode 100644 index 006159e9d5..0000000000 --- a/tests/expectations/parser/parser/circuits/fields_fail.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Parse -expectation: Fail -outputs: - - " --> test:10:11\n |\n 10 | y: u32;\n | ^\n |\n = Cannot mix use of commas and semi-colons for circuit member variable declarations." diff --git a/tests/expectations/parser/parser/circuits/functions.leo.out b/tests/expectations/parser/parser/circuits/functions.leo.out deleted file mode 100644 index aebda6c4e5..0000000000 --- a/tests/expectations/parser/parser/circuits/functions.leo.out +++ /dev/null @@ -1,91 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 18 - col_stop: 6 - path: test - content: " function x() {\n...\n }" - span: - line_start: 4 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: test - content: " function x() {\n...\n }" - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 8 - line_stop: 8 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 8 - line_stop: 8 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 7 - line_stop: 9 - col_start: 18 - col_stop: 6 - path: test - content: " function y() {\n...\n }" - span: - line_start: 7 - line_stop: 9 - col_start: 5 - col_stop: 6 - path: test - content: " function y() {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/mut_self.leo.out b/tests/expectations/parser/parser/circuits/mut_self.leo.out deleted file mode 100644 index 03997801dc..0000000000 --- a/tests/expectations/parser/parser/circuits/mut_self.leo.out +++ /dev/null @@ -1,53 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" - input: - - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 26 - col_stop: 6 - path: test - content: " function x(mut self) {\n...\n }" - span: - line_start: 4 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: test - content: " function x(mut self) {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/circuits/self.leo.out b/tests/expectations/parser/parser/circuits/self.leo.out deleted file mode 100644 index 65785a36b6..0000000000 --- a/tests/expectations/parser/parser/circuits/self.leo.out +++ /dev/null @@ -1,53 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: - "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": - circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" - members: - - CircuitFunction: - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" - input: - - SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 16 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 9 - col_stop: 18 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 22 - col_stop: 6 - path: test - content: " function x(self) {\n...\n }" - span: - line_start: 4 - line_stop: 6 - col_start: 5 - col_stop: 6 - path: test - content: " function x(self) {\n...\n }" - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/expression/access/array_access.leo.out b/tests/expectations/parser/parser/expression/access/array_access.leo.out deleted file mode 100644 index 5c820cc814..0000000000 --- a/tests/expectations/parser/parser/expression/access/array_access.leo.out +++ /dev/null @@ -1,267 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[0]" - - ArrayAccess: - array: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X[1]\\\"}\"}" - index: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "X[1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "X[1]" - - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8]\\\"}\"}" - index: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[0u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[0u8]" - - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1u8][2u8]\\\"}\"}" - index: - Value: - Integer: - - U8 - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[1u8][2u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[1u8][2u8]" - index: - Value: - Integer: - - U8 - - "2" - - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 11 - path: test - content: "x[1u8][2u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[1u8][2u8]" - - ArrayAccess: - array: - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" - index: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[x][y][z]" - index: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[x][y][z]" - index: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x[x][y][z]" - - Call: - function: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]()\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0]()" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[0]()" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[0]()" - - ArrayAccess: - array: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()[0]\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "x()[0]" - index: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x()[0]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x()[0]" - - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x(y)::y(x)" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x(y)::y(x)" - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x(y)::y(x)" - - ArrayAccess: - array: - TupleAccess: - tuple: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" - index: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[x].0[x]" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[x].0[x]" - index: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x[x].0[x]" diff --git a/tests/expectations/parser/parser/expression/access/array_range_access.leo.out b/tests/expectations/parser/parser/expression/access/array_range_access.leo.out deleted file mode 100644 index 10b02e133d..0000000000 --- a/tests/expectations/parser/parser/expression/access/array_range_access.leo.out +++ /dev/null @@ -1,401 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" - left: ~ - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "x[..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..]\\\"}\"}" - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[1..]" - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[1..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..1]\\\"}\"}" - left: ~ - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x[..1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[..1]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..1]\\\"}\"}" - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[1..1]" - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "x[1..1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[1..1]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0..100]\\\"}\"}" - left: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0..100]" - right: - Value: - Implicit: - - "100" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 9 - path: test - content: "x[0..100]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x[0..100]" - - ArrayAccess: - array: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[323452345.2345234523453453][323452345.2345234523453453]\\\"}\"}" - index: - TupleAccess: - tuple: - Value: - Implicit: - - "323452345" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 12 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - index: - value: "2345234523453453" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 29 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 30 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - index: - TupleAccess: - tuple: - Value: - Implicit: - - "323452345" - - line_start: 1 - line_stop: 1 - col_start: 31 - col_stop: 40 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - index: - value: "2345234523453453" - span: - line_start: 1 - line_stop: 1 - col_start: 31 - col_stop: 57 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 58 - path: test - content: "x[323452345.2345234523453453][323452345.2345234523453453]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..1u8]\\\"}\"}" - left: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[0u8..1u8]" - right: - Value: - Integer: - - U8 - - "1" - - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 11 - path: test - content: "x[0u8..1u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[0u8..1u8]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..]\\\"}\"}" - left: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[0u8..]" - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[0u8..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..0u8]\\\"}\"}" - left: ~ - right: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "x[..0u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[..0u8]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" - left: ~ - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "x[..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[x.y..]" - right: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[x.y..]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" - left: ~ - right: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "x[..y.x]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[..y.x]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - left: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[x.y..y.x]" - right: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 11 - path: test - content: "x[x.y..y.x]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[x.y..y.x]" - - ArrayRangeAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - left: - CircuitMemberAccess: - circuit: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "x[x.y.x..y.x.y]" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 8 - path: test - content: "x[x.y.x..y.x.y]" - right: - CircuitMemberAccess: - circuit: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 13 - path: test - content: "x[x.y.x..y.x.y]" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: "x[x.y.x..y.x.y]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "x[x.y.x..y.x.y]" diff --git a/tests/expectations/parser/parser/expression/access/call.leo.out b/tests/expectations/parser/parser/expression/access/call.leo.out deleted file mode 100644 index ed9e9058da..0000000000 --- a/tests/expectations/parser/parser/expression/access/call.leo.out +++ /dev/null @@ -1,162 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x() - - Call: - function: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X()\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: X() - - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: x(y) - - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x(y, z)" - - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x(x, y, z)" - - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y()" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x::y()" - - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y(x)" - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x::y(x)" - - Call: - function: - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0(x) - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: x.0(x) - - Call: - function: - ArrayAccess: - array: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" - index: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0](x)" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[0](x)" - arguments: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[0](x)" diff --git a/tests/expectations/parser/parser/expression/access/circuit.leo.out b/tests/expectations/parser/parser/expression/access/circuit.leo.out deleted file mode 100644 index e10176179c..0000000000 --- a/tests/expectations/parser/parser/expression/access/circuit.leo.out +++ /dev/null @@ -1,120 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.y - - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" - name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: X.Y - - CircuitMemberAccess: - circuit: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.y.z - name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.y.z - - Call: - function: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.y() - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.y() - - TupleAccess: - tuple: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.y.0 - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.y.0 - - ArrayAccess: - array: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "x.y[1]" - index: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x.y[1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x.y[1]" diff --git a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out deleted file mode 100644 index eed96329a1..0000000000 --- a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out +++ /dev/null @@ -1,120 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y" - - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" - name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "X::Y" - - CircuitStaticFunctionAccess: - circuit: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y::z" - name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x::y::z" - - Call: - function: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y()" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x::y()" - - TupleAccess: - tuple: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y.0" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x::y.0" - - ArrayAccess: - array: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x::y[1]" - index: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "x::y[1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x::y[1]" diff --git a/tests/expectations/parser/parser/expression/access/tuple.leo.out b/tests/expectations/parser/parser/expression/access/tuple.leo.out deleted file mode 100644 index c4089a4522..0000000000 --- a/tests/expectations/parser/parser/expression/access/tuple.leo.out +++ /dev/null @@ -1,109 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0\\\"}\"}" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0 - - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1\\\"}\"}" - index: - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.1 - - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2\\\"}\"}" - index: - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.2 - - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0.0\\\"}\"}" - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0.0 - index: - value: "0" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.0.0 - - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1.1\\\"}\"}" - index: - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.1.1 - index: - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.1.1 - - TupleAccess: - tuple: - TupleAccess: - tuple: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2.2\\\"}\"}" - index: - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.2.2 - index: - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: x.2.2 diff --git a/tests/expectations/parser/parser/expression/array_init.leo.out b/tests/expectations/parser/parser/expression/array_init.leo.out deleted file mode 100644 index c8ee3bfb32..0000000000 --- a/tests/expectations/parser/parser/expression/array_init.leo.out +++ /dev/null @@ -1,150 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - ArrayInit: - element: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "[0u8; 1]" - dimensions: - - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "[0u8; 1]" - - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0; 1]" - dimensions: - - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "[0; 1]" - - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0; (1)]" - dimensions: - - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "[0; (1)]" - - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0; (1, 2)]" - dimensions: - - value: "1" - - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "[0; (1, 2)]" - - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0; (1, 2, 3)]" - dimensions: - - value: "1" - - value: "2" - - value: "3" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: "[0; (1, 2, 3)]" - - ArrayInit: - element: - ArrayInit: - element: - ArrayInit: - element: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: "[[[0; 3]; 2]; 1]" - dimensions: - - value: "3" - span: - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 9 - path: test - content: "[[[0; 3]; 2]; 1]" - dimensions: - - value: "2" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 13 - path: test - content: "[[[0; 3]; 2]; 1]" - dimensions: - - value: "1" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "[[[0; 3]; 2]; 1]" diff --git a/tests/expectations/parser/parser/expression/array_init_fail.leo.out b/tests/expectations/parser/parser/expression/array_init_fail.leo.out deleted file mode 100644 index 3e6e920477..0000000000 --- a/tests/expectations/parser/parser/expression/array_init_fail.leo.out +++ /dev/null @@ -1,6 +0,0 @@ ---- -namespace: ParseExpression -expectation: Fail -outputs: - - " --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^\n |\n = illegal spread in array initializer" - - " --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^\n |\n = illegal spread in array initializer" diff --git a/tests/expectations/parser/parser/expression/array_inline.leo.out b/tests/expectations/parser/parser/expression/array_inline.leo.out deleted file mode 100644 index ae4ccf624f..0000000000 --- a/tests/expectations/parser/parser/expression/array_inline.leo.out +++ /dev/null @@ -1,317 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "[0u8, 1, 2, 3]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "[0u8, 1, 2, 3]" - - Expression: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "[0u8, 1, 2, 3]" - - Expression: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: "[0u8, 1, 2, 3]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: "[0u8, 1, 2, 3]" - - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[1]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "[1]" - - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "1" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "[1u8]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "[1u8]" - - ArrayInline: - elements: - - Expression: - Value: - Integer: - - U8 - - "1" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "[1u8,]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "[1u8,]" - - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0, 1,]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "[0, 1,]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "[0, 1,]" - - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 3 - path: test - content: "[0,1,]" - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: "[0,1,]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "[0,1,]" - - ArrayInline: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "[]" - - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "[[1,2,3],[1,2,3]]" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 9 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - ArrayInline: - elements: - - Expression: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: "[[1,2,3],[1,2,3]]" - - Expression: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 16 - path: test - content: "[[1,2,3],[1,2,3]]" - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 17 - path: test - content: "[[1,2,3],[1,2,3]]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "[[1,2,3],[1,2,3]]" - - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "[[]]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "[[]]" - - ArrayInline: - elements: - - Expression: - ArrayInline: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "[[], []]" - - Expression: - ArrayInline: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 8 - path: test - content: "[[], []]" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "[[], []]" diff --git a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out deleted file mode 100644 index 3565e3e59c..0000000000 --- a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out +++ /dev/null @@ -1,9 +0,0 @@ ---- -namespace: ParseExpression -expectation: Fail -outputs: - - " --> test:1:2\n |\n 1 | [,]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | [,,]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:4\n |\n 1 | [0,,]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | [,0]\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | [,0,]\n | ^\n |\n = expected 'expression', got ','" diff --git a/tests/expectations/parser/parser/expression/binary/add.leo.out b/tests/expectations/parser/parser/expression/binary/add.leo.out deleted file mode 100644 index 72d244dd8d..0000000000 --- a/tests/expectations/parser/parser/expression/binary/add.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 1 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2+3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2+3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2+3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 + 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 + 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 + 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 + 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 + 2 + 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 + 3 * 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 + 3 * 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 - 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 - 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 - 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 - 3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 + 2 - 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 18 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/and.leo.out b/tests/expectations/parser/parser/expression/binary/and.leo.out deleted file mode 100644 index b6f8de5d72..0000000000 --- a/tests/expectations/parser/parser/expression/binary/and.leo.out +++ /dev/null @@ -1,111 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: true && false - right: - Value: - Boolean: - - "false" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: true && false - op: And - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: true && false - - Binary: - left: - Value: - Boolean: - - "false" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: false&&true - right: - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 12 - path: test - content: false&&true - op: And - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: false&&true - - Binary: - left: - Binary: - left: - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: true&&false&&true - right: - Value: - Boolean: - - "false" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 12 - path: test - content: true&&false&&true - op: And - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: true&&false&&true - right: - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 18 - path: test - content: true&&false&&true - op: And - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: true&&false&&true diff --git a/tests/expectations/parser/parser/expression/binary/div.leo.out b/tests/expectations/parser/parser/expression/binary/div.leo.out deleted file mode 100644 index 45684cd859..0000000000 --- a/tests/expectations/parser/parser/expression/binary/div.leo.out +++ /dev/null @@ -1,180 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 / 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 / 1 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 / 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2/3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2/3 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2/3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 / 2 / 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 / 2 / 3 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 / 2 / 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 / 2 / 3 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 / 2 / 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 2 / 3 ** 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 2 / 3 ** 4 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 ** 2 / 3 ** 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 ** 2 / 3 ** 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 16 - path: test - content: 1 ** 2 / 3 ** 4 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 16 - path: test - content: 1 ** 2 / 3 ** 4 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: 1 ** 2 / 3 ** 4 diff --git a/tests/expectations/parser/parser/expression/binary/eq.leo.out b/tests/expectations/parser/parser/expression/binary/eq.leo.out deleted file mode 100644 index 56f7df069c..0000000000 --- a/tests/expectations/parser/parser/expression/binary/eq.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 == 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 == 1 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 == 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2==3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: 2==3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: 2==3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 == 2 == 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 == 2 == 3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 == 2 == 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 == 2 == 3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 == 2 == 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 == 3 < 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 == 3 < 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 == 3 < 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 < 2 == 3 < 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 == 2 == 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 == 2 == 3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 == 2 == 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 == 2 == 3 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 == 2 == 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 - op: Eq - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: 1 < 2 == 3 < 4 == 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/exp.leo.out b/tests/expectations/parser/parser/expression/binary/exp.leo.out deleted file mode 100644 index b0c39a877f..0000000000 --- a/tests/expectations/parser/parser/expression/binary/exp.leo.out +++ /dev/null @@ -1,244 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 1 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 ** 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2**3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: 2**3 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: 2**3 - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 2 ** 3 - right: - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 2 ** 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 ** 2 ** 3 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 12 - path: test - content: 1 ** 2 ** 3 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 ** 2 ** 3 - - Binary: - left: - Cast: - inner: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 as i8 ** 3 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 1 as i8 ** 3 as i8 - right: - Cast: - inner: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 13 - path: test - content: 1 as i8 ** 3 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 19 - path: test - content: 1 as i8 ** 3 as i8 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: 1 as i8 ** 3 as i8 - - Binary: - left: - Cast: - inner: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - right: - Binary: - left: - Cast: - inner: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 13 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 19 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - right: - Cast: - inner: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - target_type: - IntegerType: I8 - span: - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 30 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 30 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 30 - path: test - content: 1 as i8 ** 3 as i8 ** 5 as i8 diff --git a/tests/expectations/parser/parser/expression/binary/gt.leo.out b/tests/expectations/parser/parser/expression/binary/gt.leo.out deleted file mode 100644 index b9d5cfd72d..0000000000 --- a/tests/expectations/parser/parser/expression/binary/gt.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 > 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 > 1 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 > 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2>3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2>3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2>3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 > 2 > 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 > 2 > 3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 > 2 > 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 > 2 > 3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 > 2 > 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 > 3 + 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 > 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 > 3 + 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 > 3 + 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 > 2 > 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 > 2 > 3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 > 2 > 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 > 2 > 3 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 > 2 > 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 18 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 22 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 22 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 - op: Gt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: 1 + 2 > 3 + 4 > 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/gte.leo.out b/tests/expectations/parser/parser/expression/binary/gte.leo.out deleted file mode 100644 index 9ab526f71c..0000000000 --- a/tests/expectations/parser/parser/expression/binary/gte.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 >= 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 >= 1 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 >= 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2 >= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 2 >= 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 >= 2 >= 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 >= 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 >= 2 >= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 >= 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 >= 2 >= 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 >= 3 + 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 >= 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 >= 3 + 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 + 2 >= 3 + 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 >= 2 >= 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 >= 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 >= 2 >= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 >= 2 >= 3 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 >= 2 >= 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 - op: Ge - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: 1 + 2 >= 3 + 4 >= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lt.leo.out b/tests/expectations/parser/parser/expression/binary/lt.leo.out deleted file mode 100644 index 9879afc9d3..0000000000 --- a/tests/expectations/parser/parser/expression/binary/lt.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 1 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2<3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2<3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2<3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 < 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 < 3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 < 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 < 2 < 3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 < 2 < 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 < 3 + 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 < 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 < 3 + 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 < 3 + 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 < 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 < 3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 < 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 < 2 < 3 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 < 2 < 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 18 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 22 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 22 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: 1 + 2 < 3 + 4 < 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lte.leo.out b/tests/expectations/parser/parser/expression/binary/lte.leo.out deleted file mode 100644 index f40df4bddb..0000000000 --- a/tests/expectations/parser/parser/expression/binary/lte.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 <= 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 <= 1 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 <= 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2 <= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 2 <= 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 <= 2 <= 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 <= 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 <= 2 <= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 <= 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 <= 2 <= 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 <= 3 + 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 <= 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 <= 3 + 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 + 2 <= 3 + 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 <= 2 <= 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 <= 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 <= 2 <= 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 <= 2 <= 3 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 <= 2 <= 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 - op: Le - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: 1 + 2 <= 3 + 4 <= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/mul.leo.out b/tests/expectations/parser/parser/expression/binary/mul.leo.out deleted file mode 100644 index c146eeee15..0000000000 --- a/tests/expectations/parser/parser/expression/binary/mul.leo.out +++ /dev/null @@ -1,289 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 1 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2*3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2*3 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2*3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 * 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 * 3 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 * 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 * 3 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 * 2 * 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 2 * 3 ** 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 2 * 3 ** 4 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 ** 2 * 3 ** 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 ** 2 * 3 ** 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 24 - col_stop: 25 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 25 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 - op: Div - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 25 - path: test - content: 1 ** 2 * 3 ** 4 / 5 ** 6 diff --git a/tests/expectations/parser/parser/expression/binary/ne.leo.out b/tests/expectations/parser/parser/expression/binary/ne.leo.out deleted file mode 100644 index 65fb6e2298..0000000000 --- a/tests/expectations/parser/parser/expression/binary/ne.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 != 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 != 1 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 != 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2!=3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 5 - path: test - content: 2!=3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: 2!=3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 != 2 != 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 != 2 != 3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 != 2 != 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 != 2 != 3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 != 2 != 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 != 3 < 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 != 3 < 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 != 3 < 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 < 2 != 3 < 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 != 2 != 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: 1 != 2 != 3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 1 != 2 != 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: 1 != 2 != 3 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 1 != 2 != 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 20 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 23 - col_stop: 24 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Lt - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 - op: Ne - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: 1 < 2 != 3 < 4 != 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/or.leo.out b/tests/expectations/parser/parser/expression/binary/or.leo.out deleted file mode 100644 index 72d244dd8d..0000000000 --- a/tests/expectations/parser/parser/expression/binary/or.leo.out +++ /dev/null @@ -1,338 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 1 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2+3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2+3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2+3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 + 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 + 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 + 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 + 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 + 2 + 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 + 3 * 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 + 3 * 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 + 2 - 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 + 2 - 3 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 + 2 - 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 + 2 - 3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 + 2 - 3 - - Binary: - left: - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Binary: - left: - Value: - Implicit: - - "5" - - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 18 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - right: - Value: - Implicit: - - "6" - - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 17 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/sub.leo.out b/tests/expectations/parser/parser/expression/binary/sub.leo.out deleted file mode 100644 index 4e39639fe2..0000000000 --- a/tests/expectations/parser/parser/expression/binary/sub.leo.out +++ /dev/null @@ -1,180 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 - 1 - right: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 - 1 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 - 1 - - Binary: - left: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 2-3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: 2-3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: 2-3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 - 2 - 3 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 - 2 - 3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 - 2 - 3 - right: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 - 2 - 3 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 1 - 2 - 3 - - Binary: - left: - Binary: - left: - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: 1 * 2 - 3 * 4 - right: - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: 1 * 2 - 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 1 * 2 - 3 * 4 - right: - Binary: - left: - Value: - Implicit: - - "3" - - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: 1 * 2 - 3 * 4 - right: - Value: - Implicit: - - "4" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: 1 * 2 - 3 * 4 - op: Mul - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: 1 * 2 - 3 * 4 - op: Sub - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 1 * 2 - 3 * 4 diff --git a/tests/expectations/parser/parser/expression/cast.leo.out b/tests/expectations/parser/parser/expression/cast.leo.out deleted file mode 100644 index 25ace32c14..0000000000 --- a/tests/expectations/parser/parser/expression/cast.leo.out +++ /dev/null @@ -1,186 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8\\\"}\"}" - target_type: - IntegerType: U8 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x as u8 - - Cast: - inner: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" - target_type: - Circuit: "{\"name\":\"id\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: y as id - - Cast: - inner: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"z as u32\\\"}\"}" - target_type: - IntegerType: U32 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: z as u32 - - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as i128\\\"}\"}" - target_type: - IntegerType: I128 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: x as i128 - - Cast: - inner: - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8 as u128\\\"}\"}" - target_type: - IntegerType: U8 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x as u8 as u128 - target_type: - IntegerType: U128 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: x as u8 as u128 - - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as field\\\"}\"}" - target_type: Field - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: x as field - - Cast: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as group\\\"}\"}" - target_type: Group - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: x as group - - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" - right: - Binary: - left: - Cast: - inner: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" - target_type: - IntegerType: U32 - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 14 - path: test - content: x ** y as u32 ** z - right: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 19 - path: test - content: x ** y as u32 ** z - op: Pow - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: x ** y as u32 ** z - - Value: - Implicit: - - "" - - line_start: 0 - line_stop: 0 - col_start: 0 - col_stop: 0 - path: "" - content: "" - - Cast: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x as u32\\\"}\"}" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "!x as u32" - target_type: - IntegerType: U32 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "!x as u32" - - Cast: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x as u32\\\"}\"}" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "-x as u32" - target_type: - IntegerType: U32 - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "-x as u32" diff --git a/tests/expectations/parser/parser/expression/circuit_init.leo.out b/tests/expectations/parser/parser/expression/circuit_init.leo.out deleted file mode 100644 index 4295420d95..0000000000 --- a/tests/expectations/parser/parser/expression/circuit_init.leo.out +++ /dev/null @@ -1,113 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {}\\\"}\"}" - members: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x {}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" - expression: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "x {y}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" - expression: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x{y}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{}\\\"}\"}" - members: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "x{}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" - expression: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x{y: y}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" - expression: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x{y: x}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" - expression: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x{y: x,}" - - CircuitInit: - name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - members: - - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - expression: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - expression: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: "x{y:x, x:y,}" - - CircuitInit: - name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self {}\\\"}\"}" - members: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "Self {}" diff --git a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out deleted file mode 100644 index 3aae92971f..0000000000 --- a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out +++ /dev/null @@ -1,16 +0,0 @@ ---- -namespace: ParseExpression -expectation: Fail -outputs: - - " --> test:1:3\n |\n 1 | x {\n | ^\n |\n = unexpected EOF" - - "did not consume all input: '}' @ 1:3-4\n" - - " --> test:1:4\n |\n 1 | x {,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:5\n |\n 1 | x { , }\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,,,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:6\n |\n 1 | x {x,,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,,x}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,x}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:8\n |\n 1 | x {x:y,,}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,,x:y}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:4\n |\n 1 | x {,x:y}\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:6\n |\n 1 | x {x:}\n | ^\n |\n = expected 'expression', got '}'" diff --git a/tests/expectations/parser/parser/expression/ident.leo.out b/tests/expectations/parser/parser/expression/ident.leo.out deleted file mode 100644 index a92fc0c1c8..0000000000 --- a/tests/expectations/parser/parser/expression/ident.leo.out +++ /dev/null @@ -1,23 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x\\\"}\"}" - - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X\\\"}\"}" - - Identifier: "{\"name\":\"xxx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xxx\\\"}\"}" - - Identifier: "{\"name\":\"XXX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"XXX\\\"}\"}" - - Identifier: "{\"name\":\"x1\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x1\\\"}\"}" - - Identifier: "{\"name\":\"xu32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xu32\\\"}\"}" - - Identifier: "{\"name\":\"testx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testx\\\"}\"}" - - Identifier: "{\"name\":\"truex\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"truex\\\"}\"}" - - Identifier: "{\"name\":\"TRUE\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"TRUE\\\"}\"}" - - Identifier: "{\"name\":\"testX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testX\\\"}\"}" - - Identifier: "{\"name\":\"letX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"letX\\\"}\"}" - - Identifier: "{\"name\":\"constX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"constX\\\"}\"}" - - Identifier: "{\"name\":\"test_test\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"test_test\\\"}\"}" - - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"self\\\"}\"}" - - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self\\\"}\"}" - - Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"input\\\"}\"}" - - Identifier: "{\"name\":\"selfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"selfX\\\"}\"}" - - Identifier: "{\"name\":\"SelfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"SelfX\\\"}\"}" - - Identifier: "{\"name\":\"inputX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"inputX\\\"}\"}" diff --git a/tests/expectations/parser/parser/expression/literal/address.leo.out b/tests/expectations/parser/parser/expression/literal/address.leo.out deleted file mode 100644 index 04610e6ead..0000000000 --- a/tests/expectations/parser/parser/expression/literal/address.leo.out +++ /dev/null @@ -1,13 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8' @ 1:1-64" - - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9' @ 1:1-64" - - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" - - "'aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st' @ 1:1-64" - - "'ALEO1' @ 1:1-6" - - "'Aleo1' @ 1:1-6" - - "'aleO1' @ 1:1-6" - - "'aleo2qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" - - "'bleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" diff --git a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out deleted file mode 100644 index c0fc912fd4..0000000000 --- a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out +++ /dev/null @@ -1,13 +0,0 @@ ---- -namespace: Token -expectation: Fail -outputs: - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'" - - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'" - - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'" - - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'" diff --git a/tests/expectations/parser/parser/expression/literal/address_parse.leo.out b/tests/expectations/parser/parser/expression/literal/address_parse.leo.out deleted file mode 100644 index ce2e019189..0000000000 --- a/tests/expectations/parser/parser/expression/literal/address_parse.leo.out +++ /dev/null @@ -1,40 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Address: - - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 64 - path: test - content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 - - Value: - Address: - - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9 - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 64 - path: test - content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9 - - Value: - Address: - - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9 - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 64 - path: test - content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9 - - Value: - Address: - - aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 64 - path: test - content: aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st diff --git a/tests/expectations/parser/parser/expression/literal/bool.leo.out b/tests/expectations/parser/parser/expression/literal/bool.leo.out deleted file mode 100644 index 9222f3dd49..0000000000 --- a/tests/expectations/parser/parser/expression/literal/bool.leo.out +++ /dev/null @@ -1,12 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'true' @ 1:1-5" - - "'True' @ 1:1-5" - - "'TRUE' @ 1:1-5" - - "'truE' @ 1:1-5" - - "'false' @ 1:1-6" - - "'False' @ 1:1-6" - - "'FALSE' @ 1:1-6" - - "'falsE' @ 1:1-6" diff --git a/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out b/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out deleted file mode 100644 index 85b9453e0b..0000000000 --- a/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out +++ /dev/null @@ -1,22 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Boolean: - - "true" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "true" - - Value: - Boolean: - - "false" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "false" diff --git a/tests/expectations/parser/parser/expression/literal/comment.leo.out b/tests/expectations/parser/parser/expression/literal/comment.leo.out deleted file mode 100644 index 9f4cc8a518..0000000000 --- a/tests/expectations/parser/parser/expression/literal/comment.leo.out +++ /dev/null @@ -1,22 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'// test1' @ 1:1-9" - - "'// test2' @ 1:1-9" - - "'//test3' @ 1:1-8" - - "'/' @ 1:1-2,'/' @ 1:3-4,'test4' @ 1:5-10" - - "'/* test5 */' @ 1:1-12" - - "'/*' @ 1:1-3" - - "'test' @ 1:1-5,'6' @ 1:6-7,'*' @ 1:8-9,'/' @ 1:9-10" - - "'/* test 7' @ 1:1-10" - - "'*' @ 1:1-2,'/' @ 1:2-3" - - "'/*test8 */' @ 1:1-11" - - "'/* test9*/' @ 1:1-11" - - "'/*test10*/' @ 1:1-11" - - "'/*/**/' @ 1:1-7" - - "'/**/' @ 1:1-5" - - "'/*//*/' @ 1:1-7" - - "'/** /*/' @ 1:1-8" - - "'/** **/' @ 1:1-8" - - "'/*' @ 1:1-3" diff --git a/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out b/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out deleted file mode 100644 index 47fddf9292..0000000000 --- a/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out +++ /dev/null @@ -1,24 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'\"{}\"' @ 1:1-5" - - "'\" {} \"' @ 1:1-7" - - "'\"{}d\"' @ 1:1-6" - - "'\"{}D\"' @ 1:1-6" - - "'\"d{}\"' @ 1:1-6" - - "'\"D{}\"' @ 1:1-6" - - "'\"D{}D\"' @ 1:1-7" - - "'\"{}{}\"' @ 1:1-7" - - "'\"D{}{}D\"' @ 1:1-9" - - "'\"D{}{}\"' @ 1:1-8" - - "'\"{}{}D\"' @ 1:1-8" - - "'\"D{}D{}D\"' @ 1:1-10" - - "'\"{{}}\"' @ 1:1-7" - - "'\"}}\"' @ 1:1-5" - - "'\"{{\"' @ 1:1-5" - - "'\"}}{{\"' @ 1:1-7" - - "'\"{{}\"' @ 1:1-6" - - "'\"{}}\"' @ 1:1-6" - - "'\"{\"' @ 1:1-4" - - "'\"}\"' @ 1:1-4" diff --git a/tests/expectations/parser/parser/expression/literal/group.leo.out b/tests/expectations/parser/parser/expression/literal/group.leo.out deleted file mode 100644 index 2a4389526e..0000000000 --- a/tests/expectations/parser/parser/expression/literal/group.leo.out +++ /dev/null @@ -1,648 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Group: - Tuple: - x: SignHigh - y: Inferred - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(+, _)group" - - Value: - Group: - Tuple: - x: Inferred - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(_, -)group" - - Value: - Group: - Tuple: - x: SignHigh - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(+, -)group" - - Value: - Group: - Tuple: - x: SignLow - y: SignHigh - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(-, +)group" - - Value: - Group: - Tuple: - x: SignHigh - y: SignHigh - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(+, +)group" - - Value: - Group: - Tuple: - x: SignLow - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(-, -)group" - - Value: - Group: - Tuple: - x: Inferred - y: Inferred - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 12 - path: test - content: "(_, _)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123,-456)group" - y: - Number: - - "-456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123,-456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123,-456)group" - - Value: - Group: - Tuple: - x: - Number: - - "-123" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "(-123,456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(-123,456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(-123,456)group" - - Value: - Group: - Tuple: - x: - Number: - - "-123" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 6 - path: test - content: "(-123,456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(-123,456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(-123,456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, _)group" - y: Inferred - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, _)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, -)group" - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, -)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, -)group" - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, -)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, +)group" - y: SignHigh - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, +)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, +)group" - y: SignHigh - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, +)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, -)group" - y: SignLow - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, -)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, _)group" - y: Inferred - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(123, _)group" - - Value: - Group: - Tuple: - x: SignHigh - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(+, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(+, 345)group" - - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(_, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(_, 345)group" - - Value: - Group: - Tuple: - x: SignHigh - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(+, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(+, 345)group" - - Value: - Group: - Tuple: - x: SignLow - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(-, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(-, 345)group" - - Value: - Group: - Tuple: - x: SignHigh - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(+, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(+, 345)group" - - Value: - Group: - Tuple: - x: SignLow - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(-, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(-, 345)group" - - Value: - Group: - Tuple: - x: Inferred - y: - Number: - - "345" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: "(_, 345)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 14 - path: test - content: "(_, 345)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" - - Value: - Group: - Tuple: - x: - Number: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123, 456)group" - y: - Number: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 10 - path: test - content: "(123, 456)group" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 16 - path: test - content: "(123, 456)group" diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out deleted file mode 100644 index da65de24fa..0000000000 --- a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out +++ /dev/null @@ -1,13 +0,0 @@ ---- -namespace: ParseExpression -expectation: Fail -outputs: - - " --> test:1:1\n |\n 1 | group\n | ^^^^^\n |\n = expected 'expression', got 'group'" - - "did not consume all input: 'group' @ 1:3-8\n" - - "did not consume all input: 'group' @ 1:6-11\n" - - " --> test:1:2\n |\n 1 | (,)group\n | ^\n |\n = expected 'expression', got ','" - - " --> test:1:2\n |\n 1 | (+, -,)group\n | ^\n |\n = expected 'expression', got '+'" - - " --> test:1:2\n |\n 1 | (,+, -)group\n | ^\n |\n = expected 'expression', got ','" - - "did not consume all input: 'group' @ 1:6-11\n" - - "did not consume all input: 'group' @ 1:12-17\n" - - "did not consume all input: 'group' @ 1:15-20\n" diff --git a/tests/expectations/parser/parser/expression/literal/int.leo.out b/tests/expectations/parser/parser/expression/literal/int.leo.out deleted file mode 100644 index ccac03f213..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int.leo.out +++ /dev/null @@ -1,111 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'123' @ 1:1-4,'abc123' @ 1:4-10" - - "'123' @ 1:1-4,'abc' @ 1:4-7" - - "'123' @ 1:1-4" - - "'456' @ 1:1-4" - - "'123' @ 1:1-4,'456' @ 1:5-8" - - "'87377802873778028737780287377802873778028737780287377802873778028737780287377802' @ 1:1-81" - - "'8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802' @ 1:1-401" - - "'340130024' @ 1:1-10" - - "'158951116' @ 1:1-10" - - "'155529659' @ 1:1-10" - - "'642023166' @ 1:1-10" - - "'228481736' @ 1:1-10" - - "'469712960' @ 1:1-10" - - "'929437719' @ 1:1-10" - - "'721072814' @ 1:1-10" - - "'363254789' @ 1:1-10" - - "'906732565' @ 1:1-10" - - "'288246391' @ 1:1-10" - - "'724940549' @ 1:1-10" - - "'487101620' @ 1:1-10" - - "'261373583' @ 1:1-10" - - "'891163927' @ 1:1-10" - - "'743967544' @ 1:1-10" - - "'8372586' @ 1:1-8" - - "'461793278' @ 1:1-10" - - "'806307045' @ 1:1-10" - - "'122764546' @ 1:1-10" - - "'356336181' @ 1:1-10" - - "'158370903' @ 1:1-10" - - "'774460877' @ 1:1-10" - - "'557174131' @ 1:1-10" - - "'492401267' @ 1:1-10" - - "'893445620' @ 1:1-10" - - "'957757048' @ 1:1-10" - - "'721540649' @ 1:1-10" - - "'390746493' @ 1:1-10" - - "'211251725' @ 1:1-10" - - "'938266114' @ 1:1-10" - - "'156985870' @ 1:1-10" - - "'703831126' @ 1:1-10" - - "'729964155' @ 1:1-10" - - "'988151305' @ 1:1-10" - - "'320872435' @ 1:1-10" - - "'719287167' @ 1:1-10" - - "'152289486' @ 1:1-10" - - "'740067975' @ 1:1-10" - - "'728627816' @ 1:1-10" - - "'385008978' @ 1:1-10" - - "'553967635' @ 1:1-10" - - "'71980713' @ 1:1-9" - - "'519444716' @ 1:1-10" - - "'116499965' @ 1:1-10" - - "'717422268' @ 1:1-10" - - "'18966279' @ 1:1-9" - - "'22458638' @ 1:1-9" - - "'857282620' @ 1:1-10" - - "'920675898' @ 1:1-10" - - "'762235516' @ 1:1-10" - - "'469018377' @ 1:1-10" - - "'199986521' @ 1:1-10" - - "'536679358' @ 1:1-10" - - "'591399452' @ 1:1-10" - - "'83083158' @ 1:1-9" - - "'599449051' @ 1:1-10" - - "'445442318' @ 1:1-10" - - "'585486590' @ 1:1-10" - - "'209278800' @ 1:1-10" - - "'873568117' @ 1:1-10" - - "'664470940' @ 1:1-10" - - "'465262783' @ 1:1-10" - - "'605652874' @ 1:1-10" - - "'376803940' @ 1:1-10" - - "'965247040' @ 1:1-10" - - "'598474509' @ 1:1-10" - - "'845119918' @ 1:1-10" - - "'648159133' @ 1:1-10" - - "'669051032' @ 1:1-10" - - "'800600261' @ 1:1-10" - - "'434689764' @ 1:1-10" - - "'520060080' @ 1:1-10" - - "'804659385' @ 1:1-10" - - "'537828058' @ 1:1-10" - - "'716600292' @ 1:1-10" - - "'387020273' @ 1:1-10" - - "'199375617' @ 1:1-10" - - "'680337189' @ 1:1-10" - - "'818479931' @ 1:1-10" - - "'893693281' @ 1:1-10" - - "'87377802' @ 1:1-9" - - "'84699261' @ 1:1-9" - - "'292826090' @ 1:1-10" - - "'569171405' @ 1:1-10" - - "'387436237' @ 1:1-10" - - "'150682190' @ 1:1-10" - - "'888770419' @ 1:1-10" - - "'824696431' @ 1:1-10" - - "'765659803' @ 1:1-10" - - "'270163693' @ 1:1-10" - - "'427940240' @ 1:1-10" - - "'504997332' @ 1:1-10" - - "'337808338' @ 1:1-10" - - "'907200008' @ 1:1-10" - - "'757177889' @ 1:1-10" - - "'696697188' @ 1:1-10" - - "'41376051' @ 1:1-9" - - "'496293518' @ 1:1-10" - - "'251218820' @ 1:1-10" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out deleted file mode 100644 index c7f5f3576f..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out +++ /dev/null @@ -1,949 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Field: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: 123field - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Field: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: 456field - - Value: - Field: - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 86 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802field - - Value: - Field: - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 406 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802field - - Value: - Field: - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 340130024field - - Value: - Field: - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 158951116field - - Value: - Field: - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 155529659field - - Value: - Field: - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 642023166field - - Value: - Field: - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 228481736field - - Value: - Field: - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 469712960field - - Value: - Field: - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 929437719field - - Value: - Field: - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 721072814field - - Value: - Field: - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 363254789field - - Value: - Field: - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 906732565field - - Value: - Field: - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 288246391field - - Value: - Field: - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 724940549field - - Value: - Field: - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 487101620field - - Value: - Field: - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 261373583field - - Value: - Field: - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 891163927field - - Value: - Field: - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 743967544field - - Value: - Field: - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 8372586field - - Value: - Field: - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 461793278field - - Value: - Field: - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 806307045field - - Value: - Field: - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 122764546field - - Value: - Field: - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 356336181field - - Value: - Field: - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 158370903field - - Value: - Field: - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 774460877field - - Value: - Field: - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 557174131field - - Value: - Field: - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 492401267field - - Value: - Field: - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 893445620field - - Value: - Field: - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 957757048field - - Value: - Field: - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 721540649field - - Value: - Field: - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 390746493field - - Value: - Field: - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 211251725field - - Value: - Field: - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 938266114field - - Value: - Field: - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 156985870field - - Value: - Field: - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 703831126field - - Value: - Field: - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 729964155field - - Value: - Field: - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 988151305field - - Value: - Field: - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 320872435field - - Value: - Field: - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 719287167field - - Value: - Field: - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 152289486field - - Value: - Field: - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 740067975field - - Value: - Field: - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 728627816field - - Value: - Field: - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 385008978field - - Value: - Field: - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 553967635field - - Value: - Field: - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 71980713field - - Value: - Field: - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 519444716field - - Value: - Field: - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 116499965field - - Value: - Field: - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 717422268field - - Value: - Field: - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 18966279field - - Value: - Field: - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 22458638field - - Value: - Field: - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 857282620field - - Value: - Field: - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 920675898field - - Value: - Field: - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 762235516field - - Value: - Field: - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 469018377field - - Value: - Field: - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 199986521field - - Value: - Field: - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 536679358field - - Value: - Field: - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 591399452field - - Value: - Field: - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 83083158field - - Value: - Field: - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 599449051field - - Value: - Field: - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 445442318field - - Value: - Field: - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 585486590field - - Value: - Field: - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 209278800field - - Value: - Field: - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 873568117field - - Value: - Field: - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 664470940field - - Value: - Field: - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 465262783field - - Value: - Field: - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 605652874field - - Value: - Field: - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 376803940field - - Value: - Field: - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 965247040field - - Value: - Field: - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 598474509field - - Value: - Field: - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 845119918field - - Value: - Field: - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 648159133field - - Value: - Field: - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 669051032field - - Value: - Field: - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 800600261field - - Value: - Field: - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 434689764field - - Value: - Field: - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 520060080field - - Value: - Field: - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 804659385field - - Value: - Field: - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 537828058field - - Value: - Field: - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 716600292field - - Value: - Field: - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 387020273field - - Value: - Field: - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 199375617field - - Value: - Field: - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 680337189field - - Value: - Field: - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 818479931field - - Value: - Field: - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 893693281field - - Value: - Field: - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 87377802field - - Value: - Field: - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 84699261field - - Value: - Field: - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 292826090field - - Value: - Field: - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 569171405field - - Value: - Field: - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 387436237field - - Value: - Field: - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 150682190field - - Value: - Field: - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 888770419field - - Value: - Field: - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 824696431field - - Value: - Field: - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 765659803field - - Value: - Field: - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 270163693field - - Value: - Field: - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 427940240field - - Value: - Field: - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 504997332field - - Value: - Field: - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 337808338field - - Value: - Field: - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 907200008field - - Value: - Field: - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 757177889field - - Value: - Field: - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 696697188field - - Value: - Field: - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 41376051field - - Value: - Field: - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 496293518field - - Value: - Field: - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 251218820field diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out deleted file mode 100644 index f0d886348f..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I128 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 123i128 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I128 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 456i128 - - Value: - Integer: - - I128 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 85 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i128 - - Value: - Integer: - - I128 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 405 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i128 - - Value: - Integer: - - I128 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 340130024i128 - - Value: - Integer: - - I128 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 158951116i128 - - Value: - Integer: - - I128 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 155529659i128 - - Value: - Integer: - - I128 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 642023166i128 - - Value: - Integer: - - I128 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 228481736i128 - - Value: - Integer: - - I128 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 469712960i128 - - Value: - Integer: - - I128 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 929437719i128 - - Value: - Integer: - - I128 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 721072814i128 - - Value: - Integer: - - I128 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 363254789i128 - - Value: - Integer: - - I128 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 906732565i128 - - Value: - Integer: - - I128 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 288246391i128 - - Value: - Integer: - - I128 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 724940549i128 - - Value: - Integer: - - I128 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 487101620i128 - - Value: - Integer: - - I128 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 261373583i128 - - Value: - Integer: - - I128 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 891163927i128 - - Value: - Integer: - - I128 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 743967544i128 - - Value: - Integer: - - I128 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 8372586i128 - - Value: - Integer: - - I128 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 461793278i128 - - Value: - Integer: - - I128 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 806307045i128 - - Value: - Integer: - - I128 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 122764546i128 - - Value: - Integer: - - I128 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 356336181i128 - - Value: - Integer: - - I128 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 158370903i128 - - Value: - Integer: - - I128 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 774460877i128 - - Value: - Integer: - - I128 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 557174131i128 - - Value: - Integer: - - I128 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 492401267i128 - - Value: - Integer: - - I128 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 893445620i128 - - Value: - Integer: - - I128 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 957757048i128 - - Value: - Integer: - - I128 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 721540649i128 - - Value: - Integer: - - I128 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 390746493i128 - - Value: - Integer: - - I128 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 211251725i128 - - Value: - Integer: - - I128 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 938266114i128 - - Value: - Integer: - - I128 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 156985870i128 - - Value: - Integer: - - I128 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 703831126i128 - - Value: - Integer: - - I128 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 729964155i128 - - Value: - Integer: - - I128 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 988151305i128 - - Value: - Integer: - - I128 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 320872435i128 - - Value: - Integer: - - I128 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 719287167i128 - - Value: - Integer: - - I128 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 152289486i128 - - Value: - Integer: - - I128 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 740067975i128 - - Value: - Integer: - - I128 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 728627816i128 - - Value: - Integer: - - I128 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 385008978i128 - - Value: - Integer: - - I128 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 553967635i128 - - Value: - Integer: - - I128 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 71980713i128 - - Value: - Integer: - - I128 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 519444716i128 - - Value: - Integer: - - I128 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 116499965i128 - - Value: - Integer: - - I128 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 717422268i128 - - Value: - Integer: - - I128 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 18966279i128 - - Value: - Integer: - - I128 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 22458638i128 - - Value: - Integer: - - I128 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 857282620i128 - - Value: - Integer: - - I128 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 920675898i128 - - Value: - Integer: - - I128 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 762235516i128 - - Value: - Integer: - - I128 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 469018377i128 - - Value: - Integer: - - I128 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 199986521i128 - - Value: - Integer: - - I128 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 536679358i128 - - Value: - Integer: - - I128 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 591399452i128 - - Value: - Integer: - - I128 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 83083158i128 - - Value: - Integer: - - I128 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 599449051i128 - - Value: - Integer: - - I128 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 445442318i128 - - Value: - Integer: - - I128 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 585486590i128 - - Value: - Integer: - - I128 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 209278800i128 - - Value: - Integer: - - I128 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 873568117i128 - - Value: - Integer: - - I128 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 664470940i128 - - Value: - Integer: - - I128 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 465262783i128 - - Value: - Integer: - - I128 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 605652874i128 - - Value: - Integer: - - I128 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 376803940i128 - - Value: - Integer: - - I128 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 965247040i128 - - Value: - Integer: - - I128 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 598474509i128 - - Value: - Integer: - - I128 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 845119918i128 - - Value: - Integer: - - I128 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 648159133i128 - - Value: - Integer: - - I128 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 669051032i128 - - Value: - Integer: - - I128 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 800600261i128 - - Value: - Integer: - - I128 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 434689764i128 - - Value: - Integer: - - I128 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 520060080i128 - - Value: - Integer: - - I128 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 804659385i128 - - Value: - Integer: - - I128 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 537828058i128 - - Value: - Integer: - - I128 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 716600292i128 - - Value: - Integer: - - I128 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 387020273i128 - - Value: - Integer: - - I128 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 199375617i128 - - Value: - Integer: - - I128 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 680337189i128 - - Value: - Integer: - - I128 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 818479931i128 - - Value: - Integer: - - I128 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 893693281i128 - - Value: - Integer: - - I128 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 87377802i128 - - Value: - Integer: - - I128 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 84699261i128 - - Value: - Integer: - - I128 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 292826090i128 - - Value: - Integer: - - I128 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 569171405i128 - - Value: - Integer: - - I128 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 387436237i128 - - Value: - Integer: - - I128 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 150682190i128 - - Value: - Integer: - - I128 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 888770419i128 - - Value: - Integer: - - I128 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 824696431i128 - - Value: - Integer: - - I128 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 765659803i128 - - Value: - Integer: - - I128 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 270163693i128 - - Value: - Integer: - - I128 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 427940240i128 - - Value: - Integer: - - I128 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 504997332i128 - - Value: - Integer: - - I128 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 337808338i128 - - Value: - Integer: - - I128 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 907200008i128 - - Value: - Integer: - - I128 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 757177889i128 - - Value: - Integer: - - I128 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 696697188i128 - - Value: - Integer: - - I128 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 41376051i128 - - Value: - Integer: - - I128 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 496293518i128 - - Value: - Integer: - - I128 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 251218820i128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out deleted file mode 100644 index 82a8fc8b1b..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I16 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123i16 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I16 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456i16 - - Value: - Integer: - - I16 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i16 - - Value: - Integer: - - I16 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i16 - - Value: - Integer: - - I16 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024i16 - - Value: - Integer: - - I16 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116i16 - - Value: - Integer: - - I16 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659i16 - - Value: - Integer: - - I16 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166i16 - - Value: - Integer: - - I16 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736i16 - - Value: - Integer: - - I16 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960i16 - - Value: - Integer: - - I16 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719i16 - - Value: - Integer: - - I16 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814i16 - - Value: - Integer: - - I16 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789i16 - - Value: - Integer: - - I16 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565i16 - - Value: - Integer: - - I16 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391i16 - - Value: - Integer: - - I16 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549i16 - - Value: - Integer: - - I16 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620i16 - - Value: - Integer: - - I16 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583i16 - - Value: - Integer: - - I16 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927i16 - - Value: - Integer: - - I16 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544i16 - - Value: - Integer: - - I16 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586i16 - - Value: - Integer: - - I16 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278i16 - - Value: - Integer: - - I16 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045i16 - - Value: - Integer: - - I16 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546i16 - - Value: - Integer: - - I16 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181i16 - - Value: - Integer: - - I16 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903i16 - - Value: - Integer: - - I16 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877i16 - - Value: - Integer: - - I16 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131i16 - - Value: - Integer: - - I16 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267i16 - - Value: - Integer: - - I16 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620i16 - - Value: - Integer: - - I16 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048i16 - - Value: - Integer: - - I16 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649i16 - - Value: - Integer: - - I16 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493i16 - - Value: - Integer: - - I16 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725i16 - - Value: - Integer: - - I16 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114i16 - - Value: - Integer: - - I16 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870i16 - - Value: - Integer: - - I16 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126i16 - - Value: - Integer: - - I16 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155i16 - - Value: - Integer: - - I16 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305i16 - - Value: - Integer: - - I16 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435i16 - - Value: - Integer: - - I16 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167i16 - - Value: - Integer: - - I16 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486i16 - - Value: - Integer: - - I16 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975i16 - - Value: - Integer: - - I16 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816i16 - - Value: - Integer: - - I16 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978i16 - - Value: - Integer: - - I16 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635i16 - - Value: - Integer: - - I16 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713i16 - - Value: - Integer: - - I16 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716i16 - - Value: - Integer: - - I16 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965i16 - - Value: - Integer: - - I16 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268i16 - - Value: - Integer: - - I16 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279i16 - - Value: - Integer: - - I16 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638i16 - - Value: - Integer: - - I16 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620i16 - - Value: - Integer: - - I16 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898i16 - - Value: - Integer: - - I16 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516i16 - - Value: - Integer: - - I16 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377i16 - - Value: - Integer: - - I16 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521i16 - - Value: - Integer: - - I16 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358i16 - - Value: - Integer: - - I16 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452i16 - - Value: - Integer: - - I16 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158i16 - - Value: - Integer: - - I16 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051i16 - - Value: - Integer: - - I16 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318i16 - - Value: - Integer: - - I16 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590i16 - - Value: - Integer: - - I16 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800i16 - - Value: - Integer: - - I16 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117i16 - - Value: - Integer: - - I16 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940i16 - - Value: - Integer: - - I16 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783i16 - - Value: - Integer: - - I16 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874i16 - - Value: - Integer: - - I16 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940i16 - - Value: - Integer: - - I16 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040i16 - - Value: - Integer: - - I16 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509i16 - - Value: - Integer: - - I16 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918i16 - - Value: - Integer: - - I16 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133i16 - - Value: - Integer: - - I16 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032i16 - - Value: - Integer: - - I16 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261i16 - - Value: - Integer: - - I16 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764i16 - - Value: - Integer: - - I16 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080i16 - - Value: - Integer: - - I16 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385i16 - - Value: - Integer: - - I16 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058i16 - - Value: - Integer: - - I16 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292i16 - - Value: - Integer: - - I16 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273i16 - - Value: - Integer: - - I16 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617i16 - - Value: - Integer: - - I16 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189i16 - - Value: - Integer: - - I16 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931i16 - - Value: - Integer: - - I16 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281i16 - - Value: - Integer: - - I16 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802i16 - - Value: - Integer: - - I16 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261i16 - - Value: - Integer: - - I16 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090i16 - - Value: - Integer: - - I16 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405i16 - - Value: - Integer: - - I16 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237i16 - - Value: - Integer: - - I16 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190i16 - - Value: - Integer: - - I16 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419i16 - - Value: - Integer: - - I16 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431i16 - - Value: - Integer: - - I16 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803i16 - - Value: - Integer: - - I16 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693i16 - - Value: - Integer: - - I16 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240i16 - - Value: - Integer: - - I16 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332i16 - - Value: - Integer: - - I16 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338i16 - - Value: - Integer: - - I16 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008i16 - - Value: - Integer: - - I16 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889i16 - - Value: - Integer: - - I16 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188i16 - - Value: - Integer: - - I16 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051i16 - - Value: - Integer: - - I16 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518i16 - - Value: - Integer: - - I16 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820i16 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out deleted file mode 100644 index 82d66bdbf5..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I32 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123i32 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I32 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456i32 - - Value: - Integer: - - I32 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i32 - - Value: - Integer: - - I32 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i32 - - Value: - Integer: - - I32 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024i32 - - Value: - Integer: - - I32 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116i32 - - Value: - Integer: - - I32 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659i32 - - Value: - Integer: - - I32 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166i32 - - Value: - Integer: - - I32 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736i32 - - Value: - Integer: - - I32 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960i32 - - Value: - Integer: - - I32 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719i32 - - Value: - Integer: - - I32 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814i32 - - Value: - Integer: - - I32 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789i32 - - Value: - Integer: - - I32 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565i32 - - Value: - Integer: - - I32 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391i32 - - Value: - Integer: - - I32 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549i32 - - Value: - Integer: - - I32 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620i32 - - Value: - Integer: - - I32 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583i32 - - Value: - Integer: - - I32 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927i32 - - Value: - Integer: - - I32 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544i32 - - Value: - Integer: - - I32 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586i32 - - Value: - Integer: - - I32 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278i32 - - Value: - Integer: - - I32 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045i32 - - Value: - Integer: - - I32 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546i32 - - Value: - Integer: - - I32 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181i32 - - Value: - Integer: - - I32 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903i32 - - Value: - Integer: - - I32 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877i32 - - Value: - Integer: - - I32 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131i32 - - Value: - Integer: - - I32 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267i32 - - Value: - Integer: - - I32 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620i32 - - Value: - Integer: - - I32 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048i32 - - Value: - Integer: - - I32 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649i32 - - Value: - Integer: - - I32 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493i32 - - Value: - Integer: - - I32 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725i32 - - Value: - Integer: - - I32 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114i32 - - Value: - Integer: - - I32 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870i32 - - Value: - Integer: - - I32 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126i32 - - Value: - Integer: - - I32 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155i32 - - Value: - Integer: - - I32 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305i32 - - Value: - Integer: - - I32 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435i32 - - Value: - Integer: - - I32 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167i32 - - Value: - Integer: - - I32 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486i32 - - Value: - Integer: - - I32 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975i32 - - Value: - Integer: - - I32 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816i32 - - Value: - Integer: - - I32 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978i32 - - Value: - Integer: - - I32 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635i32 - - Value: - Integer: - - I32 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713i32 - - Value: - Integer: - - I32 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716i32 - - Value: - Integer: - - I32 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965i32 - - Value: - Integer: - - I32 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268i32 - - Value: - Integer: - - I32 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279i32 - - Value: - Integer: - - I32 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638i32 - - Value: - Integer: - - I32 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620i32 - - Value: - Integer: - - I32 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898i32 - - Value: - Integer: - - I32 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516i32 - - Value: - Integer: - - I32 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377i32 - - Value: - Integer: - - I32 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521i32 - - Value: - Integer: - - I32 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358i32 - - Value: - Integer: - - I32 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452i32 - - Value: - Integer: - - I32 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158i32 - - Value: - Integer: - - I32 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051i32 - - Value: - Integer: - - I32 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318i32 - - Value: - Integer: - - I32 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590i32 - - Value: - Integer: - - I32 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800i32 - - Value: - Integer: - - I32 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117i32 - - Value: - Integer: - - I32 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940i32 - - Value: - Integer: - - I32 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783i32 - - Value: - Integer: - - I32 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874i32 - - Value: - Integer: - - I32 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940i32 - - Value: - Integer: - - I32 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040i32 - - Value: - Integer: - - I32 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509i32 - - Value: - Integer: - - I32 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918i32 - - Value: - Integer: - - I32 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133i32 - - Value: - Integer: - - I32 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032i32 - - Value: - Integer: - - I32 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261i32 - - Value: - Integer: - - I32 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764i32 - - Value: - Integer: - - I32 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080i32 - - Value: - Integer: - - I32 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385i32 - - Value: - Integer: - - I32 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058i32 - - Value: - Integer: - - I32 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292i32 - - Value: - Integer: - - I32 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273i32 - - Value: - Integer: - - I32 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617i32 - - Value: - Integer: - - I32 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189i32 - - Value: - Integer: - - I32 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931i32 - - Value: - Integer: - - I32 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281i32 - - Value: - Integer: - - I32 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802i32 - - Value: - Integer: - - I32 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261i32 - - Value: - Integer: - - I32 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090i32 - - Value: - Integer: - - I32 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405i32 - - Value: - Integer: - - I32 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237i32 - - Value: - Integer: - - I32 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190i32 - - Value: - Integer: - - I32 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419i32 - - Value: - Integer: - - I32 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431i32 - - Value: - Integer: - - I32 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803i32 - - Value: - Integer: - - I32 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693i32 - - Value: - Integer: - - I32 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240i32 - - Value: - Integer: - - I32 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332i32 - - Value: - Integer: - - I32 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338i32 - - Value: - Integer: - - I32 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008i32 - - Value: - Integer: - - I32 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889i32 - - Value: - Integer: - - I32 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188i32 - - Value: - Integer: - - I32 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051i32 - - Value: - Integer: - - I32 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518i32 - - Value: - Integer: - - I32 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820i32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out deleted file mode 100644 index 24949c2f99..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I64 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123i64 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I64 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456i64 - - Value: - Integer: - - I64 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i64 - - Value: - Integer: - - I64 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i64 - - Value: - Integer: - - I64 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024i64 - - Value: - Integer: - - I64 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116i64 - - Value: - Integer: - - I64 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659i64 - - Value: - Integer: - - I64 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166i64 - - Value: - Integer: - - I64 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736i64 - - Value: - Integer: - - I64 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960i64 - - Value: - Integer: - - I64 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719i64 - - Value: - Integer: - - I64 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814i64 - - Value: - Integer: - - I64 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789i64 - - Value: - Integer: - - I64 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565i64 - - Value: - Integer: - - I64 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391i64 - - Value: - Integer: - - I64 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549i64 - - Value: - Integer: - - I64 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620i64 - - Value: - Integer: - - I64 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583i64 - - Value: - Integer: - - I64 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927i64 - - Value: - Integer: - - I64 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544i64 - - Value: - Integer: - - I64 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586i64 - - Value: - Integer: - - I64 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278i64 - - Value: - Integer: - - I64 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045i64 - - Value: - Integer: - - I64 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546i64 - - Value: - Integer: - - I64 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181i64 - - Value: - Integer: - - I64 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903i64 - - Value: - Integer: - - I64 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877i64 - - Value: - Integer: - - I64 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131i64 - - Value: - Integer: - - I64 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267i64 - - Value: - Integer: - - I64 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620i64 - - Value: - Integer: - - I64 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048i64 - - Value: - Integer: - - I64 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649i64 - - Value: - Integer: - - I64 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493i64 - - Value: - Integer: - - I64 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725i64 - - Value: - Integer: - - I64 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114i64 - - Value: - Integer: - - I64 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870i64 - - Value: - Integer: - - I64 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126i64 - - Value: - Integer: - - I64 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155i64 - - Value: - Integer: - - I64 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305i64 - - Value: - Integer: - - I64 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435i64 - - Value: - Integer: - - I64 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167i64 - - Value: - Integer: - - I64 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486i64 - - Value: - Integer: - - I64 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975i64 - - Value: - Integer: - - I64 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816i64 - - Value: - Integer: - - I64 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978i64 - - Value: - Integer: - - I64 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635i64 - - Value: - Integer: - - I64 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713i64 - - Value: - Integer: - - I64 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716i64 - - Value: - Integer: - - I64 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965i64 - - Value: - Integer: - - I64 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268i64 - - Value: - Integer: - - I64 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279i64 - - Value: - Integer: - - I64 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638i64 - - Value: - Integer: - - I64 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620i64 - - Value: - Integer: - - I64 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898i64 - - Value: - Integer: - - I64 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516i64 - - Value: - Integer: - - I64 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377i64 - - Value: - Integer: - - I64 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521i64 - - Value: - Integer: - - I64 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358i64 - - Value: - Integer: - - I64 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452i64 - - Value: - Integer: - - I64 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158i64 - - Value: - Integer: - - I64 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051i64 - - Value: - Integer: - - I64 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318i64 - - Value: - Integer: - - I64 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590i64 - - Value: - Integer: - - I64 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800i64 - - Value: - Integer: - - I64 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117i64 - - Value: - Integer: - - I64 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940i64 - - Value: - Integer: - - I64 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783i64 - - Value: - Integer: - - I64 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874i64 - - Value: - Integer: - - I64 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940i64 - - Value: - Integer: - - I64 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040i64 - - Value: - Integer: - - I64 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509i64 - - Value: - Integer: - - I64 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918i64 - - Value: - Integer: - - I64 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133i64 - - Value: - Integer: - - I64 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032i64 - - Value: - Integer: - - I64 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261i64 - - Value: - Integer: - - I64 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764i64 - - Value: - Integer: - - I64 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080i64 - - Value: - Integer: - - I64 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385i64 - - Value: - Integer: - - I64 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058i64 - - Value: - Integer: - - I64 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292i64 - - Value: - Integer: - - I64 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273i64 - - Value: - Integer: - - I64 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617i64 - - Value: - Integer: - - I64 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189i64 - - Value: - Integer: - - I64 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931i64 - - Value: - Integer: - - I64 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281i64 - - Value: - Integer: - - I64 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802i64 - - Value: - Integer: - - I64 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261i64 - - Value: - Integer: - - I64 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090i64 - - Value: - Integer: - - I64 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405i64 - - Value: - Integer: - - I64 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237i64 - - Value: - Integer: - - I64 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190i64 - - Value: - Integer: - - I64 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419i64 - - Value: - Integer: - - I64 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431i64 - - Value: - Integer: - - I64 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803i64 - - Value: - Integer: - - I64 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693i64 - - Value: - Integer: - - I64 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240i64 - - Value: - Integer: - - I64 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332i64 - - Value: - Integer: - - I64 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338i64 - - Value: - Integer: - - I64 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008i64 - - Value: - Integer: - - I64 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889i64 - - Value: - Integer: - - I64 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188i64 - - Value: - Integer: - - I64 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051i64 - - Value: - Integer: - - I64 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518i64 - - Value: - Integer: - - I64 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820i64 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out deleted file mode 100644 index 7b06304a6a..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - I8 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 123i8 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - I8 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 456i8 - - Value: - Integer: - - I8 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 83 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i8 - - Value: - Integer: - - I8 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 403 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i8 - - Value: - Integer: - - I8 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 340130024i8 - - Value: - Integer: - - I8 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158951116i8 - - Value: - Integer: - - I8 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 155529659i8 - - Value: - Integer: - - I8 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 642023166i8 - - Value: - Integer: - - I8 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 228481736i8 - - Value: - Integer: - - I8 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469712960i8 - - Value: - Integer: - - I8 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 929437719i8 - - Value: - Integer: - - I8 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721072814i8 - - Value: - Integer: - - I8 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 363254789i8 - - Value: - Integer: - - I8 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 906732565i8 - - Value: - Integer: - - I8 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 288246391i8 - - Value: - Integer: - - I8 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 724940549i8 - - Value: - Integer: - - I8 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 487101620i8 - - Value: - Integer: - - I8 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 261373583i8 - - Value: - Integer: - - I8 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 891163927i8 - - Value: - Integer: - - I8 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 743967544i8 - - Value: - Integer: - - I8 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 8372586i8 - - Value: - Integer: - - I8 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 461793278i8 - - Value: - Integer: - - I8 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 806307045i8 - - Value: - Integer: - - I8 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 122764546i8 - - Value: - Integer: - - I8 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 356336181i8 - - Value: - Integer: - - I8 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158370903i8 - - Value: - Integer: - - I8 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 774460877i8 - - Value: - Integer: - - I8 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 557174131i8 - - Value: - Integer: - - I8 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 492401267i8 - - Value: - Integer: - - I8 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893445620i8 - - Value: - Integer: - - I8 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 957757048i8 - - Value: - Integer: - - I8 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721540649i8 - - Value: - Integer: - - I8 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 390746493i8 - - Value: - Integer: - - I8 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 211251725i8 - - Value: - Integer: - - I8 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 938266114i8 - - Value: - Integer: - - I8 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 156985870i8 - - Value: - Integer: - - I8 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 703831126i8 - - Value: - Integer: - - I8 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 729964155i8 - - Value: - Integer: - - I8 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 988151305i8 - - Value: - Integer: - - I8 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 320872435i8 - - Value: - Integer: - - I8 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 719287167i8 - - Value: - Integer: - - I8 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 152289486i8 - - Value: - Integer: - - I8 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 740067975i8 - - Value: - Integer: - - I8 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 728627816i8 - - Value: - Integer: - - I8 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 385008978i8 - - Value: - Integer: - - I8 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 553967635i8 - - Value: - Integer: - - I8 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 71980713i8 - - Value: - Integer: - - I8 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 519444716i8 - - Value: - Integer: - - I8 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 116499965i8 - - Value: - Integer: - - I8 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 717422268i8 - - Value: - Integer: - - I8 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 18966279i8 - - Value: - Integer: - - I8 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 22458638i8 - - Value: - Integer: - - I8 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 857282620i8 - - Value: - Integer: - - I8 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 920675898i8 - - Value: - Integer: - - I8 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 762235516i8 - - Value: - Integer: - - I8 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469018377i8 - - Value: - Integer: - - I8 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199986521i8 - - Value: - Integer: - - I8 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 536679358i8 - - Value: - Integer: - - I8 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 591399452i8 - - Value: - Integer: - - I8 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 83083158i8 - - Value: - Integer: - - I8 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 599449051i8 - - Value: - Integer: - - I8 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 445442318i8 - - Value: - Integer: - - I8 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 585486590i8 - - Value: - Integer: - - I8 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 209278800i8 - - Value: - Integer: - - I8 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 873568117i8 - - Value: - Integer: - - I8 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 664470940i8 - - Value: - Integer: - - I8 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 465262783i8 - - Value: - Integer: - - I8 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 605652874i8 - - Value: - Integer: - - I8 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 376803940i8 - - Value: - Integer: - - I8 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 965247040i8 - - Value: - Integer: - - I8 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 598474509i8 - - Value: - Integer: - - I8 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 845119918i8 - - Value: - Integer: - - I8 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 648159133i8 - - Value: - Integer: - - I8 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 669051032i8 - - Value: - Integer: - - I8 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 800600261i8 - - Value: - Integer: - - I8 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 434689764i8 - - Value: - Integer: - - I8 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 520060080i8 - - Value: - Integer: - - I8 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 804659385i8 - - Value: - Integer: - - I8 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 537828058i8 - - Value: - Integer: - - I8 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 716600292i8 - - Value: - Integer: - - I8 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387020273i8 - - Value: - Integer: - - I8 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199375617i8 - - Value: - Integer: - - I8 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 680337189i8 - - Value: - Integer: - - I8 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 818479931i8 - - Value: - Integer: - - I8 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893693281i8 - - Value: - Integer: - - I8 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 87377802i8 - - Value: - Integer: - - I8 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 84699261i8 - - Value: - Integer: - - I8 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 292826090i8 - - Value: - Integer: - - I8 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 569171405i8 - - Value: - Integer: - - I8 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387436237i8 - - Value: - Integer: - - I8 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 150682190i8 - - Value: - Integer: - - I8 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 888770419i8 - - Value: - Integer: - - I8 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 824696431i8 - - Value: - Integer: - - I8 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 765659803i8 - - Value: - Integer: - - I8 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 270163693i8 - - Value: - Integer: - - I8 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 427940240i8 - - Value: - Integer: - - I8 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 504997332i8 - - Value: - Integer: - - I8 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 337808338i8 - - Value: - Integer: - - I8 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 907200008i8 - - Value: - Integer: - - I8 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 757177889i8 - - Value: - Integer: - - I8 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 696697188i8 - - Value: - Integer: - - I8 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 41376051i8 - - Value: - Integer: - - I8 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 496293518i8 - - Value: - Integer: - - I8 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 251218820i8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out deleted file mode 100644 index 43e759dcc6..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out +++ /dev/null @@ -1,949 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Implicit: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "456" - - Value: - Implicit: - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 81 - path: test - content: "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - Value: - Implicit: - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 401 - path: test - content: "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - Value: - Implicit: - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "340130024" - - Value: - Implicit: - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "158951116" - - Value: - Implicit: - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "155529659" - - Value: - Implicit: - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "642023166" - - Value: - Implicit: - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "228481736" - - Value: - Implicit: - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "469712960" - - Value: - Implicit: - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "929437719" - - Value: - Implicit: - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "721072814" - - Value: - Implicit: - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "363254789" - - Value: - Implicit: - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "906732565" - - Value: - Implicit: - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "288246391" - - Value: - Implicit: - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "724940549" - - Value: - Implicit: - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "487101620" - - Value: - Implicit: - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "261373583" - - Value: - Implicit: - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "891163927" - - Value: - Implicit: - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "743967544" - - Value: - Implicit: - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "8372586" - - Value: - Implicit: - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "461793278" - - Value: - Implicit: - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "806307045" - - Value: - Implicit: - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "122764546" - - Value: - Implicit: - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "356336181" - - Value: - Implicit: - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "158370903" - - Value: - Implicit: - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "774460877" - - Value: - Implicit: - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "557174131" - - Value: - Implicit: - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "492401267" - - Value: - Implicit: - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "893445620" - - Value: - Implicit: - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "957757048" - - Value: - Implicit: - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "721540649" - - Value: - Implicit: - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "390746493" - - Value: - Implicit: - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "211251725" - - Value: - Implicit: - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "938266114" - - Value: - Implicit: - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "156985870" - - Value: - Implicit: - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "703831126" - - Value: - Implicit: - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "729964155" - - Value: - Implicit: - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "988151305" - - Value: - Implicit: - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "320872435" - - Value: - Implicit: - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "719287167" - - Value: - Implicit: - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "152289486" - - Value: - Implicit: - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "740067975" - - Value: - Implicit: - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "728627816" - - Value: - Implicit: - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "385008978" - - Value: - Implicit: - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "553967635" - - Value: - Implicit: - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "71980713" - - Value: - Implicit: - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "519444716" - - Value: - Implicit: - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "116499965" - - Value: - Implicit: - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "717422268" - - Value: - Implicit: - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "18966279" - - Value: - Implicit: - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "22458638" - - Value: - Implicit: - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "857282620" - - Value: - Implicit: - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "920675898" - - Value: - Implicit: - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "762235516" - - Value: - Implicit: - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "469018377" - - Value: - Implicit: - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "199986521" - - Value: - Implicit: - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "536679358" - - Value: - Implicit: - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "591399452" - - Value: - Implicit: - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "83083158" - - Value: - Implicit: - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "599449051" - - Value: - Implicit: - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "445442318" - - Value: - Implicit: - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "585486590" - - Value: - Implicit: - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "209278800" - - Value: - Implicit: - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "873568117" - - Value: - Implicit: - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "664470940" - - Value: - Implicit: - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "465262783" - - Value: - Implicit: - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "605652874" - - Value: - Implicit: - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "376803940" - - Value: - Implicit: - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "965247040" - - Value: - Implicit: - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "598474509" - - Value: - Implicit: - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "845119918" - - Value: - Implicit: - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "648159133" - - Value: - Implicit: - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "669051032" - - Value: - Implicit: - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "800600261" - - Value: - Implicit: - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "434689764" - - Value: - Implicit: - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "520060080" - - Value: - Implicit: - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "804659385" - - Value: - Implicit: - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "537828058" - - Value: - Implicit: - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "716600292" - - Value: - Implicit: - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "387020273" - - Value: - Implicit: - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "199375617" - - Value: - Implicit: - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "680337189" - - Value: - Implicit: - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "818479931" - - Value: - Implicit: - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "893693281" - - Value: - Implicit: - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "87377802" - - Value: - Implicit: - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "84699261" - - Value: - Implicit: - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "292826090" - - Value: - Implicit: - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "569171405" - - Value: - Implicit: - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "387436237" - - Value: - Implicit: - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "150682190" - - Value: - Implicit: - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "888770419" - - Value: - Implicit: - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "824696431" - - Value: - Implicit: - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "765659803" - - Value: - Implicit: - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "270163693" - - Value: - Implicit: - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "427940240" - - Value: - Implicit: - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "504997332" - - Value: - Implicit: - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "337808338" - - Value: - Implicit: - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "907200008" - - Value: - Implicit: - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "757177889" - - Value: - Implicit: - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "696697188" - - Value: - Implicit: - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "41376051" - - Value: - Implicit: - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "496293518" - - Value: - Implicit: - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "251218820" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out deleted file mode 100644 index 9e959269ac..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Group: - Single: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: 123group - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Group: - Single: - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: 456group - - Value: - Group: - Single: - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 86 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802group - - Value: - Group: - Single: - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 406 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802group - - Value: - Group: - Single: - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 340130024group - - Value: - Group: - Single: - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 158951116group - - Value: - Group: - Single: - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 155529659group - - Value: - Group: - Single: - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 642023166group - - Value: - Group: - Single: - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 228481736group - - Value: - Group: - Single: - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 469712960group - - Value: - Group: - Single: - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 929437719group - - Value: - Group: - Single: - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 721072814group - - Value: - Group: - Single: - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 363254789group - - Value: - Group: - Single: - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 906732565group - - Value: - Group: - Single: - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 288246391group - - Value: - Group: - Single: - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 724940549group - - Value: - Group: - Single: - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 487101620group - - Value: - Group: - Single: - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 261373583group - - Value: - Group: - Single: - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 891163927group - - Value: - Group: - Single: - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 743967544group - - Value: - Group: - Single: - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 8372586group - - Value: - Group: - Single: - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 461793278group - - Value: - Group: - Single: - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 806307045group - - Value: - Group: - Single: - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 122764546group - - Value: - Group: - Single: - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 356336181group - - Value: - Group: - Single: - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 158370903group - - Value: - Group: - Single: - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 774460877group - - Value: - Group: - Single: - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 557174131group - - Value: - Group: - Single: - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 492401267group - - Value: - Group: - Single: - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 893445620group - - Value: - Group: - Single: - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 957757048group - - Value: - Group: - Single: - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 721540649group - - Value: - Group: - Single: - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 390746493group - - Value: - Group: - Single: - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 211251725group - - Value: - Group: - Single: - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 938266114group - - Value: - Group: - Single: - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 156985870group - - Value: - Group: - Single: - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 703831126group - - Value: - Group: - Single: - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 729964155group - - Value: - Group: - Single: - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 988151305group - - Value: - Group: - Single: - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 320872435group - - Value: - Group: - Single: - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 719287167group - - Value: - Group: - Single: - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 152289486group - - Value: - Group: - Single: - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 740067975group - - Value: - Group: - Single: - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 728627816group - - Value: - Group: - Single: - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 385008978group - - Value: - Group: - Single: - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 553967635group - - Value: - Group: - Single: - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 71980713group - - Value: - Group: - Single: - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 519444716group - - Value: - Group: - Single: - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 116499965group - - Value: - Group: - Single: - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 717422268group - - Value: - Group: - Single: - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 18966279group - - Value: - Group: - Single: - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 22458638group - - Value: - Group: - Single: - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 857282620group - - Value: - Group: - Single: - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 920675898group - - Value: - Group: - Single: - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 762235516group - - Value: - Group: - Single: - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 469018377group - - Value: - Group: - Single: - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 199986521group - - Value: - Group: - Single: - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 536679358group - - Value: - Group: - Single: - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 591399452group - - Value: - Group: - Single: - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 83083158group - - Value: - Group: - Single: - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 599449051group - - Value: - Group: - Single: - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 445442318group - - Value: - Group: - Single: - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 585486590group - - Value: - Group: - Single: - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 209278800group - - Value: - Group: - Single: - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 873568117group - - Value: - Group: - Single: - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 664470940group - - Value: - Group: - Single: - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 465262783group - - Value: - Group: - Single: - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 605652874group - - Value: - Group: - Single: - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 376803940group - - Value: - Group: - Single: - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 965247040group - - Value: - Group: - Single: - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 598474509group - - Value: - Group: - Single: - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 845119918group - - Value: - Group: - Single: - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 648159133group - - Value: - Group: - Single: - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 669051032group - - Value: - Group: - Single: - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 800600261group - - Value: - Group: - Single: - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 434689764group - - Value: - Group: - Single: - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 520060080group - - Value: - Group: - Single: - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 804659385group - - Value: - Group: - Single: - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 537828058group - - Value: - Group: - Single: - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 716600292group - - Value: - Group: - Single: - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 387020273group - - Value: - Group: - Single: - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 199375617group - - Value: - Group: - Single: - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 680337189group - - Value: - Group: - Single: - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 818479931group - - Value: - Group: - Single: - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 893693281group - - Value: - Group: - Single: - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 87377802group - - Value: - Group: - Single: - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 84699261group - - Value: - Group: - Single: - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 292826090group - - Value: - Group: - Single: - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 569171405group - - Value: - Group: - Single: - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 387436237group - - Value: - Group: - Single: - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 150682190group - - Value: - Group: - Single: - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 888770419group - - Value: - Group: - Single: - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 824696431group - - Value: - Group: - Single: - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 765659803group - - Value: - Group: - Single: - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 270163693group - - Value: - Group: - Single: - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 427940240group - - Value: - Group: - Single: - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 504997332group - - Value: - Group: - Single: - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 337808338group - - Value: - Group: - Single: - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 907200008group - - Value: - Group: - Single: - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 757177889group - - Value: - Group: - Single: - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 696697188group - - Value: - Group: - Single: - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 41376051group - - Value: - Group: - Single: - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 496293518group - - Value: - Group: - Single: - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: 251218820group diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out deleted file mode 100644 index f1048e6469..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U128 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 123u128 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U128 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: 456u128 - - Value: - Integer: - - U128 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 85 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u128 - - Value: - Integer: - - U128 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 405 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u128 - - Value: - Integer: - - U128 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 340130024u128 - - Value: - Integer: - - U128 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 158951116u128 - - Value: - Integer: - - U128 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 155529659u128 - - Value: - Integer: - - U128 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 642023166u128 - - Value: - Integer: - - U128 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 228481736u128 - - Value: - Integer: - - U128 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 469712960u128 - - Value: - Integer: - - U128 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 929437719u128 - - Value: - Integer: - - U128 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 721072814u128 - - Value: - Integer: - - U128 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 363254789u128 - - Value: - Integer: - - U128 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 906732565u128 - - Value: - Integer: - - U128 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 288246391u128 - - Value: - Integer: - - U128 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 724940549u128 - - Value: - Integer: - - U128 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 487101620u128 - - Value: - Integer: - - U128 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 261373583u128 - - Value: - Integer: - - U128 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 891163927u128 - - Value: - Integer: - - U128 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 743967544u128 - - Value: - Integer: - - U128 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 8372586u128 - - Value: - Integer: - - U128 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 461793278u128 - - Value: - Integer: - - U128 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 806307045u128 - - Value: - Integer: - - U128 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 122764546u128 - - Value: - Integer: - - U128 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 356336181u128 - - Value: - Integer: - - U128 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 158370903u128 - - Value: - Integer: - - U128 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 774460877u128 - - Value: - Integer: - - U128 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 557174131u128 - - Value: - Integer: - - U128 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 492401267u128 - - Value: - Integer: - - U128 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 893445620u128 - - Value: - Integer: - - U128 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 957757048u128 - - Value: - Integer: - - U128 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 721540649u128 - - Value: - Integer: - - U128 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 390746493u128 - - Value: - Integer: - - U128 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 211251725u128 - - Value: - Integer: - - U128 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 938266114u128 - - Value: - Integer: - - U128 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 156985870u128 - - Value: - Integer: - - U128 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 703831126u128 - - Value: - Integer: - - U128 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 729964155u128 - - Value: - Integer: - - U128 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 988151305u128 - - Value: - Integer: - - U128 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 320872435u128 - - Value: - Integer: - - U128 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 719287167u128 - - Value: - Integer: - - U128 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 152289486u128 - - Value: - Integer: - - U128 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 740067975u128 - - Value: - Integer: - - U128 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 728627816u128 - - Value: - Integer: - - U128 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 385008978u128 - - Value: - Integer: - - U128 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 553967635u128 - - Value: - Integer: - - U128 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 71980713u128 - - Value: - Integer: - - U128 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 519444716u128 - - Value: - Integer: - - U128 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 116499965u128 - - Value: - Integer: - - U128 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 717422268u128 - - Value: - Integer: - - U128 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 18966279u128 - - Value: - Integer: - - U128 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 22458638u128 - - Value: - Integer: - - U128 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 857282620u128 - - Value: - Integer: - - U128 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 920675898u128 - - Value: - Integer: - - U128 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 762235516u128 - - Value: - Integer: - - U128 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 469018377u128 - - Value: - Integer: - - U128 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 199986521u128 - - Value: - Integer: - - U128 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 536679358u128 - - Value: - Integer: - - U128 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 591399452u128 - - Value: - Integer: - - U128 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 83083158u128 - - Value: - Integer: - - U128 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 599449051u128 - - Value: - Integer: - - U128 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 445442318u128 - - Value: - Integer: - - U128 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 585486590u128 - - Value: - Integer: - - U128 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 209278800u128 - - Value: - Integer: - - U128 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 873568117u128 - - Value: - Integer: - - U128 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 664470940u128 - - Value: - Integer: - - U128 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 465262783u128 - - Value: - Integer: - - U128 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 605652874u128 - - Value: - Integer: - - U128 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 376803940u128 - - Value: - Integer: - - U128 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 965247040u128 - - Value: - Integer: - - U128 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 598474509u128 - - Value: - Integer: - - U128 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 845119918u128 - - Value: - Integer: - - U128 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 648159133u128 - - Value: - Integer: - - U128 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 669051032u128 - - Value: - Integer: - - U128 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 800600261u128 - - Value: - Integer: - - U128 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 434689764u128 - - Value: - Integer: - - U128 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 520060080u128 - - Value: - Integer: - - U128 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 804659385u128 - - Value: - Integer: - - U128 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 537828058u128 - - Value: - Integer: - - U128 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 716600292u128 - - Value: - Integer: - - U128 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 387020273u128 - - Value: - Integer: - - U128 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 199375617u128 - - Value: - Integer: - - U128 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 680337189u128 - - Value: - Integer: - - U128 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 818479931u128 - - Value: - Integer: - - U128 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 893693281u128 - - Value: - Integer: - - U128 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 87377802u128 - - Value: - Integer: - - U128 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 84699261u128 - - Value: - Integer: - - U128 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 292826090u128 - - Value: - Integer: - - U128 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 569171405u128 - - Value: - Integer: - - U128 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 387436237u128 - - Value: - Integer: - - U128 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 150682190u128 - - Value: - Integer: - - U128 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 888770419u128 - - Value: - Integer: - - U128 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 824696431u128 - - Value: - Integer: - - U128 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 765659803u128 - - Value: - Integer: - - U128 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 270163693u128 - - Value: - Integer: - - U128 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 427940240u128 - - Value: - Integer: - - U128 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 504997332u128 - - Value: - Integer: - - U128 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 337808338u128 - - Value: - Integer: - - U128 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 907200008u128 - - Value: - Integer: - - U128 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 757177889u128 - - Value: - Integer: - - U128 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 696697188u128 - - Value: - Integer: - - U128 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 41376051u128 - - Value: - Integer: - - U128 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 496293518u128 - - Value: - Integer: - - U128 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: 251218820u128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out deleted file mode 100644 index 324a0abcce..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U8 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 123u8 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U8 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 456u8 - - Value: - Integer: - - U8 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 83 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - - Value: - Integer: - - U8 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 403 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - - Value: - Integer: - - U8 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 340130024u8 - - Value: - Integer: - - U8 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158951116u8 - - Value: - Integer: - - U8 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 155529659u8 - - Value: - Integer: - - U8 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 642023166u8 - - Value: - Integer: - - U8 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 228481736u8 - - Value: - Integer: - - U8 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469712960u8 - - Value: - Integer: - - U8 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 929437719u8 - - Value: - Integer: - - U8 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721072814u8 - - Value: - Integer: - - U8 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 363254789u8 - - Value: - Integer: - - U8 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 906732565u8 - - Value: - Integer: - - U8 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 288246391u8 - - Value: - Integer: - - U8 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 724940549u8 - - Value: - Integer: - - U8 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 487101620u8 - - Value: - Integer: - - U8 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 261373583u8 - - Value: - Integer: - - U8 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 891163927u8 - - Value: - Integer: - - U8 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 743967544u8 - - Value: - Integer: - - U8 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 8372586u8 - - Value: - Integer: - - U8 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 461793278u8 - - Value: - Integer: - - U8 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 806307045u8 - - Value: - Integer: - - U8 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 122764546u8 - - Value: - Integer: - - U8 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 356336181u8 - - Value: - Integer: - - U8 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158370903u8 - - Value: - Integer: - - U8 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 774460877u8 - - Value: - Integer: - - U8 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 557174131u8 - - Value: - Integer: - - U8 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 492401267u8 - - Value: - Integer: - - U8 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893445620u8 - - Value: - Integer: - - U8 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 957757048u8 - - Value: - Integer: - - U8 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721540649u8 - - Value: - Integer: - - U8 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 390746493u8 - - Value: - Integer: - - U8 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 211251725u8 - - Value: - Integer: - - U8 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 938266114u8 - - Value: - Integer: - - U8 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 156985870u8 - - Value: - Integer: - - U8 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 703831126u8 - - Value: - Integer: - - U8 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 729964155u8 - - Value: - Integer: - - U8 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 988151305u8 - - Value: - Integer: - - U8 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 320872435u8 - - Value: - Integer: - - U8 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 719287167u8 - - Value: - Integer: - - U8 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 152289486u8 - - Value: - Integer: - - U8 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 740067975u8 - - Value: - Integer: - - U8 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 728627816u8 - - Value: - Integer: - - U8 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 385008978u8 - - Value: - Integer: - - U8 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 553967635u8 - - Value: - Integer: - - U8 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 71980713u8 - - Value: - Integer: - - U8 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 519444716u8 - - Value: - Integer: - - U8 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 116499965u8 - - Value: - Integer: - - U8 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 717422268u8 - - Value: - Integer: - - U8 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 18966279u8 - - Value: - Integer: - - U8 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 22458638u8 - - Value: - Integer: - - U8 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 857282620u8 - - Value: - Integer: - - U8 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 920675898u8 - - Value: - Integer: - - U8 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 762235516u8 - - Value: - Integer: - - U8 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469018377u8 - - Value: - Integer: - - U8 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199986521u8 - - Value: - Integer: - - U8 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 536679358u8 - - Value: - Integer: - - U8 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 591399452u8 - - Value: - Integer: - - U8 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 83083158u8 - - Value: - Integer: - - U8 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 599449051u8 - - Value: - Integer: - - U8 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 445442318u8 - - Value: - Integer: - - U8 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 585486590u8 - - Value: - Integer: - - U8 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 209278800u8 - - Value: - Integer: - - U8 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 873568117u8 - - Value: - Integer: - - U8 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 664470940u8 - - Value: - Integer: - - U8 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 465262783u8 - - Value: - Integer: - - U8 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 605652874u8 - - Value: - Integer: - - U8 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 376803940u8 - - Value: - Integer: - - U8 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 965247040u8 - - Value: - Integer: - - U8 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 598474509u8 - - Value: - Integer: - - U8 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 845119918u8 - - Value: - Integer: - - U8 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 648159133u8 - - Value: - Integer: - - U8 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 669051032u8 - - Value: - Integer: - - U8 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 800600261u8 - - Value: - Integer: - - U8 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 434689764u8 - - Value: - Integer: - - U8 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 520060080u8 - - Value: - Integer: - - U8 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 804659385u8 - - Value: - Integer: - - U8 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 537828058u8 - - Value: - Integer: - - U8 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 716600292u8 - - Value: - Integer: - - U8 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387020273u8 - - Value: - Integer: - - U8 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199375617u8 - - Value: - Integer: - - U8 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 680337189u8 - - Value: - Integer: - - U8 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 818479931u8 - - Value: - Integer: - - U8 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893693281u8 - - Value: - Integer: - - U8 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 87377802u8 - - Value: - Integer: - - U8 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 84699261u8 - - Value: - Integer: - - U8 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 292826090u8 - - Value: - Integer: - - U8 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 569171405u8 - - Value: - Integer: - - U8 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387436237u8 - - Value: - Integer: - - U8 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 150682190u8 - - Value: - Integer: - - U8 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 888770419u8 - - Value: - Integer: - - U8 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 824696431u8 - - Value: - Integer: - - U8 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 765659803u8 - - Value: - Integer: - - U8 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 270163693u8 - - Value: - Integer: - - U8 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 427940240u8 - - Value: - Integer: - - U8 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 504997332u8 - - Value: - Integer: - - U8 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 337808338u8 - - Value: - Integer: - - U8 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 907200008u8 - - Value: - Integer: - - U8 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 757177889u8 - - Value: - Integer: - - U8 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 696697188u8 - - Value: - Integer: - - U8 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 41376051u8 - - Value: - Integer: - - U8 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 496293518u8 - - Value: - Integer: - - U8 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out deleted file mode 100644 index ba97127eac..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U32 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123u32 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U32 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456u32 - - Value: - Integer: - - U32 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - - Value: - Integer: - - U32 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - - Value: - Integer: - - U32 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024u32 - - Value: - Integer: - - U32 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116u32 - - Value: - Integer: - - U32 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659u32 - - Value: - Integer: - - U32 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166u32 - - Value: - Integer: - - U32 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736u32 - - Value: - Integer: - - U32 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960u32 - - Value: - Integer: - - U32 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719u32 - - Value: - Integer: - - U32 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814u32 - - Value: - Integer: - - U32 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789u32 - - Value: - Integer: - - U32 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565u32 - - Value: - Integer: - - U32 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391u32 - - Value: - Integer: - - U32 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549u32 - - Value: - Integer: - - U32 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620u32 - - Value: - Integer: - - U32 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583u32 - - Value: - Integer: - - U32 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927u32 - - Value: - Integer: - - U32 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544u32 - - Value: - Integer: - - U32 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586u32 - - Value: - Integer: - - U32 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278u32 - - Value: - Integer: - - U32 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045u32 - - Value: - Integer: - - U32 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546u32 - - Value: - Integer: - - U32 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181u32 - - Value: - Integer: - - U32 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903u32 - - Value: - Integer: - - U32 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877u32 - - Value: - Integer: - - U32 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131u32 - - Value: - Integer: - - U32 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267u32 - - Value: - Integer: - - U32 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620u32 - - Value: - Integer: - - U32 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048u32 - - Value: - Integer: - - U32 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649u32 - - Value: - Integer: - - U32 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493u32 - - Value: - Integer: - - U32 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725u32 - - Value: - Integer: - - U32 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114u32 - - Value: - Integer: - - U32 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870u32 - - Value: - Integer: - - U32 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126u32 - - Value: - Integer: - - U32 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155u32 - - Value: - Integer: - - U32 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305u32 - - Value: - Integer: - - U32 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435u32 - - Value: - Integer: - - U32 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167u32 - - Value: - Integer: - - U32 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486u32 - - Value: - Integer: - - U32 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975u32 - - Value: - Integer: - - U32 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816u32 - - Value: - Integer: - - U32 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978u32 - - Value: - Integer: - - U32 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635u32 - - Value: - Integer: - - U32 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713u32 - - Value: - Integer: - - U32 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716u32 - - Value: - Integer: - - U32 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965u32 - - Value: - Integer: - - U32 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268u32 - - Value: - Integer: - - U32 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279u32 - - Value: - Integer: - - U32 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638u32 - - Value: - Integer: - - U32 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620u32 - - Value: - Integer: - - U32 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898u32 - - Value: - Integer: - - U32 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516u32 - - Value: - Integer: - - U32 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377u32 - - Value: - Integer: - - U32 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521u32 - - Value: - Integer: - - U32 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358u32 - - Value: - Integer: - - U32 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452u32 - - Value: - Integer: - - U32 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158u32 - - Value: - Integer: - - U32 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051u32 - - Value: - Integer: - - U32 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318u32 - - Value: - Integer: - - U32 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590u32 - - Value: - Integer: - - U32 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800u32 - - Value: - Integer: - - U32 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117u32 - - Value: - Integer: - - U32 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940u32 - - Value: - Integer: - - U32 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783u32 - - Value: - Integer: - - U32 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874u32 - - Value: - Integer: - - U32 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940u32 - - Value: - Integer: - - U32 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040u32 - - Value: - Integer: - - U32 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509u32 - - Value: - Integer: - - U32 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918u32 - - Value: - Integer: - - U32 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133u32 - - Value: - Integer: - - U32 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032u32 - - Value: - Integer: - - U32 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261u32 - - Value: - Integer: - - U32 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764u32 - - Value: - Integer: - - U32 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080u32 - - Value: - Integer: - - U32 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385u32 - - Value: - Integer: - - U32 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058u32 - - Value: - Integer: - - U32 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292u32 - - Value: - Integer: - - U32 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273u32 - - Value: - Integer: - - U32 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617u32 - - Value: - Integer: - - U32 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189u32 - - Value: - Integer: - - U32 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931u32 - - Value: - Integer: - - U32 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281u32 - - Value: - Integer: - - U32 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802u32 - - Value: - Integer: - - U32 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261u32 - - Value: - Integer: - - U32 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090u32 - - Value: - Integer: - - U32 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405u32 - - Value: - Integer: - - U32 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237u32 - - Value: - Integer: - - U32 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190u32 - - Value: - Integer: - - U32 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419u32 - - Value: - Integer: - - U32 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431u32 - - Value: - Integer: - - U32 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803u32 - - Value: - Integer: - - U32 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693u32 - - Value: - Integer: - - U32 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240u32 - - Value: - Integer: - - U32 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332u32 - - Value: - Integer: - - U32 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338u32 - - Value: - Integer: - - U32 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008u32 - - Value: - Integer: - - U32 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889u32 - - Value: - Integer: - - U32 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188u32 - - Value: - Integer: - - U32 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051u32 - - Value: - Integer: - - U32 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518u32 - - Value: - Integer: - - U32 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out deleted file mode 100644 index ba97127eac..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U32 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 123u32 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U32 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: 456u32 - - Value: - Integer: - - U32 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 84 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - - Value: - Integer: - - U32 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 404 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 - - Value: - Integer: - - U32 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 340130024u32 - - Value: - Integer: - - U32 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158951116u32 - - Value: - Integer: - - U32 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 155529659u32 - - Value: - Integer: - - U32 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 642023166u32 - - Value: - Integer: - - U32 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 228481736u32 - - Value: - Integer: - - U32 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469712960u32 - - Value: - Integer: - - U32 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 929437719u32 - - Value: - Integer: - - U32 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721072814u32 - - Value: - Integer: - - U32 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 363254789u32 - - Value: - Integer: - - U32 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 906732565u32 - - Value: - Integer: - - U32 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 288246391u32 - - Value: - Integer: - - U32 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 724940549u32 - - Value: - Integer: - - U32 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 487101620u32 - - Value: - Integer: - - U32 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 261373583u32 - - Value: - Integer: - - U32 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 891163927u32 - - Value: - Integer: - - U32 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 743967544u32 - - Value: - Integer: - - U32 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 8372586u32 - - Value: - Integer: - - U32 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 461793278u32 - - Value: - Integer: - - U32 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 806307045u32 - - Value: - Integer: - - U32 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 122764546u32 - - Value: - Integer: - - U32 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 356336181u32 - - Value: - Integer: - - U32 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 158370903u32 - - Value: - Integer: - - U32 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 774460877u32 - - Value: - Integer: - - U32 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 557174131u32 - - Value: - Integer: - - U32 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 492401267u32 - - Value: - Integer: - - U32 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893445620u32 - - Value: - Integer: - - U32 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 957757048u32 - - Value: - Integer: - - U32 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 721540649u32 - - Value: - Integer: - - U32 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 390746493u32 - - Value: - Integer: - - U32 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 211251725u32 - - Value: - Integer: - - U32 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 938266114u32 - - Value: - Integer: - - U32 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 156985870u32 - - Value: - Integer: - - U32 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 703831126u32 - - Value: - Integer: - - U32 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 729964155u32 - - Value: - Integer: - - U32 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 988151305u32 - - Value: - Integer: - - U32 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 320872435u32 - - Value: - Integer: - - U32 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 719287167u32 - - Value: - Integer: - - U32 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 152289486u32 - - Value: - Integer: - - U32 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 740067975u32 - - Value: - Integer: - - U32 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 728627816u32 - - Value: - Integer: - - U32 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 385008978u32 - - Value: - Integer: - - U32 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 553967635u32 - - Value: - Integer: - - U32 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 71980713u32 - - Value: - Integer: - - U32 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 519444716u32 - - Value: - Integer: - - U32 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 116499965u32 - - Value: - Integer: - - U32 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 717422268u32 - - Value: - Integer: - - U32 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 18966279u32 - - Value: - Integer: - - U32 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 22458638u32 - - Value: - Integer: - - U32 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 857282620u32 - - Value: - Integer: - - U32 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 920675898u32 - - Value: - Integer: - - U32 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 762235516u32 - - Value: - Integer: - - U32 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 469018377u32 - - Value: - Integer: - - U32 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199986521u32 - - Value: - Integer: - - U32 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 536679358u32 - - Value: - Integer: - - U32 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 591399452u32 - - Value: - Integer: - - U32 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 83083158u32 - - Value: - Integer: - - U32 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 599449051u32 - - Value: - Integer: - - U32 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 445442318u32 - - Value: - Integer: - - U32 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 585486590u32 - - Value: - Integer: - - U32 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 209278800u32 - - Value: - Integer: - - U32 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 873568117u32 - - Value: - Integer: - - U32 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 664470940u32 - - Value: - Integer: - - U32 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 465262783u32 - - Value: - Integer: - - U32 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 605652874u32 - - Value: - Integer: - - U32 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 376803940u32 - - Value: - Integer: - - U32 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 965247040u32 - - Value: - Integer: - - U32 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 598474509u32 - - Value: - Integer: - - U32 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 845119918u32 - - Value: - Integer: - - U32 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 648159133u32 - - Value: - Integer: - - U32 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 669051032u32 - - Value: - Integer: - - U32 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 800600261u32 - - Value: - Integer: - - U32 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 434689764u32 - - Value: - Integer: - - U32 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 520060080u32 - - Value: - Integer: - - U32 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 804659385u32 - - Value: - Integer: - - U32 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 537828058u32 - - Value: - Integer: - - U32 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 716600292u32 - - Value: - Integer: - - U32 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387020273u32 - - Value: - Integer: - - U32 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 199375617u32 - - Value: - Integer: - - U32 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 680337189u32 - - Value: - Integer: - - U32 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 818479931u32 - - Value: - Integer: - - U32 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 893693281u32 - - Value: - Integer: - - U32 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 87377802u32 - - Value: - Integer: - - U32 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 84699261u32 - - Value: - Integer: - - U32 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 292826090u32 - - Value: - Integer: - - U32 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 569171405u32 - - Value: - Integer: - - U32 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 387436237u32 - - Value: - Integer: - - U32 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 150682190u32 - - Value: - Integer: - - U32 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 888770419u32 - - Value: - Integer: - - U32 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 824696431u32 - - Value: - Integer: - - U32 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 765659803u32 - - Value: - Integer: - - U32 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 270163693u32 - - Value: - Integer: - - U32 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 427940240u32 - - Value: - Integer: - - U32 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 504997332u32 - - Value: - Integer: - - U32 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 337808338u32 - - Value: - Integer: - - U32 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 907200008u32 - - Value: - Integer: - - U32 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 757177889u32 - - Value: - Integer: - - U32 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 696697188u32 - - Value: - Integer: - - U32 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 41376051u32 - - Value: - Integer: - - U32 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 496293518u32 - - Value: - Integer: - - U32 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out deleted file mode 100644 index 324a0abcce..0000000000 --- a/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out +++ /dev/null @@ -1,1053 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Integer: - - U8 - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 123u8 - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "123" - - Value: - Integer: - - U8 - - "456" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: 456u8 - - Value: - Integer: - - U8 - - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 83 - path: test - content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - - Value: - Integer: - - U8 - - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 403 - path: test - content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 - - Value: - Integer: - - U8 - - "340130024" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 340130024u8 - - Value: - Integer: - - U8 - - "158951116" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158951116u8 - - Value: - Integer: - - U8 - - "155529659" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 155529659u8 - - Value: - Integer: - - U8 - - "642023166" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 642023166u8 - - Value: - Integer: - - U8 - - "228481736" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 228481736u8 - - Value: - Integer: - - U8 - - "469712960" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469712960u8 - - Value: - Integer: - - U8 - - "929437719" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 929437719u8 - - Value: - Integer: - - U8 - - "721072814" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721072814u8 - - Value: - Integer: - - U8 - - "363254789" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 363254789u8 - - Value: - Integer: - - U8 - - "906732565" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 906732565u8 - - Value: - Integer: - - U8 - - "288246391" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 288246391u8 - - Value: - Integer: - - U8 - - "724940549" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 724940549u8 - - Value: - Integer: - - U8 - - "487101620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 487101620u8 - - Value: - Integer: - - U8 - - "261373583" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 261373583u8 - - Value: - Integer: - - U8 - - "891163927" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 891163927u8 - - Value: - Integer: - - U8 - - "743967544" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 743967544u8 - - Value: - Integer: - - U8 - - "8372586" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: 8372586u8 - - Value: - Integer: - - U8 - - "461793278" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 461793278u8 - - Value: - Integer: - - U8 - - "806307045" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 806307045u8 - - Value: - Integer: - - U8 - - "122764546" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 122764546u8 - - Value: - Integer: - - U8 - - "356336181" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 356336181u8 - - Value: - Integer: - - U8 - - "158370903" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 158370903u8 - - Value: - Integer: - - U8 - - "774460877" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 774460877u8 - - Value: - Integer: - - U8 - - "557174131" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 557174131u8 - - Value: - Integer: - - U8 - - "492401267" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 492401267u8 - - Value: - Integer: - - U8 - - "893445620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893445620u8 - - Value: - Integer: - - U8 - - "957757048" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 957757048u8 - - Value: - Integer: - - U8 - - "721540649" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 721540649u8 - - Value: - Integer: - - U8 - - "390746493" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 390746493u8 - - Value: - Integer: - - U8 - - "211251725" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 211251725u8 - - Value: - Integer: - - U8 - - "938266114" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 938266114u8 - - Value: - Integer: - - U8 - - "156985870" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 156985870u8 - - Value: - Integer: - - U8 - - "703831126" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 703831126u8 - - Value: - Integer: - - U8 - - "729964155" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 729964155u8 - - Value: - Integer: - - U8 - - "988151305" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 988151305u8 - - Value: - Integer: - - U8 - - "320872435" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 320872435u8 - - Value: - Integer: - - U8 - - "719287167" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 719287167u8 - - Value: - Integer: - - U8 - - "152289486" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 152289486u8 - - Value: - Integer: - - U8 - - "740067975" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 740067975u8 - - Value: - Integer: - - U8 - - "728627816" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 728627816u8 - - Value: - Integer: - - U8 - - "385008978" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 385008978u8 - - Value: - Integer: - - U8 - - "553967635" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 553967635u8 - - Value: - Integer: - - U8 - - "71980713" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 71980713u8 - - Value: - Integer: - - U8 - - "519444716" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 519444716u8 - - Value: - Integer: - - U8 - - "116499965" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 116499965u8 - - Value: - Integer: - - U8 - - "717422268" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 717422268u8 - - Value: - Integer: - - U8 - - "18966279" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 18966279u8 - - Value: - Integer: - - U8 - - "22458638" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 22458638u8 - - Value: - Integer: - - U8 - - "857282620" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 857282620u8 - - Value: - Integer: - - U8 - - "920675898" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 920675898u8 - - Value: - Integer: - - U8 - - "762235516" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 762235516u8 - - Value: - Integer: - - U8 - - "469018377" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 469018377u8 - - Value: - Integer: - - U8 - - "199986521" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199986521u8 - - Value: - Integer: - - U8 - - "536679358" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 536679358u8 - - Value: - Integer: - - U8 - - "591399452" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 591399452u8 - - Value: - Integer: - - U8 - - "83083158" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 83083158u8 - - Value: - Integer: - - U8 - - "599449051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 599449051u8 - - Value: - Integer: - - U8 - - "445442318" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 445442318u8 - - Value: - Integer: - - U8 - - "585486590" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 585486590u8 - - Value: - Integer: - - U8 - - "209278800" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 209278800u8 - - Value: - Integer: - - U8 - - "873568117" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 873568117u8 - - Value: - Integer: - - U8 - - "664470940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 664470940u8 - - Value: - Integer: - - U8 - - "465262783" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 465262783u8 - - Value: - Integer: - - U8 - - "605652874" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 605652874u8 - - Value: - Integer: - - U8 - - "376803940" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 376803940u8 - - Value: - Integer: - - U8 - - "965247040" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 965247040u8 - - Value: - Integer: - - U8 - - "598474509" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 598474509u8 - - Value: - Integer: - - U8 - - "845119918" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 845119918u8 - - Value: - Integer: - - U8 - - "648159133" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 648159133u8 - - Value: - Integer: - - U8 - - "669051032" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 669051032u8 - - Value: - Integer: - - U8 - - "800600261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 800600261u8 - - Value: - Integer: - - U8 - - "434689764" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 434689764u8 - - Value: - Integer: - - U8 - - "520060080" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 520060080u8 - - Value: - Integer: - - U8 - - "804659385" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 804659385u8 - - Value: - Integer: - - U8 - - "537828058" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 537828058u8 - - Value: - Integer: - - U8 - - "716600292" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 716600292u8 - - Value: - Integer: - - U8 - - "387020273" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387020273u8 - - Value: - Integer: - - U8 - - "199375617" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 199375617u8 - - Value: - Integer: - - U8 - - "680337189" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 680337189u8 - - Value: - Integer: - - U8 - - "818479931" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 818479931u8 - - Value: - Integer: - - U8 - - "893693281" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 893693281u8 - - Value: - Integer: - - U8 - - "87377802" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 87377802u8 - - Value: - Integer: - - U8 - - "84699261" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 84699261u8 - - Value: - Integer: - - U8 - - "292826090" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 292826090u8 - - Value: - Integer: - - U8 - - "569171405" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 569171405u8 - - Value: - Integer: - - U8 - - "387436237" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 387436237u8 - - Value: - Integer: - - U8 - - "150682190" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 150682190u8 - - Value: - Integer: - - U8 - - "888770419" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 888770419u8 - - Value: - Integer: - - U8 - - "824696431" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 824696431u8 - - Value: - Integer: - - U8 - - "765659803" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 765659803u8 - - Value: - Integer: - - U8 - - "270163693" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 270163693u8 - - Value: - Integer: - - U8 - - "427940240" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 427940240u8 - - Value: - Integer: - - U8 - - "504997332" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 504997332u8 - - Value: - Integer: - - U8 - - "337808338" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 337808338u8 - - Value: - Integer: - - U8 - - "907200008" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 907200008u8 - - Value: - Integer: - - U8 - - "757177889" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 757177889u8 - - Value: - Integer: - - U8 - - "696697188" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 696697188u8 - - Value: - Integer: - - U8 - - "41376051" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: 41376051u8 - - Value: - Integer: - - U8 - - "496293518" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 496293518u8 - - Value: - Integer: - - U8 - - "251218820" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out b/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out deleted file mode 100644 index 00ff4531d4..0000000000 --- a/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out +++ /dev/null @@ -1,62 +0,0 @@ ---- -namespace: Token -expectation: Pass -outputs: - - "'field' @ 1:1-6" - - "'Field' @ 1:1-6" - - "'fielD' @ 1:1-6" - - "'FIELD' @ 1:1-6" - - "'group' @ 1:1-6" - - "'Group' @ 1:1-6" - - "'grouP' @ 1:1-6" - - "'GROUP' @ 1:1-6" - - "'u8' @ 1:1-3" - - "'u16' @ 1:1-4" - - "'u32' @ 1:1-4" - - "'u64' @ 1:1-4" - - "'u128' @ 1:1-5" - - "'i8' @ 1:1-3" - - "'i16' @ 1:1-4" - - "'i32' @ 1:1-4" - - "'i64' @ 1:1-4" - - "'i128' @ 1:1-5" - - "'U8' @ 1:1-3" - - "'U16' @ 1:1-4" - - "'U32' @ 1:1-4" - - "'U64' @ 1:1-4" - - "'U128' @ 1:1-5" - - "'U8' @ 1:1-3" - - "'U16' @ 1:1-4" - - "'U32' @ 1:1-4" - - "'U64' @ 1:1-4" - - "'U128' @ 1:1-5" - - "'u' @ 1:1-2" - - "'8' @ 1:1-2" - - "'u' @ 1:1-2" - - "'16' @ 1:1-3" - - "'u' @ 1:1-2" - - "'32' @ 1:1-3" - - "'u' @ 1:1-2" - - "'64' @ 1:1-3" - - "'u' @ 1:1-2" - - "'128' @ 1:1-4" - - "'i' @ 1:1-2" - - "'8' @ 1:1-2" - - "'i' @ 1:1-2" - - "'16' @ 1:1-3" - - "'i' @ 1:1-2" - - "'32' @ 1:1-3" - - "'i' @ 1:1-2" - - "'64' @ 1:1-3" - - "'i' @ 1:1-2" - - "'128' @ 1:1-4" - - "'U' @ 1:1-2,'8' @ 1:3-4" - - "'U' @ 1:1-2,'16' @ 1:3-5" - - "'U' @ 1:1-2,'32' @ 1:3-5" - - "'U' @ 1:1-2,'64' @ 1:3-5" - - "'U' @ 1:1-2,'128' @ 1:3-6" - - "'U' @ 1:1-2,'8' @ 1:3-4" - - "'U' @ 1:1-2,'16' @ 1:3-5" - - "'U' @ 1:1-2,'32' @ 1:3-5" - - "'U' @ 1:1-2,'64' @ 1:3-5" - - "'U' @ 1:1-2,'128' @ 1:3-6" diff --git a/tests/expectations/parser/parser/expression/ternary.leo.out b/tests/expectations/parser/parser/expression/ternary.leo.out deleted file mode 100644 index 0d672f23d9..0000000000 --- a/tests/expectations/parser/parser/expression/ternary.leo.out +++ /dev/null @@ -1,72 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Ternary: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" - if_true: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" - if_false: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x ? y : z" - - Ternary: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - if_true: - Ternary: - condition: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - if_true: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - if_false: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 14 - path: test - content: "x ? a ? b : c : z" - if_false: - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "x ? a ? b : c : z" - - Ternary: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - if_true: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - if_false: - Ternary: - condition: - Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - if_true: - Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - if_false: - Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 18 - path: test - content: "x ? y : a ? b : c" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "x ? y : a ? b : c" diff --git a/tests/expectations/parser/parser/expression/tuple.leo.out b/tests/expectations/parser/parser/expression/tuple.leo.out deleted file mode 100644 index f5ec2aa11b..0000000000 --- a/tests/expectations/parser/parser/expression/tuple.leo.out +++ /dev/null @@ -1,94 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Value: - Implicit: - - "" - - line_start: 0 - line_stop: 0 - col_start: 0 - col_stop: 0 - path: "" - content: "" - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(y)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(z)\\\"}\"}" - - Value: - Implicit: - - "" - - line_start: 0 - line_stop: 0 - col_start: 0 - col_stop: 0 - path: "" - content: "" - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,)\\\"}\"}" - - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "(x,y)" - - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" - - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "(x,y,z)" - - TupleInit: - elements: - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "(123,123)" - - Value: - Implicit: - - "123" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 9 - path: test - content: "(123,123)" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "(123,123)" - - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: () - - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: (()) diff --git a/tests/expectations/parser/parser/expression/unary/negate.leo.out b/tests/expectations/parser/parser/expression/unary/negate.leo.out deleted file mode 100644 index de785f2be6..0000000000 --- a/tests/expectations/parser/parser/expression/unary/negate.leo.out +++ /dev/null @@ -1,120 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x\\\"}\"}" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "-x" - - Unary: - inner: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "-x.y" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "-x.y" - - Unary: - inner: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 6 - path: test - content: "-x::y" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "-x::y" - - Unary: - inner: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x()\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "-x()" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "-x()" - - Unary: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"--x\\\"}\"}" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "--x" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "--x" - - Unary: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-!x\\\"}\"}" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "-!x" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "-!x" diff --git a/tests/expectations/parser/parser/expression/unary/not.leo.out b/tests/expectations/parser/parser/expression/unary/not.leo.out deleted file mode 100644 index 5c93154572..0000000000 --- a/tests/expectations/parser/parser/expression/unary/not.leo.out +++ /dev/null @@ -1,120 +0,0 @@ ---- -namespace: ParseExpression -expectation: Pass -outputs: - - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x\\\"}\"}" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "!x" - - Unary: - inner: - CircuitMemberAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "!x.y" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "!x.y" - - Unary: - inner: - CircuitStaticFunctionAccess: - circuit: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" - name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 6 - path: test - content: "!x::y" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "!x::y" - - Unary: - inner: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x()\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 5 - path: test - content: "!x()" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "!x()" - - Unary: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!!x\\\"}\"}" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "!!x" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "!!x" - - Unary: - inner: - Unary: - inner: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!-x\\\"}\"}" - op: Negate - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "!-x" - op: Not - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "!-x" diff --git a/tests/expectations/parser/parser/functions/annotated.leo.out b/tests/expectations/parser/parser/functions/annotated.leo.out deleted file mode 100644 index 29612e265a..0000000000 --- a/tests/expectations/parser/parser/functions/annotated.leo.out +++ /dev/null @@ -1,58 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": - annotations: - - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 6 - path: test - content: "@test" - name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test\\\"}\"}" - arguments: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 14 - col_stop: 2 - path: test - content: "function x() {\n...\n}" - span: - line_start: 4 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: test - content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_param.leo.out b/tests/expectations/parser/parser/functions/annotated_param.leo.out deleted file mode 100644 index 72ca72549e..0000000000 --- a/tests/expectations/parser/parser/functions/annotated_param.leo.out +++ /dev/null @@ -1,59 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": - annotations: - - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 12 - path: test - content: "@test(test)" - name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test(test)\\\"}\"}" - arguments: - - test - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 14 - col_stop: 2 - path: test - content: "function x() {\n...\n}" - span: - line_start: 4 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: test - content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_twice.leo.out b/tests/expectations/parser/parser/functions/annotated_twice.leo.out deleted file mode 100644 index a83199ec50..0000000000 --- a/tests/expectations/parser/parser/functions/annotated_twice.leo.out +++ /dev/null @@ -1,67 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": - annotations: - - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 6 - path: test - content: "@test @test2" - name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" - arguments: [] - - span: - line_start: 3 - line_stop: 3 - col_start: 7 - col_stop: 13 - path: test - content: "@test @test2" - name: "{\"name\":\"test2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" - arguments: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 6 - col_start: 14 - col_stop: 2 - path: test - content: "function x() {\n...\n}" - span: - line_start: 4 - line_stop: 6 - col_start: 1 - col_stop: 2 - path: test - content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_input_fail.leo.out b/tests/expectations/parser/parser/functions/const_input_fail.leo.out deleted file mode 100644 index 468e683fd9..0000000000 --- a/tests/expectations/parser/parser/functions/const_input_fail.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Parse -expectation: Fail -outputs: - - " --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^\n |\n = expected 'ident', got 'input'" diff --git a/tests/expectations/parser/parser/functions/const_param.leo.out b/tests/expectations/parser/parser/functions/const_param.leo.out deleted file mode 100644 index 609a83247f..0000000000 --- a/tests/expectations/parser/parser/functions/const_param.leo.out +++ /dev/null @@ -1,140 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: u32, const y: i32) {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 26 - col_stop: 27 - path: test - content: "function x(x: u32, const y: i32) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 34 - col_stop: 2 - path: test - content: "function x(x: u32, const y: i32) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: u32, const y: i32) {\n...\n}" - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" - const_: true - mutable: false - type_: - IntegerType: U32 - span: - line_start: 7 - line_stop: 7 - col_start: 18 - col_stop: 19 - path: test - content: "function x(const x: u32, y: i32) {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 7 - line_stop: 7 - col_start: 26 - col_stop: 27 - path: test - content: "function x(const x: u32, y: i32) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 8 - line_stop: 8 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 7 - line_stop: 9 - col_start: 34 - col_stop: 2 - path: test - content: "function x(const x: u32, y: i32) {\n...\n}" - span: - line_start: 7 - line_stop: 9 - col_start: 1 - col_stop: 2 - path: test - content: "function x(const x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_self_bad.leo.out b/tests/expectations/parser/parser/functions/const_self_bad.leo.out deleted file mode 100644 index 3b6e210cef..0000000000 --- a/tests/expectations/parser/parser/functions/const_self_bad.leo.out +++ /dev/null @@ -1,50 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" - input: - - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 24 - col_stop: 2 - path: test - content: "function x(const self) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(const self) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty.leo.out b/tests/expectations/parser/parser/functions/empty.leo.out deleted file mode 100644 index 5ead848ab3..0000000000 --- a/tests/expectations/parser/parser/functions/empty.leo.out +++ /dev/null @@ -1,49 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" - input: [] - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 14 - col_stop: 2 - path: test - content: "function x() {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty2.leo.out b/tests/expectations/parser/parser/functions/empty2.leo.out deleted file mode 100644 index 16574b1dc3..0000000000 --- a/tests/expectations/parser/parser/functions/empty2.leo.out +++ /dev/null @@ -1,31 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}" - input: [] - output: ~ - block: - statements: [] - span: - line_start: 3 - line_stop: 3 - col_start: 14 - col_stop: 16 - path: test - content: "function x() {}" - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 16 - path: test - content: "function x() {}" diff --git a/tests/expectations/parser/parser/functions/param_array.leo.out b/tests/expectations/parser/parser/functions/param_array.leo.out deleted file mode 100644 index c9b3cc79cd..0000000000 --- a/tests/expectations/parser/parser/functions/param_array.leo.out +++ /dev/null @@ -1,64 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" - const_: false - mutable: true - type_: - Array: - - IntegerType: U8 - - - value: "12" - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: [u8; 12]) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 25 - col_stop: 2 - path: test - content: "function x(x: [u8; 12]) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: [u8; 12]) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_circuit.leo.out b/tests/expectations/parser/parser/functions/param_circuit.leo.out deleted file mode 100644 index e998fe7f92..0000000000 --- a/tests/expectations/parser/parser/functions/param_circuit.leo.out +++ /dev/null @@ -1,62 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" - const_: false - mutable: true - type_: - Circuit: "{\"name\":\"MyCircuit\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: MyCircuit) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 26 - col_stop: 2 - path: test - content: "function x(x: MyCircuit) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: MyCircuit) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_tuple.leo.out b/tests/expectations/parser/parser/functions/param_tuple.leo.out deleted file mode 100644 index 9597b18cb3..0000000000 --- a/tests/expectations/parser/parser/functions/param_tuple.leo.out +++ /dev/null @@ -1,64 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" - const_: false - mutable: true - type_: - Tuple: - - IntegerType: U32 - - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: (u32, i32)) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 27 - col_stop: 2 - path: test - content: "function x(x: (u32, i32)) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: (u32, i32)) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params.leo.out b/tests/expectations/parser/parser/functions/params.leo.out deleted file mode 100644 index 9c74dafafd..0000000000 --- a/tests/expectations/parser/parser/functions/params.leo.out +++ /dev/null @@ -1,75 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: u32, y: i32) {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: test - content: "function x(x: u32, y: i32) {" - output: ~ - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 28 - col_stop: 2 - path: test - content: "function x(x: u32, y: i32) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params_return.leo.out b/tests/expectations/parser/parser/functions/params_return.leo.out deleted file mode 100644 index 6b1980e238..0000000000 --- a/tests/expectations/parser/parser/functions/params_return.leo.out +++ /dev/null @@ -1,76 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" - input: - - Variable: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: U32 - span: - line_start: 3 - line_stop: 3 - col_start: 12 - col_stop: 13 - path: test - content: "function x(x: u32, y: i32) -> u32 {" - - Variable: - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" - const_: false - mutable: true - type_: - IntegerType: I32 - span: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: test - content: "function x(x: u32, y: i32) -> u32 {" - output: - IntegerType: U32 - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 35 - col_stop: 2 - path: test - content: "function x(x: u32, y: i32) -> u32 {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x(x: u32, y: i32) -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return.leo.out b/tests/expectations/parser/parser/functions/return.leo.out deleted file mode 100644 index 3baa2a2e79..0000000000 --- a/tests/expectations/parser/parser/functions/return.leo.out +++ /dev/null @@ -1,50 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}" - input: [] - output: - IntegerType: U32 - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 21 - col_stop: 2 - path: test - content: "function x() -> u32 {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x() -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return_tuple.leo.out b/tests/expectations/parser/parser/functions/return_tuple.leo.out deleted file mode 100644 index aa853f04df..0000000000 --- a/tests/expectations/parser/parser/functions/return_tuple.leo.out +++ /dev/null @@ -1,52 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: [] - circuits: {} - global_consts: {} - functions: - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}": - annotations: [] - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}" - input: [] - output: - Tuple: - - IntegerType: U32 - - IntegerType: U32 - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 14 - path: test - content: " return ();" - span: - line_start: 3 - line_stop: 5 - col_start: 28 - col_stop: 2 - path: test - content: "function x() -> (u32, u32) {\n...\n}" - span: - line_start: 3 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "function x() -> (u32, u32) {\n...\n}" diff --git a/tests/expectations/parser/parser/import/alias.leo.out b/tests/expectations/parser/parser/import/alias.leo.out deleted file mode 100644 index e0c181f3d7..0000000000 --- a/tests/expectations/parser/parser/import/alias.leo.out +++ /dev/null @@ -1,38 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" - alias: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" - span: - line_start: 3 - line_stop: 3 - col_start: 10 - col_stop: 18 - path: test - content: import a.b as bar; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 18 - path: test - content: import a.b as bar; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 18 - path: test - content: import a.b as bar; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/basic.leo.out b/tests/expectations/parser/parser/import/basic.leo.out deleted file mode 100644 index 7293ccb78e..0000000000 --- a/tests/expectations/parser/parser/import/basic.leo.out +++ /dev/null @@ -1,38 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" - alias: ~ - span: - line_start: 3 - line_stop: 3 - col_start: 10 - col_stop: 11 - path: test - content: import a.b; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 11 - path: test - content: import a.b; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 11 - path: test - content: import a.b; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out deleted file mode 100644 index 5b3301be42..0000000000 --- a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out +++ /dev/null @@ -1,5 +0,0 @@ ---- -namespace: Parse -expectation: Fail -outputs: - - " --> test:3:8\n |\n 3 | import a.();\n | ^\n |\n = Cannot import empty list" diff --git a/tests/expectations/parser/parser/import/many_import.leo.out b/tests/expectations/parser/parser/import/many_import.leo.out deleted file mode 100644 index c8bf9349c8..0000000000 --- a/tests/expectations/parser/parser/import/many_import.leo.out +++ /dev/null @@ -1,136 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Packages: - name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.( // local import\\\"}\"}" - accesses: - - Symbol: - symbol: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Point,\\\"}\"}" - alias: ~ - span: - line_start: 4 - line_stop: 4 - col_start: 5 - col_stop: 10 - path: test - content: " Point," - - Symbol: - symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" foo,\\\"}\"}" - alias: ~ - span: - line_start: 5 - line_stop: 5 - col_start: 5 - col_stop: 8 - path: test - content: " foo," - span: - line_start: 3 - line_stop: 5 - col_start: 8 - col_stop: 8 - path: test - content: "import test-import.( // local import\n...\n foo," - span: - line_start: 3 - line_stop: 5 - col_start: 8 - col_stop: 8 - path: test - content: "import test-import.( // local import\n...\n foo," - - package_or_packages: - Packages: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.( // imports directory import\\\"}\"}" - accesses: - - Symbol: - symbol: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Bar,\\\"}\"}" - alias: ~ - span: - line_start: 9 - line_stop: 9 - col_start: 5 - col_stop: 8 - path: test - content: " Bar," - - Multiple: - name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" - accesses: - - Symbol: - symbol: "{\"name\":\"Baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" - alias: ~ - span: - line_start: 10 - line_stop: 10 - col_start: 10 - col_stop: 13 - path: test - content: " baz.(Baz, Bazzar)," - - Symbol: - symbol: "{\"name\":\"Bazzar\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" - alias: ~ - span: - line_start: 10 - line_stop: 10 - col_start: 15 - col_stop: 21 - path: test - content: " baz.(Baz, Bazzar)," - span: - line_start: 10 - line_stop: 10 - col_start: 5 - col_stop: 21 - path: test - content: " baz.(Baz, Bazzar)," - - SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" - access: - SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"Bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" - alias: ~ - span: - line_start: 11 - line_stop: 11 - col_start: 13 - col_stop: 16 - path: test - content: " bat.bat.Bat," - span: - line_start: 11 - line_stop: 11 - col_start: 9 - col_stop: 16 - path: test - content: " bat.bat.Bat," - span: - line_start: 11 - line_stop: 11 - col_start: 5 - col_stop: 16 - path: test - content: " bat.bat.Bat," - span: - line_start: 8 - line_stop: 11 - col_start: 8 - col_stop: 16 - path: test - content: "import bar.( // imports directory import\n...\n bat.bat.Bat," - span: - line_start: 8 - line_stop: 11 - col_start: 8 - col_stop: 16 - path: test - content: "import bar.( // imports directory import\n...\n bat.bat.Bat," - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/many_import_star.leo.out b/tests/expectations/parser/parser/import/many_import_star.leo.out deleted file mode 100644 index d1555ed1e0..0000000000 --- a/tests/expectations/parser/parser/import/many_import_star.leo.out +++ /dev/null @@ -1,170 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*; // local import\\\"}\"}" - access: - Star: - span: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: test - content: import test-import.*; // local import - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 21 - path: test - content: import test-import.*; // local import - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 21 - path: test - content: import test-import.*; // local import - - package_or_packages: - Package: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.*; // imports directory import\\\"}\"}" - access: - Star: - span: - line_start: 5 - line_stop: 5 - col_start: 12 - col_stop: 13 - path: test - content: import bar.*; // imports directory import - span: - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 13 - path: test - content: import bar.*; // imports directory import - span: - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 13 - path: test - content: import bar.*; // imports directory import - - package_or_packages: - Package: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" - access: - SubPackage: - name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" - access: - Star: - span: - line_start: 6 - line_stop: 6 - col_start: 16 - col_stop: 17 - path: test - content: import bar.baz.*; // imports directory import - span: - line_start: 6 - line_stop: 6 - col_start: 12 - col_stop: 17 - path: test - content: import bar.baz.*; // imports directory import - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 17 - path: test - content: import bar.baz.*; // imports directory import - span: - line_start: 6 - line_stop: 6 - col_start: 8 - col_stop: 17 - path: test - content: import bar.baz.*; // imports directory import - - package_or_packages: - Package: - name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" - access: - SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" - access: - SubPackage: - name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" - access: - Star: - span: - line_start: 7 - line_stop: 7 - col_start: 20 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - span: - line_start: 7 - line_stop: 7 - col_start: 16 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - span: - line_start: 7 - line_stop: 7 - col_start: 12 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - span: - line_start: 7 - line_stop: 7 - col_start: 8 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - span: - line_start: 7 - line_stop: 7 - col_start: 8 - col_stop: 21 - path: test - content: import bar.bat.bat.*; // imports directory import - - package_or_packages: - Package: - name: "{\"name\":\"car\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import car.*; // imports directory import\\\"}\"}" - access: - Star: - span: - line_start: 8 - line_stop: 8 - col_start: 12 - col_stop: 13 - path: test - content: import car.*; // imports directory import - span: - line_start: 8 - line_stop: 8 - col_start: 8 - col_stop: 13 - path: test - content: import car.*; // imports directory import - span: - line_start: 8 - line_stop: 8 - col_start: 8 - col_stop: 13 - path: test - content: import car.*; // imports directory import - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/names.leo.out b/tests/expectations/parser/parser/import/names.leo.out deleted file mode 100644 index 9bc9319577..0000000000 --- a/tests/expectations/parser/parser/import/names.leo.out +++ /dev/null @@ -1,94 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"a0-f\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" - alias: ~ - span: - line_start: 3 - line_stop: 3 - col_start: 13 - col_stop: 16 - path: test - content: import a0-f.foo; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 16 - path: test - content: import a0-f.foo; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 16 - path: test - content: import a0-f.foo; - - package_or_packages: - Package: - name: "{\"name\":\"a-9\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" - alias: ~ - span: - line_start: 4 - line_stop: 4 - col_start: 12 - col_stop: 15 - path: test - content: import a-9.bar; - span: - line_start: 4 - line_stop: 4 - col_start: 8 - col_stop: 15 - path: test - content: import a-9.bar; - span: - line_start: 4 - line_stop: 4 - col_start: 8 - col_stop: 15 - path: test - content: import a-9.bar; - - package_or_packages: - Package: - name: "{\"name\":\"hello-world\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":20,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" - alias: ~ - span: - line_start: 5 - line_stop: 5 - col_start: 20 - col_stop: 25 - path: test - content: import hello-world.hello; - span: - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 25 - path: test - content: import hello-world.hello; - span: - line_start: 5 - line_stop: 5 - col_start: 8 - col_stop: 25 - path: test - content: import hello-world.hello; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/names_underscore.leo.out b/tests/expectations/parser/parser/import/names_underscore.leo.out deleted file mode 100644 index 952c5c0ac7..0000000000 --- a/tests/expectations/parser/parser/import/names_underscore.leo.out +++ /dev/null @@ -1,38 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"hello_world\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" - access: - Symbol: - symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" - alias: ~ - span: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 23 - path: test - content: import hello_world.foo; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 23 - path: test - content: import hello_world.foo; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 23 - path: test - content: import hello_world.foo; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/import/star.leo.out b/tests/expectations/parser/parser/import/star.leo.out deleted file mode 100644 index f9e234a287..0000000000 --- a/tests/expectations/parser/parser/import/star.leo.out +++ /dev/null @@ -1,36 +0,0 @@ ---- -namespace: Parse -expectation: Pass -outputs: - - name: "" - expected_input: [] - imports: - - package_or_packages: - Package: - name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*;\\\"}\"}" - access: - Star: - span: - line_start: 3 - line_stop: 3 - col_start: 20 - col_stop: 21 - path: test - content: import test-import.*; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 21 - path: test - content: import test-import.*; - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 21 - path: test - content: import test-import.*; - circuits: {} - global_consts: {} - functions: {} diff --git a/tests/expectations/parser/parser/statement/assign.leo.out b/tests/expectations/parser/parser/statement/assign.leo.out deleted file mode 100644 index d992c636a2..0000000000 --- a/tests/expectations/parser/parser/statement/assign.leo.out +++ /dev/null @@ -1,411 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: x = expr; - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: x = expr; - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = ();\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: x = (); - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 7 - path: test - content: x = (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: x = (); - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: x = x+y; - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: x = x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x = x+y; - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: "x = (x,y);" - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 10 - path: test - content: "x = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x = (x,y);" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" - accesses: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 2 - path: test - content: x = x(); - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 8 - path: test - content: x = x(); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x = x(); - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[0] = y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "x[0] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 9 - path: test - content: "x[0] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" - accesses: - - ArrayIndex: - Value: - Integer: - - U32 - - "0" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 7 - path: test - content: "x[0u32] = y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[0u32] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[0u32] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" - accesses: - - Tuple: - - value: "0" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0 = y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x.0 = y; - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: x.0 = y; - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "1" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[1..2] = y;" - - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "x[1..2] = y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 8 - path: test - content: "x[1..2] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: "x[1..2] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x[..2] = y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[..2] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x[..2] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" - accesses: - - ArrayRange: - - Value: - Implicit: - - "2" - - line_start: 1 - line_stop: 1 - col_start: 3 - col_stop: 4 - path: test - content: "x[2..] = y;" - - ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 7 - path: test - content: "x[2..] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x[2..] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" - accesses: - - ArrayRange: - - ~ - - ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "x[..] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "x[..] = y;" - - Assign: - operation: Assign - assignee: - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" - accesses: - - Tuple: - - value: "0" - - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: "x.0[0][..] = y;" - - ArrayIndex: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "x.0[0][..] = y;" - - ArrayRange: - - ~ - - ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: "x.0[0][..] = y;" - value: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: "x.0[0][..] = y;" diff --git a/tests/expectations/parser/parser/statement/block.leo.out b/tests/expectations/parser/parser/statement/block.leo.out deleted file mode 100644 index 6e40c82b0f..0000000000 --- a/tests/expectations/parser/parser/statement/block.leo.out +++ /dev/null @@ -1,141 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: "{}" - - Block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "{\n...\n}" - - Block: - statements: - - Block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 2 - col_stop: 4 - path: test - content: "{{}}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: "{{}}" - - Block: - statements: - - Block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 4 - col_start: 1 - col_stop: 2 - path: test - content: "{\n...\n}" - span: - line_start: 1 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "{\n...\n}" - - Block: - statements: - - Conditional: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 4 - col_start: 6 - col_stop: 2 - path: test - content: "if x {\n...\n}" - next: ~ - span: - line_start: 2 - line_stop: 4 - col_start: 1 - col_stop: 2 - path: test - content: "if x {\n...\n}" - span: - line_start: 1 - line_stop: 5 - col_start: 1 - col_stop: 2 - path: test - content: "{\n...\n}" diff --git a/tests/expectations/parser/parser/statement/conditional.leo.out b/tests/expectations/parser/parser/statement/conditional.leo.out deleted file mode 100644 index 337dcace01..0000000000 --- a/tests/expectations/parser/parser/statement/conditional.leo.out +++ /dev/null @@ -1,230 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Conditional: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 6 - col_stop: 2 - path: test - content: "if x {\n...\n}" - next: ~ - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "if x {\n...\n}" - - Conditional: - condition: - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if Self {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 9 - col_stop: 2 - path: test - content: "if Self {\n...\n}" - next: ~ - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "if Self {\n...\n}" - - Conditional: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 8 - col_stop: 2 - path: test - content: "if (x) {\n...\n}" - next: ~ - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "if (x) {\n...\n}" - - Conditional: - condition: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {}\\\"}\"}" - block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 10 - path: test - content: "if (x) {}" - next: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "if (x) {}" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {}\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {}\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 7 - path: test - content: "if x+y {}" - block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 10 - path: test - content: "if x+y {}" - next: ~ - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: "if x+y {}" - - Conditional: - condition: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 4 - col_stop: 7 - path: test - content: "if x+y {" - block: - statements: - - Expression: - expression: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 5 - path: test - content: expr; - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 3 - line_stop: 3 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 3 - line_stop: 3 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 4 - col_start: 8 - col_stop: 2 - path: test - content: "if x+y {\n...\n}" - next: ~ - span: - line_start: 1 - line_stop: 4 - col_start: 1 - col_stop: 2 - path: test - content: "if x+y {\n...\n}\n" diff --git a/tests/expectations/parser/parser/statement/console.leo.out b/tests/expectations/parser/parser/statement/console.leo.out deleted file mode 100644 index 2ebba05261..0000000000 --- a/tests/expectations/parser/parser/statement/console.leo.out +++ /dev/null @@ -1,207 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Console: - function: - Assert: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.assert(x);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: console.assert(x); - - Console: - function: - Error: - parts: - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 22 - path: test - content: "console.error(\"{}\", x);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: "console.error(\"{}\", x);" - - Console: - function: - Error: - parts: - - Container - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 27 - path: test - content: "console.error(\"{}{}\", x, y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 27 - path: test - content: "console.error(\"{}{}\", x, y);" - - Console: - function: - Error: - parts: - - Const: x - parameters: [] - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 18 - path: test - content: "console.error(\"x\");" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "console.error(\"x\");" - - Console: - function: - Debug: - parts: - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 22 - path: test - content: "console.debug(\"{}\", x);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: "console.debug(\"{}\", x);" - - Console: - function: - Debug: - parts: - - Container - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 27 - path: test - content: "console.debug(\"{}{}\", x, y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 27 - path: test - content: "console.debug(\"{}{}\", x, y);" - - Console: - function: - Debug: - parts: - - Const: x - parameters: [] - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 18 - path: test - content: "console.debug(\"x\");" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "console.debug(\"x\");" - - Console: - function: - Log: - parts: - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 20 - path: test - content: "console.log(\"{}\", x);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 20 - path: test - content: "console.log(\"{}\", x);" - - Console: - function: - Log: - parts: - - Container - - Container - parameters: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 25 - path: test - content: "console.log(\"{}{}\", x, y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 25 - path: test - content: "console.log(\"{}{}\", x, y);" - - Console: - function: - Log: - parts: - - Const: x - parameters: [] - span: - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 16 - path: test - content: "console.log(\"x\");" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "console.log(\"x\");" diff --git a/tests/expectations/parser/parser/statement/definition.leo.out b/tests/expectations/parser/parser/statement/definition.leo.out deleted file mode 100644 index fa12ad7cea..0000000000 --- a/tests/expectations/parser/parser/statement/definition.leo.out +++ /dev/null @@ -1,1473 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: let x = expr; - type_: ~ - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: let x = expr; - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: let x = (); - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 11 - path: test - content: let x = (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: let x = (); - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: let x = x+y; - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 12 - path: test - content: let x = x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: let x = x+y; - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x = (x,y);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 14 - path: test - content: "let x = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: "let x = (x,y);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: let x = x(); - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 12 - path: test - content: let x = x(); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: let x = x(); - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: const x = expr; - type_: ~ - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 15 - path: test - content: const x = expr; - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: const x = (); - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 13 - path: test - content: const x = (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: const x = (); - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: const x = x+y; - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 14 - path: test - content: const x = x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: const x = x+y; - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x = (x,y);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 16 - path: test - content: "const x = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "const x = (x,y);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: const x = x(); - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 14 - path: test - content: const x = x(); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: const x = x(); - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = expr;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "let x: u32 = expr;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = ();" - type_: - IntegerType: U32 - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 16 - path: test - content: "let x: u32 = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "let x: u32 = ();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = x+y;" - type_: - IntegerType: U32 - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 17 - path: test - content: "let x: u32 = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "let x: u32 = x+y;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = (x,y);" - type_: - IntegerType: U32 - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 19 - path: test - content: "let x: u32 = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "let x: u32 = (x,y);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 5 - col_stop: 6 - path: test - content: "let x: u32 = x();" - type_: - IntegerType: U32 - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 17 - path: test - content: "let x: u32 = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "let x: u32 = x();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = expr;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 20 - path: test - content: "const x: u32 = expr;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = ();" - type_: - IntegerType: U32 - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 18 - path: test - content: "const x: u32 = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "const x: u32 = ();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = x+y;" - type_: - IntegerType: U32 - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 19 - path: test - content: "const x: u32 = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "const x: u32 = x+y;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = (x,y);" - type_: - IntegerType: U32 - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 21 - path: test - content: "const x: u32 = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 21 - path: test - content: "const x: u32 = (x,y);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 7 - col_stop: 8 - path: test - content: "const x: u32 = x();" - type_: - IntegerType: U32 - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 19 - path: test - content: "const x: u32 = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "const x: u32 = x();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = expr;" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = expr;" - type_: ~ - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "let (x, y) = expr;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = ();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = ();" - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 16 - path: test - content: "let (x, y) = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "let (x, y) = ();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = x+y;" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = x+y;" - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 17 - path: test - content: "let (x, y) = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "let (x, y) = x+y;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = (x,y);" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = (x,y);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 19 - path: test - content: "let (x, y) = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "let (x, y) = (x,y);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y) = x();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y) = x();" - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 17 - path: test - content: "let (x, y) = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "let (x, y) = x();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = expr;" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = expr;" - type_: ~ - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 20 - path: test - content: "const (x, y) = expr;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = ();" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = ();" - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 18 - path: test - content: "const (x, y) = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 18 - path: test - content: "const (x, y) = ();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = x+y;" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = x+y;" - type_: ~ - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 19 - path: test - content: "const (x, y) = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "const (x, y) = x+y;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = (x,y);" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = (x,y);" - type_: ~ - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 21 - path: test - content: "const (x, y) = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 21 - path: test - content: "const (x, y) = (x,y);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y) = x();" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y) = x();" - type_: ~ - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 16 - col_stop: 19 - path: test - content: "const (x, y) = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 19 - path: test - content: "const (x, y) = x();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = expr;" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = expr;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 23 - path: test - content: "let (x, y): u32 = expr;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = ();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = ();" - type_: - IntegerType: U32 - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 21 - path: test - content: "let (x, y): u32 = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 21 - path: test - content: "let (x, y): u32 = ();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = x+y;" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = x+y;" - type_: - IntegerType: U32 - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 22 - path: test - content: "let (x, y): u32 = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: "let (x, y): u32 = x+y;" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = (x,y);" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = (x,y);" - type_: - IntegerType: U32 - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 24 - path: test - content: "let (x, y): u32 = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: "let (x, y): u32 = (x,y);" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x, y): u32 = x();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 9 - col_stop: 10 - path: test - content: "let (x, y): u32 = x();" - type_: - IntegerType: U32 - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 19 - col_stop: 22 - path: test - content: "let (x, y): u32 = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 22 - path: test - content: "let (x, y): u32 = x();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = expr;" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = expr;" - type_: - IntegerType: U32 - value: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 25 - path: test - content: "const (x, y): u32 = expr;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = ();" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = ();" - type_: - IntegerType: U32 - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 23 - path: test - content: "const (x, y): u32 = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 23 - path: test - content: "const (x, y): u32 = ();" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = x+y;" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = x+y;" - type_: - IntegerType: U32 - value: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 24 - path: test - content: "const (x, y): u32 = x+y;" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: "const (x, y): u32 = x+y;" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = (x,y);" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = (x,y);" - type_: - IntegerType: U32 - value: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 26 - path: test - content: "const (x, y): u32 = (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 26 - path: test - content: "const (x, y): u32 = (x,y);" - - Definition: - declaration_type: Const - variable_names: - - mutable: false - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "const (x, y): u32 = x();" - - mutable: false - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 11 - col_stop: 12 - path: test - content: "const (x, y): u32 = x();" - type_: - IntegerType: U32 - value: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 21 - col_stop: 24 - path: test - content: "const (x, y): u32 = x();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 24 - path: test - content: "const (x, y): u32 = x();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x,y,) = ();" - - mutable: true - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 9 - path: test - content: "let (x,y,) = ();" - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 14 - col_stop: 16 - path: test - content: "let (x,y,) = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 16 - path: test - content: "let (x,y,) = ();" - - Definition: - declaration_type: Let - variable_names: - - mutable: true - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,) = ();\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 6 - col_stop: 7 - path: test - content: "let (x,) = ();" - type_: ~ - value: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 12 - col_stop: 14 - path: test - content: "let (x,) = ();" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 14 - path: test - content: "let (x,) = ();" diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out deleted file mode 100644 index fcb8db8960..0000000000 --- a/tests/expectations/parser/parser/statement/definition_fail.leo.out +++ /dev/null @@ -1,27 +0,0 @@ ---- -namespace: ParseStatement -expectation: Fail -outputs: - - " --> test:1:0\n |\n 1 | let mut x = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | let mut x: u32 = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:0\n |\n 1 | const mut x: u32 = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." - - " --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^\n |\n = expected 'ident', got ','" - - " --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^\n |\n = expected 'ident', got ','" diff --git a/tests/expectations/parser/parser/statement/expression.leo.out b/tests/expectations/parser/parser/statement/expression.leo.out deleted file mode 100644 index f9542ff844..0000000000 --- a/tests/expectations/parser/parser/statement/expression.leo.out +++ /dev/null @@ -1,94 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Expression: - expression: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 5 - path: test - content: expr; - - Expression: - expression: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 3 - path: test - content: (); - - Expression: - expression: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x+y; - - Expression: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "(x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 6 - path: test - content: "(x,y);" - - Expression: - expression: - Call: - function: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x();\\\"}\"}" - arguments: [] - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x(); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 4 - path: test - content: x(); diff --git a/tests/expectations/parser/parser/statement/iteration.leo.out b/tests/expectations/parser/parser/statement/iteration.leo.out deleted file mode 100644 index 4fa2b3b899..0000000000 --- a/tests/expectations/parser/parser/statement/iteration.leo.out +++ /dev/null @@ -1,203 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {}\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "for x in 0..7 {}" - stop: - Value: - Implicit: - - "7" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: "for x in 0..7 {}" - block: - statements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 15 - col_stop: 17 - path: test - content: "for x in 0..7 {}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 17 - path: test - content: "for x in 0..7 {}" - - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "for x in 0..7 {" - stop: - Value: - Implicit: - - "7" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 14 - path: test - content: "for x in 0..7 {" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 15 - col_stop: 2 - path: test - content: "for x in 0..7 {\n...\n}" - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "for x in 0..7 {\n...\n}" - - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..99u8 {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "for x in 0..99u8 {" - stop: - Value: - Integer: - - U8 - - "99" - - line_start: 1 - line_stop: 1 - col_start: 13 - col_stop: 17 - path: test - content: "for x in 0..99u8 {" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 18 - col_stop: 2 - path: test - content: "for x in 0..99u8 {\n...\n}" - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "for x in 0..99u8 {\n...\n}" - - Iteration: - variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" - start: - Value: - Implicit: - - "0" - - line_start: 1 - line_stop: 1 - col_start: 10 - col_stop: 11 - path: test - content: "for x in 0..Self {" - stop: - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" - block: - statements: - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 2 - line_stop: 2 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 3 - col_start: 18 - col_stop: 2 - path: test - content: "for x in 0..Self {\n...\n}" - span: - line_start: 1 - line_stop: 3 - col_start: 1 - col_stop: 2 - path: test - content: "for x in 0..Self {\n...\n}" diff --git a/tests/expectations/parser/parser/statement/return.leo.out b/tests/expectations/parser/parser/statement/return.leo.out deleted file mode 100644 index 938e0d0efe..0000000000 --- a/tests/expectations/parser/parser/statement/return.leo.out +++ /dev/null @@ -1,110 +0,0 @@ ---- -namespace: ParseStatement -expectation: Pass -outputs: - - Return: - expression: - Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return expr;\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 12 - path: test - content: return expr; - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: return (); - - Return: - expression: - TupleInit: - elements: [] - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 10 - path: test - content: return (); - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 10 - path: test - content: return (); - - Return: - expression: - Binary: - left: - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" - right: - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" - op: Add - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 11 - path: test - content: return x+y; - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 11 - path: test - content: return x+y; - - Return: - expression: - TupleInit: - elements: - - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" - - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" - span: - line_start: 1 - line_stop: 1 - col_start: 8 - col_stop: 13 - path: test - content: "return (x,y);" - span: - line_start: 1 - line_stop: 1 - col_start: 1 - col_stop: 13 - path: test - content: "return (x,y);" - - Return: - expression: - Value: - Implicit: - - "5" - - line_start: 2 - line_stop: 2 - col_start: 1 - col_stop: 2 - path: test - content: 5; - span: - line_start: 1 - line_stop: 2 - col_start: 1 - col_stop: 2 - path: test - content: "return\n5;" diff --git a/tests/expectations/parser/parser/statement/return_fail.leo.out b/tests/expectations/parser/parser/statement/return_fail.leo.out deleted file mode 100644 index 9f5a9e7204..0000000000 --- a/tests/expectations/parser/parser/statement/return_fail.leo.out +++ /dev/null @@ -1,7 +0,0 @@ ---- -namespace: ParseStatement -expectation: Fail -outputs: - - " --> test:1:1\n |\n 1 | return\n | ^^^^^^\n |\n = unexpected EOF" - - " --> test:1:8\n |\n 1 | return 5\n | ^\n |\n = unexpected EOF" - - " --> test:2:1\n |\n 2 | if x {}\n | ^^\n |\n = expected 'expression', got 'if'" From fc385feeca2bbf4c7ad93e12490a04d2ad63a55f Mon Sep 17 00:00:00 2001 From: damirka Date: Thu, 13 May 2021 17:07:03 +0300 Subject: [PATCH 25/26] returned parser expectations, removed cwd from compiler tests --- .../array/input_nested_3x2_fail.leo.out | 2 +- .../array/multi_fail_initializer.leo.out | 2 +- .../compiler/array/multi_fail_inline.leo.out | 2 +- .../array/multi_initializer_fail.leo.out | 2 +- .../array/nested_3x2_value_fail.leo.out | 2 +- .../array/tuple_3x2_value_fail.leo.out | 2 +- .../compiler/compiler/array/type_fail.leo.out | 2 +- .../type_nested_value_nested_3x2_fail.leo.out | 2 +- ...ype_nested_value_nested_4x3x2_fail.leo.out | 2 +- .../type_nested_value_tuple_3x2_fail.leo.out | 2 +- ...type_nested_value_tuple_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_nested_3x2_fail.leo.out | 2 +- ...type_tuple_value_nested_4x3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_3x2_fail.leo.out | 2 +- .../type_tuple_value_tuple_4x3x2_fail.leo.out | 2 +- .../array/variable_slice_fail.leo.out | 2 +- .../circuits/const_self_variable_fail.leo.out | 2 +- .../compiler/circuits/inline_fail.leo.out | 2 +- .../circuits/inline_member_fail.leo.out | 2 +- .../circuits/inline_undefined.leo.out | 2 +- .../circuits/member_function_fail.leo.out | 2 +- .../circuits/member_function_invalid.leo.out | 2 +- .../member_static_function_invalid.leo.out | 2 +- .../member_static_function_undefined.leo.out | 2 +- .../circuits/member_variable_fail.leo.out | 2 +- .../circuits/mut_function_fail.leo.out | 2 +- .../circuits/mut_self_function_fail.leo.out | 2 +- .../mut_self_static_function_fail.leo.out | 2 +- .../circuits/mut_self_variable_fail.leo.out | 2 +- .../circuits/mut_static_function_fail.leo.out | 2 +- .../circuits/mut_variable_fail.leo.out | 2 +- .../compiler/circuits/self_circuit.leo.out | 2 +- .../compiler/circuits/self_fail.leo.out | 2 +- .../circuits/self_member_invalid.leo.out | 2 +- .../circuits/self_member_undefined.leo.out | 2 +- .../compiler/console/log_fail.leo.out | 2 +- .../console/log_parameter_fail_empty.leo.out | 2 +- .../console/log_parameter_fail_none.leo.out | 2 +- .../log_parameter_fail_unknown.leo.out | 2 +- .../compiler/compiler/core/blake2s.leo.out | 2 +- .../core/core_circuit_invalid.leo.out | 2 +- .../duplicate_definition_fail.leo.out | 2 +- .../function/multiple_returns_fail.leo.out | 2 +- .../multiple_returns_fail_conditional.leo.out | 2 +- .../function/return_array_nested_fail.leo.out | 2 +- .../function/return_array_tuple_fail.leo.out | 2 +- .../compiler/function/scope_fail.leo.out | 2 +- .../compiler/function/undefined.leo.out | 2 +- .../global_consts/modify_global_const.leo.out | 2 +- .../program_input/main_array_fail.leo.out | 2 +- .../program_input/main_tuple_fail.leo.out | 2 +- .../main_array_fail.leo.out | 2 +- .../main_tuple_fail.leo.out | 2 +- .../program_registers/registers_fail.leo.out | 2 +- .../compiler/integers/i128/max_fail.leo.out | 2 +- .../compiler/integers/i128/min_fail.leo.out | 2 +- .../i128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i16/max_fail.leo.out | 2 +- .../compiler/integers/i16/min_fail.leo.out | 2 +- .../i16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i32/max_fail.leo.out | 2 +- .../compiler/integers/i32/min_fail.leo.out | 2 +- .../i32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i64/max_fail.leo.out | 2 +- .../compiler/integers/i64/min_fail.leo.out | 2 +- .../i64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/i8/max_fail.leo.out | 2 +- .../compiler/integers/i8/min_fail.leo.out | 2 +- .../compiler/integers/i8/negate_min.leo.out | 2 +- .../i8/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u128/max_fail.leo.out | 2 +- .../compiler/integers/u128/min_fail.leo.out | 2 +- .../u128/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u16/max_fail.leo.out | 2 +- .../compiler/integers/u16/min_fail.leo.out | 2 +- .../u16/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u32/max_fail.leo.out | 2 +- .../compiler/integers/u32/min_fail.leo.out | 2 +- .../u32/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u64/max_fail.leo.out | 2 +- .../compiler/integers/u64/min_fail.leo.out | 2 +- .../u64/no_space_between_literal.leo.out | 2 +- .../compiler/integers/u8/max_fail.leo.out | 2 +- .../compiler/integers/u8/min_fail.leo.out | 2 +- .../u8/no_space_between_literal.leo.out | 2 +- .../compiler/mutability/array_fail.leo.out | 2 +- .../compiler/mutability/circuit_fail.leo.out | 2 +- .../mutability/circuit_function_const.leo.out | 2 +- .../circuit_static_function_mut_fail.leo.out | 2 +- .../compiler/mutability/const.leo.out | 2 +- .../mutability/function_input.leo.out | 2 +- .../compiler/mutability/let_fail.leo.out | 2 +- .../statements/ternary_non_const_fail.leo.out | 2 +- .../parser/parser/circuits/big_self.leo.out | 53 + .../parser/parser/circuits/empty.leo.out | 13 + .../circuits/field_and_functions.leo.out | 97 ++ .../parser/parser/circuits/fields.leo.out | 19 + .../parser/circuits/fields_fail.leo.out | 5 + .../parser/parser/circuits/functions.leo.out | 91 + .../parser/parser/circuits/mut_self.leo.out | 53 + .../parser/parser/circuits/self.leo.out | 53 + .../expression/access/array_access.leo.out | 267 +++ .../access/array_range_access.leo.out | 401 +++++ .../parser/expression/access/call.leo.out | 162 ++ .../parser/expression/access/circuit.leo.out | 120 ++ .../expression/access/circuit_static.leo.out | 120 ++ .../parser/expression/access/tuple.leo.out | 109 ++ .../parser/expression/array_init.leo.out | 150 ++ .../parser/expression/array_init_fail.leo.out | 6 + .../parser/expression/array_inline.leo.out | 317 ++++ .../expression/array_inline_fail.leo.out | 9 + .../parser/expression/binary/add.leo.out | 338 ++++ .../parser/expression/binary/and.leo.out | 111 ++ .../parser/expression/binary/div.leo.out | 180 ++ .../parser/expression/binary/eq.leo.out | 338 ++++ .../parser/expression/binary/exp.leo.out | 244 +++ .../parser/expression/binary/gt.leo.out | 338 ++++ .../parser/expression/binary/gte.leo.out | 338 ++++ .../parser/expression/binary/lt.leo.out | 338 ++++ .../parser/expression/binary/lte.leo.out | 338 ++++ .../parser/expression/binary/mul.leo.out | 289 ++++ .../parser/expression/binary/ne.leo.out | 338 ++++ .../parser/expression/binary/or.leo.out | 338 ++++ .../parser/expression/binary/sub.leo.out | 180 ++ .../parser/parser/expression/cast.leo.out | 186 +++ .../parser/expression/circuit_init.leo.out | 113 ++ .../expression/circuit_init_fail.leo.out | 16 + .../parser/parser/expression/ident.leo.out | 23 + .../parser/expression/literal/address.leo.out | 13 + .../expression/literal/address_fail.leo.out | 13 + .../expression/literal/address_parse.leo.out | 40 + .../parser/expression/literal/bool.leo.out | 12 + .../expression/literal/bool_parse.leo.out | 22 + .../parser/expression/literal/comment.leo.out | 22 + .../literal/formatted_string.leo.out | 24 + .../parser/expression/literal/group.leo.out | 648 ++++++++ .../expression/literal/group_fail.leo.out | 13 + .../parser/expression/literal/int.leo.out | 111 ++ .../literal/int_parse/field.leo.out | 949 +++++++++++ .../expression/literal/int_parse/i128.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/i16.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/i32.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/i64.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/i8.leo.out | 1053 ++++++++++++ .../literal/int_parse/implicit.leo.out | 949 +++++++++++ .../literal/int_parse/mono_group.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u128.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u16.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u32.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u64.leo.out | 1053 ++++++++++++ .../expression/literal/int_parse/u8.leo.out | 1053 ++++++++++++ .../expression/literal/postfix_types.leo.out | 62 + .../parser/parser/expression/ternary.leo.out | 72 + .../parser/parser/expression/tuple.leo.out | 94 ++ .../parser/expression/unary/negate.leo.out | 120 ++ .../parser/expression/unary/not.leo.out | 120 ++ .../parser/parser/functions/annotated.leo.out | 58 + .../parser/functions/annotated_param.leo.out | 59 + .../parser/functions/annotated_twice.leo.out | 67 + .../parser/functions/const_input_fail.leo.out | 5 + .../parser/functions/const_param.leo.out | 140 ++ .../parser/functions/const_self_bad.leo.out | 50 + .../parser/parser/functions/empty.leo.out | 49 + .../parser/parser/functions/empty2.leo.out | 31 + .../parser/functions/param_array.leo.out | 64 + .../parser/functions/param_circuit.leo.out | 62 + .../parser/functions/param_tuple.leo.out | 64 + .../parser/parser/functions/params.leo.out | 75 + .../parser/functions/params_return.leo.out | 76 + .../parser/parser/functions/return.leo.out | 50 + .../parser/functions/return_tuple.leo.out | 52 + .../parser/parser/import/alias.leo.out | 38 + .../parser/parser/import/basic.leo.out | 38 + .../import/import_empty_list_fail.leo.out | 5 + .../parser/parser/import/many_import.leo.out | 136 ++ .../parser/import/many_import_star.leo.out | 170 ++ .../parser/parser/import/names.leo.out | 94 ++ .../parser/import/names_underscore.leo.out | 38 + .../parser/parser/import/star.leo.out | 36 + .../parser/parser/statement/assign.leo.out | 411 +++++ .../parser/parser/statement/block.leo.out | 141 ++ .../parser/statement/conditional.leo.out | 230 +++ .../parser/parser/statement/console.leo.out | 207 +++ .../parser/statement/definition.leo.out | 1473 +++++++++++++++++ .../parser/statement/definition_fail.leo.out | 27 + .../parser/statement/expression.leo.out | 94 ++ .../parser/parser/statement/iteration.leo.out | 203 +++ .../parser/parser/statement/return.leo.out | 110 ++ .../parser/statement/return_fail.leo.out | 7 + 189 files changed, 25411 insertions(+), 93 deletions(-) create mode 100644 tests/expectations/parser/parser/circuits/big_self.leo.out create mode 100644 tests/expectations/parser/parser/circuits/empty.leo.out create mode 100644 tests/expectations/parser/parser/circuits/field_and_functions.leo.out create mode 100644 tests/expectations/parser/parser/circuits/fields.leo.out create mode 100644 tests/expectations/parser/parser/circuits/fields_fail.leo.out create mode 100644 tests/expectations/parser/parser/circuits/functions.leo.out create mode 100644 tests/expectations/parser/parser/circuits/mut_self.leo.out create mode 100644 tests/expectations/parser/parser/circuits/self.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/array_access.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/array_range_access.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/call.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/circuit.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/circuit_static.leo.out create mode 100644 tests/expectations/parser/parser/expression/access/tuple.leo.out create mode 100644 tests/expectations/parser/parser/expression/array_init.leo.out create mode 100644 tests/expectations/parser/parser/expression/array_init_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/array_inline.leo.out create mode 100644 tests/expectations/parser/parser/expression/array_inline_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/add.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/and.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/div.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/eq.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/exp.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/gt.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/gte.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/lt.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/lte.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/mul.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/ne.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/or.leo.out create mode 100644 tests/expectations/parser/parser/expression/binary/sub.leo.out create mode 100644 tests/expectations/parser/parser/expression/cast.leo.out create mode 100644 tests/expectations/parser/parser/expression/circuit_init.leo.out create mode 100644 tests/expectations/parser/parser/expression/circuit_init_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/ident.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/address.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/address_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/address_parse.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/bool.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/bool_parse.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/comment.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/formatted_string.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/group.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/group_fail.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out create mode 100644 tests/expectations/parser/parser/expression/literal/postfix_types.leo.out create mode 100644 tests/expectations/parser/parser/expression/ternary.leo.out create mode 100644 tests/expectations/parser/parser/expression/tuple.leo.out create mode 100644 tests/expectations/parser/parser/expression/unary/negate.leo.out create mode 100644 tests/expectations/parser/parser/expression/unary/not.leo.out create mode 100644 tests/expectations/parser/parser/functions/annotated.leo.out create mode 100644 tests/expectations/parser/parser/functions/annotated_param.leo.out create mode 100644 tests/expectations/parser/parser/functions/annotated_twice.leo.out create mode 100644 tests/expectations/parser/parser/functions/const_input_fail.leo.out create mode 100644 tests/expectations/parser/parser/functions/const_param.leo.out create mode 100644 tests/expectations/parser/parser/functions/const_self_bad.leo.out create mode 100644 tests/expectations/parser/parser/functions/empty.leo.out create mode 100644 tests/expectations/parser/parser/functions/empty2.leo.out create mode 100644 tests/expectations/parser/parser/functions/param_array.leo.out create mode 100644 tests/expectations/parser/parser/functions/param_circuit.leo.out create mode 100644 tests/expectations/parser/parser/functions/param_tuple.leo.out create mode 100644 tests/expectations/parser/parser/functions/params.leo.out create mode 100644 tests/expectations/parser/parser/functions/params_return.leo.out create mode 100644 tests/expectations/parser/parser/functions/return.leo.out create mode 100644 tests/expectations/parser/parser/functions/return_tuple.leo.out create mode 100644 tests/expectations/parser/parser/import/alias.leo.out create mode 100644 tests/expectations/parser/parser/import/basic.leo.out create mode 100644 tests/expectations/parser/parser/import/import_empty_list_fail.leo.out create mode 100644 tests/expectations/parser/parser/import/many_import.leo.out create mode 100644 tests/expectations/parser/parser/import/many_import_star.leo.out create mode 100644 tests/expectations/parser/parser/import/names.leo.out create mode 100644 tests/expectations/parser/parser/import/names_underscore.leo.out create mode 100644 tests/expectations/parser/parser/import/star.leo.out create mode 100644 tests/expectations/parser/parser/statement/assign.leo.out create mode 100644 tests/expectations/parser/parser/statement/block.leo.out create mode 100644 tests/expectations/parser/parser/statement/conditional.leo.out create mode 100644 tests/expectations/parser/parser/statement/console.leo.out create mode 100644 tests/expectations/parser/parser/statement/definition.leo.out create mode 100644 tests/expectations/parser/parser/statement/definition_fail.leo.out create mode 100644 tests/expectations/parser/parser/statement/expression.leo.out create mode 100644 tests/expectations/parser/parser/statement/iteration.leo.out create mode 100644 tests/expectations/parser/parser/statement/return.leo.out create mode 100644 tests/expectations/parser/parser/statement/return_fail.leo.out diff --git a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out index 62651905cd..35898c7997 100644 --- a/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/input_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" + - " --> compiler-test:4:29\n |\n 4 | return a == [[0u8; 2]; 3)]; // This should be written the right way as this test is for the input file.\n | ^\n |\n = expected ']' -- got ')'" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out index 13455beddd..c4b0fe28b7 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_initializer.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" + - " --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [[1u8; 2]; 1]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" diff --git a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out index 59479fbd5b..d753b40f73 100644 --- a/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_fail_inline.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" + - " --> compiler-test:5:35\n |\n 5 | [1u8]]; // incorrect dimensions\n | ^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" diff --git a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out index d753a57246..9a4256a73b 100644 --- a/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/multi_initializer_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" + - " --> compiler-test:4:31\n |\n 4 | const arr: [u8; (2, 2)] = [1u8; (2, 1)]; // incorrect dimensions\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 1'" diff --git a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out index 09ea6b2cb4..75fe9847d8 100644 --- a/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/nested_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> compiler-test:6:30\n |\n 6 | const a: [u32; (3, 2)] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out index 50c19711f2..307ef63fb6 100644 --- a/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/tuple_3x2_value_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> compiler-test:5:30\n |\n 5 | const a: [u32; (3, 2)] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_fail.leo.out b/tests/expectations/compiler/compiler/array/type_fail.leo.out index 201f0f1c5d..c836958daa 100644 --- a/tests/expectations/compiler/compiler/array/type_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n = expected '(' -- got '-'" + - " --> compiler-test:4:19\n |\n 4 | const a: [u8; -2] = [0u32; 2];\n | ^\n |\n = expected '(' -- got '-'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out index c203bdb6f8..c2e1c7b7eb 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [[0; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out index 737fe18a70..d6ca2e6d93 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - " --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out index 76bf58d9ba..830aec9ce6 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> compiler-test:4:29\n |\n 4 | const b: [[u8; 2]; 3] = [0; (2, 3)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out index e9c08c0cf7..cead027c67 100644 --- a/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_nested_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - " --> compiler-test:4:34\n |\n 4 | const b: [[[u8; 2]; 3]; 4] = [0; (2, 3, 4)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out index e40f08a0ac..d04b4519f4 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" + - " --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [[0; 2]; 3]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out index a214963012..e3d2fe1df3 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_nested_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - " --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [[[0; 4]; 3]; 2]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out index 369953df87..574ecb8b5d 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" + - " --> compiler-test:4:29\n |\n 4 | const b: [u8; (2, 3)] = [0; (3, 2)]; // initializer (incorrectly reversed ordering)\n | ^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 2', received: 'array of length 3'" diff --git a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out index 1e7ab329ff..88fe3146e2 100644 --- a/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/type_tuple_value_tuple_4x3x2_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" + - " --> compiler-test:4:32\n |\n 4 | const b: [u8; (4, 3, 2)] = [0; (2, 3, 4)]; // initializer (incorrectly reversed order)\n | ^^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 4', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out index b288d3b6de..307885a20d 100644 --- a/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out +++ b/tests/expectations/compiler/compiler/array/variable_slice_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:6:19\n |\n 6 | const x = a[i..10];\n | ^^^^^^^^\n |\n = array size cannot be inferred, add explicit types" + - " --> compiler-test:6:19\n |\n 6 | const x = a[i..10];\n | ^^^^^^^^\n |\n = array size cannot be inferred, add explicit types" diff --git a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out index 180fc219b5..8a8dcf0be6 100644 --- a/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/const_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" + - " --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out index 8b4961d680..f64e632faa 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" + - " --> compiler-test:9:15\n |\n 9 | const a = Foo { y: 0u32 };\n | ^^^^^^^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out index b70828838a..c87d98a1e2 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_member_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" + - " --> compiler-test:9:15\n |\n 9 | const a = Foo { y };\n | ^^^^^^^^^\n |\n = missing circuit member 'x' for initialization of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out index a9e640ebcc..0a3ab75cf6 100644 --- a/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/inline_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n = failed to resolve circuit: 'Foo'" + - " --> compiler-test:4:15\n |\n 4 | const a = Foo { };\n | ^^^\n |\n = failed to resolve circuit: 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out index f11da89e07..48e4365950 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" + - " --> compiler-test:11:17\n |\n 11 | const err = a.echoed(1u32);\n | ^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out index e1babd1b4c..acf65fe3b4 100644 --- a/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n = cannot call static function 'echo' of circuit 'Foo' from target" + - " --> compiler-test:11:17\n |\n 11 | const err = a.echo(1u32); // echo is a static function and must be accessed using `::`\n | ^^^^^^\n |\n = cannot call static function 'echo' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out index cab6c02ed7..b41d2c24b2 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n = failed to resolve variable reference 'Foo'" + - " --> compiler-test:10:17\n |\n 10 | const err = Foo.echo(1u32); // Invalid, echo is a static function and must be accessed using `::`\n | ^^^\n |\n = failed to resolve variable reference 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out index 0db69080dc..2291504352 100644 --- a/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_static_function_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" + - " --> compiler-test:10:17\n |\n 10 | const err = Foo::echoed(1u32);\n | ^^^^^^^^^^^\n |\n = illegal reference to non-existant member 'echoed' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out index ea88b55d01..d2d815b44f 100644 --- a/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/member_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n = illegal reference to non-existant member 'y' of circuit 'Foo'" + - " --> compiler-test:9:17\n |\n 9 | const err = a.y;\n | ^^^\n |\n = illegal reference to non-existant member 'y' of circuit 'Foo'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out index 8d0d322c36..bf07411499 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - " --> compiler-test:12:5\n |\n 12 | f.bar = 1u8;\n | ^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out index 6d7af119e7..3ccde3f13b 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - " --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out index 6d7af119e7..3ccde3f13b 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" + - " --> compiler-test:9:9\n |\n 9 | self.bar = new;\n | ^^^^^^^^^^^^^^\n |\n = attempt to assign to function 'bar'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out index 180fc219b5..8a8dcf0be6 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_self_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" + - " --> compiler-test:7:9\n |\n 7 | self.a = new;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'self'" diff --git a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out index b2d36b7225..7bb9b25530 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_static_function_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n = extra circuit member 'a' for initialization of circuit 'Foo' is not allowed" + - " --> compiler-test:8:19\n |\n 8 | let f = Foo { a: 0u8 };\n | ^\n |\n = extra circuit member 'a' for initialization of circuit 'Foo' is not allowed" diff --git a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out index 2a04967ceb..e2080bf108 100644 --- a/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/mut_variable_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'f'" + - " --> compiler-test:10:5\n |\n 10 | f.a = 1u8;\n | ^^^^^^^^^\n |\n = illegal assignment to immutable variable 'f'" diff --git a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out index e9dc639a11..646f2b94dc 100644 --- a/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_circuit.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n = expected 'ident', got 'static'" + - " --> compiler-test:5:5\n |\n 5 | static function new() -> Self {\n | ^^^^^^\n |\n = expected 'ident', got 'static'" diff --git a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out index 6fd9390bc0..b6d62471c5 100644 --- a/tests/expectations/compiler/compiler/circuits/self_fail.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n = failed to resolve circuit: 'Self'" + - " --> compiler-test:4:5\n |\n 4 | Self::main();\n | ^^^^\n |\n = failed to resolve circuit: 'Self'" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out index a6073f1a43..f18b421ed4 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" + - " --> compiler-test:13:17\n |\n 13 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out index 113dc831f6..45370e3df4 100644 --- a/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out +++ b/tests/expectations/compiler/compiler/circuits/self_member_undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" + - " --> compiler-test:11:17\n |\n 11 | const err = foo.bar();\n | ^^^^^^^\n |\n = cannot call static function 'bar' of circuit 'Foo' from target" diff --git a/tests/expectations/compiler/compiler/console/log_fail.leo.out b/tests/expectations/compiler/compiler/console/log_fail.leo.out index 27abccddf1..f601bdcdd7 100644 --- a/tests/expectations/compiler/compiler/console/log_fail.leo.out +++ b/tests/expectations/compiler/compiler/console/log_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n = expected 'formatted string', got 'hello'" + - " --> compiler-test:4:18\n |\n 4 | console.log( hello );\n | ^^^^^\n |\n = expected 'formatted string', got 'hello'" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out index bd9261ac7b..b3e4e8bbfe 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_empty.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n = function call expected 2 arguments, got 1" + - " --> compiler-test:4:17\n |\n 4 | console.log(\"{}\");\n | ^^^^\n |\n = function call expected 2 arguments, got 1" diff --git a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out index c1c12c5323..af6f8935d0 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_none.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n = function call expected 1 arguments, got 2" + - " --> compiler-test:4:17\n |\n 4 | console.log(\"\", 1u32);\n | ^^^^^^^^\n |\n = function call expected 1 arguments, got 2" 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 index 349607b9a3..f61ef70fb7 100644 --- a/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out +++ b/tests/expectations/compiler/compiler/console/log_parameter_fail_unknown.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n = failed to resolve variable reference 'a'" + - " --> compiler-test:4:23\n |\n 4 | console.log(\"{}\", a);\n | ^\n |\n = failed to resolve variable reference 'a'" diff --git a/tests/expectations/compiler/compiler/core/blake2s.leo.out b/tests/expectations/compiler/compiler/core/blake2s.leo.out index 3eafe6bbea..07c482845a 100644 --- a/tests/expectations/compiler/compiler/core/blake2s.leo.out +++ b/tests/expectations/compiler/compiler/core/blake2s.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" + - " --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" diff --git a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out index 3eafe6bbea..07c482845a 100644 --- a/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out +++ b/tests/expectations/compiler/compiler/core/core_circuit_invalid.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" + - " --> compiler-test:3:30\n |\n 3 | import core.unstable.blake2s.BadCircuit; // `BadCircuit` is not included in the blake2s package\n | ^^^^^^^^^^\n |\n = failed to resolve import: 'core.unstable.blake2s.BadCircuit'" diff --git a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out index ec527423b3..3b1bf075b9 100644 --- a/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/duplicate_definition_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" + - " --> compiler-test:8:1\n |\n 8 | function main() {\n 9 | ...\n 10 | }\n | ^\n |\n = a function named \"main\" already exists in this scope" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out index 68a7957a5e..5fcaab60f3 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:5\n |\n 4 | if true {\n 5 | ...\n 6 | }\n | ^\n |\n = function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'" + - " --> compiler-test:4:5\n |\n 4 | if true {\n 5 | ...\n 6 | }\n | ^\n |\n = function 'main' failed to validate return path: 'cannot have asymmetrical return in if statement'" diff --git a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out index e175c09bfd..52b50d8a3e 100644 --- a/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out +++ b/tests/expectations/compiler/compiler/function/multiple_returns_fail_conditional.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n 6 | \n 7 | \n 8 | \n 9 | \n 10 | \n | ^\n |\n = function 'main' missing return for all paths" + - " --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n 6 | \n 7 | \n 8 | \n 9 | \n 10 | \n | ^\n |\n = function 'main' missing return for all paths" diff --git a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out index 5841e00d3a..cb86704670 100644 --- a/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_nested_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> compiler-test:4:12\n |\n 4 | return [0u8; (2, 3)]; // The correct 3x2 array tuple is `[0u8; (3, 2)]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out index 15df66d216..d3eb890c94 100644 --- a/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/return_array_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" + - " --> compiler-test:4:12\n |\n 4 | return [[0u8; 3]; 2]; // The correct 3x2 nested array is `[0u8; 2]; 3]`\n | ^^^^^^^^^^^^^\n |\n = unexpected type, expected: 'array of length 3', received: 'array of length 2'" diff --git a/tests/expectations/compiler/compiler/function/scope_fail.leo.out b/tests/expectations/compiler/compiler/function/scope_fail.leo.out index 82b7a1feb4..db3439c953 100644 --- a/tests/expectations/compiler/compiler/function/scope_fail.leo.out +++ b/tests/expectations/compiler/compiler/function/scope_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n = failed to resolve variable reference 'myGlobal'" + - " --> compiler-test:5:12\n |\n 5 | return myGlobal;\n | ^^^^^^^^\n |\n = failed to resolve variable reference 'myGlobal'" diff --git a/tests/expectations/compiler/compiler/function/undefined.leo.out b/tests/expectations/compiler/compiler/function/undefined.leo.out index 5f7d648491..df282cd43c 100644 --- a/tests/expectations/compiler/compiler/function/undefined.leo.out +++ b/tests/expectations/compiler/compiler/function/undefined.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n = failed to resolve function: 'my_function'" + - " --> compiler-test:5:5\n |\n 5 | my_function();\n | ^^^^^^^^^^^\n |\n = failed to resolve function: 'my_function'" diff --git a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out index 8b0bbbbef6..dd80c5e6bc 100644 --- a/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out +++ b/tests/expectations/compiler/compiler/global_consts/modify_global_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'basic'" + - " --> compiler-test:7:5\n |\n 7 | basic = 2u32;\n | ^^^^^^^^^^^^\n |\n = illegal assignment to immutable variable 'basic'" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out index cf70c35e5a..65eb91d49f 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:3:1\n |\n 3 | function main(x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 1, found array dimensions 2" + - " --> compiler-test:3:1\n |\n 3 | function main(x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 1, found array dimensions 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out index 56fb7e66dc..9170f96dbf 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:3:1\n |\n 3 | function main(x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" + - " --> compiler-test:3:1\n |\n 3 | function main(x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out index 2b19d5f2a4..81b574a020 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:3:1\n |\n 3 | function main(const x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 2, found array dimensions 1" + - " --> compiler-test:3:1\n |\n 3 | function main(const x: [i16; 2]) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input array dimensions mismatch expected 2, found array dimensions 1" diff --git a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out index 3d6541f25b..0eb406a811 100644 --- a/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_input_constants/main_tuple_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:3:1\n |\n 3 | function main(const x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" + - " --> compiler-test:3:1\n |\n 3 | function main(const x: (u8, bool, u8)) {\n 4 | ...\n 5 | }\n | ^\n |\n = Input tuple size mismatch expected 3, found tuple with length 2" diff --git a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out index ae94206394..e074c91490 100644 --- a/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out +++ b/tests/expectations/compiler/compiler/input_files/program_registers/registers_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n | ^\n |\n = Mismatched types. Expected register output type `u8`, found type `bool`." + - " --> compiler-test:3:1\n |\n 3 | function main() -> bool {\n 4 | ...\n 5 | }\n | ^\n |\n = Mismatched types. Expected register output type `u8`, found type `bool`." diff --git a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out index 210ba97209..5c2d445743 100644 --- a/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '170141183460469231731687303715884105728'" + - " --> compiler-test:4:21\n |\n 4 | const a: i128 = 170141183460469231731687303715884105728;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '170141183460469231731687303715884105728'" diff --git a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out index 899e3687d1..13921defb2 100644 --- a/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-170141183460469231731687303715884105729'" + - " --> compiler-test:4:21\n |\n 4 | const a: i128 = -170141183460469231731687303715884105729;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-170141183460469231731687303715884105729'" diff --git a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out index 07024c00a7..972dbae802 100644 --- a/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 i128;\n | ^\n |\n = Unexpected white space between terms 1 and i128" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 i128;\n | ^\n |\n = Unexpected white space between terms 1 and i128" diff --git a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out index 9f5c9af108..bec67bdb3e 100644 --- a/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n = failed to parse int value '32768'" + - " --> compiler-test:4:20\n |\n 4 | const a: i16 = 32768;\n | ^^^^^\n |\n = failed to parse int value '32768'" diff --git a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out index 15201dc44e..7422740b9a 100644 --- a/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n = failed to parse int value '-32769'" + - " --> compiler-test:4:20\n |\n 4 | const a: i16 = -32769;\n | ^^^^^^\n |\n = failed to parse int value '-32769'" diff --git a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out index bff37090c2..47680bf6ac 100644 --- a/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 i16;\n | ^\n |\n = Unexpected white space between terms 1 and i16" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 i16;\n | ^\n |\n = Unexpected white space between terms 1 and i16" diff --git a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out index b190d8a715..f0de883d3d 100644 --- a/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^\n |\n = failed to parse int value '2147483648'" + - " --> compiler-test:4:20\n |\n 4 | const a: i32 = 2147483648;\n | ^^^^^^^^^^\n |\n = failed to parse int value '2147483648'" diff --git a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out index fba28e10cb..211afb26eb 100644 --- a/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^\n |\n = failed to parse int value '-2147483649'" + - " --> compiler-test:4:20\n |\n 4 | const a: i32 = -2147483649;\n | ^^^^^^^^^^^\n |\n = failed to parse int value '-2147483649'" diff --git a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out index 580a0e9e8a..6a9d5f0913 100644 --- a/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 i32;\n | ^\n |\n = Unexpected white space between terms 1 and i32" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 i32;\n | ^\n |\n = Unexpected white space between terms 1 and i32" diff --git a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out index a6545dc264..7e8eb2c7de 100644 --- a/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '9223372036854775808'" + - " --> compiler-test:4:20\n |\n 4 | const a: i64 = 9223372036854775808;\n | ^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '9223372036854775808'" diff --git a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out index 7786b65e52..0e07cabdcc 100644 --- a/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-9223372036854775809'" + - " --> compiler-test:4:20\n |\n 4 | const a: i64 = -9223372036854775809;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '-9223372036854775809'" diff --git a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out index 5e64a583ce..8ad4c3a497 100644 --- a/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 i64;\n | ^\n |\n = Unexpected white space between terms 1 and i64" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 i64;\n | ^\n |\n = Unexpected white space between terms 1 and i64" diff --git a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out index 348ae5ef94..beec6ea364 100644 --- a/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n = failed to parse int value '128'" + - " --> compiler-test:4:19\n |\n 4 | const a: i8 = 128;\n | ^^^\n |\n = failed to parse int value '128'" diff --git a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out index ae1630e758..b56ece00d3 100644 --- a/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n = failed to parse int value '-129'" + - " --> compiler-test:4:19\n |\n 4 | const a: i8 = -129;\n | ^^^^\n |\n = failed to parse int value '-129'" diff --git a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out index 6847e5a689..1e357b60db 100644 --- a/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/negate_min.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n = integer operation failed due to the signed integer error `Overflow`" + - " --> compiler-test:5:15\n |\n 5 | const b = -a;\n | ^^\n |\n = integer operation failed due to the signed integer error `Overflow`" diff --git a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out index a5492c62a2..cd1c85e431 100644 --- a/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/i8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 i8;\n | ^\n |\n = Unexpected white space between terms 1 and i8" diff --git a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out index 8e6a2d9b7f..99e37f107e 100644 --- a/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '340282366920938463463374607431768211456'" + - " --> compiler-test:4:21\n |\n 4 | const a: u128 = 340282366920938463463374607431768211456;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '340282366920938463463374607431768211456'" diff --git a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out index 9b730487e5..3ec7269953 100644 --- a/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:21\n |\n 4 | const a: u128 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> compiler-test:4:21\n |\n 4 | const a: u128 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out index 7908870e22..3283c7d907 100644 --- a/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u128/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 u128;\n | ^\n |\n = Unexpected white space between terms 1 and u128" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 u128;\n | ^\n |\n = Unexpected white space between terms 1 and u128" diff --git a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out index 9e5e93dd09..4d3de310ca 100644 --- a/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^\n |\n = failed to parse int value '65536'" + - " --> compiler-test:4:20\n |\n 4 | const a: u16 = 65536;\n | ^^^^^\n |\n = failed to parse int value '65536'" diff --git a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out index 184bad56e3..d227adfb91 100644 --- a/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: u16 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> compiler-test:4:20\n |\n 4 | const a: u16 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out index 27c73261b1..1a5abecdc0 100644 --- a/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u16/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 u16;\n | ^\n |\n = Unexpected white space between terms 1 and u16" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 u16;\n | ^\n |\n = Unexpected white space between terms 1 and u16" diff --git a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out index bfe48304a2..137aa789b5 100644 --- a/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^\n |\n = failed to parse int value '4294967296'" + - " --> compiler-test:4:20\n |\n 4 | const a: u32 = 4294967296;\n | ^^^^^^^^^^\n |\n = failed to parse int value '4294967296'" diff --git a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out index 4d49e6bc62..2971bc63a3 100644 --- a/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: u32 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> compiler-test:4:20\n |\n 4 | const a: u32 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out index 8b66790f68..b778c57782 100644 --- a/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u32/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 u32;\n | ^\n |\n = Unexpected white space between terms 1 and u32" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 u32;\n | ^\n |\n = Unexpected white space between terms 1 and u32" diff --git a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out index 0dd5158e25..94fb8ff65e 100644 --- a/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '18446744073709551616'" + - " --> compiler-test:4:20\n |\n 4 | const a: u64 = 18446744073709551616;\n | ^^^^^^^^^^^^^^^^^^^^\n |\n = failed to parse int value '18446744073709551616'" diff --git a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out index 7b80ee91cf..297cf5e8df 100644 --- a/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:20\n |\n 4 | const a: u64 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> compiler-test:4:20\n |\n 4 | const a: u64 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out index a9f7ae9ad5..ab434da400 100644 --- a/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u64/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 u64;\n | ^\n |\n = Unexpected white space between terms 1 and u64" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 u64;\n | ^\n |\n = Unexpected white space between terms 1 and u64" diff --git a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out index debb54ba9b..eff5422487 100644 --- a/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/max_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^\n |\n = failed to parse int value '256'" + - " --> compiler-test:4:19\n |\n 4 | const a: u8 = 256;\n | ^^^\n |\n = failed to parse int value '256'" diff --git a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out index 2c4581da1c..da94b82b2b 100644 --- a/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/min_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:19\n |\n 4 | const a: u8 = -1;\n | ^^\n |\n = failed to parse int value '-1'" + - " --> compiler-test:4:19\n |\n 4 | const a: u8 = -1;\n | ^^\n |\n = failed to parse int value '-1'" diff --git a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out index b69b39472e..ced5132f3b 100644 --- a/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out +++ b/tests/expectations/compiler/compiler/integers/u8/no_space_between_literal.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:4:15\n |\n 4 | const i = 1 u8;\n | ^\n |\n = Unexpected white space between terms 1 and u8" + - " --> compiler-test:4:15\n |\n 4 | const i = 1 u8;\n | ^\n |\n = Unexpected white space between terms 1 and u8" diff --git a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out index c1cd15e521..0efd7b76a8 100644 --- a/tests/expectations/compiler/compiler/mutability/array_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/array_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> compiler-test:5:5\n |\n 5 | a[0] = 0;\n | ^^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out index b2be78a69d..f00b41889f 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> compiler-test:10:5\n |\n 10 | a.x = 0;\n | ^^^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out index d52c6edb79..461b7c8b18 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_function_const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n = cannot call mutable member function 'foo' of circuit 'Foo' from immutable context" + - " --> compiler-test:15:5\n |\n 15 | a.foo();\n | ^^^^^\n |\n = cannot call mutable member function 'foo' of circuit 'Foo' from immutable context" diff --git a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out index 3cbafa8884..9eb3929726 100644 --- a/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/circuit_static_function_mut_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n = extra circuit member 'x' for initialization of circuit 'Foo' is not allowed" + - " --> compiler-test:8:19\n |\n 8 | let a = Foo { x: 1 };\n | ^\n |\n = extra circuit member 'x' for initialization of circuit 'Foo' is not allowed" diff --git a/tests/expectations/compiler/compiler/mutability/const.leo.out b/tests/expectations/compiler/compiler/mutability/const.leo.out index 481421aed5..2b510f9d57 100644 --- a/tests/expectations/compiler/compiler/mutability/const.leo.out +++ b/tests/expectations/compiler/compiler/mutability/const.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/function_input.leo.out b/tests/expectations/compiler/compiler/mutability/function_input.leo.out index 101784da91..6f64decd33 100644 --- a/tests/expectations/compiler/compiler/mutability/function_input.leo.out +++ b/tests/expectations/compiler/compiler/mutability/function_input.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:5:5\n |\n 5 | a = false;\n | ^\n |\n = failed to resolve variable reference 'a'" + - " --> compiler-test:5:5\n |\n 5 | a = false;\n | ^\n |\n = failed to resolve variable reference 'a'" diff --git a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out index 481421aed5..2b510f9d57 100644 --- a/tests/expectations/compiler/compiler/mutability/let_fail.leo.out +++ b/tests/expectations/compiler/compiler/mutability/let_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" + - " --> compiler-test:6:5\n |\n 6 | a = 0;\n | ^^^^^\n |\n = illegal assignment to immutable variable 'a'" diff --git a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out index b38300baea..c32c26b9f2 100644 --- a/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out +++ b/tests/expectations/compiler/compiler/statements/ternary_non_const_fail.leo.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - " --> test/file:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to create const variable(s) 'y' with non constant values." + - " --> compiler-test:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to create const variable(s) 'y' with non constant values." diff --git a/tests/expectations/parser/parser/circuits/big_self.leo.out b/tests/expectations/parser/parser/circuits/big_self.leo.out new file mode 100644 index 0000000000..abdced08ca --- /dev/null +++ b/tests/expectations/parser/parser/circuits/big_self.leo.out @@ -0,0 +1,53 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() -> Self {\\\"}\"}" + input: [] + output: SelfType + block: + statements: + - Return: + expression: + CircuitInit: + name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return Self {};\\\"}\"}" + members: [] + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 23 + path: test + content: " return Self {};" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 23 + path: test + content: " return Self {};" + span: + line_start: 4 + line_stop: 6 + col_start: 26 + col_stop: 6 + path: test + content: " function x() -> Self {\n...\n }" + span: + line_start: 4 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: test + content: " function x() -> Self {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/empty.leo.out b/tests/expectations/parser/parser/circuits/empty.leo.out new file mode 100644 index 0000000000..e826c4097d --- /dev/null +++ b/tests/expectations/parser/parser/circuits/empty.leo.out @@ -0,0 +1,13 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: [] + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out new file mode 100644 index 0000000000..a13e5be7fb --- /dev/null +++ b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out @@ -0,0 +1,97 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}" + - IntegerType: U32 + - CircuitVariable: + - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32\\\"}\"}" + - IntegerType: U32 + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 7 + line_stop: 7 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 6 + line_stop: 8 + col_start: 18 + col_stop: 6 + path: test + content: " function x() {\n...\n }" + span: + line_start: 6 + line_stop: 8 + col_start: 5 + col_stop: 6 + path: test + content: " function x() {\n...\n }" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 10 + line_stop: 10 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 10 + line_stop: 10 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 9 + line_stop: 11 + col_start: 18 + col_stop: 6 + path: test + content: " function y() {\n...\n }" + span: + line_start: 9 + line_stop: 11 + col_start: 5 + col_stop: 6 + path: test + content: " function y() {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/fields.leo.out b/tests/expectations/parser/parser/circuits/fields.leo.out new file mode 100644 index 0000000000..041cc13554 --- /dev/null +++ b/tests/expectations/parser/parser/circuits/fields.leo.out @@ -0,0 +1,19 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitVariable: + - "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" x: u32;\\\"}\"}" + - IntegerType: U32 + - CircuitVariable: + - "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" y: u32;\\\"}\"}" + - IntegerType: U32 + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/fields_fail.leo.out b/tests/expectations/parser/parser/circuits/fields_fail.leo.out new file mode 100644 index 0000000000..006159e9d5 --- /dev/null +++ b/tests/expectations/parser/parser/circuits/fields_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Parse +expectation: Fail +outputs: + - " --> test:10:11\n |\n 10 | y: u32;\n | ^\n |\n = Cannot mix use of commas and semi-colons for circuit member variable declarations." diff --git a/tests/expectations/parser/parser/circuits/functions.leo.out b/tests/expectations/parser/parser/circuits/functions.leo.out new file mode 100644 index 0000000000..aebda6c4e5 --- /dev/null +++ b/tests/expectations/parser/parser/circuits/functions.leo.out @@ -0,0 +1,91 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 18 + col_stop: 6 + path: test + content: " function x() {\n...\n }" + span: + line_start: 4 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: test + content: " function x() {\n...\n }" + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 8 + line_stop: 8 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 8 + line_stop: 8 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 7 + line_stop: 9 + col_start: 18 + col_stop: 6 + path: test + content: " function y() {\n...\n }" + span: + line_start: 7 + line_stop: 9 + col_start: 5 + col_stop: 6 + path: test + content: " function y() {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/mut_self.leo.out b/tests/expectations/parser/parser/circuits/mut_self.leo.out new file mode 100644 index 0000000000..03997801dc --- /dev/null +++ b/tests/expectations/parser/parser/circuits/mut_self.leo.out @@ -0,0 +1,53 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" + input: + - MutSelfKeyword: "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(mut self) {\\\"}\"}" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 26 + col_stop: 6 + path: test + content: " function x(mut self) {\n...\n }" + span: + line_start: 4 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: test + content: " function x(mut self) {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/circuits/self.leo.out b/tests/expectations/parser/parser/circuits/self.leo.out new file mode 100644 index 0000000000..65785a36b6 --- /dev/null +++ b/tests/expectations/parser/parser/circuits/self.leo.out @@ -0,0 +1,53 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: + "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}": + circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}" + members: + - CircuitFunction: + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" + input: + - SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 16 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 9 + col_stop: 18 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 22 + col_stop: 6 + path: test + content: " function x(self) {\n...\n }" + span: + line_start: 4 + line_stop: 6 + col_start: 5 + col_stop: 6 + path: test + content: " function x(self) {\n...\n }" + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/expression/access/array_access.leo.out b/tests/expectations/parser/parser/expression/access/array_access.leo.out new file mode 100644 index 0000000000..5c820cc814 --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/array_access.leo.out @@ -0,0 +1,267 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[0]" + - ArrayAccess: + array: + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X[1]\\\"}\"}" + index: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "X[1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "X[1]" + - ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8]\\\"}\"}" + index: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[0u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[0u8]" + - ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1u8][2u8]\\\"}\"}" + index: + Value: + Integer: + - U8 + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[1u8][2u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[1u8][2u8]" + index: + Value: + Integer: + - U8 + - "2" + - line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 11 + path: test + content: "x[1u8][2u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[1u8][2u8]" + - ArrayAccess: + array: + ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + index: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[x][y][z]" + index: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[x][y][z]" + index: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x[x][y][z]" + - Call: + function: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0]()\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0]()" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[0]()" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[0]()" + - ArrayAccess: + array: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()[0]\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "x()[0]" + index: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x()[0]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x()[0]" + - Call: + function: + CircuitStaticFunctionAccess: + circuit: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x(y)::y(x)" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x(y)::y(x)" + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x(y)::y(x)" + - ArrayAccess: + array: + TupleAccess: + tuple: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" + index: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[x].0[x]" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[x].0[x]" + index: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x[x].0[x]" diff --git a/tests/expectations/parser/parser/expression/access/array_range_access.leo.out b/tests/expectations/parser/parser/expression/access/array_range_access.leo.out new file mode 100644 index 0000000000..10b02e133d --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/array_range_access.leo.out @@ -0,0 +1,401 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" + left: ~ + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "x[..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..]\\\"}\"}" + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[1..]" + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[1..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..1]\\\"}\"}" + left: ~ + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x[..1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[..1]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..1]\\\"}\"}" + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[1..1]" + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "x[1..1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[1..1]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0..100]\\\"}\"}" + left: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0..100]" + right: + Value: + Implicit: + - "100" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 9 + path: test + content: "x[0..100]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x[0..100]" + - ArrayAccess: + array: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[323452345.2345234523453453][323452345.2345234523453453]\\\"}\"}" + index: + TupleAccess: + tuple: + Value: + Implicit: + - "323452345" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 12 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + index: + value: "2345234523453453" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 29 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 30 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + index: + TupleAccess: + tuple: + Value: + Implicit: + - "323452345" + - line_start: 1 + line_stop: 1 + col_start: 31 + col_stop: 40 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + index: + value: "2345234523453453" + span: + line_start: 1 + line_stop: 1 + col_start: 31 + col_stop: 57 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 58 + path: test + content: "x[323452345.2345234523453453][323452345.2345234523453453]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..1u8]\\\"}\"}" + left: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[0u8..1u8]" + right: + Value: + Integer: + - U8 + - "1" + - line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 11 + path: test + content: "x[0u8..1u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[0u8..1u8]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u8..]\\\"}\"}" + left: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[0u8..]" + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[0u8..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..0u8]\\\"}\"}" + left: ~ + right: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "x[..0u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[..0u8]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..]\\\"}\"}" + left: ~ + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "x[..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[x.y..]" + right: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[x.y..]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" + left: ~ + right: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "x[..y.x]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[..y.x]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + left: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[x.y..y.x]" + right: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 11 + path: test + content: "x[x.y..y.x]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[x.y..y.x]" + - ArrayRangeAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + left: + CircuitMemberAccess: + circuit: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "x[x.y.x..y.x.y]" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 8 + path: test + content: "x[x.y.x..y.x.y]" + right: + CircuitMemberAccess: + circuit: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 13 + path: test + content: "x[x.y.x..y.x.y]" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: "x[x.y.x..y.x.y]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "x[x.y.x..y.x.y]" diff --git a/tests/expectations/parser/parser/expression/access/call.leo.out b/tests/expectations/parser/parser/expression/access/call.leo.out new file mode 100644 index 0000000000..ed9e9058da --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/call.leo.out @@ -0,0 +1,162 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x()\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x() + - Call: + function: + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X()\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: X() + - Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: x(y) + - Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(y, z)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x(y, z)" + - Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x(x, y, z)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x(x, y, z)" + - Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y()" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x::y()" + - Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y(x)" + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x::y(x)" + - Call: + function: + TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0(x) + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: x.0(x) + - Call: + function: + ArrayAccess: + array: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" + index: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0](x)" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[0](x)" + arguments: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[0](x)" diff --git a/tests/expectations/parser/parser/expression/access/circuit.leo.out b/tests/expectations/parser/parser/expression/access/circuit.leo.out new file mode 100644 index 0000000000..e10176179c --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/circuit.leo.out @@ -0,0 +1,120 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.y + - CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" + name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X.Y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: X.Y + - CircuitMemberAccess: + circuit: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.y.z + name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.y.z + - Call: + function: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y()\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.y() + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.y() + - TupleAccess: + tuple: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.y.0 + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.y.0 + - ArrayAccess: + array: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "x.y[1]" + index: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x.y[1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x.y[1]" diff --git a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out new file mode 100644 index 0000000000..eed96329a1 --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out @@ -0,0 +1,120 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y" + - CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" + name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "X::Y" + - CircuitStaticFunctionAccess: + circuit: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y::z" + name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x::y::z" + - Call: + function: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y()" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x::y()" + - TupleAccess: + tuple: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y.0" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x::y.0" + - ArrayAccess: + array: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x::y[1]" + index: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "x::y[1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x::y[1]" diff --git a/tests/expectations/parser/parser/expression/access/tuple.leo.out b/tests/expectations/parser/parser/expression/access/tuple.leo.out new file mode 100644 index 0000000000..c4089a4522 --- /dev/null +++ b/tests/expectations/parser/parser/expression/access/tuple.leo.out @@ -0,0 +1,109 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0\\\"}\"}" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0 + - TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1\\\"}\"}" + index: + value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.1 + - TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2\\\"}\"}" + index: + value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.2 + - TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0.0\\\"}\"}" + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0.0 + index: + value: "0" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.0.0 + - TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.1.1\\\"}\"}" + index: + value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.1.1 + index: + value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.1.1 + - TupleAccess: + tuple: + TupleAccess: + tuple: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.2.2\\\"}\"}" + index: + value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.2.2 + index: + value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: x.2.2 diff --git a/tests/expectations/parser/parser/expression/array_init.leo.out b/tests/expectations/parser/parser/expression/array_init.leo.out new file mode 100644 index 0000000000..c8ee3bfb32 --- /dev/null +++ b/tests/expectations/parser/parser/expression/array_init.leo.out @@ -0,0 +1,150 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - ArrayInit: + element: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "[0u8; 1]" + dimensions: + - value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "[0u8; 1]" + - ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0; 1]" + dimensions: + - value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "[0; 1]" + - ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0; (1)]" + dimensions: + - value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "[0; (1)]" + - ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0; (1, 2)]" + dimensions: + - value: "1" + - value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "[0; (1, 2)]" + - ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0; (1, 2, 3)]" + dimensions: + - value: "1" + - value: "2" + - value: "3" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: "[0; (1, 2, 3)]" + - ArrayInit: + element: + ArrayInit: + element: + ArrayInit: + element: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: "[[[0; 3]; 2]; 1]" + dimensions: + - value: "3" + span: + line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 9 + path: test + content: "[[[0; 3]; 2]; 1]" + dimensions: + - value: "2" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 13 + path: test + content: "[[[0; 3]; 2]; 1]" + dimensions: + - value: "1" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "[[[0; 3]; 2]; 1]" diff --git a/tests/expectations/parser/parser/expression/array_init_fail.leo.out b/tests/expectations/parser/parser/expression/array_init_fail.leo.out new file mode 100644 index 0000000000..3e6e920477 --- /dev/null +++ b/tests/expectations/parser/parser/expression/array_init_fail.leo.out @@ -0,0 +1,6 @@ +--- +namespace: ParseExpression +expectation: Fail +outputs: + - " --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^\n |\n = illegal spread in array initializer" + - " --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^\n |\n = illegal spread in array initializer" diff --git a/tests/expectations/parser/parser/expression/array_inline.leo.out b/tests/expectations/parser/parser/expression/array_inline.leo.out new file mode 100644 index 0000000000..ae4ccf624f --- /dev/null +++ b/tests/expectations/parser/parser/expression/array_inline.leo.out @@ -0,0 +1,317 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "[0u8, 1, 2, 3]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "[0u8, 1, 2, 3]" + - Expression: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "[0u8, 1, 2, 3]" + - Expression: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: "[0u8, 1, 2, 3]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: "[0u8, 1, 2, 3]" + - ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[1]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "[1]" + - ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "1" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "[1u8]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "[1u8]" + - ArrayInline: + elements: + - Expression: + Value: + Integer: + - U8 + - "1" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "[1u8,]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "[1u8,]" + - ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0, 1,]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "[0, 1,]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "[0, 1,]" + - ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 3 + path: test + content: "[0,1,]" + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: "[0,1,]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "[0,1,]" + - ArrayInline: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "[]" + - ArrayInline: + elements: + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "[[1,2,3],[1,2,3]]" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 9 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + ArrayInline: + elements: + - Expression: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: "[[1,2,3],[1,2,3]]" + - Expression: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 16 + path: test + content: "[[1,2,3],[1,2,3]]" + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 17 + path: test + content: "[[1,2,3],[1,2,3]]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "[[1,2,3],[1,2,3]]" + - ArrayInline: + elements: + - Expression: + ArrayInline: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "[[]]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "[[]]" + - ArrayInline: + elements: + - Expression: + ArrayInline: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "[[], []]" + - Expression: + ArrayInline: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 8 + path: test + content: "[[], []]" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "[[], []]" diff --git a/tests/expectations/parser/parser/expression/array_inline_fail.leo.out b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out new file mode 100644 index 0000000000..3565e3e59c --- /dev/null +++ b/tests/expectations/parser/parser/expression/array_inline_fail.leo.out @@ -0,0 +1,9 @@ +--- +namespace: ParseExpression +expectation: Fail +outputs: + - " --> test:1:2\n |\n 1 | [,]\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:2\n |\n 1 | [,,]\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:4\n |\n 1 | [0,,]\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:2\n |\n 1 | [,0]\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:2\n |\n 1 | [,0,]\n | ^\n |\n = expected 'expression', got ','" diff --git a/tests/expectations/parser/parser/expression/binary/add.leo.out b/tests/expectations/parser/parser/expression/binary/add.leo.out new file mode 100644 index 0000000000..72d244dd8d --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/add.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 1 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2+3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2+3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2+3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 + 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 + 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 + 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 + 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 + 2 + 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 + 3 * 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 + 3 * 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 - 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 - 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 - 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 - 3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 + 2 - 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 18 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/and.leo.out b/tests/expectations/parser/parser/expression/binary/and.leo.out new file mode 100644 index 0000000000..b6f8de5d72 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/and.leo.out @@ -0,0 +1,111 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: true && false + right: + Value: + Boolean: + - "false" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: true && false + op: And + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: true && false + - Binary: + left: + Value: + Boolean: + - "false" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: false&&true + right: + Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 12 + path: test + content: false&&true + op: And + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: false&&true + - Binary: + left: + Binary: + left: + Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: true&&false&&true + right: + Value: + Boolean: + - "false" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 12 + path: test + content: true&&false&&true + op: And + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: true&&false&&true + right: + Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 18 + path: test + content: true&&false&&true + op: And + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: true&&false&&true diff --git a/tests/expectations/parser/parser/expression/binary/div.leo.out b/tests/expectations/parser/parser/expression/binary/div.leo.out new file mode 100644 index 0000000000..45684cd859 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/div.leo.out @@ -0,0 +1,180 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 / 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 / 1 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 / 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2/3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2/3 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2/3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 / 2 / 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 / 2 / 3 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 / 2 / 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 / 2 / 3 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 / 2 / 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 2 / 3 ** 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 2 / 3 ** 4 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 ** 2 / 3 ** 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 ** 2 / 3 ** 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 16 + path: test + content: 1 ** 2 / 3 ** 4 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 16 + path: test + content: 1 ** 2 / 3 ** 4 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: 1 ** 2 / 3 ** 4 diff --git a/tests/expectations/parser/parser/expression/binary/eq.leo.out b/tests/expectations/parser/parser/expression/binary/eq.leo.out new file mode 100644 index 0000000000..56f7df069c --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/eq.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 == 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 == 1 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 == 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2==3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: 2==3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: 2==3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 == 2 == 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 == 2 == 3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 == 2 == 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 == 2 == 3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 == 2 == 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 == 3 < 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 == 3 < 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 == 3 < 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 < 2 == 3 < 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 == 2 == 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 == 2 == 3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 == 2 == 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 == 2 == 3 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 == 2 == 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 + op: Eq + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: 1 < 2 == 3 < 4 == 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/exp.leo.out b/tests/expectations/parser/parser/expression/binary/exp.leo.out new file mode 100644 index 0000000000..b0c39a877f --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/exp.leo.out @@ -0,0 +1,244 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 1 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 ** 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2**3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: 2**3 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: 2**3 + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 2 ** 3 + right: + Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 2 ** 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 ** 2 ** 3 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 12 + path: test + content: 1 ** 2 ** 3 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 ** 2 ** 3 + - Binary: + left: + Cast: + inner: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 as i8 ** 3 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 1 as i8 ** 3 as i8 + right: + Cast: + inner: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 13 + path: test + content: 1 as i8 ** 3 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 19 + path: test + content: 1 as i8 ** 3 as i8 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: 1 as i8 ** 3 as i8 + - Binary: + left: + Cast: + inner: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + right: + Binary: + left: + Cast: + inner: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 13 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 19 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + right: + Cast: + inner: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + target_type: + IntegerType: I8 + span: + line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 30 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 30 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 30 + path: test + content: 1 as i8 ** 3 as i8 ** 5 as i8 diff --git a/tests/expectations/parser/parser/expression/binary/gt.leo.out b/tests/expectations/parser/parser/expression/binary/gt.leo.out new file mode 100644 index 0000000000..b9d5cfd72d --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/gt.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 > 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 > 1 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 > 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2>3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2>3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2>3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 > 2 > 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 > 2 > 3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 > 2 > 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 > 2 > 3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 > 2 > 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 > 3 + 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 > 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 > 3 + 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 > 3 + 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 > 2 > 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 > 2 > 3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 > 2 > 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 > 2 > 3 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 > 2 > 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 18 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 22 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 22 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 + op: Gt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: 1 + 2 > 3 + 4 > 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/gte.leo.out b/tests/expectations/parser/parser/expression/binary/gte.leo.out new file mode 100644 index 0000000000..9ab526f71c --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/gte.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 >= 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 >= 1 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 >= 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2 >= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 2 >= 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 >= 2 >= 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 >= 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 >= 2 >= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 >= 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 >= 2 >= 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 >= 3 + 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 >= 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 >= 3 + 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 + 2 >= 3 + 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 >= 2 >= 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 >= 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 >= 2 >= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 >= 2 >= 3 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 >= 2 >= 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 + op: Ge + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: 1 + 2 >= 3 + 4 >= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lt.leo.out b/tests/expectations/parser/parser/expression/binary/lt.leo.out new file mode 100644 index 0000000000..9879afc9d3 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/lt.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 1 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2<3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2<3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2<3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 < 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 < 3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 < 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 < 2 < 3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 < 2 < 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 < 3 + 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 < 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 < 3 + 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 < 3 + 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 < 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 < 3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 < 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 < 2 < 3 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 < 2 < 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 18 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 22 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 22 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: 1 + 2 < 3 + 4 < 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/lte.leo.out b/tests/expectations/parser/parser/expression/binary/lte.leo.out new file mode 100644 index 0000000000..f40df4bddb --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/lte.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 <= 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 <= 1 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 <= 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2 <= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 2 <= 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 <= 2 <= 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 <= 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 <= 2 <= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 <= 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 <= 2 <= 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 <= 3 + 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 <= 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 <= 3 + 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 + 2 <= 3 + 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 <= 2 <= 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 <= 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 <= 2 <= 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 <= 2 <= 3 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 <= 2 <= 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 + op: Le + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: 1 + 2 <= 3 + 4 <= 5 + 6 diff --git a/tests/expectations/parser/parser/expression/binary/mul.leo.out b/tests/expectations/parser/parser/expression/binary/mul.leo.out new file mode 100644 index 0000000000..c146eeee15 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/mul.leo.out @@ -0,0 +1,289 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 1 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2*3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2*3 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2*3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 * 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 * 3 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 * 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 * 3 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 * 2 * 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 2 * 3 ** 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 2 * 3 ** 4 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 ** 2 * 3 ** 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 ** 2 * 3 ** 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 24 + col_stop: 25 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 25 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 + op: Div + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 25 + path: test + content: 1 ** 2 * 3 ** 4 / 5 ** 6 diff --git a/tests/expectations/parser/parser/expression/binary/ne.leo.out b/tests/expectations/parser/parser/expression/binary/ne.leo.out new file mode 100644 index 0000000000..65fb6e2298 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/ne.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 != 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 != 1 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 != 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2!=3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 5 + path: test + content: 2!=3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: 2!=3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 != 2 != 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 != 2 != 3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 != 2 != 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 != 2 != 3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 != 2 != 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 != 3 < 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 != 3 < 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 != 3 < 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 < 2 != 3 < 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 != 2 != 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: 1 != 2 != 3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 1 != 2 != 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: 1 != 2 != 3 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 1 != 2 != 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 20 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 23 + col_stop: 24 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Lt + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 + op: Ne + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: 1 < 2 != 3 < 4 != 5 < 6 diff --git a/tests/expectations/parser/parser/expression/binary/or.leo.out b/tests/expectations/parser/parser/expression/binary/or.leo.out new file mode 100644 index 0000000000..72d244dd8d --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/or.leo.out @@ -0,0 +1,338 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 1 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2+3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2+3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2+3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 + 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 + 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 + 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 + 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 + 2 + 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 + 3 * 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 + 3 * 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 + 2 - 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 + 2 - 3 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 + 2 - 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 + 2 - 3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 + 2 - 3 + - Binary: + left: + Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Binary: + left: + Value: + Implicit: + - "5" + - line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 18 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + right: + Value: + Implicit: + - "6" + - line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 17 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: 1 * 2 + 3 * 4 - 5 * 6 diff --git a/tests/expectations/parser/parser/expression/binary/sub.leo.out b/tests/expectations/parser/parser/expression/binary/sub.leo.out new file mode 100644 index 0000000000..4e39639fe2 --- /dev/null +++ b/tests/expectations/parser/parser/expression/binary/sub.leo.out @@ -0,0 +1,180 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 - 1 + right: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 - 1 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 - 1 + - Binary: + left: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 2-3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: 2-3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: 2-3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 - 2 - 3 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 - 2 - 3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 - 2 - 3 + right: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 - 2 - 3 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 1 - 2 - 3 + - Binary: + left: + Binary: + left: + Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: 1 * 2 - 3 * 4 + right: + Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: 1 * 2 - 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 1 * 2 - 3 * 4 + right: + Binary: + left: + Value: + Implicit: + - "3" + - line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: 1 * 2 - 3 * 4 + right: + Value: + Implicit: + - "4" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: 1 * 2 - 3 * 4 + op: Mul + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: 1 * 2 - 3 * 4 + op: Sub + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 1 * 2 - 3 * 4 diff --git a/tests/expectations/parser/parser/expression/cast.leo.out b/tests/expectations/parser/parser/expression/cast.leo.out new file mode 100644 index 0000000000..25ace32c14 --- /dev/null +++ b/tests/expectations/parser/parser/expression/cast.leo.out @@ -0,0 +1,186 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8\\\"}\"}" + target_type: + IntegerType: U8 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x as u8 + - Cast: + inner: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" + target_type: + Circuit: "{\"name\":\"id\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"y as id\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: y as id + - Cast: + inner: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"z as u32\\\"}\"}" + target_type: + IntegerType: U32 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: z as u32 + - Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as i128\\\"}\"}" + target_type: + IntegerType: I128 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: x as i128 + - Cast: + inner: + Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as u8 as u128\\\"}\"}" + target_type: + IntegerType: U8 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x as u8 as u128 + target_type: + IntegerType: U128 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: x as u8 as u128 + - Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as field\\\"}\"}" + target_type: Field + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: x as field + - Cast: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x as group\\\"}\"}" + target_type: Group + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: x as group + - Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" + right: + Binary: + left: + Cast: + inner: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" + target_type: + IntegerType: U32 + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 14 + path: test + content: x ** y as u32 ** z + right: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}" + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 19 + path: test + content: x ** y as u32 ** z + op: Pow + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: x ** y as u32 ** z + - Value: + Implicit: + - "" + - line_start: 0 + line_stop: 0 + col_start: 0 + col_stop: 0 + path: "" + content: "" + - Cast: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x as u32\\\"}\"}" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "!x as u32" + target_type: + IntegerType: U32 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "!x as u32" + - Cast: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x as u32\\\"}\"}" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "-x as u32" + target_type: + IntegerType: U32 + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "-x as u32" diff --git a/tests/expectations/parser/parser/expression/circuit_init.leo.out b/tests/expectations/parser/parser/expression/circuit_init.leo.out new file mode 100644 index 0000000000..4295420d95 --- /dev/null +++ b/tests/expectations/parser/parser/expression/circuit_init.leo.out @@ -0,0 +1,113 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {}\\\"}\"}" + members: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x {}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x {y}\\\"}\"}" + expression: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "x {y}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y}\\\"}\"}" + expression: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x{y}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{}\\\"}\"}" + members: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "x{}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" + expression: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: y}\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x{y: y}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" + expression: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x}\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x{y: x}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" + expression: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y: x,}\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x{y: x,}" + - CircuitInit: + name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + members: + - identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + expression: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + - identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + expression: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x{y:x, x:y,}\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: "x{y:x, x:y,}" + - CircuitInit: + name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self {}\\\"}\"}" + members: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "Self {}" diff --git a/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out new file mode 100644 index 0000000000..3aae92971f --- /dev/null +++ b/tests/expectations/parser/parser/expression/circuit_init_fail.leo.out @@ -0,0 +1,16 @@ +--- +namespace: ParseExpression +expectation: Fail +outputs: + - " --> test:1:3\n |\n 1 | x {\n | ^\n |\n = unexpected EOF" + - "did not consume all input: '}' @ 1:3-4\n" + - " --> test:1:4\n |\n 1 | x {,}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:5\n |\n 1 | x { , }\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,,,}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:6\n |\n 1 | x {x,,}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,,x}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,x}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:8\n |\n 1 | x {x:y,,}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,,x:y}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:4\n |\n 1 | x {,x:y}\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:6\n |\n 1 | x {x:}\n | ^\n |\n = expected 'expression', got '}'" diff --git a/tests/expectations/parser/parser/expression/ident.leo.out b/tests/expectations/parser/parser/expression/ident.leo.out new file mode 100644 index 0000000000..a92fc0c1c8 --- /dev/null +++ b/tests/expectations/parser/parser/expression/ident.leo.out @@ -0,0 +1,23 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x\\\"}\"}" + - Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"X\\\"}\"}" + - Identifier: "{\"name\":\"xxx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xxx\\\"}\"}" + - Identifier: "{\"name\":\"XXX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"XXX\\\"}\"}" + - Identifier: "{\"name\":\"x1\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x1\\\"}\"}" + - Identifier: "{\"name\":\"xu32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"xu32\\\"}\"}" + - Identifier: "{\"name\":\"testx\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testx\\\"}\"}" + - Identifier: "{\"name\":\"truex\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"truex\\\"}\"}" + - Identifier: "{\"name\":\"TRUE\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"TRUE\\\"}\"}" + - Identifier: "{\"name\":\"testX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"testX\\\"}\"}" + - Identifier: "{\"name\":\"letX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"letX\\\"}\"}" + - Identifier: "{\"name\":\"constX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"constX\\\"}\"}" + - Identifier: "{\"name\":\"test_test\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"test_test\\\"}\"}" + - Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"self\\\"}\"}" + - Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"Self\\\"}\"}" + - Identifier: "{\"name\":\"input\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"input\\\"}\"}" + - Identifier: "{\"name\":\"selfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"selfX\\\"}\"}" + - Identifier: "{\"name\":\"SelfX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"SelfX\\\"}\"}" + - Identifier: "{\"name\":\"inputX\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"inputX\\\"}\"}" diff --git a/tests/expectations/parser/parser/expression/literal/address.leo.out b/tests/expectations/parser/parser/expression/literal/address.leo.out new file mode 100644 index 0000000000..04610e6ead --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/address.leo.out @@ -0,0 +1,13 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8' @ 1:1-64" + - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9' @ 1:1-64" + - "'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" + - "'aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st' @ 1:1-64" + - "'ALEO1' @ 1:1-6" + - "'Aleo1' @ 1:1-6" + - "'aleO1' @ 1:1-6" + - "'aleo2qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" + - "'bleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9' @ 1:1-64" diff --git a/tests/expectations/parser/parser/expression/literal/address_fail.leo.out b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out new file mode 100644 index 0000000000..c0fc912fd4 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/address_fail.leo.out @@ -0,0 +1,13 @@ +--- +namespace: Token +expectation: Fail +outputs: + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'" + - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'" + - " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'" + - " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'" diff --git a/tests/expectations/parser/parser/expression/literal/address_parse.leo.out b/tests/expectations/parser/parser/expression/literal/address_parse.leo.out new file mode 100644 index 0000000000..ce2e019189 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/address_parse.leo.out @@ -0,0 +1,40 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Address: + - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 64 + path: test + content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 + - Value: + Address: + - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9 + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 64 + path: test + content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9 + - Value: + Address: + - aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9 + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 64 + path: test + content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9 + - Value: + Address: + - aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 64 + path: test + content: aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st diff --git a/tests/expectations/parser/parser/expression/literal/bool.leo.out b/tests/expectations/parser/parser/expression/literal/bool.leo.out new file mode 100644 index 0000000000..9222f3dd49 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/bool.leo.out @@ -0,0 +1,12 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'true' @ 1:1-5" + - "'True' @ 1:1-5" + - "'TRUE' @ 1:1-5" + - "'truE' @ 1:1-5" + - "'false' @ 1:1-6" + - "'False' @ 1:1-6" + - "'FALSE' @ 1:1-6" + - "'falsE' @ 1:1-6" diff --git a/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out b/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out new file mode 100644 index 0000000000..85b9453e0b --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/bool_parse.leo.out @@ -0,0 +1,22 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Boolean: + - "true" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "true" + - Value: + Boolean: + - "false" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "false" diff --git a/tests/expectations/parser/parser/expression/literal/comment.leo.out b/tests/expectations/parser/parser/expression/literal/comment.leo.out new file mode 100644 index 0000000000..9f4cc8a518 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/comment.leo.out @@ -0,0 +1,22 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'// test1' @ 1:1-9" + - "'// test2' @ 1:1-9" + - "'//test3' @ 1:1-8" + - "'/' @ 1:1-2,'/' @ 1:3-4,'test4' @ 1:5-10" + - "'/* test5 */' @ 1:1-12" + - "'/*' @ 1:1-3" + - "'test' @ 1:1-5,'6' @ 1:6-7,'*' @ 1:8-9,'/' @ 1:9-10" + - "'/* test 7' @ 1:1-10" + - "'*' @ 1:1-2,'/' @ 1:2-3" + - "'/*test8 */' @ 1:1-11" + - "'/* test9*/' @ 1:1-11" + - "'/*test10*/' @ 1:1-11" + - "'/*/**/' @ 1:1-7" + - "'/**/' @ 1:1-5" + - "'/*//*/' @ 1:1-7" + - "'/** /*/' @ 1:1-8" + - "'/** **/' @ 1:1-8" + - "'/*' @ 1:1-3" diff --git a/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out b/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out new file mode 100644 index 0000000000..47fddf9292 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/formatted_string.leo.out @@ -0,0 +1,24 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'\"{}\"' @ 1:1-5" + - "'\" {} \"' @ 1:1-7" + - "'\"{}d\"' @ 1:1-6" + - "'\"{}D\"' @ 1:1-6" + - "'\"d{}\"' @ 1:1-6" + - "'\"D{}\"' @ 1:1-6" + - "'\"D{}D\"' @ 1:1-7" + - "'\"{}{}\"' @ 1:1-7" + - "'\"D{}{}D\"' @ 1:1-9" + - "'\"D{}{}\"' @ 1:1-8" + - "'\"{}{}D\"' @ 1:1-8" + - "'\"D{}D{}D\"' @ 1:1-10" + - "'\"{{}}\"' @ 1:1-7" + - "'\"}}\"' @ 1:1-5" + - "'\"{{\"' @ 1:1-5" + - "'\"}}{{\"' @ 1:1-7" + - "'\"{{}\"' @ 1:1-6" + - "'\"{}}\"' @ 1:1-6" + - "'\"{\"' @ 1:1-4" + - "'\"}\"' @ 1:1-4" diff --git a/tests/expectations/parser/parser/expression/literal/group.leo.out b/tests/expectations/parser/parser/expression/literal/group.leo.out new file mode 100644 index 0000000000..2a4389526e --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/group.leo.out @@ -0,0 +1,648 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Group: + Tuple: + x: SignHigh + y: Inferred + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(+, _)group" + - Value: + Group: + Tuple: + x: Inferred + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(_, -)group" + - Value: + Group: + Tuple: + x: SignHigh + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(+, -)group" + - Value: + Group: + Tuple: + x: SignLow + y: SignHigh + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(-, +)group" + - Value: + Group: + Tuple: + x: SignHigh + y: SignHigh + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(+, +)group" + - Value: + Group: + Tuple: + x: SignLow + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(-, -)group" + - Value: + Group: + Tuple: + x: Inferred + y: Inferred + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 12 + path: test + content: "(_, _)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123,-456)group" + y: + Number: + - "-456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123,-456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123,-456)group" + - Value: + Group: + Tuple: + x: + Number: + - "-123" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "(-123,456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(-123,456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(-123,456)group" + - Value: + Group: + Tuple: + x: + Number: + - "-123" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 6 + path: test + content: "(-123,456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(-123,456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(-123,456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, _)group" + y: Inferred + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, _)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, -)group" + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, -)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, -)group" + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, -)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, +)group" + y: SignHigh + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, +)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, +)group" + y: SignHigh + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, +)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, -)group" + y: SignLow + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, -)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, _)group" + y: Inferred + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(123, _)group" + - Value: + Group: + Tuple: + x: SignHigh + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(+, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(+, 345)group" + - Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(_, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(_, 345)group" + - Value: + Group: + Tuple: + x: SignHigh + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(+, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(+, 345)group" + - Value: + Group: + Tuple: + x: SignLow + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(-, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(-, 345)group" + - Value: + Group: + Tuple: + x: SignHigh + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(+, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(+, 345)group" + - Value: + Group: + Tuple: + x: SignLow + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(-, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(-, 345)group" + - Value: + Group: + Tuple: + x: Inferred + y: + Number: + - "345" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: "(_, 345)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 14 + path: test + content: "(_, 345)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" + - Value: + Group: + Tuple: + x: + Number: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123, 456)group" + y: + Number: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 10 + path: test + content: "(123, 456)group" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 16 + path: test + content: "(123, 456)group" diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out new file mode 100644 index 0000000000..da65de24fa --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out @@ -0,0 +1,13 @@ +--- +namespace: ParseExpression +expectation: Fail +outputs: + - " --> test:1:1\n |\n 1 | group\n | ^^^^^\n |\n = expected 'expression', got 'group'" + - "did not consume all input: 'group' @ 1:3-8\n" + - "did not consume all input: 'group' @ 1:6-11\n" + - " --> test:1:2\n |\n 1 | (,)group\n | ^\n |\n = expected 'expression', got ','" + - " --> test:1:2\n |\n 1 | (+, -,)group\n | ^\n |\n = expected 'expression', got '+'" + - " --> test:1:2\n |\n 1 | (,+, -)group\n | ^\n |\n = expected 'expression', got ','" + - "did not consume all input: 'group' @ 1:6-11\n" + - "did not consume all input: 'group' @ 1:12-17\n" + - "did not consume all input: 'group' @ 1:15-20\n" diff --git a/tests/expectations/parser/parser/expression/literal/int.leo.out b/tests/expectations/parser/parser/expression/literal/int.leo.out new file mode 100644 index 0000000000..ccac03f213 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int.leo.out @@ -0,0 +1,111 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'123' @ 1:1-4,'abc123' @ 1:4-10" + - "'123' @ 1:1-4,'abc' @ 1:4-7" + - "'123' @ 1:1-4" + - "'456' @ 1:1-4" + - "'123' @ 1:1-4,'456' @ 1:5-8" + - "'87377802873778028737780287377802873778028737780287377802873778028737780287377802' @ 1:1-81" + - "'8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802' @ 1:1-401" + - "'340130024' @ 1:1-10" + - "'158951116' @ 1:1-10" + - "'155529659' @ 1:1-10" + - "'642023166' @ 1:1-10" + - "'228481736' @ 1:1-10" + - "'469712960' @ 1:1-10" + - "'929437719' @ 1:1-10" + - "'721072814' @ 1:1-10" + - "'363254789' @ 1:1-10" + - "'906732565' @ 1:1-10" + - "'288246391' @ 1:1-10" + - "'724940549' @ 1:1-10" + - "'487101620' @ 1:1-10" + - "'261373583' @ 1:1-10" + - "'891163927' @ 1:1-10" + - "'743967544' @ 1:1-10" + - "'8372586' @ 1:1-8" + - "'461793278' @ 1:1-10" + - "'806307045' @ 1:1-10" + - "'122764546' @ 1:1-10" + - "'356336181' @ 1:1-10" + - "'158370903' @ 1:1-10" + - "'774460877' @ 1:1-10" + - "'557174131' @ 1:1-10" + - "'492401267' @ 1:1-10" + - "'893445620' @ 1:1-10" + - "'957757048' @ 1:1-10" + - "'721540649' @ 1:1-10" + - "'390746493' @ 1:1-10" + - "'211251725' @ 1:1-10" + - "'938266114' @ 1:1-10" + - "'156985870' @ 1:1-10" + - "'703831126' @ 1:1-10" + - "'729964155' @ 1:1-10" + - "'988151305' @ 1:1-10" + - "'320872435' @ 1:1-10" + - "'719287167' @ 1:1-10" + - "'152289486' @ 1:1-10" + - "'740067975' @ 1:1-10" + - "'728627816' @ 1:1-10" + - "'385008978' @ 1:1-10" + - "'553967635' @ 1:1-10" + - "'71980713' @ 1:1-9" + - "'519444716' @ 1:1-10" + - "'116499965' @ 1:1-10" + - "'717422268' @ 1:1-10" + - "'18966279' @ 1:1-9" + - "'22458638' @ 1:1-9" + - "'857282620' @ 1:1-10" + - "'920675898' @ 1:1-10" + - "'762235516' @ 1:1-10" + - "'469018377' @ 1:1-10" + - "'199986521' @ 1:1-10" + - "'536679358' @ 1:1-10" + - "'591399452' @ 1:1-10" + - "'83083158' @ 1:1-9" + - "'599449051' @ 1:1-10" + - "'445442318' @ 1:1-10" + - "'585486590' @ 1:1-10" + - "'209278800' @ 1:1-10" + - "'873568117' @ 1:1-10" + - "'664470940' @ 1:1-10" + - "'465262783' @ 1:1-10" + - "'605652874' @ 1:1-10" + - "'376803940' @ 1:1-10" + - "'965247040' @ 1:1-10" + - "'598474509' @ 1:1-10" + - "'845119918' @ 1:1-10" + - "'648159133' @ 1:1-10" + - "'669051032' @ 1:1-10" + - "'800600261' @ 1:1-10" + - "'434689764' @ 1:1-10" + - "'520060080' @ 1:1-10" + - "'804659385' @ 1:1-10" + - "'537828058' @ 1:1-10" + - "'716600292' @ 1:1-10" + - "'387020273' @ 1:1-10" + - "'199375617' @ 1:1-10" + - "'680337189' @ 1:1-10" + - "'818479931' @ 1:1-10" + - "'893693281' @ 1:1-10" + - "'87377802' @ 1:1-9" + - "'84699261' @ 1:1-9" + - "'292826090' @ 1:1-10" + - "'569171405' @ 1:1-10" + - "'387436237' @ 1:1-10" + - "'150682190' @ 1:1-10" + - "'888770419' @ 1:1-10" + - "'824696431' @ 1:1-10" + - "'765659803' @ 1:1-10" + - "'270163693' @ 1:1-10" + - "'427940240' @ 1:1-10" + - "'504997332' @ 1:1-10" + - "'337808338' @ 1:1-10" + - "'907200008' @ 1:1-10" + - "'757177889' @ 1:1-10" + - "'696697188' @ 1:1-10" + - "'41376051' @ 1:1-9" + - "'496293518' @ 1:1-10" + - "'251218820' @ 1:1-10" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out new file mode 100644 index 0000000000..c7f5f3576f --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/field.leo.out @@ -0,0 +1,949 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Field: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: 123field + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Field: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: 456field + - Value: + Field: + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 86 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802field + - Value: + Field: + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 406 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802field + - Value: + Field: + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 340130024field + - Value: + Field: + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 158951116field + - Value: + Field: + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 155529659field + - Value: + Field: + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 642023166field + - Value: + Field: + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 228481736field + - Value: + Field: + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 469712960field + - Value: + Field: + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 929437719field + - Value: + Field: + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 721072814field + - Value: + Field: + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 363254789field + - Value: + Field: + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 906732565field + - Value: + Field: + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 288246391field + - Value: + Field: + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 724940549field + - Value: + Field: + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 487101620field + - Value: + Field: + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 261373583field + - Value: + Field: + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 891163927field + - Value: + Field: + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 743967544field + - Value: + Field: + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 8372586field + - Value: + Field: + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 461793278field + - Value: + Field: + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 806307045field + - Value: + Field: + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 122764546field + - Value: + Field: + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 356336181field + - Value: + Field: + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 158370903field + - Value: + Field: + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 774460877field + - Value: + Field: + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 557174131field + - Value: + Field: + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 492401267field + - Value: + Field: + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 893445620field + - Value: + Field: + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 957757048field + - Value: + Field: + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 721540649field + - Value: + Field: + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 390746493field + - Value: + Field: + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 211251725field + - Value: + Field: + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 938266114field + - Value: + Field: + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 156985870field + - Value: + Field: + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 703831126field + - Value: + Field: + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 729964155field + - Value: + Field: + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 988151305field + - Value: + Field: + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 320872435field + - Value: + Field: + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 719287167field + - Value: + Field: + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 152289486field + - Value: + Field: + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 740067975field + - Value: + Field: + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 728627816field + - Value: + Field: + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 385008978field + - Value: + Field: + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 553967635field + - Value: + Field: + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 71980713field + - Value: + Field: + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 519444716field + - Value: + Field: + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 116499965field + - Value: + Field: + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 717422268field + - Value: + Field: + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 18966279field + - Value: + Field: + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 22458638field + - Value: + Field: + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 857282620field + - Value: + Field: + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 920675898field + - Value: + Field: + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 762235516field + - Value: + Field: + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 469018377field + - Value: + Field: + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 199986521field + - Value: + Field: + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 536679358field + - Value: + Field: + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 591399452field + - Value: + Field: + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 83083158field + - Value: + Field: + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 599449051field + - Value: + Field: + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 445442318field + - Value: + Field: + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 585486590field + - Value: + Field: + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 209278800field + - Value: + Field: + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 873568117field + - Value: + Field: + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 664470940field + - Value: + Field: + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 465262783field + - Value: + Field: + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 605652874field + - Value: + Field: + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 376803940field + - Value: + Field: + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 965247040field + - Value: + Field: + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 598474509field + - Value: + Field: + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 845119918field + - Value: + Field: + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 648159133field + - Value: + Field: + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 669051032field + - Value: + Field: + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 800600261field + - Value: + Field: + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 434689764field + - Value: + Field: + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 520060080field + - Value: + Field: + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 804659385field + - Value: + Field: + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 537828058field + - Value: + Field: + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 716600292field + - Value: + Field: + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 387020273field + - Value: + Field: + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 199375617field + - Value: + Field: + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 680337189field + - Value: + Field: + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 818479931field + - Value: + Field: + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 893693281field + - Value: + Field: + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 87377802field + - Value: + Field: + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 84699261field + - Value: + Field: + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 292826090field + - Value: + Field: + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 569171405field + - Value: + Field: + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 387436237field + - Value: + Field: + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 150682190field + - Value: + Field: + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 888770419field + - Value: + Field: + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 824696431field + - Value: + Field: + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 765659803field + - Value: + Field: + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 270163693field + - Value: + Field: + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 427940240field + - Value: + Field: + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 504997332field + - Value: + Field: + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 337808338field + - Value: + Field: + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 907200008field + - Value: + Field: + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 757177889field + - Value: + Field: + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 696697188field + - Value: + Field: + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 41376051field + - Value: + Field: + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 496293518field + - Value: + Field: + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 251218820field diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out new file mode 100644 index 0000000000..f0d886348f --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i128.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I128 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 123i128 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I128 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 456i128 + - Value: + Integer: + - I128 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 85 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i128 + - Value: + Integer: + - I128 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 405 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i128 + - Value: + Integer: + - I128 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 340130024i128 + - Value: + Integer: + - I128 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 158951116i128 + - Value: + Integer: + - I128 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 155529659i128 + - Value: + Integer: + - I128 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 642023166i128 + - Value: + Integer: + - I128 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 228481736i128 + - Value: + Integer: + - I128 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 469712960i128 + - Value: + Integer: + - I128 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 929437719i128 + - Value: + Integer: + - I128 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 721072814i128 + - Value: + Integer: + - I128 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 363254789i128 + - Value: + Integer: + - I128 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 906732565i128 + - Value: + Integer: + - I128 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 288246391i128 + - Value: + Integer: + - I128 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 724940549i128 + - Value: + Integer: + - I128 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 487101620i128 + - Value: + Integer: + - I128 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 261373583i128 + - Value: + Integer: + - I128 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 891163927i128 + - Value: + Integer: + - I128 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 743967544i128 + - Value: + Integer: + - I128 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 8372586i128 + - Value: + Integer: + - I128 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 461793278i128 + - Value: + Integer: + - I128 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 806307045i128 + - Value: + Integer: + - I128 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 122764546i128 + - Value: + Integer: + - I128 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 356336181i128 + - Value: + Integer: + - I128 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 158370903i128 + - Value: + Integer: + - I128 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 774460877i128 + - Value: + Integer: + - I128 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 557174131i128 + - Value: + Integer: + - I128 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 492401267i128 + - Value: + Integer: + - I128 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 893445620i128 + - Value: + Integer: + - I128 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 957757048i128 + - Value: + Integer: + - I128 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 721540649i128 + - Value: + Integer: + - I128 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 390746493i128 + - Value: + Integer: + - I128 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 211251725i128 + - Value: + Integer: + - I128 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 938266114i128 + - Value: + Integer: + - I128 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 156985870i128 + - Value: + Integer: + - I128 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 703831126i128 + - Value: + Integer: + - I128 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 729964155i128 + - Value: + Integer: + - I128 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 988151305i128 + - Value: + Integer: + - I128 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 320872435i128 + - Value: + Integer: + - I128 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 719287167i128 + - Value: + Integer: + - I128 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 152289486i128 + - Value: + Integer: + - I128 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 740067975i128 + - Value: + Integer: + - I128 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 728627816i128 + - Value: + Integer: + - I128 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 385008978i128 + - Value: + Integer: + - I128 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 553967635i128 + - Value: + Integer: + - I128 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 71980713i128 + - Value: + Integer: + - I128 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 519444716i128 + - Value: + Integer: + - I128 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 116499965i128 + - Value: + Integer: + - I128 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 717422268i128 + - Value: + Integer: + - I128 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 18966279i128 + - Value: + Integer: + - I128 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 22458638i128 + - Value: + Integer: + - I128 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 857282620i128 + - Value: + Integer: + - I128 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 920675898i128 + - Value: + Integer: + - I128 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 762235516i128 + - Value: + Integer: + - I128 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 469018377i128 + - Value: + Integer: + - I128 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 199986521i128 + - Value: + Integer: + - I128 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 536679358i128 + - Value: + Integer: + - I128 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 591399452i128 + - Value: + Integer: + - I128 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 83083158i128 + - Value: + Integer: + - I128 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 599449051i128 + - Value: + Integer: + - I128 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 445442318i128 + - Value: + Integer: + - I128 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 585486590i128 + - Value: + Integer: + - I128 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 209278800i128 + - Value: + Integer: + - I128 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 873568117i128 + - Value: + Integer: + - I128 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 664470940i128 + - Value: + Integer: + - I128 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 465262783i128 + - Value: + Integer: + - I128 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 605652874i128 + - Value: + Integer: + - I128 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 376803940i128 + - Value: + Integer: + - I128 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 965247040i128 + - Value: + Integer: + - I128 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 598474509i128 + - Value: + Integer: + - I128 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 845119918i128 + - Value: + Integer: + - I128 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 648159133i128 + - Value: + Integer: + - I128 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 669051032i128 + - Value: + Integer: + - I128 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 800600261i128 + - Value: + Integer: + - I128 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 434689764i128 + - Value: + Integer: + - I128 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 520060080i128 + - Value: + Integer: + - I128 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 804659385i128 + - Value: + Integer: + - I128 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 537828058i128 + - Value: + Integer: + - I128 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 716600292i128 + - Value: + Integer: + - I128 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 387020273i128 + - Value: + Integer: + - I128 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 199375617i128 + - Value: + Integer: + - I128 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 680337189i128 + - Value: + Integer: + - I128 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 818479931i128 + - Value: + Integer: + - I128 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 893693281i128 + - Value: + Integer: + - I128 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 87377802i128 + - Value: + Integer: + - I128 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 84699261i128 + - Value: + Integer: + - I128 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 292826090i128 + - Value: + Integer: + - I128 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 569171405i128 + - Value: + Integer: + - I128 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 387436237i128 + - Value: + Integer: + - I128 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 150682190i128 + - Value: + Integer: + - I128 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 888770419i128 + - Value: + Integer: + - I128 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 824696431i128 + - Value: + Integer: + - I128 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 765659803i128 + - Value: + Integer: + - I128 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 270163693i128 + - Value: + Integer: + - I128 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 427940240i128 + - Value: + Integer: + - I128 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 504997332i128 + - Value: + Integer: + - I128 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 337808338i128 + - Value: + Integer: + - I128 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 907200008i128 + - Value: + Integer: + - I128 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 757177889i128 + - Value: + Integer: + - I128 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 696697188i128 + - Value: + Integer: + - I128 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 41376051i128 + - Value: + Integer: + - I128 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 496293518i128 + - Value: + Integer: + - I128 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 251218820i128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out new file mode 100644 index 0000000000..82a8fc8b1b --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i16.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I16 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123i16 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I16 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456i16 + - Value: + Integer: + - I16 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i16 + - Value: + Integer: + - I16 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i16 + - Value: + Integer: + - I16 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024i16 + - Value: + Integer: + - I16 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116i16 + - Value: + Integer: + - I16 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659i16 + - Value: + Integer: + - I16 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166i16 + - Value: + Integer: + - I16 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736i16 + - Value: + Integer: + - I16 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960i16 + - Value: + Integer: + - I16 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719i16 + - Value: + Integer: + - I16 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814i16 + - Value: + Integer: + - I16 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789i16 + - Value: + Integer: + - I16 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565i16 + - Value: + Integer: + - I16 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391i16 + - Value: + Integer: + - I16 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549i16 + - Value: + Integer: + - I16 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620i16 + - Value: + Integer: + - I16 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583i16 + - Value: + Integer: + - I16 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927i16 + - Value: + Integer: + - I16 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544i16 + - Value: + Integer: + - I16 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586i16 + - Value: + Integer: + - I16 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278i16 + - Value: + Integer: + - I16 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045i16 + - Value: + Integer: + - I16 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546i16 + - Value: + Integer: + - I16 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181i16 + - Value: + Integer: + - I16 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903i16 + - Value: + Integer: + - I16 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877i16 + - Value: + Integer: + - I16 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131i16 + - Value: + Integer: + - I16 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267i16 + - Value: + Integer: + - I16 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620i16 + - Value: + Integer: + - I16 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048i16 + - Value: + Integer: + - I16 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649i16 + - Value: + Integer: + - I16 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493i16 + - Value: + Integer: + - I16 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725i16 + - Value: + Integer: + - I16 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114i16 + - Value: + Integer: + - I16 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870i16 + - Value: + Integer: + - I16 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126i16 + - Value: + Integer: + - I16 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155i16 + - Value: + Integer: + - I16 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305i16 + - Value: + Integer: + - I16 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435i16 + - Value: + Integer: + - I16 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167i16 + - Value: + Integer: + - I16 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486i16 + - Value: + Integer: + - I16 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975i16 + - Value: + Integer: + - I16 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816i16 + - Value: + Integer: + - I16 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978i16 + - Value: + Integer: + - I16 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635i16 + - Value: + Integer: + - I16 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713i16 + - Value: + Integer: + - I16 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716i16 + - Value: + Integer: + - I16 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965i16 + - Value: + Integer: + - I16 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268i16 + - Value: + Integer: + - I16 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279i16 + - Value: + Integer: + - I16 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638i16 + - Value: + Integer: + - I16 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620i16 + - Value: + Integer: + - I16 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898i16 + - Value: + Integer: + - I16 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516i16 + - Value: + Integer: + - I16 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377i16 + - Value: + Integer: + - I16 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521i16 + - Value: + Integer: + - I16 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358i16 + - Value: + Integer: + - I16 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452i16 + - Value: + Integer: + - I16 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158i16 + - Value: + Integer: + - I16 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051i16 + - Value: + Integer: + - I16 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318i16 + - Value: + Integer: + - I16 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590i16 + - Value: + Integer: + - I16 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800i16 + - Value: + Integer: + - I16 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117i16 + - Value: + Integer: + - I16 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940i16 + - Value: + Integer: + - I16 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783i16 + - Value: + Integer: + - I16 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874i16 + - Value: + Integer: + - I16 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940i16 + - Value: + Integer: + - I16 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040i16 + - Value: + Integer: + - I16 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509i16 + - Value: + Integer: + - I16 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918i16 + - Value: + Integer: + - I16 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133i16 + - Value: + Integer: + - I16 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032i16 + - Value: + Integer: + - I16 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261i16 + - Value: + Integer: + - I16 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764i16 + - Value: + Integer: + - I16 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080i16 + - Value: + Integer: + - I16 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385i16 + - Value: + Integer: + - I16 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058i16 + - Value: + Integer: + - I16 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292i16 + - Value: + Integer: + - I16 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273i16 + - Value: + Integer: + - I16 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617i16 + - Value: + Integer: + - I16 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189i16 + - Value: + Integer: + - I16 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931i16 + - Value: + Integer: + - I16 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281i16 + - Value: + Integer: + - I16 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802i16 + - Value: + Integer: + - I16 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261i16 + - Value: + Integer: + - I16 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090i16 + - Value: + Integer: + - I16 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405i16 + - Value: + Integer: + - I16 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237i16 + - Value: + Integer: + - I16 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190i16 + - Value: + Integer: + - I16 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419i16 + - Value: + Integer: + - I16 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431i16 + - Value: + Integer: + - I16 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803i16 + - Value: + Integer: + - I16 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693i16 + - Value: + Integer: + - I16 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240i16 + - Value: + Integer: + - I16 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332i16 + - Value: + Integer: + - I16 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338i16 + - Value: + Integer: + - I16 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008i16 + - Value: + Integer: + - I16 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889i16 + - Value: + Integer: + - I16 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188i16 + - Value: + Integer: + - I16 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051i16 + - Value: + Integer: + - I16 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518i16 + - Value: + Integer: + - I16 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820i16 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out new file mode 100644 index 0000000000..82d66bdbf5 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i32.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I32 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123i32 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I32 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456i32 + - Value: + Integer: + - I32 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i32 + - Value: + Integer: + - I32 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i32 + - Value: + Integer: + - I32 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024i32 + - Value: + Integer: + - I32 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116i32 + - Value: + Integer: + - I32 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659i32 + - Value: + Integer: + - I32 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166i32 + - Value: + Integer: + - I32 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736i32 + - Value: + Integer: + - I32 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960i32 + - Value: + Integer: + - I32 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719i32 + - Value: + Integer: + - I32 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814i32 + - Value: + Integer: + - I32 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789i32 + - Value: + Integer: + - I32 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565i32 + - Value: + Integer: + - I32 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391i32 + - Value: + Integer: + - I32 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549i32 + - Value: + Integer: + - I32 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620i32 + - Value: + Integer: + - I32 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583i32 + - Value: + Integer: + - I32 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927i32 + - Value: + Integer: + - I32 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544i32 + - Value: + Integer: + - I32 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586i32 + - Value: + Integer: + - I32 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278i32 + - Value: + Integer: + - I32 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045i32 + - Value: + Integer: + - I32 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546i32 + - Value: + Integer: + - I32 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181i32 + - Value: + Integer: + - I32 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903i32 + - Value: + Integer: + - I32 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877i32 + - Value: + Integer: + - I32 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131i32 + - Value: + Integer: + - I32 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267i32 + - Value: + Integer: + - I32 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620i32 + - Value: + Integer: + - I32 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048i32 + - Value: + Integer: + - I32 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649i32 + - Value: + Integer: + - I32 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493i32 + - Value: + Integer: + - I32 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725i32 + - Value: + Integer: + - I32 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114i32 + - Value: + Integer: + - I32 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870i32 + - Value: + Integer: + - I32 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126i32 + - Value: + Integer: + - I32 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155i32 + - Value: + Integer: + - I32 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305i32 + - Value: + Integer: + - I32 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435i32 + - Value: + Integer: + - I32 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167i32 + - Value: + Integer: + - I32 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486i32 + - Value: + Integer: + - I32 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975i32 + - Value: + Integer: + - I32 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816i32 + - Value: + Integer: + - I32 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978i32 + - Value: + Integer: + - I32 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635i32 + - Value: + Integer: + - I32 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713i32 + - Value: + Integer: + - I32 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716i32 + - Value: + Integer: + - I32 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965i32 + - Value: + Integer: + - I32 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268i32 + - Value: + Integer: + - I32 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279i32 + - Value: + Integer: + - I32 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638i32 + - Value: + Integer: + - I32 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620i32 + - Value: + Integer: + - I32 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898i32 + - Value: + Integer: + - I32 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516i32 + - Value: + Integer: + - I32 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377i32 + - Value: + Integer: + - I32 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521i32 + - Value: + Integer: + - I32 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358i32 + - Value: + Integer: + - I32 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452i32 + - Value: + Integer: + - I32 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158i32 + - Value: + Integer: + - I32 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051i32 + - Value: + Integer: + - I32 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318i32 + - Value: + Integer: + - I32 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590i32 + - Value: + Integer: + - I32 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800i32 + - Value: + Integer: + - I32 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117i32 + - Value: + Integer: + - I32 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940i32 + - Value: + Integer: + - I32 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783i32 + - Value: + Integer: + - I32 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874i32 + - Value: + Integer: + - I32 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940i32 + - Value: + Integer: + - I32 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040i32 + - Value: + Integer: + - I32 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509i32 + - Value: + Integer: + - I32 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918i32 + - Value: + Integer: + - I32 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133i32 + - Value: + Integer: + - I32 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032i32 + - Value: + Integer: + - I32 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261i32 + - Value: + Integer: + - I32 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764i32 + - Value: + Integer: + - I32 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080i32 + - Value: + Integer: + - I32 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385i32 + - Value: + Integer: + - I32 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058i32 + - Value: + Integer: + - I32 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292i32 + - Value: + Integer: + - I32 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273i32 + - Value: + Integer: + - I32 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617i32 + - Value: + Integer: + - I32 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189i32 + - Value: + Integer: + - I32 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931i32 + - Value: + Integer: + - I32 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281i32 + - Value: + Integer: + - I32 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802i32 + - Value: + Integer: + - I32 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261i32 + - Value: + Integer: + - I32 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090i32 + - Value: + Integer: + - I32 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405i32 + - Value: + Integer: + - I32 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237i32 + - Value: + Integer: + - I32 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190i32 + - Value: + Integer: + - I32 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419i32 + - Value: + Integer: + - I32 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431i32 + - Value: + Integer: + - I32 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803i32 + - Value: + Integer: + - I32 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693i32 + - Value: + Integer: + - I32 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240i32 + - Value: + Integer: + - I32 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332i32 + - Value: + Integer: + - I32 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338i32 + - Value: + Integer: + - I32 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008i32 + - Value: + Integer: + - I32 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889i32 + - Value: + Integer: + - I32 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188i32 + - Value: + Integer: + - I32 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051i32 + - Value: + Integer: + - I32 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518i32 + - Value: + Integer: + - I32 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820i32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out new file mode 100644 index 0000000000..24949c2f99 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i64.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I64 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123i64 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I64 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456i64 + - Value: + Integer: + - I64 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i64 + - Value: + Integer: + - I64 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i64 + - Value: + Integer: + - I64 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024i64 + - Value: + Integer: + - I64 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116i64 + - Value: + Integer: + - I64 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659i64 + - Value: + Integer: + - I64 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166i64 + - Value: + Integer: + - I64 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736i64 + - Value: + Integer: + - I64 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960i64 + - Value: + Integer: + - I64 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719i64 + - Value: + Integer: + - I64 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814i64 + - Value: + Integer: + - I64 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789i64 + - Value: + Integer: + - I64 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565i64 + - Value: + Integer: + - I64 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391i64 + - Value: + Integer: + - I64 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549i64 + - Value: + Integer: + - I64 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620i64 + - Value: + Integer: + - I64 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583i64 + - Value: + Integer: + - I64 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927i64 + - Value: + Integer: + - I64 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544i64 + - Value: + Integer: + - I64 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586i64 + - Value: + Integer: + - I64 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278i64 + - Value: + Integer: + - I64 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045i64 + - Value: + Integer: + - I64 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546i64 + - Value: + Integer: + - I64 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181i64 + - Value: + Integer: + - I64 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903i64 + - Value: + Integer: + - I64 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877i64 + - Value: + Integer: + - I64 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131i64 + - Value: + Integer: + - I64 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267i64 + - Value: + Integer: + - I64 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620i64 + - Value: + Integer: + - I64 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048i64 + - Value: + Integer: + - I64 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649i64 + - Value: + Integer: + - I64 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493i64 + - Value: + Integer: + - I64 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725i64 + - Value: + Integer: + - I64 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114i64 + - Value: + Integer: + - I64 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870i64 + - Value: + Integer: + - I64 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126i64 + - Value: + Integer: + - I64 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155i64 + - Value: + Integer: + - I64 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305i64 + - Value: + Integer: + - I64 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435i64 + - Value: + Integer: + - I64 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167i64 + - Value: + Integer: + - I64 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486i64 + - Value: + Integer: + - I64 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975i64 + - Value: + Integer: + - I64 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816i64 + - Value: + Integer: + - I64 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978i64 + - Value: + Integer: + - I64 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635i64 + - Value: + Integer: + - I64 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713i64 + - Value: + Integer: + - I64 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716i64 + - Value: + Integer: + - I64 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965i64 + - Value: + Integer: + - I64 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268i64 + - Value: + Integer: + - I64 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279i64 + - Value: + Integer: + - I64 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638i64 + - Value: + Integer: + - I64 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620i64 + - Value: + Integer: + - I64 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898i64 + - Value: + Integer: + - I64 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516i64 + - Value: + Integer: + - I64 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377i64 + - Value: + Integer: + - I64 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521i64 + - Value: + Integer: + - I64 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358i64 + - Value: + Integer: + - I64 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452i64 + - Value: + Integer: + - I64 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158i64 + - Value: + Integer: + - I64 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051i64 + - Value: + Integer: + - I64 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318i64 + - Value: + Integer: + - I64 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590i64 + - Value: + Integer: + - I64 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800i64 + - Value: + Integer: + - I64 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117i64 + - Value: + Integer: + - I64 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940i64 + - Value: + Integer: + - I64 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783i64 + - Value: + Integer: + - I64 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874i64 + - Value: + Integer: + - I64 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940i64 + - Value: + Integer: + - I64 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040i64 + - Value: + Integer: + - I64 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509i64 + - Value: + Integer: + - I64 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918i64 + - Value: + Integer: + - I64 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133i64 + - Value: + Integer: + - I64 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032i64 + - Value: + Integer: + - I64 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261i64 + - Value: + Integer: + - I64 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764i64 + - Value: + Integer: + - I64 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080i64 + - Value: + Integer: + - I64 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385i64 + - Value: + Integer: + - I64 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058i64 + - Value: + Integer: + - I64 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292i64 + - Value: + Integer: + - I64 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273i64 + - Value: + Integer: + - I64 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617i64 + - Value: + Integer: + - I64 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189i64 + - Value: + Integer: + - I64 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931i64 + - Value: + Integer: + - I64 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281i64 + - Value: + Integer: + - I64 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802i64 + - Value: + Integer: + - I64 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261i64 + - Value: + Integer: + - I64 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090i64 + - Value: + Integer: + - I64 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405i64 + - Value: + Integer: + - I64 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237i64 + - Value: + Integer: + - I64 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190i64 + - Value: + Integer: + - I64 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419i64 + - Value: + Integer: + - I64 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431i64 + - Value: + Integer: + - I64 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803i64 + - Value: + Integer: + - I64 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693i64 + - Value: + Integer: + - I64 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240i64 + - Value: + Integer: + - I64 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332i64 + - Value: + Integer: + - I64 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338i64 + - Value: + Integer: + - I64 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008i64 + - Value: + Integer: + - I64 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889i64 + - Value: + Integer: + - I64 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188i64 + - Value: + Integer: + - I64 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051i64 + - Value: + Integer: + - I64 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518i64 + - Value: + Integer: + - I64 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820i64 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out new file mode 100644 index 0000000000..7b06304a6a --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/i8.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - I8 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 123i8 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - I8 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 456i8 + - Value: + Integer: + - I8 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 83 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802i8 + - Value: + Integer: + - I8 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 403 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802i8 + - Value: + Integer: + - I8 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 340130024i8 + - Value: + Integer: + - I8 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158951116i8 + - Value: + Integer: + - I8 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 155529659i8 + - Value: + Integer: + - I8 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 642023166i8 + - Value: + Integer: + - I8 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 228481736i8 + - Value: + Integer: + - I8 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469712960i8 + - Value: + Integer: + - I8 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 929437719i8 + - Value: + Integer: + - I8 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721072814i8 + - Value: + Integer: + - I8 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 363254789i8 + - Value: + Integer: + - I8 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 906732565i8 + - Value: + Integer: + - I8 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 288246391i8 + - Value: + Integer: + - I8 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 724940549i8 + - Value: + Integer: + - I8 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 487101620i8 + - Value: + Integer: + - I8 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 261373583i8 + - Value: + Integer: + - I8 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 891163927i8 + - Value: + Integer: + - I8 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 743967544i8 + - Value: + Integer: + - I8 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 8372586i8 + - Value: + Integer: + - I8 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 461793278i8 + - Value: + Integer: + - I8 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 806307045i8 + - Value: + Integer: + - I8 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 122764546i8 + - Value: + Integer: + - I8 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 356336181i8 + - Value: + Integer: + - I8 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158370903i8 + - Value: + Integer: + - I8 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 774460877i8 + - Value: + Integer: + - I8 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 557174131i8 + - Value: + Integer: + - I8 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 492401267i8 + - Value: + Integer: + - I8 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893445620i8 + - Value: + Integer: + - I8 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 957757048i8 + - Value: + Integer: + - I8 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721540649i8 + - Value: + Integer: + - I8 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 390746493i8 + - Value: + Integer: + - I8 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 211251725i8 + - Value: + Integer: + - I8 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 938266114i8 + - Value: + Integer: + - I8 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 156985870i8 + - Value: + Integer: + - I8 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 703831126i8 + - Value: + Integer: + - I8 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 729964155i8 + - Value: + Integer: + - I8 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 988151305i8 + - Value: + Integer: + - I8 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 320872435i8 + - Value: + Integer: + - I8 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 719287167i8 + - Value: + Integer: + - I8 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 152289486i8 + - Value: + Integer: + - I8 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 740067975i8 + - Value: + Integer: + - I8 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 728627816i8 + - Value: + Integer: + - I8 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 385008978i8 + - Value: + Integer: + - I8 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 553967635i8 + - Value: + Integer: + - I8 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 71980713i8 + - Value: + Integer: + - I8 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 519444716i8 + - Value: + Integer: + - I8 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 116499965i8 + - Value: + Integer: + - I8 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 717422268i8 + - Value: + Integer: + - I8 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 18966279i8 + - Value: + Integer: + - I8 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 22458638i8 + - Value: + Integer: + - I8 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 857282620i8 + - Value: + Integer: + - I8 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 920675898i8 + - Value: + Integer: + - I8 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 762235516i8 + - Value: + Integer: + - I8 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469018377i8 + - Value: + Integer: + - I8 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199986521i8 + - Value: + Integer: + - I8 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 536679358i8 + - Value: + Integer: + - I8 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 591399452i8 + - Value: + Integer: + - I8 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 83083158i8 + - Value: + Integer: + - I8 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 599449051i8 + - Value: + Integer: + - I8 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 445442318i8 + - Value: + Integer: + - I8 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 585486590i8 + - Value: + Integer: + - I8 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 209278800i8 + - Value: + Integer: + - I8 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 873568117i8 + - Value: + Integer: + - I8 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 664470940i8 + - Value: + Integer: + - I8 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 465262783i8 + - Value: + Integer: + - I8 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 605652874i8 + - Value: + Integer: + - I8 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 376803940i8 + - Value: + Integer: + - I8 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 965247040i8 + - Value: + Integer: + - I8 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 598474509i8 + - Value: + Integer: + - I8 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 845119918i8 + - Value: + Integer: + - I8 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 648159133i8 + - Value: + Integer: + - I8 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 669051032i8 + - Value: + Integer: + - I8 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 800600261i8 + - Value: + Integer: + - I8 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 434689764i8 + - Value: + Integer: + - I8 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 520060080i8 + - Value: + Integer: + - I8 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 804659385i8 + - Value: + Integer: + - I8 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 537828058i8 + - Value: + Integer: + - I8 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 716600292i8 + - Value: + Integer: + - I8 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387020273i8 + - Value: + Integer: + - I8 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199375617i8 + - Value: + Integer: + - I8 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 680337189i8 + - Value: + Integer: + - I8 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 818479931i8 + - Value: + Integer: + - I8 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893693281i8 + - Value: + Integer: + - I8 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 87377802i8 + - Value: + Integer: + - I8 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 84699261i8 + - Value: + Integer: + - I8 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 292826090i8 + - Value: + Integer: + - I8 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 569171405i8 + - Value: + Integer: + - I8 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387436237i8 + - Value: + Integer: + - I8 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 150682190i8 + - Value: + Integer: + - I8 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 888770419i8 + - Value: + Integer: + - I8 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 824696431i8 + - Value: + Integer: + - I8 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 765659803i8 + - Value: + Integer: + - I8 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 270163693i8 + - Value: + Integer: + - I8 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 427940240i8 + - Value: + Integer: + - I8 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 504997332i8 + - Value: + Integer: + - I8 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 337808338i8 + - Value: + Integer: + - I8 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 907200008i8 + - Value: + Integer: + - I8 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 757177889i8 + - Value: + Integer: + - I8 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 696697188i8 + - Value: + Integer: + - I8 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 41376051i8 + - Value: + Integer: + - I8 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 496293518i8 + - Value: + Integer: + - I8 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 251218820i8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out new file mode 100644 index 0000000000..43e759dcc6 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/implicit.leo.out @@ -0,0 +1,949 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Implicit: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "456" + - Value: + Implicit: + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 81 + path: test + content: "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - Value: + Implicit: + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 401 + path: test + content: "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - Value: + Implicit: + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "340130024" + - Value: + Implicit: + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "158951116" + - Value: + Implicit: + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "155529659" + - Value: + Implicit: + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "642023166" + - Value: + Implicit: + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "228481736" + - Value: + Implicit: + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "469712960" + - Value: + Implicit: + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "929437719" + - Value: + Implicit: + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "721072814" + - Value: + Implicit: + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "363254789" + - Value: + Implicit: + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "906732565" + - Value: + Implicit: + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "288246391" + - Value: + Implicit: + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "724940549" + - Value: + Implicit: + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "487101620" + - Value: + Implicit: + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "261373583" + - Value: + Implicit: + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "891163927" + - Value: + Implicit: + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "743967544" + - Value: + Implicit: + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "8372586" + - Value: + Implicit: + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "461793278" + - Value: + Implicit: + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "806307045" + - Value: + Implicit: + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "122764546" + - Value: + Implicit: + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "356336181" + - Value: + Implicit: + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "158370903" + - Value: + Implicit: + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "774460877" + - Value: + Implicit: + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "557174131" + - Value: + Implicit: + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "492401267" + - Value: + Implicit: + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "893445620" + - Value: + Implicit: + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "957757048" + - Value: + Implicit: + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "721540649" + - Value: + Implicit: + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "390746493" + - Value: + Implicit: + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "211251725" + - Value: + Implicit: + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "938266114" + - Value: + Implicit: + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "156985870" + - Value: + Implicit: + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "703831126" + - Value: + Implicit: + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "729964155" + - Value: + Implicit: + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "988151305" + - Value: + Implicit: + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "320872435" + - Value: + Implicit: + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "719287167" + - Value: + Implicit: + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "152289486" + - Value: + Implicit: + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "740067975" + - Value: + Implicit: + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "728627816" + - Value: + Implicit: + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "385008978" + - Value: + Implicit: + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "553967635" + - Value: + Implicit: + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "71980713" + - Value: + Implicit: + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "519444716" + - Value: + Implicit: + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "116499965" + - Value: + Implicit: + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "717422268" + - Value: + Implicit: + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "18966279" + - Value: + Implicit: + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "22458638" + - Value: + Implicit: + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "857282620" + - Value: + Implicit: + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "920675898" + - Value: + Implicit: + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "762235516" + - Value: + Implicit: + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "469018377" + - Value: + Implicit: + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "199986521" + - Value: + Implicit: + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "536679358" + - Value: + Implicit: + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "591399452" + - Value: + Implicit: + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "83083158" + - Value: + Implicit: + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "599449051" + - Value: + Implicit: + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "445442318" + - Value: + Implicit: + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "585486590" + - Value: + Implicit: + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "209278800" + - Value: + Implicit: + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "873568117" + - Value: + Implicit: + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "664470940" + - Value: + Implicit: + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "465262783" + - Value: + Implicit: + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "605652874" + - Value: + Implicit: + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "376803940" + - Value: + Implicit: + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "965247040" + - Value: + Implicit: + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "598474509" + - Value: + Implicit: + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "845119918" + - Value: + Implicit: + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "648159133" + - Value: + Implicit: + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "669051032" + - Value: + Implicit: + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "800600261" + - Value: + Implicit: + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "434689764" + - Value: + Implicit: + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "520060080" + - Value: + Implicit: + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "804659385" + - Value: + Implicit: + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "537828058" + - Value: + Implicit: + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "716600292" + - Value: + Implicit: + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "387020273" + - Value: + Implicit: + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "199375617" + - Value: + Implicit: + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "680337189" + - Value: + Implicit: + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "818479931" + - Value: + Implicit: + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "893693281" + - Value: + Implicit: + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "87377802" + - Value: + Implicit: + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "84699261" + - Value: + Implicit: + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "292826090" + - Value: + Implicit: + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "569171405" + - Value: + Implicit: + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "387436237" + - Value: + Implicit: + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "150682190" + - Value: + Implicit: + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "888770419" + - Value: + Implicit: + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "824696431" + - Value: + Implicit: + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "765659803" + - Value: + Implicit: + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "270163693" + - Value: + Implicit: + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "427940240" + - Value: + Implicit: + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "504997332" + - Value: + Implicit: + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "337808338" + - Value: + Implicit: + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "907200008" + - Value: + Implicit: + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "757177889" + - Value: + Implicit: + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "696697188" + - Value: + Implicit: + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "41376051" + - Value: + Implicit: + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "496293518" + - Value: + Implicit: + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "251218820" diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out new file mode 100644 index 0000000000..9e959269ac --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/mono_group.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Group: + Single: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: 123group + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Group: + Single: + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: 456group + - Value: + Group: + Single: + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 86 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802group + - Value: + Group: + Single: + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 406 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802group + - Value: + Group: + Single: + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 340130024group + - Value: + Group: + Single: + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 158951116group + - Value: + Group: + Single: + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 155529659group + - Value: + Group: + Single: + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 642023166group + - Value: + Group: + Single: + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 228481736group + - Value: + Group: + Single: + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 469712960group + - Value: + Group: + Single: + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 929437719group + - Value: + Group: + Single: + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 721072814group + - Value: + Group: + Single: + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 363254789group + - Value: + Group: + Single: + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 906732565group + - Value: + Group: + Single: + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 288246391group + - Value: + Group: + Single: + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 724940549group + - Value: + Group: + Single: + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 487101620group + - Value: + Group: + Single: + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 261373583group + - Value: + Group: + Single: + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 891163927group + - Value: + Group: + Single: + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 743967544group + - Value: + Group: + Single: + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 8372586group + - Value: + Group: + Single: + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 461793278group + - Value: + Group: + Single: + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 806307045group + - Value: + Group: + Single: + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 122764546group + - Value: + Group: + Single: + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 356336181group + - Value: + Group: + Single: + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 158370903group + - Value: + Group: + Single: + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 774460877group + - Value: + Group: + Single: + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 557174131group + - Value: + Group: + Single: + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 492401267group + - Value: + Group: + Single: + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 893445620group + - Value: + Group: + Single: + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 957757048group + - Value: + Group: + Single: + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 721540649group + - Value: + Group: + Single: + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 390746493group + - Value: + Group: + Single: + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 211251725group + - Value: + Group: + Single: + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 938266114group + - Value: + Group: + Single: + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 156985870group + - Value: + Group: + Single: + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 703831126group + - Value: + Group: + Single: + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 729964155group + - Value: + Group: + Single: + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 988151305group + - Value: + Group: + Single: + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 320872435group + - Value: + Group: + Single: + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 719287167group + - Value: + Group: + Single: + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 152289486group + - Value: + Group: + Single: + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 740067975group + - Value: + Group: + Single: + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 728627816group + - Value: + Group: + Single: + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 385008978group + - Value: + Group: + Single: + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 553967635group + - Value: + Group: + Single: + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 71980713group + - Value: + Group: + Single: + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 519444716group + - Value: + Group: + Single: + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 116499965group + - Value: + Group: + Single: + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 717422268group + - Value: + Group: + Single: + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 18966279group + - Value: + Group: + Single: + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 22458638group + - Value: + Group: + Single: + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 857282620group + - Value: + Group: + Single: + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 920675898group + - Value: + Group: + Single: + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 762235516group + - Value: + Group: + Single: + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 469018377group + - Value: + Group: + Single: + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 199986521group + - Value: + Group: + Single: + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 536679358group + - Value: + Group: + Single: + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 591399452group + - Value: + Group: + Single: + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 83083158group + - Value: + Group: + Single: + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 599449051group + - Value: + Group: + Single: + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 445442318group + - Value: + Group: + Single: + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 585486590group + - Value: + Group: + Single: + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 209278800group + - Value: + Group: + Single: + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 873568117group + - Value: + Group: + Single: + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 664470940group + - Value: + Group: + Single: + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 465262783group + - Value: + Group: + Single: + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 605652874group + - Value: + Group: + Single: + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 376803940group + - Value: + Group: + Single: + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 965247040group + - Value: + Group: + Single: + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 598474509group + - Value: + Group: + Single: + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 845119918group + - Value: + Group: + Single: + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 648159133group + - Value: + Group: + Single: + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 669051032group + - Value: + Group: + Single: + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 800600261group + - Value: + Group: + Single: + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 434689764group + - Value: + Group: + Single: + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 520060080group + - Value: + Group: + Single: + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 804659385group + - Value: + Group: + Single: + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 537828058group + - Value: + Group: + Single: + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 716600292group + - Value: + Group: + Single: + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 387020273group + - Value: + Group: + Single: + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 199375617group + - Value: + Group: + Single: + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 680337189group + - Value: + Group: + Single: + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 818479931group + - Value: + Group: + Single: + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 893693281group + - Value: + Group: + Single: + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 87377802group + - Value: + Group: + Single: + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 84699261group + - Value: + Group: + Single: + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 292826090group + - Value: + Group: + Single: + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 569171405group + - Value: + Group: + Single: + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 387436237group + - Value: + Group: + Single: + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 150682190group + - Value: + Group: + Single: + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 888770419group + - Value: + Group: + Single: + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 824696431group + - Value: + Group: + Single: + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 765659803group + - Value: + Group: + Single: + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 270163693group + - Value: + Group: + Single: + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 427940240group + - Value: + Group: + Single: + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 504997332group + - Value: + Group: + Single: + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 337808338group + - Value: + Group: + Single: + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 907200008group + - Value: + Group: + Single: + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 757177889group + - Value: + Group: + Single: + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 696697188group + - Value: + Group: + Single: + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 41376051group + - Value: + Group: + Single: + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 496293518group + - Value: + Group: + Single: + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: 251218820group diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out new file mode 100644 index 0000000000..f1048e6469 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u128.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U128 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 123u128 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U128 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: 456u128 + - Value: + Integer: + - U128 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 85 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u128 + - Value: + Integer: + - U128 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 405 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u128 + - Value: + Integer: + - U128 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 340130024u128 + - Value: + Integer: + - U128 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 158951116u128 + - Value: + Integer: + - U128 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 155529659u128 + - Value: + Integer: + - U128 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 642023166u128 + - Value: + Integer: + - U128 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 228481736u128 + - Value: + Integer: + - U128 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 469712960u128 + - Value: + Integer: + - U128 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 929437719u128 + - Value: + Integer: + - U128 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 721072814u128 + - Value: + Integer: + - U128 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 363254789u128 + - Value: + Integer: + - U128 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 906732565u128 + - Value: + Integer: + - U128 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 288246391u128 + - Value: + Integer: + - U128 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 724940549u128 + - Value: + Integer: + - U128 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 487101620u128 + - Value: + Integer: + - U128 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 261373583u128 + - Value: + Integer: + - U128 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 891163927u128 + - Value: + Integer: + - U128 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 743967544u128 + - Value: + Integer: + - U128 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 8372586u128 + - Value: + Integer: + - U128 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 461793278u128 + - Value: + Integer: + - U128 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 806307045u128 + - Value: + Integer: + - U128 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 122764546u128 + - Value: + Integer: + - U128 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 356336181u128 + - Value: + Integer: + - U128 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 158370903u128 + - Value: + Integer: + - U128 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 774460877u128 + - Value: + Integer: + - U128 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 557174131u128 + - Value: + Integer: + - U128 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 492401267u128 + - Value: + Integer: + - U128 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 893445620u128 + - Value: + Integer: + - U128 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 957757048u128 + - Value: + Integer: + - U128 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 721540649u128 + - Value: + Integer: + - U128 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 390746493u128 + - Value: + Integer: + - U128 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 211251725u128 + - Value: + Integer: + - U128 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 938266114u128 + - Value: + Integer: + - U128 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 156985870u128 + - Value: + Integer: + - U128 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 703831126u128 + - Value: + Integer: + - U128 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 729964155u128 + - Value: + Integer: + - U128 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 988151305u128 + - Value: + Integer: + - U128 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 320872435u128 + - Value: + Integer: + - U128 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 719287167u128 + - Value: + Integer: + - U128 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 152289486u128 + - Value: + Integer: + - U128 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 740067975u128 + - Value: + Integer: + - U128 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 728627816u128 + - Value: + Integer: + - U128 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 385008978u128 + - Value: + Integer: + - U128 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 553967635u128 + - Value: + Integer: + - U128 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 71980713u128 + - Value: + Integer: + - U128 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 519444716u128 + - Value: + Integer: + - U128 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 116499965u128 + - Value: + Integer: + - U128 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 717422268u128 + - Value: + Integer: + - U128 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 18966279u128 + - Value: + Integer: + - U128 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 22458638u128 + - Value: + Integer: + - U128 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 857282620u128 + - Value: + Integer: + - U128 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 920675898u128 + - Value: + Integer: + - U128 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 762235516u128 + - Value: + Integer: + - U128 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 469018377u128 + - Value: + Integer: + - U128 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 199986521u128 + - Value: + Integer: + - U128 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 536679358u128 + - Value: + Integer: + - U128 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 591399452u128 + - Value: + Integer: + - U128 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 83083158u128 + - Value: + Integer: + - U128 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 599449051u128 + - Value: + Integer: + - U128 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 445442318u128 + - Value: + Integer: + - U128 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 585486590u128 + - Value: + Integer: + - U128 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 209278800u128 + - Value: + Integer: + - U128 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 873568117u128 + - Value: + Integer: + - U128 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 664470940u128 + - Value: + Integer: + - U128 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 465262783u128 + - Value: + Integer: + - U128 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 605652874u128 + - Value: + Integer: + - U128 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 376803940u128 + - Value: + Integer: + - U128 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 965247040u128 + - Value: + Integer: + - U128 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 598474509u128 + - Value: + Integer: + - U128 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 845119918u128 + - Value: + Integer: + - U128 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 648159133u128 + - Value: + Integer: + - U128 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 669051032u128 + - Value: + Integer: + - U128 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 800600261u128 + - Value: + Integer: + - U128 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 434689764u128 + - Value: + Integer: + - U128 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 520060080u128 + - Value: + Integer: + - U128 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 804659385u128 + - Value: + Integer: + - U128 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 537828058u128 + - Value: + Integer: + - U128 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 716600292u128 + - Value: + Integer: + - U128 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 387020273u128 + - Value: + Integer: + - U128 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 199375617u128 + - Value: + Integer: + - U128 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 680337189u128 + - Value: + Integer: + - U128 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 818479931u128 + - Value: + Integer: + - U128 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 893693281u128 + - Value: + Integer: + - U128 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 87377802u128 + - Value: + Integer: + - U128 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 84699261u128 + - Value: + Integer: + - U128 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 292826090u128 + - Value: + Integer: + - U128 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 569171405u128 + - Value: + Integer: + - U128 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 387436237u128 + - Value: + Integer: + - U128 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 150682190u128 + - Value: + Integer: + - U128 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 888770419u128 + - Value: + Integer: + - U128 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 824696431u128 + - Value: + Integer: + - U128 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 765659803u128 + - Value: + Integer: + - U128 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 270163693u128 + - Value: + Integer: + - U128 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 427940240u128 + - Value: + Integer: + - U128 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 504997332u128 + - Value: + Integer: + - U128 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 337808338u128 + - Value: + Integer: + - U128 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 907200008u128 + - Value: + Integer: + - U128 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 757177889u128 + - Value: + Integer: + - U128 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 696697188u128 + - Value: + Integer: + - U128 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 41376051u128 + - Value: + Integer: + - U128 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 496293518u128 + - Value: + Integer: + - U128 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: 251218820u128 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out new file mode 100644 index 0000000000..324a0abcce --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u16.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U8 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 123u8 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U8 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 456u8 + - Value: + Integer: + - U8 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 83 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 + - Value: + Integer: + - U8 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 403 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 + - Value: + Integer: + - U8 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 340130024u8 + - Value: + Integer: + - U8 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158951116u8 + - Value: + Integer: + - U8 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 155529659u8 + - Value: + Integer: + - U8 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 642023166u8 + - Value: + Integer: + - U8 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 228481736u8 + - Value: + Integer: + - U8 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469712960u8 + - Value: + Integer: + - U8 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 929437719u8 + - Value: + Integer: + - U8 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721072814u8 + - Value: + Integer: + - U8 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 363254789u8 + - Value: + Integer: + - U8 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 906732565u8 + - Value: + Integer: + - U8 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 288246391u8 + - Value: + Integer: + - U8 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 724940549u8 + - Value: + Integer: + - U8 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 487101620u8 + - Value: + Integer: + - U8 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 261373583u8 + - Value: + Integer: + - U8 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 891163927u8 + - Value: + Integer: + - U8 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 743967544u8 + - Value: + Integer: + - U8 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 8372586u8 + - Value: + Integer: + - U8 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 461793278u8 + - Value: + Integer: + - U8 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 806307045u8 + - Value: + Integer: + - U8 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 122764546u8 + - Value: + Integer: + - U8 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 356336181u8 + - Value: + Integer: + - U8 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158370903u8 + - Value: + Integer: + - U8 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 774460877u8 + - Value: + Integer: + - U8 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 557174131u8 + - Value: + Integer: + - U8 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 492401267u8 + - Value: + Integer: + - U8 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893445620u8 + - Value: + Integer: + - U8 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 957757048u8 + - Value: + Integer: + - U8 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721540649u8 + - Value: + Integer: + - U8 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 390746493u8 + - Value: + Integer: + - U8 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 211251725u8 + - Value: + Integer: + - U8 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 938266114u8 + - Value: + Integer: + - U8 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 156985870u8 + - Value: + Integer: + - U8 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 703831126u8 + - Value: + Integer: + - U8 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 729964155u8 + - Value: + Integer: + - U8 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 988151305u8 + - Value: + Integer: + - U8 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 320872435u8 + - Value: + Integer: + - U8 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 719287167u8 + - Value: + Integer: + - U8 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 152289486u8 + - Value: + Integer: + - U8 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 740067975u8 + - Value: + Integer: + - U8 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 728627816u8 + - Value: + Integer: + - U8 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 385008978u8 + - Value: + Integer: + - U8 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 553967635u8 + - Value: + Integer: + - U8 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 71980713u8 + - Value: + Integer: + - U8 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 519444716u8 + - Value: + Integer: + - U8 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 116499965u8 + - Value: + Integer: + - U8 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 717422268u8 + - Value: + Integer: + - U8 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 18966279u8 + - Value: + Integer: + - U8 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 22458638u8 + - Value: + Integer: + - U8 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 857282620u8 + - Value: + Integer: + - U8 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 920675898u8 + - Value: + Integer: + - U8 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 762235516u8 + - Value: + Integer: + - U8 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469018377u8 + - Value: + Integer: + - U8 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199986521u8 + - Value: + Integer: + - U8 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 536679358u8 + - Value: + Integer: + - U8 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 591399452u8 + - Value: + Integer: + - U8 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 83083158u8 + - Value: + Integer: + - U8 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 599449051u8 + - Value: + Integer: + - U8 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 445442318u8 + - Value: + Integer: + - U8 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 585486590u8 + - Value: + Integer: + - U8 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 209278800u8 + - Value: + Integer: + - U8 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 873568117u8 + - Value: + Integer: + - U8 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 664470940u8 + - Value: + Integer: + - U8 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 465262783u8 + - Value: + Integer: + - U8 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 605652874u8 + - Value: + Integer: + - U8 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 376803940u8 + - Value: + Integer: + - U8 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 965247040u8 + - Value: + Integer: + - U8 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 598474509u8 + - Value: + Integer: + - U8 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 845119918u8 + - Value: + Integer: + - U8 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 648159133u8 + - Value: + Integer: + - U8 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 669051032u8 + - Value: + Integer: + - U8 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 800600261u8 + - Value: + Integer: + - U8 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 434689764u8 + - Value: + Integer: + - U8 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 520060080u8 + - Value: + Integer: + - U8 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 804659385u8 + - Value: + Integer: + - U8 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 537828058u8 + - Value: + Integer: + - U8 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 716600292u8 + - Value: + Integer: + - U8 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387020273u8 + - Value: + Integer: + - U8 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199375617u8 + - Value: + Integer: + - U8 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 680337189u8 + - Value: + Integer: + - U8 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 818479931u8 + - Value: + Integer: + - U8 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893693281u8 + - Value: + Integer: + - U8 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 87377802u8 + - Value: + Integer: + - U8 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 84699261u8 + - Value: + Integer: + - U8 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 292826090u8 + - Value: + Integer: + - U8 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 569171405u8 + - Value: + Integer: + - U8 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387436237u8 + - Value: + Integer: + - U8 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 150682190u8 + - Value: + Integer: + - U8 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 888770419u8 + - Value: + Integer: + - U8 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 824696431u8 + - Value: + Integer: + - U8 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 765659803u8 + - Value: + Integer: + - U8 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 270163693u8 + - Value: + Integer: + - U8 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 427940240u8 + - Value: + Integer: + - U8 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 504997332u8 + - Value: + Integer: + - U8 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 337808338u8 + - Value: + Integer: + - U8 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 907200008u8 + - Value: + Integer: + - U8 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 757177889u8 + - Value: + Integer: + - U8 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 696697188u8 + - Value: + Integer: + - U8 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 41376051u8 + - Value: + Integer: + - U8 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 496293518u8 + - Value: + Integer: + - U8 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out new file mode 100644 index 0000000000..ba97127eac --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u32.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U32 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123u32 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U32 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456u32 + - Value: + Integer: + - U32 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 + - Value: + Integer: + - U32 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 + - Value: + Integer: + - U32 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024u32 + - Value: + Integer: + - U32 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116u32 + - Value: + Integer: + - U32 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659u32 + - Value: + Integer: + - U32 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166u32 + - Value: + Integer: + - U32 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736u32 + - Value: + Integer: + - U32 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960u32 + - Value: + Integer: + - U32 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719u32 + - Value: + Integer: + - U32 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814u32 + - Value: + Integer: + - U32 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789u32 + - Value: + Integer: + - U32 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565u32 + - Value: + Integer: + - U32 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391u32 + - Value: + Integer: + - U32 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549u32 + - Value: + Integer: + - U32 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620u32 + - Value: + Integer: + - U32 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583u32 + - Value: + Integer: + - U32 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927u32 + - Value: + Integer: + - U32 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544u32 + - Value: + Integer: + - U32 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586u32 + - Value: + Integer: + - U32 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278u32 + - Value: + Integer: + - U32 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045u32 + - Value: + Integer: + - U32 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546u32 + - Value: + Integer: + - U32 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181u32 + - Value: + Integer: + - U32 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903u32 + - Value: + Integer: + - U32 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877u32 + - Value: + Integer: + - U32 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131u32 + - Value: + Integer: + - U32 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267u32 + - Value: + Integer: + - U32 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620u32 + - Value: + Integer: + - U32 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048u32 + - Value: + Integer: + - U32 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649u32 + - Value: + Integer: + - U32 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493u32 + - Value: + Integer: + - U32 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725u32 + - Value: + Integer: + - U32 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114u32 + - Value: + Integer: + - U32 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870u32 + - Value: + Integer: + - U32 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126u32 + - Value: + Integer: + - U32 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155u32 + - Value: + Integer: + - U32 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305u32 + - Value: + Integer: + - U32 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435u32 + - Value: + Integer: + - U32 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167u32 + - Value: + Integer: + - U32 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486u32 + - Value: + Integer: + - U32 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975u32 + - Value: + Integer: + - U32 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816u32 + - Value: + Integer: + - U32 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978u32 + - Value: + Integer: + - U32 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635u32 + - Value: + Integer: + - U32 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713u32 + - Value: + Integer: + - U32 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716u32 + - Value: + Integer: + - U32 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965u32 + - Value: + Integer: + - U32 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268u32 + - Value: + Integer: + - U32 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279u32 + - Value: + Integer: + - U32 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638u32 + - Value: + Integer: + - U32 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620u32 + - Value: + Integer: + - U32 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898u32 + - Value: + Integer: + - U32 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516u32 + - Value: + Integer: + - U32 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377u32 + - Value: + Integer: + - U32 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521u32 + - Value: + Integer: + - U32 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358u32 + - Value: + Integer: + - U32 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452u32 + - Value: + Integer: + - U32 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158u32 + - Value: + Integer: + - U32 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051u32 + - Value: + Integer: + - U32 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318u32 + - Value: + Integer: + - U32 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590u32 + - Value: + Integer: + - U32 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800u32 + - Value: + Integer: + - U32 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117u32 + - Value: + Integer: + - U32 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940u32 + - Value: + Integer: + - U32 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783u32 + - Value: + Integer: + - U32 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874u32 + - Value: + Integer: + - U32 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940u32 + - Value: + Integer: + - U32 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040u32 + - Value: + Integer: + - U32 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509u32 + - Value: + Integer: + - U32 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918u32 + - Value: + Integer: + - U32 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133u32 + - Value: + Integer: + - U32 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032u32 + - Value: + Integer: + - U32 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261u32 + - Value: + Integer: + - U32 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764u32 + - Value: + Integer: + - U32 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080u32 + - Value: + Integer: + - U32 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385u32 + - Value: + Integer: + - U32 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058u32 + - Value: + Integer: + - U32 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292u32 + - Value: + Integer: + - U32 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273u32 + - Value: + Integer: + - U32 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617u32 + - Value: + Integer: + - U32 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189u32 + - Value: + Integer: + - U32 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931u32 + - Value: + Integer: + - U32 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281u32 + - Value: + Integer: + - U32 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802u32 + - Value: + Integer: + - U32 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261u32 + - Value: + Integer: + - U32 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090u32 + - Value: + Integer: + - U32 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405u32 + - Value: + Integer: + - U32 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237u32 + - Value: + Integer: + - U32 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190u32 + - Value: + Integer: + - U32 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419u32 + - Value: + Integer: + - U32 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431u32 + - Value: + Integer: + - U32 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803u32 + - Value: + Integer: + - U32 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693u32 + - Value: + Integer: + - U32 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240u32 + - Value: + Integer: + - U32 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332u32 + - Value: + Integer: + - U32 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338u32 + - Value: + Integer: + - U32 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008u32 + - Value: + Integer: + - U32 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889u32 + - Value: + Integer: + - U32 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188u32 + - Value: + Integer: + - U32 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051u32 + - Value: + Integer: + - U32 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518u32 + - Value: + Integer: + - U32 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out new file mode 100644 index 0000000000..ba97127eac --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u64.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U32 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 123u32 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U32 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: 456u32 + - Value: + Integer: + - U32 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 84 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u32 + - Value: + Integer: + - U32 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 404 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u32 + - Value: + Integer: + - U32 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 340130024u32 + - Value: + Integer: + - U32 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158951116u32 + - Value: + Integer: + - U32 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 155529659u32 + - Value: + Integer: + - U32 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 642023166u32 + - Value: + Integer: + - U32 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 228481736u32 + - Value: + Integer: + - U32 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469712960u32 + - Value: + Integer: + - U32 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 929437719u32 + - Value: + Integer: + - U32 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721072814u32 + - Value: + Integer: + - U32 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 363254789u32 + - Value: + Integer: + - U32 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 906732565u32 + - Value: + Integer: + - U32 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 288246391u32 + - Value: + Integer: + - U32 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 724940549u32 + - Value: + Integer: + - U32 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 487101620u32 + - Value: + Integer: + - U32 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 261373583u32 + - Value: + Integer: + - U32 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 891163927u32 + - Value: + Integer: + - U32 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 743967544u32 + - Value: + Integer: + - U32 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 8372586u32 + - Value: + Integer: + - U32 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 461793278u32 + - Value: + Integer: + - U32 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 806307045u32 + - Value: + Integer: + - U32 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 122764546u32 + - Value: + Integer: + - U32 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 356336181u32 + - Value: + Integer: + - U32 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 158370903u32 + - Value: + Integer: + - U32 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 774460877u32 + - Value: + Integer: + - U32 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 557174131u32 + - Value: + Integer: + - U32 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 492401267u32 + - Value: + Integer: + - U32 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893445620u32 + - Value: + Integer: + - U32 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 957757048u32 + - Value: + Integer: + - U32 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 721540649u32 + - Value: + Integer: + - U32 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 390746493u32 + - Value: + Integer: + - U32 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 211251725u32 + - Value: + Integer: + - U32 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 938266114u32 + - Value: + Integer: + - U32 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 156985870u32 + - Value: + Integer: + - U32 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 703831126u32 + - Value: + Integer: + - U32 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 729964155u32 + - Value: + Integer: + - U32 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 988151305u32 + - Value: + Integer: + - U32 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 320872435u32 + - Value: + Integer: + - U32 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 719287167u32 + - Value: + Integer: + - U32 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 152289486u32 + - Value: + Integer: + - U32 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 740067975u32 + - Value: + Integer: + - U32 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 728627816u32 + - Value: + Integer: + - U32 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 385008978u32 + - Value: + Integer: + - U32 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 553967635u32 + - Value: + Integer: + - U32 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 71980713u32 + - Value: + Integer: + - U32 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 519444716u32 + - Value: + Integer: + - U32 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 116499965u32 + - Value: + Integer: + - U32 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 717422268u32 + - Value: + Integer: + - U32 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 18966279u32 + - Value: + Integer: + - U32 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 22458638u32 + - Value: + Integer: + - U32 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 857282620u32 + - Value: + Integer: + - U32 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 920675898u32 + - Value: + Integer: + - U32 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 762235516u32 + - Value: + Integer: + - U32 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 469018377u32 + - Value: + Integer: + - U32 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199986521u32 + - Value: + Integer: + - U32 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 536679358u32 + - Value: + Integer: + - U32 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 591399452u32 + - Value: + Integer: + - U32 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 83083158u32 + - Value: + Integer: + - U32 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 599449051u32 + - Value: + Integer: + - U32 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 445442318u32 + - Value: + Integer: + - U32 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 585486590u32 + - Value: + Integer: + - U32 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 209278800u32 + - Value: + Integer: + - U32 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 873568117u32 + - Value: + Integer: + - U32 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 664470940u32 + - Value: + Integer: + - U32 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 465262783u32 + - Value: + Integer: + - U32 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 605652874u32 + - Value: + Integer: + - U32 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 376803940u32 + - Value: + Integer: + - U32 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 965247040u32 + - Value: + Integer: + - U32 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 598474509u32 + - Value: + Integer: + - U32 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 845119918u32 + - Value: + Integer: + - U32 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 648159133u32 + - Value: + Integer: + - U32 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 669051032u32 + - Value: + Integer: + - U32 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 800600261u32 + - Value: + Integer: + - U32 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 434689764u32 + - Value: + Integer: + - U32 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 520060080u32 + - Value: + Integer: + - U32 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 804659385u32 + - Value: + Integer: + - U32 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 537828058u32 + - Value: + Integer: + - U32 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 716600292u32 + - Value: + Integer: + - U32 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387020273u32 + - Value: + Integer: + - U32 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 199375617u32 + - Value: + Integer: + - U32 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 680337189u32 + - Value: + Integer: + - U32 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 818479931u32 + - Value: + Integer: + - U32 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 893693281u32 + - Value: + Integer: + - U32 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 87377802u32 + - Value: + Integer: + - U32 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 84699261u32 + - Value: + Integer: + - U32 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 292826090u32 + - Value: + Integer: + - U32 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 569171405u32 + - Value: + Integer: + - U32 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 387436237u32 + - Value: + Integer: + - U32 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 150682190u32 + - Value: + Integer: + - U32 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 888770419u32 + - Value: + Integer: + - U32 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 824696431u32 + - Value: + Integer: + - U32 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 765659803u32 + - Value: + Integer: + - U32 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 270163693u32 + - Value: + Integer: + - U32 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 427940240u32 + - Value: + Integer: + - U32 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 504997332u32 + - Value: + Integer: + - U32 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 337808338u32 + - Value: + Integer: + - U32 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 907200008u32 + - Value: + Integer: + - U32 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 757177889u32 + - Value: + Integer: + - U32 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 696697188u32 + - Value: + Integer: + - U32 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 41376051u32 + - Value: + Integer: + - U32 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 496293518u32 + - Value: + Integer: + - U32 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: 251218820u32 diff --git a/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out b/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out new file mode 100644 index 0000000000..324a0abcce --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/int_parse/u8.leo.out @@ -0,0 +1,1053 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Integer: + - U8 + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 123u8 + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "123" + - Value: + Integer: + - U8 + - "456" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: 456u8 + - Value: + Integer: + - U8 + - "87377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 83 + path: test + content: 87377802873778028737780287377802873778028737780287377802873778028737780287377802u8 + - Value: + Integer: + - U8 + - "8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 403 + path: test + content: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802u8 + - Value: + Integer: + - U8 + - "340130024" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 340130024u8 + - Value: + Integer: + - U8 + - "158951116" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158951116u8 + - Value: + Integer: + - U8 + - "155529659" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 155529659u8 + - Value: + Integer: + - U8 + - "642023166" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 642023166u8 + - Value: + Integer: + - U8 + - "228481736" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 228481736u8 + - Value: + Integer: + - U8 + - "469712960" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469712960u8 + - Value: + Integer: + - U8 + - "929437719" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 929437719u8 + - Value: + Integer: + - U8 + - "721072814" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721072814u8 + - Value: + Integer: + - U8 + - "363254789" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 363254789u8 + - Value: + Integer: + - U8 + - "906732565" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 906732565u8 + - Value: + Integer: + - U8 + - "288246391" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 288246391u8 + - Value: + Integer: + - U8 + - "724940549" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 724940549u8 + - Value: + Integer: + - U8 + - "487101620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 487101620u8 + - Value: + Integer: + - U8 + - "261373583" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 261373583u8 + - Value: + Integer: + - U8 + - "891163927" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 891163927u8 + - Value: + Integer: + - U8 + - "743967544" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 743967544u8 + - Value: + Integer: + - U8 + - "8372586" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: 8372586u8 + - Value: + Integer: + - U8 + - "461793278" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 461793278u8 + - Value: + Integer: + - U8 + - "806307045" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 806307045u8 + - Value: + Integer: + - U8 + - "122764546" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 122764546u8 + - Value: + Integer: + - U8 + - "356336181" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 356336181u8 + - Value: + Integer: + - U8 + - "158370903" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 158370903u8 + - Value: + Integer: + - U8 + - "774460877" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 774460877u8 + - Value: + Integer: + - U8 + - "557174131" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 557174131u8 + - Value: + Integer: + - U8 + - "492401267" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 492401267u8 + - Value: + Integer: + - U8 + - "893445620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893445620u8 + - Value: + Integer: + - U8 + - "957757048" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 957757048u8 + - Value: + Integer: + - U8 + - "721540649" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 721540649u8 + - Value: + Integer: + - U8 + - "390746493" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 390746493u8 + - Value: + Integer: + - U8 + - "211251725" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 211251725u8 + - Value: + Integer: + - U8 + - "938266114" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 938266114u8 + - Value: + Integer: + - U8 + - "156985870" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 156985870u8 + - Value: + Integer: + - U8 + - "703831126" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 703831126u8 + - Value: + Integer: + - U8 + - "729964155" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 729964155u8 + - Value: + Integer: + - U8 + - "988151305" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 988151305u8 + - Value: + Integer: + - U8 + - "320872435" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 320872435u8 + - Value: + Integer: + - U8 + - "719287167" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 719287167u8 + - Value: + Integer: + - U8 + - "152289486" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 152289486u8 + - Value: + Integer: + - U8 + - "740067975" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 740067975u8 + - Value: + Integer: + - U8 + - "728627816" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 728627816u8 + - Value: + Integer: + - U8 + - "385008978" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 385008978u8 + - Value: + Integer: + - U8 + - "553967635" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 553967635u8 + - Value: + Integer: + - U8 + - "71980713" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 71980713u8 + - Value: + Integer: + - U8 + - "519444716" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 519444716u8 + - Value: + Integer: + - U8 + - "116499965" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 116499965u8 + - Value: + Integer: + - U8 + - "717422268" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 717422268u8 + - Value: + Integer: + - U8 + - "18966279" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 18966279u8 + - Value: + Integer: + - U8 + - "22458638" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 22458638u8 + - Value: + Integer: + - U8 + - "857282620" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 857282620u8 + - Value: + Integer: + - U8 + - "920675898" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 920675898u8 + - Value: + Integer: + - U8 + - "762235516" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 762235516u8 + - Value: + Integer: + - U8 + - "469018377" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 469018377u8 + - Value: + Integer: + - U8 + - "199986521" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199986521u8 + - Value: + Integer: + - U8 + - "536679358" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 536679358u8 + - Value: + Integer: + - U8 + - "591399452" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 591399452u8 + - Value: + Integer: + - U8 + - "83083158" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 83083158u8 + - Value: + Integer: + - U8 + - "599449051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 599449051u8 + - Value: + Integer: + - U8 + - "445442318" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 445442318u8 + - Value: + Integer: + - U8 + - "585486590" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 585486590u8 + - Value: + Integer: + - U8 + - "209278800" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 209278800u8 + - Value: + Integer: + - U8 + - "873568117" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 873568117u8 + - Value: + Integer: + - U8 + - "664470940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 664470940u8 + - Value: + Integer: + - U8 + - "465262783" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 465262783u8 + - Value: + Integer: + - U8 + - "605652874" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 605652874u8 + - Value: + Integer: + - U8 + - "376803940" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 376803940u8 + - Value: + Integer: + - U8 + - "965247040" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 965247040u8 + - Value: + Integer: + - U8 + - "598474509" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 598474509u8 + - Value: + Integer: + - U8 + - "845119918" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 845119918u8 + - Value: + Integer: + - U8 + - "648159133" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 648159133u8 + - Value: + Integer: + - U8 + - "669051032" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 669051032u8 + - Value: + Integer: + - U8 + - "800600261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 800600261u8 + - Value: + Integer: + - U8 + - "434689764" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 434689764u8 + - Value: + Integer: + - U8 + - "520060080" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 520060080u8 + - Value: + Integer: + - U8 + - "804659385" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 804659385u8 + - Value: + Integer: + - U8 + - "537828058" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 537828058u8 + - Value: + Integer: + - U8 + - "716600292" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 716600292u8 + - Value: + Integer: + - U8 + - "387020273" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387020273u8 + - Value: + Integer: + - U8 + - "199375617" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 199375617u8 + - Value: + Integer: + - U8 + - "680337189" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 680337189u8 + - Value: + Integer: + - U8 + - "818479931" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 818479931u8 + - Value: + Integer: + - U8 + - "893693281" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 893693281u8 + - Value: + Integer: + - U8 + - "87377802" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 87377802u8 + - Value: + Integer: + - U8 + - "84699261" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 84699261u8 + - Value: + Integer: + - U8 + - "292826090" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 292826090u8 + - Value: + Integer: + - U8 + - "569171405" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 569171405u8 + - Value: + Integer: + - U8 + - "387436237" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 387436237u8 + - Value: + Integer: + - U8 + - "150682190" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 150682190u8 + - Value: + Integer: + - U8 + - "888770419" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 888770419u8 + - Value: + Integer: + - U8 + - "824696431" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 824696431u8 + - Value: + Integer: + - U8 + - "765659803" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 765659803u8 + - Value: + Integer: + - U8 + - "270163693" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 270163693u8 + - Value: + Integer: + - U8 + - "427940240" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 427940240u8 + - Value: + Integer: + - U8 + - "504997332" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 504997332u8 + - Value: + Integer: + - U8 + - "337808338" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 337808338u8 + - Value: + Integer: + - U8 + - "907200008" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 907200008u8 + - Value: + Integer: + - U8 + - "757177889" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 757177889u8 + - Value: + Integer: + - U8 + - "696697188" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 696697188u8 + - Value: + Integer: + - U8 + - "41376051" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: 41376051u8 + - Value: + Integer: + - U8 + - "496293518" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 496293518u8 + - Value: + Integer: + - U8 + - "251218820" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: 251218820u8 diff --git a/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out b/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out new file mode 100644 index 0000000000..00ff4531d4 --- /dev/null +++ b/tests/expectations/parser/parser/expression/literal/postfix_types.leo.out @@ -0,0 +1,62 @@ +--- +namespace: Token +expectation: Pass +outputs: + - "'field' @ 1:1-6" + - "'Field' @ 1:1-6" + - "'fielD' @ 1:1-6" + - "'FIELD' @ 1:1-6" + - "'group' @ 1:1-6" + - "'Group' @ 1:1-6" + - "'grouP' @ 1:1-6" + - "'GROUP' @ 1:1-6" + - "'u8' @ 1:1-3" + - "'u16' @ 1:1-4" + - "'u32' @ 1:1-4" + - "'u64' @ 1:1-4" + - "'u128' @ 1:1-5" + - "'i8' @ 1:1-3" + - "'i16' @ 1:1-4" + - "'i32' @ 1:1-4" + - "'i64' @ 1:1-4" + - "'i128' @ 1:1-5" + - "'U8' @ 1:1-3" + - "'U16' @ 1:1-4" + - "'U32' @ 1:1-4" + - "'U64' @ 1:1-4" + - "'U128' @ 1:1-5" + - "'U8' @ 1:1-3" + - "'U16' @ 1:1-4" + - "'U32' @ 1:1-4" + - "'U64' @ 1:1-4" + - "'U128' @ 1:1-5" + - "'u' @ 1:1-2" + - "'8' @ 1:1-2" + - "'u' @ 1:1-2" + - "'16' @ 1:1-3" + - "'u' @ 1:1-2" + - "'32' @ 1:1-3" + - "'u' @ 1:1-2" + - "'64' @ 1:1-3" + - "'u' @ 1:1-2" + - "'128' @ 1:1-4" + - "'i' @ 1:1-2" + - "'8' @ 1:1-2" + - "'i' @ 1:1-2" + - "'16' @ 1:1-3" + - "'i' @ 1:1-2" + - "'32' @ 1:1-3" + - "'i' @ 1:1-2" + - "'64' @ 1:1-3" + - "'i' @ 1:1-2" + - "'128' @ 1:1-4" + - "'U' @ 1:1-2,'8' @ 1:3-4" + - "'U' @ 1:1-2,'16' @ 1:3-5" + - "'U' @ 1:1-2,'32' @ 1:3-5" + - "'U' @ 1:1-2,'64' @ 1:3-5" + - "'U' @ 1:1-2,'128' @ 1:3-6" + - "'U' @ 1:1-2,'8' @ 1:3-4" + - "'U' @ 1:1-2,'16' @ 1:3-5" + - "'U' @ 1:1-2,'32' @ 1:3-5" + - "'U' @ 1:1-2,'64' @ 1:3-5" + - "'U' @ 1:1-2,'128' @ 1:3-6" diff --git a/tests/expectations/parser/parser/expression/ternary.leo.out b/tests/expectations/parser/parser/expression/ternary.leo.out new file mode 100644 index 0000000000..0d672f23d9 --- /dev/null +++ b/tests/expectations/parser/parser/expression/ternary.leo.out @@ -0,0 +1,72 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Ternary: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" + if_true: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" + if_false: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x ? y : z" + - Ternary: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + if_true: + Ternary: + condition: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + if_true: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + if_false: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 14 + path: test + content: "x ? a ? b : c : z" + if_false: + Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "x ? a ? b : c : z" + - Ternary: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + if_true: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + if_false: + Ternary: + condition: + Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + if_true: + Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + if_false: + Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 18 + path: test + content: "x ? y : a ? b : c" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "x ? y : a ? b : c" diff --git a/tests/expectations/parser/parser/expression/tuple.leo.out b/tests/expectations/parser/parser/expression/tuple.leo.out new file mode 100644 index 0000000000..f5ec2aa11b --- /dev/null +++ b/tests/expectations/parser/parser/expression/tuple.leo.out @@ -0,0 +1,94 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Value: + Implicit: + - "" + - line_start: 0 + line_stop: 0 + col_start: 0 + col_stop: 0 + path: "" + content: "" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(y)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(z)\\\"}\"}" + - Value: + Implicit: + - "" + - line_start: 0 + line_stop: 0 + col_start: 0 + col_stop: 0 + path: "" + content: "" + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,)\\\"}\"}" + - TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "(x,y)" + - TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" + - Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y,z)\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "(x,y,z)" + - TupleInit: + elements: + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "(123,123)" + - Value: + Implicit: + - "123" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 9 + path: test + content: "(123,123)" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "(123,123)" + - TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: () + - TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: (()) diff --git a/tests/expectations/parser/parser/expression/unary/negate.leo.out b/tests/expectations/parser/parser/expression/unary/negate.leo.out new file mode 100644 index 0000000000..de785f2be6 --- /dev/null +++ b/tests/expectations/parser/parser/expression/unary/negate.leo.out @@ -0,0 +1,120 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x\\\"}\"}" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "-x" + - Unary: + inner: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x.y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "-x.y" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "-x.y" + - Unary: + inner: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 6 + path: test + content: "-x::y" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "-x::y" + - Unary: + inner: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-x()\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "-x()" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "-x()" + - Unary: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"--x\\\"}\"}" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "--x" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "--x" + - Unary: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"-!x\\\"}\"}" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "-!x" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "-!x" diff --git a/tests/expectations/parser/parser/expression/unary/not.leo.out b/tests/expectations/parser/parser/expression/unary/not.leo.out new file mode 100644 index 0000000000..5c93154572 --- /dev/null +++ b/tests/expectations/parser/parser/expression/unary/not.leo.out @@ -0,0 +1,120 @@ +--- +namespace: ParseExpression +expectation: Pass +outputs: + - Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x\\\"}\"}" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "!x" + - Unary: + inner: + CircuitMemberAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x.y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "!x.y" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "!x.y" + - Unary: + inner: + CircuitStaticFunctionAccess: + circuit: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" + name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 6 + path: test + content: "!x::y" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "!x::y" + - Unary: + inner: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!x()\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 5 + path: test + content: "!x()" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "!x()" + - Unary: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!!x\\\"}\"}" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "!!x" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "!!x" + - Unary: + inner: + Unary: + inner: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"!-x\\\"}\"}" + op: Negate + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "!-x" + op: Not + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "!-x" diff --git a/tests/expectations/parser/parser/functions/annotated.leo.out b/tests/expectations/parser/parser/functions/annotated.leo.out new file mode 100644 index 0000000000..29612e265a --- /dev/null +++ b/tests/expectations/parser/parser/functions/annotated.leo.out @@ -0,0 +1,58 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + annotations: + - span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 6 + path: test + content: "@test" + name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test\\\"}\"}" + arguments: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 14 + col_stop: 2 + path: test + content: "function x() {\n...\n}" + span: + line_start: 4 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: test + content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_param.leo.out b/tests/expectations/parser/parser/functions/annotated_param.leo.out new file mode 100644 index 0000000000..72ca72549e --- /dev/null +++ b/tests/expectations/parser/parser/functions/annotated_param.leo.out @@ -0,0 +1,59 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + annotations: + - span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 12 + path: test + content: "@test(test)" + name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test(test)\\\"}\"}" + arguments: + - test + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 14 + col_stop: 2 + path: test + content: "function x() {\n...\n}" + span: + line_start: 4 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: test + content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/annotated_twice.leo.out b/tests/expectations/parser/parser/functions/annotated_twice.leo.out new file mode 100644 index 0000000000..a83199ec50 --- /dev/null +++ b/tests/expectations/parser/parser/functions/annotated_twice.leo.out @@ -0,0 +1,67 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + annotations: + - span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 6 + path: test + content: "@test @test2" + name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" + arguments: [] + - span: + line_start: 3 + line_stop: 3 + col_start: 7 + col_stop: 13 + path: test + content: "@test @test2" + name: "{\"name\":\"test2\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}" + arguments: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 6 + col_start: 14 + col_stop: 2 + path: test + content: "function x() {\n...\n}" + span: + line_start: 4 + line_stop: 6 + col_start: 1 + col_stop: 2 + path: test + content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_input_fail.leo.out b/tests/expectations/parser/parser/functions/const_input_fail.leo.out new file mode 100644 index 0000000000..468e683fd9 --- /dev/null +++ b/tests/expectations/parser/parser/functions/const_input_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Parse +expectation: Fail +outputs: + - " --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^\n |\n = expected 'ident', got 'input'" diff --git a/tests/expectations/parser/parser/functions/const_param.leo.out b/tests/expectations/parser/parser/functions/const_param.leo.out new file mode 100644 index 0000000000..609a83247f --- /dev/null +++ b/tests/expectations/parser/parser/functions/const_param.leo.out @@ -0,0 +1,140 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: u32, const y: i32) {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 26 + col_stop: 27 + path: test + content: "function x(x: u32, const y: i32) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 34 + col_stop: 2 + path: test + content: "function x(x: u32, const y: i32) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: u32, const y: i32) {\n...\n}" + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" + const_: true + mutable: false + type_: + IntegerType: U32 + span: + line_start: 7 + line_stop: 7 + col_start: 18 + col_stop: 19 + path: test + content: "function x(const x: u32, y: i32) {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 7 + line_stop: 7 + col_start: 26 + col_stop: 27 + path: test + content: "function x(const x: u32, y: i32) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 8 + line_stop: 8 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 7 + line_stop: 9 + col_start: 34 + col_stop: 2 + path: test + content: "function x(const x: u32, y: i32) {\n...\n}" + span: + line_start: 7 + line_stop: 9 + col_start: 1 + col_stop: 2 + path: test + content: "function x(const x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/const_self_bad.leo.out b/tests/expectations/parser/parser/functions/const_self_bad.leo.out new file mode 100644 index 0000000000..3b6e210cef --- /dev/null +++ b/tests/expectations/parser/parser/functions/const_self_bad.leo.out @@ -0,0 +1,50 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" + input: + - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 24 + col_stop: 2 + path: test + content: "function x(const self) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(const self) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty.leo.out b/tests/expectations/parser/parser/functions/empty.leo.out new file mode 100644 index 0000000000..5ead848ab3 --- /dev/null +++ b/tests/expectations/parser/parser/functions/empty.leo.out @@ -0,0 +1,49 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" + input: [] + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 14 + col_stop: 2 + path: test + content: "function x() {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x() {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/empty2.leo.out b/tests/expectations/parser/parser/functions/empty2.leo.out new file mode 100644 index 0000000000..16574b1dc3 --- /dev/null +++ b/tests/expectations/parser/parser/functions/empty2.leo.out @@ -0,0 +1,31 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}" + input: [] + output: ~ + block: + statements: [] + span: + line_start: 3 + line_stop: 3 + col_start: 14 + col_stop: 16 + path: test + content: "function x() {}" + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 16 + path: test + content: "function x() {}" diff --git a/tests/expectations/parser/parser/functions/param_array.leo.out b/tests/expectations/parser/parser/functions/param_array.leo.out new file mode 100644 index 0000000000..c9b3cc79cd --- /dev/null +++ b/tests/expectations/parser/parser/functions/param_array.leo.out @@ -0,0 +1,64 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}" + const_: false + mutable: true + type_: + Array: + - IntegerType: U8 + - - value: "12" + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: [u8; 12]) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 25 + col_stop: 2 + path: test + content: "function x(x: [u8; 12]) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: [u8; 12]) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_circuit.leo.out b/tests/expectations/parser/parser/functions/param_circuit.leo.out new file mode 100644 index 0000000000..e998fe7f92 --- /dev/null +++ b/tests/expectations/parser/parser/functions/param_circuit.leo.out @@ -0,0 +1,62 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" + const_: false + mutable: true + type_: + Circuit: "{\"name\":\"MyCircuit\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}" + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: MyCircuit) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 26 + col_stop: 2 + path: test + content: "function x(x: MyCircuit) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: MyCircuit) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/param_tuple.leo.out b/tests/expectations/parser/parser/functions/param_tuple.leo.out new file mode 100644 index 0000000000..9597b18cb3 --- /dev/null +++ b/tests/expectations/parser/parser/functions/param_tuple.leo.out @@ -0,0 +1,64 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}" + const_: false + mutable: true + type_: + Tuple: + - IntegerType: U32 + - IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: (u32, i32)) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 27 + col_stop: 2 + path: test + content: "function x(x: (u32, i32)) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: (u32, i32)) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params.leo.out b/tests/expectations/parser/parser/functions/params.leo.out new file mode 100644 index 0000000000..9c74dafafd --- /dev/null +++ b/tests/expectations/parser/parser/functions/params.leo.out @@ -0,0 +1,75 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: u32, y: i32) {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: test + content: "function x(x: u32, y: i32) {" + output: ~ + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 28 + col_stop: 2 + path: test + content: "function x(x: u32, y: i32) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: u32, y: i32) {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/params_return.leo.out b/tests/expectations/parser/parser/functions/params_return.leo.out new file mode 100644 index 0000000000..6b1980e238 --- /dev/null +++ b/tests/expectations/parser/parser/functions/params_return.leo.out @@ -0,0 +1,76 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" + input: + - Variable: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: U32 + span: + line_start: 3 + line_stop: 3 + col_start: 12 + col_stop: 13 + path: test + content: "function x(x: u32, y: i32) -> u32 {" + - Variable: + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}" + const_: false + mutable: true + type_: + IntegerType: I32 + span: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: test + content: "function x(x: u32, y: i32) -> u32 {" + output: + IntegerType: U32 + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 35 + col_stop: 2 + path: test + content: "function x(x: u32, y: i32) -> u32 {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x(x: u32, y: i32) -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return.leo.out b/tests/expectations/parser/parser/functions/return.leo.out new file mode 100644 index 0000000000..3baa2a2e79 --- /dev/null +++ b/tests/expectations/parser/parser/functions/return.leo.out @@ -0,0 +1,50 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}" + input: [] + output: + IntegerType: U32 + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 21 + col_stop: 2 + path: test + content: "function x() -> u32 {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x() -> u32 {\n...\n}" diff --git a/tests/expectations/parser/parser/functions/return_tuple.leo.out b/tests/expectations/parser/parser/functions/return_tuple.leo.out new file mode 100644 index 0000000000..aa853f04df --- /dev/null +++ b/tests/expectations/parser/parser/functions/return_tuple.leo.out @@ -0,0 +1,52 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: [] + circuits: {} + global_consts: {} + functions: + "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}": + annotations: [] + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}" + input: [] + output: + Tuple: + - IntegerType: U32 + - IntegerType: U32 + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 14 + path: test + content: " return ();" + span: + line_start: 3 + line_stop: 5 + col_start: 28 + col_stop: 2 + path: test + content: "function x() -> (u32, u32) {\n...\n}" + span: + line_start: 3 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "function x() -> (u32, u32) {\n...\n}" diff --git a/tests/expectations/parser/parser/import/alias.leo.out b/tests/expectations/parser/parser/import/alias.leo.out new file mode 100644 index 0000000000..e0c181f3d7 --- /dev/null +++ b/tests/expectations/parser/parser/import/alias.leo.out @@ -0,0 +1,38 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" + alias: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b as bar;\\\"}\"}" + span: + line_start: 3 + line_stop: 3 + col_start: 10 + col_stop: 18 + path: test + content: import a.b as bar; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 18 + path: test + content: import a.b as bar; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 18 + path: test + content: import a.b as bar; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/basic.leo.out b/tests/expectations/parser/parser/import/basic.leo.out new file mode 100644 index 0000000000..7293ccb78e --- /dev/null +++ b/tests/expectations/parser/parser/import/basic.leo.out @@ -0,0 +1,38 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a.b;\\\"}\"}" + alias: ~ + span: + line_start: 3 + line_stop: 3 + col_start: 10 + col_stop: 11 + path: test + content: import a.b; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 11 + path: test + content: import a.b; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 11 + path: test + content: import a.b; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out new file mode 100644 index 0000000000..5b3301be42 --- /dev/null +++ b/tests/expectations/parser/parser/import/import_empty_list_fail.leo.out @@ -0,0 +1,5 @@ +--- +namespace: Parse +expectation: Fail +outputs: + - " --> test:3:8\n |\n 3 | import a.();\n | ^\n |\n = Cannot import empty list" diff --git a/tests/expectations/parser/parser/import/many_import.leo.out b/tests/expectations/parser/parser/import/many_import.leo.out new file mode 100644 index 0000000000..c8bf9349c8 --- /dev/null +++ b/tests/expectations/parser/parser/import/many_import.leo.out @@ -0,0 +1,136 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Packages: + name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.( // local import\\\"}\"}" + accesses: + - Symbol: + symbol: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Point,\\\"}\"}" + alias: ~ + span: + line_start: 4 + line_stop: 4 + col_start: 5 + col_stop: 10 + path: test + content: " Point," + - Symbol: + symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" foo,\\\"}\"}" + alias: ~ + span: + line_start: 5 + line_stop: 5 + col_start: 5 + col_stop: 8 + path: test + content: " foo," + span: + line_start: 3 + line_stop: 5 + col_start: 8 + col_stop: 8 + path: test + content: "import test-import.( // local import\n...\n foo," + span: + line_start: 3 + line_stop: 5 + col_start: 8 + col_stop: 8 + path: test + content: "import test-import.( // local import\n...\n foo," + - package_or_packages: + Packages: + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.( // imports directory import\\\"}\"}" + accesses: + - Symbol: + symbol: "{\"name\":\"Bar\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" Bar,\\\"}\"}" + alias: ~ + span: + line_start: 9 + line_stop: 9 + col_start: 5 + col_stop: 8 + path: test + content: " Bar," + - Multiple: + name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" + accesses: + - Symbol: + symbol: "{\"name\":\"Baz\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" + alias: ~ + span: + line_start: 10 + line_stop: 10 + col_start: 10 + col_stop: 13 + path: test + content: " baz.(Baz, Bazzar)," + - Symbol: + symbol: "{\"name\":\"Bazzar\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" baz.(Baz, Bazzar),\\\"}\"}" + alias: ~ + span: + line_start: 10 + line_stop: 10 + col_start: 15 + col_stop: 21 + path: test + content: " baz.(Baz, Bazzar)," + span: + line_start: 10 + line_stop: 10 + col_start: 5 + col_stop: 21 + path: test + content: " baz.(Baz, Bazzar)," + - SubPackage: + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" + access: + SubPackage: + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"Bat\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" bat.bat.Bat,\\\"}\"}" + alias: ~ + span: + line_start: 11 + line_stop: 11 + col_start: 13 + col_stop: 16 + path: test + content: " bat.bat.Bat," + span: + line_start: 11 + line_stop: 11 + col_start: 9 + col_stop: 16 + path: test + content: " bat.bat.Bat," + span: + line_start: 11 + line_stop: 11 + col_start: 5 + col_stop: 16 + path: test + content: " bat.bat.Bat," + span: + line_start: 8 + line_stop: 11 + col_start: 8 + col_stop: 16 + path: test + content: "import bar.( // imports directory import\n...\n bat.bat.Bat," + span: + line_start: 8 + line_stop: 11 + col_start: 8 + col_stop: 16 + path: test + content: "import bar.( // imports directory import\n...\n bat.bat.Bat," + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/many_import_star.leo.out b/tests/expectations/parser/parser/import/many_import_star.leo.out new file mode 100644 index 0000000000..d1555ed1e0 --- /dev/null +++ b/tests/expectations/parser/parser/import/many_import_star.leo.out @@ -0,0 +1,170 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*; // local import\\\"}\"}" + access: + Star: + span: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: test + content: import test-import.*; // local import + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 21 + path: test + content: import test-import.*; // local import + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 21 + path: test + content: import test-import.*; // local import + - package_or_packages: + Package: + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.*; // imports directory import\\\"}\"}" + access: + Star: + span: + line_start: 5 + line_stop: 5 + col_start: 12 + col_stop: 13 + path: test + content: import bar.*; // imports directory import + span: + line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 13 + path: test + content: import bar.*; // imports directory import + span: + line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 13 + path: test + content: import bar.*; // imports directory import + - package_or_packages: + Package: + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" + access: + SubPackage: + name: "{\"name\":\"baz\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.baz.*; // imports directory import\\\"}\"}" + access: + Star: + span: + line_start: 6 + line_stop: 6 + col_start: 16 + col_stop: 17 + path: test + content: import bar.baz.*; // imports directory import + span: + line_start: 6 + line_stop: 6 + col_start: 12 + col_stop: 17 + path: test + content: import bar.baz.*; // imports directory import + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 17 + path: test + content: import bar.baz.*; // imports directory import + span: + line_start: 6 + line_stop: 6 + col_start: 8 + col_stop: 17 + path: test + content: import bar.baz.*; // imports directory import + - package_or_packages: + Package: + name: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" + access: + SubPackage: + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" + access: + SubPackage: + name: "{\"name\":\"bat\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import bar.bat.bat.*; // imports directory import\\\"}\"}" + access: + Star: + span: + line_start: 7 + line_stop: 7 + col_start: 20 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + span: + line_start: 7 + line_stop: 7 + col_start: 16 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + span: + line_start: 7 + line_stop: 7 + col_start: 12 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + span: + line_start: 7 + line_stop: 7 + col_start: 8 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + span: + line_start: 7 + line_stop: 7 + col_start: 8 + col_stop: 21 + path: test + content: import bar.bat.bat.*; // imports directory import + - package_or_packages: + Package: + name: "{\"name\":\"car\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import car.*; // imports directory import\\\"}\"}" + access: + Star: + span: + line_start: 8 + line_stop: 8 + col_start: 12 + col_stop: 13 + path: test + content: import car.*; // imports directory import + span: + line_start: 8 + line_stop: 8 + col_start: 8 + col_stop: 13 + path: test + content: import car.*; // imports directory import + span: + line_start: 8 + line_stop: 8 + col_start: 8 + col_stop: 13 + path: test + content: import car.*; // imports directory import + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/names.leo.out b/tests/expectations/parser/parser/import/names.leo.out new file mode 100644 index 0000000000..9bc9319577 --- /dev/null +++ b/tests/expectations/parser/parser/import/names.leo.out @@ -0,0 +1,94 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"a0-f\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a0-f.foo;\\\"}\"}" + alias: ~ + span: + line_start: 3 + line_stop: 3 + col_start: 13 + col_stop: 16 + path: test + content: import a0-f.foo; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 16 + path: test + content: import a0-f.foo; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 16 + path: test + content: import a0-f.foo; + - package_or_packages: + Package: + name: "{\"name\":\"a-9\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"bar\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":12,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import a-9.bar;\\\"}\"}" + alias: ~ + span: + line_start: 4 + line_stop: 4 + col_start: 12 + col_stop: 15 + path: test + content: import a-9.bar; + span: + line_start: 4 + line_stop: 4 + col_start: 8 + col_stop: 15 + path: test + content: import a-9.bar; + span: + line_start: 4 + line_stop: 4 + col_start: 8 + col_stop: 15 + path: test + content: import a-9.bar; + - package_or_packages: + Package: + name: "{\"name\":\"hello-world\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"hello\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":20,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello-world.hello;\\\"}\"}" + alias: ~ + span: + line_start: 5 + line_stop: 5 + col_start: 20 + col_stop: 25 + path: test + content: import hello-world.hello; + span: + line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 25 + path: test + content: import hello-world.hello; + span: + line_start: 5 + line_stop: 5 + col_start: 8 + col_stop: 25 + path: test + content: import hello-world.hello; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/names_underscore.leo.out b/tests/expectations/parser/parser/import/names_underscore.leo.out new file mode 100644 index 0000000000..952c5c0ac7 --- /dev/null +++ b/tests/expectations/parser/parser/import/names_underscore.leo.out @@ -0,0 +1,38 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"hello_world\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" + access: + Symbol: + symbol: "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import hello_world.foo;\\\"}\"}" + alias: ~ + span: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 23 + path: test + content: import hello_world.foo; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 23 + path: test + content: import hello_world.foo; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 23 + path: test + content: import hello_world.foo; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/import/star.leo.out b/tests/expectations/parser/parser/import/star.leo.out new file mode 100644 index 0000000000..f9e234a287 --- /dev/null +++ b/tests/expectations/parser/parser/import/star.leo.out @@ -0,0 +1,36 @@ +--- +namespace: Parse +expectation: Pass +outputs: + - name: "" + expected_input: [] + imports: + - package_or_packages: + Package: + name: "{\"name\":\"test-import\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import test-import.*;\\\"}\"}" + access: + Star: + span: + line_start: 3 + line_stop: 3 + col_start: 20 + col_stop: 21 + path: test + content: import test-import.*; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 21 + path: test + content: import test-import.*; + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 21 + path: test + content: import test-import.*; + circuits: {} + global_consts: {} + functions: {} diff --git a/tests/expectations/parser/parser/statement/assign.leo.out b/tests/expectations/parser/parser/statement/assign.leo.out new file mode 100644 index 0000000000..d992c636a2 --- /dev/null +++ b/tests/expectations/parser/parser/statement/assign.leo.out @@ -0,0 +1,411 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: x = expr; + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: x = expr; + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = ();\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: x = (); + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 7 + path: test + content: x = (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: x = (); + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: x = x+y; + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: x = x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x = x+y; + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: "x = (x,y);" + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 10 + path: test + content: "x = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x = (x,y);" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" + accesses: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 2 + path: test + content: x = x(); + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 8 + path: test + content: x = x(); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x = x(); + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[0] = y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "x[0] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 9 + path: test + content: "x[0] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" + accesses: + - ArrayIndex: + Value: + Integer: + - U32 + - "0" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 7 + path: test + content: "x[0u32] = y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[0u32] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[0u32] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" + accesses: + - Tuple: + - value: "0" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0 = y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x.0 = y; + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: x.0 = y; + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "1" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[1..2] = y;" + - Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "x[1..2] = y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 8 + path: test + content: "x[1..2] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: "x[1..2] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x[..2] = y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[..2] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x[..2] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" + accesses: + - ArrayRange: + - Value: + Implicit: + - "2" + - line_start: 1 + line_stop: 1 + col_start: 3 + col_stop: 4 + path: test + content: "x[2..] = y;" + - ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 7 + path: test + content: "x[2..] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x[2..] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" + accesses: + - ArrayRange: + - ~ + - ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "x[..] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "x[..] = y;" + - Assign: + operation: Assign + assignee: + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" + accesses: + - Tuple: + - value: "0" + - line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: "x.0[0][..] = y;" + - ArrayIndex: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "x.0[0][..] = y;" + - ArrayRange: + - ~ + - ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: "x.0[0][..] = y;" + value: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: "x.0[0][..] = y;" diff --git a/tests/expectations/parser/parser/statement/block.leo.out b/tests/expectations/parser/parser/statement/block.leo.out new file mode 100644 index 0000000000..6e40c82b0f --- /dev/null +++ b/tests/expectations/parser/parser/statement/block.leo.out @@ -0,0 +1,141 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: "{}" + - Block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "{\n...\n}" + - Block: + statements: + - Block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 2 + col_stop: 4 + path: test + content: "{{}}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: "{{}}" + - Block: + statements: + - Block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 4 + col_start: 1 + col_stop: 2 + path: test + content: "{\n...\n}" + span: + line_start: 1 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "{\n...\n}" + - Block: + statements: + - Conditional: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 4 + col_start: 6 + col_stop: 2 + path: test + content: "if x {\n...\n}" + next: ~ + span: + line_start: 2 + line_stop: 4 + col_start: 1 + col_stop: 2 + path: test + content: "if x {\n...\n}" + span: + line_start: 1 + line_stop: 5 + col_start: 1 + col_stop: 2 + path: test + content: "{\n...\n}" diff --git a/tests/expectations/parser/parser/statement/conditional.leo.out b/tests/expectations/parser/parser/statement/conditional.leo.out new file mode 100644 index 0000000000..337dcace01 --- /dev/null +++ b/tests/expectations/parser/parser/statement/conditional.leo.out @@ -0,0 +1,230 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Conditional: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 6 + col_stop: 2 + path: test + content: "if x {\n...\n}" + next: ~ + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "if x {\n...\n}" + - Conditional: + condition: + Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if Self {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 9 + col_stop: 2 + path: test + content: "if Self {\n...\n}" + next: ~ + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "if Self {\n...\n}" + - Conditional: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 8 + col_stop: 2 + path: test + content: "if (x) {\n...\n}" + next: ~ + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "if (x) {\n...\n}" + - Conditional: + condition: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if (x) {}\\\"}\"}" + block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 10 + path: test + content: "if (x) {}" + next: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "if (x) {}" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {}\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {}\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 7 + path: test + content: "if x+y {}" + block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 10 + path: test + content: "if x+y {}" + next: ~ + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: "if x+y {}" + - Conditional: + condition: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"if x+y {\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 4 + col_stop: 7 + path: test + content: "if x+y {" + block: + statements: + - Expression: + expression: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 5 + path: test + content: expr; + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 3 + line_stop: 3 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 3 + line_stop: 3 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 4 + col_start: 8 + col_stop: 2 + path: test + content: "if x+y {\n...\n}" + next: ~ + span: + line_start: 1 + line_stop: 4 + col_start: 1 + col_stop: 2 + path: test + content: "if x+y {\n...\n}\n" diff --git a/tests/expectations/parser/parser/statement/console.leo.out b/tests/expectations/parser/parser/statement/console.leo.out new file mode 100644 index 0000000000..2ebba05261 --- /dev/null +++ b/tests/expectations/parser/parser/statement/console.leo.out @@ -0,0 +1,207 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Console: + function: + Assert: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.assert(x);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: console.assert(x); + - Console: + function: + Error: + parts: + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 22 + path: test + content: "console.error(\"{}\", x);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: "console.error(\"{}\", x);" + - Console: + function: + Error: + parts: + - Container + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.error(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 27 + path: test + content: "console.error(\"{}{}\", x, y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 27 + path: test + content: "console.error(\"{}{}\", x, y);" + - Console: + function: + Error: + parts: + - Const: x + parameters: [] + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 18 + path: test + content: "console.error(\"x\");" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "console.error(\"x\");" + - Console: + function: + Debug: + parts: + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 22 + path: test + content: "console.debug(\"{}\", x);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: "console.debug(\"{}\", x);" + - Console: + function: + Debug: + parts: + - Container + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.debug(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 27 + path: test + content: "console.debug(\"{}{}\", x, y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 27 + path: test + content: "console.debug(\"{}{}\", x, y);" + - Console: + function: + Debug: + parts: + - Const: x + parameters: [] + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 18 + path: test + content: "console.debug(\"x\");" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "console.debug(\"x\");" + - Console: + function: + Log: + parts: + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}\\\\\\\", x);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 20 + path: test + content: "console.log(\"{}\", x);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 20 + path: test + content: "console.log(\"{}\", x);" + - Console: + function: + Log: + parts: + - Container + - Container + parameters: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"console.log(\\\\\\\"{}{}\\\\\\\", x, y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 25 + path: test + content: "console.log(\"{}{}\", x, y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 25 + path: test + content: "console.log(\"{}{}\", x, y);" + - Console: + function: + Log: + parts: + - Const: x + parameters: [] + span: + line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 16 + path: test + content: "console.log(\"x\");" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "console.log(\"x\");" diff --git a/tests/expectations/parser/parser/statement/definition.leo.out b/tests/expectations/parser/parser/statement/definition.leo.out new file mode 100644 index 0000000000..fa12ad7cea --- /dev/null +++ b/tests/expectations/parser/parser/statement/definition.leo.out @@ -0,0 +1,1473 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: let x = expr; + type_: ~ + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: let x = expr; + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: let x = (); + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 11 + path: test + content: let x = (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: let x = (); + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: let x = x+y; + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 12 + path: test + content: let x = x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: let x = x+y; + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x = (x,y);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 14 + path: test + content: "let x = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: "let x = (x,y);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: let x = x(); + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 12 + path: test + content: let x = x(); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: let x = x(); + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: const x = expr; + type_: ~ + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 15 + path: test + content: const x = expr; + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: const x = (); + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 13 + path: test + content: const x = (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: const x = (); + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: const x = x+y; + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 14 + path: test + content: const x = x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: const x = x+y; + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x = (x,y);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 16 + path: test + content: "const x = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "const x = (x,y);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: const x = x(); + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 14 + path: test + content: const x = x(); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: const x = x(); + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = expr;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "let x: u32 = expr;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = ();" + type_: + IntegerType: U32 + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 16 + path: test + content: "let x: u32 = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "let x: u32 = ();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = x+y;" + type_: + IntegerType: U32 + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 17 + path: test + content: "let x: u32 = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "let x: u32 = x+y;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = (x,y);" + type_: + IntegerType: U32 + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 19 + path: test + content: "let x: u32 = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "let x: u32 = (x,y);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 5 + col_stop: 6 + path: test + content: "let x: u32 = x();" + type_: + IntegerType: U32 + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let x: u32 = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 17 + path: test + content: "let x: u32 = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "let x: u32 = x();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = expr;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 20 + path: test + content: "const x: u32 = expr;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = ();" + type_: + IntegerType: U32 + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 18 + path: test + content: "const x: u32 = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "const x: u32 = ();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = x+y;" + type_: + IntegerType: U32 + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 19 + path: test + content: "const x: u32 = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "const x: u32 = x+y;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = (x,y);" + type_: + IntegerType: U32 + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 21 + path: test + content: "const x: u32 = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 21 + path: test + content: "const x: u32 = (x,y);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 7 + col_stop: 8 + path: test + content: "const x: u32 = x();" + type_: + IntegerType: U32 + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const x: u32 = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 19 + path: test + content: "const x: u32 = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "const x: u32 = x();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = expr;" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = expr;" + type_: ~ + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "let (x, y) = expr;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = ();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = ();" + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 16 + path: test + content: "let (x, y) = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "let (x, y) = ();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = x+y;" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = x+y;" + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 17 + path: test + content: "let (x, y) = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "let (x, y) = x+y;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = (x,y);" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = (x,y);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 19 + path: test + content: "let (x, y) = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "let (x, y) = (x,y);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y) = x();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y) = x();" + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y) = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 17 + path: test + content: "let (x, y) = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "let (x, y) = x();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = expr;" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = expr;" + type_: ~ + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 20 + path: test + content: "const (x, y) = expr;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = ();" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = ();" + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 18 + path: test + content: "const (x, y) = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 18 + path: test + content: "const (x, y) = ();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = x+y;" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = x+y;" + type_: ~ + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 19 + path: test + content: "const (x, y) = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "const (x, y) = x+y;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = (x,y);" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = (x,y);" + type_: ~ + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 21 + path: test + content: "const (x, y) = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 21 + path: test + content: "const (x, y) = (x,y);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y) = x();" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y) = x();" + type_: ~ + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y) = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 16 + col_stop: 19 + path: test + content: "const (x, y) = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 19 + path: test + content: "const (x, y) = x();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = expr;" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = expr;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 23 + path: test + content: "let (x, y): u32 = expr;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = ();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = ();" + type_: + IntegerType: U32 + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 21 + path: test + content: "let (x, y): u32 = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 21 + path: test + content: "let (x, y): u32 = ();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = x+y;" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = x+y;" + type_: + IntegerType: U32 + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 22 + path: test + content: "let (x, y): u32 = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: "let (x, y): u32 = x+y;" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = (x,y);" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = (x,y);" + type_: + IntegerType: U32 + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 24 + path: test + content: "let (x, y): u32 = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: "let (x, y): u32 = (x,y);" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x, y): u32 = x();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 9 + col_stop: 10 + path: test + content: "let (x, y): u32 = x();" + type_: + IntegerType: U32 + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x, y): u32 = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 19 + col_stop: 22 + path: test + content: "let (x, y): u32 = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 22 + path: test + content: "let (x, y): u32 = x();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = expr;" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = expr;" + type_: + IntegerType: U32 + value: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 25 + path: test + content: "const (x, y): u32 = expr;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = ();" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = ();" + type_: + IntegerType: U32 + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 23 + path: test + content: "const (x, y): u32 = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 23 + path: test + content: "const (x, y): u32 = ();" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = x+y;" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = x+y;" + type_: + IntegerType: U32 + value: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 24 + path: test + content: "const (x, y): u32 = x+y;" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: "const (x, y): u32 = x+y;" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = (x,y);" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = (x,y);" + type_: + IntegerType: U32 + value: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 26 + path: test + content: "const (x, y): u32 = (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 26 + path: test + content: "const (x, y): u32 = (x,y);" + - Definition: + declaration_type: Const + variable_names: + - mutable: false + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "const (x, y): u32 = x();" + - mutable: false + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 11 + col_stop: 12 + path: test + content: "const (x, y): u32 = x();" + type_: + IntegerType: U32 + value: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"const (x, y): u32 = x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 21 + col_stop: 24 + path: test + content: "const (x, y): u32 = x();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 24 + path: test + content: "const (x, y): u32 = x();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x,y,) = ();" + - mutable: true + identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 9 + path: test + content: "let (x,y,) = ();" + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 14 + col_stop: 16 + path: test + content: "let (x,y,) = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 16 + path: test + content: "let (x,y,) = ();" + - Definition: + declaration_type: Let + variable_names: + - mutable: true + identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"let (x,) = ();\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 6 + col_stop: 7 + path: test + content: "let (x,) = ();" + type_: ~ + value: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 12 + col_stop: 14 + path: test + content: "let (x,) = ();" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 14 + path: test + content: "let (x,) = ();" diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out new file mode 100644 index 0000000000..fcb8db8960 --- /dev/null +++ b/tests/expectations/parser/parser/statement/definition_fail.leo.out @@ -0,0 +1,27 @@ +--- +namespace: ParseStatement +expectation: Fail +outputs: + - " --> test:1:0\n |\n 1 | let mut x = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | let mut x: u32 = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:0\n |\n 1 | const mut x: u32 = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default." + - " --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^\n |\n = expected 'ident', got ','" + - " --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^\n |\n = expected 'ident', got ','" diff --git a/tests/expectations/parser/parser/statement/expression.leo.out b/tests/expectations/parser/parser/statement/expression.leo.out new file mode 100644 index 0000000000..f9542ff844 --- /dev/null +++ b/tests/expectations/parser/parser/statement/expression.leo.out @@ -0,0 +1,94 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Expression: + expression: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 5 + path: test + content: expr; + - Expression: + expression: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 3 + path: test + content: (); + - Expression: + expression: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x+y; + - Expression: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "(x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 6 + path: test + content: "(x,y);" + - Expression: + expression: + Call: + function: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"x();\\\"}\"}" + arguments: [] + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x(); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 4 + path: test + content: x(); diff --git a/tests/expectations/parser/parser/statement/iteration.leo.out b/tests/expectations/parser/parser/statement/iteration.leo.out new file mode 100644 index 0000000000..4fa2b3b899 --- /dev/null +++ b/tests/expectations/parser/parser/statement/iteration.leo.out @@ -0,0 +1,203 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Iteration: + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {}\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "for x in 0..7 {}" + stop: + Value: + Implicit: + - "7" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: "for x in 0..7 {}" + block: + statements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 15 + col_stop: 17 + path: test + content: "for x in 0..7 {}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 17 + path: test + content: "for x in 0..7 {}" + - Iteration: + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..7 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "for x in 0..7 {" + stop: + Value: + Implicit: + - "7" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 14 + path: test + content: "for x in 0..7 {" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 15 + col_stop: 2 + path: test + content: "for x in 0..7 {\n...\n}" + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "for x in 0..7 {\n...\n}" + - Iteration: + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..99u8 {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "for x in 0..99u8 {" + stop: + Value: + Integer: + - U8 + - "99" + - line_start: 1 + line_stop: 1 + col_start: 13 + col_stop: 17 + path: test + content: "for x in 0..99u8 {" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 18 + col_stop: 2 + path: test + content: "for x in 0..99u8 {\n...\n}" + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "for x in 0..99u8 {\n...\n}" + - Iteration: + variable: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" + start: + Value: + Implicit: + - "0" + - line_start: 1 + line_stop: 1 + col_start: 10 + col_stop: 11 + path: test + content: "for x in 0..Self {" + stop: + Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"for x in 0..Self {\\\"}\"}" + block: + statements: + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 2 + line_stop: 2 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 3 + col_start: 18 + col_stop: 2 + path: test + content: "for x in 0..Self {\n...\n}" + span: + line_start: 1 + line_stop: 3 + col_start: 1 + col_stop: 2 + path: test + content: "for x in 0..Self {\n...\n}" diff --git a/tests/expectations/parser/parser/statement/return.leo.out b/tests/expectations/parser/parser/statement/return.leo.out new file mode 100644 index 0000000000..938e0d0efe --- /dev/null +++ b/tests/expectations/parser/parser/statement/return.leo.out @@ -0,0 +1,110 @@ +--- +namespace: ParseStatement +expectation: Pass +outputs: + - Return: + expression: + Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return expr;\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 12 + path: test + content: return expr; + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: return (); + - Return: + expression: + TupleInit: + elements: [] + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 10 + path: test + content: return (); + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 10 + path: test + content: return (); + - Return: + expression: + Binary: + left: + Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" + right: + Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}" + op: Add + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 11 + path: test + content: return x+y; + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 11 + path: test + content: return x+y; + - Return: + expression: + TupleInit: + elements: + - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" + - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}" + span: + line_start: 1 + line_stop: 1 + col_start: 8 + col_stop: 13 + path: test + content: "return (x,y);" + span: + line_start: 1 + line_stop: 1 + col_start: 1 + col_stop: 13 + path: test + content: "return (x,y);" + - Return: + expression: + Value: + Implicit: + - "5" + - line_start: 2 + line_stop: 2 + col_start: 1 + col_stop: 2 + path: test + content: 5; + span: + line_start: 1 + line_stop: 2 + col_start: 1 + col_stop: 2 + path: test + content: "return\n5;" diff --git a/tests/expectations/parser/parser/statement/return_fail.leo.out b/tests/expectations/parser/parser/statement/return_fail.leo.out new file mode 100644 index 0000000000..9f5a9e7204 --- /dev/null +++ b/tests/expectations/parser/parser/statement/return_fail.leo.out @@ -0,0 +1,7 @@ +--- +namespace: ParseStatement +expectation: Fail +outputs: + - " --> test:1:1\n |\n 1 | return\n | ^^^^^^\n |\n = unexpected EOF" + - " --> test:1:8\n |\n 1 | return 5\n | ^\n |\n = unexpected EOF" + - " --> test:2:1\n |\n 2 | if x {}\n | ^^\n |\n = expected 'expression', got 'if'" From c11ca982682f4eade3821cfeb6202833720921a9 Mon Sep 17 00:00:00 2001 From: damirka Date: Fri, 14 May 2021 16:42:20 +0300 Subject: [PATCH 26/26] removed cwd arg from compiler tests --- compiler/tests/test.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/compiler/tests/test.rs b/compiler/tests/test.rs index 6241682548..c1bf38b02c 100644 --- a/compiler/tests/test.rs +++ b/compiler/tests/test.rs @@ -43,8 +43,8 @@ fn new_compiler(path: PathBuf) -> EdwardsTestCompiler { EdwardsTestCompiler::new(program_name, path, output_dir, make_test_context(), None) } -pub(crate) fn parse_program(program_string: &str, _cwd: PathBuf) -> Result { - let mut compiler = new_compiler("test/file".into()); +pub(crate) fn parse_program(program_string: &str) -> Result { + let mut compiler = new_compiler("compiler-test".into()); compiler.parse_program_from_string(program_string)?; @@ -75,17 +75,17 @@ impl Namespace for CompileNamespace { // ``` cwd: import ``` // When set, uses different working directory for current file. // If not, uses file path as current working directory. - let cwd = test - .config - .get("cwd") - .map(|val| { - let mut cwd = test.path.clone(); - cwd.pop(); - cwd.join(&val.as_str().unwrap()) - }) - .unwrap_or(test.path.clone()); + // let cwd = test + // .config + // .get("cwd") + // .map(|val| { + // let mut cwd = test.path.clone(); + // cwd.pop(); + // cwd.join(&val.as_str().unwrap()) + // }) + // .unwrap_or(test.path.clone()); - let parsed = parse_program(&test.content, cwd).map_err(|x| x.to_string())?; + let parsed = parse_program(&test.content).map_err(|x| x.to_string())?; // (name, content) let mut inputs = vec![];