Disable death tests on platforms which don't support them.

llvm-svn: 160000
This commit is contained in:
Benjamin Kramer 2012-07-10 17:30:44 +00:00
parent 617f5269c3
commit 60d7f5a1d7
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@
namespace clang { namespace clang {
namespace ast_matchers { namespace ast_matchers {
#if GTEST_HAS_DEATH_TEST
TEST(HasNameDeathTest, DiesOnEmptyName) { TEST(HasNameDeathTest, DiesOnEmptyName) {
ASSERT_DEBUG_DEATH({ ASSERT_DEBUG_DEATH({
DeclarationMatcher HasEmptyName = record(hasName("")); DeclarationMatcher HasEmptyName = record(hasName(""));
@ -29,6 +30,7 @@ TEST(IsDerivedFromDeathTest, DiesOnEmptyBaseName) {
EXPECT_TRUE(notMatches("class X {};", IsDerivedFromEmpty)); EXPECT_TRUE(notMatches("class X {};", IsDerivedFromEmpty));
}, ""); }, "");
} }
#endif
TEST(NameableDeclaration, MatchesVariousDecls) { TEST(NameableDeclaration, MatchesVariousDecls) {
DeclarationMatcher NamedX = nameableDeclaration(hasName("X")); DeclarationMatcher NamedX = nameableDeclaration(hasName("X"));