summaryrefslogtreecommitdiffstats
path: root/tests/auto/selftests/xunit/tst_xunit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/selftests/xunit/tst_xunit.cpp')
-rw-r--r--tests/auto/selftests/xunit/tst_xunit.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/auto/selftests/xunit/tst_xunit.cpp b/tests/auto/selftests/xunit/tst_xunit.cpp
new file mode 100644
index 0000000..b42582e
--- /dev/null
+++ b/tests/auto/selftests/xunit/tst_xunit.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+class tst_Xunit : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_Xunit();
+
+private slots:
+ void testFunc1();
+ void testFunc2();
+ void testFunc3();
+ void testFunc4();
+};
+
+tst_Xunit::tst_Xunit()
+{
+}
+
+void tst_Xunit::testFunc1()
+{
+ QWARN("just a QWARN() !");
+ QCOMPARE(1,1);
+}
+
+void tst_Xunit::testFunc2()
+{
+ qDebug("a qDebug() call!");
+ QCOMPARE(2, 3);
+}
+
+void tst_Xunit::testFunc3()
+{
+ QSKIP("skipping this function!", SkipAll);
+}
+
+void tst_Xunit::testFunc4()
+{
+ QFAIL("a forced failure!");
+}
+
+
+QTEST_APPLESS_MAIN(tst_Xunit)
+#include "tst_xunit.moc"