From 5913b3df6c70fcf056b1e4426c9aa764c5fa49a1 Mon Sep 17 00:00:00 2001 From: momoyon Date: Sat, 12 Apr 2025 20:33:26 +0500 Subject: [PATCH] [tests] Update tests. --- test.py | 2 +- tests/.bool.build.in.expected | 2 +- tests/.bool.build.out.expected | 1 + tests/.identifiers.build.in.expected | 2 +- tests/.identifiers.build.out.expected | 1 + tests/.keywords.build.in.expected | 2 +- tests/.keywords.build.out.expected | 1 + tests/.operators.build.in.expected | 2 +- tests/.operators.build.out.expected | 65 ++++++++++++++------------- tests/.strings.build.in.expected | 2 +- tests/.strings.build.out.expected | 1 + 11 files changed, 43 insertions(+), 38 deletions(-) diff --git a/test.py b/test.py index b1c4f52..b17fec0 100755 --- a/test.py +++ b/test.py @@ -342,7 +342,7 @@ def main(): m = '' if res.stderr: m += f"{res.stderr}" - logger.error("[FAILED] {m}") + logger.error(f"[FAILED] {m}") if stop_on_error: exit(1) else: continue diff --git a/tests/.bool.build.in.expected b/tests/.bool.build.in.expected index e062164..8aeb596 100644 --- a/tests/.bool.build.in.expected +++ b/tests/.bool.build.in.expected @@ -1 +1 @@ --d \ No newline at end of file +dump_tokens \ No newline at end of file diff --git a/tests/.bool.build.out.expected b/tests/.bool.build.out.expected index 7afb778..e541dc4 100644 --- a/tests/.bool.build.out.expected +++ b/tests/.bool.build.out.expected @@ -1,2 +1,3 @@ bool.momo:1:0 [BOOL] 'true' bool.momo:2:0 [BOOL] 'false' +bool.momo:3:0 [EOF] 'EOF' diff --git a/tests/.identifiers.build.in.expected b/tests/.identifiers.build.in.expected index e062164..8aeb596 100644 --- a/tests/.identifiers.build.in.expected +++ b/tests/.identifiers.build.in.expected @@ -1 +1 @@ --d \ No newline at end of file +dump_tokens \ No newline at end of file diff --git a/tests/.identifiers.build.out.expected b/tests/.identifiers.build.out.expected index 54292ac..9de1b78 100644 --- a/tests/.identifiers.build.out.expected +++ b/tests/.identifiers.build.out.expected @@ -8,3 +8,4 @@ identifiers.momo:10:0 [IDENT] '_D' identifiers.momo:10:3 [IDENT] 'eE' identifiers.momo:10:6 [IDENT] '_F' identifiers.momo:10:9 [IDENT] '_G' +identifiers.momo:11:0 [EOF] 'EOF' diff --git a/tests/.keywords.build.in.expected b/tests/.keywords.build.in.expected index e062164..8aeb596 100644 --- a/tests/.keywords.build.in.expected +++ b/tests/.keywords.build.in.expected @@ -1 +1 @@ --d \ No newline at end of file +dump_tokens \ No newline at end of file diff --git a/tests/.keywords.build.out.expected b/tests/.keywords.build.out.expected index 85603e5..1a32452 100644 --- a/tests/.keywords.build.out.expected +++ b/tests/.keywords.build.out.expected @@ -28,3 +28,4 @@ keywords.momo:35:0 [KEYWORD] 'switch' keywords.momo:36:0 [KEYWORD] 'break' keywords.momo:37:0 [KEYWORD] 'case' keywords.momo:38:0 [KEYWORD] 'default' +keywords.momo:39:0 [EOF] 'EOF' diff --git a/tests/.operators.build.in.expected b/tests/.operators.build.in.expected index e062164..8aeb596 100644 --- a/tests/.operators.build.in.expected +++ b/tests/.operators.build.in.expected @@ -1 +1 @@ --d \ No newline at end of file +dump_tokens \ No newline at end of file diff --git a/tests/.operators.build.out.expected b/tests/.operators.build.out.expected index aae9bcf..f92e1e0 100644 --- a/tests/.operators.build.out.expected +++ b/tests/.operators.build.out.expected @@ -1,32 +1,33 @@ -operators.momo:1:7 [MINUS] '-' -operators.momo:2:0 [MINUS_MINUS] '--' -operators.momo:3:0 [RETURNER] '->' -operators.momo:4:0 [PLUS] '+' -operators.momo:5:0 [PLUS_PLUS] '++' -operators.momo:6:0 [PLUS_EQUAL] '+=' -operators.momo:7:0 [DIVIDE] '/' -operators.momo:8:0 [DIVIDE_EQUAL] '/=' -operators.momo:9:0 [MULTIPLY] '*' -operators.momo:10:0 [POWER] '**' -operators.momo:11:0 [MULTIPLY_EQUAL] '*=' -operators.momo:12:0 [MODULUS] '%' -operators.momo:13:0 [MODULUS_EQUAL] '%=' -operators.momo:15:0 [BITWISE_AND] '&' -operators.momo:16:0 [BITWISE_AND_EQUAL] '&=' -operators.momo:17:0 [BITWISE_XOR] '^' -operators.momo:18:0 [BITWISE_XOR_EQUAL] '^=' -operators.momo:19:0 [BITWISE_SHIFT_LEFT] '<<' -operators.momo:20:0 [BITWISE_SHIFT_RIGHT] '>>' -operators.momo:21:0 [BITWISE_NOT] '~' -operators.momo:22:0 [BITWISE_OR] '|' -operators.momo:23:0 [BITWISE_OR_EQUAL] '|=' -operators.momo:25:0 [NOT] '!' -operators.momo:26:0 [NOT_EQUAL] '!=' -operators.momo:27:0 [LOGICAL_AND] '&&' -operators.momo:28:0 [LOGICAL_OR] '||' -operators.momo:30:0 [EQUAL] '=' -operators.momo:31:0 [EQUAL_EQUAL] '==' -operators.momo:33:0 [LT] '<' -operators.momo:34:0 [GT] '>' -operators.momo:35:0 [LTE] '<=' -operators.momo:36:0 [GTE] '>=' +operators.momo:1:7 [-] '-' +operators.momo:2:0 [--] '--' +operators.momo:3:0 [->] '->' +operators.momo:4:0 [+] '+' +operators.momo:5:0 [++] '++' +operators.momo:6:0 [+=] '+=' +operators.momo:7:0 [/] '/' +operators.momo:8:0 [/=] '/=' +operators.momo:9:0 [*] '*' +operators.momo:10:0 [**] '**' +operators.momo:11:0 [*=] '*=' +operators.momo:12:0 [%] '%' +operators.momo:13:0 [%=] '%=' +operators.momo:15:0 [&] '&' +operators.momo:16:0 [&=] '&=' +operators.momo:17:0 [^] '^' +operators.momo:18:0 [^=] '^=' +operators.momo:19:0 [<<] '<<' +operators.momo:20:0 [>>] '>>' +operators.momo:21:0 [~] '~' +operators.momo:22:0 [|] '|' +operators.momo:23:0 [|=] '|=' +operators.momo:25:0 [!] '!' +operators.momo:26:0 [!=] '!=' +operators.momo:27:0 [&&] '&&' +operators.momo:28:0 [||] '||' +operators.momo:30:0 [=] '=' +operators.momo:31:0 [==] '==' +operators.momo:33:0 [<] '<' +operators.momo:34:0 [>] '>' +operators.momo:35:0 [<=] '<=' +operators.momo:36:0 [>=] '>=' +operators.momo:37:0 [EOF] 'EOF' diff --git a/tests/.strings.build.in.expected b/tests/.strings.build.in.expected index e062164..8aeb596 100644 --- a/tests/.strings.build.in.expected +++ b/tests/.strings.build.in.expected @@ -1 +1 @@ --d \ No newline at end of file +dump_tokens \ No newline at end of file diff --git a/tests/.strings.build.out.expected b/tests/.strings.build.out.expected index ed0589b..2aadf07 100644 --- a/tests/.strings.build.out.expected +++ b/tests/.strings.build.out.expected @@ -1,2 +1,3 @@ strings.momo:1:1 [STRING] 'This is a string!' strings.momo:4:9 [STRING] 'This too is a string!' +strings.momo:5:0 [EOF] 'EOF' -- 2.39.5