Update courselist_test.go - add cycle check in the middle of course list

This commit is contained in:
Dmitriy 2020-03-05 17:43:55 +00:00 committed by Fedor Korotkiy
parent b5c90197fe
commit d199667f5f

View file

@ -90,3 +90,14 @@ func TestGetCourseList_weirdScience(t *testing.T) {
impl(t, weirdScience, GetCourseList(weirdScience))
})
}
func TestGetCourseList_strangeScience(t *testing.T) {
var strangeScience = map[string][]string{
"1": {"0"},
"2": {"1", "3"},
"3": {"2"},
}
require.Panics(t, func() {
impl(t, strangeScience, GetCourseList(strangeScience))
})
}