Skip to content

Commit

Permalink
overflow + enable poe test on biguint
Browse files Browse the repository at this point in the history
  • Loading branch information
alyn509 committed Oct 9, 2023
1 parent d9c77f6 commit a07db35
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "overflow",
"gasSchedule": "v3",
"steps": [
{
"step": "setState",
"accounts": {
"sc:basic-features": {
"nonce": "0",
"balance": "0",
"storage": {},
"code": "file:../output/basic-features.wasm"
},
"address:an_account": {
"nonce": "0",
"balance": "0",
"storage": {},
"code": ""
}
}
},
{
"step": "scCall",
"id": "pow",
"tx": {
"from": "address:an_account",
"to": "sc:basic-features",
"value": "0",
"function": "pow_big_uint",
"arguments": [
"10",
"80"
],
"gasLimit": "50,000,000",
"gasPrice": "0"
},
"expect": {
"out": [
"100000000000000000000000000000000000000000000000000000000000000000000000000000000"
],
"status": "0",
"logs": "*",
"gas": "*",
"refund": "*"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ fn big_uint_sqrt_go() {
world().run("scenarios/big_uint_sqrt.scen.json");
}

#[test]
fn big_uint_pow_go() {
world().run("scenarios/big_uint_pow.scen.json");
}

#[test]
fn big_uint_overflow_go() {
world().run("scenarios/big_uint_overflow.scen.json");
}

#[test]
fn big_uint_to_u_64_go() {
world().run("scenarios/big_uint_to_u64.scen.json");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,19 @@ fn big_uint_from_u_64_rs() {

#[test]
fn big_uint_sqrt_rs() {
world().run("scenarios/big_uint_pow.scen.json");
}

#[test]
fn big_uint_pow_rs() {
world().run("scenarios/big_uint_sqrt.scen.json");
}

#[test]
fn big_uint_overflow_rs() {
world().run("scenarios/big_uint_overflow.scen.json");
}

#[test]
fn big_uint_to_u_64_rs() {
world().run("scenarios/big_uint_to_u64.scen.json");
Expand Down

0 comments on commit a07db35

Please sign in to comment.