Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreators auto detection of test cases is doing it wrong.

QtCreators auto detection of test cases is doing it wrong.

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 284 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    llothar
    wrote on last edited by
    #1

    I just found out that the unit testing plugins don't use the cmake data to detect the available test cases. Instead they just scan the source test and they do this very bad. For example when you wrap the TEST (gtest) or TEST_CASE (catch2) macros in your own macros they will not get detected.

    This is bad. Abstracting from the individual test case syntax is important if you for example want to use the best on all platforms.
    With just 200 lines of code i can use generic tests that run well with gtest/catch2/XCtest and microsofts CppUnitTest and are displayed in Visual Studio and XCode.

    Can this design error please be fixed.
    This would also make supporting of new test frameworks much easier.
    XCode and VisualStudio are also doing it this way for a good reason.

    If not, can we please don't look at the unprocessed source code level but clang model level declarations to detect the test cases in the source code? Via clang we can resolve macro redirection already perfectly well.

    This problem made me join this community, so please forgive me if it was already discussed or there is some other way then the forum to request feature changes.

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @llothar said in QtCreators auto detection of test cases is doing it wrong.:

      or there is some other way then the forum to request feature changes.

      The forum is user-driven and have nothing to do with the Qt development. Bug reports should go to bugreports.qt.io

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved