testqstring.cpp Example File
tutorial1/testqstring.cpp
/***************************************************************************
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
** LICENSE.QPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
*/
#include <QtTest>
class TestQString: public QObject
{
Q_OBJECT
private slots:
void toUpper();
};
void TestQString::toUpper()
{
QString str = "Hello";
COMPARE(str.toUpper(), QString("HELLO"));
}
QTTEST_MAIN(TestQString)
#include "testqstring.moc"
Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies) |
Trademarks |
Qt Solutions |