-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
formats_err: add test for leaking types
Tests for kaitai-io/kaitai_struct#534 Adds new failing test in compliler: [info] - imports_type_leaking *** FAILED *** [info] [] [info] did not equal [info] [imports/type_two.ksy: /seq/0/type: [info] error: unable to find type 'type_one', searching from type_two [info] ] (SimpleMatchers.scala:34)
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This is a file that is imported in imports_type_leaking.ksy | ||
meta: | ||
id: type_one | ||
seq: | ||
- id: something | ||
size: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This is a file that is imported in imports_type_leaking.ksy | ||
meta: | ||
id: type_two | ||
# Note: missing import of `type_one` | ||
seq: | ||
- id: one | ||
type: type_one # Note: `type_one` is not imported in this spec, so this should cause a compile error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# imports/type_two.ksy: /seq/0/type: | ||
# error: unable to find type 'type_one', searching from type_two | ||
# | ||
meta: | ||
id: imports_type_leaking | ||
imports: | ||
- imports/type_one | ||
- imports/type_two | ||
seq: | ||
- id: another_one | ||
type: type_one | ||
- id: another_two | ||
type: type_two |