Skip to content

Commit 6f73f1a

Browse files
authored
Merge pull request kodecocodes#555 from remlostime/k-means-swift
[Swift 4] Update KMeans
2 parents c2bf00b + e3e8a34 commit 6f73f1a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

K-Means/Tests/KMeansTests.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ import Foundation
1010
import XCTest
1111

1212
class KMeansTests: XCTestCase {
13+
func testSwift4() {
14+
// last checked with Xcode 9.0b4
15+
#if swift(>=4.0)
16+
print("Hello, Swift 4!")
17+
#endif
18+
}
19+
1320
func genPoints(_ numPoints: Int, numDimensions: Int) -> [Vector] {
1421
var points = [Vector]()
1522
for _ in 0..<numPoints {

K-Means/Tests/Tests.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
PRODUCT_NAME = "$(TARGET_NAME)";
230230
SDKROOT = macosx;
231231
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
232-
SWIFT_VERSION = 3.0;
232+
SWIFT_VERSION = 4.0;
233233
};
234234
name = Debug;
235235
};
@@ -271,7 +271,7 @@
271271
PRODUCT_BUNDLE_IDENTIFIER = com.alvahouse322.Tests;
272272
PRODUCT_NAME = "$(TARGET_NAME)";
273273
SDKROOT = macosx;
274-
SWIFT_VERSION = 3.0;
274+
SWIFT_VERSION = 4.0;
275275
};
276276
name = Release;
277277
};

0 commit comments

Comments
 (0)