8000 Add Lute.Test target for C++ unit tests by vrn-sn · Pull Request #281 · luau-lang/lute · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Lute.Test target for C++ unit tests #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 17, 2025
Merged

Add Lute.Test target for C++ unit tests #281

merged 4 commits into 8000 from
May 17, 2025

Conversation

vrn-sn
Copy link
Member
@vrn-sn vrn-sn commented May 16, 2025

This PR adds the doctest.h header to our tests folder, along with a file containing a simple test. The Lute.Test target is now an option when running luthier.

Tests can be run like this:

  1. python3 tools/luthier.py configure Lute.Test
  2. python3 tools/luthier.py build Lute.Test
  3. python3 tools/luthier.py run Lute.Test

Resolves #197.

@vrn-sn vrn-sn requested a review from aatxe May 16, 2025 22:47
@ffrostfall
Copy link
Contributor

purely inquisitive; why put doctest in tests over extern?

@vrn-sn
Copy link
Member Author
vrn-sn commented May 17, 2025

purely inquisitive; why put doctest in tests over extern?

Ultimately up to @aatxe. My reasoning was that it's a single header file (~300KB) that's only used to enable testing, so I didn't think we needed to bundle it with the other extern libraries.

Copy link
Collaborator
@aatxe aatxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the luthier targets for this? target name is Lute.Test (honestly, may as well add Lute.CLI as another name for the current target too). It should just be adding a new entry to the tables at the top.

@vrn-sn
Copy link
Member Author
vrn-sn commented May 17, 2025

@aatxe I added Lute.CLI (same as lute) and Lute.Test. Tests now run by passing run Lute.Test to luthier.

> python3 tools/luthier.py run Lute.Test

@vrn-sn vrn-sn changed the title Add doctest.h with simple test example Add Lute.Test target for C++ unit tests May 17, 2025
@aatxe aatxe merged commit aee8ec3 into primary May 17, 2025
6 checks passed
@aatxe aatxe deleted the add-doctest branch May 17, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add doctest for unit testing C++.
3 participants
0