libstd: Add unit tests for slice_shift_char
This commit is contained in:
@@ -3618,6 +3618,18 @@ mod tests {
|
|||||||
assert!(!" _ ".is_whitespace());
|
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]
|
#[test]
|
||||||
fn test_push_byte() {
|
fn test_push_byte() {
|
||||||
let mut s = ~"ABC";
|
let mut s = ~"ABC";
|
||||||
|
|||||||
Reference in New Issue
Block a user