diff options
Diffstat (limited to 'tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp')
-rw-r--r-- | tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp index 3f9632c..2e21087 100644 --- a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp +++ b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp @@ -66,6 +66,7 @@ private slots: void setHeader(); void rawHeaderParsing_data(); void rawHeaderParsing(); + void originatingObject(); void removeHeader(); }; @@ -476,5 +477,20 @@ void tst_QNetworkRequest::removeHeader() QVERIFY(request.hasRawHeader("bar")); } +void tst_QNetworkRequest::originatingObject() +{ + QNetworkRequest request; + + QVERIFY(!request.originatingObject()); + + { + QObject dummy; + request.setOriginatingObject(&dummy); + QCOMPARE(request.originatingObject(), &dummy); + } + + QVERIFY(!request.originatingObject()); +} + QTEST_MAIN(tst_QNetworkRequest) #include "tst_qnetworkrequest.moc" |