@@ -164,100 +164,48 @@ final class WidthSizeContentTests: XCTestCase {
164
164
XCTAssertEqual ( aView. frame, CGRect ( x: 0.0 , y: 0.0 , width: 400.0 , height: 200.0 ) )
165
165
}
166
166
167
- func test_set_gap_in_row_direction ( ) {
167
+ func test_row_gap ( ) {
168
168
rootFlexContainer. flex. direction ( . row) . define { flex in
169
169
flex. addItem ( aView) . height ( 100 ) . width ( 100 )
170
170
flex. addItem ( bView) . height ( 100 ) . width ( 100 )
171
171
flex. alignItems ( . start)
172
172
173
- flex. setGap ( . column , 50 )
173
+ flex. columnGap ( 50 )
174
174
}
175
175
176
176
rootFlexContainer. flex. layout ( )
177
177
XCTAssertEqual ( bView. frame, CGRect ( x: 150.0 , y: 0.0 , width: 100.0 , height: 100.0 ) )
178
178
}
179
179
180
- func test_set_gap_in_column_direction ( ) {
180
+ func test_column_gap ( ) {
181
181
rootFlexContainer. flex. direction ( . column) . define { flex in
182
182
flex. addItem ( aView) . height ( 100 ) . width ( 100 )
183
183
flex. addItem ( bView) . height ( 100 ) . width ( 100 )
184
184
flex. alignItems ( . start)
185
185
186
- flex. setGap ( . row , 50 )
186
+ flex. rowGap ( 50 )
187
187
}
188
188
189
189
rootFlexContainer. flex. layout ( )
190
190
XCTAssertEqual ( bView. frame, CGRect ( x: 0.0 , y: 150.0 , width: 100.0 , height: 100.0 ) )
191
191
}
192
192
193
- func test_set_gap_in_all_direction ( ) {
193
+ func test_gap ( ) {
194
194
rootFlexContainer. flex. direction ( . column) . define { flex in
195
195
flex. addItem ( ) . direction ( . row) . define { flex in
196
196
flex. addItem ( aView) . height ( 100 ) . width ( 100 )
197
197
flex. addItem ( bView) . height ( 100 ) . width ( 100 )
198
- flex. setGap ( . all , 50 )
198
+ flex. gap ( 50 )
199
199
}
200
200
flex. addItem ( cView) . height ( 100 ) . width ( 100 )
201
201
202
202
flex. alignItems ( . start)
203
- flex. setGap ( . all , 50 )
203
+ flex. gap ( 50 )
204
204
}
205
205
206
206
rootFlexContainer. flex. layout ( )
207
207
208
208
XCTAssertEqual ( bView. frame, CGRect ( x: 150.0 , y: 0.0 , width: 100.0 , height: 100.0 ) )
209
209
XCTAssertEqual ( cView. frame, CGRect ( x: 0.0 , y: 150.0 , width: 100.0 , height: 100.0 ) )
210
210
}
211
-
212
- func test_get_gap_in_row_direction( ) {
213
- rootFlexContainer. flex. direction ( . row) . define { flex in
214
- flex. addItem ( aView) . height ( 100 ) . width ( 100 )
215
- flex. addItem ( bView) . height ( 100 ) . width ( 100 )
216
- flex. alignItems ( . start)
217
-
218
- flex. setGap ( . row, 20 )
219
- }
220
-
221
- rootFlexContainer. flex. layout ( )
222
-
223
- let rowGap = rootFlexContainer. flex. getGap ( . row)
224
-
225
- XCTAssertEqual ( rowGap, 20 )
226
- }
227
-
228
- func test_get_gap_in_column_direction( ) {
229
- rootFlexContainer. flex. direction ( . column) . define { flex in
230
- flex. addItem ( aView) . height ( 100 ) . width ( 100 )
231
- flex. addItem ( bView) . height ( 100 ) . width ( 100 )
232
- flex. alignItems ( . start)
233
-
234
- flex. setGap ( . column, 20 )
235
- }
236
-
237
- rootFlexContainer. flex. layout ( )
238
-
239
- let columnGap = rootFlexContainer. flex. getGap ( . column)
240
-
241
- XCTAssertEqual ( columnGap, 20 )
242
- }
243
-
244
- func test_get_gap_in_all_direction( ) {
245
- rootFlexContainer. flex. direction ( . column) . define { flex in
246
- flex. addItem ( ) . direction ( . row) . define { flex in
247
- flex. addItem ( aView) . height ( 100 ) . width ( 100 )
248
- flex. addItem ( bView) . height ( 100 ) . width ( 100 )
249
- flex. setGap ( . all, 20 )
250
- }
251
- flex. addItem ( cView) . height ( 100 ) . width ( 100 )
252
-
253
- flex. alignItems ( . start)
254
- flex. setGap ( . all, 20 )
255
- }
256
-
257
- rootFlexContainer. flex. layout ( )
258
-
259
- let allGap = rootFlexContainer. flex. getGap ( . all)
260
-
261
- XCTAssertEqual ( allGap, 20 )
262
- }
263
211
}
0 commit comments