matepek / vscode-catch2-test-adapter

Catch2, Google Test and doctest Adapter for the VSCode
https://marketplace.visualstudio.com/items?itemName=matepek.vscode-catch2-test-adapter
MIT License
209 stars 52 forks source link

[Catch2] Custom main file not being picked up #422

Closed ricardomatias closed 8 months ago

ricardomatias commented 8 months ago

Checklist

Describe the bug

I've got a working cmake configuration that allows me to use ApprovalTests.cpp with catch2. It does so by creating an executable for each file depending on a custom main.cpp file and then the test file. This doesn't seem to work with Testmate, the test case where ApprovalTests is used exits with a FatalErrorCondition which I've traced to the ApprovalTests library not being initialized (which happens on the custom main_config.cpp file). I've added the "_config" to the pattern finding configuration but to no avail. Am I doing something wrong?

Desktop

matepek commented 8 months ago

Is this ApprovalTest a dynamically linked library?

matepek commented 8 months ago

Can you run your exec from command line? try to check the logs.

ricardomatias commented 8 months ago

@matepek I ran from the command line and the error was the same, so this is not a problem with this extension. Thanks for the help.