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

QCOMPARE does not output Actual and Expected values for qint8 and quint8 types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.2.1, 5.4.1, 5.5.0
    • Testing: qtestlib
    • None
    • Debian 7 amd64, GCC 4.7.2 with -std=c++11

    Description

      If you have test case like this:

      void TestQCompareQuint8::test_int() {
      
          QCOMPARE(int(24), int(42)); //same with qint16, quint16 
      }
      

      Output is like this:

      FAIL! : TestQCompareQuint8::test_int() Compared values are not the same
      Actual (int(24)): 24
      Expected (int(42)): 42

      Trough with quint8 and qint8 values it does not print "Actual" and "Expcted" lines:

      ...
      FAIL! : TestQCompareQuint8::test_qint8() Compared values are not the same
      Loc: [tst_TestQCompareQuint8.cpp(27)]
      FAIL! : TestQCompareQuint8::test_quint8() Compared values are not the same
      Loc: [tst_TestQCompareQuint8.cpp(32)]
      PASS : TestQCompareQuint8::cleanupTestCase()

      Attachments

        For Gerrit Dashboard: QTBUG-45238
        # Subject Branch Project Status CR V

        Activity

          People

            macadder Jason McDonald
            talkless Vincas Dargis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes