Skip to content

Commit

Permalink
Soudex: Fix PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelclarkcuadrado committed Dec 13, 2023
1 parent 336b7ec commit 0e44fa3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
3 changes: 0 additions & 3 deletions go.mod

This file was deleted.

4 changes: 0 additions & 4 deletions soundex.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func Soundex(s string) string {
if p <= 'z' && p >= 'a' {
p -= 32 // convert to uppercase
}
if p < 'A' || p > 'Z' {
// invalid first letter
return "0000"
}
b.WriteByte(p)

n := 0
Expand Down
18 changes: 0 additions & 18 deletions tests/soundex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,6 @@ import (
"testing"
)

//func BenchmarkSoundex(b *testing.B) {
// fd, err := os.Open("testdata/english_names.txt")
// if err != nil {
// b.Fatal(err)
// }
// defer fd.Close()
//
// scanner := bufio.NewScanner(fd)
// for scanner.Scan() {
// s := smetrics.Soundex(scanner.Text())
//
// // Trivially use the result to avoid compiler optimizations.
// if len(s) != 4 {
// b.Fail()
// }
// }
//}

func TestSoundex(t *testing.T) {
cases := []soundexcase{
{"Euler", "E460"},
Expand Down

0 comments on commit 0e44fa3

Please sign in to comment.