diff options
| author | Jeffrey Yasskin <[email protected]> | 2010-07-24 16:01:34 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-08-06 17:25:27 -0700 |
| commit | 581a95a804f77259153c030d39f861282b468612 (patch) | |
| tree | 9b31cad6fe2ac9107a99baa70c4872666a1b7188 /src/test | |
| parent | Change the destructor-ordering test to use channels instead of a shared mutab... (diff) | |
| download | rust-581a95a804f77259153c030d39f861282b468612.tar.xz rust-581a95a804f77259153c030d39f861282b468612.zip | |
Add an int->str conversion function.
The test currently fails because string equality isn't implemented.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/int-lib.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/run-pass/int-lib.rs b/src/test/run-pass/int-lib.rs new file mode 100644 index 00000000..ce39de43 --- /dev/null +++ b/src/test/run-pass/int-lib.rs @@ -0,0 +1,15 @@ +use std; + +import std._int; + +fn test_to_str() { + check (_int.to_str(0, 10u) == "0"); + check (_int.to_str(1, 10u) == "1"); + check (_int.to_str(-1, 10u) == "-1"); + check (_int.to_str(255, 16u) == "ff"); + check (_int.to_str(-71, 36u) == "-1z"); +} + +fn main() { + test_to_str(); +} |