-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused file(s), Add Test-Case & Bump Version for release
- Loading branch information
Showing
6 changed files
with
83 additions
and
368,162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/test/kotlin/com/londogard/fuzzymatch/FuzzyMatcherTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
package com.londogard.fuzzymatch | ||
|
||
import org.junit.Test | ||
|
||
|
||
class FuzzyMatcherTest { | ||
val lines = javaClass.getResourceAsStream("english_355k_words.txt").bufferedReader().readLines() | ||
val fuzzyMatcher = FuzzyMatcher() | ||
@Test | ||
fun `fuzzy match should match something`() { | ||
assert(fuzzyMatcher.fuzzyMatch(lines, "2nd").contains(FuzzyMatcher.Result(listOf(0, 1, 2), 41, "2nd"))) | ||
assert(fuzzyMatcher.fuzzyMatch(lines, "a").size == 20) | ||
} | ||
|
||
@Test | ||
fun `fuzzy match should return N results`() { | ||
assert(fuzzyMatcher.fuzzyMatch(lines, "a", 5).size == 5) | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.