(t *testing.T)
| 133 | } |
| 134 | |
| 135 | func TestMetaFile_Write(t *testing.T) { |
| 136 | mFile, err := bfs.OpenMetaFile("testdata/test.m", &sync.RWMutex{}) |
| 137 | if err != nil { |
| 138 | t.Fatal(err) |
| 139 | } |
| 140 | defer func() { |
| 141 | _ = mFile.Close() |
| 142 | }() |
| 143 | |
| 144 | var hash = bfs.Hash("123456") |
| 145 | |
| 146 | err = mFile.WriteBodyBlockUnsafe(hash, 0, 100, 0, 100) |
| 147 | if err != nil { |
| 148 | t.Fatal(err) |
| 149 | } |
| 150 | |
| 151 | err = mFile.WriteClose(hash, 0, 100) |
| 152 | if err != nil { |
| 153 | t.Fatal(err) |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | func TestMetaFile_RemoveFile(t *testing.T) { |
| 158 | mFile, err := bfs.OpenMetaFile("testdata/test.m", &sync.RWMutex{}) |
nothing calls this directly
no test coverage detected