npm i lix
npx lix download
npx haxe build.hxmljava -jar converter.jar tests/config.jsonnpx haxe test-compat.hxmlcompat/ is the runtime compatibility layer used by converted projects.
compat-test/ is its test suite. When you change anything in compat/, update tests in compat-test/ and run npx haxe test-compat.hxml.
- Put AS3 input in
tests/src/. - Generated Haxe goes to
tests/out/. - Every test source file should explain case and expected behavior in comments.
- Filter tests naming convention:
TestFilter{FilterName}.as- Example:
RewriteAs.hx->TestFilterRewriteAs.as
- Other tests can use
Test{Feature}.as.
Current state:
- Most converter tests are still manual/inspection-based (
tests/src-> run converter -> inspecttests/out).
Future direction:
- Move toward automated checks (expected output diff, compile smoke tests, and execution tests where relevant) so regressions are caught in CI.
- Non-blocking
reportErrorpaths should be intentionally covered by tests. - Do not trigger
throwErrorin normal conversion/regression suites because it aborts the converter. - Add dedicated negative tests for
throwErrorpaths only when you are explicitly working on that specific failure mode. - If a
reportErrorpath effectively throws in practice, treat it as a throw case.
- Reproduce with smallest possible AS3 sample under
tests/src/. - Run converter and inspect
tests/out/. - Implement filter/typer/gen fix.
- Re-run converter.
- Run
npx haxe test-compat.hxmlif compat/runtime was touched.