Skip to content

Commit

Permalink
[Swift 4] Update Linked List
Browse files Browse the repository at this point in the history
  • Loading branch information
remlostime committed Aug 4, 2017
1 parent 5ea9de2 commit d54829d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Linked List/LinkedList.playground/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
// For best results, don't forget to select "Show Rendered Markup" from XCode's "Editor" menu

//: Linked List Class Declaration:
// last checked with Xcode 9.0b4
#if swift(>=4.0)
print("Hello, Swift 4!")
#endif

public final class LinkedList<T> {

/// Linked List's Node Class Declaration
Expand Down
7 changes: 7 additions & 0 deletions Linked List/Tests/LinkedListTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ class LinkedListTest: XCTestCase {
return list
}

func testSwift4() {
// last checked with Xcode 9.0b4
#if swift(>=4.0)
print("Hello, Swift 4!")
#endif
}

func testEmptyList() {
let list = LinkedList<Int>()
XCTAssertTrue(list.isEmpty)
Expand Down
4 changes: 2 additions & 2 deletions Linked List/Tests/Tests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -233,7 +233,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down

1 comment on commit d54829d

@vincentngo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remlostime thanks!

Please sign in to comment.