Skip to content

Commit

Permalink
Move test-cases in string.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush Kumar Mishra committed Sep 6, 2020
1 parent 5a0a58b commit 05d22c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions library/alloc/tests/str.rs
Expand Up @@ -1921,11 +1921,3 @@ 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);
}
8 changes: 8 additions & 0 deletions library/alloc/tests/string.rs
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);
}

0 comments on commit 05d22c8

Please sign in to comment.