1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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() } }