[fine] Test for function return type mismatch

This commit is contained in:
John Doty 2024-01-15 07:52:49 -08:00
parent d893002ec2
commit 44bc072b04
4 changed files with 23 additions and 6 deletions

View file

@ -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}");
}