tracks/rust/exercises/grade-school/tests/grade-school.rs in trackler-2.2.1.113 vs tracks/rust/exercises/grade-school/tests/grade-school.rs in trackler-2.2.1.114

- old
+ new

@@ -1,8 +1,8 @@ extern crate grade_school as school; -fn some_strings(v: Vec<&str>) -> Option<Vec<String>> { +fn some_strings(v: &[&str]) -> Option<Vec<String>> { Some(v.iter().map(|s| s.to_string()).collect()) } #[test] fn test_grades_for_empty_school() { @@ -57,31 +57,31 @@ #[ignore] fn test_grade_for_one_student() { let mut s = school::School::new(); s.add(2, "Aimee"); assert_eq!(s.grade(2), - some_strings(vec!["Aimee"])); + some_strings(&["Aimee"])); } #[test] #[ignore] fn test_grade_returns_students_sorted_by_name() { let mut s = school::School::new(); s.add(2, "James"); s.add(2, "Blair"); s.add(2, "Paul"); assert_eq!(s.grade(2), - some_strings(vec!["Blair", "James", "Paul"])); + some_strings(&["Blair", "James", "Paul"])); } #[test] #[ignore] fn test_add_students_to_different_grades() { let mut s = school::School::new(); s.add(3, "Chelsea"); s.add(7, "Logan"); assert_eq!(s.grades(), vec!(3, 7)); assert_eq!(s.grade(3), - some_strings(vec!["Chelsea"])); + some_strings(&["Chelsea"])); assert_eq!(s.grade(7), - some_strings(vec!["Logan"])); + some_strings(&["Logan"])); }