-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testdata: import new fixtures from wit-parser crate
- Loading branch information
Showing
18 changed files
with
1,296 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,70 @@ | ||
{ | ||
"worlds": [], | ||
"interfaces": [ | ||
{ | ||
"name": "foo", | ||
"types": { | ||
"bar": 0 | ||
}, | ||
"functions": { | ||
"my-stable": { | ||
"name": "my-stable", | ||
"kind": "freestanding", | ||
"params": [ | ||
{ | ||
"name": "p", | ||
"type": 0 | ||
} | ||
], | ||
"results": [ | ||
{ | ||
"type": 1 | ||
} | ||
] | ||
} | ||
}, | ||
"package": 0 | ||
} | ||
], | ||
"types": [ | ||
{ | ||
"name": "bar", | ||
"kind": { | ||
"variant": { | ||
"cases": [ | ||
{ | ||
"name": "x", | ||
"type": null | ||
}, | ||
{ | ||
"name": "y", | ||
"type": null | ||
} | ||
] | ||
} | ||
}, | ||
"owner": { | ||
"interface": 0 | ||
} | ||
}, | ||
{ | ||
"name": null, | ||
"kind": { | ||
"result": { | ||
"ok": null, | ||
"err": 0 | ||
} | ||
}, | ||
"owner": null | ||
} | ||
], | ||
"packages": [ | ||
{ | ||
"name": "a:b", | ||
"interfaces": { | ||
"foo": 0 | ||
}, | ||
"worlds": {} | ||
} | ||
] | ||
} |
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 @@ | ||
package a:b; | ||
|
||
interface foo { | ||
variant bar { x, y } | ||
my-stable: func(p: bar) -> result<_, bar>; | ||
} |
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,161 @@ | ||
{ | ||
"worlds": [], | ||
"interfaces": [ | ||
{ | ||
"name": "i2", | ||
"types": { | ||
"t": 0 | ||
}, | ||
"functions": {}, | ||
"package": 0 | ||
}, | ||
{ | ||
"name": "i1", | ||
"types": { | ||
"t": 1, | ||
"o": 2 | ||
}, | ||
"functions": {}, | ||
"package": 1 | ||
}, | ||
{ | ||
"name": "nesty", | ||
"types": { | ||
"o": 3, | ||
"l": 4 | ||
}, | ||
"functions": {}, | ||
"package": 2 | ||
}, | ||
{ | ||
"name": "i0", | ||
"types": { | ||
"o": 5, | ||
"l": 6, | ||
"r": 7, | ||
"r1": 8 | ||
}, | ||
"functions": {}, | ||
"package": 3 | ||
} | ||
], | ||
"types": [ | ||
{ | ||
"name": "t", | ||
"kind": { | ||
"type": "string" | ||
}, | ||
"owner": { | ||
"interface": 0 | ||
} | ||
}, | ||
{ | ||
"name": "t", | ||
"kind": { | ||
"type": 0 | ||
}, | ||
"owner": { | ||
"interface": 1 | ||
} | ||
}, | ||
{ | ||
"name": "o", | ||
"kind": { | ||
"option": 1 | ||
}, | ||
"owner": { | ||
"interface": 1 | ||
} | ||
}, | ||
{ | ||
"name": "o", | ||
"kind": { | ||
"type": 2 | ||
}, | ||
"owner": { | ||
"interface": 2 | ||
} | ||
}, | ||
{ | ||
"name": "l", | ||
"kind": { | ||
"list": 3 | ||
}, | ||
"owner": { | ||
"interface": 2 | ||
} | ||
}, | ||
{ | ||
"name": "o", | ||
"kind": { | ||
"type": 2 | ||
}, | ||
"owner": { | ||
"interface": 3 | ||
} | ||
}, | ||
{ | ||
"name": "l", | ||
"kind": { | ||
"type": 4 | ||
}, | ||
"owner": { | ||
"interface": 3 | ||
} | ||
}, | ||
{ | ||
"name": "r", | ||
"kind": { | ||
"result": { | ||
"ok": 5, | ||
"err": null | ||
} | ||
}, | ||
"owner": { | ||
"interface": 3 | ||
} | ||
}, | ||
{ | ||
"name": "r1", | ||
"kind": { | ||
"result": { | ||
"ok": 6, | ||
"err": null | ||
} | ||
}, | ||
"owner": { | ||
"interface": 3 | ||
} | ||
} | ||
], | ||
"packages": [ | ||
{ | ||
"name": "foo:dep2", | ||
"interfaces": { | ||
"i2": 0 | ||
}, | ||
"worlds": {} | ||
}, | ||
{ | ||
"name": "foo:dep1", | ||
"interfaces": { | ||
"i1": 1 | ||
}, | ||
"worlds": {} | ||
}, | ||
{ | ||
"name": "foo:nest", | ||
"interfaces": { | ||
"nesty": 2 | ||
}, | ||
"worlds": {} | ||
}, | ||
{ | ||
"name": "foo:root", | ||
"interfaces": { | ||
"i0": 3 | ||
}, | ||
"worlds": {} | ||
} | ||
] | ||
} |
28 changes: 28 additions & 0 deletions
28
testdata/wit-parser/multi-package-deps.wit.json.golden.wit
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,28 @@ | ||
package foo:root; | ||
|
||
interface i0 { | ||
use foo:dep1/i1.{o}; | ||
use foo:nest/nesty.{l}; | ||
type r = result<o>; | ||
type r1 = result<l>; | ||
} | ||
|
||
package foo:nest { | ||
interface nesty { | ||
use foo:dep1/i1.{o}; | ||
type l = list<o>; | ||
} | ||
} | ||
|
||
package foo:dep1 { | ||
interface i1 { | ||
use foo:dep2/i2.{t}; | ||
type o = option<t>; | ||
} | ||
} | ||
|
||
package foo:dep2 { | ||
interface i2 { | ||
type t = string; | ||
} | ||
} |
Oops, something went wrong.