diff options
author | Rex Kerr <ichoran@gmail.com> | 2014-02-24 16:45:56 -0800 |
---|---|---|
committer | Rex Kerr <ichoran@gmail.com> | 2014-02-25 08:49:02 -0800 |
commit | 1994a2d901e1ca948a53b3d00df9017782c47b5c (patch) | |
tree | 42a2579146086534abc772d2c1420a2a7340e14d /test/files/run/t3235-minimal.scala | |
parent | 1ea43ffb2286d63e133839c1ea0b09449b0ac168 (diff) | |
download | scala-1994a2d901e1ca948a53b3d00df9017782c47b5c.tar.gz scala-1994a2d901e1ca948a53b3d00df9017782c47b5c.tar.bz2 scala-1994a2d901e1ca948a53b3d00df9017782c47b5c.zip |
SI-3235 math.round() returns wrong results for Int and Long
Minimal fix for SI-3235.
This minimal fix includes deprecation messages to aid detection of probable errors.
Test verifies behavior: the correct values are returned, and deprecation messages are emitted.
Diffstat (limited to 'test/files/run/t3235-minimal.scala')
-rw-r--r-- | test/files/run/t3235-minimal.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/t3235-minimal.scala b/test/files/run/t3235-minimal.scala new file mode 100644 index 0000000000..dc9907b63b --- /dev/null +++ b/test/files/run/t3235-minimal.scala @@ -0,0 +1,8 @@ +object Test { + def main(args: Array[String]) { + assert(123456789.round == 123456789) + assert(math.round(123456789) == 123456789) + assert(1234567890123456789L.round == 1234567890123456789L) + assert(math.round(1234567890123456789L) == 1234567890123456789L) + } +} |