Skip to content

✨ feat(mq-test): add standalone test runner binary#1574

Merged
harehare merged 7 commits intomainfrom
feat/mq-test-runner
Apr 11, 2026
Merged

✨ feat(mq-test): add standalone test runner binary#1574
harehare merged 7 commits intomainfrom
feat/mq-test-runner

Conversation

@harehare
Copy link
Copy Markdown
Owner

@harehare harehare commented Apr 11, 2026

Add mq-test as a new standalone crate with its own binary. Test functions are auto-discovered from .mq files via the CST (mq_lang::parse_recovery) — no manual run_tests([...]) list needed.

Discovery rules:

  • def test_* functions are included automatically
  • def preceded by # @test annotation is included regardless of name

Function name is extracted from children[0] of the Def CST node, consistent with how mq-formatter resolves identifiers. Comment annotations are read from node.leading_trivia.

Usage:

  mq-test file.mq          # run tests in specific file
  mq-test                  # glob **/*.mq in current directory

harehare and others added 4 commits April 11, 2026 11:09
Add `mq-test` as a new standalone crate with its own binary.
Test functions are auto-discovered from `.mq` files via the CST
(`mq_lang::parse_recovery`) — no manual `run_tests([...])` list needed.

Discovery rules:
- `def test_*` functions are included automatically
- `def` preceded by `# @test` annotation is included regardless of name

Function name is extracted from `children[0]` of the Def CST node,
consistent with how mq-formatter resolves identifiers. Comment
annotations are read from `node.leading_trivia`.

Usage:
  mq-test file.mq          # run tests in specific file
  mq-test                  # glob **/*.mq in current directory
Co-authored-by: harehare <533078+harehare@users.noreply.github.com>
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 11, 2026

Merging this PR will not alter performance

✅ 29 untouched benchmarks


Comparing feat/mq-test-runner (3a949b2) with main (774aed4)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (b12d647) during the generation of this report, so 774aed4 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@harehare harehare merged commit 2359c4b into main Apr 11, 2026
6 checks passed
@harehare harehare deleted the feat/mq-test-runner branch April 11, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant