fix(lint): 删除 cache_test.go 中未使用的测试函数
移除 TestContains 和 TestContainsInt,对应的辅助函数已删除 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e646cc5d05
commit
742e261fdc
18
internal/cache/cache_test.go
vendored
18
internal/cache/cache_test.go
vendored
@ -346,21 +346,3 @@ func TestPathMatch(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestContains(t *testing.T) {
|
||||
if !contains([]string{"GET", "POST"}, "GET") {
|
||||
t.Error("Expected to find GET")
|
||||
}
|
||||
if contains([]string{"GET", "POST"}, "DELETE") {
|
||||
t.Error("Expected not to find DELETE")
|
||||
}
|
||||
}
|
||||
|
||||
func TestContainsInt(t *testing.T) {
|
||||
if !containsInt([]int{200, 301, 302}, 200) {
|
||||
t.Error("Expected to find 200")
|
||||
}
|
||||
if containsInt([]int{200, 301, 302}, 404) {
|
||||
t.Error("Expected not to find 404")
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user