[fine] test compilation, start removing print
This commit is contained in:
parent
d8db65af55
commit
d8988cb2cf
8 changed files with 239 additions and 81 deletions
|
|
@ -37,6 +37,21 @@ fn generate_test_for_file(path: PathBuf) -> String {
|
|||
assertions.push(quote! {
|
||||
crate::assert_concrete(&_tree, #concrete, #display_path);
|
||||
});
|
||||
} else if line == "@compiles-to:" {
|
||||
let mut compiled = String::new();
|
||||
while let Some(line) = lines.next() {
|
||||
let line = match line.strip_prefix("// | ") {
|
||||
Some(line) => line,
|
||||
None => break,
|
||||
};
|
||||
|
||||
compiled.push_str(line);
|
||||
compiled.push_str("\n");
|
||||
}
|
||||
|
||||
assertions.push(quote! {
|
||||
crate::assert_compiles_to(&_tree, &_lines, #compiled, #display_path);
|
||||
});
|
||||
} else if let Some(line) = line.strip_prefix("@type:") {
|
||||
let (pos, expected) = line
|
||||
.trim()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue