[fine] Test for function return type mismatch
This commit is contained in:
parent
d893002ec2
commit
44bc072b04
4 changed files with 23 additions and 6 deletions
|
|
@ -87,6 +87,11 @@ fn generate_test_for_file(path: PathBuf) -> String {
|
|||
assertions.push(quote! {
|
||||
crate::assert_eval_ok(&_tree, &_lines, #expected);
|
||||
});
|
||||
} else if let Some(line) = line.strip_prefix("@check-error:") {
|
||||
let expected = line.trim();
|
||||
assertions.push(quote! {
|
||||
crate::assert_check_error(&_tree, &_lines, #expected);
|
||||
});
|
||||
} else if line.starts_with("@") {
|
||||
panic!("Test file {display_path} has unknown directive: {line}");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue