Skip to content

Commit

Permalink
Remove old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Aug 19, 2018
1 parent 3e10ffc commit ff79670
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions src/liballoc/tests/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] = &[];
Expand Down Expand Up @@ -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(), "");
Expand Down

0 comments on commit ff79670

Please sign in to comment.