Check checks all the attributes of the object are correct
(t *testing.T, obj fs.Object, precision time.Duration)
| 146 | |
| 147 | // Check checks all the attributes of the object are correct |
| 148 | func (i *Item) Check(t *testing.T, obj fs.Object, precision time.Duration) { |
| 149 | i.CheckHashes(t, obj) |
| 150 | assert.Equal(t, i.Size, obj.Size(), fmt.Sprintf("%s: size incorrect file=%d vs obj=%d", i.Path, i.Size, obj.Size())) |
| 151 | i.CheckModTime(t, obj, obj.ModTime(context.Background()), precision) |
| 152 | } |
| 153 | |
| 154 | // Normalize runs a utf8 normalization on the string if running on OS |
| 155 | // X. This is because OS X denormalizes file names it writes to the |