diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-12 17:12:19 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-16 12:25:47 -0800 |
commit | 1caf89c32b80dc300b1fd349a2ece4557890c727 (patch) | |
tree | 21d66457063e8bcbf44b7604299dec7a6ac90f7f /test/storage/file_reading.cpp | |
parent | 36581f3d3015d525db92248004e9dc7477705694 (diff) | |
download | qtlocation-mapboxgl-1caf89c32b80dc300b1fd349a2ece4557890c727.tar.gz |
[core] Pass a value to response callback, not a reference
Diffstat (limited to 'test/storage/file_reading.cpp')
-rw-r--r-- | test/storage/file_reading.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/storage/file_reading.cpp b/test/storage/file_reading.cpp index 9e9d5b21a6..b9155c09c5 100644 --- a/test/storage/file_reading.cpp +++ b/test/storage/file_reading.cpp @@ -19,8 +19,7 @@ TEST_F(Storage, AssetEmptyFile) { util::RunLoop loop(uv_default_loop()); - Request* req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage/empty" }, - [&](const Response &res) { + Request* req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage/empty" }, [&](Response res) { fs.cancel(req); EXPECT_EQ(nullptr, res.error); EXPECT_EQ(false, res.stale); @@ -49,8 +48,7 @@ TEST_F(Storage, AssetNonEmptyFile) { util::RunLoop loop(uv_default_loop()); - Request* req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage/nonempty" }, - [&](const Response &res) { + Request* req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage/nonempty" }, [&](Response res) { fs.cancel(req); EXPECT_EQ(nullptr, res.error); EXPECT_EQ(false, res.stale); @@ -81,8 +79,7 @@ TEST_F(Storage, AssetNonExistentFile) { util::RunLoop loop(uv_default_loop()); - Request* req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage/does_not_exist" }, - [&](const Response &res) { + Request* req = fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage/does_not_exist" }, [&](Response res) { fs.cancel(req); ASSERT_NE(nullptr, res.error); EXPECT_EQ(Response::Error::Reason::NotFound, res.error->reason); |