Skip to content

Commit

Permalink
fix: fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: he1pa <[email protected]>
  • Loading branch information
He1pa committed Sep 10, 2024
1 parent 544b913 commit 17c6fab
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 27 deletions.
9 changes: 8 additions & 1 deletion test/grammar/import/import_main_file_fail_0/stderr.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
error[E2L23]: CompileError
--> ${CWD}/module.k:2:1
|
2 | import main
| ^ There is a circular reference between modules module, main
|

error[E2L23]: CompileError
--> ${CWD}/main.k:1:1
|
1 | import module
| ^ There is a circular import reference between module main and module
| ^ There is a circular reference between modules module, main
|
9 changes: 3 additions & 6 deletions test/grammar/import/import_main_file_fail_1/stderr.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
error[E2L23]: CompileError
--> ${CWD}/main.k:1:1
|
1 | import main
| ^ There is a circular import reference between module main and main
|
error[E3M38]: error[E1001]: RecursiveLoad
Could not compiles due to cyclic import statements
- /Users/zz/code/he1pa/KCLVM/test/grammar/import/import_main_file_fail_1/main.k
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
error[E2L23]: CompileError
--> ${CWD}/main.k:1:8
|
1 | schema Parent(Son):
| ^ There is a circular reference between schemas __main__.Parent, __main__.Son
|

error[E2L23]: CompileError
--> ${CWD}/main.k:4:8
|
4 | schema Son(Parent):
| ^ There is a circular reference between schema Son and Parent
| ^ There is a circular reference between schemas __main__.Parent, __main__.Son
|
16 changes: 15 additions & 1 deletion test/grammar/schema/inherit/cycle_inherit_fail_1/stderr.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
error[E2L23]: CompileError
--> ${CWD}/main.k:1:8
|
1 | schema Parent(Son):
| ^ There is a circular reference between schema __main__.Parent, __main__.Son, __main__.GrandSon
|

error[E2L23]: CompileError
--> ${CWD}/main.k:4:8
|
4 | schema Son(GrandSon):
| ^ There is a circular reference between schema __main__.Parent, __main__.Son, __main__.GrandSon
|

error[E2L23]: CompileError
--> ${CWD}/main.k:7:8
|
7 | schema GrandSon(Parent):
| ^ There is a circular reference between schema GrandSon and Parent
| ^ There is a circular reference between schema __main__.Parent, __main__.Son, __main__.GrandSon
|
14 changes: 8 additions & 6 deletions test/grammar/schema/inherit/cycle_inherit_fail_2/stderr.golden
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
error[E2L23]: CompileError
--> ${CWD}/pkg/c.k:2:8
--> ${CWD}/pkg/b.k:2:8
|
2 | schema C(B):
| ^ There is a circular reference between schema C and B
2 | schema B(C):
| ^ There is a circular reference between schemas pkg.B, pkg.C
|

error[E2L23]: CompileError
--> ${CWD}/main.k:3:8
--> ${CWD}/pkg/c.k:2:8
|
3 | schema Son(pkg.B):
| ^ There is a circular reference between schema Son and B
2 | schema C(B):
| ^ There is a circular reference between schemas pkg.B, pkg.C
|

error[E2L23]: CompileError
--> ${CWD}/main.k:9:5
|
Expand Down
14 changes: 8 additions & 6 deletions test/grammar/schema/inherit/cycle_inherit_fail_3/stderr.golden
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
error[E2L23]: CompileError
--> ${CWD}/pkg/c.k:1:8
--> ${CWD}/pkg/b.k:1:8
|
1 | schema C(B):
| ^ There is a circular reference between schema C and B
1 | schema B(C):
| ^ There is a circular reference between schema pkg.B, pkg.C
|

error[E2L23]: CompileError
--> ${CWD}/main.k:3:8
--> ${CWD}/pkg/c.k:1:8
|
3 | schema Son(pkg.B):
| ^ There is a circular reference between schema Son and B
1 | schema C(B):
| ^ There is a circular reference between schema pkg.B, pkg.C
|

error[E2L23]: CompileError
--> ${CWD}/main.k:9:5
|
Expand Down
14 changes: 8 additions & 6 deletions test/grammar/schema/inherit/cycle_inherit_fail_4/stderr.golden
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
error[E2L23]: CompileError
--> ${CWD}/pkg/c.k:1:8
--> ${CWD}/pkg/b.k:1:8
|
1 | schema C(B):
| ^ There is a circular reference between schema C and B
1 | schema B(C):
| ^ There is a circular reference between schema pkg.B, pkg.C
|

error[E2L23]: CompileError
--> ${CWD}/main.k:3:8
--> ${CWD}/pkg/c.k:1:8
|
3 | schema Son(pkg.B):
| ^ There is a circular reference between schema Son and B
1 | schema C(B):
| ^ There is a circular reference between schema pkg.B, pkg.C
|

error[E2L23]: CompileError
--> ${CWD}/main.k:9:5
|
Expand Down

0 comments on commit 17c6fab

Please sign in to comment.