Add GTEST_ATTRIBUTE_UNUSED_ to REGISTER_TYPED_TEST_CASE_P
If REGISTER_TYPED_TEST_CASE_P is included in a header file, but the .cc file does not declare INSTANTIATE_TYPED_TEST_CASE_P, an unused-variable warning may be raised by the compiler.
This commit is contained in:
		@@ -241,7 +241,8 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
 | 
			
		||||
  namespace GTEST_CASE_NAMESPACE_(CaseName) { \
 | 
			
		||||
  typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \
 | 
			
		||||
  } \
 | 
			
		||||
  static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \
 | 
			
		||||
  static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) \
 | 
			
		||||
      GTEST_ATTRIBUTE_UNUSED = \
 | 
			
		||||
          GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\
 | 
			
		||||
              __FILE__, __LINE__, #__VA_ARGS__)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user