Skip to content

Commit 83d28c8

Browse files
authored
Merge pull request #547 from shabirjan/BloomFilter-Swift4
Bloom filter swift4
2 parents 989d736 + efa7e4e commit 83d28c8

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Bloom Filter/BloomFilter.playground/Contents.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
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
36
public class BloomFilter<T> {
47
fileprivate var array: [Bool]
58
private var hashFunctions: [(T) -> Int]

Bloom Filter/Tests/BloomFilterTests.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ func sdbm(_ x: String) -> Int {
2424
}
2525

2626
class 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

Bloom Filter/Tests/Tests.xcodeproj/project.pbxproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@
176176
ONLY_ACTIVE_ARCH = YES;
177177
SDKROOT = macosx;
178178
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
179+
SWIFT_VERSION = 4.0;
179180
};
180181
name = Debug;
181182
};
@@ -215,6 +216,7 @@
215216
MTL_ENABLE_DEBUG_INFO = NO;
216217
SDKROOT = macosx;
217218
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
219+
SWIFT_VERSION = 4.0;
218220
};
219221
name = Release;
220222
};
@@ -226,7 +228,7 @@
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
};
@@ -238,7 +240,7 @@
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
};

0 commit comments

Comments
 (0)