1 2 3 4 5 6 7 8
pub fn assert_contains(haystack: &str, needle: &str) { assert!( haystack.contains(needle), "expected output to contain '{}'\noutput: {}", needle, haystack ); }