From cdacf7ae06aab073d6fdd3d9f0d25e54d99930e1 Mon Sep 17 00:00:00 2001 From: Kharec Date: Mon, 1 Dec 2025 20:46:55 +0100 Subject: [PATCH] test: add unit test for p1 from paper calculation --- internal/2015/DaySix/code_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 internal/2015/DaySix/code_test.go diff --git a/internal/2015/DaySix/code_test.go b/internal/2015/DaySix/code_test.go new file mode 100644 index 0000000..6588b40 --- /dev/null +++ b/internal/2015/DaySix/code_test.go @@ -0,0 +1,17 @@ +package daysix + +import "testing" + +var testInput = []string{ + "turn on 0,0 through 999,999", + "toggle 0,0 through 999,0", + "turn off 499,499 through 500,500", +} + +func TestPartOne(t *testing.T) { + expected := 998996 + got := PartOne(testInput) + if got != expected { + t.Errorf("PartOne() = %d, want %d", got, expected) + } +}