@@ -93,23 +93,8 @@ class VecTests: XCTestCase {
93
93
XCTAssertEqual ( reflected. pop ( ) !, TransparentEnumInsideVecT . VariantB)
94
94
}
95
95
96
- /// Verify that a Vec<T> of transparent struct can be used as an argument and return
97
- /// type for extern "Rust" functions.
98
- func testReflectVecOfTransparentStruct( ) throws {
99
- let vec : RustVec < TransparentStructInsideVecT > = RustVec ( )
100
- vec. push ( value: TransparentStructInsideVecT ( string: " string " . intoRustString ( ) , integer: 10 ) )
101
-
102
- let reflected = rust_reflect_vec_transparent_struct ( vec)
103
- XCTAssertEqual ( reflected. len ( ) , 1 )
104
- XCTAssertEqual ( reflected. get ( index: 0 ) !. string. toString ( ) , " string " )
105
- XCTAssertEqual ( reflected. get ( index: 0 ) !. integer, 10 )
106
- let popped = try XCTUnwrap ( reflected. pop ( ) )
107
- XCTAssertEqual ( popped. string. toString ( ) , " string " )
108
- XCTAssertEqual ( popped. integer, 10 )
109
- }
110
-
111
- /// Verify that a Vec<T> of transparent struct can be used as an argument and return
112
- /// type for extern "Rust" functions.
96
+ /// Verify that a Vec<T> of transparent struct with derive(Copy, Clone) can be used
97
+ /// as an argument and return type for extern "Rust" functions.
113
98
func testReflectVecOfTransparentStructFromCopy( ) throws {
114
99
let vec : RustVec < TransparentStructInsideVecTWithCopy > = RustVec ( )
115
100
vec. push ( value: TransparentStructInsideVecTWithCopy ( integer: 10 ) )
@@ -121,8 +106,8 @@ class VecTests: XCTestCase {
121
106
XCTAssertEqual ( popped. integer, 10 )
122
107
}
123
108
124
- /// Verify that a Vec<T> of transparent struct can be used as an argument and return
125
- /// type for extern "Rust" functions.
109
+ /// Verify that a Vec<T> of transparent struct with derive(Clone) can be used as an
110
+ /// argument and return type for extern "Rust" functions.
126
111
func testReflectVecOfTransparentStructFromClone( ) throws {
127
112
let vec : RustVec < TransparentStructInsideVecT > = RustVec ( )
128
113
vec. push ( value: TransparentStructInsideVecT ( string: " string " . intoRustString ( ) , integer: 10 ) )
0 commit comments