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

Add varargs variants of QFAIL(), QSKIP(), QVERIFY2() that take printf-type format strings and parameters for them

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Testing: qtestlib
    • Labels:
      None
    • Platform/s:
      All

      Description

      At present, if one wants to embed any relevant data in the messages these macros report, it has to be done by qPrintable(QString("...").arg(...)), which is unwieldy, ugly and expensive.
      Now that macro-varargs is a thing, there is nothing to keep us from supporting printf()-style formatting directly in such strings, just the same as we can in qDebug("...", ...) messages.
      Let's not name these by suffixing with numbers; I suggest QARG_FAIL(), QARG_SKIP() and QARG_VERIFY().

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              macadder Jason McDonald
              Reporter:
              Eddy Edward Welbourne
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes