summaryrefslogtreecommitdiff
path: root/test/sprite
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-02-04 10:59:36 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-02-04 13:18:14 -0800
commit19aa090bdcff083c039c0767908c9608ad853403 (patch)
tree8eee0222ccca67bf5f2968bb04fc6a7c2bb14616 /test/sprite
parentd7db9c775abafd852c3b935045443387191bf823 (diff)
downloadqtlocation-mapboxgl-19aa090bdcff083c039c0767908c9608ad853403.tar.gz
[tests] Don't call the callback for cancelled responses
StubFileSource gets an optional Response return type. Returning null means "cancelled; don't call the callback". Fixes #3784
Diffstat (limited to 'test/sprite')
-rw-r--r--test/sprite/sprite_store.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sprite/sprite_store.cpp b/test/sprite/sprite_store.cpp
index 08977eac4f..ee6ea2e9e0 100644
--- a/test/sprite/sprite_store.cpp
+++ b/test/sprite/sprite_store.cpp
@@ -299,7 +299,7 @@ TEST(SpriteStore, LoadingCancel) {
test.fileSource.spriteImageResponse =
test.fileSource.spriteJSONResponse = [&] (const Resource&) {
test.end();
- return Response();
+ return optional<Response>();
};
test.observer.spriteLoaded = [&] () {