From c6ed7adf7a3233a8603e593b8e763be677ef99fb Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Thu, 9 Jun 2016 08:12:31 +0530 Subject: [PATCH 1/2] remove redundant assert statements --- src/libcollectionstest/str.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libcollectionstest/str.rs b/src/libcollectionstest/str.rs index 124b85bfca87..143da33976f7 100644 --- a/src/libcollectionstest/str.rs +++ b/src/libcollectionstest/str.rs @@ -123,8 +123,6 @@ macro_rules! test_concat { fn test_concat_for_different_types() { test_concat!("ab", vec![s("a"), s("b")]); test_concat!("ab", vec!["a", "b"]); - test_concat!("ab", vec!["a", "b"]); - test_concat!("ab", vec![s("a"), s("b")]); } #[test] From c605480521914302d1494f092832bb7d42b775ce Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Thu, 9 Jun 2016 08:20:08 +0530 Subject: [PATCH 2/2] clean up for test cases --- src/libcollectionstest/str.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/libcollectionstest/str.rs b/src/libcollectionstest/str.rs index 143da33976f7..07428f3f8b2d 100644 --- a/src/libcollectionstest/str.rs +++ b/src/libcollectionstest/str.rs @@ -192,24 +192,24 @@ fn test_unsafe_slice() { #[test] fn test_starts_with() { - assert!(("".starts_with(""))); - assert!(("abc".starts_with(""))); - assert!(("abc".starts_with("a"))); - assert!((!"a".starts_with("abc"))); - assert!((!"".starts_with("abc"))); - assert!((!"ödd".starts_with("-"))); - assert!(("ödd".starts_with("öd"))); + assert!("".starts_with("")); + assert!("abc".starts_with("")); + assert!("abc".starts_with("a")); + assert!(!"a".starts_with("abc")); + assert!(!"".starts_with("abc")); + assert!(!"ödd".starts_with("-")); + assert!("ödd".starts_with("öd")); } #[test] fn test_ends_with() { - assert!(("".ends_with(""))); - assert!(("abc".ends_with(""))); - assert!(("abc".ends_with("c"))); - assert!((!"a".ends_with("abc"))); - assert!((!"".ends_with("abc"))); - assert!((!"ddö".ends_with("-"))); - assert!(("ddö".ends_with("dö"))); + assert!("".ends_with("")); + assert!("abc".ends_with("")); + assert!("abc".ends_with("c")); + assert!(!"a".ends_with("abc")); + assert!(!"".ends_with("abc")); + assert!(!"ddö".ends_with("-")); + assert!("ddö".ends_with("dö")); } #[test]