Update courselist_test.go

This commit is contained in:
Kirill Nikanorov 2020-03-02 18:27:36 +00:00 committed by Fedor Korotkiy
parent f8b52d3612
commit ec51581531

View file

@ -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) 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 learned[course] = true
} }
for course := range prereqs { for course := range prereqs {