Joe Schneider
unread,Aug 15, 2010, 10:20:22 AM8/15/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google C++ Testing Framework
I'm about to migrate a fairly large team of developers to Eclipse/
GTest. I have done a decent amount of toy-project development in
Eclipse, but no large-scale professional work in it. I'd prefer to use
the autogenerated makefiles from Eclipse if possible. I understand I
should go to the Eclipse groups to get Eclipse help, but the specific
issues I'd like help with are specific to unit testing and GTest
integration, and I'm hoping I can find someone who has some
suggestions here.
What I think I know so far:
* Two projects per component: one for the production code, one for
the unit test.
- In a small project, I guess you'd only have one component.
The projects would create the executables MyProj and MyProjTests.
- In a larger project, you'd have many components. The
projects would create MyComp.a and the executable MyCompTests.
Another project would link all of the project static libraries into
one large executable.
- Different code/executable build targets are possible in a
single project using build configurations, but this turned into a mess
and smelled wrong.
* I have found the GTest plug-in for Eclipse from the Industrial Logic
folks which is much better than simple console output. Using this
along with a GTest run configuration I can run unit tests fairly
easily.
What I'm struggling with:
* Easiest way to link/include the production source code into the test
executable.
- I can simply link against the production static library in a
large project. In a small project, where I might not normally need to
generate a static library intermediate, what's the easiest way to do
this?
* In our previous build system we ran the unit tests as part of our
build of the production code. It was impossible to get an executable
of the production code without the unit tests passing. This is pretty
easy with custom makefiles, but wondering if anyone has a good
suggestion using the autogenerated makefiles.
Thanks!