Skip to content

Commit 82cd3a0

Browse files
committed
Merge branch 'cheeseng-ExpectationsSpec-scala-js-fix' into 3.0.x
2 parents 13f72d8 + 3fa3e72 commit 82cd3a0

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

project/GenScalaTestJS.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ object GenScalaTestJS {
252252
"StreamlinedXmlEqualitySpec.scala", // skipped because use scala.xml
253253
"StreamlinedXmlNormMethodsSpec.scala", // skipped because use scala.xml
254254
"StreamlinedXmlSpec.scala", // skipped because use scala.xml
255-
"ExpectationsSpec.scala", // skipped because currently doesn't link and I don't have time to fix TODO: Bring it back
256255
"SuiteSuite.scala" // skipped because it depends on java reflection
257256
)) ++
258257
copyDir("scalatest-test/src/test/scala/org/scalatest/concurrent", "org/scalatest/concurrent", targetDir,

scalatest-test/src/test/scala/org/scalatest/ExpectationsSpec.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -496,15 +496,11 @@ class ExpectationsSpec extends FunSpec with Expectations {
496496

497497
it("should return No with correct fact message when parse failed") {
498498
val fact = expectCompiles("println(\"test)")
499-
// SKIP-SCALATESTJS-START
500-
if (scala.util.Properties.versionString.contains("2.10"))
499+
if (ScalaTestVersions.BuiltForScalaVersion == "2.10")
501500
assert(fact.factMessage == Resources.expectedNoErrorButGotParseError("reflective compilation has failed: \n\nunclosed string literal\n')' expected but eof found.", "println(\"test)"))
502501
else
503502
assert(fact.factMessage == Resources.expectedNoErrorButGotParseError("unclosed string literal", "println(\"test)"))
504-
// SKIP-SCALATESTJS-END
505503

506-
//SCALATESTJS-ONLY assert(fact.factMessage.indexOf("unclosed string literal") >= 0)
507-
//SCALATESTJS-ONLY assert(fact.factMessage.indexOf("println(\"test)") >= 0)
508504
assert(!fact.isVacuousYes)
509505
}
510506
}
@@ -556,7 +552,7 @@ class ExpectationsSpec extends FunSpec with Expectations {
556552
)
557553
assert(fact.isInstanceOf[Fact.Leaf])
558554
assert(fact.isNo)
559-
if (scala.util.Properties.versionString.contains("2.10"))
555+
if (ScalaTestVersions.BuiltForScalaVersion == "2.10")
560556
assert(fact.factMessage == Resources.expectedNoErrorButGotParseError("reflective compilation has failed: \n\nunclosed string literal\n')' expected but '}' found.", "\nprintln(\"test)\n"))
561557
else
562558
assert(fact.factMessage == Resources.expectedNoErrorButGotParseError(
@@ -594,7 +590,7 @@ class ExpectationsSpec extends FunSpec with Expectations {
594590
val fact = expectTypeError("println(\"test)")
595591
assert(fact.isInstanceOf[Fact.Leaf])
596592
assert(fact.isNo)
597-
if (scala.util.Properties.versionString.contains("2.10"))
593+
if (ScalaTestVersions.BuiltForScalaVersion == "2.10")
598594
assert(fact.factMessage == Resources.expectedTypeErrorButGotParseError("reflective compilation has failed: \n\nunclosed string literal\n')' expected but eof found.", "println(\"test)"))
599595
else
600596
assert(fact.factMessage == Resources.expectedTypeErrorButGotParseError("unclosed string literal", "println(\"test)"))
@@ -648,7 +644,7 @@ class ExpectationsSpec extends FunSpec with Expectations {
648644

649645
assert(fact.isInstanceOf[Fact.Leaf])
650646
assert(fact.isNo)
651-
if (scala.util.Properties.versionString.contains("2.10"))
647+
if (ScalaTestVersions.BuiltForScalaVersion == "2.10")
652648
assert(fact.factMessage == Resources.expectedTypeErrorButGotParseError("reflective compilation has failed: \n\nunclosed string literal\n')' expected but '}' found.", "\nprintln(\"test)\n"))
653649
else
654650
assert(fact.factMessage == Resources.expectedTypeErrorButGotParseError(

0 commit comments

Comments
 (0)