diff options
Diffstat (limited to 'tests/benchmarks/corelib')
54 files changed, 470 insertions, 165 deletions
diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp b/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp index 1499eccd50..f75848556c 100644 --- a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp +++ b/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/corelib.pro b/tests/benchmarks/corelib/corelib.pro index a2efe91a61..da5247cc42 100644 --- a/tests/benchmarks/corelib/corelib.pro +++ b/tests/benchmarks/corelib/corelib.pro @@ -1,6 +1,7 @@ TEMPLATE = subdirs SUBDIRS = \ io \ + json \ kernel \ thread \ tools \ @@ -14,4 +15,4 @@ TRUSTED_BENCHMARKS += \ thread/qthreadstorage \ io/qdir/tree -include(../trusted-benchmarks.pri)
\ No newline at end of file +include(../trusted-benchmarks.pri) diff --git a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp index 8f11dc792e..2de98eff0b 100644 --- a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp +++ b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp b/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp index 9d7d60ebe0..e93182d73c 100644 --- a/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp +++ b/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp index 4e4b9cbf0b..758f390ec3 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp +++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp index 584eb32021..7b22f50d3c 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp +++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h index bef8115287..1322c5d1c6 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h +++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -48,7 +48,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Core) class QFileSystemIteratorPrivate; class //Q_CORE_EXPORT diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp index d291e3f412..92edd43060 100644 --- a/tests/benchmarks/corelib/io/qfile/main.cpp +++ b/tests/benchmarks/corelib/io/qfile/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp index 479737a353..58a843f663 100644 --- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp +++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/io/qiodevice/main.cpp b/tests/benchmarks/corelib/io/qiodevice/main.cpp index e4244a71ef..a1a008b937 100644 --- a/tests/benchmarks/corelib/io/qiodevice/main.cpp +++ b/tests/benchmarks/corelib/io/qiodevice/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp index c0f16068d7..0bbe223912 100644 --- a/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp +++ b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/io/qurl/main.cpp b/tests/benchmarks/corelib/io/qurl/main.cpp index c92c841cc8..dc236e7120 100644 --- a/tests/benchmarks/corelib/io/qurl/main.cpp +++ b/tests/benchmarks/corelib/io/qurl/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/json/json.pro b/tests/benchmarks/corelib/json/json.pro new file mode 100644 index 0000000000..1694d61d94 --- /dev/null +++ b/tests/benchmarks/corelib/json/json.pro @@ -0,0 +1,5 @@ +TARGET = tst_bench_qtbinaryjson +QT = core testlib +CONFIG -= app_bundle + +SOURCES += tst_bench_qtbinaryjson.cpp diff --git a/tests/benchmarks/corelib/json/numbers.json b/tests/benchmarks/corelib/json/numbers.json new file mode 100644 index 0000000000..469156a78a --- /dev/null +++ b/tests/benchmarks/corelib/json/numbers.json @@ -0,0 +1,19 @@ +[ + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1 + }, + [ + -1234567890, + -1234567890, + -1234567890, + 1234567890, + 1234567890, + 1234567890 + ] +] diff --git a/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp b/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp new file mode 100644 index 0000000000..8f3e2cc8c6 --- /dev/null +++ b/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp @@ -0,0 +1,126 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest> +#include <qjsondocument.h> +#include <qjsonobject.h> + +class BenchmarkQtBinaryJson: public QObject +{ + Q_OBJECT +public: + BenchmarkQtBinaryJson(QObject *parent = 0); + +private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + void init(); + void cleanup(); + + void parseNumbers(); + void parseJson(); + void parseJsonToVariant(); +}; + +BenchmarkQtBinaryJson::BenchmarkQtBinaryJson(QObject *parent) : QObject(parent) +{ + +} + +void BenchmarkQtBinaryJson::initTestCase() +{ + +} + +void BenchmarkQtBinaryJson::cleanupTestCase() +{ + +} + +void BenchmarkQtBinaryJson::init() +{ + +} + +void BenchmarkQtBinaryJson::cleanup() +{ + +} + +void BenchmarkQtBinaryJson::parseNumbers() +{ + QFile file(QLatin1String("numbers.json")); + file.open(QFile::ReadOnly); + QByteArray testJson = file.readAll(); + + QBENCHMARK { + QJsonDocument doc = QJsonDocument::fromJson(testJson); + QJsonObject object = doc.object(); + } +} + +void BenchmarkQtBinaryJson::parseJson() +{ + QFile file(QLatin1String("../../../auto/corelib/json/test.json")); + file.open(QFile::ReadOnly); + QByteArray testJson = file.readAll(); + + QBENCHMARK { + QJsonDocument doc = QJsonDocument::fromJson(testJson); + QJsonObject object = doc.object(); + } +} + +void BenchmarkQtBinaryJson::parseJsonToVariant() +{ + QFile file(QLatin1String("../../../auto/corelib/json/test.json")); + file.open(QFile::ReadOnly); + QByteArray testJson = file.readAll(); + + QBENCHMARK { + QJsonDocument doc = QJsonDocument::fromJson(testJson); + QVariant v = doc.toVariant(); + } +} + +QTEST_MAIN(BenchmarkQtBinaryJson) +#include "tst_bench_qtbinaryjson.moc" + diff --git a/tests/benchmarks/corelib/kernel/events/main.cpp b/tests/benchmarks/corelib/kernel/events/main.cpp index 09f37616be..24fc6ab2b1 100644 --- a/tests/benchmarks/corelib/kernel/events/main.cpp +++ b/tests/benchmarks/corelib/kernel/events/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp b/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp index e1e4e2cc9a..7e0dba2149 100644 --- a/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp +++ b/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2011 Robin Burchell <robin+qt@viroteck.net> -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp index 8b68f032ea..ab26158f9a 100644 --- a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp +++ b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp index cee747316f..14895863e4 100644 --- a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -242,8 +242,6 @@ void tst_QMetaType::constructCoreType_data() QTest::addColumn<int>("typeId"); for (int i = 0; i <= QMetaType::LastCoreType; ++i) QTest::newRow(QMetaType::typeName(i)) << i; - for (int i = QMetaType::FirstCoreExtType; i <= QMetaType::LastCoreExtType; ++i) - QTest::newRow(QMetaType::typeName(i)) << i; // GUI types are tested in tst_QGuiMetaType. } diff --git a/tests/benchmarks/corelib/kernel/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp index 905b21fca0..a5a26c1b2a 100644 --- a/tests/benchmarks/corelib/kernel/qobject/main.cpp +++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/kernel/qobject/object.cpp b/tests/benchmarks/corelib/kernel/qobject/object.cpp index 0b036d0139..cdaa6b3bd2 100644 --- a/tests/benchmarks/corelib/kernel/qobject/object.cpp +++ b/tests/benchmarks/corelib/kernel/qobject/object.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/kernel/qobject/object.h b/tests/benchmarks/corelib/kernel/qobject/object.h index c3cd23d6be..f52c7cf854 100644 --- a/tests/benchmarks/corelib/kernel/qobject/object.h +++ b/tests/benchmarks/corelib/kernel/qobject/object.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp index 151e78e5ce..6232831e1f 100644 --- a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp +++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp index 00e2684066..0c4af17376 100644 --- a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -307,8 +307,6 @@ void tst_qvariant::createCoreType_data() QTest::addColumn<int>("typeId"); for (int i = 0; i <= QMetaType::LastCoreType; ++i) QTest::newRow(QMetaType::typeName(i)) << i; - for (int i = QMetaType::FirstCoreExtType; i <= QMetaType::LastCoreExtType; ++i) - QTest::newRow(QMetaType::typeName(i)) << i; } // Tests how fast a Qt core type can be default-constructed by a diff --git a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp index 9e33655d18..68b739cc13 100644 --- a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp +++ b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp index 9310a3dec8..12420e25a1 100644 --- a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp +++ b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -44,26 +44,7 @@ #include <math.h> -#ifdef Q_OS_SYMBIAN -# include <e32std.h> -typedef RMutex NativeMutexType; -void NativeMutexInitialize(NativeMutexType *mutex) -{ - mutex->CreateLocal(); -} -void NativeMutexDestroy(NativeMutexType *mutex) -{ - mutex->Close(); -} -void NativeMutexLock(NativeMutexType *mutex) -{ - mutex->Wait(); -} -void NativeMutexUnlock(NativeMutexType *mutex) -{ - mutex->Signal(); -} -#elif defined(Q_OS_UNIX) +#if defined(Q_OS_UNIX) # include <pthread.h> # include <errno.h> typedef pthread_mutex_t NativeMutexType; diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp index 6372b7a830..67946602ba 100644 --- a/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp +++ b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp index 729b14067e..00d74ef9e7 100644 --- a/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp +++ b/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp index 3e9dfe3568..7f2e7b68ca 100644 --- a/tests/benchmarks/corelib/tools/containers-associative/main.cpp +++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp index ae05a164a2..ee13a63a57 100644 --- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp +++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qalgorithms/.gitignore b/tests/benchmarks/corelib/tools/qalgorithms/.gitignore new file mode 100644 index 0000000000..379c13eb9b --- /dev/null +++ b/tests/benchmarks/corelib/tools/qalgorithms/.gitignore @@ -0,0 +1 @@ +tst_qalgorithms diff --git a/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro new file mode 100644 index 0000000000..00b63f9863 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro @@ -0,0 +1,3 @@ +TARGET = tst_qalgorithms +QT = core testlib +SOURCES = tst_qalgorithms.cpp diff --git a/tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp new file mode 100644 index 0000000000..d36f8e101c --- /dev/null +++ b/tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp @@ -0,0 +1,141 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2012 Robin Burchell <robin+qt@viroteck.net> +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest/QtTest> + +#include <iostream> +#include <iomanip> +#include <sstream> +#include <algorithm> +#include <qalgorithms.h> +#include <QStringList> +#include <QString> +#include <QVector> + +using namespace std; + +class tst_QAlgorithms : public QObject +{ + Q_OBJECT +private slots: + void stableSort_data(); + void stableSort(); + + void sort_data(); + void sort(); +}; + +template <typename DataType> +QVector<DataType> generateData(QString dataSetType, const int length) +{ + QVector<DataType> container; + if (dataSetType == "Random") { + for (int i = 0; i < length; ++i) + container.append(rand()); + } else if (dataSetType == "Ascending") { + for (int i = 0; i < length; ++i) + container.append(i); + } else if (dataSetType == "Descending") { + for (int i = 0; i < length; ++i) + container.append(length - i); + } else if (dataSetType == "Equal") { + for (int i = 0; i < length; ++i) + container.append(43); + } else if (dataSetType == "Duplicates") { + for (int i = 0; i < length; ++i) + container.append(i % 10); + } else if (dataSetType == "Almost Sorted") { + for (int i = 0; i < length; ++i) + container.append(i); + for (int i = 0; i<= length / 10; ++i) { + const int iswap = i * 9; + DataType tmp = container.at(iswap); + container[iswap] = container.at(iswap + 1); + container[iswap + 1] = tmp; + } + } + + return container; +} + +Q_DECLARE_METATYPE(QVector<int>) + +void tst_QAlgorithms::stableSort_data() +{ + const int dataSize = 5000; + QTest::addColumn<QVector<int> >("unsorted"); + QTest::newRow("Equal") << (generateData<int>("Equal", dataSize)); + QTest::newRow("Ascending") << (generateData<int>("Ascending", dataSize)); + QTest::newRow("Descending") << (generateData<int>("Descending", dataSize)); + QTest::newRow("Duplicates") << (generateData<int>("Duplicates", dataSize)); + QTest::newRow("Almost Sorted") << (generateData<int>("Almost Sorted", dataSize)); +} + +void tst_QAlgorithms::stableSort() +{ + QFETCH(QVector<int>, unsorted); + + QBENCHMARK { + QVector<int> sorted = unsorted; + qStableSort(sorted.begin(), sorted.end()); + } +} + +void tst_QAlgorithms::sort_data() +{ + stableSort_data(); +} + +void tst_QAlgorithms::sort() +{ + QFETCH(QVector<int>, unsorted); + + QBENCHMARK { + QVector<int> sorted = unsorted; + qSort(sorted.begin(), sorted.end()); + } +} + + +QTEST_MAIN(tst_QAlgorithms) +#include "tst_qalgorithms.moc" + diff --git a/tests/benchmarks/corelib/tools/qbytearray/main.cpp b/tests/benchmarks/corelib/tools/qbytearray/main.cpp index 61a7855884..72e07ad445 100644 --- a/tests/benchmarks/corelib/tools/qbytearray/main.cpp +++ b/tests/benchmarks/corelib/tools/qbytearray/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qchar/main.cpp b/tests/benchmarks/corelib/tools/qchar/main.cpp index 3abf7584bb..80456453c9 100644 --- a/tests/benchmarks/corelib/tools/qchar/main.cpp +++ b/tests/benchmarks/corelib/tools/qchar/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp b/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp index b6b064e012..db0c9f39b2 100644 --- a/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp +++ b/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp b/tests/benchmarks/corelib/tools/qhash/main.cpp index 874a0c543a..6f3228d0eb 100644 --- a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp +++ b/tests/benchmarks/corelib/tools/qhash/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,38 +34,12 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ -/* - -//////////////////////////////////////////////////////////////////// - -This benchmark serves as reality check on the idea that hashing the complete -string is a good idea. - - Executive summary: It is not a good idea. - -//////////////////////////////////////////////////////////////////// - -********* Start testing of tst_QHash ********* -Config: Using QTest library 5.0.0, Qt 5.0.0 -PASS : tst_QHash::initTestCase() -RESULT : tst_QHash::qhash_qt4(): - 0.041 msecs per iteration (total: 85, iterations: 2048) -PASS : tst_QHash::qhash_qt4() -RESULT : tst_QHash::qhash_faster(): - 0.0122 msecs per iteration (total: 100, iterations: 8192) -PASS : tst_QHash::qhash_faster() -PASS : tst_QHash::cleanupTestCase() -Totals: 4 passed, 0 failed, 0 skipped - -//////////////////////////////////////////////////////////////////// - -*/ - -#include "qhash_string.h" +#include "main.h" #include <QFile> #include <QHash> @@ -81,51 +54,75 @@ class tst_QHash : public QObject Q_OBJECT private slots: + void qhash_qt4_data() { data(); } void qhash_qt4(); + void qhash_faster_data() { data(); } void qhash_faster(); + void javaString_data() { data(); } + void javaString(); private: - QString data(); + void data(); }; -const int N = 1000000; -extern double s; - ///////////////////// QHash ///////////////////// -QString tst_QHash::data() +void tst_QHash::data() { - QFile file("data.txt"); - file.open(QIODevice::ReadOnly); - return QString::fromLatin1(file.readAll()); + QFile smallPathsData("paths_small_data.txt"); + smallPathsData.open(QIODevice::ReadOnly); + + QTest::addColumn<QStringList>("items"); + QTest::newRow("paths-small") + << QString::fromLatin1(smallPathsData.readAll()).split(QLatin1Char('\n')); } void tst_QHash::qhash_qt4() { - QStringList items = data().split(QLatin1Char('\n')); + QFETCH(QStringList, items); + QStringList realitems = items; // for copy/paste ease between benchmarks QHash<QString, int> hash; - + QBENCHMARK { - for (int i = 0, n = items.size(); i != n; ++i) { - hash[items.at(i)] = i; + for (int i = 0, n = realitems.size(); i != n; ++i) { + hash[realitems.at(i)] = i; } } } void tst_QHash::qhash_faster() { - QList<String> items; - foreach (const QString &s, data().split(QLatin1Char('\n'))) - items.append(s); + QFETCH(QStringList, items); QHash<String, int> hash; - + + QList<String> realitems; + foreach (const QString &s, items) + realitems.append(s); + QBENCHMARK { - for (int i = 0, n = items.size(); i != n; ++i) { - hash[items.at(i)] = i; + for (int i = 0, n = realitems.size(); i != n; ++i) { + hash[realitems.at(i)] = i; } } } +void tst_QHash::javaString() +{ + QFETCH(QStringList, items); + QHash<JavaString, int> hash; + + QList<JavaString> realitems; + foreach (const QString &s, items) + realitems.append(s); + + QBENCHMARK { + for (int i = 0, n = realitems.size(); i != n; ++i) { + hash[realitems.at(i)] = i; + } + } +} + + QTEST_MAIN(tst_QHash) -#include "qhash_string.moc" +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qhash/qhash_string.h b/tests/benchmarks/corelib/tools/qhash/main.h index 94f142914b..c4cf94e190 100644 --- a/tests/benchmarks/corelib/tools/qhash/qhash_string.h +++ b/tests/benchmarks/corelib/tools/qhash/main.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtTest module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -50,3 +50,15 @@ struct String : QString QT_BEGIN_NAMESPACE uint qHash(const String &); QT_END_NAMESPACE + + +struct JavaString : QString +{ + JavaString() {} + JavaString(const QString &s) : QString(s) {} +}; + +QT_BEGIN_NAMESPACE +uint qHash(const JavaString &); +QT_END_NAMESPACE + diff --git a/tests/benchmarks/corelib/tools/qhash/outofline.cpp b/tests/benchmarks/corelib/tools/qhash/outofline.cpp index 11a5f9e733..162c604a35 100644 --- a/tests/benchmarks/corelib/tools/qhash/outofline.cpp +++ b/tests/benchmarks/corelib/tools/qhash/outofline.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtTest module of the Qt Toolkit. ** @@ -35,11 +34,12 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include "qhash_string.h" +#include "main.h" static void doHash(const unsigned short *p, uint &h) { @@ -87,4 +87,28 @@ uint qHash(const String &str) return h; } +// The Java's hashing algorithm for strings is a variation of D. J. Bernstein +// hashing algorithm appeared here http://cr.yp.to/cdb/cdb.txt +// and informally known as DJB33XX - DJB's 33 Times Xor. +// Java uses DJB31XA, that is, 31 Times Add. +// The original algorithm was a loop around "(h << 5) + h ^ c", +// which is indeed "h * 33 ^ c"; it was then changed to +// "(h << 5) - h ^ c", so "h * 31 ^ c", and the XOR changed to a sum: +// "(h << 5) - h + c", which can save some assembly instructions. +// Still, we can avoid writing the multiplication as "(h << 5) - h" +// -- the compiler will turn it into a shift and an addition anyway +// (for instance, gcc 4.4 does that even at -O0). +uint qHash(const JavaString &str) +{ + const unsigned short *p = (unsigned short *)str.constData(); + const int len = str.size(); + + uint h = 0; + + for (int i = 0; i < len; ++i) + h = 31 * h + p[i]; + + return h; +} + QT_END_NAMESPACE diff --git a/tests/benchmarks/corelib/tools/qhash/data.txt b/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt index d5acd28820..d5acd28820 100644 --- a/tests/benchmarks/corelib/tools/qhash/data.txt +++ b/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt diff --git a/tests/benchmarks/corelib/tools/qhash/qhash.pro b/tests/benchmarks/corelib/tools/qhash/qhash.pro index 51d3e7f253..40f661c116 100644 --- a/tests/benchmarks/corelib/tools/qhash/qhash.pro +++ b/tests/benchmarks/corelib/tools/qhash/qhash.pro @@ -1,5 +1,5 @@ TARGET = tst_hash QT = core testlib INCLUDEPATH += . -SOURCES += qhash_string.cpp outofline.cpp +SOURCES += main.cpp outofline.cpp CONFIG += release diff --git a/tests/benchmarks/corelib/tools/qlist/main.cpp b/tests/benchmarks/corelib/tools/qlist/main.cpp index d3380b188c..b5fcfea3e6 100644 --- a/tests/benchmarks/corelib/tools/qlist/main.cpp +++ b/tests/benchmarks/corelib/tools/qlist/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qrect/main.cpp b/tests/benchmarks/corelib/tools/qrect/main.cpp index 59174e4f08..ba81c7bb92 100644 --- a/tests/benchmarks/corelib/tools/qrect/main.cpp +++ b/tests/benchmarks/corelib/tools/qrect/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qregexp/main.cpp b/tests/benchmarks/corelib/tools/qregexp/main.cpp index 32e8e72577..d26731edba 100644 --- a/tests/benchmarks/corelib/tools/qregexp/main.cpp +++ b/tests/benchmarks/corelib/tools/qregexp/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qstring/data.h b/tests/benchmarks/corelib/tools/qstring/data.h index 925ce3663a..bf39284cb4 100644 --- a/tests/benchmarks/corelib/tools/qstring/data.h +++ b/tests/benchmarks/corelib/tools/qstring/data.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qstring/generatelist.pl b/tests/benchmarks/corelib/tools/qstring/generatelist.pl index 1f10b638b2..0cb67fc737 100644 --- a/tests/benchmarks/corelib/tools/qstring/generatelist.pl +++ b/tests/benchmarks/corelib/tools/qstring/generatelist.pl @@ -1,7 +1,6 @@ #!/usr/bin/perl ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -## All rights reserved. -## Contact: Nokia Corporation (qt-info@nokia.com) +## Contact: http://www.qt-project.org/ ## ## This file is part of the QtCore module of the Qt Toolkit. ## @@ -34,6 +33,7 @@ ## ## ## +## ## $QT_END_LICENSE$ # # Parses a file (passed as argument) that contains a dump of pairs of diff --git a/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl b/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl index ad6595ab5c..9d980f9ed4 100644 --- a/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl +++ b/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl @@ -1,8 +1,7 @@ #!/usr/bin/perl # -*- mode: utf-8; tabs: nil -*- ## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -## All rights reserved. -## Contact: Nokia Corporation (qt-info@nokia.com) +## Contact: http://www.qt-project.org/ ## ## This file is part of the QtCore module of the Qt Toolkit. ## @@ -35,6 +34,7 @@ ## ## ## +## ## $QT_END_LICENSE$ # # Parses a file (passed as argument) that contains a dump of pairs of diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index ab23fa5f9b..9d5c43c290 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp index b1ec5dace8..cd82ca746f 100644 --- a/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp +++ b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp index 696f0fc6da..48bf7f1fc5 100644 --- a/tests/benchmarks/corelib/tools/qstringlist/main.cpp +++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qvector/main.cpp b/tests/benchmarks/corelib/tools/qvector/main.cpp index 38c1f4ac46..ee50935832 100644 --- a/tests/benchmarks/corelib/tools/qvector/main.cpp +++ b/tests/benchmarks/corelib/tools/qvector/main.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qvector/outofline.cpp b/tests/benchmarks/corelib/tools/qvector/outofline.cpp index a30a7e786a..bf929780a5 100644 --- a/tests/benchmarks/corelib/tools/qvector/outofline.cpp +++ b/tests/benchmarks/corelib/tools/qvector/outofline.cpp @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtTest module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h index 3bd75164d5..159dfbf8dc 100644 --- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h +++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h @@ -1,8 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** @@ -35,6 +34,7 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -60,7 +60,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -QT_MODULE(Core) diff --git a/tests/benchmarks/corelib/tools/tools.pro b/tests/benchmarks/corelib/tools/tools.pro index d5bf8301f9..ea9059e759 100644 --- a/tests/benchmarks/corelib/tools/tools.pro +++ b/tests/benchmarks/corelib/tools/tools.pro @@ -10,6 +10,7 @@ SUBDIRS = \ qstring \ qstringbuilder \ qstringlist \ - qvector + qvector \ + qalgorithms !*g++*: SUBDIRS -= qstring |