Skip to content
Snippets Groups Projects
Commit 7849c0bc authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

ditto for '== true'

parent ca584b4c
No related branches found
No related tags found
No related merge requests found
...@@ -273,7 +273,7 @@ TEST_F(TestComponentProxyModel, test_componentStrategy) ...@@ -273,7 +273,7 @@ TEST_F(TestComponentProxyModel, test_componentStrategy)
EXPECT_FALSE(ffProxyIndex.isValid() ); EXPECT_FALSE(ffProxyIndex.isValid() );
QModelIndex radiusProxyIndex = proxy.mapFromSource(radiusIndex); QModelIndex radiusProxyIndex = proxy.mapFromSource(radiusIndex);
EXPECT_TRUE(radiusProxyIndex.isValid() == true); EXPECT_TRUE(radiusProxyIndex.isValid() );
EXPECT_TRUE(radiusProxyIndex.parent() == groupProxyIndex); EXPECT_TRUE(radiusProxyIndex.parent() == groupProxyIndex);
} }
......
...@@ -17,18 +17,18 @@ TEST_F(TestExternalProperty, test_initialState) ...@@ -17,18 +17,18 @@ TEST_F(TestExternalProperty, test_initialState)
ExternalProperty property; ExternalProperty property;
EXPECT_FALSE(property.isValid() ); EXPECT_FALSE(property.isValid() );
EXPECT_FALSE(property.color().isValid() ); EXPECT_FALSE(property.color().isValid() );
EXPECT_TRUE(property.identifier().isEmpty() == true); EXPECT_TRUE(property.identifier().isEmpty() );
EXPECT_TRUE(property.text().isEmpty() == true); EXPECT_TRUE(property.text().isEmpty() );
// changing any property should change state to valid // changing any property should change state to valid
property.setColor(QColor(Qt::red)); property.setColor(QColor(Qt::red));
EXPECT_TRUE(property.color() == QColor(Qt::red)); EXPECT_TRUE(property.color() == QColor(Qt::red));
EXPECT_TRUE(property.isValid() == true); EXPECT_TRUE(property.isValid() );
property.setColor(QColor()); property.setColor(QColor());
EXPECT_FALSE(property.isValid() ); EXPECT_FALSE(property.isValid() );
property.setText("aaa"); property.setText("aaa");
EXPECT_TRUE(property.text() == "aaa"); EXPECT_TRUE(property.text() == "aaa");
EXPECT_TRUE(property.isValid() == true); EXPECT_TRUE(property.isValid() );
property.setText(QString()); property.setText(QString());
EXPECT_FALSE(property.isValid() ); EXPECT_FALSE(property.isValid() );
} }
......
...@@ -76,7 +76,7 @@ TEST_F(TestGroupItem, test_CreateGroup) ...@@ -76,7 +76,7 @@ TEST_F(TestGroupItem, test_CreateGroup)
// checking current variant // checking current variant
QVariant value = groupItem->value(); QVariant value = groupItem->value();
EXPECT_TRUE(value.canConvert<ComboProperty>() == true); EXPECT_TRUE(value.canConvert<ComboProperty>() );
ComboProperty combo = value.value<ComboProperty>(); ComboProperty combo = value.value<ComboProperty>();
EXPECT_EQ(combo.getValues(), groupInfo.itemLabels()); EXPECT_EQ(combo.getValues(), groupInfo.itemLabels());
int index = groupInfo.itemTypes().indexOf(groupInfo.defaultType()); int index = groupInfo.itemTypes().indexOf(groupInfo.defaultType());
......
...@@ -49,5 +49,5 @@ TEST_F(TestMapperCases, test_SimulationOptionsComputationToggle) ...@@ -49,5 +49,5 @@ TEST_F(TestMapperCases, test_SimulationOptionsComputationToggle)
combo.setValue("Monte-Carlo Integration"); combo.setValue("Monte-Carlo Integration");
item->setItemValue(SimulationOptionsItem::P_COMPUTATION_METHOD, combo.variant()); 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() );
} }
...@@ -103,7 +103,7 @@ TEST_F(TestOutputDataIOService, test_OutputDataSaveInfo) ...@@ -103,7 +103,7 @@ TEST_F(TestOutputDataIOService, test_OutputDataSaveInfo)
QTest::qSleep(nap_time); QTest::qSleep(nap_time);
item->setLastModified(QDateTime::currentDateTime()); item->setLastModified(QDateTime::currentDateTime());
EXPECT_TRUE(info.wasModifiedSinceLastSave() == true); EXPECT_TRUE(info.wasModifiedSinceLastSave() );
} }
//! Tests OutputDataDirHistory class intended for storing save history of several //! Tests OutputDataDirHistory class intended for storing save history of several
...@@ -123,13 +123,13 @@ TEST_F(TestOutputDataIOService, test_OutputDataDirHistory) ...@@ -123,13 +123,13 @@ TEST_F(TestOutputDataIOService, test_OutputDataDirHistory)
OutputDataDirHistory history; OutputDataDirHistory history;
EXPECT_FALSE(history.contains(item1) ); EXPECT_FALSE(history.contains(item1) );
// non-existing item is treated as modified // non-existing item is treated as modified
EXPECT_TRUE(history.wasModifiedSinceLastSave(item1) == true); EXPECT_TRUE(history.wasModifiedSinceLastSave(item1) );
// Saving item in a history // Saving item in a history
history.markAsSaved(item1); history.markAsSaved(item1);
history.markAsSaved(item2); history.markAsSaved(item2);
EXPECT_TRUE(history.contains(item1) == true); EXPECT_TRUE(history.contains(item1) );
// Empty DataItems are not added to history: // Empty DataItems are not added to history:
EXPECT_FALSE(history.contains(item2) ); EXPECT_FALSE(history.contains(item2) );
EXPECT_FALSE(history.wasModifiedSinceLastSave(item1) ); EXPECT_FALSE(history.wasModifiedSinceLastSave(item1) );
...@@ -141,7 +141,7 @@ TEST_F(TestOutputDataIOService, test_OutputDataDirHistory) ...@@ -141,7 +141,7 @@ TEST_F(TestOutputDataIOService, test_OutputDataDirHistory)
QTest::qSleep(10); QTest::qSleep(10);
item1->setLastModified(QDateTime::currentDateTime()); item1->setLastModified(QDateTime::currentDateTime());
EXPECT_TRUE(history.wasModifiedSinceLastSave(item1) == true); EXPECT_TRUE(history.wasModifiedSinceLastSave(item1) );
} }
//! Tests OutputDataIOHistory class (save info for several independent directories). //! Tests OutputDataIOHistory class (save info for several independent directories).
...@@ -174,8 +174,8 @@ TEST_F(TestOutputDataIOService, test_OutputDataIOHistory) ...@@ -174,8 +174,8 @@ TEST_F(TestOutputDataIOService, test_OutputDataIOHistory)
history.setHistory("dir1", dirHistory1); history.setHistory("dir1", dirHistory1);
history.setHistory("dir2", dirHistory2); history.setHistory("dir2", dirHistory2);
EXPECT_TRUE(history.wasModifiedSinceLastSave("dir1", item1) == true); EXPECT_TRUE(history.wasModifiedSinceLastSave("dir1", item1) );
EXPECT_TRUE(history.wasModifiedSinceLastSave("dir2", item1) == true); EXPECT_TRUE(history.wasModifiedSinceLastSave("dir2", item1) );
EXPECT_FALSE(history.wasModifiedSinceLastSave("dir1", item2) ); EXPECT_FALSE(history.wasModifiedSinceLastSave("dir1", item2) );
EXPECT_TRUE(history.wasModifiedSinceLastSave("dir2", item2) EXPECT_TRUE(history.wasModifiedSinceLastSave("dir2", item2)
......
...@@ -106,7 +106,7 @@ TEST_F(TestParticleCoreShell, test_distributionContext) ...@@ -106,7 +106,7 @@ TEST_F(TestParticleCoreShell, test_distributionContext)
// coreshell particle // coreshell particle
SessionItem* coreshell = model.insertNewItem("ParticleCoreShell"); SessionItem* coreshell = model.insertNewItem("ParticleCoreShell");
coreshell->setItemValue(ParticleItem::P_ABUNDANCE, 0.2); 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); EXPECT_EQ(coreshell->getItemValue(ParticleItem::P_ABUNDANCE).toDouble(), 0.2);
// create distribution, adding coreshell to it // create distribution, adding coreshell to it
......
...@@ -54,7 +54,7 @@ TEST_F(TestParticleItem, test_distributionContext) ...@@ -54,7 +54,7 @@ TEST_F(TestParticleItem, test_distributionContext)
SampleModel model; SampleModel model;
SessionItem* particle = model.insertNewItem("Particle"); SessionItem* particle = model.insertNewItem("Particle");
particle->setItemValue(ParticleItem::P_ABUNDANCE, 0.2); 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); EXPECT_EQ(particle->getItemValue(ParticleItem::P_ABUNDANCE).toDouble(), 0.2);
// adding particle to distribution, checking that abundance is default // adding particle to distribution, checking that abundance is default
...@@ -65,6 +65,6 @@ TEST_F(TestParticleItem, test_distributionContext) ...@@ -65,6 +65,6 @@ TEST_F(TestParticleItem, test_distributionContext)
// removing particle, checking that abundance is enabled again // removing particle, checking that abundance is enabled again
distribution->takeRow(ParentRow(*particle)); distribution->takeRow(ParentRow(*particle));
EXPECT_TRUE(particle->getItem(ParticleItem::P_ABUNDANCE)->isEnabled() == true); EXPECT_TRUE(particle->getItem(ParticleItem::P_ABUNDANCE)->isEnabled() );
delete particle; delete particle;
} }
...@@ -31,7 +31,7 @@ TEST_F(TestProjectUtils, test_nonXMLDataInDir) ...@@ -31,7 +31,7 @@ TEST_F(TestProjectUtils, test_nonXMLDataInDir)
QDir dir(projectDir); QDir dir(projectDir);
if (dir.exists()) { if (dir.exists()) {
EXPECT_TRUE(ProjectUtils::removeRecursively(projectDir) == true); EXPECT_TRUE(ProjectUtils::removeRecursively(projectDir) );
EXPECT_FALSE(dir.exists() ); EXPECT_FALSE(dir.exists() );
} }
...@@ -61,7 +61,7 @@ TEST_F(TestProjectUtils, test_nonXMLDataInDir) ...@@ -61,7 +61,7 @@ TEST_F(TestProjectUtils, test_nonXMLDataInDir)
EXPECT_EQ(test_nonxml_files, nonxml); EXPECT_EQ(test_nonxml_files, nonxml);
std::cout << "remove nonxml files ..." << std::endl; 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; std::cout << "check that no files left ..." << std::endl;
nonxml = ProjectUtils::nonXMLDataInDir(projectDir); nonxml = ProjectUtils::nonXMLDataInDir(projectDir);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment