Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-17583

Document that using of macros like Q_ASSERT be avoided in auto tests

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.8.0
    • 4.7.1
    • Testing: qtestlib
    • None

    Description

      Document that using Q_ASSERT in unit tests should be avoided and demonstrate alternatives.

      Using Q_ASSERT causes a test program to abort, resulting in incomplete/malformed test output and preventing remaining test functions in the test program from being executed. It is better to report a test failure using QVERIFY (which will skip the rest of the current test function) and allow the test program to continue executing.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
              isdale Keith Isdale (closed Nokia identity) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes