From 7849c0bc3b8c3ab45b96313faf9f07fe470b66b4 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Sat, 3 Oct 2020 09:21:27 +0200
Subject: [PATCH] ditto for '== true'

---
 Tests/UnitTests/GUI/TestComponentProxyModel.cpp |  2 +-
 Tests/UnitTests/GUI/TestExternalProperty.cpp    |  8 ++++----
 Tests/UnitTests/GUI/TestGroupItem.cpp           |  2 +-
 Tests/UnitTests/GUI/TestMapperCases.cpp         |  2 +-
 Tests/UnitTests/GUI/TestOutputDataIOService.cpp | 12 ++++++------
 Tests/UnitTests/GUI/TestParticleCoreShell.cpp   |  2 +-
 Tests/UnitTests/GUI/TestParticleItem.cpp        |  4 ++--
 Tests/UnitTests/GUI/TestProjectUtils.cpp        |  4 ++--
 8 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/Tests/UnitTests/GUI/TestComponentProxyModel.cpp b/Tests/UnitTests/GUI/TestComponentProxyModel.cpp
index f5c138f0686..15959f284f0 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 3dc4ff468d4..902ebdc0035 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 99f76f900dd..a1e37fe6c80 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 fe405fe2205..fff65d59b79 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 bf24957ffeb..c4178305820 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 24f01488f01..c6192e95123 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 615d27cbad2..8c657fd6b1f 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 0364a4a4681..4a04fcb184d 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);
-- 
GitLab