summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-10-09 16:23:12 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-10-09 23:46:11 +0300
commitf62e5b00c98b50e9d9a1e76f4ae5e70129e83ff4 (patch)
treed5c639664127f009ff3d720be518f6bd157d7e4b /test
parentda490c2b90125bf82fc84b1782a795e48ab5a548 (diff)
downloadqtlocation-mapboxgl-f62e5b00c98b50e9d9a1e76f4ae5e70129e83ff4.tar.gz
[core] Introduce Scheduler::makeWeakPtr()
Diffstat (limited to 'test')
-rw-r--r--test/actor/actor.test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/actor/actor.test.cpp b/test/actor/actor.test.cpp
index 4b152f471a..c2a41fe787 100644
--- a/test/actor/actor.test.cpp
+++ b/test/actor/actor.test.cpp
@@ -90,6 +90,7 @@ TEST(Actor, DestructionBlocksOnSend) {
std::promise<void> promise;
std::future<void> future;
std::atomic<bool> waited;
+ mapbox::base::WeakPtrFactory<Scheduler> weakFactory{this};
TestScheduler(std::promise<void> promise_, std::future<void> future_)
: promise(std::move(promise_)),
@@ -107,6 +108,7 @@ TEST(Actor, DestructionBlocksOnSend) {
std::this_thread::sleep_for(1ms);
waited = true;
}
+ mapbox::base::WeakPtr<Scheduler> makeWeakPtr() override { return weakFactory.makeWeakPtr(); }
};
struct Test {