Skip to content

Commit e734093

Browse files
committed
Fix tests with Xcode 8.3
1 parent 243c635 commit e734093

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
*.xcodeproj/**/xcuserdata/
1+
xcuserdata
22
*.xcscmblueprint
33
/Carthage
4-
/Cartfile.resolved
54
/.build

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
language: objective-c
22
osx_image: xcode8.3
3-
3+
matrix:
4+
include:
5+
- osx_image: xcode8
6+
- osx_image: xcode8.1
7+
- osx_image: xcode8.2
8+
- osx_image: xcode9
49
env:
510
- PLATFORM=Mac
611
- PLATFORM=iOS NAME='iPhone SE'
712
- PLATFORM=tvOS NAME='Apple TV 1080p'
8-
913
before_install:
1014
- if [ -n "$NAME" ]; then
1115
export UUID=$(instruments -s | ruby -e "ARGF.each_line{ |ln| ln =~ /$NAME .* \[(.*)\]/; if \$1; puts(\$1); exit; end }");
1216
fi
13-
1417
install:
1518
- carthage bootstrap --platform $PLATFORM
16-
1719
script:
1820
- set -o pipefail;
1921
case $PLATFORM in
2022
Mac)
2123
xcodebuild -scheme PMKMapKit test | xcpretty;;
2224
iOS|tvOS)
23-
xcrun instruments -w "$UUID";
24-
sleep 15;
25+
open -a "simulator" --args -CurrentDeviceUDID "$UUID";
2526
xcodebuild -scheme PMKMapKit -destination "id=$UUID" test | xcpretty;;
2627
esac

PMKMapKit.xcodeproj/project.pbxproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
isa = PBXProject;
167167
attributes = {
168168
LastSwiftUpdateCheck = 0800;
169-
LastUpgradeCheck = 0800;
169+
LastUpgradeCheck = 0830;
170170
ORGANIZATIONNAME = "Max Howell";
171171
TargetAttributes = {
172172
63C7FFA61D5BEE09003BAE60 = {
@@ -267,6 +267,7 @@
267267
CLANG_WARN_INFINITE_RECURSION = YES;
268268
CLANG_WARN_INT_CONVERSION = YES;
269269
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
270+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
270271
CLANG_WARN_SUSPICIOUS_MOVES = YES;
271272
CLANG_WARN_UNREACHABLE_CODE = YES;
272273
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -325,6 +326,7 @@
325326
CLANG_WARN_INFINITE_RECURSION = YES;
326327
CLANG_WARN_INT_CONVERSION = YES;
327328
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
329+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
328330
CLANG_WARN_SUSPICIOUS_MOVES = YES;
329331
CLANG_WARN_UNREACHABLE_CODE = YES;
330332
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

PMKMapKit.xcodeproj/xcshareddata/xcschemes/PMKMapKit.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "0830"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Tests/TestMapKit.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Test_MKDirections_Swift: XCTestCase {
88
let ex = expectation(description: "")
99

1010
class MockDirections: MKDirections {
11-
private override func calculate(completionHandler: @escaping MKDirectionsHandler) {
11+
override func calculate(completionHandler: @escaping MKDirectionsHandler) {
1212
completionHandler(MKDirectionsResponse(), nil)
1313
}
1414
}
@@ -28,7 +28,7 @@ class Test_MKDirections_Swift: XCTestCase {
2828
let ex = expectation(description: "")
2929

3030
class MockDirections: MKDirections {
31-
private override func calculateETA(completionHandler: @escaping MKETAHandler) {
31+
override func calculateETA(completionHandler: @escaping MKETAHandler) {
3232
completionHandler(MKETAResponse(), nil)
3333
}
3434
}
@@ -48,7 +48,7 @@ class Test_MKSnapshotter_Swift: XCTestCase {
4848
let ex = expectation(description: "")
4949

5050
class MockSnapshotter: MKMapSnapshotter {
51-
private override func start(completionHandler: @escaping MKMapSnapshotCompletionHandler) {
51+
override func start(completionHandler: @escaping MKMapSnapshotCompletionHandler) {
5252
completionHandler(MKMapSnapshot(), nil)
5353
}
5454
}

0 commit comments

Comments
 (0)