google parameterized tests do not run

1,021 views
Skip to first unread message

Vlad Sergeev

unread,
Sep 6, 2013, 12:08:25 PM9/6/13
to googletes...@googlegroups.com
Hi all,

I have tried parameterized gtests and i couldn't get them to run.  Tried the examples from the Advanced guide with the same result.  

Note: Google Test filter = PrimeTableTest
[==========] Running 0 tests from 0 test cases.
[==========] 0 tests from 0 test cases ran. (1 ms total)
[  PASSED  ] 0 tests.
Press any key to continue . . .

Tried doing everything according to the guide, derived from ::testing::TestWithParam<int>, intialized with 

INSTANTIATE_TEST_CASE_P(CrossGreeksTpxWithAllThreeProductTypes, Test_suite_cross_greeks, ::testing::Values(1, 2, 3, 4));

The dummy test looks like this:

TEST_P(Test_suite_super_cross_greeks, CrossGreeksTpx)
{
cout<<GetParam()<<endl;
ASSERT_EQ(1,1);
}

Everything with TEST_P is just not picked up.  TEST_F works fine.  

I am using gtest 1.6.0 in Visual Studio 10.

Thanks,

Vlad

Vlad Losev

unread,
Sep 6, 2013, 12:20:38 PM9/6/13
to Google C++ Testing Framework
Try running your test without the --gtest_fitler flag.


--
 
---
You received this message because you are subscribed to the Google Groups "Google C++ Testing Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to googletestframe...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Vlad Sergeev

unread,
Sep 9, 2013, 5:42:24 AM9/9/13
to googletes...@googlegroups.com
Thanks for your response!  Indeed if filtering is not applied then the tests do not appear as disabled.  

Does it mean i need to forget about filtering once i start with parameterizing my tests?  It is very convenient feature that would be hard to let go of...
To unsubscribe from this group and stop receiving emails from it, send an email to googletestframework+unsub...@googlegroups.com.

BarbaraJoy Jones

unread,
Sep 9, 2013, 9:49:09 AM9/9/13
to Vlad Sergeev, Google C++ Testing Framework
It means that you need to use an appropriate filter. You can use --gtest_list_tests without a filter to get a complete list of the tests. If you use a filter, the list will only include the tests that would have been run.


To unsubscribe from this group and stop receiving emails from it, send an email to googletestframe...@googlegroups.com.

Vlad Sergeev

unread,
Sep 20, 2013, 7:45:08 AM9/20/13
to googletes...@googlegroups.com, Vlad Sergeev
Thanks it works!
To unsubscribe from this group and stop receiving emails from it, send an email to googletestframework+unsubscribe...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages