tag:blogger.com,1999:blog-2149729862162628363.post1400634510936147846..comments2023-09-22T18:59:24.885+01:00Comments on Qt Creator Blog: Running Multiple Unit TestsRob Caldecotthttp://www.blogger.com/profile/16139053405031925765noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-2149729862162628363.post-82113107675805239902014-05-05T20:03:29.524+01:002014-05-05T20:03:29.524+01:00If you're using C++11 try this solution. http:...If you're using C++11 try this solution. http://edwrodrig.github.io/lessons/2014/05/05/testing-multiple-classes-using-c++11-lambdas-in-qt/edwrodrighttps://www.blogger.com/profile/15063616801186555060noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-4683851265555039222014-04-09T12:07:00.523+01:002014-04-09T12:07:00.523+01:00I had the above errors when using the macro DECLAR...I had the above errors when using the macro DECLARE_TEST in my headers instead of my cpps.<br />Another workaround may be to change the macro to: #define DECLARE_TEST(className) static Test t##className(#className);Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-62096221979362207112013-02-05T13:29:43.806+00:002013-02-05T13:29:43.806+00:00Thanks very much, works great, only clarification ...Thanks very much, works great, only clarification I needed to debug was that you need to:<br /># Add DECLARE_TEST(YourTestClassName) below your class DECLARATION (in the header) rather than below the definition (in the CPP file).Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-3425701548040955862012-11-03T02:18:43.374+00:002012-11-03T02:18:43.374+00:00I think I found the issue. I couldn't #include...I think I found the issue. I couldn't #include the files in the main. But now I am facing other errors, such as:<br /><br />1) "invalid declaration of member template in local class"<br /><br />2) "local class 'class main(int, char**)::QTestClass1' shall not have static data member 'const QMetaObject main(int, char**)::QTestClass1::staticMetaObject'"<br /><br />3) "local class 'class main(int, char**)::QTestClass1' shall not have static data member 'const QMetaObjectExtraData main(int, char**)::QTestClass1::staticMetaObjectExtraData'"<br /><br />4) template argument for 'template class Test' uses local type 'main(int, char**)::QTestClass1'"<br /><br />5) "invalid type in declaration before '(' token"<br /><br />6) "initializer expression list treated as compound expression<br /><br />Note: I did add an enum to the DECLARE_TEST macro and the constructor of the Test class.Anonymoushttps://www.blogger.com/profile/01921201698738389564noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-36077360747923137172012-11-03T01:52:03.299+00:002012-11-03T01:52:03.299+00:00I'm seeing this same issue. Any resolution?I'm seeing this same issue. Any resolution?Anonymoushttps://www.blogger.com/profile/01921201698738389564noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-6453452580165165012012-09-04T14:56:46.373+01:002012-09-04T14:56:46.373+01:00spammer!spammer!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-41961893098133605202012-07-20T11:45:37.702+01:002012-07-20T11:45:37.702+01:00Great Work! Just to be sure, is this code licensed...Great Work! Just to be sure, is this code licensed under GPL?beigehttps://www.blogger.com/profile/01645786158518165929noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-63494372129195508582010-08-04T17:46:24.908+01:002010-08-04T17:46:24.908+01:00I would like to say that you really made my day, i...I would like to say that you really made my day, it's wonderful when you just look around the web<br />and find something like this, reminds me of that ''How to make a dinner for a romantic...'' by Elsa Thomas,<br />you're a wonderful writer let me tell you!!! ñ_ñ<br /><br />James Maverick (maverickhunterjames@gmail.com)<br />3453 Rardin Drive<br />San Mateo, CA 94403 <br />Project Manager<br />650-627-8033buy Viagrahttp://www.safemeds.com/noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-30966167360830494852010-05-23T13:20:28.324+01:002010-05-23T13:20:28.324+01:00Great Work! Thx :)Great Work! Thx :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-84683427563137558382010-04-28T21:04:19.734+01:002010-04-28T21:04:19.734+01:00SSCCE posted - see latest entry.SSCCE posted - see latest entry.Rob Caldecotthttps://www.blogger.com/profile/16139053405031925765noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-7099103436332140222010-04-28T13:52:16.724+01:002010-04-28T13:52:16.724+01:00@Simpatico: It isn't possible to host files on...@Simpatico: It isn't possible to host files on here AFAIK but I'll see what I can do.Rob Caldecotthttps://www.blogger.com/profile/16139053405031925765noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-26535687017787637292010-04-28T13:10:32.033+01:002010-04-28T13:10:32.033+01:00Could you post a SSCCE? I.e. a complete qt test pr...Could you post a SSCCE? I.e. a complete qt test project that runs?Simpaticohttps://www.blogger.com/profile/11296072654064015891noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-89192050170138978312009-10-16T07:57:11.206+01:002009-10-16T07:57:11.206+01:00DIFF ... give me an email address and I'll ema...DIFF ... give me an email address and I'll email you a sample Qt4 project that uses AutoTest.h - or send me some code.Rob Caldecotthttps://www.blogger.com/profile/16139053405031925765noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-6286058007322288902009-10-16T06:00:09.756+01:002009-10-16T06:00:09.756+01:00Hello, this is what I'm finding!
But, I got th...Hello, this is what I'm finding!<br />But, I got these errors for my two test classes:<br /><br />conflicting declaration 'Test(TestQString) t'<br />'t' has a previous declaration as `Test(TestArray) t'<br />declaration of `Test(TestQString) t'<br />conflicts with previous declaration `Test(TestArray) t'<br /><br />NOTE: "greater than" and "less than" marks are replaced by ) and ( due to editbox limitation.DIFFhttps://www.blogger.com/profile/15826445813864373448noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-19268503596205675762009-10-09T16:07:45.168+01:002009-10-09T16:07:45.168+01:00This automatic testing sounds great, I'll try ...This automatic testing sounds great, I'll try this for my projects!<br /><br />greets,<br />3DH3DHhttp://3dh.denoreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-18351051524035087892009-10-07T21:33:27.429+01:002009-10-07T21:33:27.429+01:00Yes, this is possible - I have mine setup to build...Yes, this is possible - I have mine setup to build and run the tests when the .lib the tests are for changes. I'll post details tomorrow.Rob Caldecotthttps://www.blogger.com/profile/16139053405031925765noreply@blogger.comtag:blogger.com,1999:blog-2149729862162628363.post-5103136358107241272009-10-07T00:29:07.020+01:002009-10-07T00:29:07.020+01:00I'm doing something similar to this using the ...I'm doing something similar to this using the post-link qmake step to run the unit test binary. BUT, is there a way to rebuild the unit test after the library (or thing that you're testing) has been built so that it is updated?Anonymousnoreply@blogger.com