Skip to content

Commit

Permalink
Auto merge of rust-lang#76368 - ayushmishra2005:move_str_contact_libr…
Browse files Browse the repository at this point in the history
…ary, r=jyn514

Added str tests in library

Added str tests in library  as a part of rust-lang#76268

r? @matklad
  • Loading branch information
bors committed Sep 7, 2020
2 parents c133aac + 05d22c8 commit e114d62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 8 additions & 0 deletions library/alloc/tests/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
9 changes: 0 additions & 9 deletions src/test/ui/str-concat.rs

This file was deleted.

0 comments on commit e114d62

Please sign in to comment.