Avoid full test in no exceptions are enabled.
Signed-off-by: Adrian Moran <amoran@ikerlan.es>
This commit is contained in:
		@@ -31,15 +31,14 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Tests Google Mock's functionality that depends on exceptions.
 | 
					// Tests Google Mock's functionality that depends on exceptions.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if GTEST_HAS_EXCEPTIONS
 | 
				
			||||||
#include "gmock/gmock.h"
 | 
					#include "gmock/gmock.h"
 | 
				
			||||||
#include "gtest/gtest.h"
 | 
					#include "gtest/gtest.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace {
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using testing::HasSubstr;
 | 
					using testing::HasSubstr;
 | 
				
			||||||
#if GTEST_HAS_EXCEPTIONS
 | 
					 | 
				
			||||||
using testing::internal::GoogleTestFailureException;
 | 
					using testing::internal::GoogleTestFailureException;
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
// A type that cannot be default constructed.
 | 
					// A type that cannot be default constructed.
 | 
				
			||||||
class NonDefaultConstructible {
 | 
					class NonDefaultConstructible {
 | 
				
			||||||
@@ -54,7 +53,6 @@ class MockFoo {
 | 
				
			|||||||
  MOCK_METHOD0(GetNonDefaultConstructible, NonDefaultConstructible());
 | 
					  MOCK_METHOD0(GetNonDefaultConstructible, NonDefaultConstructible());
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if GTEST_HAS_EXCEPTIONS
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) {
 | 
					TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) {
 | 
				
			||||||
  MockFoo mock;
 | 
					  MockFoo mock;
 | 
				
			||||||
@@ -78,6 +76,5 @@ TEST(DefaultValueTest, ThrowsRuntimeErrorWhenNoDefaultValue) {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}  // unnamed namespace
 | 
					}  // unnamed namespace
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user