Comments (3)
I think this is very interesting! Currently, we parse all tests using ctest
command and no other dependencies, lacking some features. But I'm not familiar with neotest, to my understanding now, I think it's like a middleware which provides unified API to support multiple test framework, right?
from cmake-tools.nvim.
Yes, in short neotest provides a unified API and UI to run tests, while neotest adapters will take care of constructing commands to run tests in addition to parsing test results. One of the things that makes neotest such a great plugin is that you can use it for many different languages/frameworks (provided there is an adapter available) and that you get feedback on passing/failing test in the sign column. Neotest can also display test output (parsed by adapters) in a floating window, show errors through nvim's diagnostics (if supported by the adapter), and more.
neotest-ctest
bridges neotest
, ctest
and a few supported C/C++ test frameworks. neotest-ctest
is primarily limited by its ability to parse test cases through treesitter (which determines how neotest knows what tests you want to run). There's bound to be some shortcomings here considering that building treesitter queries can be quite challenging for some of the test case macros (especially parameterized tests). After that, the adapter will simply query ctest for runnable tests and build the appropriate ctest command(s) to run a single test case, all tests in a file or all tests in a directory/workspace depending on how you invoked neotest's API.
neotest-ctest
does not manage cmake based projects or compile tests, which is why I've recommended cmake-tools.nvim as a companion plugin in my readme :)
from cmake-tools.nvim.
I was looking for a plugin like this one.
In the project with multiple test binaries, I would like to be able to say "run this test" and only the test binary (CMake target) containing the test would be rebuilt.
Integration of CMake with testing frameworks is needed. Thank you for your work.
from cmake-tools.nvim.
Related Issues (20)
- Symlink compile_commands.json doesn't appear to work on windows HOT 7
- quick start HOT 4
- on_exit in default terminal.lua HOT 1
- How to choose target when every build/run HOT 18
- targets in buildPresets of CMakePresets.json not honored
- Build Directory Creation will Fail if it Requires a Recursive Create on Windows HOT 4
- Build Directory and Build Targets Not Always Found HOT 11
- Support fish shell HOT 4
- CMakeRun No Output on Windows HOT 5
- Slowdown every time cursor is moved HOT 4
- Whitespace makes CMakeGenerate error HOT 3
- Directory path starting with number causes error
- Feature:Easier to use
- Presets are not ignored when `cmake_use_preset` is set to false HOT 5
- Copy compile_commands to a user specified directory after CMake Configure
- target filename HOT 2
- Suggestion: provide a stable callback-based lua API HOT 2
- Automatic split size?
- Disable *cmake-tools* scratch buffer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmake-tools.nvim.