Qt Data Driven Test row name
-
Hi everyone,
I'm trying to implement several data driven tests for my Qt Application and I need to get data row name (the string passed as an argument to newRow function) but it seems to be trickier than just doing QFETCH(QString, name).
I have looked through Qt documentation but couldn't have found anything that could help.
Would someone please help me understand how name of data row can be fetched in test function?Many thanks,
Dmytrop.s. I'm using Qt 5.6
-
Hi,
Out of curiosity, why do you need that information ?
-
Did you saw that you can already get the output of QTest base unit test in different formats ?
-
Hi @diredko,
The string passed to QTest::newRow is called the dataTag, and can be accessed via QTest::currentDataTag.
I hope that helps :)
pc.
-
Nice one ! I've missed that function. Thanks !