Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up C++ Testmate in VS Code

Ok, n00b question. I have a cpp file. I can build and run it in the terminal. I can build and run it using clang++ in VSCode.

Then I add gtest to it. I can compile in the terminal with g++ -std=c++0x $FILENAME -lgtest -lgtest_main -pthread and then run, and the tests work.

I install the C++ TestMate extension in VSCode. Everything I see on the internet implies it should just work. But my test explorer is empty and I don't see any test indicators in the code window.

enter image description here

I've obviously missed something extremely basic. Please help!

like image 933
Jonathan Tuzman Avatar asked Oct 15 '25 13:10

Jonathan Tuzman


1 Answers

Executables should be placed inside the out or build folder of your workspace. Or one can modify the testMate.cpp.test.executables config.

like image 102
Mate059 Avatar answered Oct 17 '25 04:10

Mate059



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!