diff --git a/Tests/UnitTests/GUI/TestComponentProxyModel.cpp b/Tests/UnitTests/GUI/TestComponentProxyModel.cpp index f5c138f06865d9e96af762e568e3900ce32a7b71..15959f284f0d168bec3a48bac2f39bb2e713045c 100644 --- a/Tests/UnitTests/GUI/TestComponentProxyModel.cpp +++ b/Tests/UnitTests/GUI/TestComponentProxyModel.cpp @@ -273,7 +273,7 @@ TEST_F(TestComponentProxyModel, test_componentStrategy) EXPECT_FALSE(ffProxyIndex.isValid() ); QModelIndex radiusProxyIndex = proxy.mapFromSource(radiusIndex); - EXPECT_TRUE(radiusProxyIndex.isValid() == true); + EXPECT_TRUE(radiusProxyIndex.isValid() ); EXPECT_TRUE(radiusProxyIndex.parent() == groupProxyIndex); } diff --git a/Tests/UnitTests/GUI/TestExternalProperty.cpp b/Tests/UnitTests/GUI/TestExternalProperty.cpp index 3dc4ff468d44d6859651cd933c2db68d7a3b9804..902ebdc0035ba9d460ddb2a48e7574c2d04f4f38 100644 --- a/Tests/UnitTests/GUI/TestExternalProperty.cpp +++ b/Tests/UnitTests/GUI/TestExternalProperty.cpp @@ -17,18 +17,18 @@ TEST_F(TestExternalProperty, test_initialState) ExternalProperty property; EXPECT_FALSE(property.isValid() ); EXPECT_FALSE(property.color().isValid() ); - EXPECT_TRUE(property.identifier().isEmpty() == true); - EXPECT_TRUE(property.text().isEmpty() == true); + EXPECT_TRUE(property.identifier().isEmpty() ); + EXPECT_TRUE(property.text().isEmpty() ); // changing any property should change state to valid property.setColor(QColor(Qt::red)); EXPECT_TRUE(property.color() == QColor(Qt::red)); - EXPECT_TRUE(property.isValid() == true); + EXPECT_TRUE(property.isValid() ); property.setColor(QColor()); EXPECT_FALSE(property.isValid() ); property.setText("aaa"); EXPECT_TRUE(property.text() == "aaa"); - EXPECT_TRUE(property.isValid() == true); + EXPECT_TRUE(property.isValid() ); property.setText(QString()); EXPECT_FALSE(property.isValid() ); } diff --git a/Tests/UnitTests/GUI/TestGroupItem.cpp b/Tests/UnitTests/GUI/TestGroupItem.cpp index 99f76f900dd6305254a0dbe112351b682b89ce49..a1e37fe6c80c801ab734a94699c741a713b17d7a 100644 --- a/Tests/UnitTests/GUI/TestGroupItem.cpp +++ b/Tests/UnitTests/GUI/TestGroupItem.cpp @@ -76,7 +76,7 @@ TEST_F(TestGroupItem, test_CreateGroup) // checking current variant QVariant value = groupItem->value(); - EXPECT_TRUE(value.canConvert<ComboProperty>() == true); + EXPECT_TRUE(value.canConvert<ComboProperty>() ); ComboProperty combo = value.value<ComboProperty>(); EXPECT_EQ(combo.getValues(), groupInfo.itemLabels()); int index = groupInfo.itemTypes().indexOf(groupInfo.defaultType()); diff --git a/Tests/UnitTests/GUI/TestMapperCases.cpp b/Tests/UnitTests/GUI/TestMapperCases.cpp index fe405fe22057a18868b82adb076b23cf26d090bf..fff65d59b79c2b33d990d715a004f5cf72ddf686 100644 --- a/Tests/UnitTests/GUI/TestMapperCases.cpp +++ b/Tests/UnitTests/GUI/TestMapperCases.cpp @@ -49,5 +49,5 @@ TEST_F(TestMapperCases, test_SimulationOptionsComputationToggle) combo.setValue("Monte-Carlo Integration"); item->setItemValue(SimulationOptionsItem::P_COMPUTATION_METHOD, combo.variant()); - EXPECT_TRUE(item->getItem(SimulationOptionsItem::P_MC_POINTS)->isEnabled() == true); + EXPECT_TRUE(item->getItem(SimulationOptionsItem::P_MC_POINTS)->isEnabled() ); } diff --git a/Tests/UnitTests/GUI/TestOutputDataIOService.cpp b/Tests/UnitTests/GUI/TestOutputDataIOService.cpp index bf24957ffebf5ce962823b7636d03a0ba216c83a..c41783058204711b94e2dad596aa5071bb13cf7d 100644 --- a/Tests/UnitTests/GUI/TestOutputDataIOService.cpp +++ b/Tests/UnitTests/GUI/TestOutputDataIOService.cpp @@ -103,7 +103,7 @@ TEST_F(TestOutputDataIOService, test_OutputDataSaveInfo) QTest::qSleep(nap_time); item->setLastModified(QDateTime::currentDateTime()); - EXPECT_TRUE(info.wasModifiedSinceLastSave() == true); + EXPECT_TRUE(info.wasModifiedSinceLastSave() ); } //! Tests OutputDataDirHistory class intended for storing save history of several @@ -123,13 +123,13 @@ TEST_F(TestOutputDataIOService, test_OutputDataDirHistory) OutputDataDirHistory history; EXPECT_FALSE(history.contains(item1) ); // non-existing item is treated as modified - EXPECT_TRUE(history.wasModifiedSinceLastSave(item1) == true); + EXPECT_TRUE(history.wasModifiedSinceLastSave(item1) ); // Saving item in a history history.markAsSaved(item1); history.markAsSaved(item2); - EXPECT_TRUE(history.contains(item1) == true); + EXPECT_TRUE(history.contains(item1) ); // Empty DataItems are not added to history: EXPECT_FALSE(history.contains(item2) ); EXPECT_FALSE(history.wasModifiedSinceLastSave(item1) ); @@ -141,7 +141,7 @@ TEST_F(TestOutputDataIOService, test_OutputDataDirHistory) QTest::qSleep(10); item1->setLastModified(QDateTime::currentDateTime()); - EXPECT_TRUE(history.wasModifiedSinceLastSave(item1) == true); + EXPECT_TRUE(history.wasModifiedSinceLastSave(item1) ); } //! Tests OutputDataIOHistory class (save info for several independent directories). @@ -174,8 +174,8 @@ TEST_F(TestOutputDataIOService, test_OutputDataIOHistory) history.setHistory("dir1", dirHistory1); history.setHistory("dir2", dirHistory2); - EXPECT_TRUE(history.wasModifiedSinceLastSave("dir1", item1) == true); - EXPECT_TRUE(history.wasModifiedSinceLastSave("dir2", item1) == true); + EXPECT_TRUE(history.wasModifiedSinceLastSave("dir1", item1) ); + EXPECT_TRUE(history.wasModifiedSinceLastSave("dir2", item1) ); EXPECT_FALSE(history.wasModifiedSinceLastSave("dir1", item2) ); EXPECT_TRUE(history.wasModifiedSinceLastSave("dir2", item2) diff --git a/Tests/UnitTests/GUI/TestParticleCoreShell.cpp b/Tests/UnitTests/GUI/TestParticleCoreShell.cpp index 24f01488f01cf6ce2a6da57f16a01345da5b02bd..c6192e9512384528966b7418d622b46ff859cc91 100644 --- a/Tests/UnitTests/GUI/TestParticleCoreShell.cpp +++ b/Tests/UnitTests/GUI/TestParticleCoreShell.cpp @@ -106,7 +106,7 @@ TEST_F(TestParticleCoreShell, test_distributionContext) // coreshell particle SessionItem* coreshell = model.insertNewItem("ParticleCoreShell"); coreshell->setItemValue(ParticleItem::P_ABUNDANCE, 0.2); - EXPECT_TRUE(coreshell->getItem(ParticleItem::P_ABUNDANCE)->isEnabled() == true); + EXPECT_TRUE(coreshell->getItem(ParticleItem::P_ABUNDANCE)->isEnabled() ); EXPECT_EQ(coreshell->getItemValue(ParticleItem::P_ABUNDANCE).toDouble(), 0.2); // create distribution, adding coreshell to it diff --git a/Tests/UnitTests/GUI/TestParticleItem.cpp b/Tests/UnitTests/GUI/TestParticleItem.cpp index 615d27cbad2c07ab0dcb174a11840ab247ddb66e..8c657fd6b1faaebcb515e2b84a7cb3fe8772818a 100644 --- a/Tests/UnitTests/GUI/TestParticleItem.cpp +++ b/Tests/UnitTests/GUI/TestParticleItem.cpp @@ -54,7 +54,7 @@ TEST_F(TestParticleItem, test_distributionContext) SampleModel model; SessionItem* particle = model.insertNewItem("Particle"); particle->setItemValue(ParticleItem::P_ABUNDANCE, 0.2); - EXPECT_TRUE(particle->getItem(ParticleItem::P_ABUNDANCE)->isEnabled() == true); + EXPECT_TRUE(particle->getItem(ParticleItem::P_ABUNDANCE)->isEnabled() ); EXPECT_EQ(particle->getItemValue(ParticleItem::P_ABUNDANCE).toDouble(), 0.2); // adding particle to distribution, checking that abundance is default @@ -65,6 +65,6 @@ TEST_F(TestParticleItem, test_distributionContext) // removing particle, checking that abundance is enabled again distribution->takeRow(ParentRow(*particle)); - EXPECT_TRUE(particle->getItem(ParticleItem::P_ABUNDANCE)->isEnabled() == true); + EXPECT_TRUE(particle->getItem(ParticleItem::P_ABUNDANCE)->isEnabled() ); delete particle; } diff --git a/Tests/UnitTests/GUI/TestProjectUtils.cpp b/Tests/UnitTests/GUI/TestProjectUtils.cpp index 0364a4a468194b4c68fde838a3661231cfb43f87..4a04fcb184ddb70fd4a2089c35ed01b29f45ea0e 100644 --- a/Tests/UnitTests/GUI/TestProjectUtils.cpp +++ b/Tests/UnitTests/GUI/TestProjectUtils.cpp @@ -31,7 +31,7 @@ TEST_F(TestProjectUtils, test_nonXMLDataInDir) QDir dir(projectDir); if (dir.exists()) { - EXPECT_TRUE(ProjectUtils::removeRecursively(projectDir) == true); + EXPECT_TRUE(ProjectUtils::removeRecursively(projectDir) ); EXPECT_FALSE(dir.exists() ); } @@ -61,7 +61,7 @@ TEST_F(TestProjectUtils, test_nonXMLDataInDir) EXPECT_EQ(test_nonxml_files, nonxml); std::cout << "remove nonxml files ..." << std::endl; - EXPECT_TRUE(ProjectUtils::removeFiles(projectDir, nonxml) == true); + EXPECT_TRUE(ProjectUtils::removeFiles(projectDir, nonxml) ); std::cout << "check that no files left ..." << std::endl; nonxml = ProjectUtils::nonXMLDataInDir(projectDir);