diff options
| author | varkor <github@varkor.com> | 2018-08-19 22:36:59 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-08-19 22:36:59 +0100 |
| commit | ff7967056916f68f2df5214e47e9e72414b44fc3 (patch) | |
| tree | 529ac90a3cfcfe6957d39491062f0dc6483da6e4 /src/liballoc | |
| parent | 3e10ffcb81e8f887289904e5aaf272e872a9cb2c (diff) | |
| download | rust-ff7967056916f68f2df5214e47e9e72414b44fc3.tar.gz rust-ff7967056916f68f2df5214e47e9e72414b44fc3.zip | |
Remove old tests
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/tests/str.rs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/liballoc/tests/str.rs b/src/liballoc/tests/str.rs index a1940c894b8..a5fa7f0c4d9 100644 --- a/src/liballoc/tests/str.rs +++ b/src/liballoc/tests/str.rs @@ -757,36 +757,6 @@ fn test_trim_end_matches() { } #[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] = &[]; assert_eq!(" *** foo *** ".trim_matches(v), " *** foo *** "); @@ -822,26 +792,6 @@ fn test_trim_end() { } #[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(), ""); assert_eq!("a".trim(), "a"); |
