Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the TxContext in the move test file. #362

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 │ │ }
│ ╰─────^


Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

//# publish
module creator::test {
use moveos_std::tx_context;

struct Foo has copy, drop {
x: u64,
}

entry public fun test_entry_function_invalid_struct( _foo: Foo ){

}

entry public fun test_entry_function_invalid_struct_txcontext( _: &tx_context::TxContext ){

}
}
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 │ │ }
│ ╰─────^


Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//# publish
module creator::test {
use moveos_std::storage_context;
use moveos_std::tx_context;


entry public fun test_entry_function_valid_reference_signer( _: & signer ){

Expand All @@ -21,13 +19,4 @@ module creator::test {
entry public fun test_entry_function_valid_reference_mut_storage_context( _: &mut storage_context::StorageContext ){

}

entry public fun test_entry_function_valid_reference_tx_context( _: & tx_context::TxContext ){

}

entry public fun test_entry_function_valid_reference_mut_tx_context( _: &mut tx_context::TxContext ){

}

}
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module creator::test {
use std::ascii;
use moveos_std::storage_context;
use moveos_std::object_id;
use moveos_std::tx_context;


entry public fun test_entry_function_valid_struct_string( _str: string::String ){

Expand All @@ -24,9 +22,4 @@ module creator::test {
entry public fun test_entry_function_valid_struct_object_id( _id: object_id::ObjectID ){

}

entry public fun test_entry_function_valid_struct_tx_context( _ctx: &mut tx_context::TxContext ){

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,7 @@ impl IntegrationTest {
construct_pre_compiled_lib(targets.clone(), None, move_compiler::Flags::empty())?;
let pre_compiled_lib = match program_res {
Ok(af) => af,
Err((files, errors)) => {
eprintln!("!!!Package failed to compile!!!");
move_compiler::diagnostics::report_diagnostics(&files, errors)
}
Err((files, errors)) => move_compiler::diagnostics::report_diagnostics(&files, errors),
};
{
// update the global
Expand Down
Loading