summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/thread/qfuture/tst_qfuture.cpp')
-rw-r--r--tests/auto/corelib/thread/qfuture/tst_qfuture.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
index eff07ce309..8eadaee62a 100644
--- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
+++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
@@ -163,6 +163,8 @@ private slots:
void createReadyFutures();
+ void getFutureInterface();
+
private:
using size_type = std::vector<int>::size_type;
@@ -3521,5 +3523,14 @@ void tst_QFuture::createReadyFutures()
#endif
}
+void tst_QFuture::getFutureInterface()
+{
+ const int val = 42;
+ QFuture<int> f = QtFuture::makeReadyFuture(val);
+
+ auto interface = QFutureInterfaceBase::get(f);
+ QCOMPARE(interface.resultCount(), 1);
+}
+
QTEST_MAIN(tst_QFuture)
#include "tst_qfuture.moc"