-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c66720e
commit 1122494
Showing
4 changed files
with
88 additions
and
10 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
7 changes: 7 additions & 0 deletions
7
aptos-move/e2e-move-tests/src/tests/randomness.data/pack/Move.toml
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 @@ | ||
[package] | ||
name = "randomness_test" | ||
version = "0.0.0" | ||
|
||
[dependencies] | ||
AptosFramework = { local = "../../../../../framework/aptos-framework" } | ||
AptosStdlib = { local = "../../../../../framework/aptos-stdlib" } |
21 changes: 21 additions & 0 deletions
21
aptos-move/e2e-move-tests/src/tests/randomness.data/pack/sources/entry_functions.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,21 @@ | ||
module 0x1::entry_functions { | ||
use aptos_framework::randomness; | ||
|
||
entry fun ok_if_not_annotated_and_not_using_randomness() { | ||
// Do nothing. | ||
} | ||
|
||
#[uses_randomness] | ||
entry fun ok_if_annotated_and_not_using_randomness() { | ||
// Do nothing. | ||
} | ||
|
||
entry fun fail_if_not_annotated_and_using_randomness() { | ||
let _ = randomness::u64_integer(); | ||
} | ||
|
||
#[uses_randomness] | ||
entry fun ok_if_annotated_and_using_randomness() { | ||
let _ = randomness::u64_integer(); | ||
} | ||
} |
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