mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
add test for eq_slice fix
This commit is contained in:
parent
21172ee280
commit
225cdc4894
@ -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…
Reference in New Issue
Block a user