Remove old tests
This commit is contained in:
parent
3e10ffcb81
commit
ff79670569
@ -756,36 +756,6 @@ fn test_trim_end_matches() {
|
||||
assert_eq!("123foo1bar123".trim_end_matches(|c: char| c.is_numeric()), "123foo1bar");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_trim_left_matches() {
|
||||
let v: &[char] = &[];
|
||||
assert_eq!(" *** foo *** ".trim_left_matches(v), " *** foo *** ");
|
||||
let chars: &[char] = &['*', ' '];
|
||||
assert_eq!(" *** foo *** ".trim_left_matches(chars), "foo *** ");
|
||||
assert_eq!(" *** *** ".trim_left_matches(chars), "");
|
||||
assert_eq!("foo *** ".trim_left_matches(chars), "foo *** ");
|
||||
|
||||
assert_eq!("11foo1bar11".trim_left_matches('1'), "foo1bar11");
|
||||
let chars: &[char] = &['1', '2'];
|
||||
assert_eq!("12foo1bar12".trim_left_matches(chars), "foo1bar12");
|
||||
assert_eq!("123foo1bar123".trim_left_matches(|c: char| c.is_numeric()), "foo1bar123");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_trim_right_matches() {
|
||||
let v: &[char] = &[];
|
||||
assert_eq!(" *** foo *** ".trim_right_matches(v), " *** foo *** ");
|
||||
let chars: &[char] = &['*', ' '];
|
||||
assert_eq!(" *** foo *** ".trim_right_matches(chars), " *** foo");
|
||||
assert_eq!(" *** *** ".trim_right_matches(chars), "");
|
||||
assert_eq!(" *** foo".trim_right_matches(chars), " *** foo");
|
||||
|
||||
assert_eq!("11foo1bar11".trim_right_matches('1'), "11foo1bar");
|
||||
let chars: &[char] = &['1', '2'];
|
||||
assert_eq!("12foo1bar12".trim_right_matches(chars), "12foo1bar");
|
||||
assert_eq!("123foo1bar123".trim_right_matches(|c: char| c.is_numeric()), "123foo1bar");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_trim_matches() {
|
||||
let v: &[char] = &[];
|
||||
@ -821,26 +791,6 @@ fn test_trim_end() {
|
||||
assert_eq!(" hey".trim_end(), " hey");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_trim_left() {
|
||||
assert_eq!("".trim_left(), "");
|
||||
assert_eq!("a".trim_left(), "a");
|
||||
assert_eq!(" ".trim_left(), "");
|
||||
assert_eq!(" blah".trim_left(), "blah");
|
||||
assert_eq!(" \u{3000} wut".trim_left(), "wut");
|
||||
assert_eq!("hey ".trim_left(), "hey ");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_trim_right() {
|
||||
assert_eq!("".trim_right(), "");
|
||||
assert_eq!("a".trim_right(), "a");
|
||||
assert_eq!(" ".trim_right(), "");
|
||||
assert_eq!("blah ".trim_right(), "blah");
|
||||
assert_eq!("wut \u{3000} ".trim_right(), "wut");
|
||||
assert_eq!(" hey".trim_right(), " hey");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_trim() {
|
||||
assert_eq!("".trim(), "");
|
||||
|
Loading…
Reference in New Issue
Block a user