add test for char into string

This commit is contained in:
Matthias Krüger 2020-06-18 11:19:03 +02:00
parent 1d0378c454
commit 2cde4932c7

View file

@ -714,3 +714,10 @@ fn test_try_reserve_exact() {
}
}
}
#[test]
fn test_from_char() {
assert_eq!(String::from('a'), 'a'.to_string());
let s: String = 'x'.into();
assert_eq!(s, 'x'.to_string());
}