From 90abd4c3268b04d80d9b8cd8cbad69779ecd6638 Mon Sep 17 00:00:00 2001 From: Toby Hutton Date: Mon, 20 Jun 2022 14:27:45 +0000 Subject: [PATCH] Config driven E2E testing. (#2003) Completely refactor E2E tests to be config driven. Rather than specifying which tests are to be run and how, we now can describe each test with a TOML file. --- Cargo.lock | 8 +- test/Cargo.toml | 2 +- test/src/e2e_vm_tests/mod.rs | 1032 ++++++----------- test/src/e2e_vm_tests/test_programs/README.md | 82 ++ .../abi_impl_purity_mismatch/test.toml | 1 + .../abi_method_signature_mismatch/test.toml | 1 + .../abi_pure_calls_impure/test.toml | 1 + .../abort_control_flow_bad/test.toml | 1 + .../should_fail/array_bad_index/test.toml | 1 + .../should_fail/array_oob/test.toml | 1 + .../should_fail/asm_missing_return/test.toml | 1 + .../asm_should_not_have_return/test.toml | 1 + .../test.toml | 1 + .../bad_generic_annotation/test.toml | 1 + .../bad_generic_var_annotation/test.toml | 1 + .../better_type_error_message/test.toml | 1 + .../chained_if_let_missing_branch/test.toml | 1 + .../contract_pure_calls_impure/test.toml | 1 + .../should_fail/cyclic_dependency/test.toml | 1 + .../dependency_parsing_error/test.toml | 1 + .../different_contract_caller_types/test.toml | 1 + .../should_fail/disallow_turbofish/test.toml | 1 + .../should_fail/disallowed_gm/test.toml | 1 + .../double_underscore_enum/test.toml | 1 + .../double_underscore_fn/test.toml | 1 + .../double_underscore_impl_self_fn/test.toml | 1 + .../double_underscore_struct/test.toml | 1 + .../double_underscore_trait_fn/test.toml | 1 + .../double_underscore_var/test.toml | 1 + .../should_fail/empty_impl/test.toml | 1 + .../enum_bad_type_inference/test.toml | 1 + .../enum_if_let_invalid_variable/test.toml | 1 + .../should_fail/excess_fn_arguments/test.toml | 1 + .../generic_shadows_generic/test.toml | 1 + .../generics_unhelpful_error/test.toml | 1 + .../impl_method_recursion/test.toml | 1 + .../impl_with_bad_generic/test.toml | 1 + .../test.toml | 1 + .../impure_read_calls_impure_write/test.toml | 1 + .../test.toml | 1 + .../infinite_dependencies/Forc.lock | 1 + .../infinite_dependencies/test.toml | 5 + .../insufficient_type_info/test.toml | 1 + .../item_used_without_import/test.toml | 1 + .../literal_too_large_for_type/test.toml | 1 + .../match_expressions_empty_arms/test.toml | 1 + .../test.toml | 1 + .../match_expressions_wrong_struct/test.toml | 1 + .../method_requires_mut_var/test.toml | 1 + .../missing_fn_arguments/test.toml | 1 + .../test.toml | 1 + .../missing_supertrait_impl/test.toml | 1 + .../should_fail/multiple_impl_abi/test.toml | 1 + .../should_fail/multiple_impl_fns/test.toml | 1 + .../should_fail/name_shadowing/test.toml | 1 + .../should_fail/nested_impure/test.toml | 1 + .../non_literal_const_decl/test.toml | 1 + .../predicate_calls_impure/test.toml | 1 + .../primitive_type_argument/test.toml | 1 + .../should_fail/pure_calls_impure/test.toml | 1 + .../should_fail/recursive_calls/test.toml | 1 + .../should_fail/recursive_enum/test.toml | 1 + .../should_fail/recursive_struct/test.toml | 1 + .../recursive_type_chain/test.toml | 1 + .../repeated_enum_variant/test.toml | 1 + .../repeated_storage_field/test.toml | 1 + .../repeated_struct_field/test.toml | 1 + .../should_fail/script_calls_impure/test.toml | 1 + .../should_fail/shadow_import/test.toml | 1 + .../should_fail/star_import_alias/test.toml | 1 + .../should_fail/storage_conflict/test.toml | 1 + .../should_fail/storage_in_library/test.toml | 1 + .../storage_in_predicate/test.toml | 1 + .../should_fail/storage_in_script/test.toml | 1 + .../storage_ops_in_library/test.toml | 1 + .../supertrait_does_not_exist/test.toml | 1 + .../should_fail/top_level_vars/test.toml | 1 + .../trait_impl_purity_mismatch/test.toml | 1 + .../trait_method_signature_mismatch/test.toml | 1 + .../trait_pure_calls_impure/test.toml | 1 + .../type_mismatch_error_message/test.toml | 1 + .../unify_identical_unknowns/test.toml | 1 + .../forc/dependency_package_field/test.toml | 3 + .../language/abort_control_flow/test.toml | 1 + .../abort_control_flow_good/test.toml | 3 + .../language/aliased_imports/test.toml | 3 + .../language/array_basics/test.toml | 3 + .../language/array_dynamic_oob/test.toml | 1 + .../language/array_generics/test.toml | 3 + .../language/asm_expr_basic/test.toml | 3 + .../language/asm_without_return/test.toml | 3 + .../language/b256_bad_jumps/test.toml | 3 + .../language/b256_bitwise_ops/test.toml | 3 + .../should_pass/language/b256_ops/test.toml | 3 + .../language/basic_func_decl/test.toml | 3 + .../language/basic_predicate/test.toml | 2 + .../binary_and_hex_literals/test.toml | 1 + .../language/bool_and_or/test.toml | 3 + .../builtin_type_method_call/test.toml | 3 + .../language/chained_if_let/test.toml | 3 + .../should_pass/language/const_decl/test.toml | 3 + .../language/const_decl_in_library/test.toml | 3 + .../language/const_inits/test.toml | 3 + .../contract_caller_as_type/test.toml | 3 + .../language/dependencies/test.toml | 3 + .../language/doc_strings/test.toml | 1 + .../empty_method_initializer/test.toml | 3 + .../language/enum_destructuring/test.toml | 3 + .../language/enum_if_let/test.toml | 3 + .../language/enum_if_let_large_type/test.toml | 3 + .../language/enum_in_fn_decl/test.toml | 3 + .../language/enum_init_fn_call/test.toml | 3 + .../language/enum_padding/test.toml | 3 + .../language/enum_type_inference/test.toml | 3 + .../should_pass/language/eq_and_neq/test.toml | 3 + .../language/fix_opcode_bug/test.toml | 3 + .../funcs_with_generic_types/test.toml | 3 + .../language/generic-type-inference/test.toml | 3 + .../language/generic_enum/test.toml | 3 + .../language/generic_functions/test.toml | 3 + .../language/generic_impl_self/test.toml | 3 + .../language/generic_inside_generic/test.toml | 3 + .../language/generic_struct/test.toml | 3 + .../language/generic_structs/test.toml | 3 + .../language/if_elseif_enum/test.toml | 3 + .../language/if_implicit_unit/test.toml | 3 + .../language/implicit_return/test.toml | 3 + .../import_method_from_other_file/test.toml | 3 + .../language/import_trailing_comma/test.toml | 3 + .../should_pass/language/impure_ifs/test.toml | 3 + .../language/inline_if_expr_const/test.toml | 3 + .../should_pass/language/is_prime/test.toml | 3 + .../language/is_reference_type/test.toml | 3 + .../language/local_impl_for_ord/test.toml | 3 + .../language/main_returns_unit/test.toml | 3 + .../language/many_stack_variables/test.toml | 3 + .../language/match_expressions/test.toml | 3 + .../match_expressions_enums/test.toml | 3 + .../test.toml | 3 + .../match_expressions_mismatched/test.toml | 3 + .../match_expressions_nested/test.toml | 3 + .../match_expressions_simple/test.toml | 3 + .../match_expressions_structs/test.toml | 3 + .../match_expressions_with_self/test.toml | 3 + .../language/method_on_empty_struct/test.toml | 3 + .../missing_type_parameters/test.toml | 1 + .../language/modulo_uint_test/test.toml | 3 + .../language/multi_impl_self/test.toml | 3 + .../language/multi_item_import/test.toml | 3 + .../language/nested_structs/test.toml | 3 + .../language/nested_while_and_if/test.toml | 3 + .../language/new_allocator_test/test.toml | 3 + .../language/non_literal_const_decl/test.toml | 3 + .../language/numeric_constants/test.toml | 3 + .../language/op_precedence/test.toml | 3 + .../language/out_of_order_decl/test.toml | 3 + .../primitive_type_argument/test.toml | 3 + .../language/reassignment_operators/test.toml | 3 + .../language/ret_small_string/test.toml | 3 + .../language/ret_string_in_struct/test.toml | 3 + .../should_pass/language/retd_b256/test.toml | 3 + .../language/retd_small_array/test.toml | 3 + .../language/retd_struct/test.toml | 3 + .../language/retd_zero_len_array/test.toml | 3 + .../language/self_impl_reassignment/test.toml | 3 + .../should_pass/language/size_of/test.toml | 3 + .../language/storage_declaration/test.toml | 1 + .../language/struct_field_access/test.toml | 3 + .../struct_field_reassignment/test.toml | 3 + .../language/supertraits/test.toml | 3 + .../language/trait_import_with_star/test.toml | 3 + .../language/trait_override_bug/test.toml | 3 + .../language/tuple_access/test.toml | 3 + .../language/tuple_desugaring/test.toml | 3 + .../tuple_field_reassignment/test.toml | 3 + .../language/tuple_in_struct/test.toml | 3 + .../language/tuple_indexing/test.toml | 3 + .../language/tuple_single_element/test.toml | 3 + .../language/tuple_types/test.toml | 3 + .../should_pass/language/u64_ops/test.toml | 3 + .../language/unary_not_basic/test.toml | 3 + .../language/unary_not_basic_2/test.toml | 3 + .../language/unit_type_variants/test.toml | 3 + .../language/use_full_path_names/test.toml | 3 + .../language/valid_impurity/test.toml | 2 + .../language/while_loops/test.toml | 3 + .../should_pass/language/xos_opcode/test.toml | 1 + .../language/zero_field_types/test.toml | 3 + .../array_of_structs_caller/test.toml | 3 + .../bal_opcode/test.toml | 3 + .../call_abi_with_tuples/test.toml | 3 + .../call_basic_storage/test.toml | 3 + .../call_increment_contract/test.toml | 3 + .../caller_auth_test/test.toml | 3 + .../caller_context_test/test.toml | 3 + .../get_storage_key_caller/test.toml | 3 + .../nested_struct_args_caller/test.toml | 1 + .../storage_access_caller/test.toml | 3 + .../token_ops_test/test.toml | 3 + .../should_pass/stdlib/address_test/test.toml | 3 + .../should_pass/stdlib/alloc/test.toml | 3 + .../should_pass/stdlib/assert_test/test.toml | 3 + .../stdlib/b512_struct_alignment/test.toml | 3 + .../should_pass/stdlib/b512_test/test.toml | 3 + .../should_pass/stdlib/block_height/test.toml | 3 + .../stdlib/contract_id_test/Forc.lock | 9 +- .../stdlib/contract_id_test/test.toml | 1 + .../stdlib/contract_id_type/test.toml | 3 + .../stdlib/ec_recover_test/test.toml | 3 + .../should_pass/stdlib/evm_ecr/test.toml | 3 + .../stdlib/exponentiation_test/test.toml | 3 + .../should_pass/stdlib/ge_test/test.toml | 3 + .../should_pass/stdlib/identity_eq/test.toml | 3 + .../should_pass/stdlib/intrinsics/test.toml | 3 + .../should_pass/stdlib/mem/test.toml | 3 + .../should_pass/stdlib/option/test.toml | 3 + .../should_pass/stdlib/require/test.toml | 3 + .../should_pass/stdlib/result/test.toml | 3 + .../stdlib/u128_div_test/test.toml | 3 + .../stdlib/u128_mul_test/test.toml | 3 + .../should_pass/stdlib/u128_test/test.toml | 3 + .../should_pass/stdlib/vec/test.toml | 3 + .../abi_with_tuples_contract/test.toml | 2 + .../array_of_structs_contract/test.toml | 2 + .../auth_testing_contract/test.toml | 2 + .../balance_test_contract/test.toml | 2 + .../test_contracts/basic_storage/test.toml | 2 + .../context_testing_contract/test.toml | 2 + .../get_storage_key_contract/test.toml | 2 + .../increment_contract/test.toml | 2 + .../test_contracts/issue_1512_repro/test.toml | 2 + .../test_contracts/multiple_impl/test.toml | 2 + .../nested_struct_args_contract/test.toml | 2 + .../storage_access_contract/test.toml | 2 + .../test_fuel_coin_contract/test.toml | 2 + 235 files changed, 919 insertions(+), 719 deletions(-) create mode 100644 test/src/e2e_vm_tests/test_programs/README.md create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/abi_impl_purity_mismatch/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/abi_method_signature_mismatch/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/abi_pure_calls_impure/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/abort_control_flow_bad/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/array_bad_index/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/array_oob/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/asm_missing_return/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/asm_should_not_have_return/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/assign_to_field_of_non_mutable_struct/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/bad_generic_annotation/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/bad_generic_var_annotation/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/better_type_error_message/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/chained_if_let_missing_branch/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/contract_pure_calls_impure/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/cyclic_dependency/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/dependency_parsing_error/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/different_contract_caller_types/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/disallow_turbofish/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_enum/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_fn/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_impl_self_fn/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_struct/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_trait_fn/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_var/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/empty_impl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/enum_bad_type_inference/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/enum_if_let_invalid_variable/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/excess_fn_arguments/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/generic_shadows_generic/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/generics_unhelpful_error/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/impl_method_recursion/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/impl_with_bad_generic/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/impure_abi_read_calls_impure_write/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/impure_read_calls_impure_write/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/impure_trait_read_calls_impure_write/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/infinite_dependencies/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/item_used_without_import/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/literal_too_large_for_type/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_empty_arms/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_non_exhaustive/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_wrong_struct/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/method_requires_mut_var/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/missing_fn_arguments/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/missing_func_from_supertrait_impl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/missing_supertrait_impl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_abi/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/name_shadowing/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/nested_impure/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/non_literal_const_decl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/predicate_calls_impure/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/primitive_type_argument/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/pure_calls_impure/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/recursive_calls/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/recursive_enum/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/recursive_struct/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/recursive_type_chain/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/repeated_enum_variant/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/repeated_storage_field/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/repeated_struct_field/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/script_calls_impure/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/shadow_import/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/star_import_alias/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/storage_conflict/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/storage_in_library/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/storage_in_predicate/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/storage_ops_in_library/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/supertrait_does_not_exist/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/top_level_vars/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/trait_impl_purity_mismatch/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/trait_method_signature_mismatch/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/trait_pure_calls_impure/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/type_mismatch_error_message/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_fail/unify_identical_unknowns/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow_good/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/array_dynamic_oob/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bitwise_ops/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/basic_predicate/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/binary_and_hex_literals/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/builtin_type_method_call/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/const_inits/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_type/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/doc_strings/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/enum_padding/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/generic-type-inference/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/generic_inside_generic/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/implicit_return/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/import_trailing_comma/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/impure_ifs/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/is_reference_type/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/many_stack_variables/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_enums/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_inside_generic_functions/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_mismatched/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_nested/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_simple/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_with_self/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/missing_type_parameters/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/multi_impl_self/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/non_literal_const_decl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/numeric_constants/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/primitive_type_argument/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/reassignment_operators/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/ret_small_string/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/self_impl_reassignment/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/storage_declaration/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_field_reassignment/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_single_element/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/u64_ops/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/unit_type_variants/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/valid_impurity/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/xos_opcode/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/get_storage_key_caller/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/token_ops_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/alloc/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_type/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/evm_ecr/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/exponentiation_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/identity_eq/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/intrinsics/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/mem/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/require/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/result/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_div_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_mul_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_test/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/stdlib/vec/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_tuples_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/array_of_structs_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/auth_testing_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/basic_storage/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/context_testing_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/get_storage_key_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/increment_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/issue_1512_repro/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/multiple_impl/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/nested_struct_args_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/storage_access_contract/test.toml create mode 100644 test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/test_fuel_coin_contract/test.toml diff --git a/Cargo.lock b/Cargo.lock index 51fee55b62f..52bd501b1aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,12 +118,6 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - [[package]] name = "async-channel" version = "1.6.1" @@ -3773,7 +3767,6 @@ name = "test" version = "0.0.0" dependencies = [ "anyhow", - "assert_matches", "forc", "forc-util", "fuel-asm", @@ -3783,6 +3776,7 @@ dependencies = [ "regex", "serde_json", "tokio", + "toml", "tracing", ] diff --git a/test/Cargo.toml b/test/Cargo.toml index 190d3e68921..4540e2d5415 100644 --- a/test/Cargo.toml +++ b/test/Cargo.toml @@ -7,7 +7,6 @@ publish = false [dependencies] anyhow = "1.0.41" -assert_matches = "1.5.0" forc = { path = "../forc", features = ["test"], default-features = false } forc-util = { path = "../forc-util" } fuel-asm = "0.5" @@ -17,4 +16,5 @@ rand = "0.8" regex = "1" serde_json = "1.0.73" tokio = "1.12" +toml = "0.5" tracing = "0.1" diff --git a/test/src/e2e_vm_tests/mod.rs b/test/src/e2e_vm_tests/mod.rs index 5a11c913e72..ee8a03a4dfc 100644 --- a/test/src/e2e_vm_tests/mod.rs +++ b/test/src/e2e_vm_tests/mod.rs @@ -1,731 +1,349 @@ +// Please take a look in test_programs/README.md for details on how these tests work. + mod harness; -use assert_matches::assert_matches; + use forc_util::init_tracing_subscriber; use fuel_vm::prelude::*; + +use std::{ + collections::HashMap, + path::{Path, PathBuf}, +}; + +#[derive(Debug)] +enum TestCategory { + Compiles, + FailsToCompile, + Runs, + RunsWithContract, + Disabled, +} + +#[derive(Debug)] +enum TestResult { + Result(Word), + Return(u64), + ReturnData(Bytes32), + Revert(u64), +} + +#[derive(Debug)] +struct TestDescription { + name: String, + category: TestCategory, + expected_result: Option, + contract_paths: Vec, + validate_abi: bool, +} + pub fn run(locked: bool, filter_regex: Option) { init_tracing_subscriber(); - let filter = |name| { - filter_regex + + let configured_tests = discover_test_configs().unwrap_or_else(|e| { + panic!("Discovering tests {e}"); + }); + + let total_number_of_tests = configured_tests.len(); + let mut number_of_tests_executed = 0; + let mut number_of_disabled_tests = 0; + + let mut deployed_contracts = HashMap::::new(); + + for TestDescription { + name, + category, + expected_result, + contract_paths, + validate_abi, + } in configured_tests + { + if !filter_regex .as_ref() - .map(|regex| regex.is_match(name)) + .map(|regex| regex.is_match(&name)) .unwrap_or(true) - }; + { + continue; + } - // Predicate programs that should successfully compile and terminate - // with some known state. Note that if you are adding a non-predicate, it may pass by mistake. - // Please add non-predicates to `positive_project_names_with_abi`. - let positive_project_names_no_abi = vec![( - "should_pass/language/basic_predicate", - ProgramState::Return(1), - )]; - - let mut number_of_tests_run = - positive_project_names_no_abi - .iter() - .fold(0, |acc, (name, res)| { - if filter(name) { - assert_eq!(crate::e2e_vm_tests::harness::runs_in_vm(name, locked), *res); - acc + 1 - } else { - acc + match category { + TestCategory::Runs => { + let res = match expected_result { + Some(TestResult::Return(v)) => ProgramState::Return(v), + Some(TestResult::ReturnData(bytes)) => ProgramState::ReturnData(bytes), + Some(TestResult::Revert(v)) => ProgramState::Revert(v), + + _ => panic!( + "For {name}:\n\ + Invalid expected result for a 'runs' test: {expected_result:?}." + ), + }; + + assert_eq!(crate::e2e_vm_tests::harness::runs_in_vm(&name, locked), res); + if validate_abi { + assert!(crate::e2e_vm_tests::harness::test_json_abi(&name).is_ok()); } - }); - - // Programs that should successfully compile, include abi and terminate - // with some known state. Note that if a predicate is included - // it will be rejected during assertion. Please move it to - // `positive_project_names_no_abi` above. - let positive_project_names_with_abi = vec![ - ( - "should_pass/forc/dependency_package_field", - ProgramState::Return(0), - ), - ( - "should_pass/language/asm_expr_basic", - ProgramState::Return(6), - ), - ( - "should_pass/language/basic_func_decl", - ProgramState::Return(1), // 1 == true - ), - ( - "should_pass/language/builtin_type_method_call", - ProgramState::Return(3), - ), - ("should_pass/language/dependencies", ProgramState::Return(0)), // 0 == false - ( - "should_pass/language/if_elseif_enum", - ProgramState::Return(10), - ), - ( - "should_pass/language/tuple_types", - ProgramState::Return(123), - ), - ( - "should_pass/language/out_of_order_decl", - ProgramState::Return(1), - ), - ( - "should_pass/language/struct_field_reassignment", - ProgramState::Return(0), - ), - ( - "should_pass/language/tuple_field_reassignment", - ProgramState::Return(320), - ), - ( - "should_pass/language/enum_in_fn_decl", - ProgramState::Return(255), - ), - ( - "should_pass/language/main_returns_unit", - ProgramState::Return(0), - ), - ( - "should_pass/language/unary_not_basic", - ProgramState::Return(1), // 1 == true - ), - ( - "should_pass/language/unary_not_basic_2", - ProgramState::Return(1), // 1 == true - ), - ( - "should_pass/language/fix_opcode_bug", - ProgramState::Return(30), - ), - ( - "should_pass/language/retd_b256", - ProgramState::ReturnData(Bytes32::from([ - 102, 104, 122, 173, 248, 98, 189, 119, 108, 143, 193, 139, 142, 159, 142, 32, 8, - 151, 20, 133, 110, 226, 51, 179, 144, 42, 89, 29, 13, 95, 41, 37, - ])), - ), - ( - "should_pass/language/retd_struct", - ProgramState::ReturnData(Bytes32::from([ - 251, 57, 24, 241, 63, 94, 17, 102, 252, 182, 8, 110, 140, 105, 102, 105, 138, 202, - 155, 39, 97, 32, 94, 129, 141, 144, 190, 142, 33, 32, 33, 75, - ])), - ), - ( - "should_pass/language/op_precedence", - ProgramState::Return(0), - ), - ( - "should_pass/language/asm_without_return", - ProgramState::Return(0), - ), - ( - "should_pass/language/b256_bad_jumps", - ProgramState::Return(1), - ), - ( - "should_pass/language/b256_bitwise_ops", - ProgramState::Return(1), - ), - ("should_pass/language/b256_ops", ProgramState::Return(100)), - ( - "should_pass/language/struct_field_access", - ProgramState::Return(43), - ), - ("should_pass/language/bool_and_or", ProgramState::Return(42)), - ("should_pass/language/eq_and_neq", ProgramState::Return(1)), - ( - "should_pass/language/local_impl_for_ord", - ProgramState::Return(1), // true - ), - ("should_pass/language/const_decl", ProgramState::Return(100)), - ( - "should_pass/language/const_decl_in_library", - ProgramState::Return(1), // true - ), - ( - "should_pass/language/aliased_imports", - ProgramState::Return(42), - ), - ( - "should_pass/language/empty_method_initializer", - ProgramState::Return(1), // true - ), - ( - "should_pass/stdlib/b512_struct_alignment", - ProgramState::Return(1), // true - ), - ( - "should_pass/stdlib/contract_id_type", - ProgramState::Return(1), - ), // true - ("should_pass/stdlib/evm_ecr", ProgramState::Return(1)), // true - ( - "should_pass/stdlib/exponentiation_test", - ProgramState::Return(1), - ), // true - ("should_pass/stdlib/ge_test", ProgramState::Return(1)), // true - ("should_pass/stdlib/identity_eq", ProgramState::Return(1)), // true - ("should_pass/stdlib/intrinsics", ProgramState::Return(1)), // true - ("should_pass/stdlib/option", ProgramState::Return(1)), // true - ("should_pass/stdlib/require", ProgramState::Return(1)), // true - ("should_pass/stdlib/result", ProgramState::Return(1)), // true - ("should_pass/stdlib/u128_test", ProgramState::Return(1)), // true - ("should_pass/stdlib/u128_div_test", ProgramState::Return(1)), // true - ("should_pass/stdlib/u128_mul_test", ProgramState::Return(1)), // true - ("should_pass/stdlib/alloc", ProgramState::Return(1)), // true - ("should_pass/stdlib/mem", ProgramState::Return(1)), // true - ( - "should_pass/language/generic_structs", - ProgramState::Return(1), // true - ), - ( - "should_pass/language/generic_functions", - ProgramState::Return(1), // true - ), - ("should_pass/language/generic_enum", ProgramState::Return(1)), // true - ( - "should_pass/language/numeric_constants", - ProgramState::Return(1), - ), // true - ("should_pass/language/u64_ops", ProgramState::Return(1)), // true - ( - "should_pass/language/import_method_from_other_file", - ProgramState::Return(10), // true - ), - ( - "should_pass/stdlib/ec_recover_test", - ProgramState::Return(1), // true - ), - ("should_pass/stdlib/address_test", ProgramState::Return(1)), // true - ( - "should_pass/language/generic_struct", - ProgramState::Return(1), // true - ), - ( - "should_pass/language/zero_field_types", - ProgramState::Return(10), // true - ), - ("should_pass/stdlib/assert_test", ProgramState::Return(1)), // true - ( - "should_pass/language/match_expressions", - ProgramState::Return(42), - ), - ("should_pass/language/array_basics", ProgramState::Return(1)), // true - // Disabled, pending decision on runtime OOB checks. ("array_dynamic_oob", ProgramState::Revert(1)), - ( - "should_pass/language/abort_control_flow_good", - ProgramState::Revert(42), - ), - ( - "should_pass/language/array_generics", - ProgramState::Return(1), // true - ), - ( - "should_pass/language/match_expressions_structs", - ProgramState::Return(4), - ), - ("should_pass/stdlib/b512_test", ProgramState::Return(1)), // true - ("should_pass/stdlib/block_height", ProgramState::Return(1)), // true - ("should_pass/stdlib/vec", ProgramState::Return(1)), // true - ( - "should_pass/language/trait_override_bug", - ProgramState::Return(7), - ), - ( - "should_pass/language/if_implicit_unit", - ProgramState::Return(0), - ), - ( - "should_pass/language/modulo_uint_test", - ProgramState::Return(1), // true - ), - ( - "should_pass/language/trait_import_with_star", - ProgramState::Return(0), - ), - ( - "should_pass/language/tuple_desugaring", - ProgramState::Return(9), - ), - ( - "should_pass/language/multi_item_import", - ProgramState::Return(0), // false - ), - ( - "should_pass/language/use_full_path_names", - ProgramState::Return(1), - ), - ( - "should_pass/language/tuple_indexing", - ProgramState::Return(1), - ), - ( - "should_pass/language/tuple_access", - ProgramState::Return(42), - ), - ( - "should_pass/language/funcs_with_generic_types", - ProgramState::Return(1), // true - ), - ( - "should_pass/language/enum_if_let", - ProgramState::Return(143), - ), - ( - "should_pass/language/enum_destructuring", - ProgramState::Return(15), - ), - ( - "should_pass/language/enum_if_let_large_type", - ProgramState::Return(15), - ), - ( - "should_pass/language/enum_type_inference", - ProgramState::Return(5), - ), - ("should_pass/language/size_of", ProgramState::Return(1)), - ("should_pass/language/supertraits", ProgramState::Return(1)), - ( - "should_pass/language/new_allocator_test", - ProgramState::Return(42), // true - ), - ( - "should_pass/language/chained_if_let", - ProgramState::Return(5), // true - ), - ( - "should_pass/language/inline_if_expr_const", - ProgramState::Return(0), - ), - ( - "should_pass/language/method_on_empty_struct", - ProgramState::Return(1), - ), - ( - "should_pass/language/tuple_in_struct", - ProgramState::Return(1), - ), - ( - "should_pass/language/nested_structs", - ProgramState::Return(1), - ), - ("should_pass/language/while_loops", ProgramState::Return(1)), - ( - "should_pass/language/retd_small_array", - ProgramState::ReturnData(Bytes32::from([ - 0xcd, 0x26, 0x62, 0x15, 0x4e, 0x6d, 0x76, 0xb2, 0xb2, 0xb9, 0x2e, 0x70, 0xc0, 0xca, - 0xc3, 0xcc, 0xf5, 0x34, 0xf9, 0xb7, 0x4e, 0xb5, 0xb8, 0x98, 0x19, 0xec, 0x50, 0x90, - 0x83, 0xd0, 0x0a, 0x50, - ])), - ), - ( - "should_pass/language/retd_zero_len_array", - ProgramState::ReturnData(Bytes32::from([ - 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, - 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, - 0x78, 0x52, 0xb8, 0x55, - ])), - ), - ("should_pass/language/is_prime", ProgramState::Return(1)), - ( - "should_pass/language/generic_impl_self", - ProgramState::Return(10), - ), - ( - "should_pass/language/enum_init_fn_call", - ProgramState::Return(1), - ), - ( - "should_pass/language/nested_while_and_if", - ProgramState::Return(1), - ), - ( - "should_pass/language/is_reference_type", - ProgramState::Return(1), - ), - ( - "should_pass/language/contract_caller_as_type", - ProgramState::Return(42), - ), - ( - "should_pass/language/non_literal_const_decl", - ProgramState::Return(42), - ), - ( - "should_pass/language/self_impl_reassignment", - ProgramState::Return(1), - ), - ( - "should_pass/language/import_trailing_comma", - ProgramState::Return(0), - ), - ( - "should_pass/language/primitive_type_argument", - ProgramState::Return(5), - ), - ( - "should_pass/language/generic-type-inference", - ProgramState::Return(0), - ), - ( - "should_pass/language/ret_small_string", - ProgramState::ReturnData(Bytes32::from([ - 0x6a, 0x4e, 0x01, 0xe9, 0x40, 0xab, 0xc0, 0x04, 0x30, 0xfe, 0x21, 0x62, 0xed, 0x69, - 0xc0, 0xe2, 0x31, 0x04, 0xf9, 0xfd, 0xa7, 0x81, 0x59, 0x09, 0x2f, 0xea, 0x8f, 0x7e, - 0xcb, 0x7f, 0x6d, 0xd4, - ])), - ), - ( - "should_pass/language/many_stack_variables", - ProgramState::Return(10), - ), - ( - "should_pass/language/ret_string_in_struct", - ProgramState::ReturnData(Bytes32::from([ - 0xaa, 0x5e, 0xfc, 0xa8, 0xda, 0xaf, 0x6e, 0xe6, 0x3f, 0x44, 0x93, 0xb2, 0x88, 0xb3, - 0x85, 0xd7, 0x60, 0xb8, 0xef, 0x93, 0xdc, 0x70, 0xe0, 0xfb, 0xc3, 0x06, 0xed, 0x9b, - 0x67, 0x6e, 0x5f, 0x13, - ])), - ), - ( - "should_pass/language/match_expressions_simple", - ProgramState::Return(42), - ), - ( - "should_pass/language/multi_impl_self", - ProgramState::Return(42), - ), - ( - "should_pass/language/implicit_return", - ProgramState::Return(42), - ), - ( - "should_pass/language/match_expressions_enums", - ProgramState::Return(42), - ), - ( - "should_pass/language/match_expressions_nested", - ProgramState::Return(123), - ), - ( - "should_pass/language/match_expressions_mismatched", - ProgramState::Return(5), - ), - ( - "should_pass/language/match_expressions_inside_generic_functions", - ProgramState::Return(1), - ), - ( - "should_pass/language/generic_inside_generic", - ProgramState::Return(7), - ), - ( - "should_pass/language/tuple_single_element", - ProgramState::Return(1), - ), - ( - "should_pass/language/reassignment_operators", - ProgramState::Return(1), - ), - ( - "should_pass/language/valid_impurity", - ProgramState::Revert(0), // false - ), - ("should_pass/language/const_inits", ProgramState::Return(1)), - ("should_pass/language/impure_ifs", ProgramState::Return(2)), - ( - "should_pass/language/enum_padding", - ProgramState::ReturnData(Bytes32::from([ - 0xce, 0x55, 0xff, 0x05, 0x11, 0x3a, 0x24, 0x2e, 0xc7, 0x9a, 0x23, 0x75, 0x0c, 0x7e, - 0x2b, 0xab, 0xaf, 0x98, 0xa8, 0xdc, 0x41, 0x66, 0x90, 0xc8, 0x57, 0xdd, 0x31, 0x72, - 0x0c, 0x74, 0x82, 0xb6, - ])), - ), - ( - "should_pass/language/unit_type_variants", - ProgramState::ReturnData(Bytes32::from([ - 0xcd, 0x04, 0xa4, 0x75, 0x44, 0x98, 0xe0, 0x6d, 0xb5, 0xa1, 0x3c, 0x5f, 0x37, 0x1f, - 0x1f, 0x04, 0xff, 0x6d, 0x24, 0x70, 0xf2, 0x4a, 0xa9, 0xbd, 0x88, 0x65, 0x40, 0xe5, - 0xdc, 0xe7, 0x7f, 0x70, - ])), // "ReturnData":{"data":"0000000000000002", .. } - ), - ( - "should_pass/language/match_expressions_with_self", - ProgramState::Return(1), - ), - ( - "should_pass/test_contracts/auth_testing_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/balance_test_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/basic_storage", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/context_testing_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/increment_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/storage_access_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/test_fuel_coin_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/nested_struct_args_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/issue_1512_repro", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/array_of_structs_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/abi_with_tuples_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/get_storage_key_contract", - ProgramState::Revert(0), - ), - ( - "should_pass/test_contracts/multiple_impl", - ProgramState::Revert(0), - ), - ]; - - number_of_tests_run += positive_project_names_with_abi - .iter() - .fold(0, |acc, (name, res)| { - if filter(name) { - assert_eq!(crate::e2e_vm_tests::harness::runs_in_vm(name, locked), *res); - assert_matches!(crate::e2e_vm_tests::harness::test_json_abi(name), Ok(_)); - acc + 1 - } else { - acc + number_of_tests_executed += 1; } - }); - - // source code that should _not_ compile - let negative_project_names = vec![ - "should_fail/cyclic_dependency/dependency_a", - "should_fail/recursive_calls", - "should_fail/asm_missing_return", - "should_fail/asm_should_not_have_return", - "should_fail/missing_fn_arguments", - "should_fail/excess_fn_arguments", - // the feature for the below test, detecting inf deps, was reverted - // when that is re-implemented we should reenable this test - //"should_fail/infinite_dependencies", - "should_fail/top_level_vars", - "should_fail/dependency_parsing_error", - "should_fail/disallowed_gm", - "should_fail/bad_generic_annotation", - "should_fail/bad_generic_var_annotation", - "should_fail/unify_identical_unknowns", - "should_fail/array_oob", - "should_fail/array_bad_index", - "should_fail/name_shadowing", - "should_fail/match_expressions_wrong_struct", - "should_fail/match_expressions_enums", - "should_fail/pure_calls_impure", - "should_fail/nested_impure", - "should_fail/predicate_calls_impure", - "should_fail/script_calls_impure", - "should_fail/contract_pure_calls_impure", - "should_fail/literal_too_large_for_type", - "should_fail/star_import_alias", - "should_fail/item_used_without_import", - "should_fail/shadow_import", - "should_fail/missing_supertrait_impl", - "should_fail/enum_if_let_invalid_variable", - "should_fail/enum_bad_type_inference", - "should_fail/missing_func_from_supertrait_impl", - "should_fail/supertrait_does_not_exist", - "should_fail/chained_if_let_missing_branch", - "should_fail/abort_control_flow_bad", - "should_fail/match_expressions_non_exhaustive", - "should_fail/empty_impl", - "should_fail/disallow_turbofish", - "should_fail/generics_unhelpful_error", - "should_fail/generic_shadows_generic", - "should_fail/different_contract_caller_types", - "should_fail/insufficient_type_info", - "should_fail/primitive_type_argument", - "should_fail/double_underscore_fn", - "should_fail/double_underscore_trait_fn", - "should_fail/double_underscore_impl_self_fn", - "should_fail/double_underscore_var", - "should_fail/double_underscore_struct", - "should_fail/double_underscore_enum", - "should_fail/assign_to_field_of_non_mutable_struct", - "should_fail/abi_method_signature_mismatch", - "should_fail/trait_method_signature_mismatch", - "should_fail/impure_read_calls_impure_write", - "should_fail/abi_impl_purity_mismatch", - "should_fail/abi_pure_calls_impure", - "should_fail/impure_abi_read_calls_impure_write", - "should_fail/impure_trait_read_calls_impure_write", - "should_fail/trait_impl_purity_mismatch", - "should_fail/trait_pure_calls_impure", - "should_fail/match_expressions_empty_arms", - "should_fail/type_mismatch_error_message", - "should_fail/recursive_enum", - "should_fail/recursive_struct", - "should_fail/recursive_type_chain", - "should_fail/better_type_error_message", - "should_fail/storage_in_library", - "should_fail/storage_in_predicate", - "should_fail/storage_in_script", - "should_fail/multiple_impl_abi", - "should_fail/multiple_impl_fns", - "should_fail/repeated_enum_variant", - "should_fail/repeated_storage_field", - "should_fail/repeated_struct_field", - "should_fail/method_requires_mut_var", - "should_fail/impl_with_bad_generic", - "should_fail/storage_conflict", - ]; - number_of_tests_run += negative_project_names.iter().fold(0, |acc, name| { - if filter(name) { - crate::e2e_vm_tests::harness::does_not_compile(name, locked); - acc + 1 - } else { - acc - } - }); - // ---- Tests paired with contracts upon which they depend which must be pre-deployed. - let contract_and_project_names = &[ - ( - ( - "should_pass/test_contracts/basic_storage", - "should_pass/require_contract_deployment/call_basic_storage", - ), - 4242, - ), - ( - ( - "should_pass/test_contracts/increment_contract", - "should_pass/require_contract_deployment/call_increment_contract", - ), - 1, // true - ), - ( - ( - "should_pass/test_contracts/auth_testing_contract", - "should_pass/require_contract_deployment/caller_auth_test", - ), - 1, // true - ), - ( - ( - "should_pass/test_contracts/context_testing_contract", - "should_pass/require_contract_deployment/caller_context_test", - ), - 1, // true - ), - ( - ( - "should_pass/test_contracts/balance_test_contract", - "should_pass/require_contract_deployment/bal_opcode", - ), - 1, // true - ), - ( - ( - "should_pass/test_contracts/test_fuel_coin_contract", - "should_pass/require_contract_deployment/token_ops_test", - ), - 1, // true - ), - ( - ( - "should_pass/test_contracts/storage_access_contract", - "should_pass/require_contract_deployment/storage_access_caller", - ), - 1, // true - ), - ( - ( - "should_pass/test_contracts/get_storage_key_contract", - "should_pass/require_contract_deployment/get_storage_key_caller", - ), - 1, - ), - ( - ( - "should_pass/test_contracts/array_of_structs_contract", - "should_pass/require_contract_deployment/array_of_structs_caller", - ), - 1, - ), - ( - ( - "should_pass/test_contracts/abi_with_tuples_contract", - "should_pass/require_contract_deployment/call_abi_with_tuples", - ), - 1, - ), - ]; - - let total_number_of_tests = positive_project_names_no_abi.len() - + positive_project_names_with_abi.len() - + negative_project_names.len() - + contract_and_project_names.len(); - - // Filter them first. - let (contracts_and_projects, vals): (Vec<_>, Vec<_>) = contract_and_project_names - .iter() - .filter(|names| filter(names.0 .1)) - .cloned() - .unzip(); - - let (contracts, projects): (Vec<_>, Vec<_>) = contracts_and_projects.iter().cloned().unzip(); - - // Deploy and then test. - number_of_tests_run += projects.len(); - let mut contract_ids = Vec::::with_capacity(contracts.len()); - for name in contracts { - let contract_id = harness::deploy_contract(name, locked); - contract_ids.push(contract_id); - } + TestCategory::Compiles => { + assert!(crate::e2e_vm_tests::harness::compile_to_bytes(&name, locked).is_ok()); + number_of_tests_executed += 1; + } - for (name, val) in projects.iter().zip(vals.iter()) { - let result = harness::runs_on_node(name, locked, &contract_ids); - assert!(result.iter().all(|r| !matches!( - r, - fuel_tx::Receipt::Revert { .. } | fuel_tx::Receipt::Panic { .. } - ))); - assert!( - result.len() >= 2 - && matches!(result[result.len() - 2], fuel_tx::Receipt::Return { .. }) - && result[result.len() - 2].val().unwrap() == *val - ); + TestCategory::FailsToCompile => { + crate::e2e_vm_tests::harness::does_not_compile(&name, locked); + number_of_tests_executed += 1; + } + + TestCategory::RunsWithContract => { + let val = if let Some(TestResult::Result(val)) = expected_result { + val + } else { + panic!( + "For {name}:\nExpecting a 'result' action for a 'run_on_node' test, \ + found: {expected_result:?}." + ) + }; + + if contract_paths.is_empty() { + panic!( + "For {name}\n\ + One or more ontract paths are required for 'run_on_node' tests." + ); + } + + let contract_ids = contract_paths + .into_iter() + .map(|contract_path| { + *deployed_contracts + .entry(contract_path.clone()) + .or_insert_with(|| { + harness::deploy_contract(contract_path.as_str(), locked) + }) + }) + .collect::>(); + + let result = harness::runs_on_node(&name, locked, &contract_ids); + assert!(result.iter().all(|res| !matches!( + res, + fuel_tx::Receipt::Revert { .. } | fuel_tx::Receipt::Panic { .. } + ))); + assert!( + result.len() >= 2 + && matches!(result[result.len() - 2], fuel_tx::Receipt::Return { .. }) + && result[result.len() - 2].val().unwrap() == val + ); + + number_of_tests_executed += 1; + } + + TestCategory::Disabled => { + number_of_disabled_tests += 1; + } + } } - if number_of_tests_run == 0 { + if number_of_tests_executed == 0 { tracing::info!( "No tests were run. Regex filter \"{}\" filtered out all {} tests.", - filter_regex.map(|x| x.to_string()).unwrap_or_default(), + filter_regex + .map(|regex| regex.to_string()) + .unwrap_or_default(), total_number_of_tests ); } else { tracing::info!("_________________________________\nTests passed."); tracing::info!( - "{} tests run ({} skipped)", - number_of_tests_run, - total_number_of_tests - number_of_tests_run + "{} tests run ({} skipped, {} disabled)", + number_of_tests_executed, + total_number_of_tests - number_of_tests_executed - number_of_disabled_tests, + number_of_disabled_tests, ); } } + +fn discover_test_configs() -> Result, String> { + fn recursive_search(path: &Path, configs: &mut Vec) -> Result<(), String> { + let wrap_err = |e| { + let relative_path = path + .iter() + .skip_while(|part| part.to_string_lossy() != "test_programs") + .skip(1) + .collect::(); + format!("{}: {}", relative_path.display(), e) + }; + if path.is_dir() { + for entry in std::fs::read_dir(path).unwrap() { + recursive_search(&entry.unwrap().path(), configs)?; + } + } else if path.is_file() && path.file_name() == Some(std::ffi::OsStr::new("test.toml")) { + configs.push(parse_test_toml(path).map_err(wrap_err)?); + } + Ok(()) + } + + let manifest_dir = env!("CARGO_MANIFEST_DIR"); + let tests_root_dir = format!("{manifest_dir}/src/e2e_vm_tests/test_programs"); + + let mut configs = Vec::new(); + recursive_search(&PathBuf::from(tests_root_dir), &mut configs)?; + Ok(configs) +} + +fn parse_test_toml(path: &Path) -> Result { + let toml_content = std::fs::read_to_string(path) + .map_err(|e| e.to_string()) + .and_then(|toml_content_str| { + toml_content_str + .parse::() + .map_err(|e| e.to_string()) + }) + .map_err(|e| format!("Failed to parse: {e}"))?; + + if !toml_content.is_table() { + Err("Malformed test description.".to_owned())?; + } + + let category = toml_content + .get("category") + .ok_or_else(|| "Missing mandatory 'category' entry.".to_owned()) + .and_then(|category_val| match category_val.as_str() { + Some("run") => Ok(TestCategory::Runs), + Some("run_on_node") => Ok(TestCategory::RunsWithContract), + Some("fail") => Ok(TestCategory::FailsToCompile), + Some("compile") => Ok(TestCategory::Compiles), + Some("disabled") => Ok(TestCategory::Disabled), + None => Err(format!( + "Malformed category '{category_val}', should be a string." + )), + Some(other) => Err(format!("Unknown category '{}'.", other,)), + })?; + + let expected_result = match &category { + TestCategory::Runs | TestCategory::RunsWithContract => { + Some(get_expected_result(&toml_content)?) + } + TestCategory::Compiles | TestCategory::FailsToCompile | TestCategory::Disabled => None, + }; + + let contract_paths = match toml_content.get("contracts") { + None => Vec::new(), + Some(contracts) => contracts + .as_array() + .ok_or_else(|| "Contracts must be an array of strings.".to_owned()) + .and_then(|vals| { + vals.iter() + .map(|val| { + val.as_str() + .ok_or_else(|| "Contracts must be path strings.".to_owned()) + .map(|path_str| path_str.to_owned()) + }) + .collect::, _>>() + })?, + }; + + let validate_abi = toml_content + .get("validate_abi") + .map(|v| v.as_bool().unwrap_or(false)) + .unwrap_or(false); + + // We need to adjust the path to start relative to `test_programs`. + let name = path + .iter() + .skip_while(|part| part.to_string_lossy() != "test_programs") + .skip(1) + .collect::(); + + // And it needs to chop off the `test.toml` and convert to a String. + let name = name + .parent() + .unwrap() + .to_str() + .map(|s| s.to_owned()) + .unwrap(); + + Ok(TestDescription { + name, + category, + expected_result, + contract_paths, + validate_abi, + }) +} + +fn get_expected_result(toml_content: &toml::Value) -> Result { + fn get_action_value( + action: &toml::Value, + expected_value: &toml::Value, + ) -> Result { + match (action.as_str(), expected_value) { + // A simple integer value. + (Some("return"), toml::Value::Integer(v)) => Ok(TestResult::Return(*v as u64)), + + // Also a simple integer value, but is a result from a contract call. + (Some("result"), toml::Value::Integer(v)) => Ok(TestResult::Result(*v as Word)), + + // A bytes32 value. + (Some("return_data"), toml::Value::Array(ary)) => ary + .iter() + .map(|byte_val| { + byte_val.as_integer().ok_or_else(|| { + format!( + "Return data must only contain integer values; \ + found {byte_val}." + ) + }) + }) + .collect::, _>>() + .and_then(|bytes| { + if bytes.iter().any(|byte| *byte < 0 || *byte > 255) { + Err("Return data byte values must be less than 256.".to_owned()) + } else if bytes.len() != 32 { + Err(format!( + "Return data must be a 32 byte array; \ + found {} values.", + bytes.len() + )) + } else { + Ok(bytes.iter().map(|byte| *byte as u8).collect()) + } + }) + .map(|bytes: Vec| { + let fixed_byte_array = + bytes + .iter() + .enumerate() + .fold([0_u8; 32], |mut ary, (idx, byte)| { + ary[idx] = *byte; + ary + }); + TestResult::ReturnData(Bytes32::from(fixed_byte_array)) + }), + + // Revert with a specific code. + (Some("revert"), toml::Value::Integer(v)) => Ok(TestResult::Revert(*v as u64)), + + _otherwise => Err(format!("Malformed action value: {action} {expected_value}")), + } + } + + toml_content + .get("expected_result") + .ok_or_else(|| "Could not find mandatory 'expected_result' entry.".to_owned()) + .and_then(|expected_result_table| { + expected_result_table + .get("action") + .ok_or_else(|| { + "Could not find mandatory 'action' field in 'expected_result' entry.".to_owned() + }) + .and_then(|action| { + expected_result_table + .get("value") + .ok_or_else(|| { + "Could not find mandatory 'value' field in 'expected_result' entry." + .to_owned() + }) + .and_then(|expected_value| get_action_value(action, expected_value)) + }) + }) +} diff --git a/test/src/e2e_vm_tests/test_programs/README.md b/test/src/e2e_vm_tests/test_programs/README.md new file mode 100644 index 00000000000..f11054beb3e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/README.md @@ -0,0 +1,82 @@ +# Config Driven End To End Testing. + +Each of the tests in this suite are controlled by a TOML descriptor file which describes how the +test should be run and what result to expect if any. + +## `test.toml` + +To add a new test to the E2E suite place a `test.toml` file at the root of the test Forc package, +i.e., next to the `Forc.toml` file. This file may contain a few basic fields. + +## `category` + +The `category` field is mandatory and must be one of the following strings: + +* `"run"` - The test is compiled and run in a VM. +* `"run_on_node"` - The test is compiled and run on a local Fuel Core node. +* `"compile"` - The test is expected to succeed compiling, but isn't run in any way. +* `"fail"` - The test is expected to fail to compile. +* `"disabled"` - The test is disabled. + +## `expected_result` + +The `expected_result` field is mandatory for `"run"` and `"run_on_node"` tests. It is a table with +two fields, `action` and `value`. + +The `action` field describe what sort of result to expect: + +* `"return"` - An integer value returned by success in the VM. +* `"return_data"` - An array of bytes returned by the VM. +* `"result"` - An integer word returned by the Fuel Core node. +* `"revert"` - An integer value returned by failure in the VM. + +The `value` field is the actual expected value. For `"return"`, `"result"` and `"revert"` actions +it must be an integer. + +For `"return_data"` actions it must be an array of byte values, each an integer between 0 and 255. + +## `contracts` + +Tests in the `"run_on_node"` category will usually specify one or more contracts which must be +deployed to the node prior to deploying and running the test code. These are specified with the +`contracts` field. + +It must be an array of strings each containing only the path to the Forc project for the contract to +be compiled and deployed. It is important that these paths remain relative to the +`test/src/e2e_vm_tests/test_programs` directory. + +## `validate_abi` + +Some tests also require their ABI is verified. To indicate this the `validate_abi` field may be +specified, as a boolean value. + +# Examples + +The following is a common example for tests in the `should_pass/language` directory. The test +should be compiled, run on the VM, should expect a return value of 42 and should also validate the +ABI generation. + +```toml +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true +``` + +And this example is similar but expects return data. + +```toml +category = "run" +expected_result = { action = "return_data", value = [ 102, 104, 122, 173, 248, 98, 189, 119, 108, 143, 193, 139, 142, 159, 142, 32, 8, 151, 20, 133, 110, 226, 51, 179, 144, 42, 89, 29, 13, 95, 41, 37 ] } +validate_abi = true +``` + +The following tests a contract on a Fuel Core node. + +```toml +category = "run_on_node" +expected_result = { action = "result", value = 11 } +contracts = ["should_pass/test_contracts/test_contract_a", "should_pass/test_contracts/test_contract_b"] +``` + +And there are already hundreds of existing tests with `test.toml` descriptors which may be consulted +when adding a new test. diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/abi_impl_purity_mismatch/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/abi_impl_purity_mismatch/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/abi_impl_purity_mismatch/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/abi_method_signature_mismatch/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/abi_method_signature_mismatch/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/abi_method_signature_mismatch/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/abi_pure_calls_impure/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/abi_pure_calls_impure/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/abi_pure_calls_impure/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/abort_control_flow_bad/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/abort_control_flow_bad/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/abort_control_flow_bad/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/array_bad_index/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/array_bad_index/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/array_bad_index/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/array_oob/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/array_oob/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/array_oob/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/asm_missing_return/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/asm_missing_return/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/asm_missing_return/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/asm_should_not_have_return/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/asm_should_not_have_return/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/asm_should_not_have_return/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/assign_to_field_of_non_mutable_struct/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/assign_to_field_of_non_mutable_struct/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/assign_to_field_of_non_mutable_struct/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/bad_generic_annotation/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/bad_generic_annotation/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/bad_generic_annotation/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/bad_generic_var_annotation/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/bad_generic_var_annotation/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/bad_generic_var_annotation/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/better_type_error_message/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/better_type_error_message/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/better_type_error_message/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/chained_if_let_missing_branch/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/chained_if_let_missing_branch/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/chained_if_let_missing_branch/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/contract_pure_calls_impure/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/contract_pure_calls_impure/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/contract_pure_calls_impure/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/cyclic_dependency/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/cyclic_dependency/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/cyclic_dependency/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/dependency_parsing_error/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/dependency_parsing_error/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/dependency_parsing_error/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/different_contract_caller_types/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/different_contract_caller_types/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/different_contract_caller_types/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/disallow_turbofish/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/disallow_turbofish/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/disallow_turbofish/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_enum/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_enum/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_enum/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_fn/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_fn/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_fn/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_impl_self_fn/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_impl_self_fn/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_impl_self_fn/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_struct/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_struct/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_struct/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_trait_fn/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_trait_fn/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_trait_fn/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_var/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_var/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/double_underscore_var/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/empty_impl/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/empty_impl/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/empty_impl/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/enum_bad_type_inference/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/enum_bad_type_inference/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/enum_bad_type_inference/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/enum_if_let_invalid_variable/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/enum_if_let_invalid_variable/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/enum_if_let_invalid_variable/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/excess_fn_arguments/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/excess_fn_arguments/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/excess_fn_arguments/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/generic_shadows_generic/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/generic_shadows_generic/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/generic_shadows_generic/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/generics_unhelpful_error/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/generics_unhelpful_error/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/generics_unhelpful_error/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/impl_method_recursion/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/impl_method_recursion/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/impl_method_recursion/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/impl_with_bad_generic/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/impl_with_bad_generic/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/impl_with_bad_generic/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/impure_abi_read_calls_impure_write/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/impure_abi_read_calls_impure_write/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/impure_abi_read_calls_impure_write/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/impure_read_calls_impure_write/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/impure_read_calls_impure_write/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/impure_read_calls_impure_write/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/impure_trait_read_calls_impure_write/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/impure_trait_read_calls_impure_write/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/impure_trait_read_calls_impure_write/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/infinite_dependencies/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/infinite_dependencies/Forc.lock index 2e6d2d8ead1..3dd8c426e89 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/infinite_dependencies/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/infinite_dependencies/Forc.lock @@ -1,3 +1,4 @@ [[package]] name = 'infinite_dependencies' +source = 'root' dependencies = [] diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/infinite_dependencies/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/infinite_dependencies/test.toml new file mode 100644 index 00000000000..cfaf07d3f78 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/infinite_dependencies/test.toml @@ -0,0 +1,5 @@ +# The feature for this test, detecting infinite deps, was reverted. When that is re-implemented we +# should re-enable this test. + +#category = "fails" +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/item_used_without_import/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/item_used_without_import/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/item_used_without_import/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/literal_too_large_for_type/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/literal_too_large_for_type/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/literal_too_large_for_type/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_empty_arms/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_empty_arms/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_empty_arms/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_non_exhaustive/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_non_exhaustive/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_non_exhaustive/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_wrong_struct/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_wrong_struct/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/match_expressions_wrong_struct/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/method_requires_mut_var/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/method_requires_mut_var/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/method_requires_mut_var/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/missing_fn_arguments/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/missing_fn_arguments/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/missing_fn_arguments/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/missing_func_from_supertrait_impl/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/missing_func_from_supertrait_impl/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/missing_func_from_supertrait_impl/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/missing_supertrait_impl/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/missing_supertrait_impl/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/missing_supertrait_impl/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_abi/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_abi/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_abi/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/name_shadowing/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/name_shadowing/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/name_shadowing/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/nested_impure/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/nested_impure/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/nested_impure/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/non_literal_const_decl/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/non_literal_const_decl/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/non_literal_const_decl/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/predicate_calls_impure/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/predicate_calls_impure/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/predicate_calls_impure/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/primitive_type_argument/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/primitive_type_argument/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/primitive_type_argument/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/pure_calls_impure/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/pure_calls_impure/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/pure_calls_impure/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/recursive_calls/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/recursive_calls/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/recursive_calls/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/recursive_enum/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/recursive_enum/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/recursive_enum/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/recursive_struct/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/recursive_struct/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/recursive_struct/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/recursive_type_chain/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/recursive_type_chain/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/recursive_type_chain/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/repeated_enum_variant/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/repeated_enum_variant/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/repeated_enum_variant/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/repeated_storage_field/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/repeated_storage_field/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/repeated_storage_field/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/repeated_struct_field/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/repeated_struct_field/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/repeated_struct_field/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/script_calls_impure/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/script_calls_impure/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/script_calls_impure/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/shadow_import/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/shadow_import/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/shadow_import/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/star_import_alias/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/star_import_alias/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/star_import_alias/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/storage_conflict/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/storage_conflict/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/storage_conflict/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_library/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_library/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_library/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_predicate/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_predicate/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_predicate/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/storage_ops_in_library/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/storage_ops_in_library/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/storage_ops_in_library/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/supertrait_does_not_exist/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/supertrait_does_not_exist/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/supertrait_does_not_exist/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/top_level_vars/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/top_level_vars/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/top_level_vars/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/trait_impl_purity_mismatch/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/trait_impl_purity_mismatch/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/trait_impl_purity_mismatch/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/trait_method_signature_mismatch/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/trait_method_signature_mismatch/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/trait_method_signature_mismatch/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/trait_pure_calls_impure/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/trait_pure_calls_impure/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/trait_pure_calls_impure/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/type_mismatch_error_message/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/type_mismatch_error_message/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/type_mismatch_error_message/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/unify_identical_unknowns/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/unify_identical_unknowns/test.toml new file mode 100644 index 00000000000..eb3634e032c --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_fail/unify_identical_unknowns/test.toml @@ -0,0 +1 @@ +category = "fail" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/forc/dependency_package_field/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow/test.toml new file mode 100644 index 00000000000..83885a3255b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow/test.toml @@ -0,0 +1 @@ +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow_good/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow_good/test.toml new file mode 100644 index 00000000000..665debb3bf8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow_good/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "revert", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/aliased_imports/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_basics/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_dynamic_oob/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_dynamic_oob/test.toml new file mode 100644 index 00000000000..83885a3255b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_dynamic_oob/test.toml @@ -0,0 +1 @@ +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/test.toml new file mode 100644 index 00000000000..d8186a90d45 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 6 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/asm_without_return/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bad_jumps/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bitwise_ops/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bitwise_ops/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_bitwise_ops/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/test.toml new file mode 100644 index 00000000000..2297098e50e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/b256_ops/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 100 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_func_decl/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_predicate/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_predicate/test.toml new file mode 100644 index 00000000000..bb916e5c72e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/basic_predicate/test.toml @@ -0,0 +1,2 @@ +category = "run" +expected_result = { action = "return", value = 1 } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/binary_and_hex_literals/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/binary_and_hex_literals/test.toml new file mode 100644 index 00000000000..83885a3255b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/binary_and_hex_literals/test.toml @@ -0,0 +1 @@ +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/bool_and_or/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/builtin_type_method_call/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/builtin_type_method_call/test.toml new file mode 100644 index 00000000000..a9e475bbda3 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/builtin_type_method_call/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 3 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/test.toml new file mode 100644 index 00000000000..5338339c8cb --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/chained_if_let/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 5 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/test.toml new file mode 100644 index 00000000000..2297098e50e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 100 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_decl_in_library/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/const_inits/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_inits/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/const_inits/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_type/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_type/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/contract_caller_as_type/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/dependencies/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/doc_strings/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/doc_strings/test.toml new file mode 100644 index 00000000000..83885a3255b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/doc_strings/test.toml @@ -0,0 +1 @@ +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/test.toml new file mode 100644 index 00000000000..be3b58f100f --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_destructuring/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 15 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/test.toml new file mode 100644 index 00000000000..365860c79fa --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 143 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/test.toml new file mode 100644 index 00000000000..be3b58f100f --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let_large_type/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 15 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/test.toml new file mode 100644 index 00000000000..9820628e6d0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_in_fn_decl/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 255 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_padding/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_padding/test.toml new file mode 100644 index 00000000000..37ba1bb3194 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_padding/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return_data", value = [ 0xce, 0x55, 0xff, 0x05, 0x11, 0x3a, 0x24, 0x2e, 0xc7, 0x9a, 0x23, 0x75, 0x0c, 0x7e, 0x2b, 0xab, 0xaf, 0x98, 0xa8, 0xdc, 0x41, 0x66, 0x90, 0xc8, 0x57, 0xdd, 0x31, 0x72, 0x0c, 0x74, 0x82, 0xb6 ] } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/test.toml new file mode 100644 index 00000000000..5338339c8cb --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/enum_type_inference/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 5 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/test.toml new file mode 100644 index 00000000000..1cb4e3ba6f8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/fix_opcode_bug/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 30 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/funcs_with_generic_types/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic-type-inference/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic-type-inference/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic-type-inference/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_enum/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/test.toml new file mode 100644 index 00000000000..1a37cf3ee4d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 10 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_inside_generic/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_inside_generic/test.toml new file mode 100644 index 00000000000..b87306a6d45 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_inside_generic/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 7 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_struct/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/test.toml new file mode 100644 index 00000000000..1a37cf3ee4d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_elseif_enum/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 10 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/if_implicit_unit/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/implicit_return/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/implicit_return/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/implicit_return/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/test.toml new file mode 100644 index 00000000000..1a37cf3ee4d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/import_method_from_other_file/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 10 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/import_trailing_comma/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/import_trailing_comma/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/import_trailing_comma/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/impure_ifs/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/impure_ifs/test.toml new file mode 100644 index 00000000000..5617bb5d0a9 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/impure_ifs/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 2 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/is_reference_type/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/is_reference_type/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/is_reference_type/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/local_impl_for_ord/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/main_returns_unit/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/many_stack_variables/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/many_stack_variables/test.toml new file mode 100644 index 00000000000..1a37cf3ee4d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/many_stack_variables/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 10 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_enums/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_enums/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_enums/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_inside_generic_functions/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_inside_generic_functions/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_inside_generic_functions/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_mismatched/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_mismatched/test.toml new file mode 100644 index 00000000000..5338339c8cb --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_mismatched/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 5 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_nested/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_nested/test.toml new file mode 100644 index 00000000000..2e6705c76d8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_nested/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 123 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_simple/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_simple/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_simple/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/test.toml new file mode 100644 index 00000000000..25d06220ec6 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_structs/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 4 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_with_self/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_with_self/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/match_expressions_with_self/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/method_on_empty_struct/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/missing_type_parameters/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/missing_type_parameters/test.toml new file mode 100644 index 00000000000..83885a3255b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/missing_type_parameters/test.toml @@ -0,0 +1 @@ +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/modulo_uint_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_impl_self/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_impl_self/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_impl_self/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/multi_item_import/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_structs/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/nested_while_and_if/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/new_allocator_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/non_literal_const_decl/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/non_literal_const_decl/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/non_literal_const_decl/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/numeric_constants/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/numeric_constants/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/numeric_constants/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/op_precedence/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/out_of_order_decl/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/primitive_type_argument/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/primitive_type_argument/test.toml new file mode 100644 index 00000000000..5338339c8cb --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/primitive_type_argument/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 5 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/reassignment_operators/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/reassignment_operators/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/reassignment_operators/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_small_string/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_small_string/test.toml new file mode 100644 index 00000000000..af031908100 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_small_string/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return_data", value = [ 0x6a, 0x4e, 0x01, 0xe9, 0x40, 0xab, 0xc0, 0x04, 0x30, 0xfe, 0x21, 0x62, 0xed, 0x69, 0xc0, 0xe2, 0x31, 0x04, 0xf9, 0xfd, 0xa7, 0x81, 0x59, 0x09, 0x2f, 0xea, 0x8f, 0x7e, 0xcb, 0x7f, 0x6d, 0xd4 ] } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/test.toml new file mode 100644 index 00000000000..c731ccb8160 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return_data", value = [ 0xaa, 0x5e, 0xfc, 0xa8, 0xda, 0xaf, 0x6e, 0xe6, 0x3f, 0x44, 0x93, 0xb2, 0x88, 0xb3, 0x85, 0xd7, 0x60, 0xb8, 0xef, 0x93, 0xdc, 0x70, 0xe0, 0xfb, 0xc3, 0x06, 0xed, 0x9b, 0x67, 0x6e, 0x5f, 0x13 ] } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/test.toml new file mode 100644 index 00000000000..4e4ff1e7d89 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_b256/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return_data", value = [ 102, 104, 122, 173, 248, 98, 189, 119, 108, 143, 193, 139, 142, 159, 142, 32, 8, 151, 20, 133, 110, 226, 51, 179, 144, 42, 89, 29, 13, 95, 41, 37 ] } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/test.toml new file mode 100644 index 00000000000..3f5cbab52bc --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_small_array/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return_data", value = [ 0xcd, 0x26, 0x62, 0x15, 0x4e, 0x6d, 0x76, 0xb2, 0xb2, 0xb9, 0x2e, 0x70, 0xc0, 0xca, 0xc3, 0xcc, 0xf5, 0x34, 0xf9, 0xb7, 0x4e, 0xb5, 0xb8, 0x98, 0x19, 0xec, 0x50, 0x90, 0x83, 0xd0, 0x0a, 0x50 ] } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/test.toml new file mode 100644 index 00000000000..52c540afc9e --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return_data", value = [ 251, 57, 24, 241, 63, 94, 17, 102, 252, 182, 8, 110, 140, 105, 102, 105, 138, 202, 155, 39, 97, 32, 94, 129, 141, 144, 190, 142, 33, 32, 33, 75 ] } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/test.toml new file mode 100644 index 00000000000..36374311dfd --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_zero_len_array/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return_data", value = [ 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55 ] } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/self_impl_reassignment/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/self_impl_reassignment/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/self_impl_reassignment/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/size_of/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/storage_declaration/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/storage_declaration/test.toml new file mode 100644 index 00000000000..83885a3255b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/storage_declaration/test.toml @@ -0,0 +1 @@ +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/test.toml new file mode 100644 index 00000000000..652f09bfa94 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_access/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 43 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_field_reassignment/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/supertraits/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/test.toml new file mode 100644 index 00000000000..44ca8ea93c4 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_import_with_star/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 0 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/test.toml new file mode 100644 index 00000000000..b87306a6d45 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/trait_override_bug/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 7 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/test.toml new file mode 100644 index 00000000000..b7a79f9a8c0 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_access/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 42 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/test.toml new file mode 100644 index 00000000000..a0f62749753 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_desugaring/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 9 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_field_reassignment/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_field_reassignment/test.toml new file mode 100644 index 00000000000..83bfb15bf1d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_field_reassignment/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 320 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_in_struct/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_indexing/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_single_element/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_single_element/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_single_element/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/test.toml new file mode 100644 index 00000000000..2e6705c76d8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/tuple_types/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 123 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/u64_ops/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/u64_ops/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/u64_ops/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/unit_type_variants/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/unit_type_variants/test.toml new file mode 100644 index 00000000000..28d8c97b878 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/unit_type_variants/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return_data", value = [ 0xcd, 0x04, 0xa4, 0x75, 0x44, 0x98, 0xe0, 0x6d, 0xb5, 0xa1, 0x3c, 0x5f, 0x37, 0x1f, 0x1f, 0x04, 0xff, 0x6d, 0x24, 0x70, 0xf2, 0x4a, 0xa9, 0xbd, 0x88, 0x65, 0x40, 0xe5, 0xdc, 0xe7, 0x7f, 0x70 ] } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/use_full_path_names/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/valid_impurity/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/valid_impurity/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/valid_impurity/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/while_loops/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/xos_opcode/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/xos_opcode/test.toml new file mode 100644 index 00000000000..83885a3255b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/xos_opcode/test.toml @@ -0,0 +1 @@ +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/test.toml new file mode 100644 index 00000000000..1a37cf3ee4d --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/zero_field_types/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 10 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/test.toml new file mode 100644 index 00000000000..853d71ea545 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 1 } +contracts = ["should_pass/test_contracts/array_of_structs_contract"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/test.toml new file mode 100644 index 00000000000..044cb74c7da --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 1 } +contracts = ["should_pass/test_contracts/balance_test_contract"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/test.toml new file mode 100644 index 00000000000..af526e80a7f --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 1 } +contracts = ["should_pass/test_contracts/abi_with_tuples_contract"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/test.toml new file mode 100644 index 00000000000..6afc375bd5a --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 4242 } +contracts = ["should_pass/test_contracts/basic_storage"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/test.toml new file mode 100644 index 00000000000..4e73dff4cd8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 1 } +contracts = ["should_pass/test_contracts/increment_contract"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/test.toml new file mode 100644 index 00000000000..258d74ac5fa --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 1 } +contracts = ["should_pass/test_contracts/auth_testing_contract"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/test.toml new file mode 100644 index 00000000000..093bb1be264 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 1 } +contracts = ["should_pass/test_contracts/context_testing_contract"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/get_storage_key_caller/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/get_storage_key_caller/test.toml new file mode 100644 index 00000000000..559f02e1da5 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/get_storage_key_caller/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 1 } +contracts = ["should_pass/test_contracts/get_storage_key_contract"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/test.toml new file mode 100644 index 00000000000..83885a3255b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/test.toml @@ -0,0 +1 @@ +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/test.toml new file mode 100644 index 00000000000..c64e79bfb32 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 1 } +contracts = ["should_pass/test_contracts/storage_access_contract"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/token_ops_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/token_ops_test/test.toml new file mode 100644 index 00000000000..c5bf35a1c74 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/token_ops_test/test.toml @@ -0,0 +1,3 @@ +category = "run_on_node" +expected_result = { action = "result", value = 1 } +contracts = ["should_pass/test_contracts/balance_test_contract", "should_pass/test_contracts/test_fuel_coin_contract"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/address_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/alloc/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/alloc/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/alloc/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/assert_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_struct_alignment/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/b512_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/block_height/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_test/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_test/Forc.lock index 5ffb59921bf..a94f7cffeda 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_test/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_test/Forc.lock @@ -1,13 +1,14 @@ [[package]] name = 'contract_id_test' -dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?reference=master#247270e7d8911e754a989b2fe280c462605ae2f6'] +source = 'root' +dependencies = ['std'] [[package]] name = 'core' -source = 'git+https://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573' +source = 'path+from-root-16F6D7874F5EC2F3' dependencies = [] [[package]] name = 'std' -source = 'git+https://github.com/FuelLabs/sway-lib-std?reference=master#247270e7d8911e754a989b2fe280c462605ae2f6' -dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?reference=master#c331ed20ebc9d646acec6b8ee8f408627ce3b573'] +source = 'path+from-root-16F6D7874F5EC2F3' +dependencies = ['core'] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_test/test.toml new file mode 100644 index 00000000000..83885a3255b --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_test/test.toml @@ -0,0 +1 @@ +category = "disabled" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_type/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_type/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/contract_id_type/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ec_recover_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/evm_ecr/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/evm_ecr/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/evm_ecr/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/exponentiation_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/exponentiation_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/exponentiation_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/ge_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/identity_eq/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/identity_eq/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/identity_eq/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/intrinsics/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/intrinsics/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/intrinsics/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/mem/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/mem/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/mem/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/option/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/require/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/require/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/require/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/result/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/result/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/result/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_div_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_div_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_div_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_mul_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_mul_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_mul_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_test/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_test/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/u128_test/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/vec/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/vec/test.toml new file mode 100644 index 00000000000..ace9e6f3186 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/stdlib/vec/test.toml @@ -0,0 +1,3 @@ +category = "run" +expected_result = { action = "return", value = 1 } +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_tuples_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_tuples_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/abi_with_tuples_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/array_of_structs_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/array_of_structs_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/array_of_structs_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/auth_testing_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/auth_testing_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/auth_testing_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/basic_storage/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/basic_storage/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/basic_storage/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/context_testing_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/context_testing_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/context_testing_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/get_storage_key_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/get_storage_key_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/get_storage_key_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/increment_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/increment_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/increment_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/issue_1512_repro/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/issue_1512_repro/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/issue_1512_repro/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/multiple_impl/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/multiple_impl/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/multiple_impl/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/nested_struct_args_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/nested_struct_args_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/nested_struct_args_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/storage_access_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/storage_access_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/storage_access_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/test_fuel_coin_contract/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/test_fuel_coin_contract/test.toml new file mode 100644 index 00000000000..6691150d9c8 --- /dev/null +++ b/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/test_fuel_coin_contract/test.toml @@ -0,0 +1,2 @@ +category = "compile" +validate_abi = true