Results 1 to 2 of 2

Thread: QTest Unit Testing

  1. #1
    Join Date
    Mar 2006
    Posts
    14
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTest Unit Testing

    Hi,

    The QTest tutorial from Qt docs have its own main method:
    And again, to make our test case a stand-alone executable, the following two lines are needed:

    QTEST_MAIN(TestQString)
    #include "testqstring.moc"

    But in my case I already have my own main method and only whishes to execute the tests should a test parameter provided to the program.
    Thus, all tests are run in some order should a certain param be provided to the application.

    How can I do this?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTest Unit Testing

    Just use QTest::qExec().

Similar Threads

  1. How to unit test a Qt Gui
    By mitskits in forum Qt Programming
    Replies: 1
    Last Post: 20th January 2006, 07:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.