Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Running Googletests problem



  • I wrote 2 simple tests using TEST_F macro. When I run tests using 'Run Tests For Current File' it works (see first img). But if I try to use 'Run All Tests' or 'Run Selected Tests' with both tests chosen it prints warning message 'No tests found' (see 2nd img). What's weirder is that if I select just one test (first or second, doesn't matter) the 'Run Selected Tests' run a test properly.

    My setup:
    I'm using Virtual Machine with Ubuntu 18.04.4
    Qt Creator 4.11.2 based on Qt 5.14.2
    I cloned googletest repo and used option 'source googletest directory' while building the project
    I set up this machine 2 days ago so everything is fresh and up-to-date

    Can anybody help me?

    Thanks

    RunTests.png
    RunAllTests.png


  • Lifetime Qt Champion

    Hi @tmk_rudnicki,

    are your tests in a header file?

    What happens if you put them in a cpp file?

    Regards


Log in to reply