Skip to content

Commit 7f8634e

Browse files
authored
Merge pull request #601 from remlostime/shell-sort-swift
[Swift 4] Update Shell Sort
2 parents 91d41fb + 5286469 commit 7f8634e

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Shell Sort/Tests/ShellSortTests.swift

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import XCTest
22

33
class ShellSortTests: XCTestCase {
4+
func testSwift4() {
5+
// last checked with Xcode 9.0b4
6+
#if swift(>=4.0)
7+
print("Hello, Swift 4!")
8+
#endif
9+
}
10+
411
func testShellSort() {
512
checkSortAlgorithm { (a: [Int]) -> [Int] in
613
var b = a

Shell Sort/Tests/Tests.xcodeproj/project.pbxproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@
178178
ONLY_ACTIVE_ARCH = YES;
179179
SDKROOT = macosx;
180180
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
181+
SWIFT_VERSION = 4.0;
181182
};
182183
name = Debug;
183184
};
@@ -214,6 +215,7 @@
214215
MACOSX_DEPLOYMENT_TARGET = 10.11;
215216
MTL_ENABLE_DEBUG_INFO = NO;
216217
SDKROOT = macosx;
218+
SWIFT_VERSION = 4.0;
217219
};
218220
name = Release;
219221
};
@@ -225,7 +227,7 @@
225227
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
226228
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
227229
PRODUCT_NAME = "$(TARGET_NAME)";
228-
SWIFT_VERSION = 3.0;
230+
SWIFT_VERSION = 4.0;
229231
};
230232
name = Debug;
231233
};
@@ -237,7 +239,7 @@
237239
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
238240
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
239241
PRODUCT_NAME = "$(TARGET_NAME)";
240-
SWIFT_VERSION = 3.0;
242+
SWIFT_VERSION = 4.0;
241243
};
242244
name = Release;
243245
};

0 commit comments

Comments
 (0)