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
Running nargo test however produces the below output (and no test is inserted as shown by the final lines)
$ nargo test
warning: Failed to parse macro's token stream into top-level item
┌─ src/main.nr:1:1
│
1 │ #[make_test]
│ ------------
│ │
│ Unsafe block must start with a safety comment: //@safety
│ Missing Safety Comment
│
= The resulting token stream was: (stream starts on next line)
#[test]fn bar() {
unsafe {
}
}
= To avoid this error in the future, try adding input validation to your macro. Erroring out early with an `assert` can be a good way to provide a user-friendly error message
[tmep] Running 0 test functions
[tmep] 0 tests passed
We should find out why this warning results in the macro failing to insert this function and fix it. We should also throw a hard error if we reach a situation where we're not properly unquoting values like this as opposed to failing silently.
The text was updated successfully, but these errors were encountered:
This was first noted by @kashbrti.
The snippet below is expected to insert a test function into the program which consists of an empty
unsafe
block.Running nargo test however produces the below output (and no test is inserted as shown by the final lines)
We should find out why this warning results in the macro failing to insert this function and fix it. We should also throw a hard error if we reach a situation where we're not properly unquoting values like this as opposed to failing silently.
The text was updated successfully, but these errors were encountered: