-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Reference any GitHub issues resolved by this PR --> Closes #1652 ## Introduced changes <!-- A brief description of the changes --> - Added option `--max-n-steps` that allow changing steps limit (3_000_000, now default) ## Checklist <!-- Make sure all of these are complete --> - [x] Linked relevant issue - [x] Updated relevant documentation - [x] Added relevant tests - [x] Performed self-review of the code - [x] Added changes to `CHANGELOG.md`
- Loading branch information
Showing
14 changed files
with
265 additions
and
20 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
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 @@ | ||
[package] | ||
name = "steps" | ||
version = "0.1.0" | ||
|
||
# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html | ||
|
||
[dependencies] | ||
starknet = "2.4.0" | ||
snforge_std = { path = "../../../../../snforge_std" } | ||
|
||
[[target.starknet-contract]] | ||
sierra = true |
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,63 @@ | ||
#[cfg(test)] | ||
mod tests { | ||
#[test] | ||
// requires 570031 steps | ||
fn steps_570031() { | ||
let mut i = 0; | ||
|
||
loop { | ||
if i == 30_000 { | ||
break; | ||
} | ||
|
||
i = i + 1; | ||
|
||
assert(1 + 1 == 2, 'who knows?'); | ||
} | ||
} | ||
|
||
#[test] | ||
fn steps_5700031() { | ||
let mut i = 0; | ||
|
||
loop { | ||
if i == 300_000 { | ||
break; | ||
} | ||
|
||
i = i + 1; | ||
|
||
assert(1 + 1 == 2, 'who knows?'); | ||
} | ||
} | ||
|
||
#[test] | ||
fn steps_2999998() { | ||
let mut i = 0; | ||
|
||
loop { | ||
if i == 157_893 { | ||
break; | ||
} | ||
|
||
i = i + 1; | ||
|
||
assert(1 + 1 == 2, 'who knows?'); | ||
} | ||
} | ||
|
||
#[test] | ||
fn steps_3000017() { | ||
let mut i = 0; | ||
|
||
loop { | ||
if i == 157_894 { | ||
break; | ||
} | ||
|
||
i = i + 1; | ||
|
||
assert(1 + 1 == 2, 'who knows?'); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.