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

QTest::newRow() cannot read INT_MIN (int32), value -2147483648

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.9
    • Fix Version/s: None
    • Component/s: Testing: qtestlib
    • Labels:
      None
    • Environment:
      Kit: Desktop Qt 5.9.9 MinGW 32bit
      Config: Using QtTest library 5.9.9, Qt 5.9.9 (i386-little_endian-ilp32 shared (dynamic) debug build; by GCC 5.3.0)
    • Platform/s:
      Windows

      Description

       

      // — Code —

      void TestCalculator::testDiff_data() {

      QTest::addColumn<int>("a");

      QTest::addColumn<int>("b");

      QTest::addColumn<int>("result");

      QTest::newRow("INT_MIN - 0") << -2147483648 << 0 << -2147483648;

      // -> error message: QDEBUG : TestCalculator::testDiff() expected data of type 'int', got 'qlonglong' for element 0 of data with tag 'INT_MIN - 0' {color}}

       

       

        Attachments

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

          Activity

            People

            Assignee:
            macadder Jason McDonald
            Reporter:
            martintester M. Pe.
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes