vfs: add tests and subsequent fixes

* Tests for VFS layer
  * Small fixes found during testing
  * Fix Close, Flush and Release behaviour for ReadFileHandle and WriteFileHandle
  * Fix nil object bugs on File
This commit is contained in:
Nick Craig-Wood
2017-10-29 21:14:05 +00:00
parent 07ec8073fe
commit e18122e88b
18 changed files with 1536 additions and 59 deletions

13
vfs/errors_test.go Normal file
View File

@ -0,0 +1,13 @@
package vfs
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestErrorError(t *testing.T) {
assert.Equal(t, "Success", OK.Error())
assert.Equal(t, "Function not implemented", ENOSYS.Error())
assert.Equal(t, "Low level error 99", Error(99).Error())
}