diff options
author | michelou <michelou@epfl.ch> | 2007-09-25 17:10:19 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-09-25 17:10:19 +0000 |
commit | b979e14d6e70039c9cd88091b9bdd108ecd7d0c4 (patch) | |
tree | f2adf3decfd0f6f7350e275eaee2ebca5d0d0a30 | |
parent | aee3d8d52d13849aa7670dc98d6295382c03044c (diff) | |
download | scala-b979e14d6e70039c9cd88091b9bdd108ecd7d0c4.tar.gz scala-b979e14d6e70039c9cd88091b9bdd108ecd7d0c4.tar.bz2 scala-b979e14d6e70039c9cd88091b9bdd108ecd7d0c4.zip |
added tests for bin/hex/oct conversions
-rw-r--r-- | test/files/run/richs.check | 5 | ||||
-rw-r--r-- | test/files/run/richs.scala | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/richs.check b/test/files/run/richs.check index 2aa7e9467d..a970a814b1 100644 --- a/test/files/run/richs.check +++ b/test/files/run/richs.check @@ -12,6 +12,11 @@ RichIntTest: 13 0 0 +10000 +10 +20 +10001 +ffffffff RichStringTest1: s1: abc diff --git a/test/files/run/richs.scala b/test/files/run/richs.scala index db8f228843..674ca8fe10 100644 --- a/test/files/run/richs.scala +++ b/test/files/run/richs.scala @@ -53,6 +53,13 @@ object RichIntTest extends RichTest { println(length(m to n)) println(length(n until m)) println(length(n to m)) + + println(16.toBinaryString) // should be "10000" + println(16.toHexString) // should be "10" + println(16.toOctalString) // should be "20" + + println(65537.toHexString) // should be "10001" + println((-1).toHexString) // should be "ffffffff" } } object RichStringTest1 extends RichTest { |