diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-18 09:01:51 -0700 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-18 09:01:51 -0700 |
commit | c5fdc815c30f0565a80a3837f368717a4e81e04d (patch) | |
tree | 48d2fc9de28b359fa9ef479e78388b9778f4ef52 /test/files/run/numbereq.scala | |
parent | 42151a9980be37eae6e8fdf40330070361fd88fd (diff) | |
parent | f4267ccd96a9143c910c66a5b0436aaa64b7c9dc (diff) | |
download | scala-c5fdc815c30f0565a80a3837f368717a4e81e04d.tar.gz scala-c5fdc815c30f0565a80a3837f368717a4e81e04d.tar.bz2 scala-c5fdc815c30f0565a80a3837f368717a4e81e04d.zip |
Merge pull request #2961 from paulp/pr/whitespace
Cull extraneous whitespace.
Diffstat (limited to 'test/files/run/numbereq.scala')
-rw-r--r-- | test/files/run/numbereq.scala | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/files/run/numbereq.scala b/test/files/run/numbereq.scala index a1f11da205..d50db6d049 100644 --- a/test/files/run/numbereq.scala +++ b/test/files/run/numbereq.scala @@ -13,13 +13,13 @@ object Test { if (x >= Byte.MinValue && x <= Byte.MaxValue) List(new java.lang.Byte(x.toByte)) else Nil, if (x >= Char.MinValue && x <= Char.MaxValue) List(new java.lang.Character(x.toChar)) else Nil ).flatten - + base ::: extras } def mkNumbers(x: BigInt): List[AnyRef] = { List( - List(BigDecimal(x, java.math.MathContext.UNLIMITED)), + List(BigDecimal(x, java.math.MathContext.UNLIMITED)), List(x), if (x.isValidDouble) List(new java.lang.Double(x.toDouble)) else Nil, if (x.isValidFloat) List(new java.lang.Float(x.toFloat)) else Nil, @@ -30,21 +30,21 @@ object Test { if (x.isValidChar) List(new java.lang.Character(x.toChar)) else Nil ).flatten } - + def main(args: Array[String]): Unit = { val ints = (0 to 15).toList map (Short.MinValue >> _) val ints2 = ints map (x => -x) val ints3 = ints map (_ + 1) val ints4 = ints2 map (_ - 1) - + val setneg1 = ints map mkNumbers val setneg2 = ints3 map mkNumbers val setpos1 = ints2 map mkNumbers val setpos2 = ints4 map mkNumbers val zero = mkNumbers(0) - - val sets = setneg1 ++ setneg2 ++ List(zero) ++ setpos1 ++ setpos2 - + + val sets = setneg1 ++ setneg2 ++ List(zero) ++ setpos1 ++ setpos2 + for (set <- sets ; x <- set ; y <- set) { // println("'%s' == '%s' (%s == %s) (%s == %s)".format(x, y, x.hashCode, y.hashCode, x.##, y.##)) assert(x == y, "%s/%s != %s/%s".format(x, x.getClass, y, y.getClass)) @@ -55,14 +55,14 @@ object Test { val bigInts2 = bigInts map (x => -x) val bigInts3 = bigInts map (_ + 1) val bigInts4 = bigInts2 map (_ - 1) - + val setneg1b = bigInts map mkNumbers val setneg2b = bigInts3 map mkNumbers val setpos1b = bigInts2 map mkNumbers val setpos2b = bigInts4 map mkNumbers val sets2 = setneg1 ++ setneg1b ++ setneg2 ++ setneg2b ++ List(zero) ++ setpos1 ++ setpos1b ++ setpos2 ++ setpos2b - + for (set <- sets2 ; x <- set ; y <- set) { // println("'%s' == '%s' (%s == %s) (%s == %s)".format(x, y, x.hashCode, y.hashCode, x.##, y.##)) assert(x == y, "%s/%s != %s/%s".format(x, x.getClass, y, y.getClass)) |