diff options
author | Haoyi Li <haoyi@haoyi-mbp.corp.dropbox.com> | 2014-11-26 00:45:31 -0800 |
---|---|---|
committer | Haoyi Li <haoyi@haoyi-mbp.corp.dropbox.com> | 2014-11-26 00:45:31 -0800 |
commit | 24f31e120f9537faede7a174bb09ee35f64e1ce4 (patch) | |
tree | 06ffc3ecc7847789008352b7e2b7c040dad48907 /examples/scala-js/no-ir-check-test/src | |
parent | b89ce9cbf79363f8cab09186a5d7ba94bc0af02a (diff) | |
parent | 2c4b142503bd2d871e6818b5cab8c38627d9e4a0 (diff) | |
download | hands-on-scala-js-24f31e120f9537faede7a174bb09ee35f64e1ce4.tar.gz hands-on-scala-js-24f31e120f9537faede7a174bb09ee35f64e1ce4.tar.bz2 hands-on-scala-js-24f31e120f9537faede7a174bb09ee35f64e1ce4.zip |
Merge commit '2c4b142503bd2d871e6818b5cab8c38627d9e4a0' as 'examples/scala-js'
Diffstat (limited to 'examples/scala-js/no-ir-check-test/src')
-rw-r--r-- | examples/scala-js/no-ir-check-test/src/test/scala/scala/scalajs/testsuite/noircheck/DummyParentsTest.scala | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/scala-js/no-ir-check-test/src/test/scala/scala/scalajs/testsuite/noircheck/DummyParentsTest.scala b/examples/scala-js/no-ir-check-test/src/test/scala/scala/scalajs/testsuite/noircheck/DummyParentsTest.scala new file mode 100644 index 0000000..30c4172 --- /dev/null +++ b/examples/scala-js/no-ir-check-test/src/test/scala/scala/scalajs/testsuite/noircheck/DummyParentsTest.scala @@ -0,0 +1,34 @@ +/* __ *\ +** ________ ___ / / ___ __ ____ Scala.js Test Suite ** +** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ ** +** /____/\___/_/ |_/____/_/ | |__/ /____/ ** +** |/____/ ** +\* */ +package scala.scalajs.testsuite.noircheck + +import org.scalajs.jasminetest.JasmineTest + +object DummyParentsTest extends JasmineTest { + + describe("Linking Stages") { + + it("should provide dummy parents if required") { + + import scala.concurrent.forkjoin._ + + // scala.concurrent.forkjoin.ForkJoinWorkerThread is not defined + class DummyFJWorkerThread extends ForkJoinWorkerThread(null) { + override def onStart(): Unit = { /* something */ } + } + + val x = "1".toInt + + if (x + x < 0) { + // Ensure DummyFuture is not DCEd, but never instantiated + new DummyFJWorkerThread() + } + } + + } +} |