Skip to content

Commit

Permalink
Remove expect tests for ecmaref compilation output (Closes #241)
Browse files Browse the repository at this point in the history
The compiled interpreter generate a massive cesl program. Because of
this, when we change anything in the ecmaref interpreters the expect
tests of the ecmaref compilation command generate massive diffs.

To address this, we simply run `ecma-sl compile` and disregard the
compilation artifact into `dev/null`. This way, we rely on the parser
and typechecker to verify the validity of the esl program. If any of
these fail, the error messages (reported on stderr) will appear in the
expect test. Reducing diffs of PR that modify the ecmaref interpreters
while ensuring that the CI catches any errors.
  • Loading branch information
filipeom committed Feb 1, 2025
1 parent b2c08f2 commit 15b8d9d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 186,901 deletions.
5 changes: 5 additions & 0 deletions JS-Interpreters/ecmaref5/empty.esl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import "./esl_interpreter.esl";

function main() {
return 0;
}
7 changes: 7 additions & 0 deletions JS-Interpreters/ecmaref6/empty.esl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "./esl_interpreter.esl";
import "./bindings/ffi_symbolic.esl";
import "./bindings/node-bindings.esl";

function main() {
return 0;
}
8 changes: 8 additions & 0 deletions test/ecmaref/test_compile.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Change dir into `JS-Interpreters`
$ cd ../../JS-Interpreters

Tests compilation of ecmaref5:
$ ecma-sl compile ecmaref5/empty.esl > /dev/null

Tests compilation of ecmaref6:
$ ecma-sl compile ecmaref6/empty.esl > /dev/null
Loading

0 comments on commit 15b8d9d

Please sign in to comment.