Skip to content

Commit 3f34bbc

Browse files
committed
tokens set ratio
1 parent 73b5f65 commit 3f34bbc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Fuzzywuzzy_swiftTests/Fuzzywuzzy_swiftTests.swift

+11-1
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,22 @@ class Fuzzywuzzy_swiftTests: XCTestCase {
2121
super.tearDown()
2222
}
2323

24+
func testTokenSetRatio() {
25+
let strPairs = [("some", ""), ("", "some"), ("", ""), ("fuzzy fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear"), ("fuzzy$*#&)$#(wuzzy*@()#*()!<><>was a bear", "wuzzy wuzzy fuzzy was a bear")]
26+
for (str1, str2) in strPairs {
27+
print("STR1: \(str1)")
28+
print("STR2: \(str2)")
29+
print("TOKEN SET RATIO: \(String.fuzzTokenSetRatio(str1: str1, str2: str2))")
30+
print("-----------------")
31+
}
32+
}
33+
2434
func testTokenSortRatio() {
2535
let strPairs = [("some", ""), ("", "some"), ("", ""), ("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear"), ("fuzzy$*#&)$#(wuzzy*@()#*()!<><>was a bear", "wuzzy fuzzy was a bear")]
2636
for (str1, str2) in strPairs {
2737
print("STR1: \(str1)")
2838
print("STR2: \(str2)")
29-
print("TOKEN RATIO: \(String.fuzzTokenSortRatio(str1: str1, str2: str2))")
39+
print("TOKEN SORT RATIO: \(String.fuzzTokenSortRatio(str1: str1, str2: str2))")
3040
print("-----------------")
3141
}
3242
}

0 commit comments

Comments
 (0)