Update courselist_test.go - add cycle check in the middle of course list
This commit is contained in:
parent
b5c90197fe
commit
d199667f5f
1 changed files with 11 additions and 0 deletions
|
@ -90,3 +90,14 @@ func TestGetCourseList_weirdScience(t *testing.T) {
|
||||||
impl(t, weirdScience, GetCourseList(weirdScience))
|
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))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue