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/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/TestSuiteContext.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/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/TestSuiteContext.scala')
-rw-r--r-- | examples/scala-js/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/TestSuiteContext.scala | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/examples/scala-js/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/TestSuiteContext.scala b/examples/scala-js/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/TestSuiteContext.scala deleted file mode 100644 index 827eefd..0000000 --- a/examples/scala-js/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/TestSuiteContext.scala +++ /dev/null @@ -1,55 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ __ ____ Scala.js Test Framework ** -** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ ** -** /____/\___/_/ |_/____/_/ | |__/ /____/ ** -** |/____/ ** -\* */ - - -package org.scalajs.jasminetest - -trait TestSuiteContext { - def describe(title: String)(test: => Unit): Unit - def it(title: String)(test: => Unit): Unit - def xdescribe(title: String)(test: => Unit): Unit - def xit(title: String)(test: => Unit): Unit - - def when(tag: String): TestSuiteContext = - if (JasmineTestFramework.hasTag(tag)) this - else new TestSuiteContext.IgnoredContext(this) - - def whenAll(tags: String*): TestSuiteContext = - if (tags.forall(JasmineTestFramework.hasTag)) this - else new TestSuiteContext.IgnoredContext(this) - - def whenAny(tags: String*): TestSuiteContext = - if (tags.exists(JasmineTestFramework.hasTag)) this - else new TestSuiteContext.IgnoredContext(this) - - def unless(tag: String): TestSuiteContext = - if (!JasmineTestFramework.hasTag(tag)) this - else new TestSuiteContext.IgnoredContext(this) - - def unlessAll(tags: String*): TestSuiteContext = - if (!tags.forall(JasmineTestFramework.hasTag)) this - else new TestSuiteContext.IgnoredContext(this) - - def unlessAny(tags: String*): TestSuiteContext = - if (!tags.exists(JasmineTestFramework.hasTag)) this - else new TestSuiteContext.IgnoredContext(this) -} - -object TestSuiteContext { - private class IgnoredContext( - baseContext: TestSuiteContext) extends TestSuiteContext { - def describe(title: String)(test: => Unit): Unit = - baseContext.xdescribe(title)(test) - def it(title: String)(test: => Unit): Unit = - baseContext.xit(title)(test) - def xdescribe(title: String)(test: => Unit): Unit = - baseContext.xdescribe(title)(test) - def xit(title: String)(test: => Unit): Unit = - baseContext.xit(title)(test) - } -} |