From 3e4ac26b3bd5f924858fdc78d18a4c45836de69b Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Mon, 30 Oct 2023 14:19:22 +0000 Subject: [PATCH] Improve some test names in mux_test. --- triemux/mux_test.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/triemux/mux_test.go b/triemux/mux_test.go index d9343feb..33fd4eb1 100644 --- a/triemux/mux_test.go +++ b/triemux/mux_test.go @@ -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") @@ -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") @@ -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()