Re: [Interest] QTest

2019-03-20 Thread Thiago Macieira
On Tuesday, 19 March 2019 16:46:49 PDT Jérôme Godbout wrote: > I run qTest::exec() to run my test but I would like to known if it's > possible to recover the number of failure/pass/skipped to do some work > after the qTest::exec() That information is logged, but is not exposed in the API. --

Re: [Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-19 Thread Bob Hood
On 1/19/2017 2:29 AM, Viktor Engelmann wrote: QSignalSpy::wait has a race condition though. When the signal is emitted from a different thread, it might come before you called .wait and then the wait will time out and return false (so it looks like the signal wasn't emitted). You can store

Re: [Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-19 Thread Viktor Engelmann
QSignalSpy::wait has a race condition though. When the signal is emitted from a different thread, it might come before you called .wait and then the wait will time out and return false (so it looks like the signal wasn't emitted). You can store the value of spy.size() and after the wait compare it

Re: [Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-18 Thread Bob Hood
On 1/18/2017 10:52 AM, Giuseppe D'Angelo wrote: Il 18/01/2017 18:16, Bob Hood ha scritto: Is QTest capable of testing deferred results--i.e., evaluating tests results after the even loop has run again--or can only synchronous actions be tested? I know people have used qWait() and such in the

Re: [Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-18 Thread Bob Hood
On 1/18/2017 10:28 AM, Konrad Rosenbaum wrote: Hi, On Wednesday, January 18, 2017 10:16:30 Bob Hood wrote: I'm trying to develop a unit test for an deferred signal; i.e. one that won't be emitted until the event loop has been allowed to run. The case looks like: void

Re: [Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-18 Thread Giuseppe D'Angelo
Il 18/01/2017 18:16, Bob Hood ha scritto: > Is QTest capable of testing deferred results--i.e., evaluating tests results > after the even loop has run again--or can only synchronous actions be tested? > > I know people have used qWait() and such in the past, or I supposed I could > manually

Re: [Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

2017-01-18 Thread Konrad Rosenbaum
Hi, On Wednesday, January 18, 2017 10:16:30 Bob Hood wrote: > I'm trying to develop a unit test for an deferred signal; i.e. one that > won't be emitted until the event loop has been allowed to run. The case > looks like: > >void MyTest::user_info_deferred() >{ >

Re: [Interest] QTest unit tests can't find .moc files

2014-03-14 Thread Thomas Sevaldrud
Ah, that was it! I had one build config that built in-source. Thanks a lot :-) - Thomas On Thu, Mar 13, 2014 at 11:54 PM, Thiago Macieira thiago.macie...@intel.com wrote: Em qui 13 mar 2014, às 22:25:16, Thomas Sevaldrud escreveu: Hi, I've a very strange problem with my QTest unit

Re: [Interest] QTest unit tests can't find .moc files

2014-03-13 Thread Thiago Macieira
Em qui 13 mar 2014, às 22:25:16, Thomas Sevaldrud escreveu: Hi, I've a very strange problem with my QTest unit tests. I use the QTest project wizard from Qt Creator and end up with a class that includes a moc file at the bottom of the source just like in the QTest documentation examples,

Re: [Interest] QTest::qWait Error

2012-03-26 Thread Robin Burchell
On Mon, Mar 26, 2012 at 2:37 PM, lucas.betsch...@crypto.ch wrote: I've got some test slots which should only trigger when the signal arrived. How can I test this? I want to use them like they're normal test cases but that they don't get called automatically. Don't put it on the test at all.