add test for char into string
This commit is contained in:
parent
1d0378c454
commit
2cde4932c7
1 changed files with 7 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue