diff options
| author | Shulhan <ms@kilabit.info> | 2021-12-19 02:08:27 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-12-19 02:13:57 +0700 |
| commit | ca89dd47d91c84e706a5a01c6f6749ddae791074 (patch) | |
| tree | 0b845c19c0214698643db56ac72037367b5a286a /lib/memfs/memfs_test.go | |
| parent | ba9c2ea6bd2a3c39f20fe7b2cc702e7fd4c99c44 (diff) | |
| download | pakakeh.go-ca89dd47d91c84e706a5a01c6f6749ddae791074.tar.xz | |
lib/memfs: realign struct Node, Options, PathNode, and on unit tests
The realign save storage spaces on struct,
* Node: from 240 to 224 bytes (-16 bytes)
* Options: from 112 to 104 bytes (-8 bytes)
* PathNode: from 16 to 8 bytes (-8 bytes)
Diffstat (limited to 'lib/memfs/memfs_test.go')
| -rw-r--r-- | lib/memfs/memfs_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/memfs/memfs_test.go b/lib/memfs/memfs_test.go index fb259bd3..ec5fb8b2 100644 --- a/lib/memfs/memfs_test.go +++ b/lib/memfs/memfs_test.go @@ -54,9 +54,9 @@ func TestNew(t *testing.T) { cases := []struct { desc string - opts Options expErr string expMapKeys []string + opts Options }{{ desc: "With empty dir", expErr: "open : no such file or directory", @@ -241,10 +241,10 @@ func TestMemFS_AddFile(t *testing.T) { func TestMemFS_Get(t *testing.T) { cases := []struct { + expErr error path string expV []byte expContentType []string - expErr error }{{ path: "/", }, { @@ -553,9 +553,9 @@ func TestMerge(t *testing.T) { } cases := []struct { + exp *MemFS desc string params []*MemFS - exp *MemFS }{{ desc: "with the same instance", params: []*MemFS{mfsDirect, mfsDirect}, |
