You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the error message passed to static_assert is ignored and "Argument is false" is always used:
❯ ~/.nargo/bin/nargo compile
❯ ~/.nargo/bin/nargo test
[test_static_assert_should_fail_with] Running 1 test function
[test_static_assert_should_fail_with] Testing test_main... FAIL
error: Test failed with the wrong message.
Expected: hi
Got:
error: Argument is false
┌─ src/main.nr:10:5
│
10 │ foo::<1>();
│ ----------
│
= Call stack:
1. src/main.nr:4:5
2. src/main.nr:10:5
[test_static_assert_should_fail_with] Failures:
test_main
[test_static_assert_should_fail_with] 1 test failed
With the following:
#[test(should_fail_with = "Argument is false")]
fntest_main() {
foo::<1>();
}
The test passes:
❯ ~/.nargo/bin/nargo test
[test_static_assert_should_fail_with] Running 1 test function
[test_static_assert_should_fail_with] Testing test_main... ok
[test_static_assert_should_fail_with] 1 test passed
To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
nargo version = 1.0.0-beta.1 noirc version = 1.0.0-beta.1+8bb3908281d531160db7d7898c67fb2647792e6e (git version hash: 8bb3908, is dirty: false)
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered:
Aim
Attempted to ensure that a test failed with the message from a
static_assert
:Expected Behavior
Expected
test_main
to passBug
It appears that the error message passed to
static_assert
is ignored and"Argument is false"
is always used:With the following:
The test passes:
To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
nargo version = 1.0.0-beta.1 noirc version = 1.0.0-beta.1+8bb3908281d531160db7d7898c67fb2647792e6e (git version hash: 8bb3908, is dirty: false)
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: