diff options
author | Robin Burchell <robin.burchell@collabora.co.uk> | 2010-07-15 12:08:20 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2010-07-15 12:08:33 (GMT) |
commit | b9c2853a0fd1876f30a410fe8dac5c477cef9d0e (patch) | |
tree | a1e048307d8b2527b0f3e2cdc1e7362836600e92 /tests/auto/quuid/testProcessUniqueness | |
parent | 01978218333aab792e32d7c69bbaea849b3b8d15 (diff) | |
download | Qt-b9c2853a0fd1876f30a410fe8dac5c477cef9d0e.zip Qt-b9c2853a0fd1876f30a410fe8dac5c477cef9d0e.tar.gz Qt-b9c2853a0fd1876f30a410fe8dac5c477cef9d0e.tar.bz2 |
Add a testcase for QTBUG-11213 to prevent future regressions.
Merge-request: 2427
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'tests/auto/quuid/testProcessUniqueness')
-rw-r--r-- | tests/auto/quuid/testProcessUniqueness/main.cpp | 62 | ||||
-rw-r--r-- | tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro | 8 |
2 files changed, 70 insertions, 0 deletions
diff --git a/tests/auto/quuid/testProcessUniqueness/main.cpp b/tests/auto/quuid/testProcessUniqueness/main.cpp new file mode 100644 index 0000000..4d33c84 --- /dev/null +++ b/tests/auto/quuid/testProcessUniqueness/main.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <stdio.h> +#include <QUuid> + +// This is a testcase for QTBUG-11213 +int main(int argc, char **argv) +{ + Q_UNUSED(argc) + Q_UNUSED(argv) + + // First, break QUuid. + qrand(); + + // Now print a few uuids. + printf("%s", qPrintable(QUuid::createUuid().toString())); + printf("%s", qPrintable(QUuid::createUuid().toString())); + printf("%s", qPrintable(QUuid::createUuid().toString())); + + // Done + return 0; +} + diff --git a/tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro b/tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro new file mode 100644 index 0000000..88df1a2 --- /dev/null +++ b/tests/auto/quuid/testProcessUniqueness/testProcessUniqueness.pro @@ -0,0 +1,8 @@ +SOURCES = main.cpp +CONFIG += console + +DESTDIR = ./ + +# no install rule for application used by test +INSTALLS = + |