summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-06-10 12:38:40 (GMT)
committerTobias Markmann <tm@ayena.de>2016-06-10 13:11:04 (GMT)
commitf038599ba697acc17a328ef4ade5514fede8887e (patch)
tree1a7cb59f2490bbfd60fff2c92e147d93ea6d1166 /Swiften/Parser/PayloadParsers/UnitTest
parent33ffcd9bf5bc9806d0b404aae2aaf6d67a2945db (diff)
downloadswift-f038599ba697acc17a328ef4ade5514fede8887e.zip
swift-f038599ba697acc17a328ef4ade5514fede8887e.tar.bz2
Fix remaining compiler warnings on OS X with clang
This changes HippoMocks include to -isystem include so it will not cause compiler warnings. This changes UserLocation floating point values to double and remove remaining numerical casts. Change C++11 compiler test to not cause warnings. Test-Information: Builds with allow_warnings=0 on OS X 10.11.5 with Xcode clang. Change-Id: I26c60265a86c9be656089ade63fe9ad63851580f
Diffstat (limited to 'Swiften/Parser/PayloadParsers/UnitTest')
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/UserLocationParserTest.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/UserLocationParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/UserLocationParserTest.cpp
index 6d16377..98a147f 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/UserLocationParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/UserLocationParserTest.cpp
@@ -46,10 +46,10 @@ class UserLocationParserTest : public CppUnit::TestFixture
UserLocation* payload = dynamic_cast<UserLocation*>(parser.getPayload().get());
CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT_EQUAL(std::string("Barbaric"), payload->getArea().get());
- CPPUNIT_ASSERT_EQUAL(5.75F, payload->getAltitude().get());
+ CPPUNIT_ASSERT_EQUAL(5.75, payload->getAltitude().get());
CPPUNIT_ASSERT_EQUAL(std::string("Near"), payload->getLocality().get());
- CPPUNIT_ASSERT_EQUAL(1.670F, payload->getLatitude().get());
- CPPUNIT_ASSERT_EQUAL(0.95F, payload->getAccuracy().get());
+ CPPUNIT_ASSERT_EQUAL(1.670, payload->getLatitude().get());
+ CPPUNIT_ASSERT_EQUAL(0.95, payload->getAccuracy().get());
CPPUNIT_ASSERT_EQUAL(std::string("Nice"), payload->getDescription().get());
CPPUNIT_ASSERT_EQUAL(std::string("+91"), payload->getCountryCode().get());
CPPUNIT_ASSERT_EQUAL(std::string("2015-06-11T20:55:50Z"), dateTimeToString(payload->getTimestamp().get()));
@@ -59,14 +59,14 @@ class UserLocationParserTest : public CppUnit::TestFixture
CPPUNIT_ASSERT_EQUAL(std::string("USA"), payload->getCountry().get());
CPPUNIT_ASSERT_EQUAL(std::string("NewSode"), payload->getRegion().get());
CPPUNIT_ASSERT_EQUAL(std::string("URIs"), payload->getURI().get());
- CPPUNIT_ASSERT_EQUAL(6.7578F, payload->getLongitude().get());
- CPPUNIT_ASSERT_EQUAL(5.66F, payload->getError().get());
+ CPPUNIT_ASSERT_EQUAL(6.7578, payload->getLongitude().get());
+ CPPUNIT_ASSERT_EQUAL(5.66, payload->getError().get());
CPPUNIT_ASSERT_EQUAL(std::string("67"), payload->getPostalCode().get());
- CPPUNIT_ASSERT_EQUAL(12.89F, payload->getBearing().get());
+ CPPUNIT_ASSERT_EQUAL(12.89, payload->getBearing().get());
CPPUNIT_ASSERT_EQUAL(std::string("Hello"), payload->getText().get());
CPPUNIT_ASSERT_EQUAL(std::string("Datee"), payload->getDatum().get());
CPPUNIT_ASSERT_EQUAL(std::string("Highway"), payload->getStreet().get());
- CPPUNIT_ASSERT_EQUAL(56.77F, payload->getSpeed().get());
+ CPPUNIT_ASSERT_EQUAL(56.77, payload->getSpeed().get());
}
void testParse_with_Some_variables() {
@@ -83,10 +83,10 @@ class UserLocationParserTest : public CppUnit::TestFixture
UserLocation* payload = dynamic_cast<UserLocation*>(parser.getPayload().get());
CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT_EQUAL(std::string("Barbaric"), payload->getArea().get());
- CPPUNIT_ASSERT_EQUAL(5.75F, payload->getAltitude().get());
+ CPPUNIT_ASSERT_EQUAL(5.75, payload->getAltitude().get());
CPPUNIT_ASSERT_EQUAL(std::string("Near"), payload->getLocality().get());
CPPUNIT_ASSERT(!payload->getLatitude());
- CPPUNIT_ASSERT_EQUAL(0.95F, payload->getAccuracy().get());
+ CPPUNIT_ASSERT_EQUAL(0.95, payload->getAccuracy().get());
CPPUNIT_ASSERT_EQUAL(std::string("Nice"), payload->getDescription().get());
CPPUNIT_ASSERT_EQUAL(std::string("+91"), payload->getCountryCode().get());
CPPUNIT_ASSERT_EQUAL(std::string("2015-06-11T20:55:50Z"), dateTimeToString(payload->getTimestamp().get()));
@@ -96,10 +96,10 @@ class UserLocationParserTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(!payload->getCountry());
CPPUNIT_ASSERT_EQUAL(std::string("NewSode"), payload->getRegion().get());
CPPUNIT_ASSERT_EQUAL(std::string("URIs"), payload->getURI().get());
- CPPUNIT_ASSERT_EQUAL(6.7578F, payload->getLongitude().get());
- CPPUNIT_ASSERT_EQUAL(5.66F, payload->getError().get());
+ CPPUNIT_ASSERT_EQUAL(6.7578, payload->getLongitude().get());
+ CPPUNIT_ASSERT_EQUAL(5.66, payload->getError().get());
CPPUNIT_ASSERT_EQUAL(std::string("67"), payload->getPostalCode().get());
- CPPUNIT_ASSERT_EQUAL(12.89F, payload->getBearing().get());
+ CPPUNIT_ASSERT_EQUAL(12.89, payload->getBearing().get());
CPPUNIT_ASSERT_EQUAL(std::string("Hello"), payload->getText().get());
CPPUNIT_ASSERT(!payload->getDatum());
CPPUNIT_ASSERT(!payload->getStreet());