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
Allow should panic flag for rune test functions like this:
#[test]#[should_panic]pubfntest(){let object = #{ field:1};let object2 = object;println!("field: {}", object.field);// move the variable into the drop function and consume itdrop(object2);// This will failprintln!("field: {}", object.field);}
The text was updated successfully, but these errors were encountered:
Yeah I have seen that. My problem is for our documentation with Zola (non API documentation) I load scripts from a file. This allows me to test them and use them in the documentation in parallel.
See an example here: Exolynk Documentation
For that I need to explain the should_panic within the rune script itself.
Yeah, totally understandable. This should be fairly easy to add since the infrastructure is mostly already in place. We just need to parse the attribute and propagate it out with how the test functions are collected.
udoprog
changed the title
Support should_panic for rune tests
request: support should_panic for #[test] functions
Aug 15, 2024
Allow should panic flag for rune test functions like this:
The text was updated successfully, but these errors were encountered: