From ed80409f2a904e328d2fcef89296a7e53a15a664 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Tue, 24 Aug 2021 19:56:14 +0200 Subject: add extractNewChunks --- chunk_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 chunk_test.go (limited to 'chunk_test.go') 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") + } +} -- cgit v1.2.3