From ec51581531afadb8c558f90509351ca0ca67af45 Mon Sep 17 00:00:00 2001 From: Kirill Nikanorov Date: Mon, 2 Mar 2020 18:27:36 +0000 Subject: [PATCH] Update courselist_test.go --- hogwarts/courselist_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hogwarts/courselist_test.go b/hogwarts/courselist_test.go index 2cecbf4..aab0205 100644 --- a/hogwarts/courselist_test.go +++ b/hogwarts/courselist_test.go @@ -14,6 +14,9 @@ func impl(t *testing.T, prereqs map[string][]string, courseList []string) { t.Errorf("course %v (index %v) depends on course %v which is not taken yet", course, index, prereq) } } + if learned[course] { + t.Errorf("course %v (index %v) has been taken at least twice", course, index) + } learned[course] = true } for course := range prereqs {