summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2016-10-15 18:54:21 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-10-15 12:21:00 -0700
commitc5c82b5d11d151b5f0beb5c1258b569c1f56e75b (patch)
treee1474805518104a0710f3196378d1eb05c3e978d
parent56fff9de6b1cda497f78a163d8e983bf6887441c (diff)
downloadsubsurface-c5c82b5d11d151b5f0beb5c1258b569c1f56e75b.tar.gz
Save tests for Partial Pressure Gas
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--tests/testpreferences.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp
index b22fb4e48..d1d0012fa 100644
--- a/tests/testpreferences.cpp
+++ b/tests/testpreferences.cpp
@@ -201,6 +201,36 @@ void TestPreferences::testPreferences()
TEST(tecDetails->showAverageDepth(), false);
tecDetails->setShowPicturesInProfile(false);
TEST(tecDetails->showPicturesInProfile(), false);
+
+ auto pp = pref->pp_gas;
+ pp->setShowPn2(1);
+ pp->setShowPhe(2);
+ pp->setShowPo2(3);
+ pp->setPo2Threshold(1.0);
+ pp->setPn2Threshold(2.0);
+ pp->setPheThreshold(3.0);
+
+ TEST(pp->showPn2(), (short) 1);
+ TEST(pp->showPhe(), (short) 2);
+ TEST(pp->showPo2(), (short) 3);
+ TEST(pp->pn2Threshold(), 1.0);
+ TEST(pp->pheThreshold(), 2.0);
+ TEST(pp->po2Threshold(), 3.0);
+
+ pp->setShowPn2(4);
+ pp->setShowPhe(5);
+ pp->setShowPo2(6);
+ pp->setPo2Threshold(4.0);
+ pp->setPn2Threshold(5.0);
+ pp->setPheThreshold(6.0);
+
+ TEST(pp->showPn2(), (short) 4);
+ TEST(pp->showPhe(), (short) 5);
+ TEST(pp->showPo2(), (short) 6);
+ TEST(pp->pn2Threshold(), 4.0);
+ TEST(pp->pheThreshold(), 5.0);
+ TEST(pp->po2Threshold(), 6.0);
+
}
QTEST_MAIN(TestPreferences)