diff options
Diffstat (limited to 'tests/benchmarks/corelib')
-rw-r--r-- | tests/benchmarks/corelib/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/benchmarks/corelib/codecs/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/benchmarks/corelib/codecs/codecs.pro | 3 | ||||
-rw-r--r-- | tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt | 15 | ||||
-rw-r--r-- | tests/benchmarks/corelib/codecs/qtextcodec/main.cpp | 169 | ||||
-rw-r--r-- | tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro | 7 | ||||
-rw-r--r-- | tests/benchmarks/corelib/codecs/qtextcodec/utf-8.txt | 72 | ||||
-rw-r--r-- | tests/benchmarks/corelib/corelib.pro | 1 | ||||
-rw-r--r-- | tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt | 53 | ||||
-rw-r--r-- | tests/benchmarks/corelib/tools/qhash/paths_small_data.txt | 12 |
10 files changed, 0 insertions, 336 deletions
diff --git a/tests/benchmarks/corelib/CMakeLists.txt b/tests/benchmarks/corelib/CMakeLists.txt index 3414c39ef8..a84f317928 100644 --- a/tests/benchmarks/corelib/CMakeLists.txt +++ b/tests/benchmarks/corelib/CMakeLists.txt @@ -8,5 +8,4 @@ add_subdirectory(text) add_subdirectory(thread) add_subdirectory(time) add_subdirectory(tools) -add_subdirectory(codecs) add_subdirectory(plugin) diff --git a/tests/benchmarks/corelib/codecs/CMakeLists.txt b/tests/benchmarks/corelib/codecs/CMakeLists.txt deleted file mode 100644 index 56f8edcc9e..0000000000 --- a/tests/benchmarks/corelib/codecs/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Generated from codecs.pro. - -add_subdirectory(qtextcodec) diff --git a/tests/benchmarks/corelib/codecs/codecs.pro b/tests/benchmarks/corelib/codecs/codecs.pro deleted file mode 100644 index dab324b859..0000000000 --- a/tests/benchmarks/corelib/codecs/codecs.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = qtextcodec - diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt b/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt deleted file mode 100644 index ea6ed8519b..0000000000 --- a/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Generated from qtextcodec.pro. - -##################################################################### -## tst_bench_qtextcodec Binary: -##################################################################### - -add_qt_benchmark(tst_bench_qtextcodec - SOURCES - main.cpp - PUBLIC_LIBRARIES - Qt::Test -) - -#### Keys ignored in scope 1:.:.:qtextcodec.pro:<TRUE>: -# TESTDATA = "utf-8.txt" diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp b/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp deleted file mode 100644 index af43215c99..0000000000 --- a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include <QTextCodec> -#include <QFile> -#include <qtest.h> - -Q_DECLARE_METATYPE(QTextCodec *) - -class tst_QTextCodec: public QObject -{ - Q_OBJECT -private slots: - void codecForName() const; - void codecForName_data() const; - void codecForMib() const; - void fromUnicode_data() const; - void fromUnicode() const; - void toUnicode_data() const; - void toUnicode() const; -}; - -void tst_QTextCodec::codecForName() const -{ - QFETCH(QList<QByteArray>, codecs); - - QBENCHMARK { - foreach(const QByteArray& c, codecs) { - QVERIFY(QTextCodec::codecForName(c)); - QVERIFY(QTextCodec::codecForName(c + '-')); - } - foreach(const QByteArray& c, codecs) { - QVERIFY(QTextCodec::codecForName(c + '+')); - QVERIFY(QTextCodec::codecForName(c + '*')); - } - } -} - -void tst_QTextCodec::codecForName_data() const -{ - QTest::addColumn<QList<QByteArray> >("codecs"); - - QTest::newRow("all") << QTextCodec::availableCodecs(); - QTest::newRow("many utf-8") << (QList<QByteArray>() - << "utf-8" << "utf-8" << "utf-8" << "utf-8" << "utf-8" - << "utf-8" << "utf-8" << "utf-8" << "utf-8" << "utf-8" - << "utf-8" << "utf-8" << "utf-8" << "utf-8" << "utf-8" - << "utf-8" << "utf-8" << "utf-8" << "utf-8" << "utf-8" - << "utf-8" << "utf-8" << "utf-8" << "utf-8" << "utf-8" - << "utf-8" << "utf-8" << "utf-8" << "utf-8" << "utf-8" - << "utf-8" << "utf-8" << "utf-8" << "utf-8" << "utf-8" - << "utf-8" << "utf-8" << "utf-8" << "utf-8" << "utf-8" - << "utf-8" << "utf-8" << "utf-8" << "utf-8" << "utf-8" ); -} - -void tst_QTextCodec::codecForMib() const -{ - QBENCHMARK { - QTextCodec::codecForMib(106); - QTextCodec::codecForMib(111); - QTextCodec::codecForMib(106); - QTextCodec::codecForMib(2254); - QTextCodec::codecForMib(2255); - QTextCodec::codecForMib(2256); - QTextCodec::codecForMib(2257); - QTextCodec::codecForMib(2258); - QTextCodec::codecForMib(111); - QTextCodec::codecForMib(2250); - QTextCodec::codecForMib(2251); - QTextCodec::codecForMib(2252); - QTextCodec::codecForMib(106); - QTextCodec::codecForMib(106); - QTextCodec::codecForMib(106); - QTextCodec::codecForMib(106); - } -} - -void tst_QTextCodec::fromUnicode_data() const -{ - QTest::addColumn<QTextCodec*>("codec"); - - QTest::newRow("utf-8") << QTextCodec::codecForName("utf-8"); - QTest::newRow("latin 1") << QTextCodec::codecForName("latin 1"); - QTest::newRow("utf-16") << QTextCodec::codecForName("utf16"); ; - QTest::newRow("utf-32") << QTextCodec::codecForName("utf32"); - QTest::newRow("latin15") << QTextCodec::codecForName("iso-8859-15"); - QTest::newRow("eucKr") << QTextCodec::codecForName("eucKr"); -} - - -void tst_QTextCodec::fromUnicode() const -{ - QFETCH(QTextCodec*, codec); - QString testFile = QFINDTESTDATA("utf-8.txt"); - QVERIFY2(!testFile.isEmpty(), "cannot find test file utf-8.txt!"); - QFile file(testFile); - if (!file.open(QFile::ReadOnly)) { - qFatal("Cannot open input file"); - return; - } - QByteArray data = file.readAll(); - const char *d = data.constData(); - int size = data.size(); - QString s = QString::fromUtf8(d, size); - s = s + s + s; - s = s + s + s; - QBENCHMARK { - for (int i = 0; i < 10; i ++) - codec->fromUnicode(s); - } -} - - -void tst_QTextCodec::toUnicode_data() const -{ - fromUnicode_data(); -} - - -void tst_QTextCodec::toUnicode() const -{ - QFETCH(QTextCodec*, codec); - QString testFile = QFINDTESTDATA("utf-8.txt"); - QVERIFY2(!testFile.isEmpty(), "cannot find test file utf-8.txt!"); - QFile file(testFile); - QVERIFY(file.open(QFile::ReadOnly)); - QByteArray data = file.readAll(); - const char *d = data.constData(); - int size = data.size(); - QString s = QString::fromUtf8(d, size); - s = s + s + s; - s = s + s + s; - QByteArray orig = codec->fromUnicode(s); - QBENCHMARK { - for (int i = 0; i < 10; i ++) - codec->toUnicode(orig); - } -} - - - - -QTEST_MAIN(tst_QTextCodec) - -#include "main.moc" diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro b/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro deleted file mode 100644 index 7d29c6bfdd..0000000000 --- a/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG += benchmark -QT = core testlib - -TARGET = tst_bench_qtextcodec -SOURCES += main.cpp - -TESTDATA = utf-8.txt diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/utf-8.txt b/tests/benchmarks/corelib/codecs/qtextcodec/utf-8.txt deleted file mode 100644 index a8a58defe9..0000000000 --- a/tests/benchmarks/corelib/codecs/qtextcodec/utf-8.txt +++ /dev/null @@ -1,72 +0,0 @@ -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français -Språk: Norsk -Γλώσσα: Ελληνικά -Язык: Русский -언어 : 한국어 -言語: 日本語 -Langage : Français diff --git a/tests/benchmarks/corelib/corelib.pro b/tests/benchmarks/corelib/corelib.pro index 010abd7751..3c11e43ef5 100644 --- a/tests/benchmarks/corelib/corelib.pro +++ b/tests/benchmarks/corelib/corelib.pro @@ -8,7 +8,6 @@ SUBDIRS = \ thread \ time \ tools \ - codecs \ plugin TRUSTED_BENCHMARKS += \ diff --git a/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt b/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt index 707a597361..ee5f7eabc1 100644 --- a/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt +++ b/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt @@ -7805,28 +7805,6 @@ 2 x86_64/ 0 arch.pri qatomic_sun.s -3 codecs/ -0 codecs.pri - codecs.qdoc - qfontlaocodec.cpp - qfontlaocodec_p.h - qiconvcodec.cpp - qiconvcodec_p.h - qisciicodec.cpp - qisciicodec_p.h - qlatincodec.cpp - qlatincodec_p.h - qsimplecodec.cpp - qsimplecodec_p.h - qtextcodec.cpp - qtextcodec.h - qtextcodec_p.h - qtextcodecplugin.cpp - qtextcodecplugin.h - qtsciicodec.cpp - qtsciicodec_p.h - qutfcodec.cpp - qutfcodec_p.h 2 concurrent/ 0 concurrent.pri qfuture.cpp @@ -10021,37 +9999,6 @@ widgets.pro 3 audio/ 0 audio.pro -2 codecs/ -0 cn/ -0 cn.pro - main.cpp - qgb18030codec.cpp - qgb18030codec.h -2 codecs.pro - jp/ -0 jp.pro - main.cpp - qeucjpcodec.cpp - qeucjpcodec.h - qfontjpcodec.cpp - qfontjpcodec.h - qjiscodec.cpp - qjiscodec.h - qjpunicode.cpp - qjpunicode.h - qsjiscodec.cpp - qsjiscodec.h -2 kr/ -0 cp949codetbl.h - kr.pro - main.cpp - qeuckrcodec.cpp - qeuckrcodec.h -2 tw/ -0 main.cpp - qbig5codec.cpp - qbig5codec.h - tw.pro 3 decorations/ 0 decorations.pro default/ diff --git a/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt b/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt index 662285296f..cddf3011d2 100644 --- a/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt +++ b/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt @@ -33,18 +33,6 @@ ./kernel/qmetatype/qmetatype.pro ./kernel/qmetatype/Makefile ./kernel/qmetatype/tst_qmetatype.cpp -./codecs -./codecs/qtextcodec -./codecs/qtextcodec/qtextcodec.pro -./codecs/qtextcodec/main.cpp -./codecs/qtextcodec/Makefile -./codecs/qtextcodec/utf-8.txt -./codecs/codecs.pro -./codecs/.pch -./codecs/.pch/debug-shared -./codecs/Makefile -./codecs/.obj -./codecs/.obj/debug-shared ./.pch ./.pch/debug-shared ./text |