[fine] Tweak syntax for assertions to make me happier
This commit is contained in:
parent
758aef4db9
commit
8835d9eaf2
12 changed files with 104 additions and 25 deletions
|
|
@ -17,7 +17,7 @@ fn generate_test_for_file(path: PathBuf) -> String {
|
|||
};
|
||||
|
||||
let line = line.trim();
|
||||
if line == "concrete:" {
|
||||
if line == "@concrete:" {
|
||||
let mut concrete = String::new();
|
||||
while let Some(line) = lines.next() {
|
||||
let line = match line.strip_prefix("// | ") {
|
||||
|
|
@ -32,7 +32,7 @@ fn generate_test_for_file(path: PathBuf) -> String {
|
|||
assertions.push(quote! {
|
||||
crate::assert_concrete(&_tree, #concrete, #display_path);
|
||||
});
|
||||
} else if let Some(line) = line.strip_prefix("type:") {
|
||||
} else if let Some(line) = line.strip_prefix("@type:") {
|
||||
let (pos, expected) = line
|
||||
.trim()
|
||||
.split_once(' ')
|
||||
|
|
@ -45,7 +45,7 @@ fn generate_test_for_file(path: PathBuf) -> String {
|
|||
assertions.push(quote! {
|
||||
crate::assert_type_at(&_tree, &_lines, #pos, #expected, #display_path);
|
||||
});
|
||||
} else if let Some(line) = line.strip_prefix("type-error:") {
|
||||
} else if let Some(line) = line.strip_prefix("@type-error:") {
|
||||
let (pos, expected) = line
|
||||
.trim()
|
||||
.split_once(' ')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue