about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-07 05:20:46 +0000
committerbors <bors@rust-lang.org>2020-09-07 05:20:46 +0000
commite114d6228b948ce056de0bcdec2603c8e89d3727 (patch)
tree778c46416b9c727ec360a5036b814c3a86921fc0
parentc133aac1e955c463fb0ce3af1a9160119e2f686e (diff)
parent05d22c8519f5c29436a26d0bc47734bcf51a4dcd (diff)
downloadrust-e114d6228b948ce056de0bcdec2603c8e89d3727.tar.gz
rust-e114d6228b948ce056de0bcdec2603c8e89d3727.zip
Auto merge of #76368 - ayushmishra2005:move_str_contact_library, r=jyn514
Added str tests in library

Added str tests in library  as a part of #76268

r? @matklad
-rw-r--r--library/alloc/tests/string.rs8
-rw-r--r--src/test/ui/str-concat.rs9
2 files changed, 8 insertions, 9 deletions
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);
-}