github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/utils/unittest/files.go (about) 1 package unittest 2 3 import ( 4 "os" 5 "testing" 6 7 "github.com/stretchr/testify/require" 8 ) 9 10 func RequireFileEmpty(t *testing.T, path string) { 11 require.FileExists(t, path) 12 13 fi, err := os.Stat(path) 14 require.NoError(t, err) 15 16 size := fi.Size() 17 18 require.Equal(t, int64(0), size) 19 }