Actually, we intend it to work to change the value of
testing::GTEST_FLAG(filter) before calling InitGoogleTest(). If it's
not clear from the docs, we should clarify it.
--
Zhanyong
On Mon, Dec 6, 2010 at 3:47 PM, Vlad Losev <vl...@losev.com> wrote:Actually, we intend it to work to change the value of
> There is no supported way to run partial set of tests in Google Test.
testing::GTEST_FLAG(filter) before calling InitGoogleTest(). If it's
not clear from the docs, we should clarify it.
--
> Your
> only option is to run a the test binary in a subprocess with the appropriate
> --gtest_filter flag. Please note, running RUN_ALL_TESTS() multiple times is
> not supported. It may work now, but it may very well get broken in some
> subtle ways with in future update of the library.
>
> On Sun, Dec 5, 2010 at 1:02 AM, eliben <eli...@gmail.com> wrote:
>>
>> Hello,
>>
>> What is the best way to run a single test fixture / test from my gtest
>> tests via the API (not command-line)?
>>
>> One solution is call RUN_ALL_TESTS, setting a filter prior to that
>> with ::testing::GTEST_FLAG ... This works, but feels a bit cumbersome.
>> Is there something that allows me, i.e:
>>
>> RUN_TEST_FIXTURE(MyFixtureClase)
>>
>> or
>>
>> RUN_TEST(MyTestClass)
>>
>> ?
>>
>> Thanks in advance
>
Zhanyong