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/Serializer/PayloadSerializers/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/Serializer/PayloadSerializers/UnitTest')
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp
index 4c2121f..1a3adb9 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp
@@ -33,10 +33,10 @@ class UserLocationSerializerTest : public CppUnit::TestFixture {
UserLocationSerializer testling(&serializers);
std::shared_ptr<UserLocation> userLocation(new UserLocation());
userLocation->setArea(boost::optional<std::string>("Barbaric"));
- userLocation->setAltitude(5.75F);
+ userLocation->setAltitude(5.75);
userLocation->setLocality(boost::optional<std::string>("Near"));
- userLocation->setLatitude(boost::optional<float>(5.75F));
- userLocation->setAccuracy(5.75F);
+ userLocation->setLatitude(boost::optional<double>(5.75));
+ userLocation->setAccuracy(5.75);
userLocation->setDescription(boost::optional<std::string>("Nice"));
userLocation->setCountryCode(boost::optional<std::string>("+91"));
userLocation->setTimestamp(stringToDateTime("2015-06-11T20:55:50Z"));
@@ -46,14 +46,14 @@ class UserLocationSerializerTest : public CppUnit::TestFixture {
userLocation->setCountry(boost::optional<std::string>("USA"));
userLocation->setRegion(boost::optional<std::string>("NewSode"));
userLocation->setURI(boost::optional<std::string>("URIs"));
- userLocation->setLongitude(5.75F);
- userLocation->setError(5.75F);
+ userLocation->setLongitude(5.75);
+ userLocation->setError(5.75);
userLocation->setPostalCode(boost::optional<std::string>("67"));
- userLocation->setBearing(5.75F);
+ userLocation->setBearing(5.75);
userLocation->setText(boost::optional<std::string>("Hello"));
userLocation->setDatum(boost::optional<std::string>("Datee"));
userLocation->setStreet(boost::optional<std::string>("Highway"));
- userLocation->setSpeed(5.75F);
+ userLocation->setSpeed(5.75);
std::string expectedResult =
"<geoloc xmlns=\"http://jabber.org/protocol/geoloc\">"
@@ -72,19 +72,19 @@ class UserLocationSerializerTest : public CppUnit::TestFixture {
UserLocationSerializer testling(&serializers);
std::shared_ptr<UserLocation> userLocation(new UserLocation());
userLocation->setArea(boost::optional<std::string>("Barbaric"));
- userLocation->setAltitude(5.75F);
+ userLocation->setAltitude(5.75);
userLocation->setLocality(boost::optional<std::string>("Near"));
- userLocation->setAccuracy(5.75F);
+ userLocation->setAccuracy(5.75);
userLocation->setDescription(boost::optional<std::string>("Nice"));
userLocation->setCountryCode(boost::optional<std::string>("+91"));
userLocation->setTimestamp(stringToDateTime("2015-06-11T20:55:50Z"));
userLocation->setFloor(boost::optional<std::string>("3"));
userLocation->setRegion(boost::optional<std::string>("NewSode"));
userLocation->setURI(boost::optional<std::string>("URIs"));
- userLocation->setLongitude(5.75F);
- userLocation->setError(5.75F);
+ userLocation->setLongitude(5.75);
+ userLocation->setError(5.75);
userLocation->setPostalCode(boost::optional<std::string>("67"));
- userLocation->setBearing(5.75F);
+ userLocation->setBearing(5.75);
userLocation->setText(boost::optional<std::string>("Hello"));
std::string expectedResult =