@@ -170,7 +170,7 @@ final class WidthSizeContentTests: XCTestCase {
170
170
flex. addItem ( bView) . height ( 100 ) . width ( 100 )
171
171
flex. alignItems ( . start)
172
172
173
- flex. setGap ( . row , 50 )
173
+ flex. setGap ( . column , 50 )
174
174
}
175
175
176
176
rootFlexContainer. flex. layout ( )
@@ -183,7 +183,7 @@ final class WidthSizeContentTests: XCTestCase {
183
183
flex. addItem ( bView) . height ( 100 ) . width ( 100 )
184
184
flex. alignItems ( . start)
185
185
186
- flex. setGap ( . column , 50 )
186
+ flex. setGap ( . row , 50 )
187
187
}
188
188
189
189
rootFlexContainer. flex. layout ( )
@@ -192,20 +192,21 @@ final class WidthSizeContentTests: XCTestCase {
192
192
193
193
func test_set_gap_in_all_direction( ) {
194
194
rootFlexContainer. flex. direction ( . column) . define { flex in
195
- flex. addItem ( aView) . height ( 100 ) . width ( 100 )
196
- flex. addItem ( bView) . height ( 100 ) . width ( 100 )
197
195
flex. addItem ( ) . direction ( . row) . define { flex in
198
- flex. addItem ( cView) . height ( 100 ) . width ( 100 )
196
+ flex. addItem ( aView) . height ( 100 ) . width ( 100 )
197
+ flex. addItem ( bView) . height ( 100 ) . width ( 100 )
198
+ flex. setGap ( . all, 50 )
199
199
}
200
- flex. alignItems ( . start )
200
+ flex. addItem ( cView ) . height ( 100 ) . width ( 100 )
201
201
202
+ flex. alignItems ( . start)
202
203
flex. setGap ( . all, 50 )
203
204
}
204
205
205
206
rootFlexContainer. flex. layout ( )
206
207
207
- XCTAssertEqual ( bView. frame, CGRect ( x: 0 .0, y: 150 .0, width: 100.0 , height: 100.0 ) )
208
- XCTAssertEqual ( cView. frame, CGRect ( x: 150 .0, y: 0 .0, width: 100.0 , height: 100.0 ) )
208
+ XCTAssertEqual ( bView. frame, CGRect ( x: 150 .0, y: 0 .0, width: 100.0 , height: 100.0 ) )
209
+ XCTAssertEqual ( cView. frame, CGRect ( x: 0 .0, y: 150 .0, width: 100.0 , height: 100.0 ) )
209
210
}
210
211
211
212
func test_get_gap_in_row_direction( ) {
@@ -242,16 +243,17 @@ final class WidthSizeContentTests: XCTestCase {
242
243
243
244
func test_get_gap_in_all_direction( ) {
244
245
rootFlexContainer. flex. direction ( . column) . define { flex in
245
- flex. addItem ( aView) . height ( 100 ) . width ( 100 )
246
- flex. addItem ( bView) . height ( 100 ) . width ( 100 )
247
246
flex. addItem ( ) . direction ( . row) . define { flex in
248
- flex. addItem ( cView) . height ( 100 ) . width ( 100 )
247
+ flex. addItem ( aView) . height ( 100 ) . width ( 100 )
248
+ flex. addItem ( bView) . height ( 100 ) . width ( 100 )
249
+ flex. setGap ( . all, 20 )
249
250
}
250
- flex. alignItems ( . start )
251
+ flex. addItem ( cView ) . height ( 100 ) . width ( 100 )
251
252
253
+ flex. alignItems ( . start)
252
254
flex. setGap ( . all, 20 )
253
255
}
254
-
256
+
255
257
rootFlexContainer. flex. layout ( )
256
258
257
259
let allGap = rootFlexContainer. flex. getGap ( . all)
0 commit comments