Skip to content

Commit 9558786

Browse files
committed
Make TestPutInMemoryDB work with Go versions before 1.13
1 parent 1a5c330 commit 9558786

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/box_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package objectbox_test
1818

1919
import (
20-
"errors"
2120
"github.com/objectbox/objectbox-go/test/assert"
2221
"github.com/objectbox/objectbox-go/test/model"
2322
"github.com/objectbox/objectbox-go/test/model/iot"
@@ -176,7 +175,8 @@ func TestPutInMemoryDB(t *testing.T) {
176175
var dir = "memory:iot-test"
177176
env := iot.NewTestEnvWithDir(t, dir)
178177
_, err := os.Stat(dir)
179-
assert.True(t, errors.Is(err, os.ErrNotExist)) // Must not exist in file system
178+
assert.Err(t, err) // Must not exist in file system
179+
// This is Go 1.13+ only: assert.True(t, errors.Is(err, os.ErrNotExist)) // Must not exist in file system
180180
RunTestPut(t, env)
181181
}
182182

0 commit comments

Comments
 (0)