diff options
author | Haoyi Li <haoyi@haoyi-mbp.corp.dropbox.com> | 2014-11-26 00:50:50 -0800 |
---|---|---|
committer | Haoyi Li <haoyi@haoyi-mbp.corp.dropbox.com> | 2014-11-26 00:50:50 -0800 |
commit | 88595a41e3ec13c1a516e847fe3d0b279facf3fc (patch) | |
tree | 4f03b902de7b81fa2e32792e84b680038345e761 /examples/scala-js/test-suite/src/test/scala/scala/scalajs/testsuite/compiler/CharTest.scala | |
parent | 82773a11c99d260e97ca63356bfb7b417599b1e9 (diff) | |
download | hands-on-scala-js-88595a41e3ec13c1a516e847fe3d0b279facf3fc.tar.gz hands-on-scala-js-88595a41e3ec13c1a516e847fe3d0b279facf3fc.tar.bz2 hands-on-scala-js-88595a41e3ec13c1a516e847fe3d0b279facf3fc.zip |
killed
Diffstat (limited to 'examples/scala-js/test-suite/src/test/scala/scala/scalajs/testsuite/compiler/CharTest.scala')
-rw-r--r-- | examples/scala-js/test-suite/src/test/scala/scala/scalajs/testsuite/compiler/CharTest.scala | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/examples/scala-js/test-suite/src/test/scala/scala/scalajs/testsuite/compiler/CharTest.scala b/examples/scala-js/test-suite/src/test/scala/scala/scalajs/testsuite/compiler/CharTest.scala deleted file mode 100644 index edc2660..0000000 --- a/examples/scala-js/test-suite/src/test/scala/scala/scalajs/testsuite/compiler/CharTest.scala +++ /dev/null @@ -1,40 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ __ ____ Scala.js Test Suite ** -** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ ** -** /____/\___/_/ |_/____/_/ | |__/ /____/ ** -** |/____/ ** -\* */ -package scala.scalajs.testsuite.compiler - -import org.scalajs.jasminetest.JasmineTest -import scala.scalajs.js.Any.fromInt - -object CharTest extends JasmineTest { - - describe("Char primitives") { - - it("should always be positive (when coerced)") { - expect(-3.toByte.toChar.toInt).toEqual(65533) - expect(-100.toShort.toChar.toInt).toEqual(65436) - expect(-66000.toChar.toInt).toEqual(65072) - expect(-4567L.toChar.toInt).toEqual(60969) - expect(-5.3f.toChar.toInt).toEqual(65531) - expect(-7.9.toChar.toInt).toEqual(65529) - } - - it("should overflow (when coerced)") { - expect(347876543.toChar.toInt).toEqual(11455) - expect(34234567876543L.toChar.toInt).toEqual(57279) - } - - it("should overflow with *") { - def test(a: Char, b: Char, expected: Int): Unit = - expect(a * b).toEqual(expected) - - // note: expected values are constant-folded by the compiler on the JVM - test(Char.MaxValue, Char.MaxValue, Char.MaxValue * Char.MaxValue) - } - - } -} |