Skip to content

Commit

Permalink
Add zero test case
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Jun 19, 2020
1 parent 9da3ba3 commit e629f8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/src/core/testqgsfield.cpp
Expand Up @@ -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()
Expand Down

0 comments on commit e629f8b

Please sign in to comment.