summaryrefslogtreecommitdiff
path: root/scalajslib/test
diff options
context:
space:
mode:
Diffstat (limited to 'scalajslib/test')
-rw-r--r--scalajslib/test/resources/hello-js-world/test/src/utest/ArgsParserTests.scala4
-rw-r--r--scalajslib/test/resources/hello-js-world/test/src/utest/MainTests.scala6
-rw-r--r--scalajslib/test/resources/multi-module/client/test/src/MainTests.scala10
-rw-r--r--scalajslib/test/src/HelloJSWorldTests.scala64
-rw-r--r--scalajslib/test/src/MultiModuleTests.scala8
-rw-r--r--scalajslib/test/src/NodeJSConfigTests.scala12
6 files changed, 52 insertions, 52 deletions
diff --git a/scalajslib/test/resources/hello-js-world/test/src/utest/ArgsParserTests.scala b/scalajslib/test/resources/hello-js-world/test/src/utest/ArgsParserTests.scala
index d0baa965..c8d77e2c 100644
--- a/scalajslib/test/resources/hello-js-world/test/src/utest/ArgsParserTests.scala
+++ b/scalajslib/test/resources/hello-js-world/test/src/utest/ArgsParserTests.scala
@@ -3,14 +3,14 @@ import utest._
object ArgsParserTests extends TestSuite {
def tests: Tests = Tests {
- 'one - {
+ test("one"){
val result = ArgsParser.parse("hello:world")
assert(
result.length == 2,
result == Seq("hello", "world")
)
}
- 'two - { // we fail this test to check testing in scala.js
+ test("two"){ // we fail this test to check testing in scala.js
val result = ArgsParser.parse("hello:world")
assert(
result.length == 80
diff --git a/scalajslib/test/resources/hello-js-world/test/src/utest/MainTests.scala b/scalajslib/test/resources/hello-js-world/test/src/utest/MainTests.scala
index 937d96f8..defe8e17 100644
--- a/scalajslib/test/resources/hello-js-world/test/src/utest/MainTests.scala
+++ b/scalajslib/test/resources/hello-js-world/test/src/utest/MainTests.scala
@@ -3,13 +3,13 @@ import utest._
object MainTests extends TestSuite {
def tests: Tests = Tests {
- 'vmName - {
- 'containJs - {
+ test("vmName"){
+ test("containJs"){
assert(
Main.vmName.contains("js")
)
}
- 'containScala - {
+ test("containScala"){
assert(
Main.vmName.contains("Scala")
)
diff --git a/scalajslib/test/resources/multi-module/client/test/src/MainTests.scala b/scalajslib/test/resources/multi-module/client/test/src/MainTests.scala
index 66670233..17bfc2f4 100644
--- a/scalajslib/test/resources/multi-module/client/test/src/MainTests.scala
+++ b/scalajslib/test/resources/multi-module/client/test/src/MainTests.scala
@@ -3,20 +3,20 @@ import shared.Utils
object MainTests extends TestSuite {
def tests: Tests = Tests {
- 'Lib - {
- 'addTwice - {
+ test("Lib"){
+ test("addTwice"){
assert(
Lib.addTwice(1, 2) == 6
)
}
- 'parse - {
+ test("parse"){
assert(
Lib.parse("hello:world") == Seq("hello", "world")
)
}
}
- 'shared - {
- 'add - {
+ test("shared"){
+ test("add"){
assert(
Utils.add(1, 2) == 3
)
diff --git a/scalajslib/test/src/HelloJSWorldTests.scala b/scalajslib/test/src/HelloJSWorldTests.scala
index 1b3e9bb3..a8148f84 100644
--- a/scalajslib/test/src/HelloJSWorldTests.scala
+++ b/scalajslib/test/src/HelloJSWorldTests.scala
@@ -78,7 +78,7 @@ object HelloJSWorldTests extends TestSuite {
def tests: Tests = Tests {
prepareWorkspace()
- 'compile - {
+ test("compile"){
def testCompileFromScratch(scalaVersion: String,
scalaJSVersion: String): Unit = {
val Right((result, evalCount)) =
@@ -98,10 +98,10 @@ object HelloJSWorldTests extends TestSuite {
assert(unchangedEvalCount == 0)
}
- 'fromScratch_2124_0622 - testCompileFromScratch("2.12.4", "0.6.22")
- 'fromScratch_2123_0622 - testCompileFromScratch("2.12.3", "0.6.22")
- 'fromScratch_2118_0622 - TestUtil.disableInJava9OrAbove(testCompileFromScratch("2.11.8", "0.6.22"))
- 'fromScratch_2124_100M2 - testCompileFromScratch("2.12.4", "1.0.0-M2")
+ test("fromScratch_2124_0622") - testCompileFromScratch("2.12.4", "0.6.22")
+ test("fromScratch_2123_0622") - testCompileFromScratch("2.12.3", "0.6.22")
+ test("fromScratch_2118_0622") - TestUtil.disableInJava9OrAbove(testCompileFromScratch("2.11.8", "0.6.22"))
+ test("fromScratch_2124_100M2") - testCompileFromScratch("2.12.4", "1.0.0-M2")
}
def testRun(scalaVersion: String,
@@ -116,37 +116,37 @@ object HelloJSWorldTests extends TestSuite {
assert(output == "Hello Scala.js")
}
- 'fullOpt - {
- 'run_2124_0622 - TestUtil.disableInJava9OrAbove(testRun("2.12.4", "0.6.22", FullOpt))
- 'run_2123_0622 - TestUtil.disableInJava9OrAbove(testRun("2.12.3", "0.6.22", FullOpt))
- 'run_2118_0622 - TestUtil.disableInJava9OrAbove(testRun("2.11.8", "0.6.22", FullOpt))
- 'run_2124_100M2 - TestUtil.disableInJava9OrAbove(testRun("2.12.4", "1.0.0-M2", FullOpt))
+ test("fullOpt"){
+ test("run_2124_0622") - TestUtil.disableInJava9OrAbove(testRun("2.12.4", "0.6.22", FullOpt))
+ test("run_2123_0622") - TestUtil.disableInJava9OrAbove(testRun("2.12.3", "0.6.22", FullOpt))
+ test("run_2118_0622") - TestUtil.disableInJava9OrAbove(testRun("2.11.8", "0.6.22", FullOpt))
+ test("run_2124_100M2") - TestUtil.disableInJava9OrAbove(testRun("2.12.4", "1.0.0-M2", FullOpt))
}
- 'fastOpt - {
- 'run_2124_0622 - TestUtil.disableInJava9OrAbove(testRun("2.12.4", "0.6.22", FastOpt))
- 'run_2123_0622 - TestUtil.disableInJava9OrAbove(testRun("2.12.3", "0.6.22", FastOpt))
- 'run_2118_0622 - TestUtil.disableInJava9OrAbove(testRun("2.11.8", "0.6.22", FastOpt))
- 'run_2124_100M2 - TestUtil.disableInJava9OrAbove(testRun("2.12.4", "1.0.0-M2", FastOpt))
+ test("fastOpt"){
+ test("run_2124_0622") - TestUtil.disableInJava9OrAbove(testRun("2.12.4", "0.6.22", FastOpt))
+ test("run_2123_0622") - TestUtil.disableInJava9OrAbove(testRun("2.12.3", "0.6.22", FastOpt))
+ test("run_2118_0622") - TestUtil.disableInJava9OrAbove(testRun("2.11.8", "0.6.22", FastOpt))
+ test("run_2124_100M2") - TestUtil.disableInJava9OrAbove(testRun("2.12.4", "1.0.0-M2", FastOpt))
}
- 'jar - {
- 'containsSJSIRs - {
+ test("jar"){
+ test("containsSJSIRs"){
val Right((result, evalCount)) = helloWorldEvaluator(HelloJSWorld.helloJsWorld("2.12.4", "0.6.22").jar)
val jar = result.path
val entries = new JarFile(jar.toIO).entries().asScala.map(_.getName)
assert(entries.contains("Main$.sjsir"))
}
}
- 'publish - {
+ test("publish"){
def testArtifactId(scalaVersion: String,
scalaJSVersion: String,
artifactId: String): Unit = {
val Right((result, evalCount)) = helloWorldEvaluator(HelloJSWorld.helloJsWorld(scalaVersion, scalaJSVersion).artifactMetadata)
assert(result.id == artifactId)
}
- 'artifactId_0622 - testArtifactId("2.12.4", "0.6.22", "hello-js-world_sjs0.6_2.12")
- 'artifactId_100M2 - testArtifactId("2.12.4", "1.0.0-M2", "hello-js-world_sjs1.0.0-M2_2.12")
+ test("artifactId_0622") - testArtifactId("2.12.4", "0.6.22", "hello-js-world_sjs0.6_2.12")
+ test("artifactId_100M2") - testArtifactId("2.12.4", "1.0.0-M2", "hello-js-world_sjs1.0.0-M2_2.12")
}
- 'test - {
+ test("test"){
def runTests(testTask: define.Command[(String, Seq[TestRunner.Result])]): Map[String, Map[String, TestRunner.Result]] = {
val Left(Result.Failure(_, Some(res))) = helloWorldEvaluator(testTask)
@@ -190,16 +190,16 @@ object HelloJSWorldTests extends TestSuite {
)
}
- 'utest_2118_0622 - TestUtil.disableInJava9OrAbove(checkUtest("2.11.8", "0.6.22"))
- 'utest_2124_0622 - checkUtest("2.12.4", "0.6.22")
- 'utest_2118_100M2 - TestUtil.disableInJava9OrAbove(checkUtest("2.11.8", "1.0.0-M2"))
- 'utest_2124_100M2 - checkUtest("2.12.4", "1.0.0-M2")
+ test("utest_2118_0622") - TestUtil.disableInJava9OrAbove(checkUtest("2.11.8", "0.6.22"))
+ test("utest_2124_0622") - checkUtest("2.12.4", "0.6.22")
+ test("utest_2118_100M2") - TestUtil.disableInJava9OrAbove(checkUtest("2.11.8", "1.0.0-M2"))
+ test("utest_2124_100M2") - checkUtest("2.12.4", "1.0.0-M2")
- 'scalaTest_2118_0622 - TestUtil.disableInJava9OrAbove(checkScalaTest("2.11.8", "0.6.22"))
- 'scalaTest_2124_0622 - checkScalaTest("2.12.4", "0.6.22")
+ test("scalaTest_2118_0622") - TestUtil.disableInJava9OrAbove(checkScalaTest("2.11.8", "0.6.22"))
+ test("scalaTest_2124_0622") - checkScalaTest("2.12.4", "0.6.22")
// No scalatest artifact for scala.js 1.0.0-M2 published yet
-// 'scalaTest_2118_100M2 - checkScalaTest("2.11.8", "1.0.0-M2")
-// 'scalaTest_2124_100M2 - checkScalaTest("2.12.4", "1.0.0-M2")
+// test("scalaTest_2118_100M2") - checkScalaTest("2.11.8", "1.0.0-M2")
+// test("scalaTest_2124_100M2") - checkScalaTest("2.12.4", "1.0.0-M2")
}
def checkRun(scalaVersion: String, scalaJSVersion: String): Unit = {
@@ -219,11 +219,11 @@ object HelloJSWorldTests extends TestSuite {
)
}
- 'run - {
+ test("run"){
'run_2118_0622 - TestUtil.disableInJava9OrAbove(checkRun("2.11.8", "0.6.22"))
'run_2124_0622 - checkRun("2.12.4", "0.6.22")
- 'run_2118_100M2 - TestUtil.disableInJava9OrAbove(checkRun("2.11.8", "1.0.0-M2"))
- 'run_2124_100M2 - checkRun("2.12.4", "1.0.0-M2")
+ test("run_2118_100M2") - TestUtil.disableInJava9OrAbove(checkRun("2.11.8", "1.0.0-M2"))
+ test("run_2124_100M2") - checkRun("2.12.4", "1.0.0-M2")
}
}
diff --git a/scalajslib/test/src/MultiModuleTests.scala b/scalajslib/test/src/MultiModuleTests.scala
index 2ffea2cf..5656d6b4 100644
--- a/scalajslib/test/src/MultiModuleTests.scala
+++ b/scalajslib/test/src/MultiModuleTests.scala
@@ -53,10 +53,10 @@ object MultiModuleTests extends TestSuite {
)
}
- 'fastOpt - TestUtil.disableInJava9OrAbove(checkOpt(FastOpt))
- 'fullOpt - TestUtil.disableInJava9OrAbove(checkOpt(FullOpt))
+ test("fastOpt") - TestUtil.disableInJava9OrAbove(checkOpt(FastOpt))
+ test("fullOpt") - TestUtil.disableInJava9OrAbove(checkOpt(FullOpt))
- 'test - {
+ test("test"){
val Right(((_, testResults), evalCount)) = evaluator(MultiModule.client.test.test())
assert(
@@ -66,7 +66,7 @@ object MultiModuleTests extends TestSuite {
)
}
- 'run - {
+ test("run"){
val command = MultiModule.client.run()
val Right((_, evalCount)) = evaluator(command)
diff --git a/scalajslib/test/src/NodeJSConfigTests.scala b/scalajslib/test/src/NodeJSConfigTests.scala
index 25b5face..42db7ded 100644
--- a/scalajslib/test/src/NodeJSConfigTests.scala
+++ b/scalajslib/test/src/NodeJSConfigTests.scala
@@ -74,23 +74,23 @@ object NodeJSConfigTests extends TestSuite {
)
}
- 'test - {
+ test("test"){
def checkUtest(nodeArgs: List[String], notNodeArgs: List[String]) = {
checkLog(HelloJSWorld.buildUTest(scalaVersion, nodeArgs).test.test(), nodeArgs, notNodeArgs)
}
- 'test - checkUtest(nodeArgsEmpty, nodeArgs2G)
- 'test2G - checkUtest(nodeArgs2G, nodeArgs4G)
+ test("test") - checkUtest(nodeArgsEmpty, nodeArgs2G)
+ test("test2G") - checkUtest(nodeArgs2G, nodeArgs4G)
}
def checkRun(nodeArgs: List[String], notNodeArgs: List[String]): Unit = {
checkLog(HelloJSWorld.helloJsWorld(scalaVersion, nodeArgs).run(), nodeArgs, notNodeArgs)
}
- 'run - {
- 'run - checkRun(nodeArgsEmpty, nodeArgs2G)
- 'run2G - checkRun(nodeArgs2G, nodeArgs4G)
+ test("run"){
+ test("run") - checkRun(nodeArgsEmpty, nodeArgs2G)
+ test("run2G") - checkRun(nodeArgs2G, nodeArgs4G)
}
}