Giter VIP home page Giter VIP logo

Comments (14)

matepek avatar matepek commented on May 27, 2024

its a "slightly" bigger change even if the syntax is the same. need time. or you can contribute if you wish?

from vscode-catch2-test-adapter.

matepek avatar matepek commented on May 27, 2024

Hey,
I had some time so I put something together. I had no time to write tests and do proper testing, so I call it "experimental".
vscode-catch2-test-adapter-2.7.9.vsix.zip
You can install it with a visual studio command "Install from VSIX...".
Let me know if it works or not, bug reports, etc..

from vscode-catch2-test-adapter.

wilhem-meignan avatar wilhem-meignan commented on May 27, 2024

Hi @matepek,

Thanks! This is great!

I have tried it and could only find one issue: when two test cases have the same name they are not run even if they are in separate test suites. In the following example, the test cases are not run:

TEST_SUITE("First test suite")
{
    TEST_CASE("one test case")
    {
        REQUIRE(true);
    }
}

TEST_SUITE("Second test suite")
{
    TEST_CASE("one test case")
    {
        REQUIRE(false);
    }
}

Otherwise, everything I could test worked:

  • Detecting test cases. Test targets with no test cases are ignored but that's fine with me.
  • Running the tests and displaying the results including the inline display of failed assertions.
  • Autorun of test target when it is rebuilt.

from vscode-catch2-test-adapter.

matepek avatar matepek commented on May 27, 2024

Happy to hear.
I’m aware of that issue. But no solution because doctest lacks of a lot of features like proper test name listing. I even have to add some tricks to have code lens. If I have time I will write some feature request or PR to doctest.

from vscode-catch2-test-adapter.

wilhem-meignan avatar wilhem-meignan commented on May 27, 2024

OK. Thank you very much for your work. Do you know when this is going into a release?

from vscode-catch2-test-adapter.

matepek avatar matepek commented on May 27, 2024

I can put it now with “experimental” flag if that helps you. (?)

from vscode-catch2-test-adapter.

wilhem-meignan avatar wilhem-meignan commented on May 27, 2024

Yes, that would be nice.

from vscode-catch2-test-adapter.

matepek avatar matepek commented on May 27, 2024

There are some problem with the tests on windows. I have to postpone the release to the beginning of the next week. The attached one can be used until then.

from vscode-catch2-test-adapter.

wilhem-meignan avatar wilhem-meignan commented on May 27, 2024

OK, thank you for the information.

from vscode-catch2-test-adapter.

wilhem-meignan avatar wilhem-meignan commented on May 27, 2024

Update to the current state of the extension:

Detecting test cases. Test targets with no test cases are ignored but that's fine with me.

Apparently they are not ignored. I must have not build all the test targets properly. Now I also see empty test suites.

I have found an additional issue: the inline display of failed assertions is not completely reliable. The failed assertions are sometimes displayed but then cleared again immediately. I am not sure what causes them to be cleared.

from vscode-catch2-test-adapter.

matepek avatar matepek commented on May 27, 2024

the inline display of failed assertions is not completely reliable

Yepp, also a know issue. Basically when I list the tests I have no information about the file or line.
After the first run I update it but then the run info is became lost because of the reload. I've made a workaround now, but it would be nice to be fixed. Would you create an issue for doctest and ask them to add some way to list the tests with suite, file and line info?

from vscode-catch2-test-adapter.

wilhem-meignan avatar wilhem-meignan commented on May 27, 2024

Hi @matepek,

I have created an issue for doctest: doctest/doctest#320

How would you like the command output to look like ideally?

from vscode-catch2-test-adapter.

matepek avatar matepek commented on May 27, 2024

xml would be great. -r=xml

from vscode-catch2-test-adapter.

matepek avatar matepek commented on May 27, 2024

Released it. Since doctest 2.3.6 was released with some improvements I removed some not so stable solution so it does not support lower version of the framework.

Also it lacks some for example grouping by suites, but that requires more time.
The skipped test detection still not supported due to lack of doctest feature.

Have fun with it.

IT will stay "experiment" until there is no tests. (it will take a while)

from vscode-catch2-test-adapter.

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.