Skip to content

Commit

Permalink
Updated for Swift 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloutiertyler committed Nov 16, 2017
1 parent be47f5a commit 89f3b12
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 8 deletions.
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "PromiseKit",
"repositoryURL": "https://github.com/mxcl/PromiseKit.git",
"state": {
"branch": null,
"revision": "61f796319b16f0d4f3a8cd939d8e7f9a74963038",
"version": "4.3.2"
}
}
]
},
"version": 1
}
19 changes: 18 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
/*
* AwaitKit
*
Expand Down Expand Up @@ -28,7 +30,22 @@ import PackageDescription

let package = Package(
name: "AwaitKit",
products: [
.library(
name: "AwaitKit",
targets: ["AwaitKit"]),
],
dependencies: [
.Package(url: "https://github.com/mxcl/PromiseKit.git", majorVersion: 4, minor: 3)
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "4.3.0")
],
targets: [
.target(
name: "AwaitKit",
dependencies: [
"PromiseKit",
]),
.testTarget(
name: "AwaitKitTests",
dependencies: ["AwaitKit"]),
]
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class AwaitKitAwaitTests: XCTestCase {

func testNoValueAwaitPromise() {
let promise: Promise<Void> = Promise { resolve, reject in
resolve()
resolve(())
}

XCTAssertNotNil(promise.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import XCTest

class AwaitKitTests: XCTestCase {
func testExcludeSameQueue() {
let promise = Promise { resolve, reject in
resolve()
let promise = Promise<Void> { resolve, reject in
resolve(())
}

XCTAssertThrowsError(try DispatchQueue.main.ak.await(promise))
Expand All @@ -40,8 +40,8 @@ class AwaitKitTests: XCTestCase {
func testAsyncAndAwaitOnDifferentQueue() {
let expect = expectation(description: "Async should fulfill")

let promise = Promise { resolve, reject in
resolve()
let promise = Promise<Void> { resolve, reject in
resolve(())
}

let result: Promise<Void> = async {
Expand All @@ -58,8 +58,8 @@ class AwaitKitTests: XCTestCase {
func testImbricationQueue() {
let expect = expectation(description: "Async should fulfill")

let promise = Promise { resolve, reject in
resolve()
let promise = Promise<Void> { resolve, reject in
resolve(())
}

let result: Promise<Void> = async {
Expand Down
File renamed without changes.

0 comments on commit 89f3b12

Please sign in to comment.