diff options
| -rw-r--r-- | src/libcore/str.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs index 0bb655c3f79..c4506941488 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -2231,6 +2231,13 @@ mod tests { } #[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(&"", &"")); assert (le(&"", &"foo")); |
