OSDN Git Service

adjust expected QVariant test data
authorIvailo Monev <xakepa10@laimg.moc>
Mon, 23 Dec 2019 21:03:59 +0000 (21:03 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Mon, 23 Dec 2019 21:03:59 +0000 (21:03 +0000)
it is possible to convert negative strings to integers now

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
tests/auto/qvariant/tst_qvariant.cpp

index 5f066ef..ea21c99 100644 (file)
@@ -693,7 +693,7 @@ void tst_QVariant::toUInt_data()
     QTest::newRow( "negativeint" ) << QVariant( -123 ) << (uint)-123 << true;
     QTest::newRow( "negativedouble" ) << QVariant( -3.1415927 ) << (uint)-3 << true;
     QTest::newRow( "negativefloat" ) << QVariant( -3.1415927f ) << (uint)-3 << true;
-    QTest::newRow( "negativeint-string" ) << QVariant( QString("-123") ) << (uint)0 << false;
+    QTest::newRow( "negativeint-string" ) << QVariant( QString("-123") ) << (uint)-123 << true;
     QTest::newRow( "negativelonglong0" ) << QVariant( (qlonglong)-34 ) << (uint)-34 << true;
     QTest::newRow( "QChar" ) << QVariant(QChar('a')) << uint('a') << true;
     QByteArray bytearray(4, ' ');