diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-08-28 20:54:34 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-08-28 20:54:34 +0200 |
commit | 2cd98a3bcd18870da4404693212119dd8ccfaf68 (patch) | |
tree | 9fb91f1d9bf6401b7d4bc3c2dcdfcb779d230e5a /sketch_test.go | |
parent | 129a86b3a6780b7aee5a7469cc5adeaf2ea6c20f (diff) | |
download | dna-backup-2cd98a3bcd18870da4404693212119dd8ccfaf68.tar.gz dna-backup-2cd98a3bcd18870da4404693212119dd8ccfaf68.zip |
refactor(chunks): use more interfaces
Diffstat (limited to 'sketch_test.go')
-rw-r--r-- | sketch_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sketch_test.go b/sketch_test.go index 2f568e6..86a2c58 100644 --- a/sketch_test.go +++ b/sketch_test.go @@ -2,14 +2,13 @@ package main import ( "path" + "reflect" "testing" - - "github.com/google/go-cmp/cmp" ) func TestSketchChunk(t *testing.T) { dataDir := path.Join("test", "data", "repo_8k") - chunks := make(chan Chunk, 16) + chunks := make(chan StoredChunk, 16) repo := NewRepo(dataDir) versions := repo.loadVersions() go repo.loadChunks(versions, chunks) @@ -21,7 +20,7 @@ func TestSketchChunk(t *testing.T) { t.Error(err) } expected := Sketch{429857165471867, 6595034117354675, 8697818304802825} - if !cmp.Equal(sketch, expected) { + if !reflect.DeepEqual(sketch, expected) { t.Errorf("Sketch does not match, expected: %d, actual: %d", expected, sketch) } } |