Return specific type (#4840)
This commit is contained in:
parent
0976d3307f
commit
facf841992
2 changed files with 3 additions and 7 deletions
|
|
@ -1108,12 +1108,8 @@ func TestBuildCustomErrorLocationsPerServer(t *testing.T) {
|
|||
|
||||
for _, c := range testCases {
|
||||
response := buildCustomErrorLocationsPerServer(c.server)
|
||||
if results, ok := response.([]errorLocation); ok {
|
||||
if !reflect.DeepEqual(c.expectedResults, results) {
|
||||
t.Errorf("Expected %+v but got %+v", c.expectedResults, results)
|
||||
}
|
||||
} else {
|
||||
t.Error("Unable to convert to []errorLocation")
|
||||
if !reflect.DeepEqual(c.expectedResults, response) {
|
||||
t.Errorf("Expected %+v but got %+v", c.expectedResults, response)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue