Hi, is it possible to use QPairs as test values? I'm running into some trouble:
void function_data()
{
QTest::addColumn<QDate>("testDate");
QTest::addColumn< QPair<QDate,QDate> >("expectedOutputs");
// newRow...
}
void function()
{
QFETCH(QPair<QDate,QDate>, expectedOutputs);
// QCOMPARE...
}
void function_data()
{
QTest::addColumn<QDate>("testDate");
QTest::addColumn< QPair<QDate,QDate> >("expectedOutputs");
// newRow...
}
void function()
{
QFETCH(QDate, testDate);
QFETCH(QPair<QDate,QDate>, expectedOutputs);
// QCOMPARE...
}
To copy to clipboard, switch view to plain text mode
My compiler seems to have issues with the comma in the QPair template and complains
error: macro "QFETCH" passed 3 arguments, but takes just 2
error: macro "QFETCH" passed 3 arguments, but takes just 2
To copy to clipboard, switch view to plain text mode
Bookmarks