Move test-cases in string.rs

This commit is contained in:
Ayush Kumar Mishra 2020-09-06 09:23:40 +05:30
parent 5a0a58bbef
commit 05d22c8519
2 changed files with 8 additions and 8 deletions

View File

@ -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);
}

View File

@ -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);
}