diff options
| author | Shulhan <m.shulhan@gmail.com> | 2019-12-09 22:25:58 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2019-12-09 22:48:52 +0700 |
| commit | a7363bf547e68adc223cac856020ed53cedb26ab (patch) | |
| tree | ec4fb6a77c24bdff09d6b1e42b537c36d1650a54 /lib/memfs/memfs_test.go | |
| parent | 8de9e95e1ba715233eb3cad0a6625a0be342beca (diff) | |
| download | pakakeh.go-a7363bf547e68adc223cac856020ed53cedb26ab.tar.xz | |
memfs: implement os.FileInfo on Node
Diffstat (limited to 'lib/memfs/memfs_test.go')
| -rw-r--r-- | lib/memfs/memfs_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/memfs/memfs_test.go b/lib/memfs/memfs_test.go index a289ef32..9a1a0657 100644 --- a/lib/memfs/memfs_test.go +++ b/lib/memfs/memfs_test.go @@ -33,9 +33,9 @@ func TestAddFile(t *testing.T) { exp: &Node{ SysPath: "testdata/direct/add/file", Path: "testdata/direct/add/file", - Name: "file", + name: "file", ContentType: "text/plain; charset=utf-8", - Size: 22, + size: 22, V: []byte("Test direct add file.\n"), }, }, { @@ -44,9 +44,9 @@ func TestAddFile(t *testing.T) { exp: &Node{ SysPath: "testdata/direct/add/file2", Path: "testdata/direct/add/file2", - Name: "file2", + name: "file2", ContentType: "text/plain; charset=utf-8", - Size: 24, + size: 24, V: []byte("Test direct add file 2.\n"), }, }} @@ -71,8 +71,8 @@ func TestAddFile(t *testing.T) { } if got != nil { - got.ModTime = time.Time{} - got.Mode = 0 + got.modTime = time.Time{} + got.mode = 0 got.Parent = nil got.Childs = nil } @@ -86,8 +86,8 @@ func TestAddFile(t *testing.T) { } if got != nil { - got.ModTime = time.Time{} - got.Mode = 0 + got.modTime = time.Time{} + got.mode = 0 got.Parent = nil got.Childs = nil } @@ -175,7 +175,7 @@ func TestGet(t *testing.T) { continue } - if got.Size <= MaxFileSize { + if got.size <= MaxFileSize { test.Assert(t, "node.V", c.expV, got.V, true) } |
