From b3694d12959900270b3aea2af594df379f1db092 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 24 Jul 2012 10:52:53 +0200 Subject: Split the QGuiVariant test from the Core one. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes development on the meta type system easier because only QtCore must be re-built to run most of the tests. The existing QGuiVariant test needs to be run before pushing anyway, but not so frequently. Change-Id: I1fa66edbd790c957e1a232226847dd550227a477 Reviewed-by: Olivier Goffart Reviewed-by: Jędrzej Nowacki --- .../gui/kernel/qguivariant/no_application/main.cpp | 72 ++++++++++++++++++++++ .../qguivariant/no_application/no_application.pro | 5 ++ 2 files changed, 77 insertions(+) create mode 100644 tests/auto/gui/kernel/qguivariant/no_application/main.cpp create mode 100644 tests/auto/gui/kernel/qguivariant/no_application/no_application.pro (limited to 'tests/auto/gui/kernel/qguivariant/no_application') diff --git a/tests/auto/gui/kernel/qguivariant/no_application/main.cpp b/tests/auto/gui/kernel/qguivariant/no_application/main.cpp new file mode 100644 index 0000000000..d72f3e8ae5 --- /dev/null +++ b/tests/auto/gui/kernel/qguivariant/no_application/main.cpp @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** 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 + +#include + + + +class tst_QGuiVariantNoApplication : public QObject +{ + Q_OBJECT + +public: + tst_QGuiVariantNoApplication(); + +private slots: + void variantWithoutApplication(); +}; + +tst_QGuiVariantNoApplication::tst_QGuiVariantNoApplication() +{} + +void tst_QGuiVariantNoApplication::variantWithoutApplication() +{ + QVariant v = QString("red"); + + QVERIFY(qvariant_cast(v) == QColor(Qt::red)); +} + + +QTEST_APPLESS_MAIN(tst_QGuiVariantNoApplication) +#include "main.moc" diff --git a/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro b/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro new file mode 100644 index 0000000000..cc72c225a3 --- /dev/null +++ b/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro @@ -0,0 +1,5 @@ +CONFIG += testcase +CONFIG += parallel_test +TARGET = no_application +SOURCES += main.cpp +QT += testlib -- cgit v1.2.3