Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value-parameterized tests must warn about interspersing test definitions and test case instantiations for the same test case. #65

Open
GoogleCodeExporter opened this issue Jul 31, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Some users are confused when about the effect of test case instantiations
in value-parameterized test cases. For example, in this code:
TEST_P(FooTest, TestSomething) { .. }
INSTANTIATE_TEST_CASE_P(InstantiationA, FooTest, ...);

TEST_P(FooTest, TestSomethingElse) { ... }
INSTANTIATE_TEST_CASE_P(InstantiationB, FooTest, ...);

some people expect InstantiationA NOT to instantiate
FooTest.TestSomethingElse. We need to issue a warning when TEST_P follows
INSTANTIATE_TEST_CASE_P for the same test case.

Original issue reported on code.google.com by vladlosev on 12 Nov 2008 at 7:23

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 27 Sep 2010 at 7:09

@GoogleCodeExporter
Copy link
Author

More generally the instantiation macro for the Value-parameterized tests should 
offer a mechanism to instantiate only a subset of defined TEST_P. 
It could be for instante an optional parameter "pattern matching" the wanted 
TEST_P, or an enumeration of TEST_P.

Currently I don't see any other solution than to derivate the 
Value-parameterized fixture. 

Original comment by [email protected] on 11 Aug 2014 at 8:01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant