Flutter Engine
The Flutter Engine
|
This folder contains two types of tests for validating sourcemaps: the debugging behavior and the stacktrace behavior.
Running the tests requires building the sdk target: ddc_stable_test
.
Except for that, running them should simply be a matter of executing the *_suite.dart
files.
All tests are plain Dart files and goes in "testfiles" (debugging tests) or "stacktrace_testfiles" (stacktrace tests). They are automatically picked up by the testing framework.
See README.md
in pkg/sourcemap_testing
.
One can filter which tests are run by running (from the sourcemap folder):
One can additionally get debug output for failing tests (i.e. tests with different outcome than expected), e.g.:
The latter is also useful in combination with /*fail*/
when adding new tests to see all the places where the debugger stopped (both in JS positions and translated to dart positions).
For instance -Ddebug=true -- sourcemaps/next_through_catch_test
with a /*fail*/
currently gives output like the following: