summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-09-25 17:10:19 +0000
committermichelou <michelou@epfl.ch>2007-09-25 17:10:19 +0000
commitb979e14d6e70039c9cd88091b9bdd108ecd7d0c4 (patch)
treef2adf3decfd0f6f7350e275eaee2ebca5d0d0a30 /test
parentaee3d8d52d13849aa7670dc98d6295382c03044c (diff)
downloadscala-b979e14d6e70039c9cd88091b9bdd108ecd7d0c4.tar.gz
scala-b979e14d6e70039c9cd88091b9bdd108ecd7d0c4.tar.bz2
scala-b979e14d6e70039c9cd88091b9bdd108ecd7d0c4.zip
added tests for bin/hex/oct conversions
Diffstat (limited to 'test')
-rw-r--r--test/files/run/richs.check5
-rw-r--r--test/files/run/richs.scala7
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 {