Skip to content
Permalink
Browse files

Add zero test case

  • Loading branch information
elpaso authored and nyalldawson committed Jun 9, 2020
1 parent 9da3ba3 commit e629f8bdb347d1b15daf0e742f0a0b36bb56980c
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/src/core/testqgsfield.cpp
@@ -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()

0 comments on commit e629f8b

Please sign in to comment.
You can’t perform that action at this time.