2020-06-09 03:28:09 +03:00
|
|
|
use crate::parse_program;
|
|
|
|
use leo_ast::ParserError;
|
2020-06-05 01:44:38 +03:00
|
|
|
use leo_compiler::errors::CompilerError;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_semicolon() {
|
2020-06-09 03:28:09 +03:00
|
|
|
let bytes = include_bytes!("semicolon.leo");
|
|
|
|
let error = parse_program(bytes).err().unwrap();
|
2020-06-05 01:44:38 +03:00
|
|
|
|
|
|
|
match error {
|
2020-06-09 03:28:09 +03:00
|
|
|
CompilerError::ParserError(ParserError::SyntaxError(_)) => {}
|
2020-06-08 08:21:31 +03:00
|
|
|
_ => panic!("test_semicolon failed the wrong expected error, should be a ParserError"),
|
2020-06-05 01:44:38 +03:00
|
|
|
}
|
|
|
|
}
|