File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 11//: Playground - noun: a place where people can play
2-
2+ // last checked with Xcode 9.0b4
3+ #if swift(>=4.0)
4+ print ( " Hello, Swift 4! " )
5+ #endif
36public class BloomFilter < T> {
47 fileprivate var array : [ Bool ]
58 private var hashFunctions : [ ( T ) -> Int ]
Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ func sdbm(_ x: String) -> Int {
2424}
2525
2626class BloomFilterTests : XCTestCase {
27-
27+ func testSwift4( ) {
28+ // last checked with Xcode 9.0b4
29+ #if swift(>=4.0)
30+ print ( " Hello, Swift 4! " )
31+ #endif
32+ }
2833 func testSingleHashFunction( ) {
2934 let bloom = BloomFilter < String > ( hashFunctions: [ djb2] )
3035
Original file line number Diff line number Diff line change 176176 ONLY_ACTIVE_ARCH = YES;
177177 SDKROOT = macosx;
178178 SWIFT_OPTIMIZATION_LEVEL = "-Onone";
179+ SWIFT_VERSION = 4.0;
179180 };
180181 name = Debug;
181182 };
215216 MTL_ENABLE_DEBUG_INFO = NO;
216217 SDKROOT = macosx;
217218 SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
219+ SWIFT_VERSION = 4.0;
218220 };
219221 name = Release;
220222 };
226228 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
227229 PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
228230 PRODUCT_NAME = "$(TARGET_NAME)";
229- SWIFT_VERSION = 3 .0;
231+ SWIFT_VERSION = 4 .0;
230232 };
231233 name = Debug;
232234 };
238240 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
239241 PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
240242 PRODUCT_NAME = "$(TARGET_NAME)";
241- SWIFT_VERSION = 3 .0;
243+ SWIFT_VERSION = 4 .0;
242244 };
243245 name = Release;
244246 };
You can’t perform that action at this time.
0 commit comments