-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the TxContext in the move test file. (#362)
cargo fmt Add negative tests for TxContext.
- Loading branch information
1 parent
8394e03
commit b7c061a
Showing
7 changed files
with
28 additions
and
57 deletions.
There are no files selected for viewing
19 changes: 13 additions & 6 deletions
19
crates/rooch-framework-tests/tests/cases/entry_function/entry_function_invalid_struct.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
processed 2 tasks | ||
|
||
task 1 'publish'. lines 3-12: | ||
task 1 'publish'. lines 3-18: | ||
Error: error: type `test::Foo` is not supported as a parameter type | ||
┌─ /tmp/tempfile:8:5 | ||
│ | ||
8 │ ╭ entry public fun test_entry_function_invalid_struct( _foo: Foo ){ | ||
9 │ │ } | ||
│ ╰─────^ | ||
┌─ /tmp/tempfile:9:5 | ||
│ | ||
9 │ ╭ entry public fun test_entry_function_invalid_struct( _foo: Foo ){ | ||
10 │ │ } | ||
│ ╰─────^ | ||
|
||
error: type `&tx_context::TxContext` is not supported as a parameter type | ||
┌─ /tmp/tempfile:11:5 | ||
│ | ||
11 │ ╭ entry public fun test_entry_function_invalid_struct_txcontext( _: &tx_context::TxContext ){ | ||
12 │ │ } | ||
│ ╰─────^ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 6 additions & 20 deletions
26
crates/rooch-framework-tests/tests/cases/entry_function/entry_function_valid_reference.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,11 @@ | ||
processed 2 tasks | ||
|
||
task 1 'publish'. lines 3-33: | ||
task 1 'publish'. lines 3-22: | ||
Error: error: type `&mut signer` is not supported as a parameter type | ||
┌─ /tmp/tempfile:9:5 | ||
│ | ||
9 │ ╭ entry public fun test_entry_function_valid_reference_mut_signer( _: &mut signer ){ | ||
10 │ │ } | ||
│ ╰─────^ | ||
|
||
error: type `&mut tx_context::TxContext` is not supported as a parameter type | ||
┌─ /tmp/tempfile:17:5 | ||
│ | ||
17 │ ╭ entry public fun test_entry_function_valid_reference_mut_tx_context( _: &mut tx_context::TxContext ){ | ||
18 │ │ } | ||
│ ╰─────^ | ||
|
||
error: type `&tx_context::TxContext` is not supported as a parameter type | ||
┌─ /tmp/tempfile:15:5 | ||
│ | ||
15 │ ╭ entry public fun test_entry_function_valid_reference_tx_context( _: & tx_context::TxContext ){ | ||
16 │ │ } | ||
│ ╰─────^ | ||
┌─ /tmp/tempfile:8:5 | ||
│ | ||
8 │ ╭ entry public fun test_entry_function_valid_reference_mut_signer( _: &mut signer ){ | ||
9 │ │ } | ||
│ ╰─────^ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 2 additions & 9 deletions
11
crates/rooch-framework-tests/tests/cases/entry_function/entry_function_valid_struct.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
processed 2 tasks | ||
|
||
task 1 'publish'. lines 3-32: | ||
Error: error: type `&mut tx_context::TxContext` is not supported as a parameter type | ||
┌─ /tmp/tempfile:18:5 | ||
│ | ||
18 │ ╭ entry public fun test_entry_function_valid_struct_tx_context( _ctx: &mut tx_context::TxContext ){ | ||
19 │ │ } | ||
│ ╰─────^ | ||
|
||
|
||
task 1 'publish'. lines 3-25: | ||
status EXECUTED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters