@@ -496,15 +496,11 @@ class ExpectationsSpec extends FunSpec with Expectations {
496
496
497
497
it(" should return No with correct fact message when parse failed" ) {
498
498
val fact = expectCompiles(" println(\" test)" )
499
- // SKIP-SCALATESTJS-START
500
- if (scala.util.Properties .versionString.contains(" 2.10" ))
499
+ if (ScalaTestVersions .BuiltForScalaVersion == " 2.10" )
501
500
assert(fact.factMessage == Resources .expectedNoErrorButGotParseError(" reflective compilation has failed: \n\n unclosed string literal\n ')' expected but eof found." , " println(\" test)" ))
502
501
else
503
502
assert(fact.factMessage == Resources .expectedNoErrorButGotParseError(" unclosed string literal" , " println(\" test)" ))
504
- // SKIP-SCALATESTJS-END
505
503
506
- // SCALATESTJS-ONLY assert(fact.factMessage.indexOf("unclosed string literal") >= 0)
507
- // SCALATESTJS-ONLY assert(fact.factMessage.indexOf("println(\"test)") >= 0)
508
504
assert(! fact.isVacuousYes)
509
505
}
510
506
}
@@ -556,7 +552,7 @@ class ExpectationsSpec extends FunSpec with Expectations {
556
552
)
557
553
assert(fact.isInstanceOf [Fact .Leaf ])
558
554
assert(fact.isNo)
559
- if (scala.util. Properties .versionString.contains( " 2.10" ) )
555
+ if (ScalaTestVersions . BuiltForScalaVersion == " 2.10" )
560
556
assert(fact.factMessage == Resources .expectedNoErrorButGotParseError(" reflective compilation has failed: \n\n unclosed string literal\n ')' expected but '}' found." , " \n println(\" test)\n " ))
561
557
else
562
558
assert(fact.factMessage == Resources .expectedNoErrorButGotParseError(
@@ -594,7 +590,7 @@ class ExpectationsSpec extends FunSpec with Expectations {
594
590
val fact = expectTypeError(" println(\" test)" )
595
591
assert(fact.isInstanceOf [Fact .Leaf ])
596
592
assert(fact.isNo)
597
- if (scala.util. Properties .versionString.contains( " 2.10" ) )
593
+ if (ScalaTestVersions . BuiltForScalaVersion == " 2.10" )
598
594
assert(fact.factMessage == Resources .expectedTypeErrorButGotParseError(" reflective compilation has failed: \n\n unclosed string literal\n ')' expected but eof found." , " println(\" test)" ))
599
595
else
600
596
assert(fact.factMessage == Resources .expectedTypeErrorButGotParseError(" unclosed string literal" , " println(\" test)" ))
@@ -648,7 +644,7 @@ class ExpectationsSpec extends FunSpec with Expectations {
648
644
649
645
assert(fact.isInstanceOf [Fact .Leaf ])
650
646
assert(fact.isNo)
651
- if (scala.util. Properties .versionString.contains( " 2.10" ) )
647
+ if (ScalaTestVersions . BuiltForScalaVersion == " 2.10" )
652
648
assert(fact.factMessage == Resources .expectedTypeErrorButGotParseError(" reflective compilation has failed: \n\n unclosed string literal\n ')' expected but '}' found." , " \n println(\" test)\n " ))
653
649
else
654
650
assert(fact.factMessage == Resources .expectedTypeErrorButGotParseError(
0 commit comments