INNER CODE UNIT · Go

createTest

philippgille/gokv · badgerdb/badgerdb_test.go:104

	createTest := func(codec encoding.Codec) func(t *testing.T) {
		return func(t *testing.T) {
			store, path := createStore(t, codec)
			defer cleanUp(store, path)

			// Prep
			err := store.Set("foo", test.Foo{Bar: "baz"})
			if err != nil {
				t.Error(err)
			}

			_, err = store.Get("foo", nil) // actually nil
			if err == nil {
				t.Error("An error was expected")
			}

			var i any // actually nil
			_, err = store.Get("foo", i)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…