diff --git a/library/alloc/tests/string.rs b/library/alloc/tests/string.rs index d38655af78c..6059bec8c5a 100644 --- a/library/alloc/tests/string.rs +++ b/library/alloc/tests/string.rs @@ -721,3 +721,11 @@ fn test_from_char() { let s: String = 'x'.into(); assert_eq!(s, 'x'.to_string()); } + +#[test] +fn test_str_concat() { + let a: String = "hello".to_string(); + let b: String = "world".to_string(); + let s: String = format!("{}{}", a, b); + assert_eq!(s.as_bytes()[9], 'd' as u8); +} diff --git a/src/test/ui/str-concat.rs b/src/test/ui/str-concat.rs deleted file mode 100644 index fa2fc97d7b8..00000000000 --- a/src/test/ui/str-concat.rs +++ /dev/null @@ -1,9 +0,0 @@ -// run-pass - -pub fn main() { - let a: String = "hello".to_string(); - let b: String = "world".to_string(); - let s: String = format!("{}{}", a, b); - println!("{}", s.clone()); - assert_eq!(s.as_bytes()[9], 'd' as u8); -}