Implement tokenstream_get_test and simplified assert_log_file using test names

This commit is contained in:
2026-04-26 20:31:17 +02:00
parent e910c01348
commit 9449f16e02
36 changed files with 106 additions and 92 deletions
-4
View File
@@ -1,4 +0,0 @@
--- test.c ---
1| module my_module; import ;
^
expected module name to import
-4
View File
@@ -1,4 +0,0 @@
--- test.c ---
1| module my_module; import ;
^
expected module name to import
-1
View File
@@ -1 +0,0 @@
import ;
-4
View File
@@ -1,4 +0,0 @@
--- test.c ---
1| import other_module;
^^^^^^
expected 'module' keyword
-1
View File
@@ -1 +0,0 @@
import other_module;
+1
View File
@@ -0,0 +1 @@
int main() []
@@ -1,4 +1,4 @@
--- test.c ---
--- v0/tests/log_on_line.c2 ---
1| int main() []
^^
unexpected token
-4
View File
@@ -1,4 +0,0 @@
--- test.c ---
1| int main() []
^^
unexpected token
-1
View File
@@ -1 +0,0 @@
int main() []
+1
View File
@@ -0,0 +1 @@
int main() []
@@ -1,4 +1,4 @@
--- test.c ---
--- v0/tests/log_on_line_variadic.c2 ---
1| int main() []
^^
unexpected token 'x'
-4
View File
@@ -1,4 +0,0 @@
--- test.c ---
1| int main() []
^^
unexpected token 'x'
-1
View File
@@ -1 +0,0 @@
int main() []
-4
View File
@@ -1,4 +0,0 @@
--- test.c ---
1| module my_module; import other_module
^
expected ';' after import
@@ -1,4 +0,0 @@
--- test.c ---
1| module my_module; import other_module
^
expected ';' after import
-1
View File
@@ -1 +0,0 @@
module my_module; import other_module
-4
View File
@@ -1,4 +0,0 @@
--- test.c ---
1| module my_module
^
expected ';' after module name
@@ -1,4 +0,0 @@
--- test.c ---
1| module my_module
^
expected ';' after module name
-1
View File
@@ -1 +0,0 @@
module my_module
+1
View File
@@ -0,0 +1 @@
import ;
+4
View File
@@ -0,0 +1,4 @@
--- v0/tests/parser_bad_impo ---
1| import ;
^^^^^^
expected 'module' keyword
+1
View File
@@ -0,0 +1 @@
import other_module;
@@ -1,4 +1,4 @@
--- test.c ---
--- v0/tests/parser_bad_modu ---
1| import other_module;
^^^^^^
expected 'module' keyword
@@ -0,0 +1 @@
module my_module; import other_module
@@ -0,0 +1,4 @@
---
---
2|
^
@@ -0,0 +1 @@
module my_module
@@ -0,0 +1,5 @@
---
---
2|
^
expected ';' after module name
+1
View File
@@ -0,0 +1 @@
%
@@ -1,4 +1,4 @@
--- test.c ---
--- ---
1| %
^
unexpected token '%'
-4
View File
@@ -1,4 +0,0 @@
--- test.c ---
1| %
^
unexpected token '%'
-1
View File
@@ -1 +0,0 @@
%