noir-lang / vscode-noir

Apache License 2.0
6 stars 7 forks source link

Add support for testing fail in Testing Panel #44

Open Savio-Sou opened 10 months ago

Savio-Sou commented 10 months ago

Problem

Subsequent to the addition of Testing Panel per https://github.com/noir-lang/vscode-noir/pull/39, devs can now run positive-tests (i.e. #[test]) in the Panel.

But the Panel doesn't support running negative-tests (i.e. #[test(should_fail)]) which devs can already run with Nargo and might expect it to also be runnable in the Panel.

Happy Case

Devs can successfully run both tests below from the Testing Panel:

fn main(x : Field, y : pub Field) {
    assert(x != y);
}

#[test]
fn positive_test() {
    main(1, 2);
}

#[test(should_fail)]
fn negative_test() {
    main(1, 1);
}

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response