summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel/qguivariant/no_application
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-07-24 10:52:53 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-25 00:48:33 +0200
commitb3694d12959900270b3aea2af594df379f1db092 (patch)
tree9d11bdd02ca2a493a6ecc0d22d430ecb1b92b252 /tests/auto/gui/kernel/qguivariant/no_application
parentf9db44ad15aefa65c40a763c31dbf1313c59d455 (diff)
Split the QGuiVariant test from the Core one.
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 <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'tests/auto/gui/kernel/qguivariant/no_application')
-rw-r--r--tests/auto/gui/kernel/qguivariant/no_application/main.cpp72
-rw-r--r--tests/auto/gui/kernel/qguivariant/no_application/no_application.pro5
2 files changed, 77 insertions, 0 deletions
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 <QtTest/QtTest>
+
+#include <qvariant.h>
+
+
+
+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<QColor>(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