Skip to content

Commit 5a0a58b

Browse files
author
Ayush Kumar Mishra
committed
Added str tests in library
1 parent c336478 commit 5a0a58b

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

library/alloc/tests/str.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1921,3 +1921,11 @@ fn different_str_pattern_forwarding_lifetimes() {
19211921

19221922
foo::<&str>("x");
19231923
}
1924+
1925+
#[test]
1926+
fn test_str_concat() {
1927+
let a: String = "hello".to_string();
1928+
let b: String = "world".to_string();
1929+
let s: String = format!("{}{}", a, b);
1930+
assert_eq!(s.as_bytes()[9], 'd' as u8);
1931+
}

src/test/ui/str-concat.rs

-9
This file was deleted.

0 commit comments

Comments
 (0)