Skip to content

Commit

Permalink
[verifier] Migrate entry_point tests (MystenLabs#2014)
Browse files Browse the repository at this point in the history
- Migrated to expected output tests
  • Loading branch information
tnowacki authored May 17, 2022
1 parent 41c5506 commit 09a5ed6
Show file tree
Hide file tree
Showing 19 changed files with 205 additions and 481 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
processed 1 task

task 0 'publish'. lines 4-16:
created: object(103)
written: object(102)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.M {
import 0x2.ID;
import 0x2.TxContext;
struct Obj<T> has key {
id: ID.VersionedID,
}
public(script) foo<T0: key, T1: store>(l0: T0, l1: Self.Obj<T1>, c: &mut TxContext.TxContext) {
label l0:
abort 0;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
processed 1 task

task 0 'publish'. lines 4-16:
created: object(103)
written: object(102)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.M {
import 0x2.ID;
import 0x2.TxContext;
struct Obj has key {
id: ID.VersionedID,
}
public(script) foo<T>(l0: Self.Obj, l1: u64, l2: T, ctx: &mut TxContext.TxContext) {
label l0:
abort 0;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
processed 1 task

task 0 'publish'. lines 4-13:
created: object(103)
written: object(102)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.M {
import 0x2.TxContext;

public(script) foo<T>(l: vector<vector<T>>, ctx: &mut TxContext.TxContext) {
label l0:
abort 0;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
processed 1 task

task 0 'publish'. lines 4-13:
created: object(103)
written: object(102)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.M {
import 0x2.TxContext;

public(script) foo<T: key>(l: vector<vector<T>>, ctx: &mut TxContext.TxContext) {
label l0:
abort 0;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
processed 4 tasks

task 0 'publish'. lines 4-11:
Error: Failed to verify the Move module, reason: "Entry function foo cannot have return values".

task 1 'publish'. lines 13-20:
Error: Failed to verify the Move module, reason: "Entry function foo cannot have return values".

task 2 'publish'. lines 22-29:
Error: Failed to verify the Move module, reason: "Entry function foo cannot have return values".

task 3 'publish'. lines 32-39:
Error: Failed to verify the Move module, reason: "Entry function foo cannot have return values".
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.M {
import 0x2.TxContext;
public(script) foo(ctx: &mut TxContext.TxContext): u64 {
label l0:
abort 0;
}
}

//# publish
module 0x0.M {
import 0x2.TxContext;
public(script) foo(ctx: &mut TxContext.TxContext): u64 * u8 {
label l0:
abort 0;
}
}

//# publish
module 0x0.M {
import 0x2.TxContext;
public(script) foo(ctx: &mut TxContext.TxContext): vector<u8> {
label l0:
abort 0;
}
}


//# publish
module 0x0.M {
import 0x2.TxContext;
public(script) foo(ctx: &mut TxContext.TxContext): &u8 {
label l0:
abort 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
processed 1 task

task 0 'publish'. lines 4-13:
created: object(103)
written: object(102)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.M {
import 0x2.TxContext;

public(script) foo<T>(l: vector<T>, ctx: &mut TxContext.TxContext) {
label l0:
abort 0;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
processed 1 task

task 0 'publish'. lines 4-13:
created: object(103)
written: object(102)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.M {
import 0x2.TxContext;

public(script) foo<T>(l: T, ctx: &mut TxContext.TxContext) {
label l0:
abort 0;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
processed 1 task

task 0 'publish'. lines 4-16:
created: object(103)
written: object(102)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.M {
import 0x2.ID;
import 0x2.TxContext;
struct Obj<T> has key {
id: ID.VersionedID,
}
public(script) foo<T>(l: Self.Obj<T>, ctx: &mut TxContext.TxContext) {
label l0:
abort 0;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
processed 1 task

task 0 'publish'. lines 4-13:
created: object(103)
written: object(102)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.M {
import 0x2.TxContext;

public(script) foo<T: key>(l: T, ctx: &mut TxContext.TxContext) {
label l0:
abort 0;
}

}
Loading

0 comments on commit 09a5ed6

Please sign in to comment.