Does it mean that, 1) all the test cases which you have written will
be automatically detected by Google Test w/o the need of registering
them.
2) It can automatically write down test cases for you?
The gtest runner "discovers" the tests that are compiled and linked
against it. In actuality, if I remember correctly, the TEST and TEST_F
macros take advantage of static c++ object instances' constructors
being called before main() executes, and those objects register their
tests with the gtest runner.
--
C. Keith Ray, IXP Coach, Industrial Logic, Inc.
http://industriallogic.com 866-540-8336 (toll free)
Groove with our Agile Greatest Hits: http://www.industriallogic.com/elearning/
http://agilesolutionspace.blogspot.com/
--
Thanks to Pat Notz and Paweł Hajdan Jr.
As Pat Notz said, I was talking about automatic testcase writedowns
(ie; The tool will parse your program and write down the unit test
cases for you!)
Even though this will be a nice feature to have, I guess I can live
without it.
Just one more question, can I raise this as an enhancement request? So
that in some distant future, if someone is overly free, they will
implement this..
Regards,
Nayak
> <phajdan...@chromium.org>wrote:
On Oct 12, 9:35 pm, Pat Notz <patn...@gmail.com> wrote:
> On Mon, Oct 12, 2009 at 10:04 AM, Paweł Hajdan Jr.
>
> > On Sun, Oct 11, 2009 at 17:02, OpenGuru <coolna...@gmail.com> wrote:
>
> > 2) It can automatically write down test cases for you?
>
> > Yes, just run your test binary with --gtest_list_tests flag.
>
> I don't think this is what OpenGuru meant. ParaView's C++Test software will
> automatically write the actual test code (apparently, I have not used it).
> This is described on their website:
>
> http://www.parasoft.com/jsp/products/quick_facts.jsp?product=CppTest
>
> I do not think gtest currently does this. OpenGuru's first response was
> correct: "all the test cases which you have written will be automatically
> detected by Google Test w/o the need of registering them."