Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nargo test does not show callstacks for runtime errors #2929

Closed
sirasistant opened this issue Oct 2, 2023 · 0 comments · Fixed by #2953
Closed

Nargo test does not show callstacks for runtime errors #2929

sirasistant opened this issue Oct 2, 2023 · 0 comments · Fixed by #2953
Assignees
Labels
bug Something isn't working

Comments

@sirasistant
Copy link
Contributor

sirasistant commented Oct 2, 2023

Aim

A test that fails due to values not known at compile time should provide call stacks for errors:

fn main(field: Field) {
    let point = dep::std::hash::pedersen([field]);
    assert_eq(point[0], point[1], "Not equal!");
}


#[test]
fn test_main() {
    main(27);
}

Expected Behavior

Should show a call stack

Bug

Just shows

[test] Running 1 test functions
[test] Testing test_main... Failed assertion: 'Not equal!'
[test] 1 test failed

To Reproduce

Errors that are known during compilation do show a callstack. The problem is in the runtime step.

Installation Method

None

Nargo Version

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@sirasistant sirasistant added the bug Something isn't working label Oct 2, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Oct 2, 2023
@sirasistant sirasistant self-assigned this Oct 2, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant