Commit a38709ca authored by Jasem Mutlaq's avatar Jasem Mutlaq

Fixing test cases. Need to add more

parent 65c7ddb1
......@@ -18,7 +18,7 @@ TestDMS::~TestDMS()
{
}
void TestDMS::checkDefaultConstructor()
void TestDMS::defaultCtor()
{
/*
* Test 1: Checks Default Constructor
......@@ -26,10 +26,27 @@ void TestDMS::checkDefaultConstructor()
dms d;
QCOMPARE(d.Degrees(), NaN::d);
QVERIFY(std::isnan(d.Degrees()));
}
void TestDMS::explicitSexigesimalCtor()
{
/*
* Test 1: Checks Explicit Construct 1
*/
// HH:MM:SS
// 14:55:20
dms d(14, 55, 20);
QVERIFY(d.degree() == 14);
QVERIFY(d.arcmin() == 55);
QVERIFY(d.arcsec() == 20);
QVERIFY(d.Degrees() == (14.0+55.0/60.0+20.0/3600.0));
}
QTEST_MAIN(TestDMS)
......@@ -25,7 +25,8 @@ class TestDMS: public QObject
~TestDMS();
private slots:
void checkDefaultConstructor();
void defaultCtor();
void explicitSexigesimalCtor();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment