summaryrefslogtreecommitdiff
path: root/test/storage/http_other_loop.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-11-12 15:51:45 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-11-16 12:25:47 -0800
commit7137239cbddb13e1c33240d13002973b5a222775 (patch)
tree99ad3ca2d8b5230eba3f5bacefe63098568dbdd4 /test/storage/http_other_loop.cpp
parent1caf89c32b80dc300b1fd349a2ece4557890c727 (diff)
downloadqtlocation-mapboxgl-7137239cbddb13e1c33240d13002973b5a222775.tar.gz
[core] Use std::unique_ptr for FileSource request
Diffstat (limited to 'test/storage/http_other_loop.cpp')
-rw-r--r--test/storage/http_other_loop.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/storage/http_other_loop.cpp b/test/storage/http_other_loop.cpp
index 52475ae1a4..b432c39ac2 100644
--- a/test/storage/http_other_loop.cpp
+++ b/test/storage/http_other_loop.cpp
@@ -14,9 +14,9 @@ TEST_F(Storage, HTTPOtherLoop) {
DefaultFileSource fs(nullptr);
util::RunLoop loop(uv_default_loop());
- Request* req = fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" },
+ std::unique_ptr<FileRequest> req = fs.request({ Resource::Unknown, "http://127.0.0.1:3000/test" },
[&](Response res) {
- fs.cancel(req);
+ req.reset();
EXPECT_EQ(nullptr, res.error);
EXPECT_EQ(false, res.stale);
ASSERT_TRUE(res.data.get());