diff --git a/internal/2015/DayOne/code_test.go b/internal/2015/DayOne/code_test.go index 4bcc8c1..a18265b 100644 --- a/internal/2015/DayOne/code_test.go +++ b/internal/2015/DayOne/code_test.go @@ -28,3 +28,23 @@ func TestPartOne(t *testing.T) { }) } } + +func TestPartTwo(t *testing.T) { + tests := []struct { + name string + input string + expected int + }{ + {")", ")", 1}, + {"()())", "()())", 5}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := PartTwo(tt.input) + if got != tt.expected { + t.Errorf("PartTwo(%q) = %d, want %d", tt.input, got, tt.expected) + } + }) + } +}