diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-08-20 15:52:58 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-08-20 15:54:13 +0300 |
commit | bcca5d3ac57f17b8d4d34ca8c9172788c8da3dfd (patch) | |
tree | d6c066f337e04d651f42c84619edbc0152ab9340 /test/storage/offline_database.test.cpp | |
parent | c42b44197ffa012810c50dfa658cf979b08244d4 (diff) | |
download | qtlocation-mapboxgl-upstream/tmpsantos-chrono_overflow.tar.gz |
[core] Remove wrapper for std::chrono::system_clock::now()upstream/tmpsantos-chrono_overflow
Better make it explict now that we no longer cast to time_point<Seconds>
Diffstat (limited to 'test/storage/offline_database.test.cpp')
-rw-r--r-- | test/storage/offline_database.test.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/storage/offline_database.test.cpp b/test/storage/offline_database.test.cpp index 3f6db527d4..a273ddbfd6 100644 --- a/test/storage/offline_database.test.cpp +++ b/test/storage/offline_database.test.cpp @@ -805,7 +805,7 @@ TEST(OfflineDatabase, Invalidate) { Response response; response.noContent = true; response.mustRevalidate = false; - response.expires = util::now() + 1h; + response.expires = std::chrono::system_clock::now() + 1h; const Resource ambientTile = Resource::tile("mapbox://tile_ambient", 1, 0, 0, 0, Tileset::Scheme::XYZ); db.put(ambientTile, response); @@ -861,12 +861,12 @@ TEST(OfflineDatabase, Invalidate) { EXPECT_TRUE(db.get(region2Style)->isUsable()); // Sanity check. - EXPECT_TRUE(db.get(ambientTile)->expires < util::now()); - EXPECT_TRUE(db.get(ambientStyle)->expires < util::now()); - EXPECT_TRUE(db.get(region1Tile)->expires < util::now()); - EXPECT_TRUE(db.get(region1Style)->expires < util::now()); - EXPECT_TRUE(db.get(region2Tile)->expires > util::now()); - EXPECT_TRUE(db.get(region2Style)->expires > util::now()); + EXPECT_TRUE(db.get(ambientTile)->expires < std::chrono::system_clock::now()); + EXPECT_TRUE(db.get(ambientStyle)->expires < std::chrono::system_clock::now()); + EXPECT_TRUE(db.get(region1Tile)->expires < std::chrono::system_clock::now()); + EXPECT_TRUE(db.get(region1Style)->expires < std::chrono::system_clock::now()); + EXPECT_TRUE(db.get(region2Tile)->expires > std::chrono::system_clock::now()); + EXPECT_TRUE(db.get(region2Style)->expires > std::chrono::system_clock::now()); EXPECT_TRUE(db.get(ambientTile)->mustRevalidate); EXPECT_TRUE(db.get(ambientStyle)->mustRevalidate); |