Skip to content

Commit

Permalink
update move-abi and doc-gen test using v2
Browse files Browse the repository at this point in the history
  • Loading branch information
rahxephon89 authored and sherry-x committed Jan 10, 2025
1 parent 87767e8 commit a1b900b
Show file tree
Hide file tree
Showing 18 changed files with 83 additions and 355 deletions.
Original file line number Diff line number Diff line change
@@ -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'
│ ^^^^
Original file line number Diff line number Diff line change
@@ -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'
│ ^^^^^^^
4 changes: 2 additions & 2 deletions third_party/move/move-prover/move-abigen/tests/testsuite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@



<a id="main"></a>
<a id="<SELF>_0"></a>

# Script `main`
# Script `<SELF>_0`



Expand All @@ -193,18 +193,18 @@
## Constants


<a id="main_C"></a>
<a id="<SELF>_0_C"></a>



<pre><code><b>const</b> <a href="attribute_placement.md#main_C">C</a>: u64 = 0;
<pre><code><b>const</b> <a href="attribute_placement.md#<SELF>_0_C">C</a>: u64 = 0;
</code></pre>




<pre><code>#[attr14]
<b>fun</b> <a href="attribute_placement.md#main">main</a>()
<b>fun</b> <a href="attribute_placement.md#<SELF>_0_main">main</a>()
</code></pre>


Expand All @@ -213,7 +213,7 @@
<summary>Implementation</summary>


<pre><code><b>fun</b> <a href="attribute_placement.md#main">main</a>() {
<pre><code><b>fun</b> <a href="attribute_placement.md#<SELF>_0_main">main</a>() {
<a href="attribute_placement.md#0x42_M_foo">M::foo</a>();
}
</code></pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@



<a id="main"></a>
<a id="<SELF>_0"></a>

# Script `main`
# Script `<SELF>_0`



Expand All @@ -174,26 +174,26 @@
## Constants


<a id="main_C"></a>
<a id="<SELF>_0_C"></a>



<pre><code><b>const</b> <a href="attribute_placement.md#main_C">C</a>: u64 = 0;
<pre><code><b>const</b> <a href="attribute_placement.md#<SELF>_0_C">C</a>: u64 = 0;
</code></pre>




<pre><code>#[attr14]
<b>fun</b> <a href="attribute_placement.md#main">main</a>()
<b>fun</b> <a href="attribute_placement.md#<SELF>_0_main">main</a>()
</code></pre>



##### Implementation


<pre><code><b>fun</b> <a href="attribute_placement.md#main">main</a>() {
<pre><code><b>fun</b> <a href="attribute_placement.md#<SELF>_0_main">main</a>() {
<a href="attribute_placement.md#0x42_M_foo">M::foo</a>();
}
</code></pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@



<a id="main"></a>
<a id="<SELF>_0"></a>

# Script `main`
# Script `<SELF>_0`



Expand All @@ -205,18 +205,18 @@
## Constants


<a id="main_C"></a>
<a id="<SELF>_0_C"></a>



<pre><code><b>const</b> <a href="attribute_placement.md#main_C">C</a>: u64 = 0;
<pre><code><b>const</b> <a href="attribute_placement.md#<SELF>_0_C">C</a>: u64 = 0;
</code></pre>




<pre><code>#[attr14]
<b>fun</b> <a href="attribute_placement.md#main">main</a>()
<b>fun</b> <a href="attribute_placement.md#<SELF>_0_main">main</a>()
</code></pre>


Expand All @@ -225,7 +225,7 @@
<summary>Implementation</summary>


<pre><code><b>fun</b> <a href="attribute_placement.md#main">main</a>() {
<pre><code><b>fun</b> <a href="attribute_placement.md#<SELF>_0_main">main</a>() {
<a href="attribute_placement.md#0x42_M_foo">M::foo</a>();
}
</code></pre>
Expand All @@ -245,5 +245,5 @@


<pre><code>#[attr14]
<b>fun</b> <a href="attribute_placement.md#main">main</a>()
<b>fun</b> <a href="attribute_placement.md#<SELF>_0_main">main</a>()
</code></pre>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<a id="main"></a>
<a id="<SELF>_0"></a>

# Script `main`
# Script `<SELF>_0`



Expand All @@ -22,7 +22,7 @@ code block
then <code>inline code</code>


<pre><code><b>fun</b> <a href="code_block_test.md#main">main</a>()
<pre><code><b>fun</b> <a href="code_block_test.md#<SELF>_0_main">main</a>()
</code></pre>


Expand All @@ -31,7 +31,7 @@ then <code>inline code</code>
<summary>Implementation</summary>


<pre><code><b>fun</b> <a href="code_block_test.md#main">main</a>() { }
<pre><code><b>fun</b> <a href="code_block_test.md#<SELF>_0_main">main</a>() { }
</code></pre>


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<a id="main"></a>
<a id="<SELF>_0"></a>

# Script `main`
# Script `<SELF>_0`



Expand All @@ -22,13 +22,13 @@ code block
then <code>inline code</code>


<pre><code><b>fun</b> <a href="code_block_test.md#main">main</a>()
<pre><code><b>fun</b> <a href="code_block_test.md#<SELF>_0_main">main</a>()
</code></pre>



##### Implementation


<pre><code><b>fun</b> <a href="code_block_test.md#main">main</a>() { }
<pre><code><b>fun</b> <a href="code_block_test.md#<SELF>_0_main">main</a>() { }
</code></pre>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<a id="main"></a>
<a id="<SELF>_0"></a>

# Script `main`
# Script `<SELF>_0`



Expand All @@ -22,7 +22,7 @@ code block
then <code>inline code</code>


<pre><code><b>fun</b> <a href="code_block_test.md#main">main</a>()
<pre><code><b>fun</b> <a href="code_block_test.md#<SELF>_0_main">main</a>()
</code></pre>


Expand All @@ -31,7 +31,7 @@ then <code>inline code</code>
<summary>Implementation</summary>


<pre><code><b>fun</b> <a href="code_block_test.md#main">main</a>() { }
<pre><code><b>fun</b> <a href="code_block_test.md#<SELF>_0_main">main</a>() { }
</code></pre>


Expand Down
Loading

0 comments on commit a1b900b

Please sign in to comment.