51 #include <QSqlDatabase>
52 #include <QFontDatabase>
54 #include <initializer_list>
101 QTest::addColumn<QString>(
"aString");
102 QTest::addColumn<int>(
"expected");
116 QCOMPARE(aString.toInt(), expected);
125 if (
sizeof(
int) != 4)
126 QFAIL(
"This test has not been ported to this platform yet.");
140 QSKIP(
"This test requires the SQLITE database driver");
161 class MyTestObject :
public QObject
182 QTest::addColumn<QString>(
"aString");
191 QTest::addColumn<int>(
"input");
192 QTest::addColumn<QString>(
"output");
201 QTest::addColumn<int>(
"intval");
202 QTest::addColumn<QString>(
"str");
203 QTest::addColumn<double>(
"dbl");
226 void TestBenchmark::simple()
246 qPrintable(
QString(
"open %1: %2")
254 const int expected[] = {8, 10, 12, 16, 20, 24};
262 #define ARG(...) __VA_ARGS__
small capitals from c petite p scientific i
[1]
void addSingleStringRows()
[20]
void addMultStringRows()
[20]
The QDir class provides access to directory structures and their contents.
The QFile class provides an interface for reading from and writing to files.
bool open(OpenMode flags) override
QString fileName() const override
The QFileInfo class provides system-independent file information.
static QList< int > standardSizes()
QString errorString() const
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
The QObject class is the base class of all Qt objects.
static QStringList drivers()
The QString class provides a Unicode character string.
int localeAwareCompare(const QString &s) const
Q_CORE_EXPORT void qSleep(int ms)
Q_TESTLIB_EXPORT QTestData & newRow(const char *dataTag)
Q_TESTLIB_EXPORT const char * currentTestFunction()
Q_TESTLIB_EXPORT void ignoreMessage(QtMsgType type, const char *message)
Q_TESTLIB_EXPORT int qExec(QObject *testObject, int argc=0, char **argv=nullptr)
Q_TESTLIB_EXPORT QTestData & addRow(const char *format,...) Q_ATTRIBUTE_FORMAT_PRINTF(1
Q_CORE_EXPORT int qstrcmp(const char *str1, const char *str2)
#define QTEST_MAIN(TestObject)
#define QSKIP(statement,...)
#define QFETCH(Type, name)
#define QEXPECT_FAIL(dataIndex, comment, mode)
#define QTEST(actual, testElement)
#define QVERIFY(statement)
#define QVERIFY2(statement, description)
void compareListToInitializerList()
void compareListToArray()