mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Move test-cases in string.rs
This commit is contained in:
parent
5a0a58bbef
commit
05d22c8519
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user