summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-19 01:00:40 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-19 01:00:41 +0200
commit8f0790dd90f3fcaefa1a74ca1ce9bce84064eb10 (patch)
treeabc028924edde03ed173c2ba16e25daca38d7acd /tests/auto
parent82aabafadad2010f0f20abeeb7234057e3c10e9f (diff)
parent69ef6e821287d324459336dd1292d19d272386b8 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/tools/qvector/tst_qvector.cpp11
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp7
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
index 3256130472..05b5579d64 100644
--- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp
+++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
@@ -253,6 +253,7 @@ private slots:
void fillInt() const;
void fillMovable() const;
void fillCustom() const;
+ void fillDetaches() const;
void first() const;
void fromListInt() const;
void fromListMovable() const;
@@ -1310,6 +1311,16 @@ void tst_QVector::fillCustom() const
QCOMPARE(instancesCount, Custom::counter.loadAcquire());
}
+void tst_QVector::fillDetaches() const
+{
+ QVector<int> test = { 1, 2, 3 };
+ QVector<int> copy = test;
+ copy.fill(42);
+
+ QCOMPARE(test, QVector<int>({1, 2, 3}));
+ QCOMPARE(copy, QVector<int>({42, 42, 42}));
+}
+
void tst_QVector::first() const
{
QVector<int> myvec;
diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp
index e24370fc87..95fee23fe3 100644
--- a/tests/auto/network/access/http2/tst_http2.cpp
+++ b/tests/auto/network/access/http2/tst_http2.cpp
@@ -71,6 +71,8 @@ class tst_Http2 : public QObject
public:
tst_Http2();
~tst_Http2();
+public slots:
+ void init();
private slots:
// Tests:
void singleRequest_data();
@@ -174,6 +176,11 @@ tst_Http2::~tst_Http2()
}
}
+void tst_Http2::init()
+{
+ manager.clearConnectionCache();
+}
+
void tst_Http2::singleRequest_data()
{
QTest::addColumn<QNetworkRequest::Attribute>("h2Attribute");