nvim-neotest / neotest

An extensible framework for interacting with tests within NeoVim.
MIT License
2.12k stars 105 forks source link

New Adapter: neotest-ctest - A neotest adapter for C/C++ using CTest as a test runner #419

Open orjangj opened 3 weeks ago

orjangj commented 3 weeks ago

Hello,

I've been meaning to create this ticket for quite some time now, but I never got around to "completing" my adapter. Now, however, I'm quite happy with the result, which is why I'm reaching out with a request to add it to your list of adapters.

You'll find it here: https://github.com/orjangj/neotest-ctest

It's primarily targeting C/C++ test frameworks using CTest as a test runner. It currently has basic support for GoogleTest and Catch2. I've put some effort into the implementation to ensure that extending it with new test frameworks will be fairly easy. I'm planning on adding support for more frameworks such as doctest and CppUTest. Maybe more if there are feature requests.

It also parses test results and displays errors as diagnostics.

It does not handle compilation of source/tests (and it probably never will), but I've found that using https://github.com/Civitasv/cmake-tools.nvim as a companion plugin works like a charm.

It does not support the debug/dap strategy yet, but I have plans to support that as well.

Hope to hear from you soon.

orjangj commented 3 weeks ago

I will create a PR to include it in the README if you accept my request :)