Convert `rust_sdk_invalid_stack_offset_movup_16_issue_831` test to lit test
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
The issue is about converting an existing test to a lit test. Look at the existing test rust_sdk_invalid_stack_offset_movup_16_issue_831 to understand its purpose. Then, follow the instructions in the issue body: create a directory tests/lit/issue831 with lit.suite.toml and test.masm files. The test should run bin/cargo-miden build and succeed without any error output. Check the project's existing lit tests for examples of structure and syntax.
Written by the indexing model from the issue text.
Description
From https://github.com/0xMiden/compiler/pull/869#discussion_r2687339717:
This is a good example of something we should use
litfor. If you move this reproducer crate totests/lit/issue831, and in that directory add two files:
lit.suite.toml:name = "issue831" patterns = ["*.masm"] working_dir = "../../../" [format.shtest]
test.masm:;; RUN: cargo miden build --release --manifest-path %S/test-project/Cargo.toml --emit=masm=- 2>&1 | filecheck %s
This would run globally installed cargo-miden. So probably bin/cargo-miden build ....
;; CHECK-NOT: invalid stack offset for movup: 16 is out of range
;; CHECK: proc {{.}}create_swapp_note{{.}}This test will fail if the output of `cargo miden build` contains the error message, and succeeds so long as we observe the expected procedure definition in the emitted MASM (that part may need to be tweaked, I just threw that in as an example). The `CHECK:` directive here just acts as a positive test to avoid false positives due to compilation failing for a reason other than the one related to issue 831.
The create_swapp_note is inlined so there is no need to check the MASM. Also I'd like it to fail on any error and not only on the "invalid stack offset ..." error. So the only check is that the build succeeds.
- Dominant language
- Rust
- Stars
- 116
- Forks
- 84
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 0xMiden/compiler
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
0xMiden/compiler#1327 · 1 comment · 1 reaction · 1 assignee ·
-
debugging
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
All issues in 0xMiden/compiler
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100