aboutsummaryrefslogtreecommitdiff
path: root/chunk_test.go
diff options
context:
space:
mode:
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")
+ }
+}