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-int.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-int.rs')
| -rw-r--r-- | src/test/run-pass/lib-int.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/run-pass/lib-int.rs b/src/test/run-pass/lib-int.rs new file mode 100644 index 00000000..ecca40b9 --- /dev/null +++ b/src/test/run-pass/lib-int.rs @@ -0,0 +1,15 @@ +use std; + +import std._int; +import std._str.eq; + +fn test_to_str() { + check (eq(_int.to_str(0, 10u), "0")); + check (eq(_int.to_str(1, 10u), "1")); + check (eq(_int.to_str(-1, 10u), "-1")); + check (eq(_int.to_str(255, 16u), "ff")); +} + +fn main() { + test_to_str(); +} |