File tree 2 files changed +8
-46
lines changed
2 files changed +8
-46
lines changed Original file line number Diff line number Diff line change
1
+ language : swift
2
+ osx_image : xcode10.2
3
+ before_install :
4
+ - gem install xcpretty
5
+ - gem install cocoapods
6
+ script :
7
+ - xcodebuild -scheme Future_iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X' test
8
+ - pod lib lint --allow-warnings
Original file line number Diff line number Diff line change @@ -182,52 +182,6 @@ class FutureResultTests: XCTestCase {
182
182
. run { resJ = $0 }
183
183
XCTAssert ( resJ. value == " 4 - bar " )
184
184
}
185
-
186
- // func testFoo() {
187
- //
188
- // struct User: Codable {
189
- // var id: String
190
- // var name: String
191
- // }
192
- // struct Food: Codable {
193
- // var type: String
194
- // var tastiness: Int
195
- // }
196
- //
197
- // let loadFileUser: FutureResult<User> = Future
198
- // .init(work: {
199
- // .success(User(id: "foo", name: "bar"))
200
- // })
201
- //
202
- // let loadStringFood: FutureResult<Food> = Future<String>
203
- // .init(value: #"{ "type": "curry", "tastiness": 1000 }"#)
204
- // .map({ $0.data(using: .utf8)! })
205
- // .flatMap(Food.decodeJSON(from:))
206
- //
207
- // let loadNetworkUser: FutureResult<User> = URLSession.shared
208
- // .dataTaskResult(with: URLRequest(url: URL(string: "https://foo.bar")!))
209
- // .mapResult({ $0.data })
210
- // .flatMapResult(User.decodeJSON(from:))
211
- //
212
- // let combinedFuture = zipResult3With(
213
- // loadStringFood,
214
- // loadFileUser,
215
- // loadNetworkUser
216
- // ) { (food: $0, user: $1, networkUser: $2) }
217
- // .mapResult({
218
- // "\($0.user.name) likes \($0.food.type) x\($0.food.tastiness)... networkUser: '\($0.networkUser.name)'"
219
- // })
220
- //
221
- // //
222
- // //combinedFuture.run { result in
223
- // // print(result)
224
- // //}
225
- //
226
- // Future.batchResult([ loadNetworkUser, loadFileUser ]).run { result in
227
- //// print(result)
228
- // }
229
- //
230
- // }
231
185
}
232
186
233
187
extension Result {
You can’t perform that action at this time.
0 commit comments