-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating documentation for u256 (#5111)
## Description This PR is part of #4794 and updates documentation for `u256` and improves test for edge cases. Code also prints more info when tests run in `verbose` mode. ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [x] I have added tests that prove my fix is effective or that my feature works. - [x] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers. --------- Co-authored-by: IGI-111 <[email protected]>
- Loading branch information
Showing
21 changed files
with
176 additions
and
49 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
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
34 changes: 34 additions & 0 deletions
34
test/src/e2e_vm_tests/test_programs/should_pass/language/u256/u256_abi/json_abi_oracle.json
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,34 @@ | ||
{ | ||
"configurables": [], | ||
"functions": [ | ||
{ | ||
"attributes": null, | ||
"inputs": [], | ||
"name": "main", | ||
"output": { | ||
"name": "", | ||
"type": 0, | ||
"typeArguments": null | ||
} | ||
} | ||
], | ||
"loggedTypes": [ | ||
{ | ||
"logId": 0, | ||
"loggedType": { | ||
"name": "", | ||
"type": 0, | ||
"typeArguments": null | ||
} | ||
} | ||
], | ||
"messagesTypes": [], | ||
"types": [ | ||
{ | ||
"components": null, | ||
"type": "u256", | ||
"typeId": 0, | ||
"typeParameters": null | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
test/src/e2e_vm_tests/test_programs/should_pass/language/u256/u256_abi/src/main.sw
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,6 @@ | ||
script; | ||
|
||
fn main() -> u256 { | ||
log(0x00000000000000000000000000000000000000000000000000000002u256); | ||
0x00000000000000000000000000000000000000000000000000000001u256 | ||
} |
2 changes: 1 addition & 1 deletion
2
...grams/should_pass/language/u256/test.toml → ...uld_pass/language/u256/u256_abi/test.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
category = "run" | ||
expected_result = { action = "return_data", value = "0000000000000000000000000000000000000000000000000000000000000017" } | ||
expected_result = { action = "return_data", value = "0000000000000000000000000000000000000000000000000000000000000001" } | ||
validate_abi = true |
13 changes: 13 additions & 0 deletions
13
test/src/e2e_vm_tests/test_programs/should_pass/language/u256/u256_operators/Forc.lock
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,13 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'path+from-root-969A3D730A6A09C1' | ||
|
||
[[package]] | ||
name = 'ops' | ||
source = 'member' | ||
dependencies = ['std'] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'path+from-root-969A3D730A6A09C1' | ||
dependencies = ['core'] |
8 changes: 8 additions & 0 deletions
8
test/src/e2e_vm_tests/test_programs/should_pass/language/u256/u256_operators/Forc.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,8 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "ops" | ||
|
||
[dependencies] | ||
std = { path = "../../../../../../../../sway-lib-std" } |
File renamed without changes.
Oops, something went wrong.