summaryrefslogtreecommitdiff
path: root/main_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/main_test.go b/main_test.go
new file mode 100644
index 0000000..3e79bf9
--- /dev/null
+++ b/main_test.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+ "testing"
+)
+
+func TestMain(t *testing.T) {
+ tasks, err := readInput("testdata/test_tasks.txt")
+ if err != nil {
+ t.Logf("Expected no error when reading input file, got '%s'", err)
+ t.FailNow()
+ }
+
+ if len(tasks) != 3 {
+ t.Logf("Expected 3 tasks to be parsed, got %d", len(tasks))
+ t.FailNow()
+ }
+}