diff --git a/third_party/move/move-prover/move-abigen/tests/sources/bad_script.exp b/third_party/move/move-prover/move-abigen/tests/sources/bad_script.exp index d7be291e3ba9a..aabeadf959cd2 100644 --- a/third_party/move/move-prover/move-abigen/tests/sources/bad_script.exp +++ b/third_party/move/move-prover/move-abigen/tests/sources/bad_script.exp @@ -1,10 +1,6 @@ -Move prover abigen returns: exiting with model building errors -error: incompatible types - ┌─ tests/sources/bad_script.move:3:9 +Move prover abigen returns: exiting with checking errors +error: expected `u64` but found a value of type `bool` + ┌─ tests/sources/bad_script.move:3:15 │ 3 │ abort true // type error, abort code must be a u64 - │ ^^^^^^^^^^ - │ │ │ - │ │ Given: 'bool' - │ Invalid abort - │ Expected: 'u64' + │ ^^^^ diff --git a/third_party/move/move-prover/move-abigen/tests/sources/script_fun_in_module.exp b/third_party/move/move-prover/move-abigen/tests/sources/script_fun_in_module.exp index 2f9e52408877d..91fb6b4366e04 100644 --- a/third_party/move/move-prover/move-abigen/tests/sources/script_fun_in_module.exp +++ b/third_party/move/move-prover/move-abigen/tests/sources/script_fun_in_module.exp @@ -1,17 +1,17 @@ -warning: unused variable +warning: Unused parameter `account`. Consider removing or prefixing with an underscore: `_account` ┌─ tests/sources/script_fun_in_module.move:26:57 │ 26 │ public entry fun this_is_script_fun_with_signer_ref(account: &signer, _another_arg: u64) { } - │ ^^^^^^^ Unused parameter 'account'. Consider removing or prefixing with an underscore: '_account' + │ ^^^^^^^ -warning: unused variable +warning: Unused parameter `account`. Consider removing or prefixing with an underscore: `_account` ┌─ tests/sources/script_fun_in_module.move:29:53 │ 29 │ public entry fun this_is_script_fun_with_signer(account: signer, _another_arg: u64) { } - │ ^^^^^^^ Unused parameter 'account'. Consider removing or prefixing with an underscore: '_account' + │ ^^^^^^^ -warning: unused variable +warning: Unused parameter `account`. Consider removing or prefixing with an underscore: `_account` ┌─ tests/sources/script_fun_in_module.move:32:58 │ 32 │ public entry fun this_is_script_fun_with_string_args(account: &signer, _val: String) { } - │ ^^^^^^^ Unused parameter 'account'. Consider removing or prefixing with an underscore: '_account' + │ ^^^^^^^ diff --git a/third_party/move/move-prover/move-abigen/tests/testsuite.rs b/third_party/move/move-prover/move-abigen/tests/testsuite.rs index 122a3d8b97bdf..0212e0105f23f 100644 --- a/third_party/move/move-prover/move-abigen/tests/testsuite.rs +++ b/third_party/move/move-prover/move-abigen/tests/testsuite.rs @@ -5,7 +5,7 @@ use codespan_reporting::term::termcolor::Buffer; #[allow(unused_imports)] use log::debug; -use move_prover::{cli::Options, run_move_prover}; +use move_prover::{cli::Options, run_move_prover_v2}; use move_prover_test_utils::baseline_test::verify_or_update_baseline; use std::{ collections::BTreeSet, @@ -64,7 +64,7 @@ fn test_abigen(path: &Path, mut options: Options, suffix: &str) -> anyhow::Resul }; let mut error_writer = Buffer::no_color(); - match run_move_prover(&mut error_writer, options) { + match run_move_prover_v2(&mut error_writer, options) { Ok(()) => { for abi_path in get_abi_paths_under_dir(&temp_path)?.iter() { let mut contents = String::new(); diff --git a/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_inline.md b/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_inline.md index 9f4db3a7f89cc..8f2b23f17eb97 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_inline.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_inline.md @@ -169,9 +169,9 @@ - + -# Script `main` +# Script `_0` @@ -193,18 +193,18 @@ ## Constants - + -
const C: u64 = 0;
+
const C: u64 = 0;
 
#[attr14]
-fun main()
+fun main()
 
@@ -213,7 +213,7 @@ Implementation -
fun main() {
+
fun main() {
     M::foo();
 }
 
diff --git a/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_inline_no_fold.md b/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_inline_no_fold.md index dec97e824b074..6e549d4a079a5 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_inline_no_fold.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_inline_no_fold.md @@ -150,9 +150,9 @@ - + -# Script `main` +# Script `_0` @@ -174,18 +174,18 @@ ## Constants - + -
const C: u64 = 0;
+
const C: u64 = 0;
 
#[attr14]
-fun main()
+fun main()
 
@@ -193,7 +193,7 @@ ##### Implementation -
fun main() {
+
fun main() {
     M::foo();
 }
 
diff --git a/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_separate.md b/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_separate.md index 43855be19385d..ae1eb4f213955 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_separate.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/attribute_placement.spec_separate.md @@ -179,9 +179,9 @@ - + -# Script `main` +# Script `_0` @@ -205,18 +205,18 @@ ## Constants - + -
const C: u64 = 0;
+
const C: u64 = 0;
 
#[attr14]
-fun main()
+fun main()
 
@@ -225,7 +225,7 @@ Implementation -
fun main() {
+
fun main() {
     M::foo();
 }
 
@@ -245,5 +245,5 @@
#[attr14]
-fun main()
+fun main()
 
diff --git a/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_inline.md b/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_inline.md index b4e830abfebd3..83eefe55fb0a6 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_inline.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_inline.md @@ -1,7 +1,7 @@ - + -# Script `main` +# Script `_0` @@ -22,7 +22,7 @@ code block then inline code -
fun main()
+
fun main()
 
@@ -31,7 +31,7 @@ then inline code Implementation -
fun main() { }
+
fun main() { }
 
diff --git a/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_inline_no_fold.md b/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_inline_no_fold.md index 70a6a7a3bdd86..f00f3aed43af5 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_inline_no_fold.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_inline_no_fold.md @@ -1,7 +1,7 @@ - + -# Script `main` +# Script `_0` @@ -22,7 +22,7 @@ code block then inline code -
fun main()
+
fun main()
 
@@ -30,5 +30,5 @@ then inline code ##### Implementation -
fun main() { }
+
fun main() { }
 
diff --git a/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_separate.md b/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_separate.md index b4e830abfebd3..83eefe55fb0a6 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_separate.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/code_block_test.spec_separate.md @@ -1,7 +1,7 @@ - + -# Script `main` +# Script `_0` @@ -22,7 +22,7 @@ code block then inline code -
fun main()
+
fun main()
 
@@ -31,7 +31,7 @@ then inline code Implementation -
fun main() { }
+
fun main() { }
 
diff --git a/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_inline.md b/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_inline.md index ba5a9d56e7b2a..462bf5cb4a190 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_inline.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_inline.md @@ -7,12 +7,10 @@ This document contains the description of multiple move scripts. -The script yet_another is documented in its own file. +The script yet_another is documented in its own file. - [Some Scripts](#@Some_Scripts_1) - - [Script `some`](#some) - [Other Scripts](#@Other_Scripts_2) - - [Script `other`](#other) - [Some other scripts from a module](#@Some_other_scripts_from_a_module_3) - [Module `0x1::OneTypeOfScript`](#0x1_OneTypeOfScript) - [Function `script1`](#0x1_OneTypeOfScript_script1) @@ -29,48 +27,7 @@ The script yet_another< ## Some Scripts - - - -### Script `some` - - - -
- - -This script does really nothing but just aborts. - - -
fun some<T>(_account: signer)
-
- - - -
-Implementation - - -
fun some<T>(_account: signer) {
-    abort 1
-}
-
- - - -
- -
-Specification - - - -
aborts_if true with 1;
-
- - - -
+> undefined move-include `some` @@ -79,48 +36,7 @@ This script does really nothing but just aborts. ## Other Scripts - - - -### Script `other` - - - -
- - -This script does also abort. - - -
fun other<T>(_account: signer)
-
- - - -
-Implementation - - -
fun other<T>(_account: signer) {
-    abort 2
-}
-
- - - -
- -
-Specification - - - -
aborts_if true with 2;
-
- - - -
+> undefined move-include `other` @@ -253,8 +169,8 @@ This is another script ## Index +- [`_0`](root_template_script2.md#_0) +- [`_1`](root_template_script1.md#_1) +- [`_2`](root_template_script3.md#_2) - [`0x1::AnotherTypeOfScript`](root.md#0x1_AnotherTypeOfScript) - [`0x1::OneTypeOfScript`](root.md#0x1_OneTypeOfScript) -- [`other`](root.md#other) -- [`some`](root.md#some) -- [`yet_another`](root_template_script3.md#yet_another) diff --git a/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_inline_no_fold.md b/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_inline_no_fold.md index a6b79c73e8616..3d66ba0ada816 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_inline_no_fold.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_inline_no_fold.md @@ -7,12 +7,10 @@ This document contains the description of multiple move scripts. -The script yet_another is documented in its own file. +The script yet_another is documented in its own file. - [Some Scripts](#@Some_Scripts_1) - - [Script `some`](#some) - [Other Scripts](#@Other_Scripts_2) - - [Script `other`](#other) - [Some other scripts from a module](#@Some_other_scripts_from_a_module_3) - [Module `0x1::OneTypeOfScript`](#0x1_OneTypeOfScript) - [Function `script1`](#0x1_OneTypeOfScript_script1) @@ -29,42 +27,7 @@ The script yet_another< ## Some Scripts - - - -### Script `some` - - - -
- - -This script does really nothing but just aborts. - - -
fun some<T>(_account: signer)
-
- - - -##### Implementation - - -
fun some<T>(_account: signer) {
-    abort 1
-}
-
- - - -##### Specification - - - -
aborts_if true with 1;
-
- - +> undefined move-include `some` @@ -73,42 +36,7 @@ This script does really nothing but just aborts. ## Other Scripts - - - -### Script `other` - - - -
- - -This script does also abort. - - -
fun other<T>(_account: signer)
-
- - - -##### Implementation - - -
fun other<T>(_account: signer) {
-    abort 2
-}
-
- - - -##### Specification - - - -
aborts_if true with 2;
-
- - +> undefined move-include `other` @@ -229,8 +157,8 @@ This is another script ## Index +- [`_0`](root_template_script2.md#_0) +- [`_1`](root_template_script1.md#_1) +- [`_2`](root_template_script3.md#_2) - [`0x1::AnotherTypeOfScript`](root.md#0x1_AnotherTypeOfScript) - [`0x1::OneTypeOfScript`](root.md#0x1_OneTypeOfScript) -- [`other`](root.md#other) -- [`some`](root.md#some) -- [`yet_another`](root_template_script3.md#yet_another) diff --git a/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_separate.md b/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_separate.md index 0d43418818867..462bf5cb4a190 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_separate.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/root_template.spec_separate.md @@ -7,22 +7,18 @@ This document contains the description of multiple move scripts. -The script yet_another is documented in its own file. +The script yet_another is documented in its own file. - [Some Scripts](#@Some_Scripts_1) - - [Script `some`](#some) - - [Specification](#@Specification_2) -- [Other Scripts](#@Other_Scripts_3) - - [Script `other`](#other) - - [Specification](#@Specification_4) -- [Some other scripts from a module](#@Some_other_scripts_from_a_module_5) +- [Other Scripts](#@Other_Scripts_2) +- [Some other scripts from a module](#@Some_other_scripts_from_a_module_3) - [Module `0x1::OneTypeOfScript`](#0x1_OneTypeOfScript) - [Function `script1`](#0x1_OneTypeOfScript_script1) - [Function `script2`](#0x1_OneTypeOfScript_script2) - [Module `0x1::AnotherTypeOfScript`](#0x1_AnotherTypeOfScript) - [Function `script3`](#0x1_AnotherTypeOfScript_script3) - [Function `script4`](#0x1_AnotherTypeOfScript_script4) -- [Index](#@Index_6) +- [Index](#@Index_4) @@ -31,120 +27,20 @@ The script yet_another< ## Some Scripts +> undefined move-include `some` - -### Script `some` - - -
- - -This script does really nothing but just aborts. - - -
fun some<T>(_account: signer)
-
- - - -
-Implementation - - -
fun some<T>(_account: signer) {
-    abort 1
-}
-
- - - -
- - - -#### Specification - - - - -##### Function `some` - - -
fun some<T>(_account: signer)
-
- - - - -
aborts_if true with 1;
-
- - - - - - + ## Other Scripts - - - -### Script `other` - - - -
- - -This script does also abort. - - -
fun other<T>(_account: signer)
-
- - - -
-Implementation - - -
fun other<T>(_account: signer) {
-    abort 2
-}
-
- - - -
- - - -#### Specification - - - - -##### Function `other` - - -
fun other<T>(_account: signer)
-
- - - - -
aborts_if true with 2;
-
- - +> undefined move-include `other` - + ## Some other scripts from a module @@ -268,13 +164,13 @@ This is another script - + ## Index +- [`_0`](root_template_script2.md#_0) +- [`_1`](root_template_script1.md#_1) +- [`_2`](root_template_script3.md#_2) - [`0x1::AnotherTypeOfScript`](root.md#0x1_AnotherTypeOfScript) - [`0x1::OneTypeOfScript`](root.md#0x1_OneTypeOfScript) -- [`other`](root.md#other) -- [`some`](root.md#some) -- [`yet_another`](root_template_script3.md#yet_another) diff --git a/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_inline.md b/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_inline.md index fe8ec37640a18..b498624df3027 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_inline.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_inline.md @@ -1,7 +1,7 @@ - + -# Script `some` +# Script `_0` @@ -13,7 +13,7 @@ This script does really nothing but just aborts. -
fun some<T>(_account: signer)
+
fun some<T>(_account: signer)
 
@@ -22,7 +22,7 @@ This script does really nothing but just aborts. Implementation -
fun some<T>(_account: signer) {
+
fun some<T>(_account: signer) {
     abort 1
 }
 
diff --git a/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_inline_no_fold.md b/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_inline_no_fold.md index 2ee79ecd8031f..864a17d0dd22f 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_inline_no_fold.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_inline_no_fold.md @@ -1,7 +1,7 @@ - + -# Script `some` +# Script `_0` @@ -13,7 +13,7 @@ This script does really nothing but just aborts. -
fun some<T>(_account: signer)
+
fun some<T>(_account: signer)
 
@@ -21,7 +21,7 @@ This script does really nothing but just aborts. ##### Implementation -
fun some<T>(_account: signer) {
+
fun some<T>(_account: signer) {
     abort 1
 }
 
diff --git a/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_separate.md b/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_separate.md index fe8ec37640a18..b498624df3027 100644 --- a/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_separate.md +++ b/third_party/move/move-prover/move-docgen/tests/sources/some_script.spec_separate.md @@ -1,7 +1,7 @@ - + -# Script `some` +# Script `_0` @@ -13,7 +13,7 @@ This script does really nothing but just aborts. -
fun some<T>(_account: signer)
+
fun some<T>(_account: signer)
 
@@ -22,7 +22,7 @@ This script does really nothing but just aborts. Implementation -
fun some<T>(_account: signer) {
+
fun some<T>(_account: signer) {
     abort 1
 }
 
diff --git a/third_party/move/move-prover/move-docgen/tests/testsuite.rs b/third_party/move/move-prover/move-docgen/tests/testsuite.rs index 0d24cac2e4429..3975ee365ed76 100644 --- a/third_party/move/move-prover/move-docgen/tests/testsuite.rs +++ b/third_party/move/move-prover/move-docgen/tests/testsuite.rs @@ -7,7 +7,7 @@ use itertools::Itertools; #[allow(unused_imports)] use log::debug; use move_model::metadata::LanguageVersion; -use move_prover::{cli::Options, run_move_prover, run_move_prover_v2}; +use move_prover::{cli::Options, run_move_prover_v2}; use move_prover_test_utils::baseline_test::verify_or_update_baseline; use std::{ fs::File, @@ -95,12 +95,7 @@ fn test_docgen(path: &Path, mut options: Options, suffix: &str) -> anyhow::Resul } let mut error_writer = Buffer::no_color(); - let prover_runner = if path.to_str().is_some_and(|s| s.contains(V2_TEST_DIR)) { - run_move_prover_v2 - } else { - run_move_prover - }; - let mut output = match prover_runner(&mut error_writer, options) { + let mut output = match run_move_prover_v2(&mut error_writer, options) { Ok(()) => { let mut contents = String::new(); debug!("writing to {}", temp_path.display()); diff --git a/third_party/move/move-prover/src/cli.rs b/third_party/move/move-prover/src/cli.rs index db199facd0039..2a2f0faa0554f 100644 --- a/third_party/move/move-prover/src/cli.rs +++ b/third_party/move/move-prover/src/cli.rs @@ -124,7 +124,7 @@ impl Default for Options { CompilerVersion::V1 => false, CompilerVersion::V2_0 | CompilerVersion::V2_1 => true, }, - language_version: None, + language_version: Some(LanguageVersion::default()), } } } diff --git a/third_party/move/testing-infra/transactional-test-runner/src/vm_test_harness.rs b/third_party/move/testing-infra/transactional-test-runner/src/vm_test_harness.rs index bd8d11f25d2cd..e86f42f374872 100644 --- a/third_party/move/testing-infra/transactional-test-runner/src/vm_test_harness.rs +++ b/third_party/move/testing-infra/transactional-test-runner/src/vm_test_harness.rs @@ -660,10 +660,7 @@ pub fn run_test(path: &Path) -> Result<(), Box> { } pub fn run_test_v1(path: &Path) -> Result<(), Box> { - run_test_with_config( - TestRunConfig::CompilerV1, - path, - ) + run_test_with_config(TestRunConfig::CompilerV1, path) } fn precompiled_v1_stdlib_if_needed(