add test for eq_slice fix

This commit is contained in:
Andrew Paseltiner 2012-09-03 13:47:10 -04:00 committed by Brian Anderson
parent 21172ee280
commit 225cdc4894

View File

@ -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(&"", &""));