Skip to content
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

Split unittest into multiple files #485

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

luca-schlecker
Copy link
Collaborator

No description provided.

Copy link
Member

@The-EDev The-EDev left a comment

Choose a reason for hiding this comment

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

I'm a little confused as to how the source files are able to use CHECK without actually including the Catch2 header..

Another thing that interested me is that everything is still considered one test, what do you think about splitting them into different targets? (just a thought, I'm not leaning either way)

tests/unittest/include/unittest.h Show resolved Hide resolved
@luca-schlecker
Copy link
Collaborator Author

I'm a little confused as to how the source files are able to use CHECK without actually including the Catch2 header..

Another thing that interested me is that everything is still considered one test, what do you think about splitting them into different targets? (just a thought, I'm not leaning either way)

CMake force includes a precompiled header by default. I disabled it for catch.cpp to get a main function defined without linking errors.

Catch has the ability to look for tests on its own (catch_discover_tests), I'd rather use that function. I focused on splitting them apart, but maybe I should give them a more complete rework. Found out that unittests won't properly run on Windows (although they compile fine). They'll just get stuck eventually.

@The-EDev The-EDev linked an issue Jun 30, 2022 that may be closed by this pull request
@gittiver gittiver added the feature Code based project improvement label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Code based project improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate Unit tests into different source files
3 participants