[poppler] qt4/tests

Pino Toscano pino at kemper.freedesktop.org
Wed Apr 27 13:37:09 PDT 2011


 qt4/tests/check_optcontent.cpp |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ad131763640b2e27dde75c42b514386284b6a60d
Author: Pino Toscano <pino at kde.org>
Date:   Wed Apr 27 22:36:13 2011 +0200

    [qt4/tests] turn some assignments to bool into QVERIFY checks

diff --git a/qt4/tests/check_optcontent.cpp b/qt4/tests/check_optcontent.cpp
index ffa0e03..b59ec48 100644
--- a/qt4/tests/check_optcontent.cpp
+++ b/qt4/tests/check_optcontent.cpp
@@ -430,7 +430,7 @@ void TestOptionalContent::checkRadioButtons()
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     // RBGroup of languages, so turning on Japanese should turn off English
-    bool result = optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole );
+    QVERIFY( optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole ) );
 
     subindex = optContent->index( 0, 0, index );
     QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
@@ -445,7 +445,7 @@ void TestOptionalContent::checkRadioButtons()
     QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
 
     // and turning on French should turn off Japanese
-    result = optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole );
+    QVERIFY( optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole ) );
 
     subindex = optContent->index( 0, 0, index );
     QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
@@ -461,7 +461,7 @@ void TestOptionalContent::checkRadioButtons()
 
 
     // and turning off French should leave them all off
-    result = optContent->setData( subindex, QVariant( false ), Qt::CheckStateRole );
+    QVERIFY( optContent->setData( subindex, QVariant( false ), Qt::CheckStateRole ) );
 
     subindex = optContent->index( 0, 0, index );
     QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );


More information about the poppler mailing list