Skip to content

Commit

Permalink
Improve some test names in mux_test.
Browse files Browse the repository at this point in the history
  • Loading branch information
sengi committed Jan 21, 2024
1 parent 015a353 commit 3e4ac26
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions triemux/mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ func benchSetup() *Mux {
return tm
}

// Test behaviour looking up extant urls
func BenchmarkLookup(b *testing.B) {
func BenchmarkLookupFound(b *testing.B) {
b.StopTimer()
tm := benchSetup()
urls := loadStrings("testdata/urls")
Expand All @@ -229,8 +228,7 @@ func BenchmarkLookup(b *testing.B) {
}
}

// Test behaviour when looking up nonexistent urls
func BenchmarkLookupBogus(b *testing.B) {
func BenchmarkLookupNotFound(b *testing.B) {
b.StopTimer()
tm := benchSetup()
urls := loadStrings("testdata/bogus")
Expand All @@ -242,9 +240,7 @@ func BenchmarkLookupBogus(b *testing.B) {
}
}

// Test worst-case lookup behaviour (see comment in findlongestmatch for
// details)
func BenchmarkLookupMalicious(b *testing.B) {
func BenchmarkLookupWorstCase(b *testing.B) {
b.StopTimer()
tm := benchSetup()
b.StartTimer()
Expand Down

0 comments on commit 3e4ac26

Please sign in to comment.