Einar Rune Haugnes reports that in gtest-param-test.h we say that a
parameter generator is evaluated in RUN_ALL_TESTS(). In fact it is
evaluated in InitGoogleTest().
I checked the code and think it's doing the intended thing: by generating
all parameterized tests in InitGoogleTest(), we give the user a chance to
iterate through all the tests using the test reflection API before calling
(or skipping) RUN_ALL_TESTS(). For example, someone may use that
information to build a list of tests and show them in a GUI and let the
user decide which tests to run, or whether to run the tests at all.
We should fix the comment and wiki documentation to say that the parameter
generator is evaluated in InitGoogleTest() instead of RUN_ALL_TESTS().
We should also update/add tests to verify this is indeed the case. Our
current tests only verify that the generator is evaluated in main(), which
isn't accurate enough.
Original issue reported on code.google.com by w...@google.com on 16 Mar 2010 at 3:02
Original issue reported on code.google.com by
w...@google.com
on 16 Mar 2010 at 3:02