Execute tests/run/ tests with Scala.js. #15543
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We add support for skipping tests based on "toolArgs" flags, written in the test sources as
// scalajs: --skip
The
ScalaJSCompilationTests
takes thescalajs
toolArgs into account, while the JVMCompilationTests
do not. This effectively means that tests marked as above are run only on the JVM.Good reasons for being skipped on Scala.js include:
.java
source files.NullPointerException
s being thrown.getClass()
ofclassOf
, which is not the same forBoxedUnit
in Scala.js (these cases are extensively tested in Scala.js' own test suite, so they are well covered).Some tests are skipped for less good reasons, for example:
Course-*
tests are long, ancient tests that don't test anything in particular, but rely a lot on the precise printed form of Doubles.Some tests rely on what Scala.js calls "compliant semantics". They receive the flag
--compliant-semantics
to instruct the Scala.js linker to enable them.Many tests, due to the
println
-based nature of Vulpix, rely on the precise printed form ofDouble
s andUnit
s. When reasonably practical, these have been amended to pass one way or another on Scala.js:Double
s, or.0
from the string representation of doubles, or()
to"()"
, orDouble
s instead ofFloat
s, orTests that are supposed to pass, but do not because of what seems to be a bug, are marked
// scalajs: --skip --pending
so that we can grep for them later and try to fix them.