Skip to content
Permalink
Browse files

Fix QCOMPARE in the test

  • Loading branch information
elpaso committed Sep 18, 2018
1 parent d179635 commit 0edb224e245bc490e65b874e7ce26009d73c6fe9
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/src/gui/testqgsrangewidgetwrapper.cpp
@@ -302,9 +302,9 @@ void TestQgsRangeWidgetWrapper::test_nulls()
QCOMPARE( widget1->value( ), QVariant( QVariant::Double ) );
QCOMPARE( editor1->mLineEdit->text(), QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY );
editor1->mLineEdit->setText( QString( "151%1" ).arg( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ) );
QCOMPARE( widget1->value( ), 151 );
QCOMPARE( widget1->value( ).toInt(), 151 );
editor1->mLineEdit->setText( QString( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ).append( QStringLiteral( "161" ) ) );
QCOMPARE( widget1->value( ), 161 );
QCOMPARE( widget1->value( ).toInt(), 161 );


QgsSpinBox *editor0 = qobject_cast<QgsSpinBox *>( widget0->createWidget( nullptr ) );
@@ -322,9 +322,9 @@ void TestQgsRangeWidgetWrapper::test_nulls()
QCOMPARE( editor0->mLineEdit->text(), QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY );

editor0->mLineEdit->setText( QString( "150%1" ).arg( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ) );
QCOMPARE( widget0->value( ), 150 );
QCOMPARE( widget0->value( ).toInt(), 150 );
editor0->mLineEdit->setText( QString( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ).append( QStringLiteral( "160" ) ) );
QCOMPARE( widget0->value( ), 160 );
QCOMPARE( widget0->value( ).toInt(), 160 );

}

0 comments on commit 0edb224

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