File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
tests/rust_guests/witguest Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,9 @@ impl test::wit::Roundtrip for Host {
155
155
) -> test:: wit:: roundtrip:: Testenum {
156
156
x
157
157
}
158
+ fn roundtrip_fix_list ( & mut self , x : Vec < u8 > ) -> Vec < u8 > {
159
+ x
160
+ }
158
161
159
162
fn roundtrip_no_result ( & mut self , _x : u32 ) { }
160
163
}
@@ -331,6 +334,7 @@ mod wit_test {
331
334
make_test ! { roundtrip_flags_large, in arb_largeflags( ) }
332
335
make_test ! { roundtrip_variant, in arb_testvariant( ) }
333
336
make_test ! { roundtrip_enum, in arb_testenum( ) }
337
+ make_test ! { roundtrip_fix_list, : Vec <u8 > }
334
338
335
339
#[ test]
336
340
fn test_simple_func ( ) {
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ interface roundtrip {
26
26
roundtrip-option : func (x : option <string >) -> option <string >;
27
27
roundtrip-result : func (x : result <char , string >) -> result <char , string >;
28
28
roundtrip-no-result : func (x : u32 );
29
+ roundtrip-fix-list : func (x : list <u8 , 4>) -> list <u8 , 4>;
29
30
30
31
record testrecord {
31
32
contents : string ,
Original file line number Diff line number Diff line change @@ -113,6 +113,9 @@ impl test::wit::Roundtrip for Guest {
113
113
) -> test:: wit:: roundtrip:: Testenum {
114
114
( Host { } ) . roundtrip_enum ( x)
115
115
}
116
+ fn roundtrip_fix_list ( & mut self , x : Vec < u8 > ) -> Vec < u8 > {
117
+ ( Host { } ) . roundtrip_fix_list ( x)
118
+ }
116
119
fn roundtrip_no_result ( & mut self , x : u32 ) {
117
120
( Host { } ) . roundtrip_no_result ( x)
118
121
}
You can’t perform that action at this time.
0 commit comments