Skip to content

Commit a606d01

Browse files
committed
testdata: update test fixtures from wasm-tools and wit-bindgen
1 parent 5ae93b3 commit a606d01

File tree

102 files changed

+5309
-824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+5309
-824
lines changed

testdata/codegen/allow-unused.wit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ world bindings {
66

77
interface component {
88
variant unused-variant {
9-
%string,
109
%enum(unused-enum),
1110
%record(unused-record)
1211
}

testdata/codegen/allow-unused.wit.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@
6262
"kind": {
6363
"variant": {
6464
"cases": [
65-
{
66-
"name": "string",
67-
"type": null
68-
},
6965
{
7066
"name": "enum",
7167
"type": 0

testdata/codegen/allow-unused.wit.json.golden.wit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ interface component {
44
enum unused-enum { unused }
55
record unused-record { x: u32 }
66
variant unused-variant {
7-
%string,
87
%enum(unused-enum),
98
%record(unused-record),
109
}

testdata/codegen/error-context.wit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ world foo {
1010
import error-contexts;
1111
export error-contexts;
1212
}
13-

testdata/codegen/futures.wit

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
package foo:foo;
2+
3+
interface futures {
4+
future-param: func(x: future);
5+
future-u8-param: func(x: future<u8>);
6+
future-u16-param: func(x: future<u16>);
7+
future-u32-param: func(x: future<u32>);
8+
future-u64-param: func(x: future<u64>);
9+
future-s8-param: func(x: future<s8>);
10+
future-s16-param: func(x: future<s16>);
11+
future-s32-param: func(x: future<s32>);
12+
future-s64-param: func(x: future<s64>);
13+
future-f32-param: func(x: future<f32>);
14+
future-f64-param: func(x: future<f64>);
15+
16+
future-ret: func() -> future;
17+
future-u8-ret: func() -> future<u8>;
18+
future-u16-ret: func() -> future<u16>;
19+
future-u32-ret: func() -> future<u32>;
20+
future-u64-ret: func() -> future<u64>;
21+
future-s8-ret: func() -> future<s8>;
22+
future-s16-ret: func() -> future<s16>;
23+
future-s32-ret: func() -> future<s32>;
24+
future-s64-ret: func() -> future<s64>;
25+
future-f32-ret: func() -> future<f32>;
26+
future-f64-ret: func() -> future<f64>;
27+
28+
tuple-future: func(x: future<tuple<u8, s8>>) -> future<tuple<s64, u32>>;
29+
string-future-arg: func(a: future<string>);
30+
string-future-ret: func() -> future<string>;
31+
tuple-string-future: func(x: future<tuple<u8, string>>) -> future<tuple<string, u8>>;
32+
string-future: func(x: future<string>) -> future<string>;
33+
34+
record some-record {
35+
x: string,
36+
y: other-record,
37+
z: future<other-record>,
38+
c1: u32,
39+
c2: u64,
40+
c3: s32,
41+
c4: s64,
42+
}
43+
record other-record {
44+
a1: u32,
45+
a2: u64,
46+
a3: s32,
47+
a4: s64,
48+
b: string,
49+
c: future<u8>,
50+
}
51+
record-future: func(x: future<some-record>) -> future<other-record>;
52+
record-future-reverse: func(x: future<other-record>) -> future<some-record>;
53+
54+
variant some-variant {
55+
a(string),
56+
b,
57+
c(u32),
58+
d(future<other-variant>),
59+
}
60+
variant other-variant {
61+
a,
62+
b(u32),
63+
c(string),
64+
}
65+
variant-future: func(x: future<some-variant>) -> future<other-variant>;
66+
67+
type load-store-all-sizes = future<tuple<
68+
string,
69+
u8,
70+
s8,
71+
u16,
72+
s16,
73+
u32,
74+
s32,
75+
u64,
76+
s64,
77+
f32,
78+
f64,
79+
char,
80+
>>;
81+
load-store-everything: func(a: load-store-all-sizes) -> load-store-all-sizes;
82+
}
83+
84+
world the-futures {
85+
import futures;
86+
export futures;
87+
}

0 commit comments

Comments
 (0)