Skip to content

Commit 27bd589

Browse files
authored
Merge pull request kodecocodes#529 from remlostime/link-list-swift
[Swift 4] Update Linked List
2 parents 5a49242 + d54829d commit 27bd589

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Linked List/LinkedList.playground/Contents.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
// For best results, don't forget to select "Show Rendered Markup" from XCode's "Editor" menu
44

55
//: Linked List Class Declaration:
6+
// last checked with Xcode 9.0b4
7+
#if swift(>=4.0)
8+
print("Hello, Swift 4!")
9+
#endif
10+
611
public final class LinkedList<T> {
712

813
/// Linked List's Node Class Declaration

Linked List/Tests/LinkedListTests.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ class LinkedListTest: XCTestCase {
1111
return list
1212
}
1313

14+
func testSwift4() {
15+
// last checked with Xcode 9.0b4
16+
#if swift(>=4.0)
17+
print("Hello, Swift 4!")
18+
#endif
19+
}
20+
1421
func testEmptyList() {
1522
let list = LinkedList<Int>()
1623
XCTAssertTrue(list.isEmpty)

Linked List/Tests/Tests.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
222222
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
223223
PRODUCT_NAME = "$(TARGET_NAME)";
224-
SWIFT_VERSION = 3.0;
224+
SWIFT_VERSION = 4.0;
225225
};
226226
name = Debug;
227227
};
@@ -233,7 +233,7 @@
233233
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
234234
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
235235
PRODUCT_NAME = "$(TARGET_NAME)";
236-
SWIFT_VERSION = 3.0;
236+
SWIFT_VERSION = 4.0;
237237
};
238238
name = Release;
239239
};

0 commit comments

Comments
 (0)