Add zero test case

This commit is contained in:
Alessandro Pasotti 2020-06-09 16:31:48 +02:00 committed by Nyall Dawson
parent 9da3ba383e
commit e629f8bdb3

View File

@ -706,6 +706,10 @@ void TestQgsField::convertCompatible()
QCOMPARE( stringDouble.type(), QVariant::Double );
QCOMPARE( stringDouble, QVariant( 1223456.012345 ) );
// Test 0 on int fields
intField = QgsField( QStringLiteral( "int" ), QVariant::Int, QStringLiteral( "Integer" ), 10 );
QVariant vZero { 0 };
QVERIFY( intField.convertCompatible( vZero ) );
}
void TestQgsField::dataStream()