Skip to content

Commit

Permalink
libstd: Add unit tests for slice_shift_char
Browse files Browse the repository at this point in the history
  • Loading branch information
pczarn committed Mar 10, 2014
1 parent 0349f2a commit 262d154
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/libstd/str.rs
Expand Up @@ -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";
Expand Down

0 comments on commit 262d154

Please sign in to comment.