Allow include! an empty content file

This commit is contained in:
Edwin Cheng 2021-04-03 12:50:55 +08:00
parent b5804296dd
commit 20d55ce44d
3 changed files with 33 additions and 3 deletions

View file

@ -265,4 +265,17 @@ impl TestDB {
assert_eq!(annotations, actual);
}
pub(crate) fn check_no_diagnostics(&self) {
let db: &TestDB = self;
let annotations = db.extract_annotations();
assert!(annotations.is_empty());
let mut has_diagnostics = false;
db.diagnostics(|_| {
has_diagnostics = true;
});
assert!(!has_diagnostics);
}
}