Allow nil slice in hotels_test
This commit is contained in:
parent
28176c85a0
commit
69d2aa7212
1 changed files with 5 additions and 1 deletions
|
@ -59,7 +59,11 @@ func TestComputeLoad_basic(t *testing.T) {
|
||||||
},
|
},
|
||||||
} {
|
} {
|
||||||
t.Run(tc.title, func(t *testing.T) {
|
t.Run(tc.title, func(t *testing.T) {
|
||||||
require.Equal(t, tc.result, ComputeLoad(tc.guests))
|
if len(tc.result) == 0 {
|
||||||
|
require.Empty(t, ComputeLoad(tc.guests))
|
||||||
|
} else {
|
||||||
|
require.Equal(t, tc.result, ComputeLoad(tc.guests))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue