diff options
| author | Graydon Hoare <[email protected]> | 2010-08-24 09:09:04 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-08-24 09:09:04 -0700 |
| commit | 14262c73119349fd5452db0811a577febbc77670 (patch) | |
| tree | d2cdef3e324346c84ed9fb6886ccdae405579084 /src/test/run-pass/lib-str.rs | |
| parent | Add very basic char / str literal handling to rustc lexer. (diff) | |
| download | rust-14262c73119349fd5452db0811a577febbc77670.tar.xz rust-14262c73119349fd5452db0811a577febbc77670.zip | |
Rename lib tests, enable lib-int.rs using _str.eq for now.
Diffstat (limited to 'src/test/run-pass/lib-str.rs')
| -rw-r--r-- | src/test/run-pass/lib-str.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/run-pass/lib-str.rs b/src/test/run-pass/lib-str.rs new file mode 100644 index 00000000..585f9b8d --- /dev/null +++ b/src/test/run-pass/lib-str.rs @@ -0,0 +1,16 @@ +use std; +import std._str; + +fn test_bytes_len() { + check (_str.byte_len("") == 0u); + check (_str.byte_len("hello world") == 11u); + check (_str.byte_len("\x63") == 1u); + check (_str.byte_len("\xa2") == 2u); + check (_str.byte_len("\u03c0") == 2u); + check (_str.byte_len("\u2620") == 3u); + check (_str.byte_len("\U0001d11e") == 4u); +} + +fn main() { + test_bytes_len(); +} |