Skip to content

Commit

Permalink
Tests for the functions that are using KeyPath require !swift(>=5.2) …
Browse files Browse the repository at this point in the history
…(Thenable)
  • Loading branch information
RomanPodymov committed Jan 14, 2020
1 parent 98e3f1c commit 87a0b0e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Tests/CorePromise/ThenableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ThenableTests: XCTestCase {
wait(for: [ex], timeout: 10)
}

#if swift(>=4)
#if swift(>=4) && !swift(>=5.2)
func testMapByKeyPath() {
let ex = expectation(description: "")
Promise.value(Person(name: "Max")).map(\.name).done {
Expand Down Expand Up @@ -110,7 +110,7 @@ class ThenableTests: XCTestCase {
wait(for: [ex], timeout: 10)
}

#if swift(>=4)
#if swift(>=4) && !swift(>=5.2)
func testCompactMapByKeyPath() {
let ex = expectation(description: "")
Promise.value(Person(name: "Roman", age: 26)).compactMap(\.age).done {
Expand All @@ -132,7 +132,7 @@ class ThenableTests: XCTestCase {
wait(for: [ex], timeout: 10)
}

#if swift(>=4)
#if swift(>=4) && !swift(>=5.2)
func testMapValuesByKeyPath() {
let ex = expectation(description: "")
Promise.value([Person(name: "Max"), Person(name: "Roman"), Person(name: "John")]).mapValues(\.name).done {
Expand All @@ -154,7 +154,7 @@ class ThenableTests: XCTestCase {
wait(for: [ex], timeout: 10)
}

#if swift(>=4)
#if swift(>=4) && !swift(>=5.2)
func testCompactMapValuesByKeyPath() {
let ex = expectation(description: "")
Promise.value([Person(name: "Max"), Person(name: "Roman", age: 26), Person(name: "John", age: 23)]).compactMapValues(\.age).done {
Expand Down Expand Up @@ -198,7 +198,7 @@ class ThenableTests: XCTestCase {
wait(for: [ex], timeout: 10)
}

#if swift(>=4)
#if swift(>=4) && !swift(>=5.2)
func testFilterValuesByKeyPath() {
let ex = expectation(description: "")
Promise.value([Person(name: "Max"), Person(name: "Roman", age: 26, isStudent: false), Person(name: "John", age: 23, isStudent: true)]).filterValues(\.isStudent).done {
Expand Down

0 comments on commit 87a0b0e

Please sign in to comment.