Skip to content

Commit e114d62

Browse files
committed
Auto merge of rust-lang#76368 - ayushmishra2005:move_str_contact_library, r=jyn514
Added str tests in library Added str tests in library as a part of rust-lang#76268 r? @matklad
2 parents c133aac + 05d22c8 commit e114d62

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

library/alloc/tests/string.rs

+8
Original file line numberDiff line numberDiff line change
@@ -721,3 +721,11 @@ fn test_from_char() {
721721
let s: String = 'x'.into();
722722
assert_eq!(s, 'x'.to_string());
723723
}
724+
725+
#[test]
726+
fn test_str_concat() {
727+
let a: String = "hello".to_string();
728+
let b: String = "world".to_string();
729+
let s: String = format!("{}{}", a, b);
730+
assert_eq!(s.as_bytes()[9], 'd' as u8);
731+
}

src/test/ui/str-concat.rs

-9
This file was deleted.

0 commit comments

Comments
 (0)