test: add unit test for empty string

This commit is contained in:
Brice Dobry
2022-06-24 23:00:48 -04:00
parent 0ed401ff99
commit 27ecc4ab8b

View File

@@ -3216,4 +3216,12 @@ mod tests {
Err(e) => assert_eq!(e.err, ParseErrors::Lexer(LexerError::InvalidCharInt('g'))),
}
}
#[test]
fn test_empty_contract() {
let (stmts, diagnostics, success) = parse_collect_diagnostics("");
assert_eq!(success, true);
assert_eq!(stmts.len(), 0);
assert_eq!(diagnostics.len(), 0);
}
}