Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar committed Oct 11, 2023
1 parent 595201e commit 221a981
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions crates/rooch-framework-tests/tests/cases/object/basic.exp
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
processed 10 tasks

task 1 'publish'. lines 3-45:
task 1 'publish'. lines 3-40:
status EXECUTED

task 2 'run'. lines 47-47:
task 2 'run'. lines 42-42:
status EXECUTED

task 3 'view_object'. lines 49-51:
task 3 'view_object'. lines 44-46:
Object { id: ObjectID(ae43e34e51db9c833ab50dd9aa8b27106519e5bbfd533737306e7b69ef253647), owner: 0000000000000000000000000000000000000000000000000000000000000043, value: AnnotatedMoveStruct { abilities: [Store, Key, ], type_: StructTag { address: 0000000000000000000000000000000000000000000000000000000000000042, module: Identifier("m"), name: Identifier("S"), type_params: [] }, value: [(Identifier("v"), U8(1))] } }

task 4 'run'. lines 53-53:
task 4 'run'. lines 48-48:
status EXECUTED

task 5 'view_object'. lines 55-58:
task 5 'view_object'. lines 50-53:
Object { id: ObjectID(0bbaf311ae6768a532b1f9dee65b1758a7bb1114fd57df8fa94cb2d1cb5f6896), owner: 0000000000000000000000000000000000000000000000000000000000000043, value: AnnotatedMoveStruct { abilities: [Store, Key, ], type_: StructTag { address: 0000000000000000000000000000000000000000000000000000000000000042, module: Identifier("m"), name: Identifier("Cup"), type_params: [Struct(StructTag { address: 0000000000000000000000000000000000000000000000000000000000000042, module: Identifier("m"), name: Identifier("S"), type_params: [] })] }, value: [(Identifier("v"), U8(2))] } }

task 6 'run'. lines 60-60:
task 6 'run'. lines 55-55:
status EXECUTED

task 7 'view'. lines 62-64:
task 7 'view'. lines 57-59:
store key 0x42::m::S {
v: 1u8
}

task 8 'run'. lines 66-66:
task 8 'run'. lines 61-61:
status EXECUTED

task 9 'view'. lines 68-68:
task 9 'view'. lines 63-63:
store key 0x42::m::Cup<0x42::m::S> {
v: 2u8
}
2 changes: 0 additions & 2 deletions crates/rooch-framework-tests/tests/cases/object/basic.move
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

module test::m {
use moveos_std::context::{Self, Context};
use moveos_std::object;
use moveos_std::object_id::ObjectID;
use moveos_std::account_storage;
use std::debug;
Expand Down Expand Up @@ -34,7 +33,6 @@ module test::m {

public entry fun move_cup_to_global<T:store>(ctx: &mut Context, sender: signer, object_id: ObjectID) {
let (_id,_owner,value) = context::remove_object<Cup<S>>(ctx, object_id);
debug::print(&obj);
account_storage::global_move_to(ctx, &sender, value);
}
}
Expand Down
19 changes: 11 additions & 8 deletions crates/rooch-framework-tests/tests/cases/object/object_cap.exp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ processed 3 tasks
task 1 'publish'. lines 3-21:
status EXECUTED

task 2 'run'. lines 22-36:
Error: error[E01002]: unexpected token
┌─ /tmp/tempfile:31:47
task 2 'run'. lines 22-34:
Error: error: resource type "TestObject" in function "0x2::context::new_object" not defined in current module or not allowed
┌─ /tmp/tempfile:29:23
31 │ let context::remove_object<TestObject>(ctx, object_ref::id(&obj_ref));
│ ^
│ │
│ Unexpected '('
│ Expected '{'
29 │ let obj_ref = context::new_object<TestObject>(ctx, object);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: resource type "TestObject" in function "0x2::context::remove_object" not defined in current module or not allowed
┌─ /tmp/tempfile:30:42
30 │ let (_id, _owner, test_object) = context::remove_object<TestObject>(ctx, object_ref::id(&obj_ref));
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ module test::m {
//# run --signers A
script {
use moveos_std::context::{Self, Context};
use moveos_std::object;
use moveos_std::object_ref;
use test::m::{Self, TestObject};

Expand Down

0 comments on commit 221a981

Please sign in to comment.