From: Daniel Karbach Date: Mon, 18 Dec 2017 15:35:14 +0000 (+0100) Subject: whoops forgot kilo- and megatons X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=34697f07a0bb7b26b3eb2f102d18fb74e5ed7ec4;p=blobs.git whoops forgot kilo- and megatons --- diff --git a/tst/ui/StringTest.cpp b/tst/ui/StringTest.cpp index 5e781ca..3a9d9b7 100644 --- a/tst/ui/StringTest.cpp +++ b/tst/ui/StringTest.cpp @@ -111,6 +111,14 @@ void StringTest::testMass() { "bad format of ton string", std::string("18.00t"), MassString(18000.0) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "bad format of kiloton string", + std::string("50.00kt"), MassString(50000000.0) + ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "bad format of megaton string", + std::string("1400Mt"), MassString(1400000000000.0) + ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "bad format of gigaton string", std::string("50.00Gt"), MassString(50000000000000.0)