Catch nil from List() in tests

This commit is contained in:
Nick Craig-Wood 2015-01-03 16:28:26 +00:00
parent 51b24a1dc6
commit 492362ec7d

View File

@ -99,6 +99,10 @@ func (is *Items) Done(t *testing.T) {
func CheckListingWithPrecision(t *testing.T, f fs.Fs, items []Item, precision time.Duration) {
is := NewItems(items)
for obj := range f.List() {
if obj == nil {
t.Errorf("Unexpected nil in List()")
continue
}
is.Find(t, obj, precision)
}
is.Done(t)