test(agama): add transpiler control-flow codegen conformance tests#14427
test(agama): add transpiler control-flow codegen conformance tests#14427imran-ishaq wants to merge 1 commit into
Conversation
Signed-off-by: imran <imranishaq7071@gmail.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|



Prepare
Description
Adds
ControlFlowTestto the Agama transpiler module. It transpiles a flow usingWhen/Otherwise,Match,Repeat(with
Quit When) andIterate, and asserts the generated JavaScript contains the expected control structures (if/else,equality match branches, counted loop, iteration loop, loop
break). Registered in the module's TestNG suite. Noproduction change — confirms current code generation conforms to the language reference.
Target issue
The Agama transpiler's control-flow constructs (When/Otherwise, Match, Repeat/Quit When, Iterate) are exercised by
syntax-only pass tests, but nothing asserts that they generate the expected JavaScript control structures, so a
code-generation regression could go unnoticed.
closes #14426
Implementation Details
agama/transpiler/src/test/java/io/jans/agama/test/ControlFlowTest.javausingTranspiler.transpileand assertingon the generated code.
agama/transpiler/src/test/resources/testng.xml.Test and Document the changes
Please check the below before submitting your PR. The PR will not be merged if there are no commits that start with
docs:to indicate documentation changes or if the below checklist is not selected.