From a0945e54b24ad8d052d6c58f1e20ae00b6c64b4a Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 1 Nov 2022 22:29:21 +0100 Subject: [PATCH] Update tests Apparently now error reporting works better!! I wonder why... --- tests/body-invalid-expr.json | 2 +- tests/body-not-math-expr.json | 2 +- tests/empty-let.json | 2 +- tests/function-no-in.json | 2 +- tests/invalid-type.json | 2 +- tests/lex-multiple-periods.json | 2 +- tests/lex-unfinished-string.json | 2 +- tests/top-level-math.json | 2 +- tests/unended-function.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/body-invalid-expr.json b/tests/body-invalid-expr.json index 971b605..4c1757c 100644 --- a/tests/body-invalid-expr.json +++ b/tests/body-invalid-expr.json @@ -4,6 +4,6 @@ "flags": [], "exit-code": 1, "stdout": "", - "stderr": "\u001b[1;1mtests/body-invalid-expr.sp:2:7: \u001b[31;49merror: \u001b[0;0mInvalid syntax\n2 \n \u001b[31;49m^\u001b[0;0m\n" + "stderr": "\u001b[1;1mtests/body-invalid-expr.sp:2:8: \u001b[31;49merror: \u001b[0;0mInvalid syntax\n2 0 5 +\n \u001b[31;49m^\u001b[0;0m\n" } } \ No newline at end of file diff --git a/tests/body-not-math-expr.json b/tests/body-not-math-expr.json index e1cb9bc..ca367f0 100644 --- a/tests/body-not-math-expr.json +++ b/tests/body-not-math-expr.json @@ -4,6 +4,6 @@ "flags": [], "exit-code": 1, "stdout": "", - "stderr": "\u001b[1;1mtests/body-not-math-expr.sp:2:5: \u001b[31;49merror: \u001b[0;0mexpected a number\n2 \n \u001b[31;49m^\u001b[0;0m\n" + "stderr": "\u001b[1;1mtests/body-not-math-expr.sp:2:5: \u001b[31;49merror: \u001b[0;0mexpected a number\n2 syscall1(60, 1); // sys_exit(1)\n \u001b[31;49m^\u001b[0;0m\n" } } \ No newline at end of file diff --git a/tests/empty-let.json b/tests/empty-let.json index c61fc44..cf93232 100644 --- a/tests/empty-let.json +++ b/tests/empty-let.json @@ -4,6 +4,6 @@ "flags": [], "exit-code": 1, "stdout": "", - "stderr": "\u001b[1;1mtests/empty-let.sp:1:4: \u001b[31;49merror: \u001b[0;0mExpected @\n1 \n \u001b[31;49m^\u001b[0;0m\n" + "stderr": "\u001b[1;1mtests/empty-let.sp:1:5: \u001b[31;49merror: \u001b[0;0mExpected @\n1 let;\n \u001b[31;49m^\u001b[0;0m\n" } } \ No newline at end of file diff --git a/tests/function-no-in.json b/tests/function-no-in.json index ff39e5a..528152a 100644 --- a/tests/function-no-in.json +++ b/tests/function-no-in.json @@ -4,6 +4,6 @@ "flags": [], "exit-code": 1, "stdout": "", - "stderr": "\u001b[1;1mtests/function-no-in.sp:1:17: \u001b[31;49merror: \u001b[0;0mExpected 'in' or semicolon\n1 \n \u001b[31;49m^\u001b[0;0m\n" + "stderr": "\u001b[1;1mtests/function-no-in.sp:1:20: \u001b[31;49merror: \u001b[0;0mExpected 'in' or semicolon\n1 let @main : i32 {\n \u001b[31;49m^\u001b[0;0m\n" } } \ No newline at end of file diff --git a/tests/invalid-type.json b/tests/invalid-type.json index 6787a37..4f77e3d 100644 --- a/tests/invalid-type.json +++ b/tests/invalid-type.json @@ -4,6 +4,6 @@ "flags": [], "exit-code": 1, "stdout": "", - "stderr": "\u001b[1;1mtests/invalid-type.sp:1:13: \u001b[31;49merror: \u001b[0;0mExpected type name\n1 \n \u001b[31;49m^\u001b[0;0m\n" + "stderr": "\u001b[1;1mtests/invalid-type.sp:1:15: \u001b[31;49merror: \u001b[0;0mExpected type name\n1 let @main : u56 in {\n \u001b[31;49m^\u001b[0;0m\n" } } \ No newline at end of file diff --git a/tests/lex-multiple-periods.json b/tests/lex-multiple-periods.json index 82cecfa..8d3ffbf 100644 --- a/tests/lex-multiple-periods.json +++ b/tests/lex-multiple-periods.json @@ -4,6 +4,6 @@ "flags": [], "exit-code": 1, "stdout": "\u001b[1;1mtests/lex-multiple-periods.sp:2:9: \u001b[33;49mwarning: \u001b[0;0mfloats can only have one dot\n2 3.45.6\n \u001b[33;49m^\u001b[0;0m\n", - "stderr": "\u001b[1;1mtests/lex-multiple-periods.sp:2:9: \u001b[31;49merror: \u001b[0;0mInvalid syntax\n2 \n \u001b[31;49m^\u001b[0;0m\n" + "stderr": "\u001b[1;1mtests/lex-multiple-periods.sp:2:10: \u001b[31;49merror: \u001b[0;0mInvalid syntax\n2 3.45.6\n \u001b[31;49m^\u001b[0;0m\n" } } \ No newline at end of file diff --git a/tests/lex-unfinished-string.json b/tests/lex-unfinished-string.json index f0724a0..ec0c608 100644 --- a/tests/lex-unfinished-string.json +++ b/tests/lex-unfinished-string.json @@ -4,6 +4,6 @@ "flags": [], "exit-code": 1, "stdout": "", - "stderr": "\u001b[1;1mtests/lex-unfinished-string.sp:2:19: \u001b[31;49merror: \u001b[0;0mexpected end of string but got newline\n2 'This is a test\n \u001b[31;49m^\u001b[0;0m\n" + "stderr": "\u001b[1;1mtests/lex-unfinished-string.sp:3:0: \u001b[31;49merror: \u001b[0;0mexpected end of string but got newline\n3 'This is a test\n \u001b[31;49m^\u001b[0;0m\n" } } \ No newline at end of file diff --git a/tests/top-level-math.json b/tests/top-level-math.json index 2a88d26..38334c3 100644 --- a/tests/top-level-math.json +++ b/tests/top-level-math.json @@ -4,6 +4,6 @@ "flags": [], "exit-code": 1, "stdout": "", - "stderr": "\u001b[1;1mtests/top-level-math.sp:1:1: \u001b[31;49merror: \u001b[0;0mExpected let\n1 \n \u001b[31;49m^\u001b[0;0m\n" + "stderr": "\u001b[1;1mtests/top-level-math.sp:1:1: \u001b[31;49merror: \u001b[0;0mExpected let\n1 4 + 5 - 6\n \u001b[31;49m^\u001b[0;0m\n" } } \ No newline at end of file diff --git a/tests/unended-function.json b/tests/unended-function.json index 9200a01..6840828 100644 --- a/tests/unended-function.json +++ b/tests/unended-function.json @@ -4,6 +4,6 @@ "flags": [], "exit-code": 1, "stdout": "", - "stderr": "\u001b[1;1mtests/unended-function.sp:1:11: \u001b[31;49merror: \u001b[0;0mExpected 'in', colon or semicolon\n1 \n \u001b[31;49m^\u001b[0;0m\n" + "stderr": "\u001b[1;1mtests/unended-function.sp:1:12: \u001b[31;49merror: \u001b[0;0mExpected 'in', colon or semicolon\n1 \n \u001b[31;49m^\u001b[0;0m\n" } } \ No newline at end of file