File tree 3 files changed +16
-2
lines changed
Shortest Path (Unweighted)
ShortestPath.playground/Pages/Shortest path example.xcplaygroundpage
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change
1
+ // last checked with Xcode 9.0b4
2
+ #if swift(>=4.0)
3
+ print ( " Hello, Swift 4! " )
4
+ #endif
5
+
1
6
func breadthFirstSearchShortestPath( graph: Graph , source: Node ) -> Graph {
2
7
let shortestPathGraph = graph. duplicate ( )
3
8
Original file line number Diff line number Diff line change 1
1
import XCTest
2
2
3
3
class ShortestPathTests : XCTestCase {
4
+
5
+ func testSwift4( ) {
6
+ // last checked with Xcode 9.0b4
7
+ #if swift(>=4.0)
8
+ print ( " Hello, Swift 4! " )
9
+ #endif
10
+ }
4
11
5
12
func testShortestPathWhenGivenTree( ) {
6
13
let tree = Graph ( )
Original file line number Diff line number Diff line change 182
182
ONLY_ACTIVE_ARCH = YES;
183
183
SDKROOT = macosx;
184
184
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
185
+ SWIFT_VERSION = 4.0;
185
186
};
186
187
name = Debug;
187
188
};
218
219
MACOSX_DEPLOYMENT_TARGET = 10.11;
219
220
MTL_ENABLE_DEBUG_INFO = NO;
220
221
SDKROOT = macosx;
222
+ SWIFT_VERSION = 4.0;
221
223
};
222
224
name = Release;
223
225
};
231
233
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
232
234
PRODUCT_NAME = "$(TARGET_NAME)";
233
235
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
234
- SWIFT_VERSION = 3 .0;
236
+ SWIFT_VERSION = 4 .0;
235
237
};
236
238
name = Debug;
237
239
};
244
246
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
245
247
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
246
248
PRODUCT_NAME = "$(TARGET_NAME)";
247
- SWIFT_VERSION = 3 .0;
249
+ SWIFT_VERSION = 4 .0;
248
250
};
249
251
name = Release;
250
252
};
You can’t perform that action at this time.
0 commit comments