diff options
Diffstat (limited to 'tests/benchmarks/network/access/qdecompresshelper')
-rw-r--r-- | tests/benchmarks/network/access/qdecompresshelper/CMakeLists.txt | 11 | ||||
-rw-r--r-- | tests/benchmarks/network/access/qdecompresshelper/main.cpp | 5 |
2 files changed, 7 insertions, 9 deletions
diff --git a/tests/benchmarks/network/access/qdecompresshelper/CMakeLists.txt b/tests/benchmarks/network/access/qdecompresshelper/CMakeLists.txt index 92a729d373..d2ca8db69d 100644 --- a/tests/benchmarks/network/access/qdecompresshelper/CMakeLists.txt +++ b/tests/benchmarks/network/access/qdecompresshelper/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from qdecompresshelper.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## qdecompresshelper Binary: @@ -8,12 +9,8 @@ qt_internal_add_benchmark(qdecompresshelper SOURCES main.cpp DEFINES - SRC_DIR=${CMAKE_CURRENT_SOURCE_DIR} # special case - PUBLIC_LIBRARIES + SRC_DIR=${CMAKE_CURRENT_SOURCE_DIR} + LIBRARIES Qt::NetworkPrivate Qt::Test ) - -#### Keys ignored in scope 1:.:.:decompresshelper.pro:<TRUE>: -# TEMPLATE = "app" -# _REQUIREMENTS = "qtConfig(private_tests)" diff --git a/tests/benchmarks/network/access/qdecompresshelper/main.cpp b/tests/benchmarks/network/access/qdecompresshelper/main.cpp index ea85aef42b..7f8b09ef0e 100644 --- a/tests/benchmarks/network/access/qdecompresshelper/main.cpp +++ b/tests/benchmarks/network/access/qdecompresshelper/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 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 <QtNetwork/private/qdecompresshelper_p.h> @@ -51,13 +51,14 @@ void tst_QDecompressHelper::decompress() file.seek(0); QDecompressHelper helper; helper.setEncoding(encoding); + helper.setDecompressedSafetyCheckThreshold(-1); QVERIFY(helper.isValid()); helper.feed(file.readAll()); qsizetype bytes = 0; + QByteArray out(64 * 1024, Qt::Uninitialized); while (helper.hasData()) { - QByteArray out(64 * 1024, Qt::Uninitialized); qsizetype bytesRead = helper.read(out.data(), out.size()); bytes += bytesRead; } |