Skip to content

Commit

Permalink
Added str tests in library
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush Kumar Mishra committed Sep 5, 2020
1 parent c336478 commit 5a0a58b
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/str.rs
Expand Up @@ -1921,3 +1921,11 @@ fn different_str_pattern_forwarding_lifetimes() {

foo::<&str>("x");
}

#[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 5a0a58b

Please sign in to comment.