libstd: Add unit tests for slice_shift_char
This commit is contained in:
parent
0349f2ae8a
commit
262d1543db
@ -3618,6 +3618,18 @@ mod tests {
|
||||
assert!(!" _ ".is_whitespace());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_slice_shift_char() {
|
||||
let data = "ประเทศไทย中";
|
||||
assert_eq!(data.slice_shift_char(), (Some('ป'), "ระเทศไทย中"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_slice_shift_char_2() {
|
||||
let empty = "";
|
||||
assert_eq!(empty.slice_shift_char(), (None, ""));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_push_byte() {
|
||||
let mut s = ~"ABC";
|
||||
|
Loading…
x
Reference in New Issue
Block a user