blob: b42582e505f2af4388d155330111704b41c6a457 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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"
|