diff --git a/exercises/practice/grade-school/GradeSchoolTests.fs b/exercises/practice/grade-school/GradeSchoolTests.fs index 19ddf3b8b..e6ce81929 100644 --- a/exercises/practice/grade-school/GradeSchoolTests.fs +++ b/exercises/practice/grade-school/GradeSchoolTests.fs @@ -139,3 +139,15 @@ let ``Students are sorted by name in a grade`` () = |> add "Jeff" 1 grade 5 school |> should equal ["Bradley"; "Franklin"] +[] +let ``Students are sorted by grades and then by name in the roster even when school was not sorted``() = + let school = + seq { + 1, [ "Anna"; "Charlie"; "Barb" ] + 2, [ "Peter"; "Zoe"; "Alex" ] + 3, [ "Jim" ] + } + |> Map.ofSeq + roster school + |> should equal [ "Anna"; "Barb"; "Charlie"; "Alex"; "Peter"; "Zoe"; "Jim" ] + \ No newline at end of file