As you see from the errors, you cannot have two main()s. You will need
two builds or at least two different build targets. One for your
regular QT app, and one to build a test runner. I suppose you could add
some menu item to run tests, capture the text and put it on a QT window
(or something like that). I have not used QT, so I am just suggesting
things for you to look at.
Is there a way with QT to create a console or command line app? Can you
write a help world app with QT? Find that example and add RUN_ALL_TESTS
to the hello worlds app.
// QT hello world
#inclde "QTheaders needed"
#include "CppUTest/CommandLineTestRunner.h"
int main(int ac, char** av)
{
// do the qt minimal program
return RUN_ALL_TESTS(ac, av);
}
See if you make progress there. Once you have that, start folding in
some of your code to that build.
James
--------------------------------------------------------------------------
James Grenning - Author of TDD for Embedded C -
pragprog.com/titles/jgade/
wingman-sw.com
wingman-sw.com/blog
twitter.com/jwgrenning
facebook.com/wingman.sw
[](http://wingman-sw.com)
> --
> You received this message because you are subscribed to the Google
> Groups "cpputest" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
cpputest+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.