Questions tagged [qtestlib]

Qt Test is a framework for unit testing Qt based applications and libraries.

Qt Test provides functionality usually found in unit testing frameworks as well as extensions for testing GUI applications.

Qt Test is designed specially for Qt based applications and libraries.

Official documentation can be found here.

139 questions
0
votes
1 answer

How to write the qmake file for a test case?

I just don't understand what is the overall layout of a Qt project with a program and a test... The project of QTest tutorial only have the test program, but my project already have another program. If I add the test case, it claims "multiple…
jiandingzhe
  • 1,881
  • 15
  • 35
0
votes
1 answer

QCompare test failure : wrong number of arguments produced by the [] operator on an unorded_map

Using c++/Qt5, I'm stuck with a QCOMPARE test on a MyMap object. This MyMap object has an attribute named "map" which is an unorded_map (vector < int,int> → QString). Here is the test: void TestMyMap::test(void) { MyMap mymap = { { {{ {1,2},…
suizokukan
  • 1,303
  • 4
  • 18
  • 33
0
votes
1 answer

QTest asynchronous signal interception

I am investigating QTest for GUI testing. It appears that there is no mechanism in QTest to asynchronously test a signal callback. Am I misunderstanding how to use QTest, or misunderstanding the intended functionality provided by QTest? For example,…
taz
  • 1,506
  • 3
  • 15
  • 26
0
votes
1 answer

QTestLib results different from program output

I have some simple code that reverses a QString. const QString reverse_qstring(const QString& str_in) { QString out; Q_FOREACH(const QChar c, str_in) { out.push_front(c); } return out; } When I input text from the command…
taynaron
  • 704
  • 1
  • 10
  • 23
1 2 3
9
10