diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-02-10 21:40:08 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-02-10 21:40:08 +0100 |
commit | aa18beccff3b2f2680575c02f30467be0a557f13 (patch) | |
tree | 014ffb8174f3165c6450f49283e47ba219e342da /test/junit | |
parent | 78c378c97c51600cac1cf42edd050aceb2366026 (diff) | |
parent | e5517e67eea79fbbd886110ff6dc993842852cf8 (diff) | |
download | scala-aa18beccff3b2f2680575c02f30467be0a557f13.tar.gz scala-aa18beccff3b2f2680575c02f30467be0a557f13.tar.bz2 scala-aa18beccff3b2f2680575c02f30467be0a557f13.zip |
Merge pull request #4924 from ShaneDelmore/SI-9452
SI-9452: Extend BigDecimal with Ordered for java interop
Diffstat (limited to 'test/junit')
-rw-r--r-- | test/junit/scala/math/BigDecimalTest.scala | 5 | ||||
-rw-r--r-- | test/junit/scala/math/BigIntTest.scala | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/junit/scala/math/BigDecimalTest.scala b/test/junit/scala/math/BigDecimalTest.scala index a9e2481f37..5de02cbe0c 100644 --- a/test/junit/scala/math/BigDecimalTest.scala +++ b/test/junit/scala/math/BigDecimalTest.scala @@ -260,4 +260,9 @@ class BigDecimalTest { testPrecision() testRounded() } + + @Test + def testIsComparable() { + assert(BigDecimal(0.1).isInstanceOf[java.lang.Comparable[_]]) + } } diff --git a/test/junit/scala/math/BigIntTest.scala b/test/junit/scala/math/BigIntTest.scala new file mode 100644 index 0000000000..5a5694a775 --- /dev/null +++ b/test/junit/scala/math/BigIntTest.scala @@ -0,0 +1,16 @@ +package scala.math + +import java.math.{BigInteger => BI, MathContext => MC} + +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +@RunWith(classOf[JUnit4]) +class BigIntTest { + + @Test + def testIsComparable() { + assert(BigInt(1).isInstanceOf[java.lang.Comparable[_]]) + } +} |