Code Monkey home page Code Monkey logo

Comments (17)

hfn92 avatar hfn92 commented on July 30, 2024 1

I have a prototype for ctest https://github.com/hfn92/cmake-tools.nvim/tree/ctest This is pretty much all I would've added for myself

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024 1

I think a single terminal would be nice for the ctests to happen: [CMakeTools] CTest? How about this?

Yeah. It’s convenient.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024 1

Looks like it freezes. But imo tests like those written with gtest shouldn't do things like that.

Yeah, but sometimes people want that. We should make it an option.

from cmake-tools.nvim.

rohit-kumar-j avatar rohit-kumar-j commented on July 30, 2024 1

+1 ctest would be a good additon to cmaketools as it comes with vanilla cmake. Seems like currently it uses quickfix terminals. Is this WIP? I will try and port it to the terminal buffers + Windows10 support(Later when I find the time).
I think a single terminal would be nice for the ctests to happen: [CMakeTools] CTest? How about this?

I'd want tests to run in quickfix so that I can jump directly to test errors. That was my whole reason for writing the gtest plugin. How about making it an option at least?

Ooh nice. I think the quickfix method should be the default if you can quickly jump in between errors directly with the quickfix list.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024 1

I've added ctest support(though very naive), now you can use CMakeRunTest to run tests with your specified executor. Like:

Screen.Recording.2023-12-15.at.16.15.35.mov

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

Okay. That’s a good start.

from cmake-tools.nvim.

rohit-kumar-j avatar rohit-kumar-j commented on July 30, 2024

+1 ctest would be a good additon to cmaketools as it comes with vanilla cmake.
Seems like currently it uses quickfix terminals. Is this WIP? I will try and port it to the terminal buffers + Windows10 support(Later when I find the time).

I think a single terminal would be nice for the ctests to happen: [CMakeTools] CTest? How about this?

from cmake-tools.nvim.

hfn92 avatar hfn92 commented on July 30, 2024

+1 ctest would be a good additon to cmaketools as it comes with vanilla cmake. Seems like currently it uses quickfix terminals. Is this WIP? I will try and port it to the terminal buffers + Windows10 support(Later when I find the time).

I think a single terminal would be nice for the ctests to happen: [CMakeTools] CTest? How about this?

I'd want tests to run in quickfix so that I can jump directly to test errors. That was my whole reason for writing the gtest plugin. How about making it an option at least?

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

Yeah, for sure, we should provide two apis, one for quickfix, another for terminal.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

So the detailed logic should be placed in quickfix.lua and terminal.lua, and ctest.lua just calls them.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

And I have a question, if tests are launched in quickfix, what will happen if it should accept values from stdin? Like cin >> x;

from cmake-tools.nvim.

hfn92 avatar hfn92 commented on July 30, 2024

Looks like it freezes. But imo tests like those written with gtest shouldn't do things like that. (Btw when trying to debug it just crashes my session when reaching std::cin. But that could be a problem elsewhere)

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

Btw when trying to debug it just crashes my session when reaching std::cin. But that could be a problem elsewhere

Yeah. Too many changes recently, maybe I forgot to add some logics.

from cmake-tools.nvim.

ErezAmihud avatar ErezAmihud commented on July 30, 2024

There is also neotest-gtest for neotest integration. I could not get it to work properly but it can be use a base to some of the features needed

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

There is also neotest-gtest for neotest integration. I could not get it to work properly but it can be use a base to some of the features needed

Thanks, I shall review that repo someday.

https://github.com/nvim-neotest/neotest.

from cmake-tools.nvim.

hrzlgnm avatar hrzlgnm commented on July 30, 2024

I'd go for cmake ctest, as it supports integration with other testing frameworks. Or the other way around, most testing framework have at leas documentation on how to integrate with ctest, like for example https://github.com/doctest/doctest

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 30, 2024

Ctest will use Executor to run commands.

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.