Fixed 58 out of date move scripts in functional test

Many old move functional_tests scripts are not working after update.
I go through all scripts in functional_tests and fixed 58 out of date move scripts in the functional_tests.

I fix all the out of date move scripts and update them already.
Please check the detailed pull request: #884
I test all of them in the latest compiler in LibraIDE (libraide.com)

The scripts name that I send pull request are listed as below:
functional_tests/tests/testsuite

-borrow_tests:
*borrow_copy_ok.mvir
*borrow_field_ok.mvir
*borrow_global_good.mvir
*borrow_local_bad.mvir
*borrow_move_ok.mvir
*borrow_parens_ok.mvir

-builtins:
*get_missing_struct.mvir
*get_published_resource.mvir
*has_published_struct.mvir
*move_published_resource.mvir

-commands:
*move_published_resource.mvir
*return_in_if_branch_taken.mvir
*return_in_if_branch_taken_no_else.mvir
*unpack_resource.mvir

-data_types
*fields_packed_in_order.mvir

-dereference_tests
*deref_borrow_field_ok.mvir
*deref_move_module_ok.mvir

-expressions
*deref_value.mvir
*deref_value_nested.mvir
*equality_reference_value.mvir
*equality_resource_refs.mvir
*multiple_return_values.mvir

-function_calls
*add_function_calls.mvir
*assign_function_call.mvir
*binop_function_calls_as_args.mvir
*function_composition.mvir
*many_function_calls_as_args.mvir
*multiple_composite_functions.mvir
*pass_args_on_stack_as_expressions.mvir
*push_args_before_function_call.mvir
*push_args_before_function_composition.mvir
*return_expression_lists.mvir
*return_function_in_if_binop_in_else.mvir

-global_ref_count
*return_function_in_if_binop_in_else.mvir
*decrement_dereference.mvir

-method_decorators
*non_internal_function_valid_call.mvir

-module_member_types
*field_reads.mvir
*field_writes.mvir

-modules
*access_public_function.mvir
*all_fields_accessible.mvir
*module_struct_shared_name.mvir

-move_getting_started_examples
*earmarked_libra.mvir

-mutate_tests
*mutate_borrow_field_ok.mvir
*mutate_move_ok.mvir

-mutation
*assign_local_struct.mvir
*destroy_resource_holder.mvir
*mut_call_from_get_resource.mvir
*mutate_resource_holder_2.mvir
*simple_mutate.mvir
*use_prefix_after_move.mvir

-payment_channel
*payment_channel.mvir
*payment_channel_no_fixed_counterparty.mvir
*payment_channel_no_fixed_counterparty_multi_hop.mvir

-publish
*publish_module_and_use.mvir

-recursion
*direct_recursion.mvir
*mutual_recursion.mvir

-wallets
*wallet_module.mvir

1 Like

Please see my comments on the PR. Thanks!

Hi Gao~

Thank you for your feedback. We build the compiler bin in the Libra project and try to use compiler (https://github.com/libra/libra/tree/master/language/compiler) to compile the scripts. We think the devs will try to compile the scripts in the functional_tests to have a try but I think the compiler will not compile succeed at present. That is why we think the scripts are not working. We use the latest compiler bin but no matter compile -m or compile directly cannot output correct info.

We build LibraIDE ( libraide.com ) and it is free for developers to design and compile their move scripts without setting up the environment. We update the compiler bin and set it backend. I think the tests are ok but the compile by bin will not succeed.