aboutsummaryrefslogtreecommitdiff
path: root/chunk_test.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-08-24 19:56:14 +0200
committern-peugnet <n.peugnet@free.fr>2021-08-24 19:56:14 +0200
commited80409f2a904e328d2fcef89296a7e53a15a664 (patch)
tree2b3bae49bfd0aa9d898f7e8f782e67b66b675b41 /chunk_test.go
parentdf6d5f7e24a290718adf8f068649c3bc61f5eb4d (diff)
downloaddna-backup-ed80409f2a904e328d2fcef89296a7e53a15a664.tar.gz
dna-backup-ed80409f2a904e328d2fcef89296a7e53a15a664.zip
add extractNewChunks
Diffstat (limited to 'chunk_test.go')
-rw-r--r--chunk_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/chunk_test.go b/chunk_test.go
new file mode 100644
index 0000000..4ea6b44
--- /dev/null
+++ b/chunk_test.go
@@ -0,0 +1,14 @@
+package main
+
+import "testing"
+
+func TestIsStored(t *testing.T) {
+ stored := Chunk{Id: &ChunkId{0, 0}}
+ if !stored.isStored() {
+ t.Error("Chunk ", stored, " should be stored")
+ }
+ unstored := Chunk{}
+ if unstored.isStored() {
+ t.Error("Chunk ", unstored, " should not be stored")
+ }
+}