diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-19 15:57:17 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-21 11:22:11 -0800 |
commit | 1c21d0fd4cd30cbf6c5b863fd0179b227c28bc0b (patch) | |
tree | dfb6b788285d2b28f7060138ae28734ece13942e /test/storage/http_header_parsing.cpp | |
parent | c33ed50c98c57ce2f2cf3b971bcf72c4208bf120 (diff) | |
download | qtlocation-mapboxgl-1c21d0fd4cd30cbf6c5b863fd0179b227c28bc0b.tar.gz |
[core] Use better types for modified / expires / etag
Diffstat (limited to 'test/storage/http_header_parsing.cpp')
-rw-r--r-- | test/storage/http_header_parsing.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/storage/http_header_parsing.cpp b/test/storage/http_header_parsing.cpp index 14bd99bdb3..827aa70abc 100644 --- a/test/storage/http_header_parsing.cpp +++ b/test/storage/http_header_parsing.cpp @@ -21,9 +21,9 @@ TEST_F(Storage, HTTPExpiresParsing) { EXPECT_EQ(nullptr, res.error); ASSERT_TRUE(res.data.get()); EXPECT_EQ("Hello World!", *res.data); - EXPECT_EQ(1420797926, res.expires.count()); - EXPECT_EQ(1420794326, res.modified.count()); - EXPECT_EQ("foo", res.etag); + EXPECT_EQ(SystemClock::from_time_t(1420797926), res.expires); + EXPECT_EQ(SystemClock::from_time_t(1420794326), res.modified); + EXPECT_EQ("foo", *res.etag); loop.stop(); HTTPExpiresTest.finish(); }); @@ -47,9 +47,9 @@ TEST_F(Storage, HTTPCacheControlParsing) { EXPECT_EQ(nullptr, res.error); ASSERT_TRUE(res.data.get()); EXPECT_EQ("Hello World!", *res.data); - EXPECT_GT(2, std::abs(res.expires.count() - now.count() - 120)) << "Expiration date isn't about 120 seconds in the future"; - EXPECT_EQ(Seconds::zero(), res.modified); - EXPECT_EQ("", res.etag); + EXPECT_GT(2, std::abs(toSeconds(*res.expires).count() - now.count() - 120)) << "Expiration date isn't about 120 seconds in the future"; + EXPECT_FALSE(bool(res.modified)); + EXPECT_FALSE(bool(res.etag)); loop.stop(); HTTPCacheControlTest.finish(); }); |