Skip to content

Commit 7f38dad

Browse files
committed
testdata, tests: result test, regenerate
1 parent 06784f5 commit 7f38dad

5 files changed

Lines changed: 101 additions & 5 deletions

File tree

testdata/codegen/result.wit

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package test:test;
2+
3+
world w {
4+
import i;
5+
}
6+
7+
interface i {
8+
f1: func() -> result<bool, u8>;
9+
f2: func() -> result<bool, u8>;
10+
f3: func() -> result<bool, u8>;
11+
}

testdata/codegen/result.wit.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"worlds": [
3+
{
4+
"name": "w",
5+
"imports": {
6+
"interface-0": {
7+
"interface": {
8+
"id": 0
9+
}
10+
}
11+
},
12+
"exports": {},
13+
"package": 0
14+
}
15+
],
16+
"interfaces": [
17+
{
18+
"name": "i",
19+
"types": {},
20+
"functions": {
21+
"f1": {
22+
"name": "f1",
23+
"kind": "freestanding",
24+
"params": [],
25+
"result": 0
26+
},
27+
"f2": {
28+
"name": "f2",
29+
"kind": "freestanding",
30+
"params": [],
31+
"result": 0
32+
},
33+
"f3": {
34+
"name": "f3",
35+
"kind": "freestanding",
36+
"params": [],
37+
"result": 0
38+
}
39+
},
40+
"package": 0
41+
}
42+
],
43+
"types": [
44+
{
45+
"name": null,
46+
"kind": {
47+
"result": {
48+
"ok": "bool",
49+
"err": "u8"
50+
}
51+
},
52+
"owner": null
53+
}
54+
],
55+
"packages": [
56+
{
57+
"name": "test:test",
58+
"interfaces": {
59+
"i": 0
60+
},
61+
"worlds": {
62+
"w": 0
63+
}
64+
}
65+
]
66+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package test:test;
2+
3+
interface i {
4+
f1: func() -> result<bool, u8>;
5+
f2: func() -> result<bool, u8>;
6+
f3: func() -> result<bool, u8>;
7+
}
8+
9+
world w {
10+
import i;
11+
}

tests/generated/wasi/cli/v0.2.0/run/abi.go

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/generated/wasi/cli/v0.2.0/run/run.exports.go

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)