summaryrefslogtreecommitdiff
path: root/test/storage/http_timeout.cpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2015-11-25 13:30:32 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2015-11-27 17:47:02 +0200
commit31fd2822f516337f084f85db7e369d0633113b73 (patch)
tree9ad07f1bc0b3924f225ecfc628955bbd683e1d99 /test/storage/http_timeout.cpp
parent4475f5486000bab8f1121f5cec6091bc04f165f1 (diff)
downloadqtlocation-mapboxgl-31fd2822f516337f084f85db7e369d0633113b73.tar.gz
[core] Replace time_t with std::chrono::seconds
Added aliases for std::chrono typedefs (eg. 'Seconds' for std::chrono::seconds). These aliases are used together with templated helper functions to replace time_t with std::chrono::seconds for most cases, in particular for 'modified' and 'expires' values in Response.
Diffstat (limited to 'test/storage/http_timeout.cpp')
-rw-r--r--test/storage/http_timeout.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/storage/http_timeout.cpp b/test/storage/http_timeout.cpp
index 2c1a1f1f60..92c6fe4919 100644
--- a/test/storage/http_timeout.cpp
+++ b/test/storage/http_timeout.cpp
@@ -4,9 +4,9 @@
#include <mbgl/storage/default_file_source.hpp>
#include <mbgl/storage/network_status.hpp>
+#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
-
TEST_F(Storage, HTTPTimeout) {
SCOPED_TEST(HTTPTimeout)
@@ -24,8 +24,8 @@ TEST_F(Storage, HTTPTimeout) {
EXPECT_EQ(false, res.stale);
ASSERT_TRUE(res.data.get());
EXPECT_EQ("Hello World!", *res.data);
- EXPECT_LT(0, res.expires);
- EXPECT_EQ(0, res.modified);
+ EXPECT_LT(Seconds::zero(), res.expires);
+ EXPECT_EQ(Seconds::zero(), res.modified);
EXPECT_EQ("", res.etag);
if (counter == 4) {
req.reset();