Coder Social home page Coder Social logo

neotest-ctest adapter about cmake-tools.nvim HOT 3 OPEN

orjangj avatar orjangj commented on August 15, 2024 1
neotest-ctest adapter

from cmake-tools.nvim.

Comments (3)

Civitasv avatar Civitasv commented on August 15, 2024

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.

orjangj avatar orjangj commented on August 15, 2024

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.

mjrogozinski avatar mjrogozinski commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.