diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-04-17 12:21:39 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-17 08:46:29 -0700 |
commit | 55d010bad839b503cbfa759498d18690f4a809ae (patch) | |
tree | 9139b3108d7eefa8a6a0b73cd109a93b02812e66 /tests | |
parent | 95984628302bee02af3e82ac305b5e3bb4842533 (diff) | |
download | subsurface-55d010bad839b503cbfa759498d18690f4a809ae.tar.gz |
Moved code around to make possible to compile the C part alone.
The C code should be compilable without the need to compile the Gui part,
too. This is expecially good for unit testing as we can test all the
algorithms without a window appearing out of nowhere.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testprofile.cpp | 9 | ||||
-rw-r--r-- | tests/testprofile.h | 12 | ||||
-rw-r--r-- | tests/testunitconversion.cpp | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/testprofile.cpp b/tests/testprofile.cpp new file mode 100644 index 000000000..d8aea3cae --- /dev/null +++ b/tests/testprofile.cpp @@ -0,0 +1,9 @@ +#include "testprofile.h" +#include "dive.h" + +void TestProfile::testRedCeiling() +{ + parse_file("../dives/deep.xml"); +} + +QTEST_MAIN(TestProfile)
\ No newline at end of file diff --git a/tests/testprofile.h b/tests/testprofile.h new file mode 100644 index 000000000..25f094b1b --- /dev/null +++ b/tests/testprofile.h @@ -0,0 +1,12 @@ +#ifndef TESTPROFILE_H +#define TESTPROFILE_H + +#include <QtTest> + +class TestProfile : public QObject{ + Q_OBJECT +private slots: + void testRedCeiling(); +}; + +#endif diff --git a/tests/testunitconversion.cpp b/tests/testunitconversion.cpp index b4d04067f..3adf975c4 100644 --- a/tests/testunitconversion.cpp +++ b/tests/testunitconversion.cpp @@ -20,6 +20,7 @@ void TestUnitConversion::testUnitConversions() QCOMPARE(IS_FP_SAME(bar_to_atm(1.013), 1), true); QCOMPARE(IS_FP_SAME(mbar_to_atm(1013), 1), true); QCOMPARE(mbar_to_PSI(1013), (int)15); + get_units(); } QTEST_MAIN(TestUnitConversion) |