add test for eq_slice fix
This commit is contained in:
parent
21172ee280
commit
225cdc4894
1 changed files with 7 additions and 0 deletions
|
@ -2230,6 +2230,13 @@ mod tests {
|
|||
assert (!eq(&~"foo", &~"bar"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_eq_slice() {
|
||||
assert (eq_slice(view("foobar", 0, 3), "foo"));
|
||||
assert (eq_slice(view("barfoo", 3, 6), "foo"));
|
||||
assert (!eq_slice("foo1", "foo2"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_le() {
|
||||
assert (le(&"", &""));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue