diff options
Diffstat (limited to 'tests/auto/network/access/qhttpnetworkreply')
-rw-r--r-- | tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt b/tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt index 2be2d677ae..b4e4a822ee 100644 --- a/tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt +++ b/tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt @@ -1,7 +1,11 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -# Generated from qhttpnetworkreply.pro. +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qhttpnetworkreply LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() if(NOT QT_FEATURE_private_tests) return() @@ -18,6 +22,3 @@ qt_internal_add_test(tst_qhttpnetworkreply Qt::CorePrivate Qt::NetworkPrivate ) - -#### Keys ignored in scope 1:.:.:qhttpnetworkreply.pro:<TRUE>: -# _REQUIREMENTS = "qtConfig(private_tests)" diff --git a/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp b/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp index e36acc81da..e83d15fdc3 100644 --- a/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp +++ b/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2022 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> @@ -77,7 +77,7 @@ void tst_QHttpNetworkReply::parseHeader() QHttpNetworkReply reply; reply.parseHeader(headers); - for (int i = 0; i < fields.count(); ++i) { + for (int i = 0; i < fields.size(); ++i) { //qDebug() << "field" << fields.at(i) << "value" << reply.headerField(fields.at(i)) << "expected" << values.at(i); QString field = reply.headerField(fields.at(i).toLatin1()); QCOMPARE(field, values.at(i)); |