diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-12 15:51:45 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-16 12:25:47 -0800 |
commit | 7137239cbddb13e1c33240d13002973b5a222775 (patch) | |
tree | 99ad3ca2d8b5230eba3f5bacefe63098568dbdd4 /test/storage/http_other_loop.cpp | |
parent | 1caf89c32b80dc300b1fd349a2ece4557890c727 (diff) | |
download | qtlocation-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.cpp | 4 |
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()); |