Skip to content

Commit

Permalink
Cleaning up Ldist tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Dec 7, 2024
1 parent d8e9a0e commit f5e9faa
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions ox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ func TestLdist(t *testing.T) {
}{
{"", "", 0},
{"", "a", 1},
{"a", "", 1},
{"ab", "aa", 1},
{"ab", "aaa", 2},
{"ab", "ba", 2},
Expand All @@ -73,21 +72,21 @@ func TestLdist(t *testing.T) {
{"fod", "Food", 1},
{"foo", "", 3},
{"foo", "bar", 3},
{"Food", "foo", 1},
{"foo", "food", 1},
{"foo", "Food", 1},
{"Hafþór Júlíus Björnsson", "Hafþor Julius Bjornsson", 4},
{"", "hello", 5},
{"hello", "", 5},
{"hello", "hello", 0},
{"kitten", "sitting", 3},
{"Kitten", "Sitting", 3},
{"levenshtein", "frankenstein", 6},
{"resume and cafe", "resumé and café", 2},
{"resume and cafe", "resumes and cafes", 2},
{"test", "t", 3},
// Testing acutes and umlauts
{"resumé and café", "resumés and cafés", 2},
{"resume and cafe", "resumé and café", 2},
{"Hafþór Júlíus Björnsson", "Hafþor Julius Bjornsson", 4},
// Only 2 characters are less in the 2nd string
{"rosettacode", "raisethysword", 8},
{"saturday", "sunday", 3},
{"sitten", "sittin", 1},
{"sittin", "sitting", 1},
{"sleep", "fleeting", 5},
{"test", "t", 3},
{"།་གམ་འས་པ་་མ།", "།་གམའས་པ་་མ", 2},
}
for _, test := range tests {
Expand Down

0 comments on commit f5e9faa

Please sign in to comment.