forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[move-cli] added unit tests for coverage merging functionality
- Loading branch information
1 parent
be7c260
commit 676934d
Showing
17 changed files
with
89 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
test dummy/test_1/args.txt | ||
test dummy/test_2 | ||
test dummy | ||
test cov | ||
test cov --track-cov | ||
test cov/plain --track-cov | ||
test cov/two-runs-same-module --track-cov | ||
test cov/two-runs-diff-module --track-cov |
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
language/tools/move-cli/tests/metatests/cov/plain/src/modules/M.move
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
address 0x42 { | ||
module M { | ||
public fun test() {} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
language/tools/move-cli/tests/metatests/cov/plain/src/scripts/test.move
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
script { | ||
use 0x42::M; | ||
|
||
fun main() { | ||
M::test(); | ||
} | ||
} |
6 changes: 0 additions & 6 deletions
6
language/tools/move-cli/tests/metatests/cov/src/modules/M.move
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
language/tools/move-cli/tests/metatests/cov/src/scripts/test.move
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
language/tools/move-cli/tests/metatests/cov/two-runs-diff-module/args.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Command `publish src/modules --mode bare`: | ||
Command `run src/scripts/test.move --args 0u8 --mode bare --dry-run`: | ||
Command `run src/scripts/test.move --args 1u8 --mode bare --dry-run`: |
3 changes: 3 additions & 0 deletions
3
language/tools/move-cli/tests/metatests/cov/two-runs-diff-module/args.txt
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
publish src/modules --mode bare | ||
run src/scripts/test.move --args 0u8 --mode bare --dry-run | ||
run src/scripts/test.move --args 1u8 --mode bare --dry-run |
5 changes: 5 additions & 0 deletions
5
language/tools/move-cli/tests/metatests/cov/two-runs-diff-module/src/modules/M1.move
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
address 0x42 { | ||
module M1 { | ||
public fun test() {} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
language/tools/move-cli/tests/metatests/cov/two-runs-diff-module/src/modules/M2.move
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
address 0x42 { | ||
module M2 { | ||
public fun test() {} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
language/tools/move-cli/tests/metatests/cov/two-runs-diff-module/src/scripts/test.move
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
script { | ||
use 0x42::M1; | ||
use 0x42::M2; | ||
|
||
fun main(x: u8) { | ||
if (x == 0) { | ||
M1::test(); | ||
} else { | ||
M2::test(); | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
language/tools/move-cli/tests/metatests/cov/two-runs-same-module/args.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Command `publish src/modules --mode bare`: | ||
Command `run src/scripts/test.move --args 0u8 --mode bare --dry-run`: | ||
Command `run src/scripts/test.move --args 1u8 --mode bare --dry-run`: |
3 changes: 3 additions & 0 deletions
3
language/tools/move-cli/tests/metatests/cov/two-runs-same-module/args.txt
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
publish src/modules --mode bare | ||
run src/scripts/test.move --args 0u8 --mode bare --dry-run | ||
run src/scripts/test.move --args 1u8 --mode bare --dry-run |
11 changes: 11 additions & 0 deletions
11
language/tools/move-cli/tests/metatests/cov/two-runs-same-module/src/modules/M.move
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
address 0x42 { | ||
module M { | ||
public fun test(x: u8) { | ||
if (x == 0) { | ||
return () | ||
} else { | ||
return () | ||
} | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
language/tools/move-cli/tests/metatests/cov/two-runs-same-module/src/scripts/test.move
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
script { | ||
use 0x42::M; | ||
|
||
fun main(x: u8) { | ||
M::test(x); | ||
} | ||
} |