diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/testqstring.cpp | 15 | ||||
| -rw-r--r-- | tests/tests.pro | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/testqstring.cpp b/tests/testqstring.cpp new file mode 100644 index 0000000..20ecf78 --- /dev/null +++ b/tests/testqstring.cpp @@ -0,0 +1,15 @@ +#include <QtTest/QtTest> + +class TestQString: public QObject { + Q_OBJECT +private slots: + void toUpper(); +}; + +void TestQString::toUpper() { + QString str = "Hello"; + QCOMPARE(str.toUpper(), QString("HELLO")); +} + +QTEST_MAIN(TestQString) +#include "testqstring.moc" diff --git a/tests/tests.pro b/tests/tests.pro new file mode 100644 index 0000000..0f9e09e --- /dev/null +++ b/tests/tests.pro @@ -0,0 +1,4 @@ +QT += testlib + +SOURCES += testqstring.cpp + |
