-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(import): multiple imports from the same schema id (#3)
- Loading branch information
Peter Cornell
authored
May 27, 2020
1 parent
44fb7d4
commit 117d982
Showing
1 changed file
with
35 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,35 @@ | ||
schema_header::{ | ||
imports: [ | ||
{ id: "schema/import/abcde.isl", type: a, as: a2 }, | ||
{ id: "schema/util/positive_int.isl" }, | ||
{ id: "schema/import/abcde.isl", type: b }, | ||
{ id: "schema/util/positive_int.isl", type: positive_int, as: posint }, | ||
{ id: "schema/import/abcde.isl", type: c, as: c2 }, | ||
], | ||
} | ||
type::{ | ||
name: import_types_test, | ||
type: struct, | ||
fields: { | ||
a2: a2, | ||
positive_int: positive_int, | ||
b: b, | ||
posint: posint, | ||
c2: c2, | ||
}, | ||
} | ||
schema_footer::{ | ||
} | ||
|
||
valid::[ | ||
{ a: a, positive_int: 5, b: b, posint: 6, c: c }, | ||
] | ||
|
||
invalid::[ | ||
{ a: b, positive_int: 5, b: b, posint: 6, c: c }, | ||
{ a: a, positive_int: -1, b: b, posint: 6, c: c }, | ||
{ a: a, positive_int: 5, b: a, posint: 6, c: c }, | ||
{ a: a, positive_int: 5, b: b, posint: -1, c: c }, | ||
{ a: a, positive_int: 5, b: b, posint: 6, c: b }, | ||
] | ||
|