Skip to content

Commit

Permalink
[Swift 4] Update Shortest Path (Unweighted)
Browse files Browse the repository at this point in the history
  • Loading branch information
remlostime committed Aug 27, 2017
1 parent 1eb05ba commit d1542eb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// last checked with Xcode 9.0b4
#if swift(>=4.0)
print("Hello, Swift 4!")
#endif

func breadthFirstSearchShortestPath(graph: Graph, source: Node) -> Graph {
let shortestPathGraph = graph.duplicate()

Expand Down
7 changes: 7 additions & 0 deletions Shortest Path (Unweighted)/Tests/ShortestPathTests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import XCTest

class ShortestPathTests: XCTestCase {

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

func testShortestPathWhenGivenTree() {
let tree = Graph()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand Down Expand Up @@ -218,6 +219,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -231,7 +233,7 @@
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -244,7 +246,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

0 comments on commit d1542eb

Please sign in to comment.