Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using Multiple Classes with QtTest
Forum Updated to NodeBB v4.3 + New Features

Using Multiple Classes with QtTest

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 267 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Snowdrop
    wrote on 24 Oct 2021, 23:52 last edited by
    #1

    I want to have multiple test classes, and I want Qt Creator to see all of them. So far, none of the approaches I've come across get it quite right.

    For example, if I choose to create a new project for each class, Qt Creator only shows the test from the currently active project.
    And the only way to get it to show all available test classes is to include all the classes in one project and add QTEST_APPLESS_MAIN(...) for each of them, but of course, they don't compile. Solutions I've found involve creating a custom main function that handles multiple tests, but none of them are shown by Qt Creator.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Oct 2021, 20:52 last edited by
      #2

      Hi,

      What is the structure of your project ?
      Are you using the SUBDIRS template ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      24 Oct 2021, 23:52

      • Login

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