From 09818747870ab4bba90ea9dd080b739bd5c6fa88 Mon Sep 17 00:00:00 2001 From: gluax <16431709+gluax@users.noreply.github.com> Date: Fri, 28 Jan 2022 11:30:45 -0800 Subject: [PATCH] tested all unreachables --- .../parser/parser/unreachable/define.leo.out | 5 ++ tests/parser/unreachable/define.leo | 53 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 tests/expectations/parser/parser/unreachable/define.leo.out create mode 100644 tests/parser/unreachable/define.leo diff --git a/tests/expectations/parser/parser/unreachable/define.leo.out b/tests/expectations/parser/parser/unreachable/define.leo.out new file mode 100644 index 0000000000..bf28b4b9ea --- /dev/null +++ b/tests/expectations/parser/parser/unreachable/define.leo.out @@ -0,0 +1,5 @@ +--- +namespace: ParseStatement +expectation: Fail +outputs: + - "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:1\n |\n 1 | ; x = 10u8;\n | ^" diff --git a/tests/parser/unreachable/define.leo b/tests/parser/unreachable/define.leo new file mode 100644 index 0000000000..dcef3aeb31 --- /dev/null +++ b/tests/parser/unreachable/define.leo @@ -0,0 +1,53 @@ +/* +namespace: ParseStatement +expectation: Fail +*/ + +; x = 10u8; +. x = 10u8; +import x = 10u8; +, x = 10u8; +[ x = 10u8; +] x = 10u8; +{ x = 10u8; +} x = 10u8; +( x = 10u8; +) x = 10u8; +: x = 10u8; +:: x = 10u8; +? x = 10u8; +_ x = 10u8; += x = 10u8; +== x = 10u8; +! x = 10u8; +!= x = 10u8; +> x = 10u8; +>= x = 10u8; +< x = 10u8; +<= x = 10u8; +> x = 10u8; +.. x = 10u8; +as x = 10u8; +console x = 10u8; +const x = 10u8; +let x = 10u8; +for x = 10u8; +if x = 10u8; +else x = 10u8; +i8 x = 10u8; +i16 x = 10u8; +i32 x = 10u8; +i64 x = 10u8; +i128 x = 10u8; +u8 x = 10u8; +u16 x = 10u8; +u32 x = 10u8; +u64 x = 10u8; +u128 x = 10u8; +& x = 10u8; +return x = 10u8; +self x = 10u8; +Self x = 10u8; +true x = 10u8; +false x = 10u8; +0 x = 10u8; \ No newline at end of file