Add test: `all_fixed_builtin_mappings_can_compile`

This commit is contained in:
cyqsimon 2023-11-06 10:48:28 +08:00
parent daf33709a0
commit b48bda21a3
No known key found for this signature in database
GPG Key ID: 1D8CE2F297390D65
1 changed files with 9 additions and 0 deletions

View File

@ -174,4 +174,13 @@ mod tests {
Some(MappingTarget::MapToUnknown)
);
}
#[test]
fn all_fixed_builtin_mappings_can_compile() {
let map = SyntaxMapping::new();
// collect call evaluates all lazy closures
// fixed builtin mappings will panic if they fail to compile
let _mappings = map.builtin_mappings().collect::<Vec<_>>();
}
}