-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
283 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
package archivedb | ||
|
||
import ( | ||
"testing" | ||
// func TestSafeEntry(t *testing.T) { | ||
// require := require.New(t) | ||
// k, v := []byte("foo"), []byte("bar") | ||
// e := createEntry(flagEntryPut, k, v) | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
// require.Equal(e.key, k) | ||
// require.Equal(e.value, v) | ||
// require.Equal(e.Size(), uint32(len(k)+len(v)+EntryHeaderSize), "size mismatch") | ||
|
||
func TestSafeEntry(t *testing.T) { | ||
require := require.New(t) | ||
k, v := []byte("foo"), []byte("bar") | ||
e := createEntry(EntryInsertFlag, k, v) | ||
|
||
require.Equal(e.key, k) | ||
require.Equal(e.value, v) | ||
require.Equal(e.Size(), uint32(len(k)+len(v)+EntryHeaderSize), "size mismatch") | ||
|
||
} | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
module github.com/millken/archivedb | ||
|
||
go 1.17 | ||
go 1.20 | ||
|
||
require ( | ||
github.com/WenyXu/sync-adaptive-radix-tree v0.0.0-20221020123713-1ae3c4a8dd92 | ||
github.com/cespare/xxhash/v2 v2.1.2 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/stretchr/testify v1.7.0 | ||
golang.org/x/sys v0.0.0-20220403020550-483a9cbc67c0 | ||
github.com/stretchr/testify v1.8.0 | ||
golang.org/x/sys v0.0.0-20221010170243-090e33056c14 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.