1
Fork 0

stdlib: Add regression tests for std::str

This commit is contained in:
Brian Anderson 2011-05-22 01:35:44 -04:00
parent 443e1e4557
commit 10c904bc6a

View file

@ -131,6 +131,14 @@ fn test_slice() {
500000u))); 500000u)));
} }
fn test_ends_with() {
assert (str::ends_with("", ""));
assert (str::ends_with("abc", ""));
assert (str::ends_with("abc", "c"));
assert (!str::ends_with("a", "abc"));
assert (!str::ends_with("", "abc"));
}
fn main() { fn main() {
test_bytes_len(); test_bytes_len();
test_index_and_rindex(); test_index_and_rindex();
@ -141,4 +149,5 @@ fn main() {
test_connect(); test_connect();
test_to_upper(); test_to_upper();
test_slice(); test_slice();
test_ends_with();
} }