Bug Summary

File:tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
Location:line 31, column 3
Description:Function call argument is an uninitialized value

Annotated Source Code

1//===- unittest/Tooling/ASTMatchersTest.cpp - AST matcher unit tests ------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "ASTMatchersTest.h"
11#include "clang/AST/PrettyPrinter.h"
12#include "clang/ASTMatchers/ASTMatchFinder.h"
13#include "clang/ASTMatchers/ASTMatchers.h"
14#include "clang/Tooling/Tooling.h"
15#include "llvm/ADT/Triple.h"
16#include "llvm/Support/Host.h"
17#include "gtest/gtest.h"
18
19namespace clang {
20namespace ast_matchers {
21
22#if GTEST_HAS_DEATH_TEST1
23TEST(HasNameDeathTest, DiesOnEmptyName)class HasNameDeathTest_DiesOnEmptyName_Test : public ::testing
::Test { public: HasNameDeathTest_DiesOnEmptyName_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); HasNameDeathTest_DiesOnEmptyName_Test
(HasNameDeathTest_DiesOnEmptyName_Test const &); void operator
=(HasNameDeathTest_DiesOnEmptyName_Test const &);};::testing
::TestInfo* const HasNameDeathTest_DiesOnEmptyName_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasNameDeathTest"
, "DiesOnEmptyName", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< HasNameDeathTest_DiesOnEmptyName_Test
>);void HasNameDeathTest_DiesOnEmptyName_Test::TestBody()
{
24 ASSERT_DEBUG_DEATH({switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher HasEmptyName = recordDecl(hasName(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", HasEmptyName))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 26, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", HasEmptyName)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 27, &gtest_dt)) { goto gtest_label_27; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_27; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher HasEmptyName
= recordDecl(hasName("")); switch (0) case 0: default: if (const
::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult
(notMatches("class X {};", HasEmptyName))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 26, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", HasEmptyName)", "false", "true"
).c_str()) = ::testing::Message(); }; }; gtest_dt->Abort(::
testing::internal::DeathTest::TEST_DID_NOT_DIE); break; } } }
} else gtest_label_27: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 27, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
25 DeclarationMatcher HasEmptyName = recordDecl(hasName(""));switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher HasEmptyName = recordDecl(hasName(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", HasEmptyName))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 26, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", HasEmptyName)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 27, &gtest_dt)) { goto gtest_label_27; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_27; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher HasEmptyName
= recordDecl(hasName("")); switch (0) case 0: default: if (const
::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult
(notMatches("class X {};", HasEmptyName))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 26, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", HasEmptyName)", "false", "true"
).c_str()) = ::testing::Message(); }; }; gtest_dt->Abort(::
testing::internal::DeathTest::TEST_DID_NOT_DIE); break; } } }
} else gtest_label_27: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 27, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
26 EXPECT_TRUE(notMatches("class X {};", HasEmptyName));switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher HasEmptyName = recordDecl(hasName(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", HasEmptyName))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 26, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", HasEmptyName)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 27, &gtest_dt)) { goto gtest_label_27; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_27; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher HasEmptyName
= recordDecl(hasName("")); switch (0) case 0: default: if (const
::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult
(notMatches("class X {};", HasEmptyName))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 26, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", HasEmptyName)", "false", "true"
).c_str()) = ::testing::Message(); }; }; gtest_dt->Abort(::
testing::internal::DeathTest::TEST_DID_NOT_DIE); break; } } }
} else gtest_label_27: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 27, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
27 }, "")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher HasEmptyName = recordDecl(hasName(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", HasEmptyName))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 26, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", HasEmptyName)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 27, &gtest_dt)) { goto gtest_label_27; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_27; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher HasEmptyName
= recordDecl(hasName("")); switch (0) case 0: default: if (const
::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult
(notMatches("class X {};", HasEmptyName))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 26, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", HasEmptyName)", "false", "true"
).c_str()) = ::testing::Message(); }; }; gtest_dt->Abort(::
testing::internal::DeathTest::TEST_DID_NOT_DIE); break; } } }
} else gtest_label_27: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 27, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
28}
29
30TEST(HasNameDeathTest, DiesOnEmptyPattern)class HasNameDeathTest_DiesOnEmptyPattern_Test : public ::testing
::Test { public: HasNameDeathTest_DiesOnEmptyPattern_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasNameDeathTest_DiesOnEmptyPattern_Test
(HasNameDeathTest_DiesOnEmptyPattern_Test const &); void operator
=(HasNameDeathTest_DiesOnEmptyPattern_Test const &);};::testing
::TestInfo* const HasNameDeathTest_DiesOnEmptyPattern_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "HasNameDeathTest"
, "DiesOnEmptyPattern", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< HasNameDeathTest_DiesOnEmptyPattern_Test>);void HasNameDeathTest_DiesOnEmptyPattern_Test
::TestBody()
{
31 ASSERT_DEBUG_DEATH({switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher HasEmptyName = recordDecl(matchesName(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", HasEmptyName))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 33, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", HasEmptyName)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 34, &gtest_dt)) { goto gtest_label_34; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_34; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher HasEmptyName
= recordDecl(matchesName("")); switch (0) case 0: default: if
(const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult
(notMatches("class X {};", HasEmptyName))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 33, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", HasEmptyName)", "false", "true"
).c_str()) = ::testing::Message(); }; }; gtest_dt->Abort(::
testing::internal::DeathTest::TEST_DID_NOT_DIE); break; } } }
} else gtest_label_34: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 34, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
Within the expansion of the macro 'ASSERT_DEBUG_DEATH':
a
Function call argument is an uninitialized value
32 DeclarationMatcher HasEmptyName = recordDecl(matchesName(""));switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher HasEmptyName = recordDecl(matchesName(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", HasEmptyName))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 33, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", HasEmptyName)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 34, &gtest_dt)) { goto gtest_label_34; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_34; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher HasEmptyName
= recordDecl(matchesName("")); switch (0) case 0: default: if
(const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult
(notMatches("class X {};", HasEmptyName))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 33, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", HasEmptyName)", "false", "true"
).c_str()) = ::testing::Message(); }; }; gtest_dt->Abort(::
testing::internal::DeathTest::TEST_DID_NOT_DIE); break; } } }
} else gtest_label_34: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 34, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
33 EXPECT_TRUE(notMatches("class X {};", HasEmptyName));switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher HasEmptyName = recordDecl(matchesName(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", HasEmptyName))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 33, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", HasEmptyName)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 34, &gtest_dt)) { goto gtest_label_34; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_34; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher HasEmptyName
= recordDecl(matchesName("")); switch (0) case 0: default: if
(const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult
(notMatches("class X {};", HasEmptyName))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 33, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", HasEmptyName)", "false", "true"
).c_str()) = ::testing::Message(); }; }; gtest_dt->Abort(::
testing::internal::DeathTest::TEST_DID_NOT_DIE); break; } } }
} else gtest_label_34: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 34, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
34 }, "")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher HasEmptyName = recordDecl(matchesName(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", HasEmptyName))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 33, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", HasEmptyName)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 34, &gtest_dt)) { goto gtest_label_34; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_34; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher HasEmptyName
= recordDecl(matchesName("")); switch (0) case 0: default: if
(const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult
(notMatches("class X {};", HasEmptyName))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 33, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", HasEmptyName)", "false", "true"
).c_str()) = ::testing::Message(); }; }; gtest_dt->Abort(::
testing::internal::DeathTest::TEST_DID_NOT_DIE); break; } } }
} else gtest_label_34: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 34, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
35}
36
37TEST(IsDerivedFromDeathTest, DiesOnEmptyBaseName)class IsDerivedFromDeathTest_DiesOnEmptyBaseName_Test : public
::testing::Test { public: IsDerivedFromDeathTest_DiesOnEmptyBaseName_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsDerivedFromDeathTest_DiesOnEmptyBaseName_Test
(IsDerivedFromDeathTest_DiesOnEmptyBaseName_Test const &)
; void operator=(IsDerivedFromDeathTest_DiesOnEmptyBaseName_Test
const &);};::testing::TestInfo* const IsDerivedFromDeathTest_DiesOnEmptyBaseName_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsDerivedFromDeathTest", "DiesOnEmptyBaseName", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsDerivedFromDeathTest_DiesOnEmptyBaseName_Test
>);void IsDerivedFromDeathTest_DiesOnEmptyBaseName_Test::TestBody
()
{
38 ASSERT_DEBUG_DEATH({switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher IsDerivedFromEmpty = cxxRecordDecl(isDerivedFrom(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", IsDerivedFromEmpty))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 40, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", IsDerivedFromEmpty)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 41, &gtest_dt)) { goto gtest_label_41; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_41; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher IsDerivedFromEmpty
= cxxRecordDecl(isDerivedFrom("")); switch (0) case 0: default
: if (const ::testing::AssertionResult gtest_ar_ = ::testing::
AssertionResult(notMatches("class X {};", IsDerivedFromEmpty)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 40, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", IsDerivedFromEmpty)", "false",
"true").c_str()) = ::testing::Message(); }; }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_41: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 41, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
39 DeclarationMatcher IsDerivedFromEmpty = cxxRecordDecl(isDerivedFrom(""));switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher IsDerivedFromEmpty = cxxRecordDecl(isDerivedFrom(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", IsDerivedFromEmpty))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 40, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", IsDerivedFromEmpty)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 41, &gtest_dt)) { goto gtest_label_41; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_41; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher IsDerivedFromEmpty
= cxxRecordDecl(isDerivedFrom("")); switch (0) case 0: default
: if (const ::testing::AssertionResult gtest_ar_ = ::testing::
AssertionResult(notMatches("class X {};", IsDerivedFromEmpty)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 40, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", IsDerivedFromEmpty)", "false",
"true").c_str()) = ::testing::Message(); }; }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_41: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 41, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
40 EXPECT_TRUE(notMatches("class X {};", IsDerivedFromEmpty));switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher IsDerivedFromEmpty = cxxRecordDecl(isDerivedFrom(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", IsDerivedFromEmpty))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 40, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", IsDerivedFromEmpty)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 41, &gtest_dt)) { goto gtest_label_41; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_41; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher IsDerivedFromEmpty
= cxxRecordDecl(isDerivedFrom("")); switch (0) case 0: default
: if (const ::testing::AssertionResult gtest_ar_ = ::testing::
AssertionResult(notMatches("class X {};", IsDerivedFromEmpty)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 40, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", IsDerivedFromEmpty)", "false",
"true").c_str()) = ::testing::Message(); }; }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_41: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 41, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
41 }, "")switch (0) case 0: default: if (::testing::internal::AlwaysTrue
()) { const ::testing::internal::RE& gtest_regex = (""); ::
testing::internal::DeathTest* gtest_dt; if (!::testing::internal
::DeathTest::Create("{ DeclarationMatcher IsDerivedFromEmpty = cxxRecordDecl(isDerivedFrom(\"\")); switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar_ = ::testing::AssertionResult(notMatches(\"class X {};\", IsDerivedFromEmpty))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, \"/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp\", 40, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_, \"notMatches(\\\"class X {};\\\", IsDerivedFromEmpty)\", \"false\", \"true\").c_str()) = ::testing::Message(); }"
, &gtest_regex, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 41, &gtest_dt)) { goto gtest_label_41; } if (gtest_dt !=
__null) { ::testing::internal::scoped_ptr< ::testing::internal
::DeathTest> gtest_dt_ptr(gtest_dt); switch (gtest_dt->
AssumeRole()) { case ::testing::internal::DeathTest::OVERSEE_TEST
: if (!gtest_dt->Passed(::testing::internal::ExitedUnsuccessfully
(gtest_dt->Wait()))) { goto gtest_label_41; } break; case ::
testing::internal::DeathTest::EXECUTE_TEST: { ::testing::internal
::DeathTest::ReturnSentinel gtest_sentinel(gtest_dt); if (::testing
::internal::AlwaysTrue()) { { DeclarationMatcher IsDerivedFromEmpty
= cxxRecordDecl(isDerivedFrom("")); switch (0) case 0: default
: if (const ::testing::AssertionResult gtest_ar_ = ::testing::
AssertionResult(notMatches("class X {};", IsDerivedFromEmpty)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 40, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", IsDerivedFromEmpty)", "false",
"true").c_str()) = ::testing::Message(); }; }; gtest_dt->
Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); break
; } } } } else gtest_label_41: return ::testing::internal::AssertHelper
(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 41, ::testing::internal::DeathTest::LastMessage()) = ::testing
::Message()
;
42}
43#endif
44
45TEST(Finder, DynamicOnlyAcceptsSomeMatchers)class Finder_DynamicOnlyAcceptsSomeMatchers_Test : public ::testing
::Test { public: Finder_DynamicOnlyAcceptsSomeMatchers_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Finder_DynamicOnlyAcceptsSomeMatchers_Test
(Finder_DynamicOnlyAcceptsSomeMatchers_Test const &); void
operator=(Finder_DynamicOnlyAcceptsSomeMatchers_Test const &
);};::testing::TestInfo* const Finder_DynamicOnlyAcceptsSomeMatchers_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Finder", "DynamicOnlyAcceptsSomeMatchers", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Finder_DynamicOnlyAcceptsSomeMatchers_Test
>);void Finder_DynamicOnlyAcceptsSomeMatchers_Test::TestBody
()
{
46 MatchFinder Finder;
47 EXPECT_TRUE(Finder.addDynamicMatcher(decl(), nullptr))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(Finder.addDynamicMatcher
(decl(), nullptr))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 47, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Finder.addDynamicMatcher(decl(), nullptr)", "false", "true"
).c_str()) = ::testing::Message()
;
48 EXPECT_TRUE(Finder.addDynamicMatcher(callExpr(), nullptr))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(Finder.addDynamicMatcher
(callExpr(), nullptr))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 48, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Finder.addDynamicMatcher(callExpr(), nullptr)", "false", "true"
).c_str()) = ::testing::Message()
;
49 EXPECT_TRUE(Finder.addDynamicMatcher(constantArrayType(hasSize(42)),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(Finder.addDynamicMatcher
(constantArrayType(hasSize(42)), nullptr))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 50, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Finder.addDynamicMatcher(constantArrayType(hasSize(42)), nullptr)"
, "false", "true").c_str()) = ::testing::Message()
50 nullptr))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(Finder.addDynamicMatcher
(constantArrayType(hasSize(42)), nullptr))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 50, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Finder.addDynamicMatcher(constantArrayType(hasSize(42)), nullptr)"
, "false", "true").c_str()) = ::testing::Message()
;
51
52 // Do not accept non-toplevel matchers.
53 EXPECT_FALSE(Finder.addDynamicMatcher(isArrow(), nullptr))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(Finder.addDynamicMatcher
(isArrow(), nullptr)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 53, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Finder.addDynamicMatcher(isArrow(), nullptr)", "true", "false"
).c_str()) = ::testing::Message()
;
54 EXPECT_FALSE(Finder.addDynamicMatcher(hasSize(2), nullptr))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(Finder.addDynamicMatcher
(hasSize(2), nullptr)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 54, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Finder.addDynamicMatcher(hasSize(2), nullptr)", "true", "false"
).c_str()) = ::testing::Message()
;
55 EXPECT_FALSE(Finder.addDynamicMatcher(hasName("x"), nullptr))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(Finder.addDynamicMatcher
(hasName("x"), nullptr)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 55, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Finder.addDynamicMatcher(hasName(\"x\"), nullptr)", "true"
, "false").c_str()) = ::testing::Message()
;
56}
57
58TEST(Decl, MatchesDeclarations)class Decl_MatchesDeclarations_Test : public ::testing::Test {
public: Decl_MatchesDeclarations_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Decl_MatchesDeclarations_Test(Decl_MatchesDeclarations_Test
const &); void operator=(Decl_MatchesDeclarations_Test const
&);};::testing::TestInfo* const Decl_MatchesDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Decl", "MatchesDeclarations", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Decl_MatchesDeclarations_Test>);void Decl_MatchesDeclarations_Test
::TestBody()
{
59 EXPECT_TRUE(notMatches("", decl(usingDecl())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("", decl(usingDecl
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 59, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"\", decl(usingDecl()))", "false", "true").c_str
()) = ::testing::Message()
;
60 EXPECT_TRUE(matches("namespace x { class X {}; } using x::X;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace x { class X {}; } using x::X;"
, decl(usingDecl())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 61, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace x { class X {}; } using x::X;\", decl(usingDecl()))"
, "false", "true").c_str()) = ::testing::Message()
61 decl(usingDecl())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace x { class X {}; } using x::X;"
, decl(usingDecl())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 61, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace x { class X {}; } using x::X;\", decl(usingDecl()))"
, "false", "true").c_str()) = ::testing::Message()
;
62}
63
64TEST(NameableDeclaration, MatchesVariousDecls)class NameableDeclaration_MatchesVariousDecls_Test : public ::
testing::Test { public: NameableDeclaration_MatchesVariousDecls_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); NameableDeclaration_MatchesVariousDecls_Test
(NameableDeclaration_MatchesVariousDecls_Test const &); void
operator=(NameableDeclaration_MatchesVariousDecls_Test const
&);};::testing::TestInfo* const NameableDeclaration_MatchesVariousDecls_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"NameableDeclaration", "MatchesVariousDecls", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< NameableDeclaration_MatchesVariousDecls_Test
>);void NameableDeclaration_MatchesVariousDecls_Test::TestBody
()
{
65 DeclarationMatcher NamedX = namedDecl(hasName("X"));
66 EXPECT_TRUE(matches("typedef int X;", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int X;"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 66, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int X;\", NamedX)", "false", "true").c_str
()) = ::testing::Message()
;
67 EXPECT_TRUE(matches("int X;", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int X;", NamedX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 67, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int X;\", NamedX)", "false", "true").c_str()) = ::
testing::Message()
;
68 EXPECT_TRUE(matches("class foo { virtual void X(); };", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class foo { virtual void X(); };"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 68, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class foo { virtual void X(); };\", NamedX)", "false"
, "true").c_str()) = ::testing::Message()
;
69 EXPECT_TRUE(matches("void foo() try { } catch(int X) { }", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { } catch(int X) { }"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 69, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { } catch(int X) { }\", NamedX)",
"false", "true").c_str()) = ::testing::Message()
;
70 EXPECT_TRUE(matches("void foo() { int X; }", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() { int X; }"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 70, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() { int X; }\", NamedX)", "false", "true"
).c_str()) = ::testing::Message()
;
71 EXPECT_TRUE(matches("namespace X { }", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace X { }"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 71, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace X { }\", NamedX)", "false", "true").c_str
()) = ::testing::Message()
;
72 EXPECT_TRUE(matches("enum X { A, B, C };", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("enum X { A, B, C };"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 72, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"enum X { A, B, C };\", NamedX)", "false", "true"
).c_str()) = ::testing::Message()
;
73
74 EXPECT_TRUE(notMatches("#define X 1", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("#define X 1"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 74, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"#define X 1\", NamedX)", "false", "true").c_str
()) = ::testing::Message()
;
75}
76
77TEST(NameableDeclaration, REMatchesVariousDecls)class NameableDeclaration_REMatchesVariousDecls_Test : public
::testing::Test { public: NameableDeclaration_REMatchesVariousDecls_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); NameableDeclaration_REMatchesVariousDecls_Test
(NameableDeclaration_REMatchesVariousDecls_Test const &);
void operator=(NameableDeclaration_REMatchesVariousDecls_Test
const &);};::testing::TestInfo* const NameableDeclaration_REMatchesVariousDecls_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"NameableDeclaration", "REMatchesVariousDecls", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< NameableDeclaration_REMatchesVariousDecls_Test
>);void NameableDeclaration_REMatchesVariousDecls_Test::TestBody
()
{
78 DeclarationMatcher NamedX = namedDecl(matchesName("::X"));
79 EXPECT_TRUE(matches("typedef int Xa;", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int Xa;"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 79, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int Xa;\", NamedX)", "false", "true").c_str
()) = ::testing::Message()
;
80 EXPECT_TRUE(matches("int Xb;", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int Xb;", NamedX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 80, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int Xb;\", NamedX)", "false", "true").c_str()) =
::testing::Message()
;
81 EXPECT_TRUE(matches("class foo { virtual void Xc(); };", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class foo { virtual void Xc(); };"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 81, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class foo { virtual void Xc(); };\", NamedX)", "false"
, "true").c_str()) = ::testing::Message()
;
82 EXPECT_TRUE(matches("void foo() try { } catch(int Xdef) { }", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { } catch(int Xdef) { }"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 82, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { } catch(int Xdef) { }\", NamedX)"
, "false", "true").c_str()) = ::testing::Message()
;
83 EXPECT_TRUE(matches("void foo() { int Xgh; }", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() { int Xgh; }"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 83, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() { int Xgh; }\", NamedX)", "false", "true"
).c_str()) = ::testing::Message()
;
84 EXPECT_TRUE(matches("namespace Xij { }", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace Xij { }"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 84, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace Xij { }\", NamedX)", "false", "true").
c_str()) = ::testing::Message()
;
85 EXPECT_TRUE(matches("enum X { A, B, C };", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("enum X { A, B, C };"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 85, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"enum X { A, B, C };\", NamedX)", "false", "true"
).c_str()) = ::testing::Message()
;
86
87 EXPECT_TRUE(notMatches("#define Xkl 1", NamedX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("#define Xkl 1"
, NamedX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 87, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"#define Xkl 1\", NamedX)", "false", "true").c_str
()) = ::testing::Message()
;
88
89 DeclarationMatcher StartsWithNo = namedDecl(matchesName("::no"));
90 EXPECT_TRUE(matches("int no_foo;", StartsWithNo))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int no_foo;"
, StartsWithNo))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 90, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int no_foo;\", StartsWithNo)", "false", "true").
c_str()) = ::testing::Message()
;
91 EXPECT_TRUE(matches("class foo { virtual void nobody(); };", StartsWithNo))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class foo { virtual void nobody(); };"
, StartsWithNo))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 91, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class foo { virtual void nobody(); };\", StartsWithNo)"
, "false", "true").c_str()) = ::testing::Message()
;
92
93 DeclarationMatcher Abc = namedDecl(matchesName("a.*b.*c"));
94 EXPECT_TRUE(matches("int abc;", Abc))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int abc;", Abc
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 94, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int abc;\", Abc)", "false", "true").c_str()) = ::
testing::Message()
;
95 EXPECT_TRUE(matches("int aFOObBARc;", Abc))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int aFOObBARc;"
, Abc))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 95, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int aFOObBARc;\", Abc)", "false", "true").c_str(
)) = ::testing::Message()
;
96 EXPECT_TRUE(notMatches("int cab;", Abc))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int cab;"
, Abc))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 96, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int cab;\", Abc)", "false", "true").c_str()) =
::testing::Message()
;
97 EXPECT_TRUE(matches("int cabc;", Abc))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int cabc;", Abc
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 97, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int cabc;\", Abc)", "false", "true").c_str()) = ::
testing::Message()
;
98
99 DeclarationMatcher StartsWithK = namedDecl(matchesName(":k[^:]*$"));
100 EXPECT_TRUE(matches("int k;", StartsWithK))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int k;", StartsWithK
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 100, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int k;\", StartsWithK)", "false", "true").c_str(
)) = ::testing::Message()
;
101 EXPECT_TRUE(matches("int kAbc;", StartsWithK))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int kAbc;", StartsWithK
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 101, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int kAbc;\", StartsWithK)", "false", "true").c_str
()) = ::testing::Message()
;
102 EXPECT_TRUE(matches("namespace x { int kTest; }", StartsWithK))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace x { int kTest; }"
, StartsWithK))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 102, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace x { int kTest; }\", StartsWithK)", "false"
, "true").c_str()) = ::testing::Message()
;
103 EXPECT_TRUE(matches("class C { int k; };", StartsWithK))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class C { int k; };"
, StartsWithK))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 103, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class C { int k; };\", StartsWithK)", "false", "true"
).c_str()) = ::testing::Message()
;
104 EXPECT_TRUE(notMatches("class C { int ckc; };", StartsWithK))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class C { int ckc; };"
, StartsWithK))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 104, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class C { int ckc; };\", StartsWithK)", "false"
, "true").c_str()) = ::testing::Message()
;
105}
106
107TEST(DeclarationMatcher, MatchClass)class DeclarationMatcher_MatchClass_Test : public ::testing::
Test { public: DeclarationMatcher_MatchClass_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_MatchClass_Test
(DeclarationMatcher_MatchClass_Test const &); void operator
=(DeclarationMatcher_MatchClass_Test const &);};::testing
::TestInfo* const DeclarationMatcher_MatchClass_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DeclarationMatcher"
, "MatchClass", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< DeclarationMatcher_MatchClass_Test
>);void DeclarationMatcher_MatchClass_Test::TestBody()
{
108 DeclarationMatcher ClassMatcher(recordDecl());
109 llvm::Triple Triple(llvm::sys::getDefaultTargetTriple());
110 if (Triple.getOS() != llvm::Triple::Win32 ||
111 Triple.getEnvironment() != llvm::Triple::MSVC)
112 EXPECT_FALSE(matches("", ClassMatcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("", ClassMatcher
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 112, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"\", ClassMatcher)", "true", "false").c_str()) = ::
testing::Message()
;
113 else
114 // Matches class type_info.
115 EXPECT_TRUE(matches("", ClassMatcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("", ClassMatcher
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 115, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"\", ClassMatcher)", "false", "true").c_str()) = ::
testing::Message()
;
116
117 DeclarationMatcher ClassX = recordDecl(recordDecl(hasName("X")));
118 EXPECT_TRUE(matches("class X;", ClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X;", ClassX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 118, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X;\", ClassX)", "false", "true").c_str()) =
::testing::Message()
;
119 EXPECT_TRUE(matches("class X {};", ClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
, ClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 119, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\", ClassX)", "false", "true").c_str(
)) = ::testing::Message()
;
120 EXPECT_TRUE(matches("template<class T> class X {};", ClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X {};"
, ClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 120, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X {};\", ClassX)",
"false", "true").c_str()) = ::testing::Message()
;
121 EXPECT_TRUE(notMatches("", ClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("", ClassX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 121, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"\", ClassX)", "false", "true").c_str()) = ::testing
::Message()
;
122}
123
124TEST(DeclarationMatcher, ClassIsDerived)class DeclarationMatcher_ClassIsDerived_Test : public ::testing
::Test { public: DeclarationMatcher_ClassIsDerived_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_ClassIsDerived_Test
(DeclarationMatcher_ClassIsDerived_Test const &); void operator
=(DeclarationMatcher_ClassIsDerived_Test const &);};::testing
::TestInfo* const DeclarationMatcher_ClassIsDerived_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DeclarationMatcher"
, "ClassIsDerived", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< DeclarationMatcher_ClassIsDerived_Test
>);void DeclarationMatcher_ClassIsDerived_Test::TestBody()
{
125 DeclarationMatcher IsDerivedFromX = cxxRecordDecl(isDerivedFrom("X"));
126
127 EXPECT_TRUE(matches("class X {}; class Y : public X {};", IsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Y : public X {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 127, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Y : public X {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
128 EXPECT_TRUE(notMatches("class X {};", IsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 128, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", IsDerivedFromX)", "false", "true"
).c_str()) = ::testing::Message()
;
129 EXPECT_TRUE(notMatches("class X;", IsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X;"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 129, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X;\", IsDerivedFromX)", "false", "true"
).c_str()) = ::testing::Message()
;
130 EXPECT_TRUE(notMatches("class Y;", IsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y;"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 130, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y;\", IsDerivedFromX)", "false", "true"
).c_str()) = ::testing::Message()
;
131 EXPECT_TRUE(notMatches("", IsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("", IsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 131, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"\", IsDerivedFromX)", "false", "true").c_str(
)) = ::testing::Message()
;
132
133 DeclarationMatcher IsAX = cxxRecordDecl(isSameOrDerivedFrom("X"));
134
135 EXPECT_TRUE(matches("class X {}; class Y : public X {};", IsAX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Y : public X {};"
, IsAX))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 135, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Y : public X {};\", IsAX)", "false"
, "true").c_str()) = ::testing::Message()
;
136 EXPECT_TRUE(matches("class X {};", IsAX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
, IsAX))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 136, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\", IsAX)", "false", "true").c_str())
= ::testing::Message()
;
137 EXPECT_TRUE(matches("class X;", IsAX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X;", IsAX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 137, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X;\", IsAX)", "false", "true").c_str()) = ::
testing::Message()
;
138 EXPECT_TRUE(notMatches("class Y;", IsAX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y;"
, IsAX))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 138, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y;\", IsAX)", "false", "true").c_str())
= ::testing::Message()
;
139 EXPECT_TRUE(notMatches("", IsAX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("", IsAX))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 139, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"\", IsAX)", "false", "true").c_str()) = ::testing
::Message()
;
140
141 DeclarationMatcher ZIsDerivedFromX =
142 cxxRecordDecl(hasName("Z"), isDerivedFrom("X"));
143 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Y : public X {}; class Z : public Y {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 145, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Y : public X {}; class Z : public Y {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
144 matches("class X {}; class Y : public X {}; class Z : public Y {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Y : public X {}; class Z : public Y {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 145, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Y : public X {}; class Z : public Y {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
145 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Y : public X {}; class Z : public Y {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 145, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Y : public X {}; class Z : public Y {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
146 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
"template<class T> class Y : public X {};" "class Z : public Y<int> {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 149, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\" \"template<class T> class Y : public X {};\" \"class Z : public Y<int> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
147 matches("class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
"template<class T> class Y : public X {};" "class Z : public Y<int> {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 149, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\" \"template<class T> class Y : public X {};\" \"class Z : public Y<int> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
148 "template<class T> class Y : public X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
"template<class T> class Y : public X {};" "class Z : public Y<int> {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 149, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\" \"template<class T> class Y : public X {};\" \"class Z : public Y<int> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
149 "class Z : public Y<int> {};", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
"template<class T> class Y : public X {};" "class Z : public Y<int> {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 149, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\" \"template<class T> class Y : public X {};\" \"class Z : public Y<int> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
150 EXPECT_TRUE(matches("class X {}; template<class T> class Z : public X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; template<class T> class Z : public X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 151, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; template<class T> class Z : public X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
151 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; template<class T> class Z : public X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 151, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; template<class T> class Z : public X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
152 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X {}; "
"template<class T> class Z : public X<T> {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 155, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X {}; \" \"template<class T> class Z : public X<T> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
153 matches("template<class T> class X {}; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X {}; "
"template<class T> class Z : public X<T> {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 155, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X {}; \" \"template<class T> class Z : public X<T> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
154 "template<class T> class Z : public X<T> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X {}; "
"template<class T> class Z : public X<T> {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 155, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X {}; \" \"template<class T> class Z : public X<T> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
155 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X {}; "
"template<class T> class Z : public X<T> {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 155, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X {}; \" \"template<class T> class Z : public X<T> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
156 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T, class U=T> class X {}; "
"template<class T> class Z : public X<T> {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 159, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T, class U=T> class X {}; \" \"template<class T> class Z : public X<T> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
157 matches("template<class T, class U=T> class X {}; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T, class U=T> class X {}; "
"template<class T> class Z : public X<T> {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 159, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T, class U=T> class X {}; \" \"template<class T> class Z : public X<T> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
158 "template<class T> class Z : public X<T> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T, class U=T> class X {}; "
"template<class T> class Z : public X<T> {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 159, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T, class U=T> class X {}; \" \"template<class T> class Z : public X<T> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
159 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T, class U=T> class X {}; "
"template<class T> class Z : public X<T> {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 159, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T, class U=T> class X {}; \" \"template<class T> class Z : public X<T> {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
160 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class A { class Z : public X {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 162, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class A { class Z : public X {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
161 notMatches("template<class X> class A { class Z : public X {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class A { class Z : public X {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 162, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class A { class Z : public X {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
162 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class A { class Z : public X {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 162, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class A { class Z : public X {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
163 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class X> class A { public: class Z : public X {}; }; "
"class X{}; void y() { A<X>::Z z; }", ZIsDerivedFromX)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 165, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class X> class A { public: class Z : public X {}; }; \" \"class X{}; void y() { A<X>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
164 matches("template<class X> class A { public: class Z : public X {}; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class X> class A { public: class Z : public X {}; }; "
"class X{}; void y() { A<X>::Z z; }", ZIsDerivedFromX)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 165, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class X> class A { public: class Z : public X {}; }; \" \"class X{}; void y() { A<X>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
165 "class X{}; void y() { A<X>::Z z; }", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class X> class A { public: class Z : public X {}; }; "
"class X{}; void y() { A<X>::Z z; }", ZIsDerivedFromX)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 165, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class X> class A { public: class Z : public X {}; }; \" \"class X{}; void y() { A<X>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
166 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <class T> class X {}; "
"template<class Y> class A { class Z : public X<Y> {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 169, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <class T> class X {}; \" \"template<class Y> class A { class Z : public X<Y> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
167 matches("template <class T> class X {}; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <class T> class X {}; "
"template<class Y> class A { class Z : public X<Y> {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 169, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <class T> class X {}; \" \"template<class Y> class A { class Z : public X<Y> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
168 "template<class Y> class A { class Z : public X<Y> {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <class T> class X {}; "
"template<class Y> class A { class Z : public X<Y> {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 169, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <class T> class X {}; \" \"template<class Y> class A { class Z : public X<Y> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
169 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <class T> class X {}; "
"template<class Y> class A { class Z : public X<Y> {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 169, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <class T> class X {}; \" \"template<class Y> class A { class Z : public X<Y> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
170 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<template<class T> class X> class A { "
" class Z : public X<int> {}; };", ZIsDerivedFromX)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 172, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<template<class T> class X> class A { \" \" class Z : public X<int> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
171 notMatches("template<template<class T> class X> class A { "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<template<class T> class X> class A { "
" class Z : public X<int> {}; };", ZIsDerivedFromX)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 172, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<template<class T> class X> class A { \" \" class Z : public X<int> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
172 " class Z : public X<int> {}; };", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<template<class T> class X> class A { "
" class Z : public X<int> {}; };", ZIsDerivedFromX)))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 172, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<template<class T> class X> class A { \" \" class Z : public X<int> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
173 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<template<class T> class X> class A { "
" public: class Z : public X<int> {}; }; " "template<class T> class X {}; void y() { A<X>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<template<class T> class X> class A { \" \" public: class Z : public X<int> {}; }; \" \"template<class T> class X {}; void y() { A<X>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
174 matches("template<template<class T> class X> class A { "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<template<class T> class X> class A { "
" public: class Z : public X<int> {}; }; " "template<class T> class X {}; void y() { A<X>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<template<class T> class X> class A { \" \" public: class Z : public X<int> {}; }; \" \"template<class T> class X {}; void y() { A<X>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
175 " public: class Z : public X<int> {}; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<template<class T> class X> class A { "
" public: class Z : public X<int> {}; }; " "template<class T> class X {}; void y() { A<X>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<template<class T> class X> class A { \" \" public: class Z : public X<int> {}; }; \" \"template<class T> class X {}; void y() { A<X>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
176 "template<class T> class X {}; void y() { A<X>::Z z; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<template<class T> class X> class A { "
" public: class Z : public X<int> {}; }; " "template<class T> class X {}; void y() { A<X>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<template<class T> class X> class A { \" \" public: class Z : public X<int> {}; }; \" \"template<class T> class X {}; void y() { A<X>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
177 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<template<class T> class X> class A { "
" public: class Z : public X<int> {}; }; " "template<class T> class X {}; void y() { A<X>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<template<class T> class X> class A { \" \" public: class Z : public X<int> {}; }; \" \"template<class T> class X {}; void y() { A<X>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
178 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class A { class Z : public X::D {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 180, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class A { class Z : public X::D {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
179 notMatches("template<class X> class A { class Z : public X::D {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class A { class Z : public X::D {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 180, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class A { class Z : public X::D {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
180 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class A { class Z : public X::D {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 180, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class A { class Z : public X::D {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
181 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class X> class A { public: "
" class Z : public X::D {}; }; " "class Y { public: class X {}; typedef X D; }; "
"void y() { A<Y>::Z z; }", ZIsDerivedFromX))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 185, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class X> class A { public: \" \" class Z : public X::D {}; }; \" \"class Y { public: class X {}; typedef X D; }; \" \"void y() { A<Y>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
182 matches("template<class X> class A { public: "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class X> class A { public: "
" class Z : public X::D {}; }; " "class Y { public: class X {}; typedef X D; }; "
"void y() { A<Y>::Z z; }", ZIsDerivedFromX))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 185, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class X> class A { public: \" \" class Z : public X::D {}; }; \" \"class Y { public: class X {}; typedef X D; }; \" \"void y() { A<Y>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
183 " class Z : public X::D {}; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class X> class A { public: "
" class Z : public X::D {}; }; " "class Y { public: class X {}; typedef X D; }; "
"void y() { A<Y>::Z z; }", ZIsDerivedFromX))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 185, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class X> class A { public: \" \" class Z : public X::D {}; }; \" \"class Y { public: class X {}; typedef X D; }; \" \"void y() { A<Y>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
184 "class Y { public: class X {}; typedef X D; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class X> class A { public: "
" class Z : public X::D {}; }; " "class Y { public: class X {}; typedef X D; }; "
"void y() { A<Y>::Z z; }", ZIsDerivedFromX))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 185, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class X> class A { public: \" \" class Z : public X::D {}; }; \" \"class Y { public: class X {}; typedef X D; }; \" \"void y() { A<Y>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
185 "void y() { A<Y>::Z z; }", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class X> class A { public: "
" class Z : public X::D {}; }; " "class Y { public: class X {}; typedef X D; }; "
"void y() { A<Y>::Z z; }", ZIsDerivedFromX))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 185, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class X> class A { public: \" \" class Z : public X::D {}; }; \" \"class Y { public: class X {}; typedef X D; }; \" \"void y() { A<Y>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
186 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X Y; class Z : public Y {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 188, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X Y; class Z : public Y {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
187 matches("class X {}; typedef X Y; class Z : public Y {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X Y; class Z : public Y {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 188, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X Y; class Z : public Y {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
188 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X Y; class Z : public Y {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 188, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X Y; class Z : public Y {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
189 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class Y { typedef typename T::U X; "
" class Z : public X {}; };", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 191, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class Y { typedef typename T::U X; \" \" class Z : public X {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
190 matches("template<class T> class Y { typedef typename T::U X; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class Y { typedef typename T::U X; "
" class Z : public X {}; };", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 191, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class Y { typedef typename T::U X; \" \" class Z : public X {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
191 " class Z : public X {}; };", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class Y { typedef typename T::U X; "
" class Z : public X {}; };", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 191, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class Y { typedef typename T::U X; \" \" class Z : public X {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
192 EXPECT_TRUE(matches("class X {}; class Z : public ::X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Z : public ::X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 193, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Z : public ::X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
193 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Z : public ::X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 193, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Z : public ::X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
194 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class T> class X {}; "
"template<class T> class A { class Z : public X<T>::D {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 197, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class T> class X {}; \" \"template<class T> class A { class Z : public X<T>::D {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
195 notMatches("template<class T> class X {}; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class T> class X {}; "
"template<class T> class A { class Z : public X<T>::D {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 197, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class T> class X {}; \" \"template<class T> class A { class Z : public X<T>::D {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
196 "template<class T> class A { class Z : public X<T>::D {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class T> class X {}; "
"template<class T> class A { class Z : public X<T>::D {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 197, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class T> class X {}; \" \"template<class T> class A { class Z : public X<T>::D {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
197 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class T> class X {}; "
"template<class T> class A { class Z : public X<T>::D {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 197, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class T> class X {}; \" \"template<class T> class A { class Z : public X<T>::D {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
198 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X { public: typedef X<T> D; }; "
"template<class T> class A { public: " " class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 202, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X { public: typedef X<T> D; }; \" \"template<class T> class A { public: \" \" class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
199 matches("template<class T> class X { public: typedef X<T> D; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X { public: typedef X<T> D; }; "
"template<class T> class A { public: " " class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 202, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X { public: typedef X<T> D; }; \" \"template<class T> class A { public: \" \" class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
200 "template<class T> class A { public: "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X { public: typedef X<T> D; }; "
"template<class T> class A { public: " " class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 202, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X { public: typedef X<T> D; }; \" \"template<class T> class A { public: \" \" class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
201 " class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X { public: typedef X<T> D; }; "
"template<class T> class A { public: " " class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 202, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X { public: typedef X<T> D; }; \" \"template<class T> class A { public: \" \" class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
202 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T> class X { public: typedef X<T> D; }; "
"template<class T> class A { public: " " class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 202, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T> class X { public: typedef X<T> D; }; \" \"template<class T> class A { public: \" \" class Z : public X<T>::D {}; }; void y() { A<int>::Z z; }\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
203 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class A { class Z : public X::D::E {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 205, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class A { class Z : public X::D::E {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
204 notMatches("template<class X> class A { class Z : public X::D::E {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class A { class Z : public X::D::E {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 205, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class A { class Z : public X::D::E {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
205 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class A { class Z : public X::D::E {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 205, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class A { class Z : public X::D::E {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
206 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X V; typedef V W; class Z : public W {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 208, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X V; typedef V W; class Z : public W {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
207 matches("class X {}; typedef X V; typedef V W; class Z : public W {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X V; typedef V W; class Z : public W {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 208, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X V; typedef V W; class Z : public W {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
208 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X V; typedef V W; class Z : public W {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 208, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X V; typedef V W; class Z : public W {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
209 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Y : public X {}; "
"typedef Y V; typedef V W; class Z : public W {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 212, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Y : public X {}; \" \"typedef Y V; typedef V W; class Z : public W {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
210 matches("class X {}; class Y : public X {}; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Y : public X {}; "
"typedef Y V; typedef V W; class Z : public W {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 212, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Y : public X {}; \" \"typedef Y V; typedef V W; class Z : public W {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
211 "typedef Y V; typedef V W; class Z : public W {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Y : public X {}; "
"typedef Y V; typedef V W; class Z : public W {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 212, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Y : public X {}; \" \"typedef Y V; typedef V W; class Z : public W {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
212 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Y : public X {}; "
"typedef Y V; typedef V W; class Z : public W {};", ZIsDerivedFromX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 212, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Y : public X {}; \" \"typedef Y V; typedef V W; class Z : public W {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
213 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T, class U> class X {}; "
"template<class T> class A { class Z : public X<T, int> {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 216, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T, class U> class X {}; \" \"template<class T> class A { class Z : public X<T, int> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
214 matches("template<class T, class U> class X {}; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T, class U> class X {}; "
"template<class T> class A { class Z : public X<T, int> {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 216, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T, class U> class X {}; \" \"template<class T> class A { class Z : public X<T, int> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
215 "template<class T> class A { class Z : public X<T, int> {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T, class U> class X {}; "
"template<class T> class A { class Z : public X<T, int> {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 216, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T, class U> class X {}; \" \"template<class T> class A { class Z : public X<T, int> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
216 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<class T, class U> class X {}; "
"template<class T> class A { class Z : public X<T, int> {}; };"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 216, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<class T, class U> class X {}; \" \"template<class T> class A { class Z : public X<T, int> {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
217 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class D { typedef X A; typedef A B; "
" typedef B C; class Z : public C {}; };", ZIsDerivedFromX)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 220, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class D { typedef X A; typedef A B; \" \" typedef B C; class Z : public C {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
218 notMatches("template<class X> class D { typedef X A; typedef A B; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class D { typedef X A; typedef A B; "
" typedef B C; class Z : public C {}; };", ZIsDerivedFromX)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 220, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class D { typedef X A; typedef A B; \" \" typedef B C; class Z : public C {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
219 " typedef B C; class Z : public C {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class D { typedef X A; typedef A B; "
" typedef B C; class Z : public C {}; };", ZIsDerivedFromX)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 220, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class D { typedef X A; typedef A B; \" \" typedef B C; class Z : public C {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
220 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<class X> class D { typedef X A; typedef A B; "
" typedef B C; class Z : public C {}; };", ZIsDerivedFromX)
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 220, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<class X> class D { typedef X A; typedef A B; \" \" typedef B C; class Z : public C {}; };\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
221 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X A; typedef A B; "
"class Z : public B {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 223, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X A; typedef A B; \" \"class Z : public B {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
222 matches("class X {}; typedef X A; typedef A B; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X A; typedef A B; "
"class Z : public B {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 223, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X A; typedef A B; \" \"class Z : public B {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
223 "class Z : public B {};", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X A; typedef A B; "
"class Z : public B {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 223, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X A; typedef A B; \" \"class Z : public B {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
224 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X A; typedef A B; typedef B C; "
"class Z : public C {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 226, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X A; typedef A B; typedef B C; \" \"class Z : public C {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
225 matches("class X {}; typedef X A; typedef A B; typedef B C; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X A; typedef A B; typedef B C; "
"class Z : public C {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 226, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X A; typedef A B; typedef B C; \" \"class Z : public C {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
226 "class Z : public C {};", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; typedef X A; typedef A B; typedef B C; "
"class Z : public C {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 226, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; typedef X A; typedef A B; typedef B C; \" \"class Z : public C {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
227 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class U {}; typedef U X; typedef X V; "
"class Z : public V {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 229, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class U {}; typedef U X; typedef X V; \" \"class Z : public V {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
228 matches("class U {}; typedef U X; typedef X V; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class U {}; typedef U X; typedef X V; "
"class Z : public V {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 229, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class U {}; typedef U X; typedef X V; \" \"class Z : public V {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
229 "class Z : public V {};", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class U {}; typedef U X; typedef X V; "
"class Z : public V {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 229, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class U {}; typedef U X; typedef X V; \" \"class Z : public V {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
230 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Base {}; typedef Base X; "
"class Z : public Base {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 232, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Base {}; typedef Base X; \" \"class Z : public Base {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
231 matches("class Base {}; typedef Base X; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Base {}; typedef Base X; "
"class Z : public Base {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 232, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Base {}; typedef Base X; \" \"class Z : public Base {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
232 "class Z : public Base {};", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Base {}; typedef Base X; "
"class Z : public Base {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 232, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Base {}; typedef Base X; \" \"class Z : public Base {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
233 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Base {}; typedef Base Base2; typedef Base2 X; "
"class Z : public Base {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 235, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Base {}; typedef Base Base2; typedef Base2 X; \" \"class Z : public Base {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
234 matches("class Base {}; typedef Base Base2; typedef Base2 X; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Base {}; typedef Base Base2; typedef Base2 X; "
"class Z : public Base {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 235, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Base {}; typedef Base Base2; typedef Base2 X; \" \"class Z : public Base {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
235 "class Z : public Base {};", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Base {}; typedef Base Base2; typedef Base2 X; "
"class Z : public Base {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 235, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Base {}; typedef Base Base2; typedef Base2 X; \" \"class Z : public Base {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
236 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Base {}; class Base2 {}; typedef Base2 X; "
"class Z : public Base {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 238, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Base {}; class Base2 {}; typedef Base2 X; \" \"class Z : public Base {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
237 notMatches("class Base {}; class Base2 {}; typedef Base2 X; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Base {}; class Base2 {}; typedef Base2 X; "
"class Z : public Base {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 238, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Base {}; class Base2 {}; typedef Base2 X; \" \"class Z : public Base {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
238 "class Z : public Base {};", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Base {}; class Base2 {}; typedef Base2 X; "
"class Z : public Base {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 238, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Base {}; class Base2 {}; typedef Base2 X; \" \"class Z : public Base {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
239 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A {}; typedef A X; typedef A Y; "
"class Z : public Y {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 241, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A {}; typedef A X; typedef A Y; \" \"class Z : public Y {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
240 matches("class A {}; typedef A X; typedef A Y; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A {}; typedef A X; typedef A Y; "
"class Z : public Y {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 241, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A {}; typedef A X; typedef A Y; \" \"class Z : public Y {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
241 "class Z : public Y {};", ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A {}; typedef A X; typedef A Y; "
"class Z : public Y {};", ZIsDerivedFromX))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 241, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A {}; typedef A X; typedef A Y; \" \"class Z : public Y {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
242 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> class Z;"
"template <> class Z<void> {};" "template <typename T> class Z : public Z<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 246, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
243 notMatches("template <typename T> class Z;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> class Z;"
"template <> class Z<void> {};" "template <typename T> class Z : public Z<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 246, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
244 "template <> class Z<void> {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> class Z;"
"template <> class Z<void> {};" "template <typename T> class Z : public Z<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 246, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
245 "template <typename T> class Z : public Z<void> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> class Z;"
"template <> class Z<void> {};" "template <typename T> class Z : public Z<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 246, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
246 IsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> class Z;"
"template <> class Z<void> {};" "template <typename T> class Z : public Z<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 246, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
247 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class X;"
"template <> class X<void> {};" "template <typename T> class X : public X<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 251, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class X;\" \"template <> class X<void> {};\" \"template <typename T> class X : public X<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
248 matches("template <typename T> class X;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class X;"
"template <> class X<void> {};" "template <typename T> class X : public X<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 251, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class X;\" \"template <> class X<void> {};\" \"template <typename T> class X : public X<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
249 "template <> class X<void> {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class X;"
"template <> class X<void> {};" "template <typename T> class X : public X<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 251, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class X;\" \"template <> class X<void> {};\" \"template <typename T> class X : public X<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
250 "template <typename T> class X : public X<void> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class X;"
"template <> class X<void> {};" "template <typename T> class X : public X<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 251, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class X;\" \"template <> class X<void> {};\" \"template <typename T> class X : public X<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
251 IsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class X;"
"template <> class X<void> {};" "template <typename T> class X : public X<void> {};"
, IsDerivedFromX))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 251, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class X;\" \"template <> class X<void> {};\" \"template <typename T> class X : public X<void> {};\", IsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
252 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {};"
"template <typename T> class Z;" "template <> class Z<void> {};"
"template <typename T> class Z : public Z<void>, public X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {};\" \"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void>, public X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
253 "class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {};"
"template <typename T> class Z;" "template <> class Z<void> {};"
"template <typename T> class Z : public Z<void>, public X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {};\" \"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void>, public X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
254 "template <typename T> class Z;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {};"
"template <typename T> class Z;" "template <> class Z<void> {};"
"template <typename T> class Z : public Z<void>, public X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {};\" \"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void>, public X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
255 "template <> class Z<void> {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {};"
"template <typename T> class Z;" "template <> class Z<void> {};"
"template <typename T> class Z : public Z<void>, public X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {};\" \"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void>, public X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
256 "template <typename T> class Z : public Z<void>, public X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {};"
"template <typename T> class Z;" "template <> class Z<void> {};"
"template <typename T> class Z : public Z<void>, public X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {};\" \"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void>, public X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
257 ZIsDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {};"
"template <typename T> class Z;" "template <> class Z<void> {};"
"template <typename T> class Z : public Z<void>, public X {};"
, ZIsDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {};\" \"template <typename T> class Z;\" \"template <> class Z<void> {};\" \"template <typename T> class Z : public Z<void>, public X {};\", ZIsDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
258 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<int> struct X;"
"template<int i> struct X : public X<i-1> {};", cxxRecordDecl
(isDerivedFrom(recordDecl(hasName("Some"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 261, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\", cxxRecordDecl(isDerivedFrom(recordDecl(hasName(\"Some\")))))"
, "false", "true").c_str()) = ::testing::Message()
259 notMatches("template<int> struct X;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<int> struct X;"
"template<int i> struct X : public X<i-1> {};", cxxRecordDecl
(isDerivedFrom(recordDecl(hasName("Some"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 261, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\", cxxRecordDecl(isDerivedFrom(recordDecl(hasName(\"Some\")))))"
, "false", "true").c_str()) = ::testing::Message()
260 "template<int i> struct X : public X<i-1> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<int> struct X;"
"template<int i> struct X : public X<i-1> {};", cxxRecordDecl
(isDerivedFrom(recordDecl(hasName("Some"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 261, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\", cxxRecordDecl(isDerivedFrom(recordDecl(hasName(\"Some\")))))"
, "false", "true").c_str()) = ::testing::Message()
261 cxxRecordDecl(isDerivedFrom(recordDecl(hasName("Some"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<int> struct X;"
"template<int i> struct X : public X<i-1> {};", cxxRecordDecl
(isDerivedFrom(recordDecl(hasName("Some"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 261, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\", cxxRecordDecl(isDerivedFrom(recordDecl(hasName(\"Some\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
262 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {};"
"template<int> struct X;" "template<int i> struct X : public X<i-1> {};"
"template<> struct X<0> : public A {};" "struct B : public X<42> {};"
, cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl(hasName
("A"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {};\" \"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\" \"template<> struct X<0> : public A {};\" \"struct B : public X<42> {};\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
263 "struct A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {};"
"template<int> struct X;" "template<int i> struct X : public X<i-1> {};"
"template<> struct X<0> : public A {};" "struct B : public X<42> {};"
, cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl(hasName
("A"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {};\" \"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\" \"template<> struct X<0> : public A {};\" \"struct B : public X<42> {};\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
264 "template<int> struct X;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {};"
"template<int> struct X;" "template<int i> struct X : public X<i-1> {};"
"template<> struct X<0> : public A {};" "struct B : public X<42> {};"
, cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl(hasName
("A"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {};\" \"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\" \"template<> struct X<0> : public A {};\" \"struct B : public X<42> {};\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
265 "template<int i> struct X : public X<i-1> {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {};"
"template<int> struct X;" "template<int i> struct X : public X<i-1> {};"
"template<> struct X<0> : public A {};" "struct B : public X<42> {};"
, cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl(hasName
("A"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {};\" \"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\" \"template<> struct X<0> : public A {};\" \"struct B : public X<42> {};\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
266 "template<> struct X<0> : public A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {};"
"template<int> struct X;" "template<int i> struct X : public X<i-1> {};"
"template<> struct X<0> : public A {};" "struct B : public X<42> {};"
, cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl(hasName
("A"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {};\" \"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\" \"template<> struct X<0> : public A {};\" \"struct B : public X<42> {};\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
267 "struct B : public X<42> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {};"
"template<int> struct X;" "template<int i> struct X : public X<i-1> {};"
"template<> struct X<0> : public A {};" "struct B : public X<42> {};"
, cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl(hasName
("A"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {};\" \"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\" \"template<> struct X<0> : public A {};\" \"struct B : public X<42> {};\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
268 cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl(hasName("A"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {};"
"template<int> struct X;" "template<int i> struct X : public X<i-1> {};"
"template<> struct X<0> : public A {};" "struct B : public X<42> {};"
, cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl(hasName
("A"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {};\" \"template<int> struct X;\" \"template<int i> struct X : public X<i-1> {};\" \"template<> struct X<0> : public A {};\" \"struct B : public X<42> {};\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
269
270 // FIXME: Once we have better matchers for template type matching,
271 // get rid of the Variable(...) matching and match the right template
272 // declarations directly.
273 const char *RecursiveTemplateOneParameter =
274 "class Base1 {}; class Base2 {};"
275 "template <typename T> class Z;"
276 "template <> class Z<void> : public Base1 {};"
277 "template <> class Z<int> : public Base2 {};"
278 "template <> class Z<float> : public Z<void> {};"
279 "template <> class Z<double> : public Z<int> {};"
280 "template <typename T> class Z : public Z<float>, public Z<double> {};"
281 "void f() { Z<float> z_float; Z<double> z_double; Z<char> z_char; }";
282 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateOneParameter
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 285, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"))))))"
, "false", "true").c_str()) = ::testing::Message()
283 RecursiveTemplateOneParameter,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateOneParameter
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 285, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"))))))"
, "false", "true").c_str()) = ::testing::Message()
284 varDecl(hasName("z_float"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateOneParameter
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 285, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"))))))"
, "false", "true").c_str()) = ::testing::Message()
285 hasInitializer(hasType(cxxRecordDecl(isDerivedFrom("Base1")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateOneParameter
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 285, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
286 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( RecursiveTemplateOneParameter
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base2")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 289, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
287 RecursiveTemplateOneParameter,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( RecursiveTemplateOneParameter
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base2")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 289, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
288 varDecl(hasName("z_float"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( RecursiveTemplateOneParameter
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base2")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 289, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
289 hasInitializer(hasType(cxxRecordDecl(isDerivedFrom("Base2")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( RecursiveTemplateOneParameter
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base2")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 289, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
290 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateOneParameter
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 294, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
291 RecursiveTemplateOneParameter,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateOneParameter
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 294, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
292 varDecl(hasName("z_char"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateOneParameter
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 294, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
293 hasInitializer(hasType(cxxRecordDecl(isDerivedFrom("Base1"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateOneParameter
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 294, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
294 isDerivedFrom("Base2")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateOneParameter
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 294, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateOneParameter, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
295
296 const char *RecursiveTemplateTwoParameters =
297 "class Base1 {}; class Base2 {};"
298 "template <typename T1, typename T2> class Z;"
299 "template <typename T> class Z<void, T> : public Base1 {};"
300 "template <typename T> class Z<int, T> : public Base2 {};"
301 "template <typename T> class Z<float, T> : public Z<void, T> {};"
302 "template <typename T> class Z<double, T> : public Z<int, T> {};"
303 "template <typename T1, typename T2> class Z : "
304 " public Z<float, T2>, public Z<double, T2> {};"
305 "void f() { Z<float, void> z_float; Z<double, void> z_double; "
306 " Z<char, void> z_char; }";
307 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 310, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"))))))"
, "false", "true").c_str()) = ::testing::Message()
308 RecursiveTemplateTwoParameters,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 310, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"))))))"
, "false", "true").c_str()) = ::testing::Message()
309 varDecl(hasName("z_float"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 310, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"))))))"
, "false", "true").c_str()) = ::testing::Message()
310 hasInitializer(hasType(cxxRecordDecl(isDerivedFrom("Base1")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 310, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
311 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base2")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 314, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
312 RecursiveTemplateTwoParameters,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base2")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 314, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
313 varDecl(hasName("z_float"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base2")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 314, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
314 hasInitializer(hasType(cxxRecordDecl(isDerivedFrom("Base2")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_float"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base2")))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 314, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_float\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
315 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 319, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
316 RecursiveTemplateTwoParameters,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 319, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
317 varDecl(hasName("z_char"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 319, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
318 hasInitializer(hasType(cxxRecordDecl(isDerivedFrom("Base1"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 319, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
319 isDerivedFrom("Base2")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( RecursiveTemplateTwoParameters
, varDecl(hasName("z_char"), hasInitializer(hasType(cxxRecordDecl
(isDerivedFrom("Base1"), isDerivedFrom("Base2")))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 319, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( RecursiveTemplateTwoParameters, varDecl(hasName(\"z_char\"), hasInitializer(hasType(cxxRecordDecl(isDerivedFrom(\"Base1\"), isDerivedFrom(\"Base2\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
320 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace ns { class X {}; class Y : public X {}; }"
, cxxRecordDecl(isDerivedFrom("::ns::X"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 322, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace ns { class X {}; class Y : public X {}; }\", cxxRecordDecl(isDerivedFrom(\"::ns::X\")))"
, "false", "true").c_str()) = ::testing::Message()
321 "namespace ns { class X {}; class Y : public X {}; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace ns { class X {}; class Y : public X {}; }"
, cxxRecordDecl(isDerivedFrom("::ns::X"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 322, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace ns { class X {}; class Y : public X {}; }\", cxxRecordDecl(isDerivedFrom(\"::ns::X\")))"
, "false", "true").c_str()) = ::testing::Message()
322 cxxRecordDecl(isDerivedFrom("::ns::X"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace ns { class X {}; class Y : public X {}; }"
, cxxRecordDecl(isDerivedFrom("::ns::X"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 322, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace ns { class X {}; class Y : public X {}; }\", cxxRecordDecl(isDerivedFrom(\"::ns::X\")))"
, "false", "true").c_str()) = ::testing::Message()
;
323 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X {}; class Y : public X {};"
, cxxRecordDecl(isDerivedFrom("::ns::X"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 325, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X {}; class Y : public X {};\", cxxRecordDecl(isDerivedFrom(\"::ns::X\")))"
, "false", "true").c_str()) = ::testing::Message()
324 "class X {}; class Y : public X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X {}; class Y : public X {};"
, cxxRecordDecl(isDerivedFrom("::ns::X"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 325, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X {}; class Y : public X {};\", cxxRecordDecl(isDerivedFrom(\"::ns::X\")))"
, "false", "true").c_str()) = ::testing::Message()
325 cxxRecordDecl(isDerivedFrom("::ns::X"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X {}; class Y : public X {};"
, cxxRecordDecl(isDerivedFrom("::ns::X"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 325, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X {}; class Y : public X {};\", cxxRecordDecl(isDerivedFrom(\"::ns::X\")))"
, "false", "true").c_str()) = ::testing::Message()
;
326
327 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; class Y : public X {};"
, cxxRecordDecl(isDerivedFrom(recordDecl(hasName("X")).bind("test"
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 329, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; class Y : public X {};\", cxxRecordDecl(isDerivedFrom(recordDecl(hasName(\"X\")).bind(\"test\"))))"
, "false", "true").c_str()) = ::testing::Message()
328 "class X {}; class Y : public X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; class Y : public X {};"
, cxxRecordDecl(isDerivedFrom(recordDecl(hasName("X")).bind("test"
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 329, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; class Y : public X {};\", cxxRecordDecl(isDerivedFrom(recordDecl(hasName(\"X\")).bind(\"test\"))))"
, "false", "true").c_str()) = ::testing::Message()
329 cxxRecordDecl(isDerivedFrom(recordDecl(hasName("X")).bind("test")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; class Y : public X {};"
, cxxRecordDecl(isDerivedFrom(recordDecl(hasName("X")).bind("test"
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 329, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; class Y : public X {};\", cxxRecordDecl(isDerivedFrom(recordDecl(hasName(\"X\")).bind(\"test\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
330
331 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> class X {};"
"template<typename T> using Z = X<T>;" "template <typename T> class Y : Z<T> {};"
, cxxRecordDecl(isDerivedFrom(namedDecl(hasName("X"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 335, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> class X {};\" \"template<typename T> using Z = X<T>;\" \"template <typename T> class Y : Z<T> {};\", cxxRecordDecl(isDerivedFrom(namedDecl(hasName(\"X\")))))"
, "false", "true").c_str()) = ::testing::Message()
332 "template<typename T> class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> class X {};"
"template<typename T> using Z = X<T>;" "template <typename T> class Y : Z<T> {};"
, cxxRecordDecl(isDerivedFrom(namedDecl(hasName("X"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 335, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> class X {};\" \"template<typename T> using Z = X<T>;\" \"template <typename T> class Y : Z<T> {};\", cxxRecordDecl(isDerivedFrom(namedDecl(hasName(\"X\")))))"
, "false", "true").c_str()) = ::testing::Message()
333 "template<typename T> using Z = X<T>;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> class X {};"
"template<typename T> using Z = X<T>;" "template <typename T> class Y : Z<T> {};"
, cxxRecordDecl(isDerivedFrom(namedDecl(hasName("X"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 335, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> class X {};\" \"template<typename T> using Z = X<T>;\" \"template <typename T> class Y : Z<T> {};\", cxxRecordDecl(isDerivedFrom(namedDecl(hasName(\"X\")))))"
, "false", "true").c_str()) = ::testing::Message()
334 "template <typename T> class Y : Z<T> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> class X {};"
"template<typename T> using Z = X<T>;" "template <typename T> class Y : Z<T> {};"
, cxxRecordDecl(isDerivedFrom(namedDecl(hasName("X"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 335, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> class X {};\" \"template<typename T> using Z = X<T>;\" \"template <typename T> class Y : Z<T> {};\", cxxRecordDecl(isDerivedFrom(namedDecl(hasName(\"X\")))))"
, "false", "true").c_str()) = ::testing::Message()
335 cxxRecordDecl(isDerivedFrom(namedDecl(hasName("X"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> class X {};"
"template<typename T> using Z = X<T>;" "template <typename T> class Y : Z<T> {};"
, cxxRecordDecl(isDerivedFrom(namedDecl(hasName("X"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 335, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> class X {};\" \"template<typename T> using Z = X<T>;\" \"template <typename T> class Y : Z<T> {};\", cxxRecordDecl(isDerivedFrom(namedDecl(hasName(\"X\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
336}
337
338TEST(DeclarationMatcher, hasMethod)class DeclarationMatcher_hasMethod_Test : public ::testing::Test
{ public: DeclarationMatcher_hasMethod_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_hasMethod_Test(
DeclarationMatcher_hasMethod_Test const &); void operator
=(DeclarationMatcher_hasMethod_Test const &);};::testing::
TestInfo* const DeclarationMatcher_hasMethod_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DeclarationMatcher"
, "hasMethod", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< DeclarationMatcher_hasMethod_Test
>);void DeclarationMatcher_hasMethod_Test::TestBody()
{
339 EXPECT_TRUE(matches("class A { void func(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { void func(); };"
, cxxRecordDecl(hasMethod(hasName("func")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 340, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { void func(); };\", cxxRecordDecl(hasMethod(hasName(\"func\"))))"
, "false", "true").c_str()) = ::testing::Message()
340 cxxRecordDecl(hasMethod(hasName("func")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { void func(); };"
, cxxRecordDecl(hasMethod(hasName("func")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 340, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { void func(); };\", cxxRecordDecl(hasMethod(hasName(\"func\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
341 EXPECT_TRUE(notMatches("class A { void func(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { void func(); };"
, cxxRecordDecl(hasMethod(isPublic()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 342, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { void func(); };\", cxxRecordDecl(hasMethod(isPublic())))"
, "false", "true").c_str()) = ::testing::Message()
342 cxxRecordDecl(hasMethod(isPublic()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { void func(); };"
, cxxRecordDecl(hasMethod(isPublic()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 342, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { void func(); };\", cxxRecordDecl(hasMethod(isPublic())))"
, "false", "true").c_str()) = ::testing::Message()
;
343}
344
345TEST(DeclarationMatcher, ClassDerivedFromDependentTemplateSpecialization)class DeclarationMatcher_ClassDerivedFromDependentTemplateSpecialization_Test
: public ::testing::Test { public: DeclarationMatcher_ClassDerivedFromDependentTemplateSpecialization_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclarationMatcher_ClassDerivedFromDependentTemplateSpecialization_Test
(DeclarationMatcher_ClassDerivedFromDependentTemplateSpecialization_Test
const &); void operator=(DeclarationMatcher_ClassDerivedFromDependentTemplateSpecialization_Test
const &);};::testing::TestInfo* const DeclarationMatcher_ClassDerivedFromDependentTemplateSpecialization_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "ClassDerivedFromDependentTemplateSpecialization"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< DeclarationMatcher_ClassDerivedFromDependentTemplateSpecialization_Test
>);void DeclarationMatcher_ClassDerivedFromDependentTemplateSpecialization_Test
::TestBody()
{
346 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A {"
" template <typename T2> struct F {};" "};" "template <typename T> struct B : A<T>::template F<T> {};"
"B<int> b;", cxxRecordDecl(hasName("B"), isDerivedFrom
(recordDecl()))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 352, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A {\" \" template <typename T2> struct F {};\" \"};\" \"template <typename T> struct B : A<T>::template F<T> {};\" \"B<int> b;\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
347 "template <typename T> struct A {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A {"
" template <typename T2> struct F {};" "};" "template <typename T> struct B : A<T>::template F<T> {};"
"B<int> b;", cxxRecordDecl(hasName("B"), isDerivedFrom
(recordDecl()))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 352, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A {\" \" template <typename T2> struct F {};\" \"};\" \"template <typename T> struct B : A<T>::template F<T> {};\" \"B<int> b;\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
348 " template <typename T2> struct F {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A {"
" template <typename T2> struct F {};" "};" "template <typename T> struct B : A<T>::template F<T> {};"
"B<int> b;", cxxRecordDecl(hasName("B"), isDerivedFrom
(recordDecl()))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 352, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A {\" \" template <typename T2> struct F {};\" \"};\" \"template <typename T> struct B : A<T>::template F<T> {};\" \"B<int> b;\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
349 "};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A {"
" template <typename T2> struct F {};" "};" "template <typename T> struct B : A<T>::template F<T> {};"
"B<int> b;", cxxRecordDecl(hasName("B"), isDerivedFrom
(recordDecl()))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 352, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A {\" \" template <typename T2> struct F {};\" \"};\" \"template <typename T> struct B : A<T>::template F<T> {};\" \"B<int> b;\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
350 "template <typename T> struct B : A<T>::template F<T> {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A {"
" template <typename T2> struct F {};" "};" "template <typename T> struct B : A<T>::template F<T> {};"
"B<int> b;", cxxRecordDecl(hasName("B"), isDerivedFrom
(recordDecl()))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 352, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A {\" \" template <typename T2> struct F {};\" \"};\" \"template <typename T> struct B : A<T>::template F<T> {};\" \"B<int> b;\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
351 "B<int> b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A {"
" template <typename T2> struct F {};" "};" "template <typename T> struct B : A<T>::template F<T> {};"
"B<int> b;", cxxRecordDecl(hasName("B"), isDerivedFrom
(recordDecl()))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 352, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A {\" \" template <typename T2> struct F {};\" \"};\" \"template <typename T> struct B : A<T>::template F<T> {};\" \"B<int> b;\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
352 cxxRecordDecl(hasName("B"), isDerivedFrom(recordDecl()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A {"
" template <typename T2> struct F {};" "};" "template <typename T> struct B : A<T>::template F<T> {};"
"B<int> b;", cxxRecordDecl(hasName("B"), isDerivedFrom
(recordDecl()))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 352, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A {\" \" template <typename T2> struct F {};\" \"};\" \"template <typename T> struct B : A<T>::template F<T> {};\" \"B<int> b;\", cxxRecordDecl(hasName(\"B\"), isDerivedFrom(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
;
353}
354
355TEST(DeclarationMatcher, hasDeclContext)class DeclarationMatcher_hasDeclContext_Test : public ::testing
::Test { public: DeclarationMatcher_hasDeclContext_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_hasDeclContext_Test
(DeclarationMatcher_hasDeclContext_Test const &); void operator
=(DeclarationMatcher_hasDeclContext_Test const &);};::testing
::TestInfo* const DeclarationMatcher_hasDeclContext_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DeclarationMatcher"
, "hasDeclContext", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< DeclarationMatcher_hasDeclContext_Test
>);void DeclarationMatcher_hasDeclContext_Test::TestBody()
{
356 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("M"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"M\")))))"
, "false", "true").c_str()) = ::testing::Message()
357 "namespace N {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("M"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"M\")))))"
, "false", "true").c_str()) = ::testing::Message()
358 " namespace M {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("M"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"M\")))))"
, "false", "true").c_str()) = ::testing::Message()
359 " class D {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("M"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"M\")))))"
, "false", "true").c_str()) = ::testing::Message()
360 " }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("M"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"M\")))))"
, "false", "true").c_str()) = ::testing::Message()
361 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("M"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"M\")))))"
, "false", "true").c_str()) = ::testing::Message()
362 recordDecl(hasDeclContext(namespaceDecl(hasName("M"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("M"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"M\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
363 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("N"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"N\")))))"
, "false", "true").c_str()) = ::testing::Message()
364 "namespace N {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("N"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"N\")))))"
, "false", "true").c_str()) = ::testing::Message()
365 " namespace M {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("N"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"N\")))))"
, "false", "true").c_str()) = ::testing::Message()
366 " class D {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("N"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"N\")))))"
, "false", "true").c_str()) = ::testing::Message()
367 " }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("N"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"N\")))))"
, "false", "true").c_str()) = ::testing::Message()
368 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("N"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"N\")))))"
, "false", "true").c_str()) = ::testing::Message()
369 recordDecl(hasDeclContext(namespaceDecl(hasName("N"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace N {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl(hasName("N"))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl(hasName(\"N\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
370
371 EXPECT_TRUE(matches("namespace {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl( hasName("M"), hasDeclContext(namespaceDecl())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl( hasName(\"M\"), hasDeclContext(namespaceDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
372 " namespace M {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl( hasName("M"), hasDeclContext(namespaceDecl())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl( hasName(\"M\"), hasDeclContext(namespaceDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
373 " class D {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl( hasName("M"), hasDeclContext(namespaceDecl())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl( hasName(\"M\"), hasDeclContext(namespaceDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
374 " }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl( hasName("M"), hasDeclContext(namespaceDecl())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl( hasName(\"M\"), hasDeclContext(namespaceDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
375 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl( hasName("M"), hasDeclContext(namespaceDecl())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl( hasName(\"M\"), hasDeclContext(namespaceDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
376 recordDecl(hasDeclContext(namespaceDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl( hasName("M"), hasDeclContext(namespaceDecl())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl( hasName(\"M\"), hasDeclContext(namespaceDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
377 hasName("M"), hasDeclContext(namespaceDecl()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace {"
" namespace M {" " class D {};" " }" "}", recordDecl(hasDeclContext
(namespaceDecl( hasName("M"), hasDeclContext(namespaceDecl())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace {\" \" namespace M {\" \" class D {};\" \" }\" \"}\", recordDecl(hasDeclContext(namespaceDecl( hasName(\"M\"), hasDeclContext(namespaceDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
;
378
379 EXPECT_TRUE(matches("class D{};", decl(hasDeclContext(decl()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class D{};",
decl(hasDeclContext(decl()))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 379, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class D{};\", decl(hasDeclContext(decl())))", "false"
, "true").c_str()) = ::testing::Message()
;
380}
381
382TEST(DeclarationMatcher, translationUnitDecl)class DeclarationMatcher_translationUnitDecl_Test : public ::
testing::Test { public: DeclarationMatcher_translationUnitDecl_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclarationMatcher_translationUnitDecl_Test
(DeclarationMatcher_translationUnitDecl_Test const &); void
operator=(DeclarationMatcher_translationUnitDecl_Test const &
);};::testing::TestInfo* const DeclarationMatcher_translationUnitDecl_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "translationUnitDecl", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< DeclarationMatcher_translationUnitDecl_Test
>);void DeclarationMatcher_translationUnitDecl_Test::TestBody
()
{
383 const std::string Code = "int MyVar1;\n"
384 "namespace NameSpace {\n"
385 "int MyVar2;\n"
386 "} // namespace NameSpace\n";
387 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Code, varDecl
(hasName("MyVar1"), hasDeclContext(translationUnitDecl())))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 388, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Code, varDecl(hasName(\"MyVar1\"), hasDeclContext(translationUnitDecl())))"
, "false", "true").c_str()) = ::testing::Message()
388 Code, varDecl(hasName("MyVar1"), hasDeclContext(translationUnitDecl()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Code, varDecl
(hasName("MyVar1"), hasDeclContext(translationUnitDecl())))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 388, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Code, varDecl(hasName(\"MyVar1\"), hasDeclContext(translationUnitDecl())))"
, "false", "true").c_str()) = ::testing::Message()
;
389 EXPECT_FALSE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( Code, varDecl
(hasName("MyVar2"), hasDeclContext(translationUnitDecl())))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 390, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Code, varDecl(hasName(\"MyVar2\"), hasDeclContext(translationUnitDecl())))"
, "true", "false").c_str()) = ::testing::Message()
390 Code, varDecl(hasName("MyVar2"), hasDeclContext(translationUnitDecl()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( Code, varDecl
(hasName("MyVar2"), hasDeclContext(translationUnitDecl())))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 390, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Code, varDecl(hasName(\"MyVar2\"), hasDeclContext(translationUnitDecl())))"
, "true", "false").c_str()) = ::testing::Message()
;
391 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Code, varDecl
(hasName("MyVar2"), hasDeclContext(decl(hasDeclContext(translationUnitDecl
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 394, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Code, varDecl(hasName(\"MyVar2\"), hasDeclContext(decl(hasDeclContext(translationUnitDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
392 Code,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Code, varDecl
(hasName("MyVar2"), hasDeclContext(decl(hasDeclContext(translationUnitDecl
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 394, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Code, varDecl(hasName(\"MyVar2\"), hasDeclContext(decl(hasDeclContext(translationUnitDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
393 varDecl(hasName("MyVar2"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Code, varDecl
(hasName("MyVar2"), hasDeclContext(decl(hasDeclContext(translationUnitDecl
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 394, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Code, varDecl(hasName(\"MyVar2\"), hasDeclContext(decl(hasDeclContext(translationUnitDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
394 hasDeclContext(decl(hasDeclContext(translationUnitDecl()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Code, varDecl
(hasName("MyVar2"), hasDeclContext(decl(hasDeclContext(translationUnitDecl
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 394, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Code, varDecl(hasName(\"MyVar2\"), hasDeclContext(decl(hasDeclContext(translationUnitDecl())))))"
, "false", "true").c_str()) = ::testing::Message()
;
395}
396
397TEST(DeclarationMatcher, LinkageSpecification)class DeclarationMatcher_LinkageSpecification_Test : public ::
testing::Test { public: DeclarationMatcher_LinkageSpecification_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclarationMatcher_LinkageSpecification_Test
(DeclarationMatcher_LinkageSpecification_Test const &); void
operator=(DeclarationMatcher_LinkageSpecification_Test const
&);};::testing::TestInfo* const DeclarationMatcher_LinkageSpecification_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "LinkageSpecification", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< DeclarationMatcher_LinkageSpecification_Test
>);void DeclarationMatcher_LinkageSpecification_Test::TestBody
()
{
398 EXPECT_TRUE(matches("extern \"C\" { void foo() {}; }", linkageSpecDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("extern \"C\" { void foo() {}; }"
, linkageSpecDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 398, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"extern \\\"C\\\" { void foo() {}; }\", linkageSpecDecl())"
, "false", "true").c_str()) = ::testing::Message()
;
399 EXPECT_TRUE(notMatches("void foo() {};", linkageSpecDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void foo() {};"
, linkageSpecDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 399, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void foo() {};\", linkageSpecDecl())", "false"
, "true").c_str()) = ::testing::Message()
;
400}
401
402TEST(ClassTemplate, DoesNotMatchClass)class ClassTemplate_DoesNotMatchClass_Test : public ::testing
::Test { public: ClassTemplate_DoesNotMatchClass_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ClassTemplate_DoesNotMatchClass_Test
(ClassTemplate_DoesNotMatchClass_Test const &); void operator
=(ClassTemplate_DoesNotMatchClass_Test const &);};::testing
::TestInfo* const ClassTemplate_DoesNotMatchClass_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ClassTemplate"
, "DoesNotMatchClass", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< ClassTemplate_DoesNotMatchClass_Test>);void ClassTemplate_DoesNotMatchClass_Test
::TestBody()
{
403 DeclarationMatcher ClassX = classTemplateDecl(hasName("X"));
404 EXPECT_TRUE(notMatches("class X;", ClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X;"
, ClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 404, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X;\", ClassX)", "false", "true").c_str(
)) = ::testing::Message()
;
405 EXPECT_TRUE(notMatches("class X {};", ClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {};"
, ClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 405, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", ClassX)", "false", "true").c_str
()) = ::testing::Message()
;
406}
407
408TEST(ClassTemplate, MatchesClassTemplate)class ClassTemplate_MatchesClassTemplate_Test : public ::testing
::Test { public: ClassTemplate_MatchesClassTemplate_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ClassTemplate_MatchesClassTemplate_Test
(ClassTemplate_MatchesClassTemplate_Test const &); void operator
=(ClassTemplate_MatchesClassTemplate_Test const &);};::testing
::TestInfo* const ClassTemplate_MatchesClassTemplate_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ClassTemplate"
, "MatchesClassTemplate", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< ClassTemplate_MatchesClassTemplate_Test>);void ClassTemplate_MatchesClassTemplate_Test
::TestBody()
{
409 DeclarationMatcher ClassX = classTemplateDecl(hasName("X"));
410 EXPECT_TRUE(matches("template<typename T> class X {};", ClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> class X {};"
, ClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 410, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> class X {};\", ClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
411 EXPECT_TRUE(matches("class Z { template<class T> class X {}; };", ClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { template<class T> class X {}; };"
, ClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 411, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { template<class T> class X {}; };\", ClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
412}
413
414TEST(ClassTemplate, DoesNotMatchClassTemplateExplicitSpecialization)class ClassTemplate_DoesNotMatchClassTemplateExplicitSpecialization_Test
: public ::testing::Test { public: ClassTemplate_DoesNotMatchClassTemplateExplicitSpecialization_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ClassTemplate_DoesNotMatchClassTemplateExplicitSpecialization_Test
(ClassTemplate_DoesNotMatchClassTemplateExplicitSpecialization_Test
const &); void operator=(ClassTemplate_DoesNotMatchClassTemplateExplicitSpecialization_Test
const &);};::testing::TestInfo* const ClassTemplate_DoesNotMatchClassTemplateExplicitSpecialization_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ClassTemplate", "DoesNotMatchClassTemplateExplicitSpecialization"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< ClassTemplate_DoesNotMatchClassTemplateExplicitSpecialization_Test
>);void ClassTemplate_DoesNotMatchClassTemplateExplicitSpecialization_Test
::TestBody()
{
415 EXPECT_TRUE(notMatches("template<typename T> class X { };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> class X { };"
"template<> class X<int> { int a; };", classTemplateDecl
(hasName("X"), hasDescendant(fieldDecl(hasName("a"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 418, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> class X { };\" \"template<> class X<int> { int a; };\", classTemplateDecl(hasName(\"X\"), hasDescendant(fieldDecl(hasName(\"a\")))))"
, "false", "true").c_str()) = ::testing::Message()
416 "template<> class X<int> { int a; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> class X { };"
"template<> class X<int> { int a; };", classTemplateDecl
(hasName("X"), hasDescendant(fieldDecl(hasName("a"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 418, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> class X { };\" \"template<> class X<int> { int a; };\", classTemplateDecl(hasName(\"X\"), hasDescendant(fieldDecl(hasName(\"a\")))))"
, "false", "true").c_str()) = ::testing::Message()
417 classTemplateDecl(hasName("X"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> class X { };"
"template<> class X<int> { int a; };", classTemplateDecl
(hasName("X"), hasDescendant(fieldDecl(hasName("a"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 418, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> class X { };\" \"template<> class X<int> { int a; };\", classTemplateDecl(hasName(\"X\"), hasDescendant(fieldDecl(hasName(\"a\")))))"
, "false", "true").c_str()) = ::testing::Message()
418 hasDescendant(fieldDecl(hasName("a"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> class X { };"
"template<> class X<int> { int a; };", classTemplateDecl
(hasName("X"), hasDescendant(fieldDecl(hasName("a"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 418, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> class X { };\" \"template<> class X<int> { int a; };\", classTemplateDecl(hasName(\"X\"), hasDescendant(fieldDecl(hasName(\"a\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
419}
420
421TEST(ClassTemplate, DoesNotMatchClassTemplatePartialSpecialization)class ClassTemplate_DoesNotMatchClassTemplatePartialSpecialization_Test
: public ::testing::Test { public: ClassTemplate_DoesNotMatchClassTemplatePartialSpecialization_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ClassTemplate_DoesNotMatchClassTemplatePartialSpecialization_Test
(ClassTemplate_DoesNotMatchClassTemplatePartialSpecialization_Test
const &); void operator=(ClassTemplate_DoesNotMatchClassTemplatePartialSpecialization_Test
const &);};::testing::TestInfo* const ClassTemplate_DoesNotMatchClassTemplatePartialSpecialization_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ClassTemplate", "DoesNotMatchClassTemplatePartialSpecialization"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< ClassTemplate_DoesNotMatchClassTemplatePartialSpecialization_Test
>);void ClassTemplate_DoesNotMatchClassTemplatePartialSpecialization_Test
::TestBody()
{
422 EXPECT_TRUE(notMatches("template<typename T, typename U> class X { };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T, typename U> class X { };"
"template<typename T> class X<T, int> { int a; };"
, classTemplateDecl(hasName("X"), hasDescendant(fieldDecl(hasName
("a"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 425, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T, typename U> class X { };\" \"template<typename T> class X<T, int> { int a; };\", classTemplateDecl(hasName(\"X\"), hasDescendant(fieldDecl(hasName(\"a\")))))"
, "false", "true").c_str()) = ::testing::Message()
423 "template<typename T> class X<T, int> { int a; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T, typename U> class X { };"
"template<typename T> class X<T, int> { int a; };"
, classTemplateDecl(hasName("X"), hasDescendant(fieldDecl(hasName
("a"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 425, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T, typename U> class X { };\" \"template<typename T> class X<T, int> { int a; };\", classTemplateDecl(hasName(\"X\"), hasDescendant(fieldDecl(hasName(\"a\")))))"
, "false", "true").c_str()) = ::testing::Message()
424 classTemplateDecl(hasName("X"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T, typename U> class X { };"
"template<typename T> class X<T, int> { int a; };"
, classTemplateDecl(hasName("X"), hasDescendant(fieldDecl(hasName
("a"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 425, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T, typename U> class X { };\" \"template<typename T> class X<T, int> { int a; };\", classTemplateDecl(hasName(\"X\"), hasDescendant(fieldDecl(hasName(\"a\")))))"
, "false", "true").c_str()) = ::testing::Message()
425 hasDescendant(fieldDecl(hasName("a"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T, typename U> class X { };"
"template<typename T> class X<T, int> { int a; };"
, classTemplateDecl(hasName("X"), hasDescendant(fieldDecl(hasName
("a"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 425, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T, typename U> class X { };\" \"template<typename T> class X<T, int> { int a; };\", classTemplateDecl(hasName(\"X\"), hasDescendant(fieldDecl(hasName(\"a\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
426}
427
428TEST(AllOf, AllOverloadsWork)class AllOf_AllOverloadsWork_Test : public ::testing::Test { public
: AllOf_AllOverloadsWork_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); AllOf_AllOverloadsWork_Test(AllOf_AllOverloadsWork_Test
const &); void operator=(AllOf_AllOverloadsWork_Test const
&);};::testing::TestInfo* const AllOf_AllOverloadsWork_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"AllOf", "AllOverloadsWork", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< AllOf_AllOverloadsWork_Test>);void AllOf_AllOverloadsWork_Test
::TestBody()
{
429 const char Program[] =
430 "struct T { };"
431 "int f(int, T*, int, int);"
432 "void g(int x) { T t; f(x, &t, 3, 4); }";
433 EXPECT_TRUE(matches(Program,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl())))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 435, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))))))"
, "false", "true").c_str()) = ::testing::Message()
434 callExpr(allOf(callee(functionDecl(hasName("f"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl())))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 435, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))))))"
, "false", "true").c_str()) = ::testing::Message()
435 hasArgument(0, declRefExpr(to(varDecl())))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl())))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 435, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))))))"
, "false", "true").c_str()) = ::testing::Message()
;
436 EXPECT_TRUE(matches(Program,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 440, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
437 callExpr(allOf(callee(functionDecl(hasName("f"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 440, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
438 hasArgument(0, declRefExpr(to(varDecl()))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 440, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
439 hasArgument(1, hasType(pointsTo(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 440, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
440 recordDecl(hasName("T")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 440, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
441 EXPECT_TRUE(matches(Program,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 446, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))))))"
, "false", "true").c_str()) = ::testing::Message()
442 callExpr(allOf(callee(functionDecl(hasName("f"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 446, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))))))"
, "false", "true").c_str()) = ::testing::Message()
443 hasArgument(0, declRefExpr(to(varDecl()))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 446, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))))))"
, "false", "true").c_str()) = ::testing::Message()
444 hasArgument(1, hasType(pointsTo(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 446, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))))))"
, "false", "true").c_str()) = ::testing::Message()
445 recordDecl(hasName("T"))))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 446, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))))))"
, "false", "true").c_str()) = ::testing::Message()
446 hasArgument(2, integerLiteral(equals(3)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 446, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))))))"
, "false", "true").c_str()) = ::testing::Message()
;
447 EXPECT_TRUE(matches(Program,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))),
hasArgument(3, integerLiteral(equals(4)))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 453, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))), hasArgument(3, integerLiteral(equals(4))))))"
, "false", "true").c_str()) = ::testing::Message()
448 callExpr(allOf(callee(functionDecl(hasName("f"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))),
hasArgument(3, integerLiteral(equals(4)))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 453, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))), hasArgument(3, integerLiteral(equals(4))))))"
, "false", "true").c_str()) = ::testing::Message()
449 hasArgument(0, declRefExpr(to(varDecl()))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))),
hasArgument(3, integerLiteral(equals(4)))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 453, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))), hasArgument(3, integerLiteral(equals(4))))))"
, "false", "true").c_str()) = ::testing::Message()
450 hasArgument(1, hasType(pointsTo(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))),
hasArgument(3, integerLiteral(equals(4)))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 453, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))), hasArgument(3, integerLiteral(equals(4))))))"
, "false", "true").c_str()) = ::testing::Message()
451 recordDecl(hasName("T"))))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))),
hasArgument(3, integerLiteral(equals(4)))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 453, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))), hasArgument(3, integerLiteral(equals(4))))))"
, "false", "true").c_str()) = ::testing::Message()
452 hasArgument(2, integerLiteral(equals(3))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))),
hasArgument(3, integerLiteral(equals(4)))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 453, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))), hasArgument(3, integerLiteral(equals(4))))))"
, "false", "true").c_str()) = ::testing::Message()
453 hasArgument(3, integerLiteral(equals(4)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Program, callExpr
(allOf(callee(functionDecl(hasName("f"))), hasArgument(0, declRefExpr
(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl
(hasName("T"))))), hasArgument(2, integerLiteral(equals(3))),
hasArgument(3, integerLiteral(equals(4)))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 453, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Program, callExpr(allOf(callee(functionDecl(hasName(\"f\"))), hasArgument(0, declRefExpr(to(varDecl()))), hasArgument(1, hasType(pointsTo( recordDecl(hasName(\"T\"))))), hasArgument(2, integerLiteral(equals(3))), hasArgument(3, integerLiteral(equals(4))))))"
, "false", "true").c_str()) = ::testing::Message()
;
454}
455
456TEST(ConstructVariadic, MismatchedTypes_Regression)class ConstructVariadic_MismatchedTypes_Regression_Test : public
::testing::Test { public: ConstructVariadic_MismatchedTypes_Regression_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ConstructVariadic_MismatchedTypes_Regression_Test
(ConstructVariadic_MismatchedTypes_Regression_Test const &
); void operator=(ConstructVariadic_MismatchedTypes_Regression_Test
const &);};::testing::TestInfo* const ConstructVariadic_MismatchedTypes_Regression_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ConstructVariadic", "MismatchedTypes_Regression", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ConstructVariadic_MismatchedTypes_Regression_Test
>);void ConstructVariadic_MismatchedTypes_Regression_Test::
TestBody()
{
457 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int a = 0;"
, internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher
::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<
QualType>(), {isConstQualified(), arrayType()}) .convertTo
<QualType>()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int a = 0;\", internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>(), {isConstQualified(), arrayType()}) .convertTo<QualType>())"
, "false", "true").c_str()) = ::testing::Message()
458 matches("const int a = 0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int a = 0;"
, internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher
::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<
QualType>(), {isConstQualified(), arrayType()}) .convertTo
<QualType>()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int a = 0;\", internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>(), {isConstQualified(), arrayType()}) .convertTo<QualType>())"
, "false", "true").c_str()) = ::testing::Message()
459 internal::DynTypedMatcher::constructVariadic(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int a = 0;"
, internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher
::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<
QualType>(), {isConstQualified(), arrayType()}) .convertTo
<QualType>()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int a = 0;\", internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>(), {isConstQualified(), arrayType()}) .convertTo<QualType>())"
, "false", "true").c_str()) = ::testing::Message()
460 internal::DynTypedMatcher::VO_AnyOf,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int a = 0;"
, internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher
::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<
QualType>(), {isConstQualified(), arrayType()}) .convertTo
<QualType>()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int a = 0;\", internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>(), {isConstQualified(), arrayType()}) .convertTo<QualType>())"
, "false", "true").c_str()) = ::testing::Message()
461 ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>(),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int a = 0;"
, internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher
::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<
QualType>(), {isConstQualified(), arrayType()}) .convertTo
<QualType>()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int a = 0;\", internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>(), {isConstQualified(), arrayType()}) .convertTo<QualType>())"
, "false", "true").c_str()) = ::testing::Message()
462 {isConstQualified(), arrayType()})switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int a = 0;"
, internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher
::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<
QualType>(), {isConstQualified(), arrayType()}) .convertTo
<QualType>()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int a = 0;\", internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>(), {isConstQualified(), arrayType()}) .convertTo<QualType>())"
, "false", "true").c_str()) = ::testing::Message()
463 .convertTo<QualType>()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int a = 0;"
, internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher
::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<
QualType>(), {isConstQualified(), arrayType()}) .convertTo
<QualType>()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int a = 0;\", internal::DynTypedMatcher::constructVariadic( internal::DynTypedMatcher::VO_AnyOf, ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>(), {isConstQualified(), arrayType()}) .convertTo<QualType>())"
, "false", "true").c_str()) = ::testing::Message()
;
464}
465
466TEST(DeclarationMatcher, MatchAnyOf)class DeclarationMatcher_MatchAnyOf_Test : public ::testing::
Test { public: DeclarationMatcher_MatchAnyOf_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_MatchAnyOf_Test
(DeclarationMatcher_MatchAnyOf_Test const &); void operator
=(DeclarationMatcher_MatchAnyOf_Test const &);};::testing
::TestInfo* const DeclarationMatcher_MatchAnyOf_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DeclarationMatcher"
, "MatchAnyOf", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< DeclarationMatcher_MatchAnyOf_Test
>);void DeclarationMatcher_MatchAnyOf_Test::TestBody()
{
467 DeclarationMatcher YOrZDerivedFromX = cxxRecordDecl(
468 anyOf(hasName("Y"), allOf(isDerivedFrom("X"), hasName("Z"))));
469 EXPECT_TRUE(matches("class X {}; class Z : public X {};", YOrZDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; class Z : public X {};"
, YOrZDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 469, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; class Z : public X {};\", YOrZDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
470 EXPECT_TRUE(matches("class Y {};", YOrZDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y {};"
, YOrZDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 470, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y {};\", YOrZDerivedFromX)", "false", "true"
).c_str()) = ::testing::Message()
;
471 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; class W : public X {};"
, YOrZDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 472, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; class W : public X {};\", YOrZDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
472 notMatches("class X {}; class W : public X {};", YOrZDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; class W : public X {};"
, YOrZDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 472, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; class W : public X {};\", YOrZDerivedFromX)"
, "false", "true").c_str()) = ::testing::Message()
;
473 EXPECT_TRUE(notMatches("class Z {};", YOrZDerivedFromX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Z {};"
, YOrZDerivedFromX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 473, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Z {};\", YOrZDerivedFromX)", "false", "true"
).c_str()) = ::testing::Message()
;
474
475 DeclarationMatcher XOrYOrZOrU =
476 recordDecl(anyOf(hasName("X"), hasName("Y"), hasName("Z"), hasName("U")));
477 EXPECT_TRUE(matches("class X {};", XOrYOrZOrU))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
, XOrYOrZOrU))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 477, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\", XOrYOrZOrU)", "false", "true").c_str
()) = ::testing::Message()
;
478 EXPECT_TRUE(notMatches("class V {};", XOrYOrZOrU))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class V {};"
, XOrYOrZOrU))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 478, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class V {};\", XOrYOrZOrU)", "false", "true")
.c_str()) = ::testing::Message()
;
479
480 DeclarationMatcher XOrYOrZOrUOrV =
481 recordDecl(anyOf(hasName("X"), hasName("Y"), hasName("Z"), hasName("U"),
482 hasName("V")));
483 EXPECT_TRUE(matches("class X {};", XOrYOrZOrUOrV))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
, XOrYOrZOrUOrV))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 483, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\", XOrYOrZOrUOrV)", "false", "true")
.c_str()) = ::testing::Message()
;
484 EXPECT_TRUE(matches("class Y {};", XOrYOrZOrUOrV))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y {};"
, XOrYOrZOrUOrV))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 484, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y {};\", XOrYOrZOrUOrV)", "false", "true")
.c_str()) = ::testing::Message()
;
485 EXPECT_TRUE(matches("class Z {};", XOrYOrZOrUOrV))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z {};"
, XOrYOrZOrUOrV))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z {};\", XOrYOrZOrUOrV)", "false", "true")
.c_str()) = ::testing::Message()
;
486 EXPECT_TRUE(matches("class U {};", XOrYOrZOrUOrV))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class U {};"
, XOrYOrZOrUOrV))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 486, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class U {};\", XOrYOrZOrUOrV)", "false", "true")
.c_str()) = ::testing::Message()
;
487 EXPECT_TRUE(matches("class V {};", XOrYOrZOrUOrV))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class V {};"
, XOrYOrZOrUOrV))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 487, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class V {};\", XOrYOrZOrUOrV)", "false", "true")
.c_str()) = ::testing::Message()
;
488 EXPECT_TRUE(notMatches("class A {};", XOrYOrZOrUOrV))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A {};"
, XOrYOrZOrUOrV))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 488, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A {};\", XOrYOrZOrUOrV)", "false", "true"
).c_str()) = ::testing::Message()
;
489
490 StatementMatcher MixedTypes = stmt(anyOf(ifStmt(), binaryOperator()));
491 EXPECT_TRUE(matches("int F() { return 1 + 2; }", MixedTypes))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int F() { return 1 + 2; }"
, MixedTypes))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 491, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int F() { return 1 + 2; }\", MixedTypes)", "false"
, "true").c_str()) = ::testing::Message()
;
492 EXPECT_TRUE(matches("int F() { if (true) return 1; }", MixedTypes))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int F() { if (true) return 1; }"
, MixedTypes))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 492, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int F() { if (true) return 1; }\", MixedTypes)",
"false", "true").c_str()) = ::testing::Message()
;
493 EXPECT_TRUE(notMatches("int F() { return 1; }", MixedTypes))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int F() { return 1; }"
, MixedTypes))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 493, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int F() { return 1; }\", MixedTypes)", "false"
, "true").c_str()) = ::testing::Message()
;
494
495 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() try { } catch (int) { } catch (...) { }"
, cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll()))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 497, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() try { } catch (int) { } catch (...) { }\", cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll())))"
, "false", "true").c_str()) = ::testing::Message()
496 matches("void f() try { } catch (int) { } catch (...) { }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() try { } catch (int) { } catch (...) { }"
, cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll()))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 497, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() try { } catch (int) { } catch (...) { }\", cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll())))"
, "false", "true").c_str()) = ::testing::Message()
497 cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() try { } catch (int) { } catch (...) { }"
, cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll()))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 497, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() try { } catch (int) { } catch (...) { }\", cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll())))"
, "false", "true").c_str()) = ::testing::Message()
;
498}
499
500TEST(DeclarationMatcher, MatchHas)class DeclarationMatcher_MatchHas_Test : public ::testing::Test
{ public: DeclarationMatcher_MatchHas_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_MatchHas_Test(DeclarationMatcher_MatchHas_Test
const &); void operator=(DeclarationMatcher_MatchHas_Test
const &);};::testing::TestInfo* const DeclarationMatcher_MatchHas_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "MatchHas", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< DeclarationMatcher_MatchHas_Test>);void
DeclarationMatcher_MatchHas_Test::TestBody()
{
501 DeclarationMatcher HasClassX = recordDecl(has(recordDecl(hasName("X"))));
502 EXPECT_TRUE(matches("class Y { class X {}; };", HasClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { class X {}; };"
, HasClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 502, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { class X {}; };\", HasClassX)", "false"
, "true").c_str()) = ::testing::Message()
;
503 EXPECT_TRUE(matches("class X {};", HasClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
, HasClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 503, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\", HasClassX)", "false", "true").c_str
()) = ::testing::Message()
;
504
505 DeclarationMatcher YHasClassX =
506 recordDecl(hasName("Y"), has(recordDecl(hasName("X"))));
507 EXPECT_TRUE(matches("class Y { class X {}; };", YHasClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { class X {}; };"
, YHasClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 507, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { class X {}; };\", YHasClassX)", "false"
, "true").c_str()) = ::testing::Message()
;
508 EXPECT_TRUE(notMatches("class X {};", YHasClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {};"
, YHasClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 508, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", YHasClassX)", "false", "true")
.c_str()) = ::testing::Message()
;
509 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { class Z { class X {}; }; };"
, YHasClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 510, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { class Z { class X {}; }; };\", YHasClassX)"
, "false", "true").c_str()) = ::testing::Message()
510 notMatches("class Y { class Z { class X {}; }; };", YHasClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { class Z { class X {}; }; };"
, YHasClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 510, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { class Z { class X {}; }; };\", YHasClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
511}
512
513TEST(DeclarationMatcher, MatchHasRecursiveAllOf)class DeclarationMatcher_MatchHasRecursiveAllOf_Test : public
::testing::Test { public: DeclarationMatcher_MatchHasRecursiveAllOf_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclarationMatcher_MatchHasRecursiveAllOf_Test
(DeclarationMatcher_MatchHasRecursiveAllOf_Test const &);
void operator=(DeclarationMatcher_MatchHasRecursiveAllOf_Test
const &);};::testing::TestInfo* const DeclarationMatcher_MatchHasRecursiveAllOf_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "MatchHasRecursiveAllOf", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< DeclarationMatcher_MatchHasRecursiveAllOf_Test
>);void DeclarationMatcher_MatchHasRecursiveAllOf_Test::TestBody
()
{
514 DeclarationMatcher Recursive =
515 recordDecl(
516 has(recordDecl(
517 has(recordDecl(hasName("X"))),
518 has(recordDecl(hasName("Y"))),
519 hasName("Z"))),
520 has(recordDecl(
521 has(recordDecl(hasName("A"))),
522 has(recordDecl(hasName("B"))),
523 hasName("C"))),
524 hasName("F"));
525
526 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
527 "class F {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
528 " class Z {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
529 " class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
530 " class Y {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
531 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
532 " class C {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
533 " class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
534 " class B {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
535 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
536 "};", Recursive))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class X {};" " class Y {};" " };" " class C {" " class A {};"
" class B {};" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
;
537
538 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
539 "class F {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
540 " class Z {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
541 " class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
542 " class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
543 " class Y {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
544 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
545 " class C {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
546 " class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
547 " class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
548 " class B {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
549 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
550 "};", Recursive))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class F {" " class Z {"
" class A {};" " class X {};" " class Y {};" " };"
" class C {" " class X {};" " class A {};" " class B {};"
" };" "};", Recursive))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
;
551
552 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
553 "class O1 {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
554 " class O2 {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
555 " class F {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
556 " class Z {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
557 " class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
558 " class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
559 " class Y {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
560 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
561 " class C {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
562 " class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
563 " class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
564 " class B {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
565 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
566 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
567 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
568 "};", Recursive))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class O1 {"
" class O2 {" " class F {" " class Z {" " class A {};"
" class X {};" " class Y {};" " };" " class C {"
" class X {};" " class A {};" " class B {};"
" };" " };" " };" "};", Recursive))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 568, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class O1 {\" \" class O2 {\" \" class F {\" \" class Z {\" \" class A {};\" \" class X {};\" \" class Y {};\" \" };\" \" class C {\" \" class X {};\" \" class A {};\" \" class B {};\" \" };\" \" };\" \" };\" \"};\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
;
569}
570
571TEST(DeclarationMatcher, MatchHasRecursiveAnyOf)class DeclarationMatcher_MatchHasRecursiveAnyOf_Test : public
::testing::Test { public: DeclarationMatcher_MatchHasRecursiveAnyOf_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclarationMatcher_MatchHasRecursiveAnyOf_Test
(DeclarationMatcher_MatchHasRecursiveAnyOf_Test const &);
void operator=(DeclarationMatcher_MatchHasRecursiveAnyOf_Test
const &);};::testing::TestInfo* const DeclarationMatcher_MatchHasRecursiveAnyOf_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "MatchHasRecursiveAnyOf", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< DeclarationMatcher_MatchHasRecursiveAnyOf_Test
>);void DeclarationMatcher_MatchHasRecursiveAnyOf_Test::TestBody
()
{
572 DeclarationMatcher Recursive =
573 recordDecl(
574 anyOf(
575 has(recordDecl(
576 anyOf(
577 has(recordDecl(
578 hasName("X"))),
579 has(recordDecl(
580 hasName("Y"))),
581 hasName("Z")))),
582 has(recordDecl(
583 anyOf(
584 hasName("C"),
585 has(recordDecl(
586 hasName("A"))),
587 has(recordDecl(
588 hasName("B")))))),
589 hasName("F")));
590
591 EXPECT_TRUE(matches("class F {};", Recursive))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class F {};"
, Recursive))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 591, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class F {};\", Recursive)", "false", "true").c_str
()) = ::testing::Message()
;
592 EXPECT_TRUE(matches("class Z {};", Recursive))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z {};"
, Recursive))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 592, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z {};\", Recursive)", "false", "true").c_str
()) = ::testing::Message()
;
593 EXPECT_TRUE(matches("class C {};", Recursive))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class C {};"
, Recursive))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 593, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class C {};\", Recursive)", "false", "true").c_str
()) = ::testing::Message()
;
594 EXPECT_TRUE(matches("class M { class N { class X {}; }; };", Recursive))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class M { class N { class X {}; }; };"
, Recursive))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 594, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class M { class N { class X {}; }; };\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
;
595 EXPECT_TRUE(matches("class M { class N { class B {}; }; };", Recursive))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class M { class N { class B {}; }; };"
, Recursive))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 595, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class M { class N { class B {}; }; };\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
;
596 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class O1 { class O2 {"
" class M { class N { class B {}; }; }; " "}; };", Recursive
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 599, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class O1 { class O2 {\" \" class M { class N { class B {}; }; }; \" \"}; };\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
597 matches("class O1 { class O2 {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class O1 { class O2 {"
" class M { class N { class B {}; }; }; " "}; };", Recursive
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 599, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class O1 { class O2 {\" \" class M { class N { class B {}; }; }; \" \"}; };\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
598 " class M { class N { class B {}; }; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class O1 { class O2 {"
" class M { class N { class B {}; }; }; " "}; };", Recursive
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 599, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class O1 { class O2 {\" \" class M { class N { class B {}; }; }; \" \"}; };\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
599 "}; };", Recursive))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class O1 { class O2 {"
" class M { class N { class B {}; }; }; " "}; };", Recursive
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 599, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class O1 { class O2 {\" \" class M { class N { class B {}; }; }; \" \"}; };\", Recursive)"
, "false", "true").c_str()) = ::testing::Message()
;
600}
601
602TEST(DeclarationMatcher, MatchNot)class DeclarationMatcher_MatchNot_Test : public ::testing::Test
{ public: DeclarationMatcher_MatchNot_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_MatchNot_Test(DeclarationMatcher_MatchNot_Test
const &); void operator=(DeclarationMatcher_MatchNot_Test
const &);};::testing::TestInfo* const DeclarationMatcher_MatchNot_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "MatchNot", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< DeclarationMatcher_MatchNot_Test>);void
DeclarationMatcher_MatchNot_Test::TestBody()
{
603 DeclarationMatcher NotClassX =
604 cxxRecordDecl(
605 isDerivedFrom("Y"),
606 unless(hasName("X")));
607 EXPECT_TRUE(notMatches("", NotClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("", NotClassX
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 607, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"\", NotClassX)", "false", "true").c_str()) = ::
testing::Message()
;
608 EXPECT_TRUE(notMatches("class Y {};", NotClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {};"
, NotClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 608, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {};\", NotClassX)", "false", "true").
c_str()) = ::testing::Message()
;
609 EXPECT_TRUE(matches("class Y {}; class Z : public Y {};", NotClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y {}; class Z : public Y {};"
, NotClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 609, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y {}; class Z : public Y {};\", NotClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
610 EXPECT_TRUE(notMatches("class Y {}; class X : public Y {};", NotClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {}; class X : public Y {};"
, NotClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 610, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {}; class X : public Y {};\", NotClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
611 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {}; class Z {}; class X : public Y {};"
, NotClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 613, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {}; class Z {}; class X : public Y {};\", NotClassX)"
, "false", "true").c_str()) = ::testing::Message()
612 notMatches("class Y {}; class Z {}; class X : public Y {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {}; class Z {}; class X : public Y {};"
, NotClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 613, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {}; class Z {}; class X : public Y {};\", NotClassX)"
, "false", "true").c_str()) = ::testing::Message()
613 NotClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {}; class Z {}; class X : public Y {};"
, NotClassX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 613, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {}; class Z {}; class X : public Y {};\", NotClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
614
615 DeclarationMatcher ClassXHasNotClassY =
616 recordDecl(
617 hasName("X"),
618 has(recordDecl(hasName("Z"))),
619 unless(
620 has(recordDecl(hasName("Y")))));
621 EXPECT_TRUE(matches("class X { class Z {}; };", ClassXHasNotClassY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { class Z {}; };"
, ClassXHasNotClassY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 621, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { class Z {}; };\", ClassXHasNotClassY)"
, "false", "true").c_str()) = ::testing::Message()
;
622 EXPECT_TRUE(notMatches("class X { class Y {}; class Z {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { class Y {}; class Z {}; };"
, ClassXHasNotClassY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 623, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { class Y {}; class Z {}; };\", ClassXHasNotClassY)"
, "false", "true").c_str()) = ::testing::Message()
623 ClassXHasNotClassY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { class Y {}; class Z {}; };"
, ClassXHasNotClassY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 623, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { class Y {}; class Z {}; };\", ClassXHasNotClassY)"
, "false", "true").c_str()) = ::testing::Message()
;
624
625 DeclarationMatcher NamedNotRecord =
626 namedDecl(hasName("Foo"), unless(recordDecl()));
627 EXPECT_TRUE(matches("void Foo(){}", NamedNotRecord))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void Foo(){}"
, NamedNotRecord))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 627, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void Foo(){}\", NamedNotRecord)", "false", "true"
).c_str()) = ::testing::Message()
;
628 EXPECT_TRUE(notMatches("struct Foo {};", NamedNotRecord))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct Foo {};"
, NamedNotRecord))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 628, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct Foo {};\", NamedNotRecord)", "false", "true"
).c_str()) = ::testing::Message()
;
629}
630
631TEST(DeclarationMatcher, HasDescendant)class DeclarationMatcher_HasDescendant_Test : public ::testing
::Test { public: DeclarationMatcher_HasDescendant_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_HasDescendant_Test
(DeclarationMatcher_HasDescendant_Test const &); void operator
=(DeclarationMatcher_HasDescendant_Test const &);};::testing
::TestInfo* const DeclarationMatcher_HasDescendant_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DeclarationMatcher"
, "HasDescendant", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< DeclarationMatcher_HasDescendant_Test
>);void DeclarationMatcher_HasDescendant_Test::TestBody()
{
632 DeclarationMatcher ZDescendantClassX =
633 recordDecl(
634 hasDescendant(recordDecl(hasName("X"))),
635 hasName("Z"));
636 EXPECT_TRUE(matches("class Z { class X {}; };", ZDescendantClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class X {}; };"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 636, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class X {}; };\", ZDescendantClassX)",
"false", "true").c_str()) = ::testing::Message()
;
637 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class Y { class X {}; }; };"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 638, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class Y { class X {}; }; };\", ZDescendantClassX)"
, "false", "true").c_str()) = ::testing::Message()
638 matches("class Z { class Y { class X {}; }; };", ZDescendantClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class Y { class X {}; }; };"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 638, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class Y { class X {}; }; };\", ZDescendantClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
639 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class Y { class X {}; }; }; };"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 641, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class Y { class X {}; }; }; };\", ZDescendantClassX)"
, "false", "true").c_str()) = ::testing::Message()
640 matches("class Z { class A { class Y { class X {}; }; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class Y { class X {}; }; }; };"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 641, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class Y { class X {}; }; }; };\", ZDescendantClassX)"
, "false", "true").c_str()) = ::testing::Message()
641 ZDescendantClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class Y { class X {}; }; }; };"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 641, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class Y { class X {}; }; }; };\", ZDescendantClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
642 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class B { class Y { class X {}; }; }; }; };"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 644, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class B { class Y { class X {}; }; }; }; };\", ZDescendantClassX)"
, "false", "true").c_str()) = ::testing::Message()
643 matches("class Z { class A { class B { class Y { class X {}; }; }; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class B { class Y { class X {}; }; }; }; };"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 644, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class B { class Y { class X {}; }; }; }; };\", ZDescendantClassX)"
, "false", "true").c_str()) = ::testing::Message()
644 ZDescendantClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class B { class Y { class X {}; }; }; }; };"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 644, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class B { class Y { class X {}; }; }; }; };\", ZDescendantClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
645 EXPECT_TRUE(notMatches("class Z {};", ZDescendantClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Z {};"
, ZDescendantClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 645, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Z {};\", ZDescendantClassX)", "false", "true"
).c_str()) = ::testing::Message()
;
646
647 DeclarationMatcher ZDescendantClassXHasClassY =
648 recordDecl(
649 hasDescendant(recordDecl(has(recordDecl(hasName("Y"))),
650 hasName("X"))),
651 hasName("Z"));
652 EXPECT_TRUE(matches("class Z { class X { class Y {}; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class X { class Y {}; }; };"
, ZDescendantClassXHasClassY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class X { class Y {}; }; };\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
653 ZDescendantClassXHasClassY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class X { class Y {}; }; };"
, ZDescendantClassXHasClassY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class X { class Y {}; }; };\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
;
654 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class B { class X { class Y {}; }; }; }; };"
, ZDescendantClassXHasClassY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 656, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class B { class X { class Y {}; }; }; }; };\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
655 matches("class Z { class A { class B { class X { class Y {}; }; }; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class B { class X { class Y {}; }; }; }; };"
, ZDescendantClassXHasClassY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 656, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class B { class X { class Y {}; }; }; }; };\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
656 ZDescendantClassXHasClassY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class B { class X { class Y {}; }; }; }; };"
, ZDescendantClassXHasClassY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 656, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class B { class X { class Y {}; }; }; }; };\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
;
657 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
658 "class Z {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
659 " class A {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
660 " class B {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
661 " class X {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
662 " class C {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
663 " class Y {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
664 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
665 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
666 " }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
667 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
668 "};", ZDescendantClassXHasClassY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Z {"
" class A {" " class B {" " class X {" " class C {"
" class Y {};" " };" " };" " }; " " };"
"};", ZDescendantClassXHasClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 668, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Z {\" \" class A {\" \" class B {\" \" class X {\" \" class C {\" \" class Y {};\" \" };\" \" };\" \" }; \" \" };\" \"};\", ZDescendantClassXHasClassY)"
, "false", "true").c_str()) = ::testing::Message()
;
669
670 DeclarationMatcher ZDescendantClassXDescendantClassY =
671 recordDecl(
672 hasDescendant(recordDecl(hasDescendant(recordDecl(hasName("Y"))),
673 hasName("X"))),
674 hasName("Z"));
675 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class X { class B { class Y {}; }; }; }; };"
, ZDescendantClassXDescendantClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 677, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class X { class B { class Y {}; }; }; }; };\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
676 matches("class Z { class A { class X { class B { class Y {}; }; }; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class X { class B { class Y {}; }; }; }; };"
, ZDescendantClassXDescendantClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 677, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class X { class B { class Y {}; }; }; }; };\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
677 ZDescendantClassXDescendantClassY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Z { class A { class X { class B { class Y {}; }; }; }; };"
, ZDescendantClassXDescendantClassY))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 677, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Z { class A { class X { class B { class Y {}; }; }; }; };\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
;
678 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
679 "class Z {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
680 " class A {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
681 " class X {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
682 " class B {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
683 " class Y {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
684 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
685 " class Y {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
686 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
687 " };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
688 "};", ZDescendantClassXDescendantClassY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Z {" " class A {"
" class X {" " class B {" " class Y {};" " };"
" class Y {};" " };" " };" "};", ZDescendantClassXDescendantClassY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Z {\" \" class A {\" \" class X {\" \" class B {\" \" class Y {};\" \" };\" \" class Y {};\" \" };\" \" };\" \"};\", ZDescendantClassXDescendantClassY)"
, "false", "true").c_str()) = ::testing::Message()
;
689}
690
691TEST(DeclarationMatcher, HasDescendantMemoization)class DeclarationMatcher_HasDescendantMemoization_Test : public
::testing::Test { public: DeclarationMatcher_HasDescendantMemoization_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclarationMatcher_HasDescendantMemoization_Test
(DeclarationMatcher_HasDescendantMemoization_Test const &
); void operator=(DeclarationMatcher_HasDescendantMemoization_Test
const &);};::testing::TestInfo* const DeclarationMatcher_HasDescendantMemoization_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "HasDescendantMemoization", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< DeclarationMatcher_HasDescendantMemoization_Test
>);void DeclarationMatcher_HasDescendantMemoization_Test::
TestBody()
{
692 DeclarationMatcher CannotMemoize =
693 decl(hasDescendant(typeLoc().bind("x")), has(decl()));
694 EXPECT_TRUE(matches("void f() { int i; }", CannotMemoize))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i; }"
, CannotMemoize))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 694, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i; }\", CannotMemoize)", "false",
"true").c_str()) = ::testing::Message()
;
695}
696
697TEST(DeclarationMatcher, HasDescendantMemoizationUsesRestrictKind)class DeclarationMatcher_HasDescendantMemoizationUsesRestrictKind_Test
: public ::testing::Test { public: DeclarationMatcher_HasDescendantMemoizationUsesRestrictKind_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclarationMatcher_HasDescendantMemoizationUsesRestrictKind_Test
(DeclarationMatcher_HasDescendantMemoizationUsesRestrictKind_Test
const &); void operator=(DeclarationMatcher_HasDescendantMemoizationUsesRestrictKind_Test
const &);};::testing::TestInfo* const DeclarationMatcher_HasDescendantMemoizationUsesRestrictKind_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "HasDescendantMemoizationUsesRestrictKind"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< DeclarationMatcher_HasDescendantMemoizationUsesRestrictKind_Test
>);void DeclarationMatcher_HasDescendantMemoizationUsesRestrictKind_Test
::TestBody()
{
698 auto Name = hasName("i");
699 auto VD = internal::Matcher<VarDecl>(Name).dynCastTo<Decl>();
700 auto RD = internal::Matcher<RecordDecl>(Name).dynCastTo<Decl>();
701 // Matching VD first should not make a cache hit for RD.
702 EXPECT_TRUE(notMatches("void f() { int i; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { int i; }"
, decl(hasDescendant(VD), hasDescendant(RD))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 703, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { int i; }\", decl(hasDescendant(VD), hasDescendant(RD)))"
, "false", "true").c_str()) = ::testing::Message()
703 decl(hasDescendant(VD), hasDescendant(RD))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { int i; }"
, decl(hasDescendant(VD), hasDescendant(RD))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 703, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { int i; }\", decl(hasDescendant(VD), hasDescendant(RD)))"
, "false", "true").c_str()) = ::testing::Message()
;
704 EXPECT_TRUE(notMatches("void f() { int i; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { int i; }"
, decl(hasDescendant(RD), hasDescendant(VD))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 705, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { int i; }\", decl(hasDescendant(RD), hasDescendant(VD)))"
, "false", "true").c_str()) = ::testing::Message()
705 decl(hasDescendant(RD), hasDescendant(VD))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { int i; }"
, decl(hasDescendant(RD), hasDescendant(VD))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 705, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { int i; }\", decl(hasDescendant(RD), hasDescendant(VD)))"
, "false", "true").c_str()) = ::testing::Message()
;
706 // Not matching RD first should not make a cache hit for VD either.
707 EXPECT_TRUE(matches("void f() { int i; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i; }"
, decl(anyOf(hasDescendant(RD), hasDescendant(VD)))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 708, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i; }\", decl(anyOf(hasDescendant(RD), hasDescendant(VD))))"
, "false", "true").c_str()) = ::testing::Message()
708 decl(anyOf(hasDescendant(RD), hasDescendant(VD)))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i; }"
, decl(anyOf(hasDescendant(RD), hasDescendant(VD)))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 708, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i; }\", decl(anyOf(hasDescendant(RD), hasDescendant(VD))))"
, "false", "true").c_str()) = ::testing::Message()
;
709}
710
711TEST(DeclarationMatcher, HasAttr)class DeclarationMatcher_HasAttr_Test : public ::testing::Test
{ public: DeclarationMatcher_HasAttr_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_HasAttr_Test(DeclarationMatcher_HasAttr_Test
const &); void operator=(DeclarationMatcher_HasAttr_Test
const &);};::testing::TestInfo* const DeclarationMatcher_HasAttr_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationMatcher", "HasAttr", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< DeclarationMatcher_HasAttr_Test>);void DeclarationMatcher_HasAttr_Test
::TestBody()
{
712 EXPECT_TRUE(matches("struct __attribute__((warn_unused)) X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct __attribute__((warn_unused)) X {};"
, decl(hasAttr(clang::attr::WarnUnused))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 713, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct __attribute__((warn_unused)) X {};\", decl(hasAttr(clang::attr::WarnUnused)))"
, "false", "true").c_str()) = ::testing::Message()
713 decl(hasAttr(clang::attr::WarnUnused))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct __attribute__((warn_unused)) X {};"
, decl(hasAttr(clang::attr::WarnUnused))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 713, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct __attribute__((warn_unused)) X {};\", decl(hasAttr(clang::attr::WarnUnused)))"
, "false", "true").c_str()) = ::testing::Message()
;
714 EXPECT_FALSE(matches("struct X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("struct X {};"
, decl(hasAttr(clang::attr::WarnUnused)))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct X {};\", decl(hasAttr(clang::attr::WarnUnused)))"
, "true", "false").c_str()) = ::testing::Message()
715 decl(hasAttr(clang::attr::WarnUnused))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("struct X {};"
, decl(hasAttr(clang::attr::WarnUnused)))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct X {};\", decl(hasAttr(clang::attr::WarnUnused)))"
, "true", "false").c_str()) = ::testing::Message()
;
716}
717
718TEST(DeclarationMatcher, MatchCudaDecl)class DeclarationMatcher_MatchCudaDecl_Test : public ::testing
::Test { public: DeclarationMatcher_MatchCudaDecl_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclarationMatcher_MatchCudaDecl_Test
(DeclarationMatcher_MatchCudaDecl_Test const &); void operator
=(DeclarationMatcher_MatchCudaDecl_Test const &);};::testing
::TestInfo* const DeclarationMatcher_MatchCudaDecl_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DeclarationMatcher"
, "MatchCudaDecl", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< DeclarationMatcher_MatchCudaDecl_Test
>);void DeclarationMatcher_MatchCudaDecl_Test::TestBody()
{
719 EXPECT_TRUE(matchesWithCuda("__global__ void f() { }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesWithCuda("__global__ void f() { }"
"void g() { f<<<1, 2>>>(); }", cudaKernelCallExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 721, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesWithCuda(\"__global__ void f() { }\" \"void g() { f<<<1, 2>>>(); }\", cudaKernelCallExpr())"
, "false", "true").c_str()) = ::testing::Message()
720 "void g() { f<<<1, 2>>>(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesWithCuda("__global__ void f() { }"
"void g() { f<<<1, 2>>>(); }", cudaKernelCallExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 721, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesWithCuda(\"__global__ void f() { }\" \"void g() { f<<<1, 2>>>(); }\", cudaKernelCallExpr())"
, "false", "true").c_str()) = ::testing::Message()
721 cudaKernelCallExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesWithCuda("__global__ void f() { }"
"void g() { f<<<1, 2>>>(); }", cudaKernelCallExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 721, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesWithCuda(\"__global__ void f() { }\" \"void g() { f<<<1, 2>>>(); }\", cudaKernelCallExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
722 EXPECT_TRUE(matchesWithCuda("__attribute__((device)) void f() {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesWithCuda("__attribute__((device)) void f() {}"
, hasAttr(clang::attr::CUDADevice)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 723, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesWithCuda(\"__attribute__((device)) void f() {}\", hasAttr(clang::attr::CUDADevice))"
, "false", "true").c_str()) = ::testing::Message()
723 hasAttr(clang::attr::CUDADevice)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesWithCuda("__attribute__((device)) void f() {}"
, hasAttr(clang::attr::CUDADevice)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 723, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesWithCuda(\"__attribute__((device)) void f() {}\", hasAttr(clang::attr::CUDADevice))"
, "false", "true").c_str()) = ::testing::Message()
;
724 EXPECT_TRUE(notMatchesWithCuda("void f() {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatchesWithCuda("void f() {}"
, cudaKernelCallExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 725, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatchesWithCuda(\"void f() {}\", cudaKernelCallExpr())"
, "false", "true").c_str()) = ::testing::Message()
725 cudaKernelCallExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatchesWithCuda("void f() {}"
, cudaKernelCallExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 725, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatchesWithCuda(\"void f() {}\", cudaKernelCallExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
726 EXPECT_FALSE(notMatchesWithCuda("__attribute__((global)) void f() {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(notMatchesWithCuda(
"__attribute__((global)) void f() {}", hasAttr(clang::attr::CUDAGlobal
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 727, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatchesWithCuda(\"__attribute__((global)) void f() {}\", hasAttr(clang::attr::CUDAGlobal))"
, "true", "false").c_str()) = ::testing::Message()
727 hasAttr(clang::attr::CUDAGlobal)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(notMatchesWithCuda(
"__attribute__((global)) void f() {}", hasAttr(clang::attr::CUDAGlobal
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 727, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatchesWithCuda(\"__attribute__((global)) void f() {}\", hasAttr(clang::attr::CUDAGlobal))"
, "true", "false").c_str()) = ::testing::Message()
;
728}
729
730// Implements a run method that returns whether BoundNodes contains a
731// Decl bound to Id that can be dynamically cast to T.
732// Optionally checks that the check succeeded a specific number of times.
733template <typename T>
734class VerifyIdIsBoundTo : public BoundNodesCallback {
735public:
736 // Create an object that checks that a node of type \c T was bound to \c Id.
737 // Does not check for a certain number of matches.
738 explicit VerifyIdIsBoundTo(llvm::StringRef Id)
739 : Id(Id), ExpectedCount(-1), Count(0) {}
740
741 // Create an object that checks that a node of type \c T was bound to \c Id.
742 // Checks that there were exactly \c ExpectedCount matches.
743 VerifyIdIsBoundTo(llvm::StringRef Id, int ExpectedCount)
744 : Id(Id), ExpectedCount(ExpectedCount), Count(0) {}
745
746 // Create an object that checks that a node of type \c T was bound to \c Id.
747 // Checks that there was exactly one match with the name \c ExpectedName.
748 // Note that \c T must be a NamedDecl for this to work.
749 VerifyIdIsBoundTo(llvm::StringRef Id, llvm::StringRef ExpectedName,
750 int ExpectedCount = 1)
751 : Id(Id), ExpectedCount(ExpectedCount), Count(0),
752 ExpectedName(ExpectedName) {}
753
754 void onEndOfTranslationUnit() override {
755 if (ExpectedCount != -1)
756 EXPECT_EQ(ExpectedCount, Count)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(ExpectedCount)) == 1)>::Compare
("ExpectedCount", "Count", ExpectedCount, Count))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 756, gtest_ar.failure_message()) = ::testing::Message()
;
757 if (!ExpectedName.empty())
758 EXPECT_EQ(ExpectedName, Name)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(ExpectedName)) == 1)>::Compare
("ExpectedName", "Name", ExpectedName, Name))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 758, gtest_ar.failure_message()) = ::testing::Message()
;
759 Count = 0;
760 Name.clear();
761 }
762
763 ~VerifyIdIsBoundTo() override {
764 EXPECT_EQ(0, Count)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0)) == 1)>::Compare("0", "Count"
, 0, Count))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 764, gtest_ar.failure_message()) = ::testing::Message()
;
765 EXPECT_EQ("", Name)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper("")) == 1)>::Compare("\"\""
, "Name", "", Name))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 765, gtest_ar.failure_message()) = ::testing::Message()
;
766 }
767
768 bool run(const BoundNodes *Nodes) override {
769 const BoundNodes::IDToNodeMap &M = Nodes->getMap();
770 if (Nodes->getNodeAs<T>(Id)) {
771 ++Count;
772 if (const NamedDecl *Named = Nodes->getNodeAs<NamedDecl>(Id)) {
773 Name = Named->getNameAsString();
774 } else if (const NestedNameSpecifier *NNS =
775 Nodes->getNodeAs<NestedNameSpecifier>(Id)) {
776 llvm::raw_string_ostream OS(Name);
777 NNS->print(OS, PrintingPolicy(LangOptions()));
778 }
779 BoundNodes::IDToNodeMap::const_iterator I = M.find(Id);
780 EXPECT_NE(M.end(), I)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal::CmpHelperNE("M.end()", "I",
M.end(), I))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 780, gtest_ar.failure_message()) = ::testing::Message()
;
781 if (I != M.end())
782 EXPECT_EQ(Nodes->getNodeAs<T>(Id), I->second.get<T>())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(Nodes->getNodeAs<T>(
Id))) == 1)>::Compare("Nodes->getNodeAs<T>(Id)", "I->second.get<T>()"
, Nodes->getNodeAs<T>(Id), I->second.get<T>
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 782, gtest_ar.failure_message()) = ::testing::Message()
;
783 return true;
784 }
785 EXPECT_TRUE(M.count(Id) == 0 ||switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(M.count(Id) == 0 || M
.find(Id)->second.template get<T>() == nullptr)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 786, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "M.count(Id) == 0 || M.find(Id)->second.template get<T>() == nullptr"
, "false", "true").c_str()) = ::testing::Message()
786 M.find(Id)->second.template get<T>() == nullptr)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(M.count(Id) == 0 || M
.find(Id)->second.template get<T>() == nullptr)) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 786, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "M.count(Id) == 0 || M.find(Id)->second.template get<T>() == nullptr"
, "false", "true").c_str()) = ::testing::Message()
;
787 return false;
788 }
789
790 bool run(const BoundNodes *Nodes, ASTContext *Context) override {
791 return run(Nodes);
792 }
793
794private:
795 const std::string Id;
796 const int ExpectedCount;
797 int Count;
798 const std::string ExpectedName;
799 std::string Name;
800};
801
802TEST(HasDescendant, MatchesDescendantTypes)class HasDescendant_MatchesDescendantTypes_Test : public ::testing
::Test { public: HasDescendant_MatchesDescendantTypes_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasDescendant_MatchesDescendantTypes_Test
(HasDescendant_MatchesDescendantTypes_Test const &); void
operator=(HasDescendant_MatchesDescendantTypes_Test const &
);};::testing::TestInfo* const HasDescendant_MatchesDescendantTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasDescendant", "MatchesDescendantTypes", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasDescendant_MatchesDescendantTypes_Test
>);void HasDescendant_MatchesDescendantTypes_Test::TestBody
()
{
803 EXPECT_TRUE(matches("void f() { int i = 3; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i = 3; }"
, decl(hasDescendant(loc(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 804, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i = 3; }\", decl(hasDescendant(loc(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
804 decl(hasDescendant(loc(builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i = 3; }"
, decl(hasDescendant(loc(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 804, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i = 3; }\", decl(hasDescendant(loc(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
805 EXPECT_TRUE(matches("void f() { int i = 3; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i = 3; }"
, stmt(hasDescendant(builtinType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 806, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i = 3; }\", stmt(hasDescendant(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
806 stmt(hasDescendant(builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i = 3; }"
, stmt(hasDescendant(builtinType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 806, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i = 3; }\", stmt(hasDescendant(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
807
808 EXPECT_TRUE(matches("void f() { int i = 3; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i = 3; }"
, stmt(hasDescendant(loc(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 809, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i = 3; }\", stmt(hasDescendant(loc(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
809 stmt(hasDescendant(loc(builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i = 3; }"
, stmt(hasDescendant(loc(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 809, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i = 3; }\", stmt(hasDescendant(loc(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
810 EXPECT_TRUE(matches("void f() { int i = 3; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i = 3; }"
, stmt(hasDescendant(qualType(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 811, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i = 3; }\", stmt(hasDescendant(qualType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
811 stmt(hasDescendant(qualType(builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int i = 3; }"
, stmt(hasDescendant(qualType(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 811, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int i = 3; }\", stmt(hasDescendant(qualType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
812
813 EXPECT_TRUE(notMatches("void f() { float f = 2.0f; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { float f = 2.0f; }"
, stmt(hasDescendant(isInteger()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 814, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { float f = 2.0f; }\", stmt(hasDescendant(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
814 stmt(hasDescendant(isInteger()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { float f = 2.0f; }"
, stmt(hasDescendant(isInteger()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 814, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { float f = 2.0f; }\", stmt(hasDescendant(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
;
815
816 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { int a; float c; int d; int e; }", functionDecl(
forEachDescendant( varDecl(hasDescendant(isInteger())).bind("x"
))), new VerifyIdIsBoundTo<Decl>("x", 3)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 820, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { int a; float c; int d; int e; }\", functionDecl(forEachDescendant( varDecl(hasDescendant(isInteger())).bind(\"x\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
817 "void f() { int a; float c; int d; int e; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { int a; float c; int d; int e; }", functionDecl(
forEachDescendant( varDecl(hasDescendant(isInteger())).bind("x"
))), new VerifyIdIsBoundTo<Decl>("x", 3)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 820, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { int a; float c; int d; int e; }\", functionDecl(forEachDescendant( varDecl(hasDescendant(isInteger())).bind(\"x\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
818 functionDecl(forEachDescendant(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { int a; float c; int d; int e; }", functionDecl(
forEachDescendant( varDecl(hasDescendant(isInteger())).bind("x"
))), new VerifyIdIsBoundTo<Decl>("x", 3)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 820, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { int a; float c; int d; int e; }\", functionDecl(forEachDescendant( varDecl(hasDescendant(isInteger())).bind(\"x\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
819 varDecl(hasDescendant(isInteger())).bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { int a; float c; int d; int e; }", functionDecl(
forEachDescendant( varDecl(hasDescendant(isInteger())).bind("x"
))), new VerifyIdIsBoundTo<Decl>("x", 3)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 820, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { int a; float c; int d; int e; }\", functionDecl(forEachDescendant( varDecl(hasDescendant(isInteger())).bind(\"x\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
820 new VerifyIdIsBoundTo<Decl>("x", 3)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { int a; float c; int d; int e; }", functionDecl(
forEachDescendant( varDecl(hasDescendant(isInteger())).bind("x"
))), new VerifyIdIsBoundTo<Decl>("x", 3)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 820, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { int a; float c; int d; int e; }\", functionDecl(forEachDescendant( varDecl(hasDescendant(isInteger())).bind(\"x\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
;
821}
822
823TEST(HasDescendant, MatchesDescendantsOfTypes)class HasDescendant_MatchesDescendantsOfTypes_Test : public ::
testing::Test { public: HasDescendant_MatchesDescendantsOfTypes_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasDescendant_MatchesDescendantsOfTypes_Test
(HasDescendant_MatchesDescendantsOfTypes_Test const &); void
operator=(HasDescendant_MatchesDescendantsOfTypes_Test const
&);};::testing::TestInfo* const HasDescendant_MatchesDescendantsOfTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasDescendant", "MatchesDescendantsOfTypes", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasDescendant_MatchesDescendantsOfTypes_Test
>);void HasDescendant_MatchesDescendantsOfTypes_Test::TestBody
()
{
824 EXPECT_TRUE(matches("void f() { int*** i; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int*** i; }"
, qualType(hasDescendant(builtinType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 825, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int*** i; }\", qualType(hasDescendant(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
825 qualType(hasDescendant(builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int*** i; }"
, qualType(hasDescendant(builtinType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 825, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int*** i; }\", qualType(hasDescendant(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
826 EXPECT_TRUE(matches("void f() { int*** i; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int*** i; }"
, qualType(hasDescendant( pointerType(pointee(builtinType()))
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int*** i; }\", qualType(hasDescendant( pointerType(pointee(builtinType())))))"
, "false", "true").c_str()) = ::testing::Message()
827 qualType(hasDescendant(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int*** i; }"
, qualType(hasDescendant( pointerType(pointee(builtinType()))
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int*** i; }\", qualType(hasDescendant( pointerType(pointee(builtinType())))))"
, "false", "true").c_str()) = ::testing::Message()
828 pointerType(pointee(builtinType()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int*** i; }"
, qualType(hasDescendant( pointerType(pointee(builtinType()))
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int*** i; }\", qualType(hasDescendant( pointerType(pointee(builtinType())))))"
, "false", "true").c_str()) = ::testing::Message()
;
829 EXPECT_TRUE(matches("void f() { int*** i; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int*** i; }"
, typeLoc(hasDescendant(loc(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 830, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int*** i; }\", typeLoc(hasDescendant(loc(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
830 typeLoc(hasDescendant(loc(builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int*** i; }"
, typeLoc(hasDescendant(loc(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 830, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int*** i; }\", typeLoc(hasDescendant(loc(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
831
832 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { int*** i; }", qualType(asString("int ***"), forEachDescendant
(pointerType().bind("x"))), new VerifyIdIsBoundTo<Type>
("x", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 835, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { int*** i; }\", qualType(asString(\"int ***\"), forEachDescendant(pointerType().bind(\"x\"))), new VerifyIdIsBoundTo<Type>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
833 "void f() { int*** i; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { int*** i; }", qualType(asString("int ***"), forEachDescendant
(pointerType().bind("x"))), new VerifyIdIsBoundTo<Type>
("x", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 835, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { int*** i; }\", qualType(asString(\"int ***\"), forEachDescendant(pointerType().bind(\"x\"))), new VerifyIdIsBoundTo<Type>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
834 qualType(asString("int ***"), forEachDescendant(pointerType().bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { int*** i; }", qualType(asString("int ***"), forEachDescendant
(pointerType().bind("x"))), new VerifyIdIsBoundTo<Type>
("x", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 835, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { int*** i; }\", qualType(asString(\"int ***\"), forEachDescendant(pointerType().bind(\"x\"))), new VerifyIdIsBoundTo<Type>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
835 new VerifyIdIsBoundTo<Type>("x", 2)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { int*** i; }", qualType(asString("int ***"), forEachDescendant
(pointerType().bind("x"))), new VerifyIdIsBoundTo<Type>
("x", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 835, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { int*** i; }\", qualType(asString(\"int ***\"), forEachDescendant(pointerType().bind(\"x\"))), new VerifyIdIsBoundTo<Type>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
;
836}
837
838TEST(Has, MatchesChildrenOfTypes)class Has_MatchesChildrenOfTypes_Test : public ::testing::Test
{ public: Has_MatchesChildrenOfTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Has_MatchesChildrenOfTypes_Test(Has_MatchesChildrenOfTypes_Test
const &); void operator=(Has_MatchesChildrenOfTypes_Test
const &);};::testing::TestInfo* const Has_MatchesChildrenOfTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Has", "MatchesChildrenOfTypes", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Has_MatchesChildrenOfTypes_Test>);void Has_MatchesChildrenOfTypes_Test
::TestBody()
{
839 EXPECT_TRUE(matches("int i;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i;", varDecl
(hasName("i"), has(isInteger()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 840, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i;\", varDecl(hasName(\"i\"), has(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
840 varDecl(hasName("i"), has(isInteger()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i;", varDecl
(hasName("i"), has(isInteger()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 840, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i;\", varDecl(hasName(\"i\"), has(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
;
841 EXPECT_TRUE(notMatches("int** i;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int** i;"
, varDecl(hasName("i"), has(isInteger()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 842, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int** i;\", varDecl(hasName(\"i\"), has(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
842 varDecl(hasName("i"), has(isInteger()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int** i;"
, varDecl(hasName("i"), has(isInteger()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 842, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int** i;\", varDecl(hasName(\"i\"), has(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
;
843 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int (*f)(float, int);", qualType(functionType(), forEach(qualType
(isInteger()).bind("x"))), new VerifyIdIsBoundTo<QualType>
("x", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 846, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int (*f)(float, int);\", qualType(functionType(), forEach(qualType(isInteger()).bind(\"x\"))), new VerifyIdIsBoundTo<QualType>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
844 "int (*f)(float, int);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int (*f)(float, int);", qualType(functionType(), forEach(qualType
(isInteger()).bind("x"))), new VerifyIdIsBoundTo<QualType>
("x", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 846, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int (*f)(float, int);\", qualType(functionType(), forEach(qualType(isInteger()).bind(\"x\"))), new VerifyIdIsBoundTo<QualType>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
845 qualType(functionType(), forEach(qualType(isInteger()).bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int (*f)(float, int);", qualType(functionType(), forEach(qualType
(isInteger()).bind("x"))), new VerifyIdIsBoundTo<QualType>
("x", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 846, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int (*f)(float, int);\", qualType(functionType(), forEach(qualType(isInteger()).bind(\"x\"))), new VerifyIdIsBoundTo<QualType>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
846 new VerifyIdIsBoundTo<QualType>("x", 2)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int (*f)(float, int);", qualType(functionType(), forEach(qualType
(isInteger()).bind("x"))), new VerifyIdIsBoundTo<QualType>
("x", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 846, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int (*f)(float, int);\", qualType(functionType(), forEach(qualType(isInteger()).bind(\"x\"))), new VerifyIdIsBoundTo<QualType>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
;
847}
848
849TEST(Has, MatchesChildTypes)class Has_MatchesChildTypes_Test : public ::testing::Test { public
: Has_MatchesChildTypes_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Has_MatchesChildTypes_Test(Has_MatchesChildTypes_Test
const &); void operator=(Has_MatchesChildTypes_Test const
&);};::testing::TestInfo* const Has_MatchesChildTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Has", "MatchesChildTypes", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Has_MatchesChildTypes_Test>);void Has_MatchesChildTypes_Test
::TestBody()
{
850 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int* i;", varDecl
(hasName("i"), hasType(qualType(has(builtinType()))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 852, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int* i;\", varDecl(hasName(\"i\"), hasType(qualType(has(builtinType())))))"
, "false", "true").c_str()) = ::testing::Message()
851 "int* i;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int* i;", varDecl
(hasName("i"), hasType(qualType(has(builtinType()))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 852, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int* i;\", varDecl(hasName(\"i\"), hasType(qualType(has(builtinType())))))"
, "false", "true").c_str()) = ::testing::Message()
852 varDecl(hasName("i"), hasType(qualType(has(builtinType()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int* i;", varDecl
(hasName("i"), hasType(qualType(has(builtinType()))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 852, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int* i;\", varDecl(hasName(\"i\"), hasType(qualType(has(builtinType())))))"
, "false", "true").c_str()) = ::testing::Message()
;
853 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int* i;"
, varDecl(hasName("i"), hasType(qualType(has(pointerType())))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 855, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int* i;\", varDecl(hasName(\"i\"), hasType(qualType(has(pointerType())))))"
, "false", "true").c_str()) = ::testing::Message()
854 "int* i;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int* i;"
, varDecl(hasName("i"), hasType(qualType(has(pointerType())))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 855, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int* i;\", varDecl(hasName(\"i\"), hasType(qualType(has(pointerType())))))"
, "false", "true").c_str()) = ::testing::Message()
855 varDecl(hasName("i"), hasType(qualType(has(pointerType()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int* i;"
, varDecl(hasName("i"), hasType(qualType(has(pointerType())))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 855, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int* i;\", varDecl(hasName(\"i\"), hasType(qualType(has(pointerType())))))"
, "false", "true").c_str()) = ::testing::Message()
;
856}
857
858TEST(ValueDecl, Matches)class ValueDecl_Matches_Test : public ::testing::Test { public
: ValueDecl_Matches_Test() {} private: virtual void TestBody(
); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); ValueDecl_Matches_Test(ValueDecl_Matches_Test const
&); void operator=(ValueDecl_Matches_Test const &);}
;::testing::TestInfo* const ValueDecl_Matches_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ValueDecl",
"Matches", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ValueDecl_Matches_Test
>);void ValueDecl_Matches_Test::TestBody()
{
859 EXPECT_TRUE(matches("enum EnumType { EnumValue };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("enum EnumType { EnumValue };"
, valueDecl(hasType(asString("enum EnumType")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 860, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"enum EnumType { EnumValue };\", valueDecl(hasType(asString(\"enum EnumType\"))))"
, "false", "true").c_str()) = ::testing::Message()
860 valueDecl(hasType(asString("enum EnumType")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("enum EnumType { EnumValue };"
, valueDecl(hasType(asString("enum EnumType")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 860, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"enum EnumType { EnumValue };\", valueDecl(hasType(asString(\"enum EnumType\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
861 EXPECT_TRUE(matches("void FunctionDecl();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void FunctionDecl();"
, valueDecl(hasType(asString("void (void)")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 862, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void FunctionDecl();\", valueDecl(hasType(asString(\"void (void)\"))))"
, "false", "true").c_str()) = ::testing::Message()
862 valueDecl(hasType(asString("void (void)")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void FunctionDecl();"
, valueDecl(hasType(asString("void (void)")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 862, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void FunctionDecl();\", valueDecl(hasType(asString(\"void (void)\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
863}
864
865TEST(Enum, DoesNotMatchClasses)class Enum_DoesNotMatchClasses_Test : public ::testing::Test {
public: Enum_DoesNotMatchClasses_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Enum_DoesNotMatchClasses_Test(Enum_DoesNotMatchClasses_Test
const &); void operator=(Enum_DoesNotMatchClasses_Test const
&);};::testing::TestInfo* const Enum_DoesNotMatchClasses_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Enum", "DoesNotMatchClasses", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Enum_DoesNotMatchClasses_Test>);void Enum_DoesNotMatchClasses_Test
::TestBody()
{
866 EXPECT_TRUE(notMatches("class X {};", enumDecl(hasName("X"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {};"
, enumDecl(hasName("X"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 866, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", enumDecl(hasName(\"X\")))", "false"
, "true").c_str()) = ::testing::Message()
;
867}
868
869TEST(Enum, MatchesEnums)class Enum_MatchesEnums_Test : public ::testing::Test { public
: Enum_MatchesEnums_Test() {} private: virtual void TestBody(
); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Enum_MatchesEnums_Test(Enum_MatchesEnums_Test const
&); void operator=(Enum_MatchesEnums_Test const &);}
;::testing::TestInfo* const Enum_MatchesEnums_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Enum", "MatchesEnums"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Enum_MatchesEnums_Test
>);void Enum_MatchesEnums_Test::TestBody()
{
870 EXPECT_TRUE(matches("enum X {};", enumDecl(hasName("X"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("enum X {};",
enumDecl(hasName("X"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 870, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"enum X {};\", enumDecl(hasName(\"X\")))", "false"
, "true").c_str()) = ::testing::Message()
;
871}
872
873TEST(EnumConstant, Matches)class EnumConstant_Matches_Test : public ::testing::Test { public
: EnumConstant_Matches_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); EnumConstant_Matches_Test(EnumConstant_Matches_Test
const &); void operator=(EnumConstant_Matches_Test const
&);};::testing::TestInfo* const EnumConstant_Matches_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EnumConstant", "Matches", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< EnumConstant_Matches_Test>);void EnumConstant_Matches_Test
::TestBody()
{
874 DeclarationMatcher Matcher = enumConstantDecl(hasName("A"));
875 EXPECT_TRUE(matches("enum X{ A };", Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("enum X{ A };"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 875, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"enum X{ A };\", Matcher)", "false", "true").c_str
()) = ::testing::Message()
;
876 EXPECT_TRUE(notMatches("enum X{ B };", Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("enum X{ B };"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 876, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"enum X{ B };\", Matcher)", "false", "true").c_str
()) = ::testing::Message()
;
877 EXPECT_TRUE(notMatches("enum X {};", Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("enum X {};"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 877, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"enum X {};\", Matcher)", "false", "true").c_str
()) = ::testing::Message()
;
878}
879
880TEST(StatementMatcher, Has)class StatementMatcher_Has_Test : public ::testing::Test { public
: StatementMatcher_Has_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); StatementMatcher_Has_Test(StatementMatcher_Has_Test
const &); void operator=(StatementMatcher_Has_Test const
&);};::testing::TestInfo* const StatementMatcher_Has_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"StatementMatcher", "Has", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< StatementMatcher_Has_Test>);void StatementMatcher_Has_Test
::TestBody()
{
881 StatementMatcher HasVariableI =
882 expr(hasType(pointsTo(recordDecl(hasName("X")))),
883 has(declRefExpr(to(varDecl(hasName("i"))))));
884
885 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X; X *x(int); void c() { int i; x(i); }"
, HasVariableI))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 886, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X; X *x(int); void c() { int i; x(i); }\", HasVariableI)"
, "false", "true").c_str()) = ::testing::Message()
886 "class X; X *x(int); void c() { int i; x(i); }", HasVariableI))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X; X *x(int); void c() { int i; x(i); }"
, HasVariableI))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 886, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X; X *x(int); void c() { int i; x(i); }\", HasVariableI)"
, "false", "true").c_str()) = ::testing::Message()
;
887 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X; X *x(int); void c() { int i; x(42); }"
, HasVariableI))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 888, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X; X *x(int); void c() { int i; x(42); }\", HasVariableI)"
, "false", "true").c_str()) = ::testing::Message()
888 "class X; X *x(int); void c() { int i; x(42); }", HasVariableI))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X; X *x(int); void c() { int i; x(42); }"
, HasVariableI))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 888, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X; X *x(int); void c() { int i; x(42); }\", HasVariableI)"
, "false", "true").c_str()) = ::testing::Message()
;
889}
890
891TEST(StatementMatcher, HasDescendant)class StatementMatcher_HasDescendant_Test : public ::testing::
Test { public: StatementMatcher_HasDescendant_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); StatementMatcher_HasDescendant_Test
(StatementMatcher_HasDescendant_Test const &); void operator
=(StatementMatcher_HasDescendant_Test const &);};::testing
::TestInfo* const StatementMatcher_HasDescendant_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "StatementMatcher"
, "HasDescendant", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< StatementMatcher_HasDescendant_Test
>);void StatementMatcher_HasDescendant_Test::TestBody()
{
892 StatementMatcher HasDescendantVariableI =
893 expr(hasType(pointsTo(recordDecl(hasName("X")))),
894 hasDescendant(declRefExpr(to(varDecl(hasName("i"))))));
895
896 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X; X *x(bool); bool b(int); void c() { int i; x(b(i)); }"
, HasDescendantVariableI))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 898, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X; X *x(bool); bool b(int); void c() { int i; x(b(i)); }\", HasDescendantVariableI)"
, "false", "true").c_str()) = ::testing::Message()
897 "class X; X *x(bool); bool b(int); void c() { int i; x(b(i)); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X; X *x(bool); bool b(int); void c() { int i; x(b(i)); }"
, HasDescendantVariableI))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 898, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X; X *x(bool); bool b(int); void c() { int i; x(b(i)); }\", HasDescendantVariableI)"
, "false", "true").c_str()) = ::testing::Message()
898 HasDescendantVariableI))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X; X *x(bool); bool b(int); void c() { int i; x(b(i)); }"
, HasDescendantVariableI))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 898, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X; X *x(bool); bool b(int); void c() { int i; x(b(i)); }\", HasDescendantVariableI)"
, "false", "true").c_str()) = ::testing::Message()
;
899 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X; X *x(bool); bool b(int); void c() { int i; x(b(42)); }"
, HasDescendantVariableI))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 901, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X; X *x(bool); bool b(int); void c() { int i; x(b(42)); }\", HasDescendantVariableI)"
, "false", "true").c_str()) = ::testing::Message()
900 "class X; X *x(bool); bool b(int); void c() { int i; x(b(42)); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X; X *x(bool); bool b(int); void c() { int i; x(b(42)); }"
, HasDescendantVariableI))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 901, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X; X *x(bool); bool b(int); void c() { int i; x(b(42)); }\", HasDescendantVariableI)"
, "false", "true").c_str()) = ::testing::Message()
901 HasDescendantVariableI))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X; X *x(bool); bool b(int); void c() { int i; x(b(42)); }"
, HasDescendantVariableI))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 901, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X; X *x(bool); bool b(int); void c() { int i; x(b(42)); }\", HasDescendantVariableI)"
, "false", "true").c_str()) = ::testing::Message()
;
902}
903
904TEST(TypeMatcher, MatchesClassType)class TypeMatcher_MatchesClassType_Test : public ::testing::Test
{ public: TypeMatcher_MatchesClassType_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatcher_MatchesClassType_Test(
TypeMatcher_MatchesClassType_Test const &); void operator
=(TypeMatcher_MatchesClassType_Test const &);};::testing::
TestInfo* const TypeMatcher_MatchesClassType_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatcher"
, "MatchesClassType", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< TypeMatcher_MatchesClassType_Test
>);void TypeMatcher_MatchesClassType_Test::TestBody()
{
905 TypeMatcher TypeA = hasDeclaration(recordDecl(hasName("A")));
906
907 EXPECT_TRUE(matches("class A { public: A *a; };", TypeA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { public: A *a; };"
, TypeA))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 907, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { public: A *a; };\", TypeA)", "false", "true"
).c_str()) = ::testing::Message()
;
908 EXPECT_TRUE(notMatches("class A {};", TypeA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A {};"
, TypeA))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 908, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A {};\", TypeA)", "false", "true").c_str
()) = ::testing::Message()
;
909
910 TypeMatcher TypeDerivedFromA =
911 hasDeclaration(cxxRecordDecl(isDerivedFrom("A")));
912
913 EXPECT_TRUE(matches("class A {}; class B : public A { public: B *b; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A {}; class B : public A { public: B *b; };"
, TypeDerivedFromA))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 914, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A {}; class B : public A { public: B *b; };\", TypeDerivedFromA)"
, "false", "true").c_str()) = ::testing::Message()
914 TypeDerivedFromA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A {}; class B : public A { public: B *b; };"
, TypeDerivedFromA))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 914, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A {}; class B : public A { public: B *b; };\", TypeDerivedFromA)"
, "false", "true").c_str()) = ::testing::Message()
;
915 EXPECT_TRUE(notMatches("class A {};", TypeA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A {};"
, TypeA))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 915, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A {};\", TypeA)", "false", "true").c_str
()) = ::testing::Message()
;
916
917 TypeMatcher TypeAHasClassB = hasDeclaration(
918 recordDecl(hasName("A"), has(recordDecl(hasName("B")))));
919
920 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { public: A *a; class B {}; };"
, TypeAHasClassB))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 921, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { public: A *a; class B {}; };\", TypeAHasClassB)"
, "false", "true").c_str()) = ::testing::Message()
921 matches("class A { public: A *a; class B {}; };", TypeAHasClassB))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { public: A *a; class B {}; };"
, TypeAHasClassB))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 921, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { public: A *a; class B {}; };\", TypeAHasClassB)"
, "false", "true").c_str()) = ::testing::Message()
;
922
923 EXPECT_TRUE(matchesC("struct S {}; void f(void) { struct S s; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesC("struct S {}; void f(void) { struct S s; }"
, varDecl(hasType(namedDecl(hasName("S"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 924, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesC(\"struct S {}; void f(void) { struct S s; }\", varDecl(hasType(namedDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
924 varDecl(hasType(namedDecl(hasName("S"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesC("struct S {}; void f(void) { struct S s; }"
, varDecl(hasType(namedDecl(hasName("S"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 924, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesC(\"struct S {}; void f(void) { struct S s; }\", varDecl(hasType(namedDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
925}
926
927TEST(TypeMatcher, MatchesDeclTypes)class TypeMatcher_MatchesDeclTypes_Test : public ::testing::Test
{ public: TypeMatcher_MatchesDeclTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatcher_MatchesDeclTypes_Test(
TypeMatcher_MatchesDeclTypes_Test const &); void operator
=(TypeMatcher_MatchesDeclTypes_Test const &);};::testing::
TestInfo* const TypeMatcher_MatchesDeclTypes_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatcher"
, "MatchesDeclTypes", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< TypeMatcher_MatchesDeclTypes_Test
>);void TypeMatcher_MatchesDeclTypes_Test::TestBody()
{
928 // TypedefType -> TypedefNameDecl
929 EXPECT_TRUE(matches("typedef int I; void f(I i);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int I; void f(I i);"
, parmVarDecl(hasType(namedDecl(hasName("I"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 930, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int I; void f(I i);\", parmVarDecl(hasType(namedDecl(hasName(\"I\")))))"
, "false", "true").c_str()) = ::testing::Message()
930 parmVarDecl(hasType(namedDecl(hasName("I"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int I; void f(I i);"
, parmVarDecl(hasType(namedDecl(hasName("I"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 930, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int I; void f(I i);\", parmVarDecl(hasType(namedDecl(hasName(\"I\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
931 // ObjCObjectPointerType
932 EXPECT_TRUE(matchesObjC("@interface Foo @end void f(Foo *f);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC("@interface Foo @end void f(Foo *f);"
, parmVarDecl(hasType(objcObjectPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 933, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC(\"@interface Foo @end void f(Foo *f);\", parmVarDecl(hasType(objcObjectPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
933 parmVarDecl(hasType(objcObjectPointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC("@interface Foo @end void f(Foo *f);"
, parmVarDecl(hasType(objcObjectPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 933, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC(\"@interface Foo @end void f(Foo *f);\", parmVarDecl(hasType(objcObjectPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
934 // ObjCObjectPointerType -> ObjCInterfaceType -> ObjCInterfaceDecl
935 EXPECT_TRUE(matchesObjC(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( "@interface Foo @end void f(Foo *f);"
, parmVarDecl(hasType(pointsTo(objcInterfaceDecl(hasName("Foo"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 937, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( \"@interface Foo @end void f(Foo *f);\", parmVarDecl(hasType(pointsTo(objcInterfaceDecl(hasName(\"Foo\"))))))"
, "false", "true").c_str()) = ::testing::Message()
936 "@interface Foo @end void f(Foo *f);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( "@interface Foo @end void f(Foo *f);"
, parmVarDecl(hasType(pointsTo(objcInterfaceDecl(hasName("Foo"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 937, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( \"@interface Foo @end void f(Foo *f);\", parmVarDecl(hasType(pointsTo(objcInterfaceDecl(hasName(\"Foo\"))))))"
, "false", "true").c_str()) = ::testing::Message()
937 parmVarDecl(hasType(pointsTo(objcInterfaceDecl(hasName("Foo")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( "@interface Foo @end void f(Foo *f);"
, parmVarDecl(hasType(pointsTo(objcInterfaceDecl(hasName("Foo"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 937, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( \"@interface Foo @end void f(Foo *f);\", parmVarDecl(hasType(pointsTo(objcInterfaceDecl(hasName(\"Foo\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
938 // TemplateTypeParmType
939 EXPECT_TRUE(matches("template <typename T> void f(T t);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> void f(T t);"
, parmVarDecl(hasType(templateTypeParmType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 940, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> void f(T t);\", parmVarDecl(hasType(templateTypeParmType())))"
, "false", "true").c_str()) = ::testing::Message()
940 parmVarDecl(hasType(templateTypeParmType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> void f(T t);"
, parmVarDecl(hasType(templateTypeParmType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 940, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> void f(T t);\", parmVarDecl(hasType(templateTypeParmType())))"
, "false", "true").c_str()) = ::testing::Message()
;
941 // TemplateTypeParmType -> TemplateTypeParmDecl
942 EXPECT_TRUE(matches("template <typename T> void f(T t);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> void f(T t);"
, parmVarDecl(hasType(namedDecl(hasName("T"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> void f(T t);\", parmVarDecl(hasType(namedDecl(hasName(\"T\")))))"
, "false", "true").c_str()) = ::testing::Message()
943 parmVarDecl(hasType(namedDecl(hasName("T"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> void f(T t);"
, parmVarDecl(hasType(namedDecl(hasName("T"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> void f(T t);\", parmVarDecl(hasType(namedDecl(hasName(\"T\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
944 // InjectedClassNameType
945 EXPECT_TRUE(matches("template <typename T> struct S {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct S {"
" void f(S s);" "};", parmVarDecl(hasType(injectedClassNameType
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 948, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct S {\" \" void f(S s);\" \"};\", parmVarDecl(hasType(injectedClassNameType())))"
, "false", "true").c_str()) = ::testing::Message()
946 " void f(S s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct S {"
" void f(S s);" "};", parmVarDecl(hasType(injectedClassNameType
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 948, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct S {\" \" void f(S s);\" \"};\", parmVarDecl(hasType(injectedClassNameType())))"
, "false", "true").c_str()) = ::testing::Message()
947 "};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct S {"
" void f(S s);" "};", parmVarDecl(hasType(injectedClassNameType
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 948, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct S {\" \" void f(S s);\" \"};\", parmVarDecl(hasType(injectedClassNameType())))"
, "false", "true").c_str()) = ::testing::Message()
948 parmVarDecl(hasType(injectedClassNameType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct S {"
" void f(S s);" "};", parmVarDecl(hasType(injectedClassNameType
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 948, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct S {\" \" void f(S s);\" \"};\", parmVarDecl(hasType(injectedClassNameType())))"
, "false", "true").c_str()) = ::testing::Message()
;
949 EXPECT_TRUE(notMatches("template <typename T> struct S {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> struct S {"
" void g(S<T> s);" "};", parmVarDecl(hasType(injectedClassNameType
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 952, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> struct S {\" \" void g(S<T> s);\" \"};\", parmVarDecl(hasType(injectedClassNameType())))"
, "false", "true").c_str()) = ::testing::Message()
950 " void g(S<T> s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> struct S {"
" void g(S<T> s);" "};", parmVarDecl(hasType(injectedClassNameType
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 952, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> struct S {\" \" void g(S<T> s);\" \"};\", parmVarDecl(hasType(injectedClassNameType())))"
, "false", "true").c_str()) = ::testing::Message()
951 "};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> struct S {"
" void g(S<T> s);" "};", parmVarDecl(hasType(injectedClassNameType
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 952, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> struct S {\" \" void g(S<T> s);\" \"};\", parmVarDecl(hasType(injectedClassNameType())))"
, "false", "true").c_str()) = ::testing::Message()
952 parmVarDecl(hasType(injectedClassNameType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> struct S {"
" void g(S<T> s);" "};", parmVarDecl(hasType(injectedClassNameType
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 952, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> struct S {\" \" void g(S<T> s);\" \"};\", parmVarDecl(hasType(injectedClassNameType())))"
, "false", "true").c_str()) = ::testing::Message()
;
953 // InjectedClassNameType -> CXXRecordDecl
954 EXPECT_TRUE(matches("template <typename T> struct S {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct S {"
" void f(S s);" "};", parmVarDecl(hasType(namedDecl(hasName
("S"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 957, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct S {\" \" void f(S s);\" \"};\", parmVarDecl(hasType(namedDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
955 " void f(S s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct S {"
" void f(S s);" "};", parmVarDecl(hasType(namedDecl(hasName
("S"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 957, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct S {\" \" void f(S s);\" \"};\", parmVarDecl(hasType(namedDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
956 "};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct S {"
" void f(S s);" "};", parmVarDecl(hasType(namedDecl(hasName
("S"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 957, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct S {\" \" void f(S s);\" \"};\", parmVarDecl(hasType(namedDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
957 parmVarDecl(hasType(namedDecl(hasName("S"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct S {"
" void f(S s);" "};", parmVarDecl(hasType(namedDecl(hasName
("S"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 957, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct S {\" \" void f(S s);\" \"};\", parmVarDecl(hasType(namedDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
958
959 static const char Using[] = "template <typename T>"
960 "struct Base {"
961 " typedef T Foo;"
962 "};"
963 ""
964 "template <typename T>"
965 "struct S : private Base<T> {"
966 " using typename Base<T>::Foo;"
967 " void f(Foo);"
968 "};";
969 // UnresolvedUsingTypenameDecl
970 EXPECT_TRUE(matches(Using, unresolvedUsingTypenameDecl(hasName("Foo"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Using, unresolvedUsingTypenameDecl
(hasName("Foo"))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 970, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Using, unresolvedUsingTypenameDecl(hasName(\"Foo\")))"
, "false", "true").c_str()) = ::testing::Message()
;
971 // UnresolvedUsingTypenameType -> UnresolvedUsingTypenameDecl
972 EXPECT_TRUE(matches(Using, parmVarDecl(hasType(namedDecl(hasName("Foo"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Using, parmVarDecl
(hasType(namedDecl(hasName("Foo"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 972, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Using, parmVarDecl(hasType(namedDecl(hasName(\"Foo\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
973}
974
975TEST(Matcher, BindMatchedNodes)class Matcher_BindMatchedNodes_Test : public ::testing::Test {
public: Matcher_BindMatchedNodes_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_BindMatchedNodes_Test(Matcher_BindMatchedNodes_Test
const &); void operator=(Matcher_BindMatchedNodes_Test const
&);};::testing::TestInfo* const Matcher_BindMatchedNodes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "BindMatchedNodes", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_BindMatchedNodes_Test>);void Matcher_BindMatchedNodes_Test
::TestBody()
{
976 DeclarationMatcher ClassX = has(recordDecl(hasName("::X")).bind("x"));
977
978 EXPECT_TRUE(matchAndVerifyResultTrue("class X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class X {};", ClassX, new VerifyIdIsBoundTo<CXXRecordDecl
>("x")))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 979, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class X {};\", ClassX, new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
979 ClassX, new VerifyIdIsBoundTo<CXXRecordDecl>("x")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class X {};", ClassX, new VerifyIdIsBoundTo<CXXRecordDecl
>("x")))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 979, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class X {};\", ClassX, new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
;
980
981 EXPECT_TRUE(matchAndVerifyResultFalse("class X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class X {};", ClassX, new VerifyIdIsBoundTo<CXXRecordDecl
>("other-id")))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 982, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class X {};\", ClassX, new VerifyIdIsBoundTo<CXXRecordDecl>(\"other-id\"))"
, "false", "true").c_str()) = ::testing::Message()
982 ClassX, new VerifyIdIsBoundTo<CXXRecordDecl>("other-id")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class X {};", ClassX, new VerifyIdIsBoundTo<CXXRecordDecl
>("other-id")))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 982, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class X {};\", ClassX, new VerifyIdIsBoundTo<CXXRecordDecl>(\"other-id\"))"
, "false", "true").c_str()) = ::testing::Message()
;
983
984 TypeMatcher TypeAHasClassB = hasDeclaration(
985 recordDecl(hasName("A"), has(recordDecl(hasName("B")).bind("b"))));
986
987 EXPECT_TRUE(matchAndVerifyResultTrue("class A { public: A *a; class B {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { public: A *a; class B {}; };", TypeAHasClassB, new
VerifyIdIsBoundTo<Decl>("b")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 989, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { public: A *a; class B {}; };\", TypeAHasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
988 TypeAHasClassB,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { public: A *a; class B {}; };", TypeAHasClassB, new
VerifyIdIsBoundTo<Decl>("b")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 989, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { public: A *a; class B {}; };\", TypeAHasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
989 new VerifyIdIsBoundTo<Decl>("b")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { public: A *a; class B {}; };", TypeAHasClassB, new
VerifyIdIsBoundTo<Decl>("b")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 989, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { public: A *a; class B {}; };\", TypeAHasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
;
990
991 StatementMatcher MethodX =
992 callExpr(callee(cxxMethodDecl(hasName("x")))).bind("x");
993
994 EXPECT_TRUE(matchAndVerifyResultTrue("class A { void x() { x(); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { void x() { x(); } };", MethodX, new VerifyIdIsBoundTo
<CXXMemberCallExpr>("x")))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 996, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { void x() { x(); } };\", MethodX, new VerifyIdIsBoundTo<CXXMemberCallExpr>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
995 MethodX,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { void x() { x(); } };", MethodX, new VerifyIdIsBoundTo
<CXXMemberCallExpr>("x")))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 996, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { void x() { x(); } };\", MethodX, new VerifyIdIsBoundTo<CXXMemberCallExpr>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
996 new VerifyIdIsBoundTo<CXXMemberCallExpr>("x")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { void x() { x(); } };", MethodX, new VerifyIdIsBoundTo
<CXXMemberCallExpr>("x")))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 996, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { void x() { x(); } };\", MethodX, new VerifyIdIsBoundTo<CXXMemberCallExpr>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
;
997}
998
999TEST(Matcher, BindTheSameNameInAlternatives)class Matcher_BindTheSameNameInAlternatives_Test : public ::testing
::Test { public: Matcher_BindTheSameNameInAlternatives_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_BindTheSameNameInAlternatives_Test
(Matcher_BindTheSameNameInAlternatives_Test const &); void
operator=(Matcher_BindTheSameNameInAlternatives_Test const &
);};::testing::TestInfo* const Matcher_BindTheSameNameInAlternatives_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "BindTheSameNameInAlternatives", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_BindTheSameNameInAlternatives_Test
>);void Matcher_BindTheSameNameInAlternatives_Test::TestBody
()
{
1000 StatementMatcher matcher = anyOf(
1001 binaryOperator(hasOperatorName("+"),
1002 hasLHS(expr().bind("x")),
1003 hasRHS(integerLiteral(equals(0)))),
1004 binaryOperator(hasOperatorName("+"),
1005 hasLHS(integerLiteral(equals(0))),
1006 hasRHS(expr().bind("x"))));
1007
1008 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() { return 0 + f(); }", matcher, new VerifyIdIsBoundTo
<CallExpr>("x")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() { return 0 + f(); }\", matcher, new VerifyIdIsBoundTo<CallExpr>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
1009 // The first branch of the matcher binds x to 0 but then fails.switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() { return 0 + f(); }", matcher, new VerifyIdIsBoundTo
<CallExpr>("x")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() { return 0 + f(); }\", matcher, new VerifyIdIsBoundTo<CallExpr>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
1010 // The second branch binds x to f() and succeeds.switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() { return 0 + f(); }", matcher, new VerifyIdIsBoundTo
<CallExpr>("x")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() { return 0 + f(); }\", matcher, new VerifyIdIsBoundTo<CallExpr>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
1011 "int f() { return 0 + f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() { return 0 + f(); }", matcher, new VerifyIdIsBoundTo
<CallExpr>("x")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() { return 0 + f(); }\", matcher, new VerifyIdIsBoundTo<CallExpr>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
1012 matcher,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() { return 0 + f(); }", matcher, new VerifyIdIsBoundTo
<CallExpr>("x")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() { return 0 + f(); }\", matcher, new VerifyIdIsBoundTo<CallExpr>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
1013 new VerifyIdIsBoundTo<CallExpr>("x")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() { return 0 + f(); }", matcher, new VerifyIdIsBoundTo
<CallExpr>("x")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() { return 0 + f(); }\", matcher, new VerifyIdIsBoundTo<CallExpr>(\"x\"))"
, "false", "true").c_str()) = ::testing::Message()
;
1014}
1015
1016TEST(Matcher, BindsIDForMemoizedResults)class Matcher_BindsIDForMemoizedResults_Test : public ::testing
::Test { public: Matcher_BindsIDForMemoizedResults_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_BindsIDForMemoizedResults_Test
(Matcher_BindsIDForMemoizedResults_Test const &); void operator
=(Matcher_BindsIDForMemoizedResults_Test const &);};::testing
::TestInfo* const Matcher_BindsIDForMemoizedResults_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "BindsIDForMemoizedResults"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_BindsIDForMemoizedResults_Test
>);void Matcher_BindsIDForMemoizedResults_Test::TestBody()
{
1017 // Using the same matcher in two match expressions will make memoization
1018 // kick in.
1019 DeclarationMatcher ClassX = recordDecl(hasName("X")).bind("x");
1020 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class X {}; }; };", DeclarationMatcher
(anyOf( recordDecl(hasName("A"), hasDescendant(ClassX)), recordDecl
(hasName("B"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo
<Decl>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class X {}; }; };\", DeclarationMatcher(anyOf( recordDecl(hasName(\"A\"), hasDescendant(ClassX)), recordDecl(hasName(\"B\"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo<Decl>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1021 "class A { class B { class X {}; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class X {}; }; };", DeclarationMatcher
(anyOf( recordDecl(hasName("A"), hasDescendant(ClassX)), recordDecl
(hasName("B"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo
<Decl>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class X {}; }; };\", DeclarationMatcher(anyOf( recordDecl(hasName(\"A\"), hasDescendant(ClassX)), recordDecl(hasName(\"B\"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo<Decl>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1022 DeclarationMatcher(anyOf(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class X {}; }; };", DeclarationMatcher
(anyOf( recordDecl(hasName("A"), hasDescendant(ClassX)), recordDecl
(hasName("B"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo
<Decl>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class X {}; }; };\", DeclarationMatcher(anyOf( recordDecl(hasName(\"A\"), hasDescendant(ClassX)), recordDecl(hasName(\"B\"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo<Decl>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1023 recordDecl(hasName("A"), hasDescendant(ClassX)),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class X {}; }; };", DeclarationMatcher
(anyOf( recordDecl(hasName("A"), hasDescendant(ClassX)), recordDecl
(hasName("B"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo
<Decl>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class X {}; }; };\", DeclarationMatcher(anyOf( recordDecl(hasName(\"A\"), hasDescendant(ClassX)), recordDecl(hasName(\"B\"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo<Decl>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1024 recordDecl(hasName("B"), hasDescendant(ClassX)))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class X {}; }; };", DeclarationMatcher
(anyOf( recordDecl(hasName("A"), hasDescendant(ClassX)), recordDecl
(hasName("B"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo
<Decl>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class X {}; }; };\", DeclarationMatcher(anyOf( recordDecl(hasName(\"A\"), hasDescendant(ClassX)), recordDecl(hasName(\"B\"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo<Decl>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1025 new VerifyIdIsBoundTo<Decl>("x", 2)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class X {}; }; };", DeclarationMatcher
(anyOf( recordDecl(hasName("A"), hasDescendant(ClassX)), recordDecl
(hasName("B"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo
<Decl>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class X {}; }; };\", DeclarationMatcher(anyOf( recordDecl(hasName(\"A\"), hasDescendant(ClassX)), recordDecl(hasName(\"B\"), hasDescendant(ClassX)))), new VerifyIdIsBoundTo<Decl>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
;
1026}
1027
1028TEST(HasDeclaration, HasDeclarationOfEnumType)class HasDeclaration_HasDeclarationOfEnumType_Test : public ::
testing::Test { public: HasDeclaration_HasDeclarationOfEnumType_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasDeclaration_HasDeclarationOfEnumType_Test
(HasDeclaration_HasDeclarationOfEnumType_Test const &); void
operator=(HasDeclaration_HasDeclarationOfEnumType_Test const
&);};::testing::TestInfo* const HasDeclaration_HasDeclarationOfEnumType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasDeclaration", "HasDeclarationOfEnumType", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasDeclaration_HasDeclarationOfEnumType_Test
>);void HasDeclaration_HasDeclarationOfEnumType_Test::TestBody
()
{
1029 EXPECT_TRUE(matches("enum X {}; void y(X *x) { x; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("enum X {}; void y(X *x) { x; }"
, expr(hasType(pointsTo( qualType(hasDeclaration(enumDecl(hasName
("X")))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1031, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"enum X {}; void y(X *x) { x; }\", expr(hasType(pointsTo( qualType(hasDeclaration(enumDecl(hasName(\"X\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
1030 expr(hasType(pointsTo(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("enum X {}; void y(X *x) { x; }"
, expr(hasType(pointsTo( qualType(hasDeclaration(enumDecl(hasName
("X")))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1031, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"enum X {}; void y(X *x) { x; }\", expr(hasType(pointsTo( qualType(hasDeclaration(enumDecl(hasName(\"X\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
1031 qualType(hasDeclaration(enumDecl(hasName("X")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("enum X {}; void y(X *x) { x; }"
, expr(hasType(pointsTo( qualType(hasDeclaration(enumDecl(hasName
("X")))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1031, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"enum X {}; void y(X *x) { x; }\", expr(hasType(pointsTo( qualType(hasDeclaration(enumDecl(hasName(\"X\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1032}
1033
1034TEST(HasDeclaration, HasGetDeclTraitTest)class HasDeclaration_HasGetDeclTraitTest_Test : public ::testing
::Test { public: HasDeclaration_HasGetDeclTraitTest_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasDeclaration_HasGetDeclTraitTest_Test
(HasDeclaration_HasGetDeclTraitTest_Test const &); void operator
=(HasDeclaration_HasGetDeclTraitTest_Test const &);};::testing
::TestInfo* const HasDeclaration_HasGetDeclTraitTest_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasDeclaration"
, "HasGetDeclTraitTest", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< HasDeclaration_HasGetDeclTraitTest_Test>);void HasDeclaration_HasGetDeclTraitTest_Test
::TestBody()
{
1035 EXPECT_TRUE(internal::has_getDecl<TypedefType>::value)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(internal::has_getDecl
<TypedefType>::value)) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1035, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "internal::has_getDecl<TypedefType>::value", "false",
"true").c_str()) = ::testing::Message()
;
1036 EXPECT_TRUE(internal::has_getDecl<RecordType>::value)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(internal::has_getDecl
<RecordType>::value)) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1036, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "internal::has_getDecl<RecordType>::value", "false", "true"
).c_str()) = ::testing::Message()
;
1037 EXPECT_FALSE(internal::has_getDecl<TemplateSpecializationType>::value)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(internal::has_getDecl
<TemplateSpecializationType>::value))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1037, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "internal::has_getDecl<TemplateSpecializationType>::value"
, "true", "false").c_str()) = ::testing::Message()
;
1038}
1039
1040TEST(HasDeclaration, HasDeclarationOfTypeWithDecl)class HasDeclaration_HasDeclarationOfTypeWithDecl_Test : public
::testing::Test { public: HasDeclaration_HasDeclarationOfTypeWithDecl_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasDeclaration_HasDeclarationOfTypeWithDecl_Test
(HasDeclaration_HasDeclarationOfTypeWithDecl_Test const &
); void operator=(HasDeclaration_HasDeclarationOfTypeWithDecl_Test
const &);};::testing::TestInfo* const HasDeclaration_HasDeclarationOfTypeWithDecl_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasDeclaration", "HasDeclarationOfTypeWithDecl", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasDeclaration_HasDeclarationOfTypeWithDecl_Test
>);void HasDeclaration_HasDeclarationOfTypeWithDecl_Test::
TestBody()
{
1041 EXPECT_TRUE(matches("typedef int X; X a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int X; X a;"
, varDecl(hasName("a"), hasType(typedefType(hasDeclaration(decl
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1043, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int X; X a;\", varDecl(hasName(\"a\"), hasType(typedefType(hasDeclaration(decl())))))"
, "false", "true").c_str()) = ::testing::Message()
1042 varDecl(hasName("a"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int X; X a;"
, varDecl(hasName("a"), hasType(typedefType(hasDeclaration(decl
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1043, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int X; X a;\", varDecl(hasName(\"a\"), hasType(typedefType(hasDeclaration(decl())))))"
, "false", "true").c_str()) = ::testing::Message()
1043 hasType(typedefType(hasDeclaration(decl()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int X; X a;"
, varDecl(hasName("a"), hasType(typedefType(hasDeclaration(decl
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1043, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int X; X a;\", varDecl(hasName(\"a\"), hasType(typedefType(hasDeclaration(decl())))))"
, "false", "true").c_str()) = ::testing::Message()
;
1044
1045 // FIXME: Add tests for other types with getDecl() (e.g. RecordType)
1046}
1047
1048TEST(HasDeclaration, HasDeclarationOfTemplateSpecializationType)class HasDeclaration_HasDeclarationOfTemplateSpecializationType_Test
: public ::testing::Test { public: HasDeclaration_HasDeclarationOfTemplateSpecializationType_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasDeclaration_HasDeclarationOfTemplateSpecializationType_Test
(HasDeclaration_HasDeclarationOfTemplateSpecializationType_Test
const &); void operator=(HasDeclaration_HasDeclarationOfTemplateSpecializationType_Test
const &);};::testing::TestInfo* const HasDeclaration_HasDeclarationOfTemplateSpecializationType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasDeclaration", "HasDeclarationOfTemplateSpecializationType"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< HasDeclaration_HasDeclarationOfTemplateSpecializationType_Test
>);void HasDeclaration_HasDeclarationOfTemplateSpecializationType_Test
::TestBody()
{
1049 EXPECT_TRUE(matches("template <typename T> class A {}; A<int> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class A {}; A<int> a;"
, varDecl(hasType(templateSpecializationType( hasDeclaration(
namedDecl(hasName("A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1051, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class A {}; A<int> a;\", varDecl(hasType(templateSpecializationType( hasDeclaration(namedDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1050 varDecl(hasType(templateSpecializationType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class A {}; A<int> a;"
, varDecl(hasType(templateSpecializationType( hasDeclaration(
namedDecl(hasName("A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1051, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class A {}; A<int> a;\", varDecl(hasType(templateSpecializationType( hasDeclaration(namedDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1051 hasDeclaration(namedDecl(hasName("A"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class A {}; A<int> a;"
, varDecl(hasType(templateSpecializationType( hasDeclaration(
namedDecl(hasName("A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1051, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class A {}; A<int> a;\", varDecl(hasType(templateSpecializationType( hasDeclaration(namedDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1052}
1053
1054TEST(HasType, TakesQualTypeMatcherAndMatchesExpr)class HasType_TakesQualTypeMatcherAndMatchesExpr_Test : public
::testing::Test { public: HasType_TakesQualTypeMatcherAndMatchesExpr_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasType_TakesQualTypeMatcherAndMatchesExpr_Test
(HasType_TakesQualTypeMatcherAndMatchesExpr_Test const &)
; void operator=(HasType_TakesQualTypeMatcherAndMatchesExpr_Test
const &);};::testing::TestInfo* const HasType_TakesQualTypeMatcherAndMatchesExpr_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasType", "TakesQualTypeMatcherAndMatchesExpr", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasType_TakesQualTypeMatcherAndMatchesExpr_Test
>);void HasType_TakesQualTypeMatcherAndMatchesExpr_Test::TestBody
()
{
1055 TypeMatcher ClassX = hasDeclaration(recordDecl(hasName("X")));
1056 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X &x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1057, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X &x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1057 matches("class X {}; void y(X &x) { x; }", expr(hasType(ClassX))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X &x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1057, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X &x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
;
1058 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y(X *x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y(X *x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1059 notMatches("class X {}; void y(X *x) { x; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y(X *x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y(X *x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1060 expr(hasType(ClassX))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y(X *x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y(X *x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
;
1061 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X *x) { x; }"
, expr(hasType(pointsTo(ClassX)))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1063, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X *x) { x; }\", expr(hasType(pointsTo(ClassX))))"
, "false", "true").c_str()) = ::testing::Message()
1062 matches("class X {}; void y(X *x) { x; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X *x) { x; }"
, expr(hasType(pointsTo(ClassX)))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1063, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X *x) { x; }\", expr(hasType(pointsTo(ClassX))))"
, "false", "true").c_str()) = ::testing::Message()
1063 expr(hasType(pointsTo(ClassX)))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X *x) { x; }"
, expr(hasType(pointsTo(ClassX)))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1063, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X *x) { x; }\", expr(hasType(pointsTo(ClassX))))"
, "false", "true").c_str()) = ::testing::Message()
;
1064}
1065
1066TEST(HasType, TakesQualTypeMatcherAndMatchesValueDecl)class HasType_TakesQualTypeMatcherAndMatchesValueDecl_Test : public
::testing::Test { public: HasType_TakesQualTypeMatcherAndMatchesValueDecl_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasType_TakesQualTypeMatcherAndMatchesValueDecl_Test
(HasType_TakesQualTypeMatcherAndMatchesValueDecl_Test const &
); void operator=(HasType_TakesQualTypeMatcherAndMatchesValueDecl_Test
const &);};::testing::TestInfo* const HasType_TakesQualTypeMatcherAndMatchesValueDecl_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasType", "TakesQualTypeMatcherAndMatchesValueDecl", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< HasType_TakesQualTypeMatcherAndMatchesValueDecl_Test
>);void HasType_TakesQualTypeMatcherAndMatchesValueDecl_Test
::TestBody()
{
1067 TypeMatcher ClassX = hasDeclaration(recordDecl(hasName("X")));
1068 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y() { X x; }"
, varDecl(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1069, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y() { X x; }\", varDecl(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1069 matches("class X {}; void y() { X x; }", varDecl(hasType(ClassX))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y() { X x; }"
, varDecl(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1069, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y() { X x; }\", varDecl(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
;
1070 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y() { X *x; }"
, varDecl(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1071, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y() { X *x; }\", varDecl(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1071 notMatches("class X {}; void y() { X *x; }", varDecl(hasType(ClassX))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y() { X *x; }"
, varDecl(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1071, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y() { X *x; }\", varDecl(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
;
1072 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y() { X *x; }"
, varDecl(hasType(pointsTo(ClassX)))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y() { X *x; }\", varDecl(hasType(pointsTo(ClassX))))"
, "false", "true").c_str()) = ::testing::Message()
1073 matches("class X {}; void y() { X *x; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y() { X *x; }"
, varDecl(hasType(pointsTo(ClassX)))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y() { X *x; }\", varDecl(hasType(pointsTo(ClassX))))"
, "false", "true").c_str()) = ::testing::Message()
1074 varDecl(hasType(pointsTo(ClassX)))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y() { X *x; }"
, varDecl(hasType(pointsTo(ClassX)))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y() { X *x; }\", varDecl(hasType(pointsTo(ClassX))))"
, "false", "true").c_str()) = ::testing::Message()
;
1075}
1076
1077TEST(HasType, TakesDeclMatcherAndMatchesExpr)class HasType_TakesDeclMatcherAndMatchesExpr_Test : public ::
testing::Test { public: HasType_TakesDeclMatcherAndMatchesExpr_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasType_TakesDeclMatcherAndMatchesExpr_Test
(HasType_TakesDeclMatcherAndMatchesExpr_Test const &); void
operator=(HasType_TakesDeclMatcherAndMatchesExpr_Test const &
);};::testing::TestInfo* const HasType_TakesDeclMatcherAndMatchesExpr_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasType", "TakesDeclMatcherAndMatchesExpr", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasType_TakesDeclMatcherAndMatchesExpr_Test
>);void HasType_TakesDeclMatcherAndMatchesExpr_Test::TestBody
()
{
1078 DeclarationMatcher ClassX = recordDecl(hasName("X"));
1079 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X &x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1080, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X &x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1080 matches("class X {}; void y(X &x) { x; }", expr(hasType(ClassX))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X &x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1080, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X &x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
;
1081 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y(X *x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1083, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y(X *x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1082 notMatches("class X {}; void y(X *x) { x; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y(X *x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1083, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y(X *x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1083 expr(hasType(ClassX))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y(X *x) { x; }"
, expr(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1083, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y(X *x) { x; }\", expr(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
;
1084}
1085
1086TEST(HasType, TakesDeclMatcherAndMatchesValueDecl)class HasType_TakesDeclMatcherAndMatchesValueDecl_Test : public
::testing::Test { public: HasType_TakesDeclMatcherAndMatchesValueDecl_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasType_TakesDeclMatcherAndMatchesValueDecl_Test
(HasType_TakesDeclMatcherAndMatchesValueDecl_Test const &
); void operator=(HasType_TakesDeclMatcherAndMatchesValueDecl_Test
const &);};::testing::TestInfo* const HasType_TakesDeclMatcherAndMatchesValueDecl_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasType", "TakesDeclMatcherAndMatchesValueDecl", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasType_TakesDeclMatcherAndMatchesValueDecl_Test
>);void HasType_TakesDeclMatcherAndMatchesValueDecl_Test::
TestBody()
{
1087 DeclarationMatcher ClassX = recordDecl(hasName("X"));
1088 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y() { X x; }"
, varDecl(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1089, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y() { X x; }\", varDecl(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1089 matches("class X {}; void y() { X x; }", varDecl(hasType(ClassX))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y() { X x; }"
, varDecl(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1089, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y() { X x; }\", varDecl(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
;
1090 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y() { X *x; }"
, varDecl(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y() { X *x; }\", varDecl(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
1091 notMatches("class X {}; void y() { X *x; }", varDecl(hasType(ClassX))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y() { X *x; }"
, varDecl(hasType(ClassX))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y() { X *x; }\", varDecl(hasType(ClassX)))"
, "false", "true").c_str()) = ::testing::Message()
;
1092}
1093
1094TEST(HasTypeLoc, MatchesDeclaratorDecls)class HasTypeLoc_MatchesDeclaratorDecls_Test : public ::testing
::Test { public: HasTypeLoc_MatchesDeclaratorDecls_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); HasTypeLoc_MatchesDeclaratorDecls_Test
(HasTypeLoc_MatchesDeclaratorDecls_Test const &); void operator
=(HasTypeLoc_MatchesDeclaratorDecls_Test const &);};::testing
::TestInfo* const HasTypeLoc_MatchesDeclaratorDecls_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasTypeLoc"
, "MatchesDeclaratorDecls", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< HasTypeLoc_MatchesDeclaratorDecls_Test>);void HasTypeLoc_MatchesDeclaratorDecls_Test
::TestBody()
{
1095 EXPECT_TRUE(matches("int x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x;", varDecl
(hasName("x"), hasTypeLoc(loc(asString("int"))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1096, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x;\", varDecl(hasName(\"x\"), hasTypeLoc(loc(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1096 varDecl(hasName("x"), hasTypeLoc(loc(asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x;", varDecl
(hasName("x"), hasTypeLoc(loc(asString("int"))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1096, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x;\", varDecl(hasName(\"x\"), hasTypeLoc(loc(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1097
1098 // Make sure we don't crash on implicit constructors.
1099 EXPECT_TRUE(notMatches("class X {}; X x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; X x;"
, declaratorDecl(hasTypeLoc(loc(asString("int"))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1100, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; X x;\", declaratorDecl(hasTypeLoc(loc(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1100 declaratorDecl(hasTypeLoc(loc(asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; X x;"
, declaratorDecl(hasTypeLoc(loc(asString("int"))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1100, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; X x;\", declaratorDecl(hasTypeLoc(loc(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1101}
1102
1103TEST(Matcher, Call)class Matcher_Call_Test : public ::testing::Test { public: Matcher_Call_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_Call_Test
(Matcher_Call_Test const &); void operator=(Matcher_Call_Test
const &);};::testing::TestInfo* const Matcher_Call_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "Matcher"
, "Call", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< Matcher_Call_Test
>);void Matcher_Call_Test::TestBody()
{
1104 // FIXME: Do we want to overload Call() to directly take
1105 // Matcher<Decl>, too?
1106 StatementMatcher MethodX =
1107 callExpr(hasDeclaration(cxxMethodDecl(hasName("x"))));
1108
1109 EXPECT_TRUE(matches("class Y { void x() { x(); } };", MethodX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { x(); } };"
, MethodX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1109, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { x(); } };\", MethodX)", "false"
, "true").c_str()) = ::testing::Message()
;
1110 EXPECT_TRUE(notMatches("class Y { void x() {} };", MethodX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() {} };"
, MethodX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1110, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() {} };\", MethodX)", "false"
, "true").c_str()) = ::testing::Message()
;
1111
1112 StatementMatcher MethodOnY =
1113 cxxMemberCallExpr(on(hasType(recordDecl(hasName("Y")))));
1114
1115 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y y; y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y y; y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1116 matches("class Y { public: void x(); }; void z() { Y y; y.x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y y; y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y y; y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1117 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y y; y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y y; y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1118 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y &y) { y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1120, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y &y) { y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1119 matches("class Y { public: void x(); }; void z(Y &y) { y.x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y &y) { y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1120, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y &y) { y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1120 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y &y) { y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1120, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y &y) { y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1121 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1123, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z(Y *&y) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1122 notMatches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1123, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z(Y *&y) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1123 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1123, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z(Y *&y) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1124 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1126, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z(Y y[]) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1125 notMatches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1126, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z(Y y[]) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1126 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1126, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z(Y y[]) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1127 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z() { Y *y; y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1129, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z() { Y *y; y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1128 notMatches("class Y { public: void x(); }; void z() { Y *y; y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z() { Y *y; y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1129, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z() { Y *y; y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1129 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z() { Y *y; y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1129, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z() { Y *y; y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1130
1131 StatementMatcher MethodOnYPointer =
1132 cxxMemberCallExpr(on(hasType(pointsTo(recordDecl(hasName("Y"))))));
1133
1134 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y *y; y->x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1136, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y *y; y->x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1135 matches("class Y { public: void x(); }; void z() { Y *y; y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y *y; y->x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1136, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y *y; y->x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1136 MethodOnYPointer))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y *y; y->x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1136, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y *y; y->x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
;
1137 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1139, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y *&y) { y->x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1138 matches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1139, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y *&y) { y->x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1139 MethodOnYPointer))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1139, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y *&y) { y->x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
;
1140 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1142, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y y[]) { y->x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1141 matches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1142, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y y[]) { y->x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1142 MethodOnYPointer))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1142, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y y[]) { y->x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
;
1143 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z() { Y y; y.x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1145, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z() { Y y; y.x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1144 notMatches("class Y { public: void x(); }; void z() { Y y; y.x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z() { Y y; y.x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1145, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z() { Y y; y.x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1145 MethodOnYPointer))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z() { Y y; y.x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1145, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z() { Y y; y.x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
;
1146 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z(Y &y) { y.x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1148, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z(Y &y) { y.x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1147 notMatches("class Y { public: void x(); }; void z(Y &y) { y.x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z(Y &y) { y.x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1148, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z(Y &y) { y.x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
1148 MethodOnYPointer))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: void x(); }; void z(Y &y) { y.x(); }"
, MethodOnYPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1148, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: void x(); }; void z(Y &y) { y.x(); }\", MethodOnYPointer)"
, "false", "true").c_str()) = ::testing::Message()
;
1149}
1150
1151TEST(Matcher, Lambda)class Matcher_Lambda_Test : public ::testing::Test { public: Matcher_Lambda_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_Lambda_Test
(Matcher_Lambda_Test const &); void operator=(Matcher_Lambda_Test
const &);};::testing::TestInfo* const Matcher_Lambda_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "Lambda", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< Matcher_Lambda_Test
>);void Matcher_Lambda_Test::TestBody()
{
1152 EXPECT_TRUE(matches("auto f = [] (int i) { return i; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("auto f = [] (int i) { return i; };"
, lambdaExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1153, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"auto f = [] (int i) { return i; };\", lambdaExpr())"
, "false", "true").c_str()) = ::testing::Message()
1153 lambdaExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("auto f = [] (int i) { return i; };"
, lambdaExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1153, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"auto f = [] (int i) { return i; };\", lambdaExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1154}
1155
1156TEST(Matcher, ForRange)class Matcher_ForRange_Test : public ::testing::Test { public
: Matcher_ForRange_Test() {} private: virtual void TestBody()
; static ::testing::TestInfo* const test_info_ __attribute__ (
(unused)); Matcher_ForRange_Test(Matcher_ForRange_Test const &
); void operator=(Matcher_ForRange_Test const &);};::testing
::TestInfo* const Matcher_ForRange_Test ::test_info_ = ::testing
::internal::MakeAndRegisterTestInfo( "Matcher", "ForRange", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< Matcher_ForRange_Test>
);void Matcher_ForRange_Test::TestBody()
{
1157 EXPECT_TRUE(matches("int as[] = { 1, 2, 3 };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int as[] = { 1, 2, 3 };"
"void f() { for (auto &a : as); }", cxxForRangeStmt())))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1159, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int as[] = { 1, 2, 3 };\" \"void f() { for (auto &a : as); }\", cxxForRangeStmt())"
, "false", "true").c_str()) = ::testing::Message()
1158 "void f() { for (auto &a : as); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int as[] = { 1, 2, 3 };"
"void f() { for (auto &a : as); }", cxxForRangeStmt())))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1159, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int as[] = { 1, 2, 3 };\" \"void f() { for (auto &a : as); }\", cxxForRangeStmt())"
, "false", "true").c_str()) = ::testing::Message()
1159 cxxForRangeStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int as[] = { 1, 2, 3 };"
"void f() { for (auto &a : as); }", cxxForRangeStmt())))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1159, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int as[] = { 1, 2, 3 };\" \"void f() { for (auto &a : as); }\", cxxForRangeStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
1160 EXPECT_TRUE(notMatches("void f() { for (int i; i<5; ++i); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { for (int i; i<5; ++i); }"
, cxxForRangeStmt()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1161, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { for (int i; i<5; ++i); }\", cxxForRangeStmt())"
, "false", "true").c_str()) = ::testing::Message()
1161 cxxForRangeStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { for (int i; i<5; ++i); }"
, cxxForRangeStmt()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1161, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { for (int i; i<5; ++i); }\", cxxForRangeStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
1162}
1163
1164TEST(Matcher, SubstNonTypeTemplateParm)class Matcher_SubstNonTypeTemplateParm_Test : public ::testing
::Test { public: Matcher_SubstNonTypeTemplateParm_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_SubstNonTypeTemplateParm_Test
(Matcher_SubstNonTypeTemplateParm_Test const &); void operator
=(Matcher_SubstNonTypeTemplateParm_Test const &);};::testing
::TestInfo* const Matcher_SubstNonTypeTemplateParm_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "SubstNonTypeTemplateParm"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_SubstNonTypeTemplateParm_Test
>);void Matcher_SubstNonTypeTemplateParm_Test::TestBody()
{
1165 EXPECT_FALSE(matches("template<int N>\n"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("template<int N>\n"
"struct A { static const int n = 0; };\n" "struct B : public A<42> {};"
, substNonTypeTemplateParmExpr())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1168, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int N>\\n\" \"struct A { static const int n = 0; };\\n\" \"struct B : public A<42> {};\", substNonTypeTemplateParmExpr())"
, "true", "false").c_str()) = ::testing::Message()
1166 "struct A { static const int n = 0; };\n"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("template<int N>\n"
"struct A { static const int n = 0; };\n" "struct B : public A<42> {};"
, substNonTypeTemplateParmExpr())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1168, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int N>\\n\" \"struct A { static const int n = 0; };\\n\" \"struct B : public A<42> {};\", substNonTypeTemplateParmExpr())"
, "true", "false").c_str()) = ::testing::Message()
1167 "struct B : public A<42> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("template<int N>\n"
"struct A { static const int n = 0; };\n" "struct B : public A<42> {};"
, substNonTypeTemplateParmExpr())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1168, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int N>\\n\" \"struct A { static const int n = 0; };\\n\" \"struct B : public A<42> {};\", substNonTypeTemplateParmExpr())"
, "true", "false").c_str()) = ::testing::Message()
1168 substNonTypeTemplateParmExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("template<int N>\n"
"struct A { static const int n = 0; };\n" "struct B : public A<42> {};"
, substNonTypeTemplateParmExpr())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1168, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int N>\\n\" \"struct A { static const int n = 0; };\\n\" \"struct B : public A<42> {};\", substNonTypeTemplateParmExpr())"
, "true", "false").c_str()) = ::testing::Message()
;
1169 EXPECT_TRUE(matches("template<int N>\n"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int N>\n"
"struct A { static const int n = N; };\n" "struct B : public A<42> {};"
, substNonTypeTemplateParmExpr()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1172, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int N>\\n\" \"struct A { static const int n = N; };\\n\" \"struct B : public A<42> {};\", substNonTypeTemplateParmExpr())"
, "false", "true").c_str()) = ::testing::Message()
1170 "struct A { static const int n = N; };\n"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int N>\n"
"struct A { static const int n = N; };\n" "struct B : public A<42> {};"
, substNonTypeTemplateParmExpr()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1172, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int N>\\n\" \"struct A { static const int n = N; };\\n\" \"struct B : public A<42> {};\", substNonTypeTemplateParmExpr())"
, "false", "true").c_str()) = ::testing::Message()
1171 "struct B : public A<42> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int N>\n"
"struct A { static const int n = N; };\n" "struct B : public A<42> {};"
, substNonTypeTemplateParmExpr()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1172, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int N>\\n\" \"struct A { static const int n = N; };\\n\" \"struct B : public A<42> {};\", substNonTypeTemplateParmExpr())"
, "false", "true").c_str()) = ::testing::Message()
1172 substNonTypeTemplateParmExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int N>\n"
"struct A { static const int n = N; };\n" "struct B : public A<42> {};"
, substNonTypeTemplateParmExpr()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1172, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int N>\\n\" \"struct A { static const int n = N; };\\n\" \"struct B : public A<42> {};\", substNonTypeTemplateParmExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1173}
1174
1175TEST(Matcher, NonTypeTemplateParmDecl)class Matcher_NonTypeTemplateParmDecl_Test : public ::testing
::Test { public: Matcher_NonTypeTemplateParmDecl_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_NonTypeTemplateParmDecl_Test
(Matcher_NonTypeTemplateParmDecl_Test const &); void operator
=(Matcher_NonTypeTemplateParmDecl_Test const &);};::testing
::TestInfo* const Matcher_NonTypeTemplateParmDecl_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "NonTypeTemplateParmDecl"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_NonTypeTemplateParmDecl_Test
>);void Matcher_NonTypeTemplateParmDecl_Test::TestBody()
{
1176 EXPECT_TRUE(matches("template <int N> void f();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <int N> void f();"
, nonTypeTemplateParmDecl(hasName("N"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <int N> void f();\", nonTypeTemplateParmDecl(hasName(\"N\")))"
, "false", "true").c_str()) = ::testing::Message()
1177 nonTypeTemplateParmDecl(hasName("N"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <int N> void f();"
, nonTypeTemplateParmDecl(hasName("N"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <int N> void f();\", nonTypeTemplateParmDecl(hasName(\"N\")))"
, "false", "true").c_str()) = ::testing::Message()
;
1178 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> void f();"
, nonTypeTemplateParmDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1179, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> void f();\", nonTypeTemplateParmDecl())"
, "false", "true").c_str()) = ::testing::Message()
1179 notMatches("template <typename T> void f();", nonTypeTemplateParmDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> void f();"
, nonTypeTemplateParmDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1179, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> void f();\", nonTypeTemplateParmDecl())"
, "false", "true").c_str()) = ::testing::Message()
;
1180}
1181
1182TEST(Matcher, templateTypeParmDecl)class Matcher_templateTypeParmDecl_Test : public ::testing::Test
{ public: Matcher_templateTypeParmDecl_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_templateTypeParmDecl_Test(
Matcher_templateTypeParmDecl_Test const &); void operator
=(Matcher_templateTypeParmDecl_Test const &);};::testing::
TestInfo* const Matcher_templateTypeParmDecl_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "templateTypeParmDecl"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_templateTypeParmDecl_Test
>);void Matcher_templateTypeParmDecl_Test::TestBody()
{
1183 EXPECT_TRUE(matches("template <typename T> void f();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> void f();"
, templateTypeParmDecl(hasName("T"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1184, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> void f();\", templateTypeParmDecl(hasName(\"T\")))"
, "false", "true").c_str()) = ::testing::Message()
1184 templateTypeParmDecl(hasName("T"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> void f();"
, templateTypeParmDecl(hasName("T"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1184, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> void f();\", templateTypeParmDecl(hasName(\"T\")))"
, "false", "true").c_str()) = ::testing::Message()
;
1185 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <int N> void f();"
, templateTypeParmDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1186, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <int N> void f();\", templateTypeParmDecl())"
, "false", "true").c_str()) = ::testing::Message()
1186 notMatches("template <int N> void f();", templateTypeParmDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <int N> void f();"
, templateTypeParmDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1186, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <int N> void f();\", templateTypeParmDecl())"
, "false", "true").c_str()) = ::testing::Message()
;
1187}
1188
1189TEST(Matcher, UserDefinedLiteral)class Matcher_UserDefinedLiteral_Test : public ::testing::Test
{ public: Matcher_UserDefinedLiteral_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_UserDefinedLiteral_Test(Matcher_UserDefinedLiteral_Test
const &); void operator=(Matcher_UserDefinedLiteral_Test
const &);};::testing::TestInfo* const Matcher_UserDefinedLiteral_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "UserDefinedLiteral", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_UserDefinedLiteral_Test>);void Matcher_UserDefinedLiteral_Test
::TestBody()
{
1190 EXPECT_TRUE(matches("constexpr char operator \"\" _inc (const char i) {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("constexpr char operator \"\" _inc (const char i) {"
" return i + 1;" "}" "char c = 'a'_inc;", userDefinedLiteral
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1194, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"constexpr char operator \\\"\\\" _inc (const char i) {\" \" return i + 1;\" \"}\" \"char c = 'a'_inc;\", userDefinedLiteral())"
, "false", "true").c_str()) = ::testing::Message()
1191 " return i + 1;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("constexpr char operator \"\" _inc (const char i) {"
" return i + 1;" "}" "char c = 'a'_inc;", userDefinedLiteral
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1194, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"constexpr char operator \\\"\\\" _inc (const char i) {\" \" return i + 1;\" \"}\" \"char c = 'a'_inc;\", userDefinedLiteral())"
, "false", "true").c_str()) = ::testing::Message()
1192 "}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("constexpr char operator \"\" _inc (const char i) {"
" return i + 1;" "}" "char c = 'a'_inc;", userDefinedLiteral
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1194, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"constexpr char operator \\\"\\\" _inc (const char i) {\" \" return i + 1;\" \"}\" \"char c = 'a'_inc;\", userDefinedLiteral())"
, "false", "true").c_str()) = ::testing::Message()
1193 "char c = 'a'_inc;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("constexpr char operator \"\" _inc (const char i) {"
" return i + 1;" "}" "char c = 'a'_inc;", userDefinedLiteral
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1194, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"constexpr char operator \\\"\\\" _inc (const char i) {\" \" return i + 1;\" \"}\" \"char c = 'a'_inc;\", userDefinedLiteral())"
, "false", "true").c_str()) = ::testing::Message()
1194 userDefinedLiteral()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("constexpr char operator \"\" _inc (const char i) {"
" return i + 1;" "}" "char c = 'a'_inc;", userDefinedLiteral
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1194, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"constexpr char operator \\\"\\\" _inc (const char i) {\" \" return i + 1;\" \"}\" \"char c = 'a'_inc;\", userDefinedLiteral())"
, "false", "true").c_str()) = ::testing::Message()
;
1195}
1196
1197TEST(Matcher, FlowControl)class Matcher_FlowControl_Test : public ::testing::Test { public
: Matcher_FlowControl_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_FlowControl_Test(Matcher_FlowControl_Test
const &); void operator=(Matcher_FlowControl_Test const &
);};::testing::TestInfo* const Matcher_FlowControl_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "FlowControl"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_FlowControl_Test
>);void Matcher_FlowControl_Test::TestBody()
{
1198 EXPECT_TRUE(matches("void f() { while(true) { break; } }", breakStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { while(true) { break; } }"
, breakStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1198, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { while(true) { break; } }\", breakStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
1199 EXPECT_TRUE(matches("void f() { while(true) { continue; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { while(true) { continue; } }"
, continueStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1200, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { while(true) { continue; } }\", continueStmt())"
, "false", "true").c_str()) = ::testing::Message()
1200 continueStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { while(true) { continue; } }"
, continueStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1200, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { while(true) { continue; } }\", continueStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
1201 EXPECT_TRUE(matches("void f() { goto FOO; FOO: ;}", gotoStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { goto FOO; FOO: ;}"
, gotoStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1201, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { goto FOO; FOO: ;}\", gotoStmt())", "false"
, "true").c_str()) = ::testing::Message()
;
1202 EXPECT_TRUE(matches("void f() { goto FOO; FOO: ;}", labelStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { goto FOO; FOO: ;}"
, labelStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1202, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { goto FOO; FOO: ;}\", labelStmt())", "false"
, "true").c_str()) = ::testing::Message()
;
1203 EXPECT_TRUE(matches("void f() { return; }", returnStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { return; }"
, returnStmt()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1203, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { return; }\", returnStmt())", "false",
"true").c_str()) = ::testing::Message()
;
1204}
1205
1206TEST(HasType, MatchesAsString)class HasType_MatchesAsString_Test : public ::testing::Test {
public: HasType_MatchesAsString_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); HasType_MatchesAsString_Test(HasType_MatchesAsString_Test
const &); void operator=(HasType_MatchesAsString_Test const
&);};::testing::TestInfo* const HasType_MatchesAsString_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasType", "MatchesAsString", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< HasType_MatchesAsString_Test>);void HasType_MatchesAsString_Test
::TestBody()
{
1207 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() {Y* y; y->x(); }"
, cxxMemberCallExpr(on(hasType(asString("class Y *"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1209, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() {Y* y; y->x(); }\", cxxMemberCallExpr(on(hasType(asString(\"class Y *\")))))"
, "false", "true").c_str()) = ::testing::Message()
1208 matches("class Y { public: void x(); }; void z() {Y* y; y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() {Y* y; y->x(); }"
, cxxMemberCallExpr(on(hasType(asString("class Y *"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1209, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() {Y* y; y->x(); }\", cxxMemberCallExpr(on(hasType(asString(\"class Y *\")))))"
, "false", "true").c_str()) = ::testing::Message()
1209 cxxMemberCallExpr(on(hasType(asString("class Y *"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() {Y* y; y->x(); }"
, cxxMemberCallExpr(on(hasType(asString("class Y *"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1209, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() {Y* y; y->x(); }\", cxxMemberCallExpr(on(hasType(asString(\"class Y *\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1210 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int x) {} };"
, cxxMethodDecl(hasParameter(0, hasType(asString("int")))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1212, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int x) {} };\", cxxMethodDecl(hasParameter(0, hasType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1211 matches("class X { void x(int x) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int x) {} };"
, cxxMethodDecl(hasParameter(0, hasType(asString("int")))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1212, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int x) {} };\", cxxMethodDecl(hasParameter(0, hasType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1212 cxxMethodDecl(hasParameter(0, hasType(asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int x) {} };"
, cxxMethodDecl(hasParameter(0, hasType(asString("int")))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1212, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int x) {} };\", cxxMethodDecl(hasParameter(0, hasType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1213 EXPECT_TRUE(matches("namespace ns { struct A {}; } struct B { ns::A a; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace ns { struct A {}; } struct B { ns::A a; };"
, fieldDecl(hasType(asString("ns::A")))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1214, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace ns { struct A {}; } struct B { ns::A a; };\", fieldDecl(hasType(asString(\"ns::A\"))))"
, "false", "true").c_str()) = ::testing::Message()
1214 fieldDecl(hasType(asString("ns::A")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace ns { struct A {}; } struct B { ns::A a; };"
, fieldDecl(hasType(asString("ns::A")))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1214, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace ns { struct A {}; } struct B { ns::A a; };\", fieldDecl(hasType(asString(\"ns::A\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1215 EXPECT_TRUE(matches("namespace { struct A {}; } struct B { A a; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace { struct A {}; } struct B { A a; };"
, fieldDecl(hasType(asString("struct (anonymous namespace)::A"
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1216, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace { struct A {}; } struct B { A a; };\", fieldDecl(hasType(asString(\"struct (anonymous namespace)::A\"))))"
, "false", "true").c_str()) = ::testing::Message()
1216 fieldDecl(hasType(asString("struct (anonymous namespace)::A")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace { struct A {}; } struct B { A a; };"
, fieldDecl(hasType(asString("struct (anonymous namespace)::A"
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1216, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace { struct A {}; } struct B { A a; };\", fieldDecl(hasType(asString(\"struct (anonymous namespace)::A\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1217}
1218
1219TEST(Matcher, OverloadedOperatorCall)class Matcher_OverloadedOperatorCall_Test : public ::testing::
Test { public: Matcher_OverloadedOperatorCall_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_OverloadedOperatorCall_Test
(Matcher_OverloadedOperatorCall_Test const &); void operator
=(Matcher_OverloadedOperatorCall_Test const &);};::testing
::TestInfo* const Matcher_OverloadedOperatorCall_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "OverloadedOperatorCall"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_OverloadedOperatorCall_Test
>);void Matcher_OverloadedOperatorCall_Test::TestBody()
{
1220 StatementMatcher OpCall = cxxOperatorCallExpr();
1221 // Unary operator
1222 EXPECT_TRUE(matches("class Y { }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator!(Y x) { return false; }; " "Y y; bool c = !y;"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1224, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator!(Y x) { return false; }; \" \"Y y; bool c = !y;\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
1223 "bool operator!(Y x) { return false; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator!(Y x) { return false; }; " "Y y; bool c = !y;"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1224, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator!(Y x) { return false; }; \" \"Y y; bool c = !y;\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
1224 "Y y; bool c = !y;", OpCall))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator!(Y x) { return false; }; " "Y y; bool c = !y;"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1224, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator!(Y x) { return false; }; \" \"Y y; bool c = !y;\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
;
1225 // No match -- special operators like "new", "delete"
1226 // FIXME: operator new takes size_t, for which we need stddef.h, for which
1227 // we need to figure out include paths in the test.
1228 // EXPECT_TRUE(NotMatches("#include <stddef.h>\n"
1229 // "class Y { }; "
1230 // "void *operator new(size_t size) { return 0; } "
1231 // "Y *y = new Y;", OpCall));
1232 EXPECT_TRUE(notMatches("class Y { }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { }; "
"void operator delete(void *p) { } " "void a() {Y *y = new Y; delete y;}"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1234, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { }; \" \"void operator delete(void *p) { } \" \"void a() {Y *y = new Y; delete y;}\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
1233 "void operator delete(void *p) { } "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { }; "
"void operator delete(void *p) { } " "void a() {Y *y = new Y; delete y;}"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1234, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { }; \" \"void operator delete(void *p) { } \" \"void a() {Y *y = new Y; delete y;}\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
1234 "void a() {Y *y = new Y; delete y;}", OpCall))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { }; "
"void operator delete(void *p) { } " "void a() {Y *y = new Y; delete y;}"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1234, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { }; \" \"void operator delete(void *p) { } \" \"void a() {Y *y = new Y; delete y;}\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
;
1235 // Binary operator
1236 EXPECT_TRUE(matches("class Y { }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1239, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
1237 "bool operator&&(Y x, Y y) { return true; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1239, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
1238 "Y a; Y b; bool c = a && b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1239, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
1239 OpCall))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1239, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
;
1240 // No match -- normal operator, not an overloaded one.
1241 EXPECT_TRUE(notMatches("bool x = true, y = true; bool t = x && y;", OpCall))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("bool x = true, y = true; bool t = x && y;"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1241, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"bool x = true, y = true; bool t = x && y;\", OpCall)"
, "false", "true").c_str()) = ::testing::Message()
;
1242 EXPECT_TRUE(notMatches("int t = 5 << 2;", OpCall))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int t = 5 << 2;"
, OpCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1242, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int t = 5 << 2;\", OpCall)", "false", "true"
).c_str()) = ::testing::Message()
;
1243}
1244
1245TEST(Matcher, HasOperatorNameForOverloadedOperatorCall)class Matcher_HasOperatorNameForOverloadedOperatorCall_Test :
public ::testing::Test { public: Matcher_HasOperatorNameForOverloadedOperatorCall_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_HasOperatorNameForOverloadedOperatorCall_Test
(Matcher_HasOperatorNameForOverloadedOperatorCall_Test const &
); void operator=(Matcher_HasOperatorNameForOverloadedOperatorCall_Test
const &);};::testing::TestInfo* const Matcher_HasOperatorNameForOverloadedOperatorCall_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "HasOperatorNameForOverloadedOperatorCall", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< Matcher_HasOperatorNameForOverloadedOperatorCall_Test
>);void Matcher_HasOperatorNameForOverloadedOperatorCall_Test
::TestBody()
{
1246 StatementMatcher OpCallAndAnd =
1247 cxxOperatorCallExpr(hasOverloadedOperatorName("&&"));
1248 EXPECT_TRUE(matches("class Y { }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCallAndAnd))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1250, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCallAndAnd)"
, "false", "true").c_str()) = ::testing::Message()
1249 "bool operator&&(Y x, Y y) { return true; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCallAndAnd))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1250, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCallAndAnd)"
, "false", "true").c_str()) = ::testing::Message()
1250 "Y a; Y b; bool c = a && b;", OpCallAndAnd))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCallAndAnd))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1250, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCallAndAnd)"
, "false", "true").c_str()) = ::testing::Message()
;
1251 StatementMatcher OpCallLessLess =
1252 cxxOperatorCallExpr(hasOverloadedOperatorName("<<"));
1253 EXPECT_TRUE(notMatches("class Y { }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCallLessLess))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1256, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCallLessLess)"
, "false", "true").c_str()) = ::testing::Message()
1254 "bool operator&&(Y x, Y y) { return true; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCallLessLess))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1256, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCallLessLess)"
, "false", "true").c_str()) = ::testing::Message()
1255 "Y a; Y b; bool c = a && b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCallLessLess))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1256, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCallLessLess)"
, "false", "true").c_str()) = ::testing::Message()
1256 OpCallLessLess))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { }; "
"bool operator&&(Y x, Y y) { return true; }; " "Y a; Y b; bool c = a && b;"
, OpCallLessLess))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1256, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { }; \" \"bool operator&&(Y x, Y y) { return true; }; \" \"Y a; Y b; bool c = a && b;\", OpCallLessLess)"
, "false", "true").c_str()) = ::testing::Message()
;
1257 StatementMatcher OpStarCall =
1258 cxxOperatorCallExpr(hasOverloadedOperatorName("*"));
1259 EXPECT_TRUE(matches("class Y; int operator*(Y &); void f(Y &y) { *y; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y; int operator*(Y &); void f(Y &y) { *y; }"
, OpStarCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1260, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y; int operator*(Y &); void f(Y &y) { *y; }\", OpStarCall)"
, "false", "true").c_str()) = ::testing::Message()
1260 OpStarCall))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y; int operator*(Y &); void f(Y &y) { *y; }"
, OpStarCall))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1260, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y; int operator*(Y &); void f(Y &y) { *y; }\", OpStarCall)"
, "false", "true").c_str()) = ::testing::Message()
;
1261 DeclarationMatcher ClassWithOpStar =
1262 cxxRecordDecl(hasMethod(hasOverloadedOperatorName("*")));
1263 EXPECT_TRUE(matches("class Y { int operator*(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { int operator*(); };"
, ClassWithOpStar))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1264, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { int operator*(); };\", ClassWithOpStar)"
, "false", "true").c_str()) = ::testing::Message()
1264 ClassWithOpStar))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { int operator*(); };"
, ClassWithOpStar))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1264, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { int operator*(); };\", ClassWithOpStar)"
, "false", "true").c_str()) = ::testing::Message()
;
1265 EXPECT_TRUE(notMatches("class Y { void myOperator(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void myOperator(); };"
, ClassWithOpStar))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1266, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void myOperator(); };\", ClassWithOpStar)"
, "false", "true").c_str()) = ::testing::Message()
1266 ClassWithOpStar))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void myOperator(); };"
, ClassWithOpStar))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1266, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void myOperator(); };\", ClassWithOpStar)"
, "false", "true").c_str()) = ::testing::Message()
;
1267 DeclarationMatcher AnyOpStar = functionDecl(hasOverloadedOperatorName("*"));
1268 EXPECT_TRUE(matches("class Y; int operator*(Y &);", AnyOpStar))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y; int operator*(Y &);"
, AnyOpStar))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y; int operator*(Y &);\", AnyOpStar)",
"false", "true").c_str()) = ::testing::Message()
;
1269 EXPECT_TRUE(matches("class Y { int operator*(); };", AnyOpStar))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { int operator*(); };"
, AnyOpStar))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1269, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { int operator*(); };\", AnyOpStar)", "false"
, "true").c_str()) = ::testing::Message()
;
1270}
1271
1272TEST(Matcher, NestedOverloadedOperatorCalls)class Matcher_NestedOverloadedOperatorCalls_Test : public ::testing
::Test { public: Matcher_NestedOverloadedOperatorCalls_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_NestedOverloadedOperatorCalls_Test
(Matcher_NestedOverloadedOperatorCalls_Test const &); void
operator=(Matcher_NestedOverloadedOperatorCalls_Test const &
);};::testing::TestInfo* const Matcher_NestedOverloadedOperatorCalls_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "NestedOverloadedOperatorCalls", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_NestedOverloadedOperatorCalls_Test
>);void Matcher_NestedOverloadedOperatorCalls_Test::TestBody
()
{
1273 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class Y { }; " "Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasOverloadedOperatorName("&&")).bind("x"), new VerifyIdIsBoundTo
<CXXOperatorCallExpr>("x", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1278, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasOverloadedOperatorName(\"&&\")).bind(\"x\"), new VerifyIdIsBoundTo<CXXOperatorCallExpr>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1274 "class Y { }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class Y { }; " "Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasOverloadedOperatorName("&&")).bind("x"), new VerifyIdIsBoundTo
<CXXOperatorCallExpr>("x", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1278, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasOverloadedOperatorName(\"&&\")).bind(\"x\"), new VerifyIdIsBoundTo<CXXOperatorCallExpr>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1275 "Y& operator&&(Y& x, Y& y) { return x; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class Y { }; " "Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasOverloadedOperatorName("&&")).bind("x"), new VerifyIdIsBoundTo
<CXXOperatorCallExpr>("x", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1278, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasOverloadedOperatorName(\"&&\")).bind(\"x\"), new VerifyIdIsBoundTo<CXXOperatorCallExpr>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1276 "Y a; Y b; Y c; Y d = a && b && c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class Y { }; " "Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasOverloadedOperatorName("&&")).bind("x"), new VerifyIdIsBoundTo
<CXXOperatorCallExpr>("x", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1278, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasOverloadedOperatorName(\"&&\")).bind(\"x\"), new VerifyIdIsBoundTo<CXXOperatorCallExpr>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1277 cxxOperatorCallExpr(hasOverloadedOperatorName("&&")).bind("x"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class Y { }; " "Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasOverloadedOperatorName("&&")).bind("x"), new VerifyIdIsBoundTo
<CXXOperatorCallExpr>("x", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1278, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasOverloadedOperatorName(\"&&\")).bind(\"x\"), new VerifyIdIsBoundTo<CXXOperatorCallExpr>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
1278 new VerifyIdIsBoundTo<CXXOperatorCallExpr>("x", 2)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class Y { }; " "Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasOverloadedOperatorName("&&")).bind("x"), new VerifyIdIsBoundTo
<CXXOperatorCallExpr>("x", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1278, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasOverloadedOperatorName(\"&&\")).bind(\"x\"), new VerifyIdIsBoundTo<CXXOperatorCallExpr>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
;
1279 EXPECT_TRUE(matches("class Y { }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasParent(cxxOperatorCallExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasParent(cxxOperatorCallExpr())))"
, "false", "true").c_str()) = ::testing::Message()
1280 "Y& operator&&(Y& x, Y& y) { return x; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasParent(cxxOperatorCallExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasParent(cxxOperatorCallExpr())))"
, "false", "true").c_str()) = ::testing::Message()
1281 "Y a; Y b; Y c; Y d = a && b && c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasParent(cxxOperatorCallExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasParent(cxxOperatorCallExpr())))"
, "false", "true").c_str()) = ::testing::Message()
1282 cxxOperatorCallExpr(hasParent(cxxOperatorCallExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasParent(cxxOperatorCallExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasParent(cxxOperatorCallExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
1283 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasDescendant(cxxOperatorCallExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1287, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasDescendant(cxxOperatorCallExpr())))"
, "false", "true").c_str()) = ::testing::Message()
1284 matches("class Y { }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasDescendant(cxxOperatorCallExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1287, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasDescendant(cxxOperatorCallExpr())))"
, "false", "true").c_str()) = ::testing::Message()
1285 "Y& operator&&(Y& x, Y& y) { return x; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasDescendant(cxxOperatorCallExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1287, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasDescendant(cxxOperatorCallExpr())))"
, "false", "true").c_str()) = ::testing::Message()
1286 "Y a; Y b; Y c; Y d = a && b && c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasDescendant(cxxOperatorCallExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1287, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasDescendant(cxxOperatorCallExpr())))"
, "false", "true").c_str()) = ::testing::Message()
1287 cxxOperatorCallExpr(hasDescendant(cxxOperatorCallExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { }; "
"Y& operator&&(Y& x, Y& y) { return x; }; "
"Y a; Y b; Y c; Y d = a && b && c;", cxxOperatorCallExpr
(hasDescendant(cxxOperatorCallExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1287, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { }; \" \"Y& operator&&(Y& x, Y& y) { return x; }; \" \"Y a; Y b; Y c; Y d = a && b && c;\", cxxOperatorCallExpr(hasDescendant(cxxOperatorCallExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
1288}
1289
1290TEST(Matcher, ThisPointerType)class Matcher_ThisPointerType_Test : public ::testing::Test {
public: Matcher_ThisPointerType_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_ThisPointerType_Test(Matcher_ThisPointerType_Test
const &); void operator=(Matcher_ThisPointerType_Test const
&);};::testing::TestInfo* const Matcher_ThisPointerType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "ThisPointerType", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_ThisPointerType_Test>);void Matcher_ThisPointerType_Test
::TestBody()
{
1291 StatementMatcher MethodOnY =
1292 cxxMemberCallExpr(thisPointerType(recordDecl(hasName("Y"))));
1293
1294 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y y; y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1296, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y y; y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1295 matches("class Y { public: void x(); }; void z() { Y y; y.x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y y; y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1296, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y y; y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1296 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y y; y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1296, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y y; y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1297 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y &y) { y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1299, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y &y) { y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1298 matches("class Y { public: void x(); }; void z(Y &y) { y.x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y &y) { y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1299, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y &y) { y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1299 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y &y) { y.x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1299, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y &y) { y.x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1300 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1302, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y *&y) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1301 matches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1302, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y *&y) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1302 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y *&y) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1302, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y *&y) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1303 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1305, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y y[]) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1304 matches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1305, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y y[]) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1305 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z(Y y[]) { y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1305, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z(Y y[]) { y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1306 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y *y; y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1308, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y *y; y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1307 matches("class Y { public: void x(); }; void z() { Y *y; y->x(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y *y; y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1308, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y *y; y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1308 MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { public: void x(); }; void z() { Y *y; y->x(); }"
, MethodOnY))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1308, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { public: void x(); }; void z() { Y *y; y->x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1309
1310 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public: virtual void x();"
"};" "class X : public Y {" " public: virtual void x();" "};"
"void z() { X *x; x->Y::x(); }", MethodOnY))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public: virtual void x();\" \"};\" \"class X : public Y {\" \" public: virtual void x();\" \"};\" \"void z() { X *x; x->Y::x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1311 "class Y {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public: virtual void x();"
"};" "class X : public Y {" " public: virtual void x();" "};"
"void z() { X *x; x->Y::x(); }", MethodOnY))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public: virtual void x();\" \"};\" \"class X : public Y {\" \" public: virtual void x();\" \"};\" \"void z() { X *x; x->Y::x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1312 " public: virtual void x();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public: virtual void x();"
"};" "class X : public Y {" " public: virtual void x();" "};"
"void z() { X *x; x->Y::x(); }", MethodOnY))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public: virtual void x();\" \"};\" \"class X : public Y {\" \" public: virtual void x();\" \"};\" \"void z() { X *x; x->Y::x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1313 "};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public: virtual void x();"
"};" "class X : public Y {" " public: virtual void x();" "};"
"void z() { X *x; x->Y::x(); }", MethodOnY))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public: virtual void x();\" \"};\" \"class X : public Y {\" \" public: virtual void x();\" \"};\" \"void z() { X *x; x->Y::x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1314 "class X : public Y {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public: virtual void x();"
"};" "class X : public Y {" " public: virtual void x();" "};"
"void z() { X *x; x->Y::x(); }", MethodOnY))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public: virtual void x();\" \"};\" \"class X : public Y {\" \" public: virtual void x();\" \"};\" \"void z() { X *x; x->Y::x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1315 " public: virtual void x();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public: virtual void x();"
"};" "class X : public Y {" " public: virtual void x();" "};"
"void z() { X *x; x->Y::x(); }", MethodOnY))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public: virtual void x();\" \"};\" \"class X : public Y {\" \" public: virtual void x();\" \"};\" \"void z() { X *x; x->Y::x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1316 "};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public: virtual void x();"
"};" "class X : public Y {" " public: virtual void x();" "};"
"void z() { X *x; x->Y::x(); }", MethodOnY))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public: virtual void x();\" \"};\" \"class X : public Y {\" \" public: virtual void x();\" \"};\" \"void z() { X *x; x->Y::x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
1317 "void z() { X *x; x->Y::x(); }", MethodOnY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public: virtual void x();"
"};" "class X : public Y {" " public: virtual void x();" "};"
"void z() { X *x; x->Y::x(); }", MethodOnY))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public: virtual void x();\" \"};\" \"class X : public Y {\" \" public: virtual void x();\" \"};\" \"void z() { X *x; x->Y::x(); }\", MethodOnY)"
, "false", "true").c_str()) = ::testing::Message()
;
1318}
1319
1320TEST(Matcher, VariableUsage)class Matcher_VariableUsage_Test : public ::testing::Test { public
: Matcher_VariableUsage_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_VariableUsage_Test(Matcher_VariableUsage_Test
const &); void operator=(Matcher_VariableUsage_Test const
&);};::testing::TestInfo* const Matcher_VariableUsage_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "VariableUsage", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_VariableUsage_Test>);void Matcher_VariableUsage_Test
::TestBody()
{
1321 StatementMatcher Reference =
1322 declRefExpr(to(
1323 varDecl(hasInitializer(
1324 cxxMemberCallExpr(thisPointerType(recordDecl(hasName("Y"))))))));
1325
1326 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public:"
" bool x() const;" "};" "void z(const Y &y) {" " bool b = y.x();"
" if (b) {}" "}", Reference))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \" if (b) {}\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1327 "class Y {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public:"
" bool x() const;" "};" "void z(const Y &y) {" " bool b = y.x();"
" if (b) {}" "}", Reference))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \" if (b) {}\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1328 " public:"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public:"
" bool x() const;" "};" "void z(const Y &y) {" " bool b = y.x();"
" if (b) {}" "}", Reference))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \" if (b) {}\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1329 " bool x() const;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public:"
" bool x() const;" "};" "void z(const Y &y) {" " bool b = y.x();"
" if (b) {}" "}", Reference))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \" if (b) {}\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1330 "};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public:"
" bool x() const;" "};" "void z(const Y &y) {" " bool b = y.x();"
" if (b) {}" "}", Reference))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \" if (b) {}\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1331 "void z(const Y &y) {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public:"
" bool x() const;" "};" "void z(const Y &y) {" " bool b = y.x();"
" if (b) {}" "}", Reference))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \" if (b) {}\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1332 " bool b = y.x();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public:"
" bool x() const;" "};" "void z(const Y &y) {" " bool b = y.x();"
" if (b) {}" "}", Reference))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \" if (b) {}\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1333 " if (b) {}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public:"
" bool x() const;" "};" "void z(const Y &y) {" " bool b = y.x();"
" if (b) {}" "}", Reference))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \" if (b) {}\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1334 "}", Reference))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {" " public:"
" bool x() const;" "};" "void z(const Y &y) {" " bool b = y.x();"
" if (b) {}" "}", Reference))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \" if (b) {}\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
;
1335
1336 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {"
" public:" " bool x() const;" "};" "void z(const Y &y) {"
" bool b = y.x();" "}", Reference))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1337 "class Y {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {"
" public:" " bool x() const;" "};" "void z(const Y &y) {"
" bool b = y.x();" "}", Reference))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1338 " public:"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {"
" public:" " bool x() const;" "};" "void z(const Y &y) {"
" bool b = y.x();" "}", Reference))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1339 " bool x() const;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {"
" public:" " bool x() const;" "};" "void z(const Y &y) {"
" bool b = y.x();" "}", Reference))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1340 "};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {"
" public:" " bool x() const;" "};" "void z(const Y &y) {"
" bool b = y.x();" "}", Reference))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1341 "void z(const Y &y) {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {"
" public:" " bool x() const;" "};" "void z(const Y &y) {"
" bool b = y.x();" "}", Reference))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1342 " bool b = y.x();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {"
" public:" " bool x() const;" "};" "void z(const Y &y) {"
" bool b = y.x();" "}", Reference))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
1343 "}", Reference))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {"
" public:" " bool x() const;" "};" "void z(const Y &y) {"
" bool b = y.x();" "}", Reference))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {\" \" public:\" \" bool x() const;\" \"};\" \"void z(const Y &y) {\" \" bool b = y.x();\" \"}\", Reference)"
, "false", "true").c_str()) = ::testing::Message()
;
1344}
1345
1346TEST(Matcher, VarDecl_Storage)class Matcher_VarDecl_Storage_Test : public ::testing::Test {
public: Matcher_VarDecl_Storage_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_VarDecl_Storage_Test(Matcher_VarDecl_Storage_Test
const &); void operator=(Matcher_VarDecl_Storage_Test const
&);};::testing::TestInfo* const Matcher_VarDecl_Storage_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "VarDecl_Storage", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_VarDecl_Storage_Test>);void Matcher_VarDecl_Storage_Test
::TestBody()
{
1347 auto M = varDecl(hasName("X"), hasLocalStorage());
1348 EXPECT_TRUE(matches("void f() { int X; }", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int X; }"
, M))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1348, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int X; }\", M)", "false", "true").c_str
()) = ::testing::Message()
;
1349 EXPECT_TRUE(notMatches("int X;", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int X;", M
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1349, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int X;\", M)", "false", "true").c_str()) = ::
testing::Message()
;
1350 EXPECT_TRUE(notMatches("void f() { static int X; }", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { static int X; }"
, M))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1350, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { static int X; }\", M)", "false", "true"
).c_str()) = ::testing::Message()
;
1351
1352 M = varDecl(hasName("X"), hasGlobalStorage());
1353 EXPECT_TRUE(notMatches("void f() { int X; }", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { int X; }"
, M))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1353, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { int X; }\", M)", "false", "true").
c_str()) = ::testing::Message()
;
1354 EXPECT_TRUE(matches("int X;", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int X;", M))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1354, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int X;\", M)", "false", "true").c_str()) = ::testing
::Message()
;
1355 EXPECT_TRUE(matches("void f() { static int X; }", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { static int X; }"
, M))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1355, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { static int X; }\", M)", "false", "true"
).c_str()) = ::testing::Message()
;
1356}
1357
1358TEST(Matcher, VarDecl_StorageDuration)class Matcher_VarDecl_StorageDuration_Test : public ::testing
::Test { public: Matcher_VarDecl_StorageDuration_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_VarDecl_StorageDuration_Test
(Matcher_VarDecl_StorageDuration_Test const &); void operator
=(Matcher_VarDecl_StorageDuration_Test const &);};::testing
::TestInfo* const Matcher_VarDecl_StorageDuration_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "VarDecl_StorageDuration"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_VarDecl_StorageDuration_Test
>);void Matcher_VarDecl_StorageDuration_Test::TestBody()
{
1359 std::string T =
1360 "void f() { int x; static int y; } int a;";
1361
1362 EXPECT_TRUE(matches(T, varDecl(hasName("x"), hasAutomaticStorageDuration())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(T, varDecl(hasName
("x"), hasAutomaticStorageDuration())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(T, varDecl(hasName(\"x\"), hasAutomaticStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
;
1363 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(T, varDecl
(hasName("y"), hasAutomaticStorageDuration())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1364, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(T, varDecl(hasName(\"y\"), hasAutomaticStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
1364 notMatches(T, varDecl(hasName("y"), hasAutomaticStorageDuration())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(T, varDecl
(hasName("y"), hasAutomaticStorageDuration())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1364, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(T, varDecl(hasName(\"y\"), hasAutomaticStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
;
1365 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(T, varDecl
(hasName("a"), hasAutomaticStorageDuration())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1366, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(T, varDecl(hasName(\"a\"), hasAutomaticStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
1366 notMatches(T, varDecl(hasName("a"), hasAutomaticStorageDuration())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(T, varDecl
(hasName("a"), hasAutomaticStorageDuration())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1366, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(T, varDecl(hasName(\"a\"), hasAutomaticStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
;
1367
1368 EXPECT_TRUE(matches(T, varDecl(hasName("y"), hasStaticStorageDuration())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(T, varDecl(hasName
("y"), hasStaticStorageDuration())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1368, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(T, varDecl(hasName(\"y\"), hasStaticStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
;
1369 EXPECT_TRUE(matches(T, varDecl(hasName("a"), hasStaticStorageDuration())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(T, varDecl(hasName
("a"), hasStaticStorageDuration())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(T, varDecl(hasName(\"a\"), hasStaticStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
;
1370 EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasStaticStorageDuration())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(T, varDecl
(hasName("x"), hasStaticStorageDuration())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1370, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(T, varDecl(hasName(\"x\"), hasStaticStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
;
1371
1372 // FIXME: It is really hard to test with thread_local itself because not all
1373 // targets support TLS, which causes this to be an error depending on what
1374 // platform the test is being run on. We do not have access to the TargetInfo
1375 // object to be able to test whether the platform supports TLS or not.
1376 EXPECT_TRUE(notMatches(T, varDecl(hasName("x"), hasThreadStorageDuration())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(T, varDecl
(hasName("x"), hasThreadStorageDuration())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1376, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(T, varDecl(hasName(\"x\"), hasThreadStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
;
1377 EXPECT_TRUE(notMatches(T, varDecl(hasName("y"), hasThreadStorageDuration())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(T, varDecl
(hasName("y"), hasThreadStorageDuration())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(T, varDecl(hasName(\"y\"), hasThreadStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
;
1378 EXPECT_TRUE(notMatches(T, varDecl(hasName("a"), hasThreadStorageDuration())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(T, varDecl
(hasName("a"), hasThreadStorageDuration())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1378, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(T, varDecl(hasName(\"a\"), hasThreadStorageDuration()))"
, "false", "true").c_str()) = ::testing::Message()
;
1379}
1380
1381TEST(Matcher, FindsVarDeclInFunctionParameter)class Matcher_FindsVarDeclInFunctionParameter_Test : public ::
testing::Test { public: Matcher_FindsVarDeclInFunctionParameter_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_FindsVarDeclInFunctionParameter_Test
(Matcher_FindsVarDeclInFunctionParameter_Test const &); void
operator=(Matcher_FindsVarDeclInFunctionParameter_Test const
&);};::testing::TestInfo* const Matcher_FindsVarDeclInFunctionParameter_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "FindsVarDeclInFunctionParameter", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_FindsVarDeclInFunctionParameter_Test
>);void Matcher_FindsVarDeclInFunctionParameter_Test::TestBody
()
{
1382 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(int i) {}"
, varDecl(hasName("i"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1384, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(int i) {}\", varDecl(hasName(\"i\")))", "false"
, "true").c_str()) = ::testing::Message()
1383 "void f(int i) {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(int i) {}"
, varDecl(hasName("i"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1384, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(int i) {}\", varDecl(hasName(\"i\")))", "false"
, "true").c_str()) = ::testing::Message()
1384 varDecl(hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(int i) {}"
, varDecl(hasName("i"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1384, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(int i) {}\", varDecl(hasName(\"i\")))", "false"
, "true").c_str()) = ::testing::Message()
;
1385}
1386
1387TEST(Matcher, CalledVariable)class Matcher_CalledVariable_Test : public ::testing::Test { public
: Matcher_CalledVariable_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_CalledVariable_Test(Matcher_CalledVariable_Test
const &); void operator=(Matcher_CalledVariable_Test const
&);};::testing::TestInfo* const Matcher_CalledVariable_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "CalledVariable", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_CalledVariable_Test>);void Matcher_CalledVariable_Test
::TestBody()
{
1388 StatementMatcher CallOnVariableY =
1389 cxxMemberCallExpr(on(declRefExpr(to(varDecl(hasName("y"))))));
1390
1391 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x() { Y y; y.x(); } };"
, CallOnVariableY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1392, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x() { Y y; y.x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
1392 "class Y { public: void x() { Y y; y.x(); } };", CallOnVariableY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x() { Y y; y.x(); } };"
, CallOnVariableY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1392, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x() { Y y; y.x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
;
1393 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x() const { Y y; y.x(); } };"
, CallOnVariableY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1394, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x() const { Y y; y.x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
1394 "class Y { public: void x() const { Y y; y.x(); } };", CallOnVariableY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x() const { Y y; y.x(); } };"
, CallOnVariableY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1394, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x() const { Y y; y.x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
;
1395 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x(); };"
"class X : public Y { void z() { X y; y.x(); } };", CallOnVariableY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1397, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { X y; y.x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
1396 "class Y { public: void x(); };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x(); };"
"class X : public Y { void z() { X y; y.x(); } };", CallOnVariableY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1397, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { X y; y.x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
1397 "class X : public Y { void z() { X y; y.x(); } };", CallOnVariableY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x(); };"
"class X : public Y { void z() { X y; y.x(); } };", CallOnVariableY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1397, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { X y; y.x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
;
1398 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x(); };"
"class X : public Y { void z() { X *y; y->x(); } };", CallOnVariableY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1400, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { X *y; y->x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
1399 "class Y { public: void x(); };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x(); };"
"class X : public Y { void z() { X *y; y->x(); } };", CallOnVariableY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1400, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { X *y; y->x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
1400 "class X : public Y { void z() { X *y; y->x(); } };", CallOnVariableY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y { public: void x(); };"
"class X : public Y { void z() { X *y; y->x(); } };", CallOnVariableY
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1400, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { X *y; y->x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
;
1401 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y { public: void x(); };"
"class X : public Y { void z() { unsigned long y; ((X*)y)->x(); } };"
, CallOnVariableY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1404, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { unsigned long y; ((X*)y)->x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
1402 "class Y { public: void x(); };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y { public: void x(); };"
"class X : public Y { void z() { unsigned long y; ((X*)y)->x(); } };"
, CallOnVariableY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1404, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { unsigned long y; ((X*)y)->x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
1403 "class X : public Y { void z() { unsigned long y; ((X*)y)->x(); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y { public: void x(); };"
"class X : public Y { void z() { unsigned long y; ((X*)y)->x(); } };"
, CallOnVariableY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1404, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { unsigned long y; ((X*)y)->x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
1404 CallOnVariableY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y { public: void x(); };"
"class X : public Y { void z() { unsigned long y; ((X*)y)->x(); } };"
, CallOnVariableY))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1404, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y { public: void x(); };\" \"class X : public Y { void z() { unsigned long y; ((X*)y)->x(); } };\", CallOnVariableY)"
, "false", "true").c_str()) = ::testing::Message()
;
1405}
1406
1407TEST(UnaryExprOrTypeTraitExpr, MatchesSizeOfAndAlignOf)class UnaryExprOrTypeTraitExpr_MatchesSizeOfAndAlignOf_Test :
public ::testing::Test { public: UnaryExprOrTypeTraitExpr_MatchesSizeOfAndAlignOf_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); UnaryExprOrTypeTraitExpr_MatchesSizeOfAndAlignOf_Test
(UnaryExprOrTypeTraitExpr_MatchesSizeOfAndAlignOf_Test const &
); void operator=(UnaryExprOrTypeTraitExpr_MatchesSizeOfAndAlignOf_Test
const &);};::testing::TestInfo* const UnaryExprOrTypeTraitExpr_MatchesSizeOfAndAlignOf_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"UnaryExprOrTypeTraitExpr", "MatchesSizeOfAndAlignOf", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< UnaryExprOrTypeTraitExpr_MatchesSizeOfAndAlignOf_Test
>);void UnaryExprOrTypeTraitExpr_MatchesSizeOfAndAlignOf_Test
::TestBody()
{
1408 EXPECT_TRUE(matches("void x() { int a = sizeof(a); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { int a = sizeof(a); }"
, unaryExprOrTypeTraitExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1409, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { int a = sizeof(a); }\", unaryExprOrTypeTraitExpr())"
, "false", "true").c_str()) = ::testing::Message()
1409 unaryExprOrTypeTraitExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { int a = sizeof(a); }"
, unaryExprOrTypeTraitExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1409, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { int a = sizeof(a); }\", unaryExprOrTypeTraitExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1410 EXPECT_TRUE(notMatches("void x() { int a = sizeof(a); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { int a = sizeof(a); }"
, alignOfExpr(anything())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1411, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { int a = sizeof(a); }\", alignOfExpr(anything()))"
, "false", "true").c_str()) = ::testing::Message()
1411 alignOfExpr(anything())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { int a = sizeof(a); }"
, alignOfExpr(anything())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1411, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { int a = sizeof(a); }\", alignOfExpr(anything()))"
, "false", "true").c_str()) = ::testing::Message()
;
1412 // FIXME: Uncomment once alignof is enabled.
1413 // EXPECT_TRUE(matches("void x() { int a = alignof(a); }",
1414 // unaryExprOrTypeTraitExpr()));
1415 // EXPECT_TRUE(notMatches("void x() { int a = alignof(a); }",
1416 // sizeOfExpr()));
1417}
1418
1419TEST(UnaryExpressionOrTypeTraitExpression, MatchesCorrectType)class UnaryExpressionOrTypeTraitExpression_MatchesCorrectType_Test
: public ::testing::Test { public: UnaryExpressionOrTypeTraitExpression_MatchesCorrectType_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); UnaryExpressionOrTypeTraitExpression_MatchesCorrectType_Test
(UnaryExpressionOrTypeTraitExpression_MatchesCorrectType_Test
const &); void operator=(UnaryExpressionOrTypeTraitExpression_MatchesCorrectType_Test
const &);};::testing::TestInfo* const UnaryExpressionOrTypeTraitExpression_MatchesCorrectType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"UnaryExpressionOrTypeTraitExpression", "MatchesCorrectType"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< UnaryExpressionOrTypeTraitExpression_MatchesCorrectType_Test
>);void UnaryExpressionOrTypeTraitExpression_MatchesCorrectType_Test
::TestBody()
{
1420 EXPECT_TRUE(matches("void x() { int a = sizeof(a); }", sizeOfExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { int a = sizeof(a); }"
, sizeOfExpr( hasArgumentOfType(asString("int")))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1421, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { int a = sizeof(a); }\", sizeOfExpr( hasArgumentOfType(asString(\"int\"))))"
, "false", "true").c_str()) = ::testing::Message()
1421 hasArgumentOfType(asString("int")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { int a = sizeof(a); }"
, sizeOfExpr( hasArgumentOfType(asString("int")))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1421, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { int a = sizeof(a); }\", sizeOfExpr( hasArgumentOfType(asString(\"int\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1422 EXPECT_TRUE(notMatches("void x() { int a = sizeof(a); }", sizeOfExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { int a = sizeof(a); }"
, sizeOfExpr( hasArgumentOfType(asString("float")))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1423, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { int a = sizeof(a); }\", sizeOfExpr( hasArgumentOfType(asString(\"float\"))))"
, "false", "true").c_str()) = ::testing::Message()
1423 hasArgumentOfType(asString("float")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { int a = sizeof(a); }"
, sizeOfExpr( hasArgumentOfType(asString("float")))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1423, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { int a = sizeof(a); }\", sizeOfExpr( hasArgumentOfType(asString(\"float\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1424 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {}; void x() { A a; int b = sizeof(a); }"
, sizeOfExpr(hasArgumentOfType(hasDeclaration(recordDecl(hasName
("A")))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1426, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {}; void x() { A a; int b = sizeof(a); }\", sizeOfExpr(hasArgumentOfType(hasDeclaration(recordDecl(hasName(\"A\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1425 "struct A {}; void x() { A a; int b = sizeof(a); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {}; void x() { A a; int b = sizeof(a); }"
, sizeOfExpr(hasArgumentOfType(hasDeclaration(recordDecl(hasName
("A")))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1426, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {}; void x() { A a; int b = sizeof(a); }\", sizeOfExpr(hasArgumentOfType(hasDeclaration(recordDecl(hasName(\"A\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1426 sizeOfExpr(hasArgumentOfType(hasDeclaration(recordDecl(hasName("A")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A {}; void x() { A a; int b = sizeof(a); }"
, sizeOfExpr(hasArgumentOfType(hasDeclaration(recordDecl(hasName
("A")))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1426, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A {}; void x() { A a; int b = sizeof(a); }\", sizeOfExpr(hasArgumentOfType(hasDeclaration(recordDecl(hasName(\"A\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1427 EXPECT_TRUE(notMatches("void x() { int a = sizeof(a); }", sizeOfExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { int a = sizeof(a); }"
, sizeOfExpr( hasArgumentOfType(hasDeclaration(recordDecl(hasName
("string")))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1428, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { int a = sizeof(a); }\", sizeOfExpr( hasArgumentOfType(hasDeclaration(recordDecl(hasName(\"string\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1428 hasArgumentOfType(hasDeclaration(recordDecl(hasName("string")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { int a = sizeof(a); }"
, sizeOfExpr( hasArgumentOfType(hasDeclaration(recordDecl(hasName
("string")))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1428, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { int a = sizeof(a); }\", sizeOfExpr( hasArgumentOfType(hasDeclaration(recordDecl(hasName(\"string\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1429}
1430
1431TEST(MemberExpression, DoesNotMatchClasses)class MemberExpression_DoesNotMatchClasses_Test : public ::testing
::Test { public: MemberExpression_DoesNotMatchClasses_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MemberExpression_DoesNotMatchClasses_Test
(MemberExpression_DoesNotMatchClasses_Test const &); void
operator=(MemberExpression_DoesNotMatchClasses_Test const &
);};::testing::TestInfo* const MemberExpression_DoesNotMatchClasses_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MemberExpression", "DoesNotMatchClasses", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MemberExpression_DoesNotMatchClasses_Test
>);void MemberExpression_DoesNotMatchClasses_Test::TestBody
()
{
1432 EXPECT_TRUE(notMatches("class Y { void x() {} };", memberExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() {} };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1432, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() {} };\", memberExpr())", "false"
, "true").c_str()) = ::testing::Message()
;
1433}
1434
1435TEST(MemberExpression, MatchesMemberFunctionCall)class MemberExpression_MatchesMemberFunctionCall_Test : public
::testing::Test { public: MemberExpression_MatchesMemberFunctionCall_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MemberExpression_MatchesMemberFunctionCall_Test
(MemberExpression_MatchesMemberFunctionCall_Test const &)
; void operator=(MemberExpression_MatchesMemberFunctionCall_Test
const &);};::testing::TestInfo* const MemberExpression_MatchesMemberFunctionCall_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MemberExpression", "MatchesMemberFunctionCall", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MemberExpression_MatchesMemberFunctionCall_Test
>);void MemberExpression_MatchesMemberFunctionCall_Test::TestBody
()
{
1436 EXPECT_TRUE(matches("class Y { void x() { x(); } };", memberExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { x(); } };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1436, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { x(); } };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1437}
1438
1439TEST(MemberExpression, MatchesVariable)class MemberExpression_MatchesVariable_Test : public ::testing
::Test { public: MemberExpression_MatchesVariable_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); MemberExpression_MatchesVariable_Test
(MemberExpression_MatchesVariable_Test const &); void operator
=(MemberExpression_MatchesVariable_Test const &);};::testing
::TestInfo* const MemberExpression_MatchesVariable_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "MemberExpression"
, "MatchesVariable", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< MemberExpression_MatchesVariable_Test
>);void MemberExpression_MatchesVariable_Test::TestBody()
{
1440 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->y; } int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1441, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->y; } int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
1441 matches("class Y { void x() { this->y; } int y; };", memberExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->y; } int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1441, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->y; } int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1442 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { y; } int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1443, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { y; } int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
1443 matches("class Y { void x() { y; } int y; };", memberExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { y; } int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1443, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { y; } int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1444 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { Y y; y.y; } int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1445, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { Y y; y.y; } int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
1445 matches("class Y { void x() { Y y; y.y; } int y; };", memberExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { Y y; y.y; } int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1445, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { Y y; y.y; } int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1446}
1447
1448TEST(MemberExpression, MatchesStaticVariable)class MemberExpression_MatchesStaticVariable_Test : public ::
testing::Test { public: MemberExpression_MatchesStaticVariable_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MemberExpression_MatchesStaticVariable_Test
(MemberExpression_MatchesStaticVariable_Test const &); void
operator=(MemberExpression_MatchesStaticVariable_Test const &
);};::testing::TestInfo* const MemberExpression_MatchesStaticVariable_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MemberExpression", "MatchesStaticVariable", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MemberExpression_MatchesStaticVariable_Test
>);void MemberExpression_MatchesStaticVariable_Test::TestBody
()
{
1449 EXPECT_TRUE(matches("class Y { void x() { this->y; } static int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->y; } static int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1450, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->y; } static int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
1450 memberExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->y; } static int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1450, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->y; } static int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1451 EXPECT_TRUE(notMatches("class Y { void x() { y; } static int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { y; } static int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1452, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { y; } static int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
1452 memberExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { y; } static int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1452, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { y; } static int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1453 EXPECT_TRUE(notMatches("class Y { void x() { Y::y; } static int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { Y::y; } static int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1454, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { Y::y; } static int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
1454 memberExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { Y::y; } static int y; };"
, memberExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1454, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { Y::y; } static int y; };\", memberExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
1455}
1456
1457TEST(IsInteger, MatchesIntegers)class IsInteger_MatchesIntegers_Test : public ::testing::Test
{ public: IsInteger_MatchesIntegers_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); IsInteger_MatchesIntegers_Test(IsInteger_MatchesIntegers_Test
const &); void operator=(IsInteger_MatchesIntegers_Test const
&);};::testing::TestInfo* const IsInteger_MatchesIntegers_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsInteger", "MatchesIntegers", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< IsInteger_MatchesIntegers_Test>);void IsInteger_MatchesIntegers_Test
::TestBody()
{
1458 EXPECT_TRUE(matches("int i = 0;", varDecl(hasType(isInteger()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 0;",
varDecl(hasType(isInteger()))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1458, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 0;\", varDecl(hasType(isInteger())))", "false"
, "true").c_str()) = ::testing::Message()
;
1459 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "long long i = 0; void f(long long) { }; void g() {f(i);}"
, callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger
()))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1462, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"long long i = 0; void f(long long) { }; void g() {f(i);}\", callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger())))))))"
, "false", "true").c_str()) = ::testing::Message()
1460 "long long i = 0; void f(long long) { }; void g() {f(i);}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "long long i = 0; void f(long long) { }; void g() {f(i);}"
, callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger
()))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1462, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"long long i = 0; void f(long long) { }; void g() {f(i);}\", callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger())))))))"
, "false", "true").c_str()) = ::testing::Message()
1461 callExpr(hasArgument(0, declRefExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "long long i = 0; void f(long long) { }; void g() {f(i);}"
, callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger
()))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1462, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"long long i = 0; void f(long long) { }; void g() {f(i);}\", callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger())))))))"
, "false", "true").c_str()) = ::testing::Message()
1462 to(varDecl(hasType(isInteger()))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "long long i = 0; void f(long long) { }; void g() {f(i);}"
, callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger
()))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1462, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"long long i = 0; void f(long long) { }; void g() {f(i);}\", callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger())))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1463}
1464
1465TEST(IsInteger, ReportsNoFalsePositives)class IsInteger_ReportsNoFalsePositives_Test : public ::testing
::Test { public: IsInteger_ReportsNoFalsePositives_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); IsInteger_ReportsNoFalsePositives_Test
(IsInteger_ReportsNoFalsePositives_Test const &); void operator
=(IsInteger_ReportsNoFalsePositives_Test const &);};::testing
::TestInfo* const IsInteger_ReportsNoFalsePositives_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "IsInteger",
"ReportsNoFalsePositives", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< IsInteger_ReportsNoFalsePositives_Test>);void IsInteger_ReportsNoFalsePositives_Test
::TestBody()
{
1466 EXPECT_TRUE(notMatches("int *i;", varDecl(hasType(isInteger()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int *i;",
varDecl(hasType(isInteger()))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1466, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int *i;\", varDecl(hasType(isInteger())))", "false"
, "true").c_str()) = ::testing::Message()
;
1467 EXPECT_TRUE(notMatches("struct T {}; T t; void f(T *) { }; void g() {f(&t);}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct T {}; T t; void f(T *) { }; void g() {f(&t);}"
, callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger
()))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1469, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct T {}; T t; void f(T *) { }; void g() {f(&t);}\", callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger())))))))"
, "false", "true").c_str()) = ::testing::Message()
1468 callExpr(hasArgument(0, declRefExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct T {}; T t; void f(T *) { }; void g() {f(&t);}"
, callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger
()))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1469, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct T {}; T t; void f(T *) { }; void g() {f(&t);}\", callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger())))))))"
, "false", "true").c_str()) = ::testing::Message()
1469 to(varDecl(hasType(isInteger()))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct T {}; T t; void f(T *) { }; void g() {f(&t);}"
, callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger
()))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1469, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct T {}; T t; void f(T *) { }; void g() {f(&t);}\", callExpr(hasArgument(0, declRefExpr( to(varDecl(hasType(isInteger())))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1470}
1471
1472TEST(IsAnyCharacter, MatchesCharacters)class IsAnyCharacter_MatchesCharacters_Test : public ::testing
::Test { public: IsAnyCharacter_MatchesCharacters_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); IsAnyCharacter_MatchesCharacters_Test
(IsAnyCharacter_MatchesCharacters_Test const &); void operator
=(IsAnyCharacter_MatchesCharacters_Test const &);};::testing
::TestInfo* const IsAnyCharacter_MatchesCharacters_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "IsAnyCharacter"
, "MatchesCharacters", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< IsAnyCharacter_MatchesCharacters_Test>);void IsAnyCharacter_MatchesCharacters_Test
::TestBody()
{
1473 EXPECT_TRUE(matches("char i = 0;", varDecl(hasType(isAnyCharacter()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char i = 0;"
, varDecl(hasType(isAnyCharacter()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1473, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char i = 0;\", varDecl(hasType(isAnyCharacter())))"
, "false", "true").c_str()) = ::testing::Message()
;
1474}
1475
1476TEST(IsAnyCharacter, ReportsNoFalsePositives)class IsAnyCharacter_ReportsNoFalsePositives_Test : public ::
testing::Test { public: IsAnyCharacter_ReportsNoFalsePositives_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsAnyCharacter_ReportsNoFalsePositives_Test
(IsAnyCharacter_ReportsNoFalsePositives_Test const &); void
operator=(IsAnyCharacter_ReportsNoFalsePositives_Test const &
);};::testing::TestInfo* const IsAnyCharacter_ReportsNoFalsePositives_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsAnyCharacter", "ReportsNoFalsePositives", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsAnyCharacter_ReportsNoFalsePositives_Test
>);void IsAnyCharacter_ReportsNoFalsePositives_Test::TestBody
()
{
1477 EXPECT_TRUE(notMatches("int i;", varDecl(hasType(isAnyCharacter()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i;", varDecl
(hasType(isAnyCharacter()))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1477, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i;\", varDecl(hasType(isAnyCharacter())))"
, "false", "true").c_str()) = ::testing::Message()
;
1478}
1479
1480TEST(IsArrow, MatchesMemberVariablesViaArrow)class IsArrow_MatchesMemberVariablesViaArrow_Test : public ::
testing::Test { public: IsArrow_MatchesMemberVariablesViaArrow_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsArrow_MatchesMemberVariablesViaArrow_Test
(IsArrow_MatchesMemberVariablesViaArrow_Test const &); void
operator=(IsArrow_MatchesMemberVariablesViaArrow_Test const &
);};::testing::TestInfo* const IsArrow_MatchesMemberVariablesViaArrow_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsArrow", "MatchesMemberVariablesViaArrow", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsArrow_MatchesMemberVariablesViaArrow_Test
>);void IsArrow_MatchesMemberVariablesViaArrow_Test::TestBody
()
{
1481 EXPECT_TRUE(matches("class Y { void x() { this->y; } int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->y; } int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1482, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->y; } int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
1482 memberExpr(isArrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->y; } int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1482, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->y; } int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1483 EXPECT_TRUE(matches("class Y { void x() { y; } int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { y; } int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1484, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { y; } int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
1484 memberExpr(isArrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { y; } int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1484, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { y; } int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1485 EXPECT_TRUE(notMatches("class Y { void x() { (*this).y; } int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { (*this).y; } int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1486, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { (*this).y; } int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
1486 memberExpr(isArrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { (*this).y; } int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1486, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { (*this).y; } int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1487}
1488
1489TEST(IsArrow, MatchesStaticMemberVariablesViaArrow)class IsArrow_MatchesStaticMemberVariablesViaArrow_Test : public
::testing::Test { public: IsArrow_MatchesStaticMemberVariablesViaArrow_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsArrow_MatchesStaticMemberVariablesViaArrow_Test
(IsArrow_MatchesStaticMemberVariablesViaArrow_Test const &
); void operator=(IsArrow_MatchesStaticMemberVariablesViaArrow_Test
const &);};::testing::TestInfo* const IsArrow_MatchesStaticMemberVariablesViaArrow_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsArrow", "MatchesStaticMemberVariablesViaArrow", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsArrow_MatchesStaticMemberVariablesViaArrow_Test
>);void IsArrow_MatchesStaticMemberVariablesViaArrow_Test::
TestBody()
{
1490 EXPECT_TRUE(matches("class Y { void x() { this->y; } static int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->y; } static int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1491, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->y; } static int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
1491 memberExpr(isArrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->y; } static int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1491, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->y; } static int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1492 EXPECT_TRUE(notMatches("class Y { void x() { y; } static int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { y; } static int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1493, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { y; } static int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
1493 memberExpr(isArrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { y; } static int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1493, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { y; } static int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1494 EXPECT_TRUE(notMatches("class Y { void x() { (*this).y; } static int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { (*this).y; } static int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1495, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { (*this).y; } static int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
1495 memberExpr(isArrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { (*this).y; } static int y; };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1495, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { (*this).y; } static int y; };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1496}
1497
1498TEST(IsArrow, MatchesMemberCallsViaArrow)class IsArrow_MatchesMemberCallsViaArrow_Test : public ::testing
::Test { public: IsArrow_MatchesMemberCallsViaArrow_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsArrow_MatchesMemberCallsViaArrow_Test
(IsArrow_MatchesMemberCallsViaArrow_Test const &); void operator
=(IsArrow_MatchesMemberCallsViaArrow_Test const &);};::testing
::TestInfo* const IsArrow_MatchesMemberCallsViaArrow_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "IsArrow", "MatchesMemberCallsViaArrow"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsArrow_MatchesMemberCallsViaArrow_Test
>);void IsArrow_MatchesMemberCallsViaArrow_Test::TestBody(
)
{
1499 EXPECT_TRUE(matches("class Y { void x() { this->x(); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->x(); } };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1500, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->x(); } };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
1500 memberExpr(isArrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->x(); } };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1500, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->x(); } };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1501 EXPECT_TRUE(matches("class Y { void x() { x(); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { x(); } };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1502, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { x(); } };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
1502 memberExpr(isArrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { x(); } };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1502, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { x(); } };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1503 EXPECT_TRUE(notMatches("class Y { void x() { Y y; y.x(); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { Y y; y.x(); } };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1504, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { Y y; y.x(); } };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
1504 memberExpr(isArrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { Y y; y.x(); } };"
, memberExpr(isArrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1504, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { Y y; y.x(); } };\", memberExpr(isArrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1505}
1506
1507TEST(Callee, MatchesDeclarations)class Callee_MatchesDeclarations_Test : public ::testing::Test
{ public: Callee_MatchesDeclarations_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Callee_MatchesDeclarations_Test(Callee_MatchesDeclarations_Test
const &); void operator=(Callee_MatchesDeclarations_Test
const &);};::testing::TestInfo* const Callee_MatchesDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Callee", "MatchesDeclarations", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Callee_MatchesDeclarations_Test>);void Callee_MatchesDeclarations_Test
::TestBody()
{
1508 StatementMatcher CallMethodX = callExpr(callee(cxxMethodDecl(hasName("x"))));
1509
1510 EXPECT_TRUE(matches("class Y { void x() { x(); } };", CallMethodX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { x(); } };"
, CallMethodX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1510, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { x(); } };\", CallMethodX)",
"false", "true").c_str()) = ::testing::Message()
;
1511 EXPECT_TRUE(notMatches("class Y { void x() {} };", CallMethodX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() {} };"
, CallMethodX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1511, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() {} };\", CallMethodX)", "false"
, "true").c_str()) = ::testing::Message()
;
1512
1513 CallMethodX = callExpr(callee(cxxConversionDecl()));
1514 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct Y { operator int() const; }; int i = Y();"
, CallMethodX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1515, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct Y { operator int() const; }; int i = Y();\", CallMethodX)"
, "false", "true").c_str()) = ::testing::Message()
1515 matches("struct Y { operator int() const; }; int i = Y();", CallMethodX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct Y { operator int() const; }; int i = Y();"
, CallMethodX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1515, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct Y { operator int() const; }; int i = Y();\", CallMethodX)"
, "false", "true").c_str()) = ::testing::Message()
;
1516 EXPECT_TRUE(notMatches("struct Y { operator int() const; }; Y y = Y();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct Y { operator int() const; }; Y y = Y();"
, CallMethodX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1517, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct Y { operator int() const; }; Y y = Y();\", CallMethodX)"
, "false", "true").c_str()) = ::testing::Message()
1517 CallMethodX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct Y { operator int() const; }; Y y = Y();"
, CallMethodX))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1517, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct Y { operator int() const; }; Y y = Y();\", CallMethodX)"
, "false", "true").c_str()) = ::testing::Message()
;
1518}
1519
1520TEST(ConversionDeclaration, IsExplicit)class ConversionDeclaration_IsExplicit_Test : public ::testing
::Test { public: ConversionDeclaration_IsExplicit_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ConversionDeclaration_IsExplicit_Test
(ConversionDeclaration_IsExplicit_Test const &); void operator
=(ConversionDeclaration_IsExplicit_Test const &);};::testing
::TestInfo* const ConversionDeclaration_IsExplicit_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ConversionDeclaration"
, "IsExplicit", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ConversionDeclaration_IsExplicit_Test
>);void ConversionDeclaration_IsExplicit_Test::TestBody()
{
1521 EXPECT_TRUE(matches("struct S { explicit operator int(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { explicit operator int(); };"
, cxxConversionDecl(isExplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1522, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { explicit operator int(); };\", cxxConversionDecl(isExplicit()))"
, "false", "true").c_str()) = ::testing::Message()
1522 cxxConversionDecl(isExplicit())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { explicit operator int(); };"
, cxxConversionDecl(isExplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1522, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { explicit operator int(); };\", cxxConversionDecl(isExplicit()))"
, "false", "true").c_str()) = ::testing::Message()
;
1523 EXPECT_TRUE(notMatches("struct S { operator int(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { operator int(); };"
, cxxConversionDecl(isExplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1524, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { operator int(); };\", cxxConversionDecl(isExplicit()))"
, "false", "true").c_str()) = ::testing::Message()
1524 cxxConversionDecl(isExplicit())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { operator int(); };"
, cxxConversionDecl(isExplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1524, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { operator int(); };\", cxxConversionDecl(isExplicit()))"
, "false", "true").c_str()) = ::testing::Message()
;
1525}
1526
1527TEST(Callee, MatchesMemberExpressions)class Callee_MatchesMemberExpressions_Test : public ::testing
::Test { public: Callee_MatchesMemberExpressions_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Callee_MatchesMemberExpressions_Test
(Callee_MatchesMemberExpressions_Test const &); void operator
=(Callee_MatchesMemberExpressions_Test const &);};::testing
::TestInfo* const Callee_MatchesMemberExpressions_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Callee", "MatchesMemberExpressions"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Callee_MatchesMemberExpressions_Test
>);void Callee_MatchesMemberExpressions_Test::TestBody()
{
1528 EXPECT_TRUE(matches("class Y { void x() { this->x(); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->x(); } };"
, callExpr(callee(memberExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1529, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->x(); } };\", callExpr(callee(memberExpr())))"
, "false", "true").c_str()) = ::testing::Message()
1529 callExpr(callee(memberExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { void x() { this->x(); } };"
, callExpr(callee(memberExpr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1529, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { void x() { this->x(); } };\", callExpr(callee(memberExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
1530 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { this->x(); } };"
, callExpr(callee(callExpr()))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1531, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { this->x(); } };\", callExpr(callee(callExpr())))"
, "false", "true").c_str()) = ::testing::Message()
1531 notMatches("class Y { void x() { this->x(); } };", callExpr(callee(callExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { void x() { this->x(); } };"
, callExpr(callee(callExpr()))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1531, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { void x() { this->x(); } };\", callExpr(callee(callExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
1532}
1533
1534TEST(Function, MatchesFunctionDeclarations)class Function_MatchesFunctionDeclarations_Test : public ::testing
::Test { public: Function_MatchesFunctionDeclarations_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Function_MatchesFunctionDeclarations_Test
(Function_MatchesFunctionDeclarations_Test const &); void
operator=(Function_MatchesFunctionDeclarations_Test const &
);};::testing::TestInfo* const Function_MatchesFunctionDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Function", "MatchesFunctionDeclarations", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Function_MatchesFunctionDeclarations_Test
>);void Function_MatchesFunctionDeclarations_Test::TestBody
()
{
1535 StatementMatcher CallFunctionF = callExpr(callee(functionDecl(hasName("f"))));
1536
1537 EXPECT_TRUE(matches("void f() { f(); }", CallFunctionF))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { f(); }"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1537, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { f(); }\", CallFunctionF)", "false", "true"
).c_str()) = ::testing::Message()
;
1538 EXPECT_TRUE(notMatches("void f() { }", CallFunctionF))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { }"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1538, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { }\", CallFunctionF)", "false", "true"
).c_str()) = ::testing::Message()
;
1539
1540 if (llvm::Triple(llvm::sys::getDefaultTargetTriple()).getOS() !=
1541 llvm::Triple::Win32) {
1542 // FIXME: Make this work for MSVC.
1543 // Dependent contexts, but a non-dependent call.
1544 EXPECT_TRUE(matches("void f(); template <int N> void g() { f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(); template <int N> void g() { f(); }"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1545, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(); template <int N> void g() { f(); }\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
1545 CallFunctionF))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(); template <int N> void g() { f(); }"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1545, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(); template <int N> void g() { f(); }\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
;
1546 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(); template <int N> struct S { void g() { f(); } };"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1548, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(); template <int N> struct S { void g() { f(); } };\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
1547 matches("void f(); template <int N> struct S { void g() { f(); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(); template <int N> struct S { void g() { f(); } };"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1548, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(); template <int N> struct S { void g() { f(); } };\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
1548 CallFunctionF))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(); template <int N> struct S { void g() { f(); } };"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1548, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(); template <int N> struct S { void g() { f(); } };\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
;
1549 }
1550
1551 // Depedent calls don't match.
1552 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(int); template <typename T> void g(T t) { f(t); }"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1554, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(int); template <typename T> void g(T t) { f(t); }\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
1553 notMatches("void f(int); template <typename T> void g(T t) { f(t); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(int); template <typename T> void g(T t) { f(t); }"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1554, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(int); template <typename T> void g(T t) { f(t); }\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
1554 CallFunctionF))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(int); template <typename T> void g(T t) { f(t); }"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1554, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(int); template <typename T> void g(T t) { f(t); }\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
;
1555 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(int);"
"template <typename T> struct S { void g(T t) { f(t); } };"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1558, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(int);\" \"template <typename T> struct S { void g(T t) { f(t); } };\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
1556 notMatches("void f(int);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(int);"
"template <typename T> struct S { void g(T t) { f(t); } };"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1558, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(int);\" \"template <typename T> struct S { void g(T t) { f(t); } };\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
1557 "template <typename T> struct S { void g(T t) { f(t); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(int);"
"template <typename T> struct S { void g(T t) { f(t); } };"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1558, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(int);\" \"template <typename T> struct S { void g(T t) { f(t); } };\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
1558 CallFunctionF))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(int);"
"template <typename T> struct S { void g(T t) { f(t); } };"
, CallFunctionF))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1558, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(int);\" \"template <typename T> struct S { void g(T t) { f(t); } };\", CallFunctionF)"
, "false", "true").c_str()) = ::testing::Message()
;
1559
1560 EXPECT_TRUE(matches("void f(...);", functionDecl(isVariadic())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(...);"
, functionDecl(isVariadic())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1560, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(...);\", functionDecl(isVariadic()))", "false"
, "true").c_str()) = ::testing::Message()
;
1561 EXPECT_TRUE(notMatches("void f(int);", functionDecl(isVariadic())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(int);"
, functionDecl(isVariadic())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1561, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(int);\", functionDecl(isVariadic()))",
"false", "true").c_str()) = ::testing::Message()
;
1562 EXPECT_TRUE(notMatches("template <typename... Ts> void f(Ts...);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename... Ts> void f(Ts...);"
, functionDecl(isVariadic())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1563, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename... Ts> void f(Ts...);\", functionDecl(isVariadic()))"
, "false", "true").c_str()) = ::testing::Message()
1563 functionDecl(isVariadic())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename... Ts> void f(Ts...);"
, functionDecl(isVariadic())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1563, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename... Ts> void f(Ts...);\", functionDecl(isVariadic()))"
, "false", "true").c_str()) = ::testing::Message()
;
1564 EXPECT_TRUE(notMatches("void f();", functionDecl(isVariadic())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f();"
, functionDecl(isVariadic())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1564, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f();\", functionDecl(isVariadic()))", "false"
, "true").c_str()) = ::testing::Message()
;
1565 EXPECT_TRUE(notMatchesC("void f();", functionDecl(isVariadic())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatchesC("void f();"
, functionDecl(isVariadic())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1565, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatchesC(\"void f();\", functionDecl(isVariadic()))", "false"
, "true").c_str()) = ::testing::Message()
;
1566}
1567
1568TEST(FunctionTemplate, MatchesFunctionTemplateDeclarations)class FunctionTemplate_MatchesFunctionTemplateDeclarations_Test
: public ::testing::Test { public: FunctionTemplate_MatchesFunctionTemplateDeclarations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); FunctionTemplate_MatchesFunctionTemplateDeclarations_Test
(FunctionTemplate_MatchesFunctionTemplateDeclarations_Test const
&); void operator=(FunctionTemplate_MatchesFunctionTemplateDeclarations_Test
const &);};::testing::TestInfo* const FunctionTemplate_MatchesFunctionTemplateDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"FunctionTemplate", "MatchesFunctionTemplateDeclarations", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< FunctionTemplate_MatchesFunctionTemplateDeclarations_Test
>);void FunctionTemplate_MatchesFunctionTemplateDeclarations_Test
::TestBody()
{
1569 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> void f(T t) {}"
, functionTemplateDecl(hasName("f"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1571, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> void f(T t) {}\", functionTemplateDecl(hasName(\"f\")))"
, "false", "true").c_str()) = ::testing::Message()
1570 matches("template <typename T> void f(T t) {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> void f(T t) {}"
, functionTemplateDecl(hasName("f"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1571, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> void f(T t) {}\", functionTemplateDecl(hasName(\"f\")))"
, "false", "true").c_str()) = ::testing::Message()
1571 functionTemplateDecl(hasName("f"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> void f(T t) {}"
, functionTemplateDecl(hasName("f"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1571, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> void f(T t) {}\", functionTemplateDecl(hasName(\"f\")))"
, "false", "true").c_str()) = ::testing::Message()
;
1572}
1573
1574TEST(FunctionTemplate, DoesNotMatchFunctionDeclarations)class FunctionTemplate_DoesNotMatchFunctionDeclarations_Test :
public ::testing::Test { public: FunctionTemplate_DoesNotMatchFunctionDeclarations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); FunctionTemplate_DoesNotMatchFunctionDeclarations_Test
(FunctionTemplate_DoesNotMatchFunctionDeclarations_Test const
&); void operator=(FunctionTemplate_DoesNotMatchFunctionDeclarations_Test
const &);};::testing::TestInfo* const FunctionTemplate_DoesNotMatchFunctionDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"FunctionTemplate", "DoesNotMatchFunctionDeclarations", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< FunctionTemplate_DoesNotMatchFunctionDeclarations_Test
>);void FunctionTemplate_DoesNotMatchFunctionDeclarations_Test
::TestBody()
{
1575 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(double d); void f(int t) {}"
, functionTemplateDecl(hasName("f"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1577, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(double d); void f(int t) {}\", functionTemplateDecl(hasName(\"f\")))"
, "false", "true").c_str()) = ::testing::Message()
1576 notMatches("void f(double d); void f(int t) {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(double d); void f(int t) {}"
, functionTemplateDecl(hasName("f"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1577, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(double d); void f(int t) {}\", functionTemplateDecl(hasName(\"f\")))"
, "false", "true").c_str()) = ::testing::Message()
1577 functionTemplateDecl(hasName("f"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(double d); void f(int t) {}"
, functionTemplateDecl(hasName("f"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1577, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(double d); void f(int t) {}\", functionTemplateDecl(hasName(\"f\")))"
, "false", "true").c_str()) = ::testing::Message()
;
1578}
1579
1580TEST(FunctionTemplate, DoesNotMatchFunctionTemplateSpecializations)class FunctionTemplate_DoesNotMatchFunctionTemplateSpecializations_Test
: public ::testing::Test { public: FunctionTemplate_DoesNotMatchFunctionTemplateSpecializations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); FunctionTemplate_DoesNotMatchFunctionTemplateSpecializations_Test
(FunctionTemplate_DoesNotMatchFunctionTemplateSpecializations_Test
const &); void operator=(FunctionTemplate_DoesNotMatchFunctionTemplateSpecializations_Test
const &);};::testing::TestInfo* const FunctionTemplate_DoesNotMatchFunctionTemplateSpecializations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"FunctionTemplate", "DoesNotMatchFunctionTemplateSpecializations"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< FunctionTemplate_DoesNotMatchFunctionTemplateSpecializations_Test
>);void FunctionTemplate_DoesNotMatchFunctionTemplateSpecializations_Test
::TestBody()
{
1581 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void g(); template <typename T> void f(T t) {}"
"template <> void f(int t) { g(); }", functionTemplateDecl
(hasName("f"), hasDescendant(declRefExpr(to( functionDecl(hasName
("g"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1586, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void g(); template <typename T> void f(T t) {}\" \"template <> void f(int t) { g(); }\", functionTemplateDecl(hasName(\"f\"), hasDescendant(declRefExpr(to( functionDecl(hasName(\"g\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1582 notMatches("void g(); template <typename T> void f(T t) {}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void g(); template <typename T> void f(T t) {}"
"template <> void f(int t) { g(); }", functionTemplateDecl
(hasName("f"), hasDescendant(declRefExpr(to( functionDecl(hasName
("g"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1586, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void g(); template <typename T> void f(T t) {}\" \"template <> void f(int t) { g(); }\", functionTemplateDecl(hasName(\"f\"), hasDescendant(declRefExpr(to( functionDecl(hasName(\"g\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1583 "template <> void f(int t) { g(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void g(); template <typename T> void f(T t) {}"
"template <> void f(int t) { g(); }", functionTemplateDecl
(hasName("f"), hasDescendant(declRefExpr(to( functionDecl(hasName
("g"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1586, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void g(); template <typename T> void f(T t) {}\" \"template <> void f(int t) { g(); }\", functionTemplateDecl(hasName(\"f\"), hasDescendant(declRefExpr(to( functionDecl(hasName(\"g\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1584 functionTemplateDecl(hasName("f"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void g(); template <typename T> void f(T t) {}"
"template <> void f(int t) { g(); }", functionTemplateDecl
(hasName("f"), hasDescendant(declRefExpr(to( functionDecl(hasName
("g"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1586, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void g(); template <typename T> void f(T t) {}\" \"template <> void f(int t) { g(); }\", functionTemplateDecl(hasName(\"f\"), hasDescendant(declRefExpr(to( functionDecl(hasName(\"g\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1585 hasDescendant(declRefExpr(to(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void g(); template <typename T> void f(T t) {}"
"template <> void f(int t) { g(); }", functionTemplateDecl
(hasName("f"), hasDescendant(declRefExpr(to( functionDecl(hasName
("g"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1586, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void g(); template <typename T> void f(T t) {}\" \"template <> void f(int t) { g(); }\", functionTemplateDecl(hasName(\"f\"), hasDescendant(declRefExpr(to( functionDecl(hasName(\"g\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1586 functionDecl(hasName("g"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void g(); template <typename T> void f(T t) {}"
"template <> void f(int t) { g(); }", functionTemplateDecl
(hasName("f"), hasDescendant(declRefExpr(to( functionDecl(hasName
("g"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1586, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void g(); template <typename T> void f(T t) {}\" \"template <> void f(int t) { g(); }\", functionTemplateDecl(hasName(\"f\"), hasDescendant(declRefExpr(to( functionDecl(hasName(\"g\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1587}
1588
1589TEST(Matcher, Argument)class Matcher_Argument_Test : public ::testing::Test { public
: Matcher_Argument_Test() {} private: virtual void TestBody()
; static ::testing::TestInfo* const test_info_ __attribute__ (
(unused)); Matcher_Argument_Test(Matcher_Argument_Test const &
); void operator=(Matcher_Argument_Test const &);};::testing
::TestInfo* const Matcher_Argument_Test ::test_info_ = ::testing
::internal::MakeAndRegisterTestInfo( "Matcher", "Argument", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< Matcher_Argument_Test>
);void Matcher_Argument_Test::TestBody()
{
1590 StatementMatcher CallArgumentY = callExpr(
1591 hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
1592
1593 EXPECT_TRUE(matches("void x(int) { int y; x(y); }", CallArgumentY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x(int) { int y; x(y); }"
, CallArgumentY))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1593, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x(int) { int y; x(y); }\", CallArgumentY)",
"false", "true").c_str()) = ::testing::Message()
;
1594 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int) { int y; x(y); } };"
, CallArgumentY))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1595, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int) { int y; x(y); } };\", CallArgumentY)"
, "false", "true").c_str()) = ::testing::Message()
1595 matches("class X { void x(int) { int y; x(y); } };", CallArgumentY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int) { int y; x(y); } };"
, CallArgumentY))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1595, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int) { int y; x(y); } };\", CallArgumentY)"
, "false", "true").c_str()) = ::testing::Message()
;
1596 EXPECT_TRUE(notMatches("void x(int) { int z; x(z); }", CallArgumentY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x(int) { int z; x(z); }"
, CallArgumentY))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1596, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x(int) { int z; x(z); }\", CallArgumentY)"
, "false", "true").c_str()) = ::testing::Message()
;
1597
1598 StatementMatcher WrongIndex = callExpr(
1599 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
1600 EXPECT_TRUE(notMatches("void x(int) { int y; x(y); }", WrongIndex))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x(int) { int y; x(y); }"
, WrongIndex))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1600, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x(int) { int y; x(y); }\", WrongIndex)",
"false", "true").c_str()) = ::testing::Message()
;
1601}
1602
1603TEST(Matcher, AnyArgument)class Matcher_AnyArgument_Test : public ::testing::Test { public
: Matcher_AnyArgument_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_AnyArgument_Test(Matcher_AnyArgument_Test
const &); void operator=(Matcher_AnyArgument_Test const &
);};::testing::TestInfo* const Matcher_AnyArgument_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "AnyArgument"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_AnyArgument_Test
>);void Matcher_AnyArgument_Test::TestBody()
{
1604 StatementMatcher CallArgumentY = callExpr(
1605 hasAnyArgument(declRefExpr(to(varDecl(hasName("y"))))));
1606 EXPECT_TRUE(matches("void x(int, int) { int y; x(1, y); }", CallArgumentY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x(int, int) { int y; x(1, y); }"
, CallArgumentY))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1606, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x(int, int) { int y; x(1, y); }\", CallArgumentY)"
, "false", "true").c_str()) = ::testing::Message()
;
1607 EXPECT_TRUE(matches("void x(int, int) { int y; x(y, 42); }", CallArgumentY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x(int, int) { int y; x(y, 42); }"
, CallArgumentY))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1607, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x(int, int) { int y; x(y, 42); }\", CallArgumentY)"
, "false", "true").c_str()) = ::testing::Message()
;
1608 EXPECT_TRUE(notMatches("void x(int, int) { x(1, 2); }", CallArgumentY))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x(int, int) { x(1, 2); }"
, CallArgumentY))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1608, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x(int, int) { x(1, 2); }\", CallArgumentY)"
, "false", "true").c_str()) = ::testing::Message()
;
1609}
1610
1611TEST(Matcher, ArgumentCount)class Matcher_ArgumentCount_Test : public ::testing::Test { public
: Matcher_ArgumentCount_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_ArgumentCount_Test(Matcher_ArgumentCount_Test
const &); void operator=(Matcher_ArgumentCount_Test const
&);};::testing::TestInfo* const Matcher_ArgumentCount_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "ArgumentCount", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_ArgumentCount_Test>);void Matcher_ArgumentCount_Test
::TestBody()
{
1612 StatementMatcher Call1Arg = callExpr(argumentCountIs(1));
1613
1614 EXPECT_TRUE(matches("void x(int) { x(0); }", Call1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x(int) { x(0); }"
, Call1Arg))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1614, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x(int) { x(0); }\", Call1Arg)", "false", "true"
).c_str()) = ::testing::Message()
;
1615 EXPECT_TRUE(matches("class X { void x(int) { x(0); } };", Call1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int) { x(0); } };"
, Call1Arg))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1615, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int) { x(0); } };\", Call1Arg)"
, "false", "true").c_str()) = ::testing::Message()
;
1616 EXPECT_TRUE(notMatches("void x(int, int) { x(0, 0); }", Call1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x(int, int) { x(0, 0); }"
, Call1Arg))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1616, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x(int, int) { x(0, 0); }\", Call1Arg)", "false"
, "true").c_str()) = ::testing::Message()
;
1617}
1618
1619TEST(Matcher, ParameterCount)class Matcher_ParameterCount_Test : public ::testing::Test { public
: Matcher_ParameterCount_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_ParameterCount_Test(Matcher_ParameterCount_Test
const &); void operator=(Matcher_ParameterCount_Test const
&);};::testing::TestInfo* const Matcher_ParameterCount_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "ParameterCount", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_ParameterCount_Test>);void Matcher_ParameterCount_Test
::TestBody()
{
1620 DeclarationMatcher Function1Arg = functionDecl(parameterCountIs(1));
1621 EXPECT_TRUE(matches("void f(int i) {}", Function1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(int i) {}"
, Function1Arg))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1621, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(int i) {}\", Function1Arg)", "false", "true"
).c_str()) = ::testing::Message()
;
1622 EXPECT_TRUE(matches("class X { void f(int i) {} };", Function1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void f(int i) {} };"
, Function1Arg))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1622, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void f(int i) {} };\", Function1Arg)",
"false", "true").c_str()) = ::testing::Message()
;
1623 EXPECT_TRUE(notMatches("void f() {}", Function1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {}"
, Function1Arg))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1623, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {}\", Function1Arg)", "false", "true"
).c_str()) = ::testing::Message()
;
1624 EXPECT_TRUE(notMatches("void f(int i, int j, int k) {}", Function1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(int i, int j, int k) {}"
, Function1Arg))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1624, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(int i, int j, int k) {}\", Function1Arg)"
, "false", "true").c_str()) = ::testing::Message()
;
1625}
1626
1627TEST(Matcher, References)class Matcher_References_Test : public ::testing::Test { public
: Matcher_References_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_References_Test(Matcher_References_Test const
&); void operator=(Matcher_References_Test const &);
};::testing::TestInfo* const Matcher_References_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "References"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_References_Test
>);void Matcher_References_Test::TestBody()
{
1628 DeclarationMatcher ReferenceClassX = varDecl(
1629 hasType(references(recordDecl(hasName("X")))));
1630 EXPECT_TRUE(matches("class X {}; void y(X y) { X &x = y; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X y) { X &x = y; }"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1631, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X y) { X &x = y; }\", ReferenceClassX)"
, "false", "true").c_str()) = ::testing::Message()
1631 ReferenceClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X y) { X &x = y; }"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1631, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X y) { X &x = y; }\", ReferenceClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
1632 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X y) { const X &x = y; }"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1633, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X y) { const X &x = y; }\", ReferenceClassX)"
, "false", "true").c_str()) = ::testing::Message()
1633 matches("class X {}; void y(X y) { const X &x = y; }", ReferenceClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X y) { const X &x = y; }"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1633, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X y) { const X &x = y; }\", ReferenceClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
1634 // The match here is on the implicit copy constructor code for
1635 // class X, not on code 'X x = y'.
1636 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X y) { X x = y; }"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1637, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X y) { X x = y; }\", ReferenceClassX)"
, "false", "true").c_str()) = ::testing::Message()
1637 matches("class X {}; void y(X y) { X x = y; }", ReferenceClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void y(X y) { X x = y; }"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1637, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void y(X y) { X x = y; }\", ReferenceClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
1638 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; extern X x;"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; extern X x;\", ReferenceClassX)",
"false", "true").c_str()) = ::testing::Message()
1639 notMatches("class X {}; extern X x;", ReferenceClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; extern X x;"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; extern X x;\", ReferenceClassX)",
"false", "true").c_str()) = ::testing::Message()
;
1640 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y(X *y) { X *&x = y; }"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1641, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y(X *y) { X *&x = y; }\", ReferenceClassX)"
, "false", "true").c_str()) = ::testing::Message()
1641 notMatches("class X {}; void y(X *y) { X *&x = y; }", ReferenceClassX))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {}; void y(X *y) { X *&x = y; }"
, ReferenceClassX))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1641, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {}; void y(X *y) { X *&x = y; }\", ReferenceClassX)"
, "false", "true").c_str()) = ::testing::Message()
;
1642}
1643
1644TEST(QualType, hasCanonicalType)class QualType_hasCanonicalType_Test : public ::testing::Test
{ public: QualType_hasCanonicalType_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); QualType_hasCanonicalType_Test(QualType_hasCanonicalType_Test
const &); void operator=(QualType_hasCanonicalType_Test const
&);};::testing::TestInfo* const QualType_hasCanonicalType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"QualType", "hasCanonicalType", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< QualType_hasCanonicalType_Test>);void QualType_hasCanonicalType_Test
::TestBody()
{
1645 EXPECT_TRUE(notMatches("typedef int &int_ref;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("typedef int &int_ref;"
"int a;" "int_ref b = a;", varDecl(hasType(qualType(referenceType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"typedef int &int_ref;\" \"int a;\" \"int_ref b = a;\", varDecl(hasType(qualType(referenceType()))))"
, "false", "true").c_str()) = ::testing::Message()
1646 "int a;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("typedef int &int_ref;"
"int a;" "int_ref b = a;", varDecl(hasType(qualType(referenceType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"typedef int &int_ref;\" \"int a;\" \"int_ref b = a;\", varDecl(hasType(qualType(referenceType()))))"
, "false", "true").c_str()) = ::testing::Message()
1647 "int_ref b = a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("typedef int &int_ref;"
"int a;" "int_ref b = a;", varDecl(hasType(qualType(referenceType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"typedef int &int_ref;\" \"int a;\" \"int_ref b = a;\", varDecl(hasType(qualType(referenceType()))))"
, "false", "true").c_str()) = ::testing::Message()
1648 varDecl(hasType(qualType(referenceType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("typedef int &int_ref;"
"int a;" "int_ref b = a;", varDecl(hasType(qualType(referenceType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"typedef int &int_ref;\" \"int a;\" \"int_ref b = a;\", varDecl(hasType(qualType(referenceType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
1649 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int &int_ref;"
"int a;" "int_ref b = a;", varDecl(hasType(qualType(hasCanonicalType
(referenceType()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int &int_ref;\" \"int a;\" \"int_ref b = a;\", varDecl(hasType(qualType(hasCanonicalType(referenceType())))))"
, "false", "true").c_str()) = ::testing::Message()
1650 matches("typedef int &int_ref;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int &int_ref;"
"int a;" "int_ref b = a;", varDecl(hasType(qualType(hasCanonicalType
(referenceType()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int &int_ref;\" \"int a;\" \"int_ref b = a;\", varDecl(hasType(qualType(hasCanonicalType(referenceType())))))"
, "false", "true").c_str()) = ::testing::Message()
1651 "int a;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int &int_ref;"
"int a;" "int_ref b = a;", varDecl(hasType(qualType(hasCanonicalType
(referenceType()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int &int_ref;\" \"int a;\" \"int_ref b = a;\", varDecl(hasType(qualType(hasCanonicalType(referenceType())))))"
, "false", "true").c_str()) = ::testing::Message()
1652 "int_ref b = a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int &int_ref;"
"int a;" "int_ref b = a;", varDecl(hasType(qualType(hasCanonicalType
(referenceType()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int &int_ref;\" \"int a;\" \"int_ref b = a;\", varDecl(hasType(qualType(hasCanonicalType(referenceType())))))"
, "false", "true").c_str()) = ::testing::Message()
1653 varDecl(hasType(qualType(hasCanonicalType(referenceType()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int &int_ref;"
"int a;" "int_ref b = a;", varDecl(hasType(qualType(hasCanonicalType
(referenceType()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int &int_ref;\" \"int a;\" \"int_ref b = a;\", varDecl(hasType(qualType(hasCanonicalType(referenceType())))))"
, "false", "true").c_str()) = ::testing::Message()
;
1654}
1655
1656TEST(QualType, hasLocalQualifiers)class QualType_hasLocalQualifiers_Test : public ::testing::Test
{ public: QualType_hasLocalQualifiers_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); QualType_hasLocalQualifiers_Test(QualType_hasLocalQualifiers_Test
const &); void operator=(QualType_hasLocalQualifiers_Test
const &);};::testing::TestInfo* const QualType_hasLocalQualifiers_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"QualType", "hasLocalQualifiers", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< QualType_hasLocalQualifiers_Test>);void
QualType_hasLocalQualifiers_Test::TestBody()
{
1657 EXPECT_TRUE(notMatches("typedef const int const_int; const_int i = 1;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("typedef const int const_int; const_int i = 1;"
, varDecl(hasType(hasLocalQualifiers()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1658, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"typedef const int const_int; const_int i = 1;\", varDecl(hasType(hasLocalQualifiers())))"
, "false", "true").c_str()) = ::testing::Message()
1658 varDecl(hasType(hasLocalQualifiers()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("typedef const int const_int; const_int i = 1;"
, varDecl(hasType(hasLocalQualifiers()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1658, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"typedef const int const_int; const_int i = 1;\", varDecl(hasType(hasLocalQualifiers())))"
, "false", "true").c_str()) = ::testing::Message()
;
1659 EXPECT_TRUE(matches("int *const j = nullptr;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int *const j = nullptr;"
, varDecl(hasType(hasLocalQualifiers()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1660, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int *const j = nullptr;\", varDecl(hasType(hasLocalQualifiers())))"
, "false", "true").c_str()) = ::testing::Message()
1660 varDecl(hasType(hasLocalQualifiers()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int *const j = nullptr;"
, varDecl(hasType(hasLocalQualifiers()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1660, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int *const j = nullptr;\", varDecl(hasType(hasLocalQualifiers())))"
, "false", "true").c_str()) = ::testing::Message()
;
1661 EXPECT_TRUE(matches("int *volatile k;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int *volatile k;"
, varDecl(hasType(hasLocalQualifiers()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1662, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int *volatile k;\", varDecl(hasType(hasLocalQualifiers())))"
, "false", "true").c_str()) = ::testing::Message()
1662 varDecl(hasType(hasLocalQualifiers()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int *volatile k;"
, varDecl(hasType(hasLocalQualifiers()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1662, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int *volatile k;\", varDecl(hasType(hasLocalQualifiers())))"
, "false", "true").c_str()) = ::testing::Message()
;
1663 EXPECT_TRUE(notMatches("int m;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int m;", varDecl
(hasType(hasLocalQualifiers()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1664, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int m;\", varDecl(hasType(hasLocalQualifiers())))"
, "false", "true").c_str()) = ::testing::Message()
1664 varDecl(hasType(hasLocalQualifiers()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int m;", varDecl
(hasType(hasLocalQualifiers()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1664, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int m;\", varDecl(hasType(hasLocalQualifiers())))"
, "false", "true").c_str()) = ::testing::Message()
;
1665}
1666
1667TEST(HasParameter, CallsInnerMatcher)class HasParameter_CallsInnerMatcher_Test : public ::testing::
Test { public: HasParameter_CallsInnerMatcher_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); HasParameter_CallsInnerMatcher_Test
(HasParameter_CallsInnerMatcher_Test const &); void operator
=(HasParameter_CallsInnerMatcher_Test const &);};::testing
::TestInfo* const HasParameter_CallsInnerMatcher_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasParameter"
, "CallsInnerMatcher", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< HasParameter_CallsInnerMatcher_Test>);void HasParameter_CallsInnerMatcher_Test
::TestBody()
{
1668 EXPECT_TRUE(matches("class X { void x(int) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int) {} };"
, cxxMethodDecl(hasParameter(0, varDecl()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1669, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int) {} };\", cxxMethodDecl(hasParameter(0, varDecl())))"
, "false", "true").c_str()) = ::testing::Message()
1669 cxxMethodDecl(hasParameter(0, varDecl()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int) {} };"
, cxxMethodDecl(hasParameter(0, varDecl()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1669, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int) {} };\", cxxMethodDecl(hasParameter(0, varDecl())))"
, "false", "true").c_str()) = ::testing::Message()
;
1670 EXPECT_TRUE(notMatches("class X { void x(int) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { void x(int) {} };"
, cxxMethodDecl(hasParameter(0, hasName("x")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1671, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { void x(int) {} };\", cxxMethodDecl(hasParameter(0, hasName(\"x\"))))"
, "false", "true").c_str()) = ::testing::Message()
1671 cxxMethodDecl(hasParameter(0, hasName("x")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { void x(int) {} };"
, cxxMethodDecl(hasParameter(0, hasName("x")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1671, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { void x(int) {} };\", cxxMethodDecl(hasParameter(0, hasName(\"x\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1672}
1673
1674TEST(HasParameter, DoesNotMatchIfIndexOutOfBounds)class HasParameter_DoesNotMatchIfIndexOutOfBounds_Test : public
::testing::Test { public: HasParameter_DoesNotMatchIfIndexOutOfBounds_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasParameter_DoesNotMatchIfIndexOutOfBounds_Test
(HasParameter_DoesNotMatchIfIndexOutOfBounds_Test const &
); void operator=(HasParameter_DoesNotMatchIfIndexOutOfBounds_Test
const &);};::testing::TestInfo* const HasParameter_DoesNotMatchIfIndexOutOfBounds_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasParameter", "DoesNotMatchIfIndexOutOfBounds", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasParameter_DoesNotMatchIfIndexOutOfBounds_Test
>);void HasParameter_DoesNotMatchIfIndexOutOfBounds_Test::
TestBody()
{
1675 EXPECT_TRUE(notMatches("class X { void x(int) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { void x(int) {} };"
, cxxMethodDecl(hasParameter(42, varDecl()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1676, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { void x(int) {} };\", cxxMethodDecl(hasParameter(42, varDecl())))"
, "false", "true").c_str()) = ::testing::Message()
1676 cxxMethodDecl(hasParameter(42, varDecl()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { void x(int) {} };"
, cxxMethodDecl(hasParameter(42, varDecl()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1676, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { void x(int) {} };\", cxxMethodDecl(hasParameter(42, varDecl())))"
, "false", "true").c_str()) = ::testing::Message()
;
1677}
1678
1679TEST(HasType, MatchesParameterVariableTypesStrictly)class HasType_MatchesParameterVariableTypesStrictly_Test : public
::testing::Test { public: HasType_MatchesParameterVariableTypesStrictly_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasType_MatchesParameterVariableTypesStrictly_Test
(HasType_MatchesParameterVariableTypesStrictly_Test const &
); void operator=(HasType_MatchesParameterVariableTypesStrictly_Test
const &);};::testing::TestInfo* const HasType_MatchesParameterVariableTypesStrictly_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasType", "MatchesParameterVariableTypesStrictly", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasType_MatchesParameterVariableTypesStrictly_Test
>);void HasType_MatchesParameterVariableTypesStrictly_Test
::TestBody()
{
1680 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { void x(X x) {} };"
, cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1682, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { void x(X x) {} };\", cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1681 "class X { void x(X x) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { void x(X x) {} };"
, cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1682, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { void x(X x) {} };\", cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1682 cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { void x(X x) {} };"
, cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1682, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { void x(X x) {} };\", cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1683 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X { void x(const X &x) {} };"
, cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1685, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X { void x(const X &x) {} };\", cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1684 "class X { void x(const X &x) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X { void x(const X &x) {} };"
, cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1685, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X { void x(const X &x) {} };\", cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1685 cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X { void x(const X &x) {} };"
, cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1685, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X { void x(const X &x) {} };\", cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1686 EXPECT_TRUE(matches("class X { void x(const X *x) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(const X *x) {} };"
, cxxMethodDecl(hasParameter( 0, hasType(pointsTo(recordDecl(
hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(const X *x) {} };\", cxxMethodDecl(hasParameter( 0, hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1687 cxxMethodDecl(hasParameter(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(const X *x) {} };"
, cxxMethodDecl(hasParameter( 0, hasType(pointsTo(recordDecl(
hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(const X *x) {} };\", cxxMethodDecl(hasParameter( 0, hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1688 0, hasType(pointsTo(recordDecl(hasName("X"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(const X *x) {} };"
, cxxMethodDecl(hasParameter( 0, hasType(pointsTo(recordDecl(
hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1688, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(const X *x) {} };\", cxxMethodDecl(hasParameter( 0, hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1689 EXPECT_TRUE(matches("class X { void x(const X &x) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(const X &x) {} };"
, cxxMethodDecl(hasParameter( 0, hasType(references(recordDecl
(hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1691, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(const X &x) {} };\", cxxMethodDecl(hasParameter( 0, hasType(references(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1690 cxxMethodDecl(hasParameter(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(const X &x) {} };"
, cxxMethodDecl(hasParameter( 0, hasType(references(recordDecl
(hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1691, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(const X &x) {} };\", cxxMethodDecl(hasParameter( 0, hasType(references(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1691 0, hasType(references(recordDecl(hasName("X"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(const X &x) {} };"
, cxxMethodDecl(hasParameter( 0, hasType(references(recordDecl
(hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1691, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(const X &x) {} };\", cxxMethodDecl(hasParameter( 0, hasType(references(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1692}
1693
1694TEST(HasAnyParameter, MatchesIndependentlyOfPosition)class HasAnyParameter_MatchesIndependentlyOfPosition_Test : public
::testing::Test { public: HasAnyParameter_MatchesIndependentlyOfPosition_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnyParameter_MatchesIndependentlyOfPosition_Test
(HasAnyParameter_MatchesIndependentlyOfPosition_Test const &
); void operator=(HasAnyParameter_MatchesIndependentlyOfPosition_Test
const &);};::testing::TestInfo* const HasAnyParameter_MatchesIndependentlyOfPosition_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnyParameter", "MatchesIndependentlyOfPosition", __null,
__null, (::testing::internal::GetTestTypeId()), ::testing::Test
::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::testing
::internal::TestFactoryImpl< HasAnyParameter_MatchesIndependentlyOfPosition_Test
>);void HasAnyParameter_MatchesIndependentlyOfPosition_Test
::TestBody()
{
1695 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {}; class X { void x(X x, Y y) {} };"
, cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1697, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {}; class X { void x(X x, Y y) {} };\", cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1696 "class Y {}; class X { void x(X x, Y y) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {}; class X { void x(X x, Y y) {} };"
, cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1697, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {}; class X { void x(X x, Y y) {} };\", cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1697 cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {}; class X { void x(X x, Y y) {} };"
, cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1697, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {}; class X { void x(X x, Y y) {} };\", cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1698 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {}; class X { void x(Y y, X x) {} };"
, cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1700, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {}; class X { void x(Y y, X x) {} };\", cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1699 "class Y {}; class X { void x(Y y, X x) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {}; class X { void x(Y y, X x) {} };"
, cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1700, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {}; class X { void x(Y y, X x) {} };\", cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1700 cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class Y {}; class X { void x(Y y, X x) {} };"
, cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1700, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class Y {}; class X { void x(Y y, X x) {} };\", cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1701}
1702
1703TEST(Returns, MatchesReturnTypes)class Returns_MatchesReturnTypes_Test : public ::testing::Test
{ public: Returns_MatchesReturnTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Returns_MatchesReturnTypes_Test(Returns_MatchesReturnTypes_Test
const &); void operator=(Returns_MatchesReturnTypes_Test
const &);};::testing::TestInfo* const Returns_MatchesReturnTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Returns", "MatchesReturnTypes", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Returns_MatchesReturnTypes_Test>);void Returns_MatchesReturnTypes_Test
::TestBody()
{
1704 EXPECT_TRUE(matches("class Y { int f() { return 1; } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { int f() { return 1; } };"
, functionDecl(returns(asString("int")))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1705, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { int f() { return 1; } };\", functionDecl(returns(asString(\"int\"))))"
, "false", "true").c_str()) = ::testing::Message()
1705 functionDecl(returns(asString("int")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { int f() { return 1; } };"
, functionDecl(returns(asString("int")))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1705, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { int f() { return 1; } };\", functionDecl(returns(asString(\"int\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1706 EXPECT_TRUE(notMatches("class Y { int f() { return 1; } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { int f() { return 1; } };"
, functionDecl(returns(asString("float")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1707, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { int f() { return 1; } };\", functionDecl(returns(asString(\"float\"))))"
, "false", "true").c_str()) = ::testing::Message()
1707 functionDecl(returns(asString("float")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { int f() { return 1; } };"
, functionDecl(returns(asString("float")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1707, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { int f() { return 1; } };\", functionDecl(returns(asString(\"float\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1708 EXPECT_TRUE(matches("class Y { Y getMe() { return *this; } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { Y getMe() { return *this; } };"
, functionDecl(returns(hasDeclaration( recordDecl(hasName("Y"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { Y getMe() { return *this; } };\", functionDecl(returns(hasDeclaration( recordDecl(hasName(\"Y\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1709 functionDecl(returns(hasDeclaration(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { Y getMe() { return *this; } };"
, functionDecl(returns(hasDeclaration( recordDecl(hasName("Y"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { Y getMe() { return *this; } };\", functionDecl(returns(hasDeclaration( recordDecl(hasName(\"Y\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1710 recordDecl(hasName("Y")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y { Y getMe() { return *this; } };"
, functionDecl(returns(hasDeclaration( recordDecl(hasName("Y"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y { Y getMe() { return *this; } };\", functionDecl(returns(hasDeclaration( recordDecl(hasName(\"Y\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1711}
1712
1713TEST(IsExternC, MatchesExternCFunctionDeclarations)class IsExternC_MatchesExternCFunctionDeclarations_Test : public
::testing::Test { public: IsExternC_MatchesExternCFunctionDeclarations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsExternC_MatchesExternCFunctionDeclarations_Test
(IsExternC_MatchesExternCFunctionDeclarations_Test const &
); void operator=(IsExternC_MatchesExternCFunctionDeclarations_Test
const &);};::testing::TestInfo* const IsExternC_MatchesExternCFunctionDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsExternC", "MatchesExternCFunctionDeclarations", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsExternC_MatchesExternCFunctionDeclarations_Test
>);void IsExternC_MatchesExternCFunctionDeclarations_Test::
TestBody()
{
1714 EXPECT_TRUE(matches("extern \"C\" void f() {}", functionDecl(isExternC())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("extern \"C\" void f() {}"
, functionDecl(isExternC())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1714, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"extern \\\"C\\\" void f() {}\", functionDecl(isExternC()))"
, "false", "true").c_str()) = ::testing::Message()
;
1715 EXPECT_TRUE(matches("extern \"C\" { void f() {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("extern \"C\" { void f() {} }"
, functionDecl(isExternC())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1716, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"extern \\\"C\\\" { void f() {} }\", functionDecl(isExternC()))"
, "false", "true").c_str()) = ::testing::Message()
1716 functionDecl(isExternC())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("extern \"C\" { void f() {} }"
, functionDecl(isExternC())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1716, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"extern \\\"C\\\" { void f() {} }\", functionDecl(isExternC()))"
, "false", "true").c_str()) = ::testing::Message()
;
1717 EXPECT_TRUE(notMatches("void f() {}", functionDecl(isExternC())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {}"
, functionDecl(isExternC())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1717, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {}\", functionDecl(isExternC()))", "false"
, "true").c_str()) = ::testing::Message()
;
1718}
1719
1720TEST(IsDeleted, MatchesDeletedFunctionDeclarations)class IsDeleted_MatchesDeletedFunctionDeclarations_Test : public
::testing::Test { public: IsDeleted_MatchesDeletedFunctionDeclarations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsDeleted_MatchesDeletedFunctionDeclarations_Test
(IsDeleted_MatchesDeletedFunctionDeclarations_Test const &
); void operator=(IsDeleted_MatchesDeletedFunctionDeclarations_Test
const &);};::testing::TestInfo* const IsDeleted_MatchesDeletedFunctionDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsDeleted", "MatchesDeletedFunctionDeclarations", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsDeleted_MatchesDeletedFunctionDeclarations_Test
>);void IsDeleted_MatchesDeletedFunctionDeclarations_Test::
TestBody()
{
1721 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void Func();"
, functionDecl(hasName("Func"), isDeleted())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1722, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void Func();\", functionDecl(hasName(\"Func\"), isDeleted()))"
, "false", "true").c_str()) = ::testing::Message()
1722 notMatches("void Func();", functionDecl(hasName("Func"), isDeleted())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void Func();"
, functionDecl(hasName("Func"), isDeleted())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1722, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void Func();\", functionDecl(hasName(\"Func\"), isDeleted()))"
, "false", "true").c_str()) = ::testing::Message()
;
1723 EXPECT_TRUE(matches("void Func() = delete;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void Func() = delete;"
, functionDecl(hasName("Func"), isDeleted())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1724, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void Func() = delete;\", functionDecl(hasName(\"Func\"), isDeleted()))"
, "false", "true").c_str()) = ::testing::Message()
1724 functionDecl(hasName("Func"), isDeleted())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void Func() = delete;"
, functionDecl(hasName("Func"), isDeleted())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1724, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void Func() = delete;\", functionDecl(hasName(\"Func\"), isDeleted()))"
, "false", "true").c_str()) = ::testing::Message()
;
1725}
1726
1727TEST(IsNoThrow, MatchesNoThrowFunctionDeclarations)class IsNoThrow_MatchesNoThrowFunctionDeclarations_Test : public
::testing::Test { public: IsNoThrow_MatchesNoThrowFunctionDeclarations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsNoThrow_MatchesNoThrowFunctionDeclarations_Test
(IsNoThrow_MatchesNoThrowFunctionDeclarations_Test const &
); void operator=(IsNoThrow_MatchesNoThrowFunctionDeclarations_Test
const &);};::testing::TestInfo* const IsNoThrow_MatchesNoThrowFunctionDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsNoThrow", "MatchesNoThrowFunctionDeclarations", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsNoThrow_MatchesNoThrowFunctionDeclarations_Test
>);void IsNoThrow_MatchesNoThrowFunctionDeclarations_Test::
TestBody()
{
1728 EXPECT_TRUE(notMatches("void f();", functionDecl(isNoThrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f();"
, functionDecl(isNoThrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1728, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f();\", functionDecl(isNoThrow()))", "false"
, "true").c_str()) = ::testing::Message()
;
1729 EXPECT_TRUE(notMatches("void f() throw(int);", functionDecl(isNoThrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() throw(int);"
, functionDecl(isNoThrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1729, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() throw(int);\", functionDecl(isNoThrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1730 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() noexcept(false);"
, functionDecl(isNoThrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1731, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() noexcept(false);\", functionDecl(isNoThrow()))"
, "false", "true").c_str()) = ::testing::Message()
1731 notMatches("void f() noexcept(false);", functionDecl(isNoThrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() noexcept(false);"
, functionDecl(isNoThrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1731, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() noexcept(false);\", functionDecl(isNoThrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1732 EXPECT_TRUE(matches("void f() throw();", functionDecl(isNoThrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() throw();"
, functionDecl(isNoThrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1732, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() throw();\", functionDecl(isNoThrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1733 EXPECT_TRUE(matches("void f() noexcept;", functionDecl(isNoThrow())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() noexcept;"
, functionDecl(isNoThrow())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1733, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() noexcept;\", functionDecl(isNoThrow()))"
, "false", "true").c_str()) = ::testing::Message()
;
1734}
1735
1736TEST(isConstexpr, MatchesConstexprDeclarations)class isConstexpr_MatchesConstexprDeclarations_Test : public ::
testing::Test { public: isConstexpr_MatchesConstexprDeclarations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); isConstexpr_MatchesConstexprDeclarations_Test
(isConstexpr_MatchesConstexprDeclarations_Test const &); void
operator=(isConstexpr_MatchesConstexprDeclarations_Test const
&);};::testing::TestInfo* const isConstexpr_MatchesConstexprDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"isConstexpr", "MatchesConstexprDeclarations", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< isConstexpr_MatchesConstexprDeclarations_Test
>);void isConstexpr_MatchesConstexprDeclarations_Test::TestBody
()
{
1737 EXPECT_TRUE(matches("constexpr int foo = 42;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("constexpr int foo = 42;"
, varDecl(hasName("foo"), isConstexpr())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1738, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"constexpr int foo = 42;\", varDecl(hasName(\"foo\"), isConstexpr()))"
, "false", "true").c_str()) = ::testing::Message()
1738 varDecl(hasName("foo"), isConstexpr())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("constexpr int foo = 42;"
, varDecl(hasName("foo"), isConstexpr())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1738, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"constexpr int foo = 42;\", varDecl(hasName(\"foo\"), isConstexpr()))"
, "false", "true").c_str()) = ::testing::Message()
;
1739 EXPECT_TRUE(matches("constexpr int bar();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("constexpr int bar();"
, functionDecl(hasName("bar"), isConstexpr())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1740, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"constexpr int bar();\", functionDecl(hasName(\"bar\"), isConstexpr()))"
, "false", "true").c_str()) = ::testing::Message()
1740 functionDecl(hasName("bar"), isConstexpr())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("constexpr int bar();"
, functionDecl(hasName("bar"), isConstexpr())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1740, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"constexpr int bar();\", functionDecl(hasName(\"bar\"), isConstexpr()))"
, "false", "true").c_str()) = ::testing::Message()
;
1741}
1742
1743TEST(HasAnyParameter, DoesntMatchIfInnerMatcherDoesntMatch)class HasAnyParameter_DoesntMatchIfInnerMatcherDoesntMatch_Test
: public ::testing::Test { public: HasAnyParameter_DoesntMatchIfInnerMatcherDoesntMatch_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnyParameter_DoesntMatchIfInnerMatcherDoesntMatch_Test
(HasAnyParameter_DoesntMatchIfInnerMatcherDoesntMatch_Test const
&); void operator=(HasAnyParameter_DoesntMatchIfInnerMatcherDoesntMatch_Test
const &);};::testing::TestInfo* const HasAnyParameter_DoesntMatchIfInnerMatcherDoesntMatch_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnyParameter", "DoesntMatchIfInnerMatcherDoesntMatch", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< HasAnyParameter_DoesntMatchIfInnerMatcherDoesntMatch_Test
>);void HasAnyParameter_DoesntMatchIfInnerMatcherDoesntMatch_Test
::TestBody()
{
1744 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {}; class X { void x(int) {} };"
, cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1746, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {}; class X { void x(int) {} };\", cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1745 "class Y {}; class X { void x(int) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {}; class X { void x(int) {} };"
, cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1746, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {}; class X { void x(int) {} };\", cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1746 cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class Y {}; class X { void x(int) {} };"
, cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1746, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class Y {}; class X { void x(int) {} };\", cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1747}
1748
1749TEST(HasAnyParameter, DoesNotMatchThisPointer)class HasAnyParameter_DoesNotMatchThisPointer_Test : public ::
testing::Test { public: HasAnyParameter_DoesNotMatchThisPointer_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnyParameter_DoesNotMatchThisPointer_Test
(HasAnyParameter_DoesNotMatchThisPointer_Test const &); void
operator=(HasAnyParameter_DoesNotMatchThisPointer_Test const
&);};::testing::TestInfo* const HasAnyParameter_DoesNotMatchThisPointer_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnyParameter", "DoesNotMatchThisPointer", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAnyParameter_DoesNotMatchThisPointer_Test
>);void HasAnyParameter_DoesNotMatchThisPointer_Test::TestBody
()
{
1750 EXPECT_TRUE(notMatches("class Y {}; class X { void x() {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {}; class X { void x() {} };"
, cxxMethodDecl(hasAnyParameter( hasType(pointsTo(recordDecl(
hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1752, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {}; class X { void x() {} };\", cxxMethodDecl(hasAnyParameter( hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1751 cxxMethodDecl(hasAnyParameter(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {}; class X { void x() {} };"
, cxxMethodDecl(hasAnyParameter( hasType(pointsTo(recordDecl(
hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1752, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {}; class X { void x() {} };\", cxxMethodDecl(hasAnyParameter( hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
1752 hasType(pointsTo(recordDecl(hasName("X"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {}; class X { void x() {} };"
, cxxMethodDecl(hasAnyParameter( hasType(pointsTo(recordDecl(
hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1752, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {}; class X { void x() {} };\", cxxMethodDecl(hasAnyParameter( hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1753}
1754
1755TEST(HasName, MatchesParameterVariableDeclarations)class HasName_MatchesParameterVariableDeclarations_Test : public
::testing::Test { public: HasName_MatchesParameterVariableDeclarations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasName_MatchesParameterVariableDeclarations_Test
(HasName_MatchesParameterVariableDeclarations_Test const &
); void operator=(HasName_MatchesParameterVariableDeclarations_Test
const &);};::testing::TestInfo* const HasName_MatchesParameterVariableDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasName", "MatchesParameterVariableDeclarations", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasName_MatchesParameterVariableDeclarations_Test
>);void HasName_MatchesParameterVariableDeclarations_Test::
TestBody()
{
1756 EXPECT_TRUE(matches("class Y {}; class X { void x(int x) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y {}; class X { void x(int x) {} };"
, cxxMethodDecl(hasAnyParameter(hasName("x")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1757, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y {}; class X { void x(int x) {} };\", cxxMethodDecl(hasAnyParameter(hasName(\"x\"))))"
, "false", "true").c_str()) = ::testing::Message()
1757 cxxMethodDecl(hasAnyParameter(hasName("x")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Y {}; class X { void x(int x) {} };"
, cxxMethodDecl(hasAnyParameter(hasName("x")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1757, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Y {}; class X { void x(int x) {} };\", cxxMethodDecl(hasAnyParameter(hasName(\"x\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1758 EXPECT_TRUE(notMatches("class Y {}; class X { void x(int) {} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {}; class X { void x(int) {} };"
, cxxMethodDecl(hasAnyParameter(hasName("x")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1759, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {}; class X { void x(int) {} };\", cxxMethodDecl(hasAnyParameter(hasName(\"x\"))))"
, "false", "true").c_str()) = ::testing::Message()
1759 cxxMethodDecl(hasAnyParameter(hasName("x")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y {}; class X { void x(int) {} };"
, cxxMethodDecl(hasAnyParameter(hasName("x")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1759, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y {}; class X { void x(int) {} };\", cxxMethodDecl(hasAnyParameter(hasName(\"x\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1760}
1761
1762TEST(Matcher, MatchesClassTemplateSpecialization)class Matcher_MatchesClassTemplateSpecialization_Test : public
::testing::Test { public: Matcher_MatchesClassTemplateSpecialization_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_MatchesClassTemplateSpecialization_Test
(Matcher_MatchesClassTemplateSpecialization_Test const &)
; void operator=(Matcher_MatchesClassTemplateSpecialization_Test
const &);};::testing::TestInfo* const Matcher_MatchesClassTemplateSpecialization_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "MatchesClassTemplateSpecialization", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_MatchesClassTemplateSpecialization_Test
>);void Matcher_MatchesClassTemplateSpecialization_Test::TestBody
()
{
1763 EXPECT_TRUE(matches("template<typename T> struct A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct A {};"
"template<> struct A<int> {};", classTemplateSpecializationDecl
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1765, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct A {};\" \"template<> struct A<int> {};\", classTemplateSpecializationDecl())"
, "false", "true").c_str()) = ::testing::Message()
1764 "template<> struct A<int> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct A {};"
"template<> struct A<int> {};", classTemplateSpecializationDecl
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1765, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct A {};\" \"template<> struct A<int> {};\", classTemplateSpecializationDecl())"
, "false", "true").c_str()) = ::testing::Message()
1765 classTemplateSpecializationDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct A {};"
"template<> struct A<int> {};", classTemplateSpecializationDecl
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1765, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct A {};\" \"template<> struct A<int> {};\", classTemplateSpecializationDecl())"
, "false", "true").c_str()) = ::testing::Message()
;
1766 EXPECT_TRUE(matches("template<typename T> struct A {}; A<int> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct A {}; A<int> a;"
, classTemplateSpecializationDecl()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1767, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct A {}; A<int> a;\", classTemplateSpecializationDecl())"
, "false", "true").c_str()) = ::testing::Message()
1767 classTemplateSpecializationDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct A {}; A<int> a;"
, classTemplateSpecializationDecl()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1767, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct A {}; A<int> a;\", classTemplateSpecializationDecl())"
, "false", "true").c_str()) = ::testing::Message()
;
1768 EXPECT_TRUE(notMatches("template<typename T> struct A {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct A {};"
, classTemplateSpecializationDecl()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1769, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct A {};\", classTemplateSpecializationDecl())"
, "false", "true").c_str()) = ::testing::Message()
1769 classTemplateSpecializationDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct A {};"
, classTemplateSpecializationDecl()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1769, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct A {};\", classTemplateSpecializationDecl())"
, "false", "true").c_str()) = ::testing::Message()
;
1770}
1771
1772TEST(DeclaratorDecl, MatchesDeclaratorDecls)class DeclaratorDecl_MatchesDeclaratorDecls_Test : public ::testing
::Test { public: DeclaratorDecl_MatchesDeclaratorDecls_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclaratorDecl_MatchesDeclaratorDecls_Test
(DeclaratorDecl_MatchesDeclaratorDecls_Test const &); void
operator=(DeclaratorDecl_MatchesDeclaratorDecls_Test const &
);};::testing::TestInfo* const DeclaratorDecl_MatchesDeclaratorDecls_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclaratorDecl", "MatchesDeclaratorDecls", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< DeclaratorDecl_MatchesDeclaratorDecls_Test
>);void DeclaratorDecl_MatchesDeclaratorDecls_Test::TestBody
()
{
1773 EXPECT_TRUE(matches("int x;", declaratorDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x;", declaratorDecl
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1773, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x;\", declaratorDecl())", "false", "true").c_str
()) = ::testing::Message()
;
1774 EXPECT_TRUE(notMatches("class A {};", declaratorDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A {};"
, declaratorDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1774, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A {};\", declaratorDecl())", "false", "true"
).c_str()) = ::testing::Message()
;
1775}
1776
1777TEST(ParmVarDecl, MatchesParmVars)class ParmVarDecl_MatchesParmVars_Test : public ::testing::Test
{ public: ParmVarDecl_MatchesParmVars_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ParmVarDecl_MatchesParmVars_Test(ParmVarDecl_MatchesParmVars_Test
const &); void operator=(ParmVarDecl_MatchesParmVars_Test
const &);};::testing::TestInfo* const ParmVarDecl_MatchesParmVars_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ParmVarDecl", "MatchesParmVars", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ParmVarDecl_MatchesParmVars_Test>);void
ParmVarDecl_MatchesParmVars_Test::TestBody()
{
1778 EXPECT_TRUE(matches("void f(int x);", parmVarDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(int x);"
, parmVarDecl()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1778, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(int x);\", parmVarDecl())", "false", "true"
).c_str()) = ::testing::Message()
;
1779 EXPECT_TRUE(notMatches("void f();", parmVarDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f();"
, parmVarDecl()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1779, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f();\", parmVarDecl())", "false", "true"
).c_str()) = ::testing::Message()
;
1780}
1781
1782TEST(Matcher, MatchesTypeTemplateArgument)class Matcher_MatchesTypeTemplateArgument_Test : public ::testing
::Test { public: Matcher_MatchesTypeTemplateArgument_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_MatchesTypeTemplateArgument_Test
(Matcher_MatchesTypeTemplateArgument_Test const &); void operator
=(Matcher_MatchesTypeTemplateArgument_Test const &);};::testing
::TestInfo* const Matcher_MatchesTypeTemplateArgument_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "Matcher"
, "MatchesTypeTemplateArgument", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_MatchesTypeTemplateArgument_Test>);void Matcher_MatchesTypeTemplateArgument_Test
::TestBody()
{
1783 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> struct B {};"
"B<int> b;", classTemplateSpecializationDecl(hasAnyTemplateArgument
(refersToType( asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1787, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> struct B {};\" \"B<int> b;\", classTemplateSpecializationDecl(hasAnyTemplateArgument(refersToType( asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1784 "template<typename T> struct B {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> struct B {};"
"B<int> b;", classTemplateSpecializationDecl(hasAnyTemplateArgument
(refersToType( asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1787, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> struct B {};\" \"B<int> b;\", classTemplateSpecializationDecl(hasAnyTemplateArgument(refersToType( asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1785 "B<int> b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> struct B {};"
"B<int> b;", classTemplateSpecializationDecl(hasAnyTemplateArgument
(refersToType( asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1787, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> struct B {};\" \"B<int> b;\", classTemplateSpecializationDecl(hasAnyTemplateArgument(refersToType( asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1786 classTemplateSpecializationDecl(hasAnyTemplateArgument(refersToType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> struct B {};"
"B<int> b;", classTemplateSpecializationDecl(hasAnyTemplateArgument
(refersToType( asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1787, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> struct B {};\" \"B<int> b;\", classTemplateSpecializationDecl(hasAnyTemplateArgument(refersToType( asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1787 asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> struct B {};"
"B<int> b;", classTemplateSpecializationDecl(hasAnyTemplateArgument
(refersToType( asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1787, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> struct B {};\" \"B<int> b;\", classTemplateSpecializationDecl(hasAnyTemplateArgument(refersToType( asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1788}
1789
1790TEST(Matcher, MatchesDeclarationReferenceTemplateArgument)class Matcher_MatchesDeclarationReferenceTemplateArgument_Test
: public ::testing::Test { public: Matcher_MatchesDeclarationReferenceTemplateArgument_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_MatchesDeclarationReferenceTemplateArgument_Test
(Matcher_MatchesDeclarationReferenceTemplateArgument_Test const
&); void operator=(Matcher_MatchesDeclarationReferenceTemplateArgument_Test
const &);};::testing::TestInfo* const Matcher_MatchesDeclarationReferenceTemplateArgument_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "MatchesDeclarationReferenceTemplateArgument", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< Matcher_MatchesDeclarationReferenceTemplateArgument_Test
>);void Matcher_MatchesDeclarationReferenceTemplateArgument_Test
::TestBody()
{
1791 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration
(fieldDecl(hasName("next")))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1796, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(fieldDecl(hasName(\"next\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1792 "struct B { int next; };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration
(fieldDecl(hasName("next")))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1796, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(fieldDecl(hasName(\"next\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1793 "template<int(B::*next_ptr)> struct A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration
(fieldDecl(hasName("next")))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1796, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(fieldDecl(hasName(\"next\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1794 "A<&B::next> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration
(fieldDecl(hasName("next")))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1796, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(fieldDecl(hasName(\"next\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1795 classTemplateSpecializationDecl(hasAnyTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration
(fieldDecl(hasName("next")))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1796, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(fieldDecl(hasName(\"next\"))))))"
, "false", "true").c_str()) = ::testing::Message()
1796 refersToDeclaration(fieldDecl(hasName("next")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration
(fieldDecl(hasName("next")))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1796, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(fieldDecl(hasName(\"next\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1797
1798 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", classTemplateSpecializationDecl(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1802, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
1799 "template <typename T> struct A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", classTemplateSpecializationDecl(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1802, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
1800 "A<int> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", classTemplateSpecializationDecl(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1802, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
1801 classTemplateSpecializationDecl(hasAnyTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", classTemplateSpecializationDecl(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1802, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
1802 refersToDeclaration(decl())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", classTemplateSpecializationDecl(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1802, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
;
1803
1804 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant
(declRefExpr(to(fieldDecl(hasName("next"))))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1809, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant(declRefExpr(to(fieldDecl(hasName(\"next\")))))))))"
, "false", "true").c_str()) = ::testing::Message()
1805 "struct B { int next; };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant
(declRefExpr(to(fieldDecl(hasName("next"))))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1809, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant(declRefExpr(to(fieldDecl(hasName(\"next\")))))))))"
, "false", "true").c_str()) = ::testing::Message()
1806 "template<int(B::*next_ptr)> struct A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant
(declRefExpr(to(fieldDecl(hasName("next"))))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1809, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant(declRefExpr(to(fieldDecl(hasName(\"next\")))))))))"
, "false", "true").c_str()) = ::testing::Message()
1807 "A<&B::next> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant
(declRefExpr(to(fieldDecl(hasName("next"))))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1809, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant(declRefExpr(to(fieldDecl(hasName(\"next\")))))))))"
, "false", "true").c_str()) = ::testing::Message()
1808 templateSpecializationType(hasAnyTemplateArgument(isExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant
(declRefExpr(to(fieldDecl(hasName("next"))))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1809, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant(declRefExpr(to(fieldDecl(hasName(\"next\")))))))))"
, "false", "true").c_str()) = ::testing::Message()
1809 hasDescendant(declRefExpr(to(fieldDecl(hasName("next"))))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct B { int next; };"
"template<int(B::*next_ptr)> struct A {};" "A<&B::next> a;"
, templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant
(declRefExpr(to(fieldDecl(hasName("next"))))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1809, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct B { int next; };\" \"template<int(B::*next_ptr)> struct A {};\" \"A<&B::next> a;\", templateSpecializationType(hasAnyTemplateArgument(isExpr( hasDescendant(declRefExpr(to(fieldDecl(hasName(\"next\")))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
1810
1811 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", templateSpecializationType(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1815, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", templateSpecializationType(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
1812 "template <typename T> struct A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", templateSpecializationType(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1815, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", templateSpecializationType(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
1813 "A<int> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", templateSpecializationType(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1815, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", templateSpecializationType(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
1814 templateSpecializationType(hasAnyTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", templateSpecializationType(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1815, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", templateSpecializationType(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
1815 refersToDeclaration(decl())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> struct A {};"
"A<int> a;", templateSpecializationType(hasAnyTemplateArgument
( refersToDeclaration(decl())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1815, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> struct A {};\" \"A<int> a;\", templateSpecializationType(hasAnyTemplateArgument( refersToDeclaration(decl()))))"
, "false", "true").c_str()) = ::testing::Message()
;
1816}
1817
1818TEST(Matcher, MatchesSpecificArgument)class Matcher_MatchesSpecificArgument_Test : public ::testing
::Test { public: Matcher_MatchesSpecificArgument_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_MatchesSpecificArgument_Test
(Matcher_MatchesSpecificArgument_Test const &); void operator
=(Matcher_MatchesSpecificArgument_Test const &);};::testing
::TestInfo* const Matcher_MatchesSpecificArgument_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "MatchesSpecificArgument"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_MatchesSpecificArgument_Test
>);void Matcher_MatchesSpecificArgument_Test::TestBody()
{
1819 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1820 "template<typename T, typename U> class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1821 "A<bool, int> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1822 classTemplateSpecializationDecl(hasTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1823 1, refersToType(asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1824 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1825 "template<typename T, typename U> class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1826 "A<int, bool> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1827 classTemplateSpecializationDecl(hasTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1828 1, refersToType(asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", classTemplateSpecializationDecl(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", classTemplateSpecializationDecl(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1829
1830 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1834, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1831 "template<typename T, typename U> class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1834, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1832 "A<bool, int> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1834, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1833 templateSpecializationType(hasTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1834, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1834 1, refersToType(asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T, typename U> class A {};"
"A<bool, int> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1834, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T, typename U> class A {};\" \"A<bool, int> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1835 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1839, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1836 "template<typename T, typename U> class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1839, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1837 "A<int, bool> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1839, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1838 templateSpecializationType(hasTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1839, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1839 1, refersToType(asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template<typename T, typename U> class A {};"
"A<int, bool> a;", templateSpecializationType(hasTemplateArgument
( 1, refersToType(asString("int"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1839, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template<typename T, typename U> class A {};\" \"A<int, bool> a;\", templateSpecializationType(hasTemplateArgument( 1, refersToType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1840}
1841
1842TEST(TemplateArgument, Matches)class TemplateArgument_Matches_Test : public ::testing::Test {
public: TemplateArgument_Matches_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); TemplateArgument_Matches_Test(TemplateArgument_Matches_Test
const &); void operator=(TemplateArgument_Matches_Test const
&);};::testing::TestInfo* const TemplateArgument_Matches_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TemplateArgument", "Matches", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TemplateArgument_Matches_Test>);void TemplateArgument_Matches_Test
::TestBody()
{
1843 EXPECT_TRUE(matches("template<typename T> struct C {}; C<int> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(templateArgument
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1845, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(templateArgument())))"
, "false", "true").c_str()) = ::testing::Message()
1844 classTemplateSpecializationDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(templateArgument
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1845, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(templateArgument())))"
, "false", "true").c_str()) = ::testing::Message()
1845 hasAnyTemplateArgument(templateArgument()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(templateArgument
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1845, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(templateArgument())))"
, "false", "true").c_str()) = ::testing::Message()
;
1846 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> struct C {}; C<int> c;"
, templateSpecializationType(hasAnyTemplateArgument(templateArgument
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1848, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> struct C {}; C<int> c;\", templateSpecializationType(hasAnyTemplateArgument(templateArgument())))"
, "false", "true").c_str()) = ::testing::Message()
1847 "template<typename T> struct C {}; C<int> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> struct C {}; C<int> c;"
, templateSpecializationType(hasAnyTemplateArgument(templateArgument
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1848, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> struct C {}; C<int> c;\", templateSpecializationType(hasAnyTemplateArgument(templateArgument())))"
, "false", "true").c_str()) = ::testing::Message()
1848 templateSpecializationType(hasAnyTemplateArgument(templateArgument()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template<typename T> struct C {}; C<int> c;"
, templateSpecializationType(hasAnyTemplateArgument(templateArgument
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1848, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template<typename T> struct C {}; C<int> c;\", templateSpecializationType(hasAnyTemplateArgument(templateArgument())))"
, "false", "true").c_str()) = ::testing::Message()
;
1849}
1850
1851TEST(TemplateArgumentCountIs, Matches)class TemplateArgumentCountIs_Matches_Test : public ::testing
::Test { public: TemplateArgumentCountIs_Matches_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TemplateArgumentCountIs_Matches_Test
(TemplateArgumentCountIs_Matches_Test const &); void operator
=(TemplateArgumentCountIs_Matches_Test const &);};::testing
::TestInfo* const TemplateArgumentCountIs_Matches_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TemplateArgumentCountIs"
, "Matches", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< TemplateArgumentCountIs_Matches_Test
>);void TemplateArgumentCountIs_Matches_Test::TestBody()
{
1852 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl(templateArgumentCountIs(1))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1854, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl(templateArgumentCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
1853 matches("template<typename T> struct C {}; C<int> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl(templateArgumentCountIs(1))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1854, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl(templateArgumentCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
1854 classTemplateSpecializationDecl(templateArgumentCountIs(1))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl(templateArgumentCountIs(1))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1854, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl(templateArgumentCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
;
1855 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl(templateArgumentCountIs(2))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1857, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl(templateArgumentCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
1856 notMatches("template<typename T> struct C {}; C<int> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl(templateArgumentCountIs(2))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1857, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl(templateArgumentCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
1857 classTemplateSpecializationDecl(templateArgumentCountIs(2))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl(templateArgumentCountIs(2))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1857, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl(templateArgumentCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
;
1858
1859 EXPECT_TRUE(matches("template<typename T> struct C {}; C<int> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct C {}; C<int> c;"
, templateSpecializationType(templateArgumentCountIs(1))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1860, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct C {}; C<int> c;\", templateSpecializationType(templateArgumentCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
1860 templateSpecializationType(templateArgumentCountIs(1))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct C {}; C<int> c;"
, templateSpecializationType(templateArgumentCountIs(1))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1860, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct C {}; C<int> c;\", templateSpecializationType(templateArgumentCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
;
1861 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct C {}; C<int> c;"
, templateSpecializationType(templateArgumentCountIs(2))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1863, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct C {}; C<int> c;\", templateSpecializationType(templateArgumentCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
1862 notMatches("template<typename T> struct C {}; C<int> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct C {}; C<int> c;"
, templateSpecializationType(templateArgumentCountIs(2))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1863, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct C {}; C<int> c;\", templateSpecializationType(templateArgumentCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
1863 templateSpecializationType(templateArgumentCountIs(2))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct C {}; C<int> c;"
, templateSpecializationType(templateArgumentCountIs(2))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1863, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct C {}; C<int> c;\", templateSpecializationType(templateArgumentCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
;
1864}
1865
1866TEST(IsIntegral, Matches)class IsIntegral_Matches_Test : public ::testing::Test { public
: IsIntegral_Matches_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); IsIntegral_Matches_Test(IsIntegral_Matches_Test const
&); void operator=(IsIntegral_Matches_Test const &);
};::testing::TestInfo* const IsIntegral_Matches_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "IsIntegral"
, "Matches", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< IsIntegral_Matches_Test
>);void IsIntegral_Matches_Test::TestBody()
{
1867 EXPECT_TRUE(matches("template<int T> struct C {}; C<42> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(isIntegral
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1869, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(isIntegral())))"
, "false", "true").c_str()) = ::testing::Message()
1868 classTemplateSpecializationDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(isIntegral
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1869, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(isIntegral())))"
, "false", "true").c_str()) = ::testing::Message()
1869 hasAnyTemplateArgument(isIntegral()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(isIntegral
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1869, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(isIntegral())))"
, "false", "true").c_str()) = ::testing::Message()
;
1870 EXPECT_TRUE(notMatches("template<typename T> struct C {}; C<int> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( templateArgument
(isIntegral())))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1872, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( templateArgument(isIntegral()))))"
, "false", "true").c_str()) = ::testing::Message()
1871 classTemplateSpecializationDecl(hasAnyTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( templateArgument
(isIntegral())))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1872, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( templateArgument(isIntegral()))))"
, "false", "true").c_str()) = ::testing::Message()
1872 templateArgument(isIntegral())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct C {}; C<int> c;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( templateArgument
(isIntegral())))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1872, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct C {}; C<int> c;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( templateArgument(isIntegral()))))"
, "false", "true").c_str()) = ::testing::Message()
;
1873}
1874
1875TEST(RefersToIntegralType, Matches)class RefersToIntegralType_Matches_Test : public ::testing::Test
{ public: RefersToIntegralType_Matches_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); RefersToIntegralType_Matches_Test(
RefersToIntegralType_Matches_Test const &); void operator
=(RefersToIntegralType_Matches_Test const &);};::testing::
TestInfo* const RefersToIntegralType_Matches_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "RefersToIntegralType"
, "Matches", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< RefersToIntegralType_Matches_Test
>);void RefersToIntegralType_Matches_Test::TestBody()
{
1876 EXPECT_TRUE(matches("template<int T> struct C {}; C<42> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(refersToIntegralType
( asString("int"))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1879, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(refersToIntegralType( asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1877 classTemplateSpecializationDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(refersToIntegralType
( asString("int"))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1879, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(refersToIntegralType( asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1878 hasAnyTemplateArgument(refersToIntegralType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(refersToIntegralType
( asString("int"))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1879, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(refersToIntegralType( asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1879 asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(refersToIntegralType
( asString("int"))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1879, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(refersToIntegralType( asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1880 EXPECT_TRUE(notMatches("template<unsigned T> struct C {}; C<42> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<unsigned T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToIntegralType
(asString("int"))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1882, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<unsigned T> struct C {}; C<42> c;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToIntegralType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1881 classTemplateSpecializationDecl(hasAnyTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<unsigned T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToIntegralType
(asString("int"))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1882, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<unsigned T> struct C {}; C<42> c;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToIntegralType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
1882 refersToIntegralType(asString("int"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<unsigned T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToIntegralType
(asString("int"))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1882, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<unsigned T> struct C {}; C<42> c;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( refersToIntegralType(asString(\"int\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
1883}
1884
1885TEST(EqualsIntegralValue, Matches)class EqualsIntegralValue_Matches_Test : public ::testing::Test
{ public: EqualsIntegralValue_Matches_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); EqualsIntegralValue_Matches_Test(EqualsIntegralValue_Matches_Test
const &); void operator=(EqualsIntegralValue_Matches_Test
const &);};::testing::TestInfo* const EqualsIntegralValue_Matches_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EqualsIntegralValue", "Matches", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< EqualsIntegralValue_Matches_Test>);void
EqualsIntegralValue_Matches_Test::TestBody()
{
1886 EXPECT_TRUE(matches("template<int T> struct C {}; C<42> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue
("42")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1888, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue(\"42\"))))"
, "false", "true").c_str()) = ::testing::Message()
1887 classTemplateSpecializationDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue
("42")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1888, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue(\"42\"))))"
, "false", "true").c_str()) = ::testing::Message()
1888 hasAnyTemplateArgument(equalsIntegralValue("42")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue
("42")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1888, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue(\"42\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1889 EXPECT_TRUE(matches("template<int T> struct C {}; C<-42> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<-42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue
("-42")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1891, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<-42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue(\"-42\"))))"
, "false", "true").c_str()) = ::testing::Message()
1890 classTemplateSpecializationDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<-42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue
("-42")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1891, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<-42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue(\"-42\"))))"
, "false", "true").c_str()) = ::testing::Message()
1891 hasAnyTemplateArgument(equalsIntegralValue("-42")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<-42> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue
("-42")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1891, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<-42> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue(\"-42\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1892 EXPECT_TRUE(matches("template<int T> struct C {}; C<-0042> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<-0042> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue
("-34")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1894, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<-0042> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue(\"-34\"))))"
, "false", "true").c_str()) = ::testing::Message()
1893 classTemplateSpecializationDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<-0042> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue
("-34")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1894, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<-0042> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue(\"-34\"))))"
, "false", "true").c_str()) = ::testing::Message()
1894 hasAnyTemplateArgument(equalsIntegralValue("-34")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<int T> struct C {}; C<-0042> c;"
, classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue
("-34")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1894, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<int T> struct C {}; C<-0042> c;\", classTemplateSpecializationDecl( hasAnyTemplateArgument(equalsIntegralValue(\"-34\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1895 EXPECT_TRUE(notMatches("template<int T> struct C {}; C<42> c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( equalsIntegralValue
("0042")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1897, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( equalsIntegralValue(\"0042\"))))"
, "false", "true").c_str()) = ::testing::Message()
1896 classTemplateSpecializationDecl(hasAnyTemplateArgument(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( equalsIntegralValue
("0042")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1897, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( equalsIntegralValue(\"0042\"))))"
, "false", "true").c_str()) = ::testing::Message()
1897 equalsIntegralValue("0042")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<int T> struct C {}; C<42> c;"
, classTemplateSpecializationDecl(hasAnyTemplateArgument( equalsIntegralValue
("0042")))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1897, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<int T> struct C {}; C<42> c;\", classTemplateSpecializationDecl(hasAnyTemplateArgument( equalsIntegralValue(\"0042\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
1898}
1899
1900TEST(Matcher, MatchesAccessSpecDecls)class Matcher_MatchesAccessSpecDecls_Test : public ::testing::
Test { public: Matcher_MatchesAccessSpecDecls_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_MatchesAccessSpecDecls_Test
(Matcher_MatchesAccessSpecDecls_Test const &); void operator
=(Matcher_MatchesAccessSpecDecls_Test const &);};::testing
::TestInfo* const Matcher_MatchesAccessSpecDecls_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "MatchesAccessSpecDecls"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_MatchesAccessSpecDecls_Test
>);void Matcher_MatchesAccessSpecDecls_Test::TestBody()
{
1901 EXPECT_TRUE(matches("class C { public: int i; };", accessSpecDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class C { public: int i; };"
, accessSpecDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1901, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class C { public: int i; };\", accessSpecDecl())"
, "false", "true").c_str()) = ::testing::Message()
;
1902 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class C { public: int i; };"
, accessSpecDecl(isPublic())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1903, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class C { public: int i; };\", accessSpecDecl(isPublic()))"
, "false", "true").c_str()) = ::testing::Message()
1903 matches("class C { public: int i; };", accessSpecDecl(isPublic())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class C { public: int i; };"
, accessSpecDecl(isPublic())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1903, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class C { public: int i; };\", accessSpecDecl(isPublic()))"
, "false", "true").c_str()) = ::testing::Message()
;
1904 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class C { public: int i; };"
, accessSpecDecl(isProtected())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1905, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class C { public: int i; };\", accessSpecDecl(isProtected()))"
, "false", "true").c_str()) = ::testing::Message()
1905 notMatches("class C { public: int i; };", accessSpecDecl(isProtected())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class C { public: int i; };"
, accessSpecDecl(isProtected())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1905, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class C { public: int i; };\", accessSpecDecl(isProtected()))"
, "false", "true").c_str()) = ::testing::Message()
;
1906 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class C { public: int i; };"
, accessSpecDecl(isPrivate())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1907, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class C { public: int i; };\", accessSpecDecl(isPrivate()))"
, "false", "true").c_str()) = ::testing::Message()
1907 notMatches("class C { public: int i; };", accessSpecDecl(isPrivate())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class C { public: int i; };"
, accessSpecDecl(isPrivate())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1907, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class C { public: int i; };\", accessSpecDecl(isPrivate()))"
, "false", "true").c_str()) = ::testing::Message()
;
1908
1909 EXPECT_TRUE(notMatches("class C { int i; };", accessSpecDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class C { int i; };"
, accessSpecDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1909, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class C { int i; };\", accessSpecDecl())", "false"
, "true").c_str()) = ::testing::Message()
;
1910}
1911
1912TEST(Matcher, MatchesFinal)class Matcher_MatchesFinal_Test : public ::testing::Test { public
: Matcher_MatchesFinal_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_MatchesFinal_Test(Matcher_MatchesFinal_Test
const &); void operator=(Matcher_MatchesFinal_Test const
&);};::testing::TestInfo* const Matcher_MatchesFinal_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "MatchesFinal", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_MatchesFinal_Test>);void Matcher_MatchesFinal_Test
::TestBody()
{
1913 EXPECT_TRUE(matches("class X final {};", cxxRecordDecl(isFinal())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X final {};"
, cxxRecordDecl(isFinal())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X final {};\", cxxRecordDecl(isFinal()))",
"false", "true").c_str()) = ::testing::Message()
;
1914 EXPECT_TRUE(matches("class X { virtual void f() final; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { virtual void f() final; };"
, cxxMethodDecl(isFinal())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1915, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { virtual void f() final; };\", cxxMethodDecl(isFinal()))"
, "false", "true").c_str()) = ::testing::Message()
1915 cxxMethodDecl(isFinal())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { virtual void f() final; };"
, cxxMethodDecl(isFinal())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1915, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { virtual void f() final; };\", cxxMethodDecl(isFinal()))"
, "false", "true").c_str()) = ::testing::Message()
;
1916 EXPECT_TRUE(notMatches("class X {};", cxxRecordDecl(isFinal())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {};"
, cxxRecordDecl(isFinal())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1916, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", cxxRecordDecl(isFinal()))", "false"
, "true").c_str()) = ::testing::Message()
;
1917 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { virtual void f(); };"
, cxxMethodDecl(isFinal())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1918, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { virtual void f(); };\", cxxMethodDecl(isFinal()))"
, "false", "true").c_str()) = ::testing::Message()
1918 notMatches("class X { virtual void f(); };", cxxMethodDecl(isFinal())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { virtual void f(); };"
, cxxMethodDecl(isFinal())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1918, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { virtual void f(); };\", cxxMethodDecl(isFinal()))"
, "false", "true").c_str()) = ::testing::Message()
;
1919}
1920
1921TEST(Matcher, MatchesVirtualMethod)class Matcher_MatchesVirtualMethod_Test : public ::testing::Test
{ public: Matcher_MatchesVirtualMethod_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_MatchesVirtualMethod_Test(
Matcher_MatchesVirtualMethod_Test const &); void operator
=(Matcher_MatchesVirtualMethod_Test const &);};::testing::
TestInfo* const Matcher_MatchesVirtualMethod_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "MatchesVirtualMethod"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_MatchesVirtualMethod_Test
>);void Matcher_MatchesVirtualMethod_Test::TestBody()
{
1922 EXPECT_TRUE(matches("class X { virtual int f(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { virtual int f(); };"
, cxxMethodDecl(isVirtual(), hasName("::X::f"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1923, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { virtual int f(); };\", cxxMethodDecl(isVirtual(), hasName(\"::X::f\")))"
, "false", "true").c_str()) = ::testing::Message()
1923 cxxMethodDecl(isVirtual(), hasName("::X::f"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { virtual int f(); };"
, cxxMethodDecl(isVirtual(), hasName("::X::f"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1923, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { virtual int f(); };\", cxxMethodDecl(isVirtual(), hasName(\"::X::f\")))"
, "false", "true").c_str()) = ::testing::Message()
;
1924 EXPECT_TRUE(notMatches("class X { int f(); };", cxxMethodDecl(isVirtual())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { int f(); };"
, cxxMethodDecl(isVirtual())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1924, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { int f(); };\", cxxMethodDecl(isVirtual()))"
, "false", "true").c_str()) = ::testing::Message()
;
1925}
1926
1927TEST(Matcher, MatchesPureMethod)class Matcher_MatchesPureMethod_Test : public ::testing::Test
{ public: Matcher_MatchesPureMethod_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_MatchesPureMethod_Test(Matcher_MatchesPureMethod_Test
const &); void operator=(Matcher_MatchesPureMethod_Test const
&);};::testing::TestInfo* const Matcher_MatchesPureMethod_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "MatchesPureMethod", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_MatchesPureMethod_Test>);void Matcher_MatchesPureMethod_Test
::TestBody()
{
1928 EXPECT_TRUE(matches("class X { virtual int f() = 0; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { virtual int f() = 0; };"
, cxxMethodDecl(isPure(), hasName("::X::f"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1929, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { virtual int f() = 0; };\", cxxMethodDecl(isPure(), hasName(\"::X::f\")))"
, "false", "true").c_str()) = ::testing::Message()
1929 cxxMethodDecl(isPure(), hasName("::X::f"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { virtual int f() = 0; };"
, cxxMethodDecl(isPure(), hasName("::X::f"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1929, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { virtual int f() = 0; };\", cxxMethodDecl(isPure(), hasName(\"::X::f\")))"
, "false", "true").c_str()) = ::testing::Message()
;
1930 EXPECT_TRUE(notMatches("class X { int f(); };", cxxMethodDecl(isPure())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { int f(); };"
, cxxMethodDecl(isPure())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1930, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { int f(); };\", cxxMethodDecl(isPure()))"
, "false", "true").c_str()) = ::testing::Message()
;
1931}
1932
1933TEST(Matcher, MatchesCopyAssignmentOperator)class Matcher_MatchesCopyAssignmentOperator_Test : public ::testing
::Test { public: Matcher_MatchesCopyAssignmentOperator_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_MatchesCopyAssignmentOperator_Test
(Matcher_MatchesCopyAssignmentOperator_Test const &); void
operator=(Matcher_MatchesCopyAssignmentOperator_Test const &
);};::testing::TestInfo* const Matcher_MatchesCopyAssignmentOperator_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "MatchesCopyAssignmentOperator", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_MatchesCopyAssignmentOperator_Test
>);void Matcher_MatchesCopyAssignmentOperator_Test::TestBody
()
{
1934 EXPECT_TRUE(matches("class X { X &operator=(X); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(X); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1935, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(X); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
1935 cxxMethodDecl(isCopyAssignmentOperator())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(X); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1935, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(X); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
;
1936 EXPECT_TRUE(matches("class X { X &operator=(X &); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(X &); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1937, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(X &); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
1937 cxxMethodDecl(isCopyAssignmentOperator())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(X &); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1937, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(X &); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
;
1938 EXPECT_TRUE(matches("class X { X &operator=(const X &); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(const X &); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1939, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(const X &); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
1939 cxxMethodDecl(isCopyAssignmentOperator())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(const X &); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1939, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(const X &); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
;
1940 EXPECT_TRUE(matches("class X { X &operator=(volatile X &); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(volatile X &); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1941, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(volatile X &); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
1941 cxxMethodDecl(isCopyAssignmentOperator())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(volatile X &); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1941, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(volatile X &); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
;
1942 EXPECT_TRUE(matches("class X { X &operator=(const volatile X &); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(const volatile X &); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(const volatile X &); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
1943 cxxMethodDecl(isCopyAssignmentOperator())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { X &operator=(const volatile X &); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { X &operator=(const volatile X &); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
;
1944 EXPECT_TRUE(notMatches("class X { X &operator=(X &&); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { X &operator=(X &&); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1945, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { X &operator=(X &&); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
1945 cxxMethodDecl(isCopyAssignmentOperator())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { X &operator=(X &&); };"
, cxxMethodDecl(isCopyAssignmentOperator())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1945, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { X &operator=(X &&); };\", cxxMethodDecl(isCopyAssignmentOperator()))"
, "false", "true").c_str()) = ::testing::Message()
;
1946}
1947
1948TEST(Matcher, MatchesConstMethod)class Matcher_MatchesConstMethod_Test : public ::testing::Test
{ public: Matcher_MatchesConstMethod_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_MatchesConstMethod_Test(Matcher_MatchesConstMethod_Test
const &); void operator=(Matcher_MatchesConstMethod_Test
const &);};::testing::TestInfo* const Matcher_MatchesConstMethod_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "MatchesConstMethod", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_MatchesConstMethod_Test>);void Matcher_MatchesConstMethod_Test
::TestBody()
{
1949 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void foo() const; };"
, cxxMethodDecl(isConst())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1950, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void foo() const; };\", cxxMethodDecl(isConst()))"
, "false", "true").c_str()) = ::testing::Message()
1950 matches("struct A { void foo() const; };", cxxMethodDecl(isConst())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void foo() const; };"
, cxxMethodDecl(isConst())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1950, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void foo() const; };\", cxxMethodDecl(isConst()))"
, "false", "true").c_str()) = ::testing::Message()
;
1951 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct A { void foo(); };"
, cxxMethodDecl(isConst())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1952, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct A { void foo(); };\", cxxMethodDecl(isConst()))"
, "false", "true").c_str()) = ::testing::Message()
1952 notMatches("struct A { void foo(); };", cxxMethodDecl(isConst())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct A { void foo(); };"
, cxxMethodDecl(isConst())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1952, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct A { void foo(); };\", cxxMethodDecl(isConst()))"
, "false", "true").c_str()) = ::testing::Message()
;
1953}
1954
1955TEST(Matcher, MatchesOverridingMethod)class Matcher_MatchesOverridingMethod_Test : public ::testing
::Test { public: Matcher_MatchesOverridingMethod_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_MatchesOverridingMethod_Test
(Matcher_MatchesOverridingMethod_Test const &); void operator
=(Matcher_MatchesOverridingMethod_Test const &);};::testing
::TestInfo* const Matcher_MatchesOverridingMethod_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "MatchesOverridingMethod"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_MatchesOverridingMethod_Test
>);void Matcher_MatchesOverridingMethod_Test::TestBody()
{
1956 EXPECT_TRUE(matches("class X { virtual int f(); }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { virtual int f(); }; "
"class Y : public X { int f(); };", cxxMethodDecl(isOverride
(), hasName("::Y::f"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { virtual int f(); }; \" \"class Y : public X { int f(); };\", cxxMethodDecl(isOverride(), hasName(\"::Y::f\")))"
, "false", "true").c_str()) = ::testing::Message()
1957 "class Y : public X { int f(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { virtual int f(); }; "
"class Y : public X { int f(); };", cxxMethodDecl(isOverride
(), hasName("::Y::f"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { virtual int f(); }; \" \"class Y : public X { int f(); };\", cxxMethodDecl(isOverride(), hasName(\"::Y::f\")))"
, "false", "true").c_str()) = ::testing::Message()
1958 cxxMethodDecl(isOverride(), hasName("::Y::f"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { virtual int f(); }; "
"class Y : public X { int f(); };", cxxMethodDecl(isOverride
(), hasName("::Y::f"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { virtual int f(); }; \" \"class Y : public X { int f(); };\", cxxMethodDecl(isOverride(), hasName(\"::Y::f\")))"
, "false", "true").c_str()) = ::testing::Message()
;
1959 EXPECT_TRUE(notMatches("class X { virtual int f(); }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { virtual int f(); }; "
"class Y : public X { int f(); };", cxxMethodDecl(isOverride
(), hasName("::X::f"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1961, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { virtual int f(); }; \" \"class Y : public X { int f(); };\", cxxMethodDecl(isOverride(), hasName(\"::X::f\")))"
, "false", "true").c_str()) = ::testing::Message()
1960 "class Y : public X { int f(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { virtual int f(); }; "
"class Y : public X { int f(); };", cxxMethodDecl(isOverride
(), hasName("::X::f"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1961, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { virtual int f(); }; \" \"class Y : public X { int f(); };\", cxxMethodDecl(isOverride(), hasName(\"::X::f\")))"
, "false", "true").c_str()) = ::testing::Message()
1961 cxxMethodDecl(isOverride(), hasName("::X::f"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { virtual int f(); }; "
"class Y : public X { int f(); };", cxxMethodDecl(isOverride
(), hasName("::X::f"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1961, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { virtual int f(); }; \" \"class Y : public X { int f(); };\", cxxMethodDecl(isOverride(), hasName(\"::X::f\")))"
, "false", "true").c_str()) = ::testing::Message()
;
1962 EXPECT_TRUE(notMatches("class X { int f(); }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { int f(); }; "
"class Y : public X { int f(); };", cxxMethodDecl(isOverride
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1964, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { int f(); }; \" \"class Y : public X { int f(); };\", cxxMethodDecl(isOverride()))"
, "false", "true").c_str()) = ::testing::Message()
1963 "class Y : public X { int f(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { int f(); }; "
"class Y : public X { int f(); };", cxxMethodDecl(isOverride
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1964, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { int f(); }; \" \"class Y : public X { int f(); };\", cxxMethodDecl(isOverride()))"
, "false", "true").c_str()) = ::testing::Message()
1964 cxxMethodDecl(isOverride())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { int f(); }; "
"class Y : public X { int f(); };", cxxMethodDecl(isOverride
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1964, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { int f(); }; \" \"class Y : public X { int f(); };\", cxxMethodDecl(isOverride()))"
, "false", "true").c_str()) = ::testing::Message()
;
1965 EXPECT_TRUE(notMatches("class X { int f(); int f(int); }; ",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { int f(); int f(int); }; "
, cxxMethodDecl(isOverride())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1966, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { int f(); int f(int); }; \", cxxMethodDecl(isOverride()))"
, "false", "true").c_str()) = ::testing::Message()
1966 cxxMethodDecl(isOverride())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { int f(); int f(int); }; "
, cxxMethodDecl(isOverride())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1966, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { int f(); int f(int); }; \", cxxMethodDecl(isOverride()))"
, "false", "true").c_str()) = ::testing::Message()
;
1967 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename Base> struct Y : Base { void f() override;};"
, cxxMethodDecl(isOverride(), hasName("::Y::f"))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1969, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename Base> struct Y : Base { void f() override;};\", cxxMethodDecl(isOverride(), hasName(\"::Y::f\")))"
, "false", "true").c_str()) = ::testing::Message()
1968 matches("template <typename Base> struct Y : Base { void f() override;};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename Base> struct Y : Base { void f() override;};"
, cxxMethodDecl(isOverride(), hasName("::Y::f"))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1969, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename Base> struct Y : Base { void f() override;};\", cxxMethodDecl(isOverride(), hasName(\"::Y::f\")))"
, "false", "true").c_str()) = ::testing::Message()
1969 cxxMethodDecl(isOverride(), hasName("::Y::f"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename Base> struct Y : Base { void f() override;};"
, cxxMethodDecl(isOverride(), hasName("::Y::f"))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1969, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename Base> struct Y : Base { void f() override;};\", cxxMethodDecl(isOverride(), hasName(\"::Y::f\")))"
, "false", "true").c_str()) = ::testing::Message()
;
1970}
1971
1972TEST(Matcher, ConstructorCall)class Matcher_ConstructorCall_Test : public ::testing::Test {
public: Matcher_ConstructorCall_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_ConstructorCall_Test(Matcher_ConstructorCall_Test
const &); void operator=(Matcher_ConstructorCall_Test const
&);};::testing::TestInfo* const Matcher_ConstructorCall_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "ConstructorCall", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_ConstructorCall_Test>);void Matcher_ConstructorCall_Test
::TestBody()
{
1973 StatementMatcher Constructor = cxxConstructExpr();
1974
1975 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x() { X x; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1976, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x() { X x; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1976 matches("class X { public: X(); }; void x() { X x; }", Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x() { X x; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1976, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x() { X x; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
1977 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x() { X x = X(); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1979, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x() { X x = X(); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1978 matches("class X { public: X(); }; void x() { X x = X(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x() { X x = X(); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1979, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x() { X x = X(); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1979 Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x() { X x = X(); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1979, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x() { X x = X(); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
1980 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x = 0; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1982, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x = 0; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1981 matches("class X { public: X(int); }; void x() { X x = 0; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x = 0; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1982, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x = 0; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1982 Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x = 0; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1982, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x = 0; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
1983 EXPECT_TRUE(matches("class X {}; void x(int) { X x; }", Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void x(int) { X x; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1983, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void x(int) { X x; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
1984}
1985
1986TEST(Matcher, ConstructorArgument)class Matcher_ConstructorArgument_Test : public ::testing::Test
{ public: Matcher_ConstructorArgument_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_ConstructorArgument_Test(Matcher_ConstructorArgument_Test
const &); void operator=(Matcher_ConstructorArgument_Test
const &);};::testing::TestInfo* const Matcher_ConstructorArgument_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "ConstructorArgument", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_ConstructorArgument_Test>);void
Matcher_ConstructorArgument_Test::TestBody()
{
1987 StatementMatcher Constructor = cxxConstructExpr(
1988 hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
1989
1990 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; X x(y); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; X x(y); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1991 matches("class X { public: X(int); }; void x() { int y; X x(y); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; X x(y); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; X x(y); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1992 Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; X x(y); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; X x(y); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
1993 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; X x = X(y); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1995, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; X x = X(y); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1994 matches("class X { public: X(int); }; void x() { int y; X x = X(y); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; X x = X(y); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1995, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; X x = X(y); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1995 Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; X x = X(y); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1995, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; X x = X(y); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
1996 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; X x = y; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1998, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; X x = y; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1997 matches("class X { public: X(int); }; void x() { int y; X x = y; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; X x = y; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1998, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; X x = y; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
1998 Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; X x = y; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 1998, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; X x = y; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
1999 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int z; X x(z); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2001, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int z; X x(z); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
2000 notMatches("class X { public: X(int); }; void x() { int z; X x(z); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int z; X x(z); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2001, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int z; X x(z); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
2001 Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int z; X x(z); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2001, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int z; X x(z); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
2002
2003 StatementMatcher WrongIndex = cxxConstructExpr(
2004 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
2005 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int y; X x(y); }"
, WrongIndex))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int y; X x(y); }\", WrongIndex)"
, "false", "true").c_str()) = ::testing::Message()
2006 notMatches("class X { public: X(int); }; void x() { int y; X x(y); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int y; X x(y); }"
, WrongIndex))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int y; X x(y); }\", WrongIndex)"
, "false", "true").c_str()) = ::testing::Message()
2007 WrongIndex))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int y; X x(y); }"
, WrongIndex))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int y; X x(y); }\", WrongIndex)"
, "false", "true").c_str()) = ::testing::Message()
;
2008}
2009
2010TEST(Matcher, ConstructorArgumentCount)class Matcher_ConstructorArgumentCount_Test : public ::testing
::Test { public: Matcher_ConstructorArgumentCount_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_ConstructorArgumentCount_Test
(Matcher_ConstructorArgumentCount_Test const &); void operator
=(Matcher_ConstructorArgumentCount_Test const &);};::testing
::TestInfo* const Matcher_ConstructorArgumentCount_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "ConstructorArgumentCount"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_ConstructorArgumentCount_Test
>);void Matcher_ConstructorArgumentCount_Test::TestBody()
{
2011 StatementMatcher Constructor1Arg = cxxConstructExpr(argumentCountIs(1));
2012
2013 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x(0); }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2015, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x(0); }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
2014 matches("class X { public: X(int); }; void x() { X x(0); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x(0); }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2015, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x(0); }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
2015 Constructor1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x(0); }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2015, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x(0); }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
;
2016 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x = X(0); }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2018, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x = X(0); }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
2017 matches("class X { public: X(int); }; void x() { X x = X(0); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x = X(0); }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2018, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x = X(0); }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
2018 Constructor1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x = X(0); }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2018, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x = X(0); }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
;
2019 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x = 0; }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2021, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x = 0; }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
2020 matches("class X { public: X(int); }; void x() { X x = 0; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x = 0; }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2021, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x = 0; }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
2021 Constructor1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x = 0; }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2021, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x = 0; }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
;
2022 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int, int); }; void x() { X x(0, 0); }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2024, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int, int); }; void x() { X x(0, 0); }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
2023 notMatches("class X { public: X(int, int); }; void x() { X x(0, 0); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int, int); }; void x() { X x(0, 0); }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2024, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int, int); }; void x() { X x(0, 0); }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
2024 Constructor1Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int, int); }; void x() { X x(0, 0); }"
, Constructor1Arg))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2024, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int, int); }; void x() { X x(0, 0); }\", Constructor1Arg)"
, "false", "true").c_str()) = ::testing::Message()
;
2025}
2026
2027TEST(Matcher, ConstructorListInitialization)class Matcher_ConstructorListInitialization_Test : public ::testing
::Test { public: Matcher_ConstructorListInitialization_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_ConstructorListInitialization_Test
(Matcher_ConstructorListInitialization_Test const &); void
operator=(Matcher_ConstructorListInitialization_Test const &
);};::testing::TestInfo* const Matcher_ConstructorListInitialization_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "ConstructorListInitialization", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_ConstructorListInitialization_Test
>);void Matcher_ConstructorListInitialization_Test::TestBody
()
{
2028 StatementMatcher ConstructorListInit =
2029 cxxConstructExpr(isListInitialization());
2030
2031 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x{0}; }"
, ConstructorListInit))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2033, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x{0}; }\", ConstructorListInit)"
, "false", "true").c_str()) = ::testing::Message()
2032 matches("class X { public: X(int); }; void x() { X x{0}; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x{0}; }"
, ConstructorListInit))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2033, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x{0}; }\", ConstructorListInit)"
, "false", "true").c_str()) = ::testing::Message()
2033 ConstructorListInit))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { X x{0}; }"
, ConstructorListInit))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2033, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x{0}; }\", ConstructorListInit)"
, "false", "true").c_str()) = ::testing::Message()
;
2034 EXPECT_FALSE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("class X { public: X(int); }; void x() { X x(0); }"
, ConstructorListInit)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2036, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x(0); }\", ConstructorListInit)"
, "true", "false").c_str()) = ::testing::Message()
2035 matches("class X { public: X(int); }; void x() { X x(0); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("class X { public: X(int); }; void x() { X x(0); }"
, ConstructorListInit)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2036, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x(0); }\", ConstructorListInit)"
, "true", "false").c_str()) = ::testing::Message()
2036 ConstructorListInit))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("class X { public: X(int); }; void x() { X x(0); }"
, ConstructorListInit)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2036, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { X x(0); }\", ConstructorListInit)"
, "true", "false").c_str()) = ::testing::Message()
;
2037}
2038
2039TEST(Matcher,ThisExpr)class Matcher_ThisExpr_Test : public ::testing::Test { public
: Matcher_ThisExpr_Test() {} private: virtual void TestBody()
; static ::testing::TestInfo* const test_info_ __attribute__ (
(unused)); Matcher_ThisExpr_Test(Matcher_ThisExpr_Test const &
); void operator=(Matcher_ThisExpr_Test const &);};::testing
::TestInfo* const Matcher_ThisExpr_Test ::test_info_ = ::testing
::internal::MakeAndRegisterTestInfo( "Matcher", "ThisExpr", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< Matcher_ThisExpr_Test>
);void Matcher_ThisExpr_Test::TestBody()
{
2040 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct X { int a; int f () { return a; } };"
, cxxThisExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2041, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct X { int a; int f () { return a; } };\", cxxThisExpr())"
, "false", "true").c_str()) = ::testing::Message()
2041 matches("struct X { int a; int f () { return a; } };", cxxThisExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct X { int a; int f () { return a; } };"
, cxxThisExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2041, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct X { int a; int f () { return a; } };\", cxxThisExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
2042 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct X { int f () { int a; return a; } };"
, cxxThisExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2043, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct X { int f () { int a; return a; } };\", cxxThisExpr())"
, "false", "true").c_str()) = ::testing::Message()
2043 notMatches("struct X { int f () { int a; return a; } };", cxxThisExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct X { int f () { int a; return a; } };"
, cxxThisExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2043, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct X { int f () { int a; return a; } };\", cxxThisExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
2044}
2045
2046TEST(Matcher, BindTemporaryExpression)class Matcher_BindTemporaryExpression_Test : public ::testing
::Test { public: Matcher_BindTemporaryExpression_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_BindTemporaryExpression_Test
(Matcher_BindTemporaryExpression_Test const &); void operator
=(Matcher_BindTemporaryExpression_Test const &);};::testing
::TestInfo* const Matcher_BindTemporaryExpression_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "BindTemporaryExpression"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_BindTemporaryExpression_Test
>);void Matcher_BindTemporaryExpression_Test::TestBody()
{
2047 StatementMatcher TempExpression = cxxBindTemporaryExpr();
2048
2049 std::string ClassString = "class string { public: string(); ~string(); }; ";
2050
2051 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2056, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2052 matches(ClassString +switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2056, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2053 "string GetStringByValue();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2056, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2054 "void FunctionTakesString(string s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2056, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2055 "void run() { FunctionTakesString(GetStringByValue()); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2056, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2056 TempExpression))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2056, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
;
2057
2058 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2059 notMatches(ClassString +switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2060 "string* GetStringPointer(); "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2061 "void FunctionTakesStringPtr(string* s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2062 "void run() {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2063 " string* s = GetStringPointer();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2064 " FunctionTakesStringPtr(GetStringPointer());"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2065 " FunctionTakesStringPtr(s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2066 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2067 TempExpression))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", TempExpression))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2067, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
;
2068
2069 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class no_dtor {};"
"no_dtor GetObjByValue();" "void ConsumeObj(no_dtor param);"
"void run() { ConsumeObj(GetObjByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class no_dtor {};\" \"no_dtor GetObjByValue();\" \"void ConsumeObj(no_dtor param);\" \"void run() { ConsumeObj(GetObjByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2070 notMatches("class no_dtor {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class no_dtor {};"
"no_dtor GetObjByValue();" "void ConsumeObj(no_dtor param);"
"void run() { ConsumeObj(GetObjByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class no_dtor {};\" \"no_dtor GetObjByValue();\" \"void ConsumeObj(no_dtor param);\" \"void run() { ConsumeObj(GetObjByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2071 "no_dtor GetObjByValue();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class no_dtor {};"
"no_dtor GetObjByValue();" "void ConsumeObj(no_dtor param);"
"void run() { ConsumeObj(GetObjByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class no_dtor {};\" \"no_dtor GetObjByValue();\" \"void ConsumeObj(no_dtor param);\" \"void run() { ConsumeObj(GetObjByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2072 "void ConsumeObj(no_dtor param);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class no_dtor {};"
"no_dtor GetObjByValue();" "void ConsumeObj(no_dtor param);"
"void run() { ConsumeObj(GetObjByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class no_dtor {};\" \"no_dtor GetObjByValue();\" \"void ConsumeObj(no_dtor param);\" \"void run() { ConsumeObj(GetObjByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2073 "void run() { ConsumeObj(GetObjByValue()); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class no_dtor {};"
"no_dtor GetObjByValue();" "void ConsumeObj(no_dtor param);"
"void run() { ConsumeObj(GetObjByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class no_dtor {};\" \"no_dtor GetObjByValue();\" \"void ConsumeObj(no_dtor param);\" \"void run() { ConsumeObj(GetObjByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
2074 TempExpression))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class no_dtor {};"
"no_dtor GetObjByValue();" "void ConsumeObj(no_dtor param);"
"void run() { ConsumeObj(GetObjByValue()); }", TempExpression
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class no_dtor {};\" \"no_dtor GetObjByValue();\" \"void ConsumeObj(no_dtor param);\" \"void run() { ConsumeObj(GetObjByValue()); }\", TempExpression)"
, "false", "true").c_str()) = ::testing::Message()
;
2075}
2076
2077TEST(MaterializeTemporaryExpr, MatchesTemporary)class MaterializeTemporaryExpr_MatchesTemporary_Test : public
::testing::Test { public: MaterializeTemporaryExpr_MatchesTemporary_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MaterializeTemporaryExpr_MatchesTemporary_Test
(MaterializeTemporaryExpr_MatchesTemporary_Test const &);
void operator=(MaterializeTemporaryExpr_MatchesTemporary_Test
const &);};::testing::TestInfo* const MaterializeTemporaryExpr_MatchesTemporary_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MaterializeTemporaryExpr", "MatchesTemporary", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MaterializeTemporaryExpr_MatchesTemporary_Test
>);void MaterializeTemporaryExpr_MatchesTemporary_Test::TestBody
()
{
2078 std::string ClassString =
2079 "class string { public: string(); int length(); }; ";
2080
2081 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2086, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2082 matches(ClassString +switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2086, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2083 "string GetStringByValue();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2086, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2084 "void FunctionTakesString(string s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2086, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2085 "void run() { FunctionTakesString(GetStringByValue()); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2086, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2086 materializeTemporaryExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(ClassString +
"string GetStringByValue();" "void FunctionTakesString(string s);"
"void run() { FunctionTakesString(GetStringByValue()); }", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2086, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(ClassString + \"string GetStringByValue();\" \"void FunctionTakesString(string s);\" \"void run() { FunctionTakesString(GetStringByValue()); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
2087
2088 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2089 notMatches(ClassString +switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2090 "string* GetStringPointer(); "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2091 "void FunctionTakesStringPtr(string* s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2092 "void run() {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2093 " string* s = GetStringPointer();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2094 " FunctionTakesStringPtr(GetStringPointer());"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2095 " FunctionTakesStringPtr(s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2096 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2097 materializeTemporaryExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string* GetStringPointer(); " "void FunctionTakesStringPtr(string* s);"
"void run() {" " string* s = GetStringPointer();" " FunctionTakesStringPtr(GetStringPointer());"
" FunctionTakesStringPtr(s);" "}", materializeTemporaryExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2097, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string* GetStringPointer(); \" \"void FunctionTakesStringPtr(string* s);\" \"void run() {\" \" string* s = GetStringPointer();\" \" FunctionTakesStringPtr(GetStringPointer());\" \" FunctionTakesStringPtr(s);\" \"}\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
2098
2099 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { int k = GetStringByValue().length(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2103, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { int k = GetStringByValue().length(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2100 notMatches(ClassString +switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { int k = GetStringByValue().length(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2103, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { int k = GetStringByValue().length(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2101 "string GetStringByValue();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { int k = GetStringByValue().length(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2103, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { int k = GetStringByValue().length(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2102 "void run() { int k = GetStringByValue().length(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { int k = GetStringByValue().length(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2103, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { int k = GetStringByValue().length(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2103 materializeTemporaryExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { int k = GetStringByValue().length(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2103, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { int k = GetStringByValue().length(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
2104
2105 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { GetStringByValue(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2109, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { GetStringByValue(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2106 notMatches(ClassString +switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { GetStringByValue(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2109, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { GetStringByValue(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2107 "string GetStringByValue();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { GetStringByValue(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2109, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { GetStringByValue(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2108 "void run() { GetStringByValue(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { GetStringByValue(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2109, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { GetStringByValue(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
2109 materializeTemporaryExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(ClassString
+ "string GetStringByValue();" "void run() { GetStringByValue(); }"
, materializeTemporaryExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2109, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(ClassString + \"string GetStringByValue();\" \"void run() { GetStringByValue(); }\", materializeTemporaryExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
2110}
2111
2112TEST(ConstructorDeclaration, SimpleCase)class ConstructorDeclaration_SimpleCase_Test : public ::testing
::Test { public: ConstructorDeclaration_SimpleCase_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ConstructorDeclaration_SimpleCase_Test
(ConstructorDeclaration_SimpleCase_Test const &); void operator
=(ConstructorDeclaration_SimpleCase_Test const &);};::testing
::TestInfo* const ConstructorDeclaration_SimpleCase_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ConstructorDeclaration"
, "SimpleCase", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ConstructorDeclaration_SimpleCase_Test
>);void ConstructorDeclaration_SimpleCase_Test::TestBody()
{
2113 EXPECT_TRUE(matches("class Foo { Foo(int i); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo { Foo(int i); };"
, cxxConstructorDecl(ofClass(hasName("Foo")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2114, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo { Foo(int i); };\", cxxConstructorDecl(ofClass(hasName(\"Foo\"))))"
, "false", "true").c_str()) = ::testing::Message()
2114 cxxConstructorDecl(ofClass(hasName("Foo")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo { Foo(int i); };"
, cxxConstructorDecl(ofClass(hasName("Foo")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2114, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo { Foo(int i); };\", cxxConstructorDecl(ofClass(hasName(\"Foo\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2115 EXPECT_TRUE(notMatches("class Foo { Foo(int i); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Foo { Foo(int i); };"
, cxxConstructorDecl(ofClass(hasName("Bar")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2116, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Foo { Foo(int i); };\", cxxConstructorDecl(ofClass(hasName(\"Bar\"))))"
, "false", "true").c_str()) = ::testing::Message()
2116 cxxConstructorDecl(ofClass(hasName("Bar")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Foo { Foo(int i); };"
, cxxConstructorDecl(ofClass(hasName("Bar")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2116, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Foo { Foo(int i); };\", cxxConstructorDecl(ofClass(hasName(\"Bar\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2117}
2118
2119TEST(ConstructorDeclaration, IsImplicit)class ConstructorDeclaration_IsImplicit_Test : public ::testing
::Test { public: ConstructorDeclaration_IsImplicit_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ConstructorDeclaration_IsImplicit_Test
(ConstructorDeclaration_IsImplicit_Test const &); void operator
=(ConstructorDeclaration_IsImplicit_Test const &);};::testing
::TestInfo* const ConstructorDeclaration_IsImplicit_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ConstructorDeclaration"
, "IsImplicit", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ConstructorDeclaration_IsImplicit_Test
>);void ConstructorDeclaration_IsImplicit_Test::TestBody()
{
2120 // This one doesn't match because the constructor is not added by the
2121 // compiler (it is not needed).
2122 EXPECT_TRUE(notMatches("class Foo { };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Foo { };"
, cxxConstructorDecl(isImplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2123, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Foo { };\", cxxConstructorDecl(isImplicit()))"
, "false", "true").c_str()) = ::testing::Message()
2123 cxxConstructorDecl(isImplicit())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Foo { };"
, cxxConstructorDecl(isImplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2123, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Foo { };\", cxxConstructorDecl(isImplicit()))"
, "false", "true").c_str()) = ::testing::Message()
;
2124 // The compiler added the implicit default constructor.
2125 EXPECT_TRUE(matches("class Foo { }; Foo* f = new Foo();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo { }; Foo* f = new Foo();"
, cxxConstructorDecl(isImplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2126, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo { }; Foo* f = new Foo();\", cxxConstructorDecl(isImplicit()))"
, "false", "true").c_str()) = ::testing::Message()
2126 cxxConstructorDecl(isImplicit())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo { }; Foo* f = new Foo();"
, cxxConstructorDecl(isImplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2126, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo { }; Foo* f = new Foo();\", cxxConstructorDecl(isImplicit()))"
, "false", "true").c_str()) = ::testing::Message()
;
2127 EXPECT_TRUE(matches("class Foo { Foo(){} };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo { Foo(){} };"
, cxxConstructorDecl(unless(isImplicit()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2128, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo { Foo(){} };\", cxxConstructorDecl(unless(isImplicit())))"
, "false", "true").c_str()) = ::testing::Message()
2128 cxxConstructorDecl(unless(isImplicit()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo { Foo(){} };"
, cxxConstructorDecl(unless(isImplicit()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2128, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo { Foo(){} };\", cxxConstructorDecl(unless(isImplicit())))"
, "false", "true").c_str()) = ::testing::Message()
;
2129 // The compiler added an implicit assignment operator.
2130 EXPECT_TRUE(matches("struct A { int x; } a = {0}, b = a; void f() { a = b; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { int x; } a = {0}, b = a; void f() { a = b; }"
, cxxMethodDecl(isImplicit(), hasName("operator="))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2131, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { int x; } a = {0}, b = a; void f() { a = b; }\", cxxMethodDecl(isImplicit(), hasName(\"operator=\")))"
, "false", "true").c_str()) = ::testing::Message()
2131 cxxMethodDecl(isImplicit(), hasName("operator="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { int x; } a = {0}, b = a; void f() { a = b; }"
, cxxMethodDecl(isImplicit(), hasName("operator="))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2131, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { int x; } a = {0}, b = a; void f() { a = b; }\", cxxMethodDecl(isImplicit(), hasName(\"operator=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2132}
2133
2134TEST(ConstructorDeclaration, IsExplicit)class ConstructorDeclaration_IsExplicit_Test : public ::testing
::Test { public: ConstructorDeclaration_IsExplicit_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ConstructorDeclaration_IsExplicit_Test
(ConstructorDeclaration_IsExplicit_Test const &); void operator
=(ConstructorDeclaration_IsExplicit_Test const &);};::testing
::TestInfo* const ConstructorDeclaration_IsExplicit_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ConstructorDeclaration"
, "IsExplicit", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ConstructorDeclaration_IsExplicit_Test
>);void ConstructorDeclaration_IsExplicit_Test::TestBody()
{
2135 EXPECT_TRUE(matches("struct S { explicit S(int); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { explicit S(int); };"
, cxxConstructorDecl(isExplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2136, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { explicit S(int); };\", cxxConstructorDecl(isExplicit()))"
, "false", "true").c_str()) = ::testing::Message()
2136 cxxConstructorDecl(isExplicit())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { explicit S(int); };"
, cxxConstructorDecl(isExplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2136, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { explicit S(int); };\", cxxConstructorDecl(isExplicit()))"
, "false", "true").c_str()) = ::testing::Message()
;
2137 EXPECT_TRUE(notMatches("struct S { S(int); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(int); };"
, cxxConstructorDecl(isExplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2138, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(int); };\", cxxConstructorDecl(isExplicit()))"
, "false", "true").c_str()) = ::testing::Message()
2138 cxxConstructorDecl(isExplicit())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(int); };"
, cxxConstructorDecl(isExplicit())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2138, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(int); };\", cxxConstructorDecl(isExplicit()))"
, "false", "true").c_str()) = ::testing::Message()
;
2139}
2140
2141TEST(ConstructorDeclaration, Kinds)class ConstructorDeclaration_Kinds_Test : public ::testing::Test
{ public: ConstructorDeclaration_Kinds_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ConstructorDeclaration_Kinds_Test(
ConstructorDeclaration_Kinds_Test const &); void operator
=(ConstructorDeclaration_Kinds_Test const &);};::testing::
TestInfo* const ConstructorDeclaration_Kinds_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ConstructorDeclaration"
, "Kinds", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ConstructorDeclaration_Kinds_Test
>);void ConstructorDeclaration_Kinds_Test::TestBody()
{
2142 EXPECT_TRUE(matches("struct S { S(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(); };"
, cxxConstructorDecl(isDefaultConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2143, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(); };\", cxxConstructorDecl(isDefaultConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
2143 cxxConstructorDecl(isDefaultConstructor())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(); };"
, cxxConstructorDecl(isDefaultConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2143, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(); };\", cxxConstructorDecl(isDefaultConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
;
2144 EXPECT_TRUE(notMatches("struct S { S(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(); };"
, cxxConstructorDecl(isCopyConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2145, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(); };\", cxxConstructorDecl(isCopyConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
2145 cxxConstructorDecl(isCopyConstructor())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(); };"
, cxxConstructorDecl(isCopyConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2145, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(); };\", cxxConstructorDecl(isCopyConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
;
2146 EXPECT_TRUE(notMatches("struct S { S(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(); };"
, cxxConstructorDecl(isMoveConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2147, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(); };\", cxxConstructorDecl(isMoveConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
2147 cxxConstructorDecl(isMoveConstructor())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(); };"
, cxxConstructorDecl(isMoveConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2147, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(); };\", cxxConstructorDecl(isMoveConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
;
2148
2149 EXPECT_TRUE(notMatches("struct S { S(const S&); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(const S&); };"
, cxxConstructorDecl(isDefaultConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2150, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(const S&); };\", cxxConstructorDecl(isDefaultConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
2150 cxxConstructorDecl(isDefaultConstructor())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(const S&); };"
, cxxConstructorDecl(isDefaultConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2150, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(const S&); };\", cxxConstructorDecl(isDefaultConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
;
2151 EXPECT_TRUE(matches("struct S { S(const S&); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(const S&); };"
, cxxConstructorDecl(isCopyConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2152, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(const S&); };\", cxxConstructorDecl(isCopyConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
2152 cxxConstructorDecl(isCopyConstructor())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(const S&); };"
, cxxConstructorDecl(isCopyConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2152, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(const S&); };\", cxxConstructorDecl(isCopyConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
;
2153 EXPECT_TRUE(notMatches("struct S { S(const S&); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(const S&); };"
, cxxConstructorDecl(isMoveConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2154, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(const S&); };\", cxxConstructorDecl(isMoveConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
2154 cxxConstructorDecl(isMoveConstructor())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(const S&); };"
, cxxConstructorDecl(isMoveConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2154, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(const S&); };\", cxxConstructorDecl(isMoveConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
;
2155
2156 EXPECT_TRUE(notMatches("struct S { S(S&&); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(S&&); };"
, cxxConstructorDecl(isDefaultConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2157, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(S&&); };\", cxxConstructorDecl(isDefaultConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
2157 cxxConstructorDecl(isDefaultConstructor())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(S&&); };"
, cxxConstructorDecl(isDefaultConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2157, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(S&&); };\", cxxConstructorDecl(isDefaultConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
;
2158 EXPECT_TRUE(notMatches("struct S { S(S&&); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(S&&); };"
, cxxConstructorDecl(isCopyConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2159, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(S&&); };\", cxxConstructorDecl(isCopyConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
2159 cxxConstructorDecl(isCopyConstructor())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct S { S(S&&); };"
, cxxConstructorDecl(isCopyConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2159, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct S { S(S&&); };\", cxxConstructorDecl(isCopyConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
;
2160 EXPECT_TRUE(matches("struct S { S(S&&); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(S&&); };"
, cxxConstructorDecl(isMoveConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2161, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(S&&); };\", cxxConstructorDecl(isMoveConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
2161 cxxConstructorDecl(isMoveConstructor())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(S&&); };"
, cxxConstructorDecl(isMoveConstructor())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2161, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(S&&); };\", cxxConstructorDecl(isMoveConstructor()))"
, "false", "true").c_str()) = ::testing::Message()
;
2162}
2163
2164TEST(DestructorDeclaration, MatchesVirtualDestructor)class DestructorDeclaration_MatchesVirtualDestructor_Test : public
::testing::Test { public: DestructorDeclaration_MatchesVirtualDestructor_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DestructorDeclaration_MatchesVirtualDestructor_Test
(DestructorDeclaration_MatchesVirtualDestructor_Test const &
); void operator=(DestructorDeclaration_MatchesVirtualDestructor_Test
const &);};::testing::TestInfo* const DestructorDeclaration_MatchesVirtualDestructor_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DestructorDeclaration", "MatchesVirtualDestructor", __null,
__null, (::testing::internal::GetTestTypeId()), ::testing::Test
::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::testing
::internal::TestFactoryImpl< DestructorDeclaration_MatchesVirtualDestructor_Test
>);void DestructorDeclaration_MatchesVirtualDestructor_Test
::TestBody()
{
2165 EXPECT_TRUE(matches("class Foo { virtual ~Foo(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo { virtual ~Foo(); };"
, cxxDestructorDecl(ofClass(hasName("Foo")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2166, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo { virtual ~Foo(); };\", cxxDestructorDecl(ofClass(hasName(\"Foo\"))))"
, "false", "true").c_str()) = ::testing::Message()
2166 cxxDestructorDecl(ofClass(hasName("Foo")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo { virtual ~Foo(); };"
, cxxDestructorDecl(ofClass(hasName("Foo")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2166, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo { virtual ~Foo(); };\", cxxDestructorDecl(ofClass(hasName(\"Foo\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2167}
2168
2169TEST(DestructorDeclaration, DoesNotMatchImplicitDestructor)class DestructorDeclaration_DoesNotMatchImplicitDestructor_Test
: public ::testing::Test { public: DestructorDeclaration_DoesNotMatchImplicitDestructor_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DestructorDeclaration_DoesNotMatchImplicitDestructor_Test
(DestructorDeclaration_DoesNotMatchImplicitDestructor_Test const
&); void operator=(DestructorDeclaration_DoesNotMatchImplicitDestructor_Test
const &);};::testing::TestInfo* const DestructorDeclaration_DoesNotMatchImplicitDestructor_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DestructorDeclaration", "DoesNotMatchImplicitDestructor", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< DestructorDeclaration_DoesNotMatchImplicitDestructor_Test
>);void DestructorDeclaration_DoesNotMatchImplicitDestructor_Test
::TestBody()
{
2170 EXPECT_TRUE(notMatches("class Foo {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Foo {};"
, cxxDestructorDecl(ofClass(hasName("Foo")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2171, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Foo {};\", cxxDestructorDecl(ofClass(hasName(\"Foo\"))))"
, "false", "true").c_str()) = ::testing::Message()
2171 cxxDestructorDecl(ofClass(hasName("Foo")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Foo {};"
, cxxDestructorDecl(ofClass(hasName("Foo")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2171, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Foo {};\", cxxDestructorDecl(ofClass(hasName(\"Foo\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2172}
2173
2174TEST(HasAnyConstructorInitializer, SimpleCase)class HasAnyConstructorInitializer_SimpleCase_Test : public ::
testing::Test { public: HasAnyConstructorInitializer_SimpleCase_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnyConstructorInitializer_SimpleCase_Test
(HasAnyConstructorInitializer_SimpleCase_Test const &); void
operator=(HasAnyConstructorInitializer_SimpleCase_Test const
&);};::testing::TestInfo* const HasAnyConstructorInitializer_SimpleCase_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnyConstructorInitializer", "SimpleCase", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAnyConstructorInitializer_SimpleCase_Test
>);void HasAnyConstructorInitializer_SimpleCase_Test::TestBody
()
{
2175 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Foo { Foo() { } };"
, cxxConstructorDecl(hasAnyConstructorInitializer(anything())
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Foo { Foo() { } };\", cxxConstructorDecl(hasAnyConstructorInitializer(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2176 notMatches("class Foo { Foo() { } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Foo { Foo() { } };"
, cxxConstructorDecl(hasAnyConstructorInitializer(anything())
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Foo { Foo() { } };\", cxxConstructorDecl(hasAnyConstructorInitializer(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2177 cxxConstructorDecl(hasAnyConstructorInitializer(anything()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Foo { Foo() { } };"
, cxxConstructorDecl(hasAnyConstructorInitializer(anything())
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Foo { Foo() { } };\", cxxConstructorDecl(hasAnyConstructorInitializer(anything())))"
, "false", "true").c_str()) = ::testing::Message()
;
2178 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo {"
" Foo() : foo_() { }" " int foo_;" "};", cxxConstructorDecl
(hasAnyConstructorInitializer(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2183, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo {\" \" Foo() : foo_() { }\" \" int foo_;\" \"};\", cxxConstructorDecl(hasAnyConstructorInitializer(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2179 matches("class Foo {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo {"
" Foo() : foo_() { }" " int foo_;" "};", cxxConstructorDecl
(hasAnyConstructorInitializer(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2183, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo {\" \" Foo() : foo_() { }\" \" int foo_;\" \"};\", cxxConstructorDecl(hasAnyConstructorInitializer(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2180 " Foo() : foo_() { }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo {"
" Foo() : foo_() { }" " int foo_;" "};", cxxConstructorDecl
(hasAnyConstructorInitializer(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2183, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo {\" \" Foo() : foo_() { }\" \" int foo_;\" \"};\", cxxConstructorDecl(hasAnyConstructorInitializer(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2181 " int foo_;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo {"
" Foo() : foo_() { }" " int foo_;" "};", cxxConstructorDecl
(hasAnyConstructorInitializer(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2183, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo {\" \" Foo() : foo_() { }\" \" int foo_;\" \"};\", cxxConstructorDecl(hasAnyConstructorInitializer(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2182 "};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo {"
" Foo() : foo_() { }" " int foo_;" "};", cxxConstructorDecl
(hasAnyConstructorInitializer(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2183, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo {\" \" Foo() : foo_() { }\" \" int foo_;\" \"};\", cxxConstructorDecl(hasAnyConstructorInitializer(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2183 cxxConstructorDecl(hasAnyConstructorInitializer(anything()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class Foo {"
" Foo() : foo_() { }" " int foo_;" "};", cxxConstructorDecl
(hasAnyConstructorInitializer(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2183, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class Foo {\" \" Foo() : foo_() { }\" \" int foo_;\" \"};\", cxxConstructorDecl(hasAnyConstructorInitializer(anything())))"
, "false", "true").c_str()) = ::testing::Message()
;
2184}
2185
2186TEST(HasAnyConstructorInitializer, ForField)class HasAnyConstructorInitializer_ForField_Test : public ::testing
::Test { public: HasAnyConstructorInitializer_ForField_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnyConstructorInitializer_ForField_Test
(HasAnyConstructorInitializer_ForField_Test const &); void
operator=(HasAnyConstructorInitializer_ForField_Test const &
);};::testing::TestInfo* const HasAnyConstructorInitializer_ForField_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnyConstructorInitializer", "ForField", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAnyConstructorInitializer_ForField_Test
>);void HasAnyConstructorInitializer_ForField_Test::TestBody
()
{
2187 static const char Code[] =
2188 "class Baz { };"
2189 "class Foo {"
2190 " Foo() : foo_() { }"
2191 " Baz foo_;"
2192 " Baz bar_;"
2193 "};";
2194 EXPECT_TRUE(matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( forField(hasType(recordDecl(hasName
("Baz"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2195, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( forField(hasType(recordDecl(hasName(\"Baz\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2195 forField(hasType(recordDecl(hasName("Baz"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( forField(hasType(recordDecl(hasName
("Baz"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2195, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( forField(hasType(recordDecl(hasName(\"Baz\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
2196 EXPECT_TRUE(matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( forField(hasName("foo_")))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2197, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( forField(hasName(\"foo_\")))))"
, "false", "true").c_str()) = ::testing::Message()
2197 forField(hasName("foo_"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( forField(hasName("foo_")))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2197, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( forField(hasName(\"foo_\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
2198 EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( forField(hasType(recordDecl(hasName
("Bar"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2199, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( forField(hasType(recordDecl(hasName(\"Bar\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2199 forField(hasType(recordDecl(hasName("Bar"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( forField(hasType(recordDecl(hasName
("Bar"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2199, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( forField(hasType(recordDecl(hasName(\"Bar\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
2200}
2201
2202TEST(HasAnyConstructorInitializer, WithInitializer)class HasAnyConstructorInitializer_WithInitializer_Test : public
::testing::Test { public: HasAnyConstructorInitializer_WithInitializer_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnyConstructorInitializer_WithInitializer_Test
(HasAnyConstructorInitializer_WithInitializer_Test const &
); void operator=(HasAnyConstructorInitializer_WithInitializer_Test
const &);};::testing::TestInfo* const HasAnyConstructorInitializer_WithInitializer_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnyConstructorInitializer", "WithInitializer", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAnyConstructorInitializer_WithInitializer_Test
>);void HasAnyConstructorInitializer_WithInitializer_Test::
TestBody()
{
2203 static const char Code[] =
2204 "class Foo {"
2205 " Foo() : foo_(0) { }"
2206 " int foo_;"
2207 "};";
2208 EXPECT_TRUE(matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( withInitializer(integerLiteral
(equals(0)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2209, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( withInitializer(integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
2209 withInitializer(integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( withInitializer(integerLiteral
(equals(0)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2209, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( withInitializer(integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
2210 EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( withInitializer(integerLiteral
(equals(1)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2211, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( withInitializer(integerLiteral(equals(1))))))"
, "false", "true").c_str()) = ::testing::Message()
2211 withInitializer(integerLiteral(equals(1)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( withInitializer(integerLiteral
(equals(1)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2211, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( withInitializer(integerLiteral(equals(1))))))"
, "false", "true").c_str()) = ::testing::Message()
;
2212}
2213
2214TEST(HasAnyConstructorInitializer, IsWritten)class HasAnyConstructorInitializer_IsWritten_Test : public ::
testing::Test { public: HasAnyConstructorInitializer_IsWritten_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnyConstructorInitializer_IsWritten_Test
(HasAnyConstructorInitializer_IsWritten_Test const &); void
operator=(HasAnyConstructorInitializer_IsWritten_Test const &
);};::testing::TestInfo* const HasAnyConstructorInitializer_IsWritten_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnyConstructorInitializer", "IsWritten", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAnyConstructorInitializer_IsWritten_Test
>);void HasAnyConstructorInitializer_IsWritten_Test::TestBody
()
{
2215 static const char Code[] =
2216 "struct Bar { Bar(){} };"
2217 "class Foo {"
2218 " Foo() : foo_() { }"
2219 " Bar foo_;"
2220 " Bar bar_;"
2221 "};";
2222 EXPECT_TRUE(matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( allOf(forField(hasName("foo_")
), isWritten())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2223, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( allOf(forField(hasName(\"foo_\")), isWritten()))))"
, "false", "true").c_str()) = ::testing::Message()
2223 allOf(forField(hasName("foo_")), isWritten())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( allOf(forField(hasName("foo_")
), isWritten())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2223, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( allOf(forField(hasName(\"foo_\")), isWritten()))))"
, "false", "true").c_str()) = ::testing::Message()
;
2224 EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( allOf(forField(hasName("bar_")
), isWritten())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2225, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( allOf(forField(hasName(\"bar_\")), isWritten()))))"
, "false", "true").c_str()) = ::testing::Message()
2225 allOf(forField(hasName("bar_")), isWritten())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( allOf(forField(hasName("bar_")
), isWritten())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2225, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( allOf(forField(hasName(\"bar_\")), isWritten()))))"
, "false", "true").c_str()) = ::testing::Message()
;
2226 EXPECT_TRUE(matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( allOf(forField(hasName("bar_")
), unless(isWritten()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2227, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( allOf(forField(hasName(\"bar_\")), unless(isWritten())))))"
, "false", "true").c_str()) = ::testing::Message()
2227 allOf(forField(hasName("bar_")), unless(isWritten()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(hasAnyConstructorInitializer( allOf(forField(hasName("bar_")
), unless(isWritten()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2227, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(hasAnyConstructorInitializer( allOf(forField(hasName(\"bar_\")), unless(isWritten())))))"
, "false", "true").c_str()) = ::testing::Message()
;
2228}
2229
2230TEST(HasAnyConstructorInitializer, IsBaseInitializer)class HasAnyConstructorInitializer_IsBaseInitializer_Test : public
::testing::Test { public: HasAnyConstructorInitializer_IsBaseInitializer_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnyConstructorInitializer_IsBaseInitializer_Test
(HasAnyConstructorInitializer_IsBaseInitializer_Test const &
); void operator=(HasAnyConstructorInitializer_IsBaseInitializer_Test
const &);};::testing::TestInfo* const HasAnyConstructorInitializer_IsBaseInitializer_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnyConstructorInitializer", "IsBaseInitializer", __null,
__null, (::testing::internal::GetTestTypeId()), ::testing::Test
::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::testing
::internal::TestFactoryImpl< HasAnyConstructorInitializer_IsBaseInitializer_Test
>);void HasAnyConstructorInitializer_IsBaseInitializer_Test
::TestBody()
{
2231 static const char Code[] =
2232 "struct B {};"
2233 "struct D : B {"
2234 " int I;"
2235 " D(int i) : I(i) {}"
2236 "};"
2237 "struct E : B {"
2238 " E() : B() {}"
2239 "};";
2240 EXPECT_TRUE(matches(Code, cxxConstructorDecl(allOf(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(
), isWritten())), hasName("E")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2242, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(), isWritten())), hasName(\"E\"))))"
, "false", "true").c_str()) = ::testing::Message()
2241 hasAnyConstructorInitializer(allOf(isBaseInitializer(), isWritten())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(
), isWritten())), hasName("E")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2242, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(), isWritten())), hasName(\"E\"))))"
, "false", "true").c_str()) = ::testing::Message()
2242 hasName("E")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(
), isWritten())), hasName("E")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2242, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(), isWritten())), hasName(\"E\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2243 EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(allOf(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(
), isWritten())), hasName("D")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2245, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(), isWritten())), hasName(\"D\"))))"
, "false", "true").c_str()) = ::testing::Message()
2244 hasAnyConstructorInitializer(allOf(isBaseInitializer(), isWritten())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(
), isWritten())), hasName("D")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2245, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(), isWritten())), hasName(\"D\"))))"
, "false", "true").c_str()) = ::testing::Message()
2245 hasName("D")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(
), isWritten())), hasName("D")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2245, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isBaseInitializer(), isWritten())), hasName(\"D\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2246 EXPECT_TRUE(matches(Code, cxxConstructorDecl(allOf(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer
(), isWritten())), hasName("D")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2248, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())), hasName(\"D\"))))"
, "false", "true").c_str()) = ::testing::Message()
2247 hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer
(), isWritten())), hasName("D")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2248, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())), hasName(\"D\"))))"
, "false", "true").c_str()) = ::testing::Message()
2248 hasName("D")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer
(), isWritten())), hasName("D")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2248, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())), hasName(\"D\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2249 EXPECT_TRUE(notMatches(Code, cxxConstructorDecl(allOf(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer
(), isWritten())), hasName("E")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2251, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())), hasName(\"E\"))))"
, "false", "true").c_str()) = ::testing::Message()
2250 hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer
(), isWritten())), hasName("E")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2251, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())), hasName(\"E\"))))"
, "false", "true").c_str()) = ::testing::Message()
2251 hasName("E")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Code, cxxConstructorDecl
(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer
(), isWritten())), hasName("E")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2251, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Code, cxxConstructorDecl(allOf( hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())), hasName(\"E\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2252}
2253
2254TEST(Matcher, NewExpression)class Matcher_NewExpression_Test : public ::testing::Test { public
: Matcher_NewExpression_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_NewExpression_Test(Matcher_NewExpression_Test
const &); void operator=(Matcher_NewExpression_Test const
&);};::testing::TestInfo* const Matcher_NewExpression_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "NewExpression", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_NewExpression_Test>);void Matcher_NewExpression_Test
::TestBody()
{
2255 StatementMatcher New = cxxNewExpr();
2256
2257 EXPECT_TRUE(matches("class X { public: X(); }; void x() { new X; }", New))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x() { new X; }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x() { new X; }\", New)"
, "false", "true").c_str()) = ::testing::Message()
;
2258 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x() { new X(); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2259, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x() { new X(); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2259 matches("class X { public: X(); }; void x() { new X(); }", New))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x() { new X(); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2259, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x() { new X(); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
;
2260 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { new X(0); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2261, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { new X(0); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2261 matches("class X { public: X(int); }; void x() { new X(0); }", New))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { new X(0); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2261, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { new X(0); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
;
2262 EXPECT_TRUE(matches("class X {}; void x(int) { new X; }", New))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {}; void x(int) { new X; }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2262, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {}; void x(int) { new X; }\", New)", "false"
, "true").c_str()) = ::testing::Message()
;
2263}
2264
2265TEST(Matcher, NewExpressionArgument)class Matcher_NewExpressionArgument_Test : public ::testing::
Test { public: Matcher_NewExpressionArgument_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_NewExpressionArgument_Test
(Matcher_NewExpressionArgument_Test const &); void operator
=(Matcher_NewExpressionArgument_Test const &);};::testing
::TestInfo* const Matcher_NewExpressionArgument_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "NewExpressionArgument"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_NewExpressionArgument_Test
>);void Matcher_NewExpressionArgument_Test::TestBody()
{
2266 StatementMatcher New = cxxConstructExpr(
2267 hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
2268
2269 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; new X(y); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2271, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; new X(y); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2270 matches("class X { public: X(int); }; void x() { int y; new X(y); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; new X(y); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2271, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; new X(y); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2271 New))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; new X(y); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2271, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; new X(y); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
;
2272 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; new X(y); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2274, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; new X(y); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2273 matches("class X { public: X(int); }; void x() { int y; new X(y); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; new X(y); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2274, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; new X(y); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2274 New))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { int y; new X(y); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2274, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { int y; new X(y); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
;
2275 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int z; new X(z); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2277, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int z; new X(z); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2276 notMatches("class X { public: X(int); }; void x() { int z; new X(z); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int z; new X(z); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2277, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int z; new X(z); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2277 New))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int z; new X(z); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2277, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int z; new X(z); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
;
2278
2279 StatementMatcher WrongIndex = cxxConstructExpr(
2280 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
2281 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int y; new X(y); }"
, WrongIndex))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2283, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int y; new X(y); }\", WrongIndex)"
, "false", "true").c_str()) = ::testing::Message()
2282 notMatches("class X { public: X(int); }; void x() { int y; new X(y); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int y; new X(y); }"
, WrongIndex))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2283, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int y; new X(y); }\", WrongIndex)"
, "false", "true").c_str()) = ::testing::Message()
2283 WrongIndex))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int); }; void x() { int y; new X(y); }"
, WrongIndex))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2283, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int); }; void x() { int y; new X(y); }\", WrongIndex)"
, "false", "true").c_str()) = ::testing::Message()
;
2284}
2285
2286TEST(Matcher, NewExpressionArgumentCount)class Matcher_NewExpressionArgumentCount_Test : public ::testing
::Test { public: Matcher_NewExpressionArgumentCount_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_NewExpressionArgumentCount_Test
(Matcher_NewExpressionArgumentCount_Test const &); void operator
=(Matcher_NewExpressionArgumentCount_Test const &);};::testing
::TestInfo* const Matcher_NewExpressionArgumentCount_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "NewExpressionArgumentCount"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_NewExpressionArgumentCount_Test
>);void Matcher_NewExpressionArgumentCount_Test::TestBody(
)
{
2287 StatementMatcher New = cxxConstructExpr(argumentCountIs(1));
2288
2289 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { new X(0); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2290, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { new X(0); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2290 matches("class X { public: X(int); }; void x() { new X(0); }", New))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(int); }; void x() { new X(0); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2290, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(int); }; void x() { new X(0); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
;
2291 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int, int); }; void x() { new X(0, 0); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2293, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int, int); }; void x() { new X(0, 0); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2292 notMatches("class X { public: X(int, int); }; void x() { new X(0, 0); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int, int); }; void x() { new X(0, 0); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2293, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int, int); }; void x() { new X(0, 0); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
2293 New))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { public: X(int, int); }; void x() { new X(0, 0); }"
, New))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2293, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { public: X(int, int); }; void x() { new X(0, 0); }\", New)"
, "false", "true").c_str()) = ::testing::Message()
;
2294}
2295
2296TEST(Matcher, DeleteExpression)class Matcher_DeleteExpression_Test : public ::testing::Test {
public: Matcher_DeleteExpression_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_DeleteExpression_Test(Matcher_DeleteExpression_Test
const &); void operator=(Matcher_DeleteExpression_Test const
&);};::testing::TestInfo* const Matcher_DeleteExpression_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "DeleteExpression", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_DeleteExpression_Test>);void Matcher_DeleteExpression_Test
::TestBody()
{
2297 EXPECT_TRUE(matches("struct A {}; void f(A* a) { delete a; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A {}; void f(A* a) { delete a; }"
, cxxDeleteExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2298, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A {}; void f(A* a) { delete a; }\", cxxDeleteExpr())"
, "false", "true").c_str()) = ::testing::Message()
2298 cxxDeleteExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A {}; void f(A* a) { delete a; }"
, cxxDeleteExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2298, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A {}; void f(A* a) { delete a; }\", cxxDeleteExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
2299}
2300
2301TEST(Matcher, DefaultArgument)class Matcher_DefaultArgument_Test : public ::testing::Test {
public: Matcher_DefaultArgument_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_DefaultArgument_Test(Matcher_DefaultArgument_Test
const &); void operator=(Matcher_DefaultArgument_Test const
&);};::testing::TestInfo* const Matcher_DefaultArgument_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "DefaultArgument", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_DefaultArgument_Test>);void Matcher_DefaultArgument_Test
::TestBody()
{
2302 StatementMatcher Arg = cxxDefaultArgExpr();
2303
2304 EXPECT_TRUE(matches("void x(int, int = 0) { int y; x(y); }", Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x(int, int = 0) { int y; x(y); }"
, Arg))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2304, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x(int, int = 0) { int y; x(y); }\", Arg)", "false"
, "true").c_str()) = ::testing::Message()
;
2305 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int, int = 0) { int y; x(y); } };"
, Arg))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2306, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int, int = 0) { int y; x(y); } };\", Arg)"
, "false", "true").c_str()) = ::testing::Message()
2306 matches("class X { void x(int, int = 0) { int y; x(y); } };", Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void x(int, int = 0) { int y; x(y); } };"
, Arg))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2306, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void x(int, int = 0) { int y; x(y); } };\", Arg)"
, "false", "true").c_str()) = ::testing::Message()
;
2307 EXPECT_TRUE(notMatches("void x(int, int = 0) { int y; x(y, 0); }", Arg))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x(int, int = 0) { int y; x(y, 0); }"
, Arg))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2307, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x(int, int = 0) { int y; x(y, 0); }\", Arg)"
, "false", "true").c_str()) = ::testing::Message()
;
2308}
2309
2310TEST(Matcher, StringLiterals)class Matcher_StringLiterals_Test : public ::testing::Test { public
: Matcher_StringLiterals_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_StringLiterals_Test(Matcher_StringLiterals_Test
const &); void operator=(Matcher_StringLiterals_Test const
&);};::testing::TestInfo* const Matcher_StringLiterals_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "StringLiterals", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_StringLiterals_Test>);void Matcher_StringLiterals_Test
::TestBody()
{
2311 StatementMatcher Literal = stringLiteral();
2312 EXPECT_TRUE(matches("const char *s = \"string\";", Literal))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const char *s = \"string\";"
, Literal))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2312, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const char *s = \\\"string\\\";\", Literal)", "false"
, "true").c_str()) = ::testing::Message()
;
2313 // wide string
2314 EXPECT_TRUE(matches("const wchar_t *s = L\"string\";", Literal))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const wchar_t *s = L\"string\";"
, Literal))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2314, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const wchar_t *s = L\\\"string\\\";\", Literal)"
, "false", "true").c_str()) = ::testing::Message()
;
2315 // with escaped characters
2316 EXPECT_TRUE(matches("const char *s = \"\x05five\";", Literal))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const char *s = \"\x05five\";"
, Literal))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2316, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const char *s = \\\"\\x05five\\\";\", Literal)",
"false", "true").c_str()) = ::testing::Message()
;
2317 // no matching -- though the data type is the same, there is no string literal
2318 EXPECT_TRUE(notMatches("const char s[1] = {'a'};", Literal))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("const char s[1] = {'a'};"
, Literal))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2318, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"const char s[1] = {'a'};\", Literal)", "false"
, "true").c_str()) = ::testing::Message()
;
2319}
2320
2321TEST(Matcher, CharacterLiterals)class Matcher_CharacterLiterals_Test : public ::testing::Test
{ public: Matcher_CharacterLiterals_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_CharacterLiterals_Test(Matcher_CharacterLiterals_Test
const &); void operator=(Matcher_CharacterLiterals_Test const
&);};::testing::TestInfo* const Matcher_CharacterLiterals_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "CharacterLiterals", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_CharacterLiterals_Test>);void Matcher_CharacterLiterals_Test
::TestBody()
{
2322 StatementMatcher CharLiteral = characterLiteral();
2323 EXPECT_TRUE(matches("const char c = 'c';", CharLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const char c = 'c';"
, CharLiteral))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2323, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const char c = 'c';\", CharLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2324 // wide character
2325 EXPECT_TRUE(matches("const char c = L'c';", CharLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const char c = L'c';"
, CharLiteral))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2325, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const char c = L'c';\", CharLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2326 // wide character, Hex encoded, NOT MATCHED!
2327 EXPECT_TRUE(notMatches("const wchar_t c = 0x2126;", CharLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("const wchar_t c = 0x2126;"
, CharLiteral))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2327, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"const wchar_t c = 0x2126;\", CharLiteral)", "false"
, "true").c_str()) = ::testing::Message()
;
2328 EXPECT_TRUE(notMatches("const char c = 0x1;", CharLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("const char c = 0x1;"
, CharLiteral))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2328, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"const char c = 0x1;\", CharLiteral)", "false"
, "true").c_str()) = ::testing::Message()
;
2329}
2330
2331TEST(Matcher, IntegerLiterals)class Matcher_IntegerLiterals_Test : public ::testing::Test {
public: Matcher_IntegerLiterals_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_IntegerLiterals_Test(Matcher_IntegerLiterals_Test
const &); void operator=(Matcher_IntegerLiterals_Test const
&);};::testing::TestInfo* const Matcher_IntegerLiterals_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "IntegerLiterals", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_IntegerLiterals_Test>);void Matcher_IntegerLiterals_Test
::TestBody()
{
2332 StatementMatcher HasIntLiteral = integerLiteral();
2333 EXPECT_TRUE(matches("int i = 10;", HasIntLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 10;"
, HasIntLiteral))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2333, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 10;\", HasIntLiteral)", "false", "true")
.c_str()) = ::testing::Message()
;
2334 EXPECT_TRUE(matches("int i = 0x1AB;", HasIntLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 0x1AB;"
, HasIntLiteral))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 0x1AB;\", HasIntLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2335 EXPECT_TRUE(matches("int i = 10L;", HasIntLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 10L;"
, HasIntLiteral))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2335, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 10L;\", HasIntLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2336 EXPECT_TRUE(matches("int i = 10U;", HasIntLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 10U;"
, HasIntLiteral))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2336, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 10U;\", HasIntLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2337
2338 // Non-matching cases (character literals, float and double)
2339 EXPECT_TRUE(notMatches("int i = L'a';",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = L'a';"
, HasIntLiteral))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2340, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = L'a';\", HasIntLiteral)", "false", "true"
).c_str()) = ::testing::Message()
2340 HasIntLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = L'a';"
, HasIntLiteral))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2340, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = L'a';\", HasIntLiteral)", "false", "true"
).c_str()) = ::testing::Message()
; // this is actually a character
2341 // literal cast to int
2342 EXPECT_TRUE(notMatches("int i = 'a';", HasIntLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = 'a';"
, HasIntLiteral))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2342, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = 'a';\", HasIntLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2343 EXPECT_TRUE(notMatches("int i = 1e10;", HasIntLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = 1e10;"
, HasIntLiteral))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = 1e10;\", HasIntLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2344 EXPECT_TRUE(notMatches("int i = 10.0;", HasIntLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = 10.0;"
, HasIntLiteral))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2344, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = 10.0;\", HasIntLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2345}
2346
2347TEST(Matcher, FloatLiterals)class Matcher_FloatLiterals_Test : public ::testing::Test { public
: Matcher_FloatLiterals_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_FloatLiterals_Test(Matcher_FloatLiterals_Test
const &); void operator=(Matcher_FloatLiterals_Test const
&);};::testing::TestInfo* const Matcher_FloatLiterals_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "FloatLiterals", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_FloatLiterals_Test>);void Matcher_FloatLiterals_Test
::TestBody()
{
2348 StatementMatcher HasFloatLiteral = floatLiteral();
2349 EXPECT_TRUE(matches("float i = 10.0;", HasFloatLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("float i = 10.0;"
, HasFloatLiteral))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2349, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"float i = 10.0;\", HasFloatLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2350 EXPECT_TRUE(matches("float i = 10.0f;", HasFloatLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("float i = 10.0f;"
, HasFloatLiteral))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2350, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"float i = 10.0f;\", HasFloatLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2351 EXPECT_TRUE(matches("double i = 10.0;", HasFloatLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("double i = 10.0;"
, HasFloatLiteral))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2351, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"double i = 10.0;\", HasFloatLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2352 EXPECT_TRUE(matches("double i = 10.0L;", HasFloatLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("double i = 10.0L;"
, HasFloatLiteral))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2352, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"double i = 10.0L;\", HasFloatLiteral)", "false",
"true").c_str()) = ::testing::Message()
;
2353 EXPECT_TRUE(matches("double i = 1e10;", HasFloatLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("double i = 1e10;"
, HasFloatLiteral))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2353, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"double i = 1e10;\", HasFloatLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2354 EXPECT_TRUE(matches("double i = 5.0;", floatLiteral(equals(5.0))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("double i = 5.0;"
, floatLiteral(equals(5.0))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2354, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"double i = 5.0;\", floatLiteral(equals(5.0)))", "false"
, "true").c_str()) = ::testing::Message()
;
2355 EXPECT_TRUE(matches("double i = 5.0;", floatLiteral(equals(5.0f))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("double i = 5.0;"
, floatLiteral(equals(5.0f))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2355, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"double i = 5.0;\", floatLiteral(equals(5.0f)))",
"false", "true").c_str()) = ::testing::Message()
;
2356 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("double i = 5.0;"
, floatLiteral(equals(llvm::APFloat(5.0)))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2357, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"double i = 5.0;\", floatLiteral(equals(llvm::APFloat(5.0))))"
, "false", "true").c_str()) = ::testing::Message()
2357 matches("double i = 5.0;", floatLiteral(equals(llvm::APFloat(5.0)))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("double i = 5.0;"
, floatLiteral(equals(llvm::APFloat(5.0)))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2357, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"double i = 5.0;\", floatLiteral(equals(llvm::APFloat(5.0))))"
, "false", "true").c_str()) = ::testing::Message()
;
2358
2359 EXPECT_TRUE(notMatches("float i = 10;", HasFloatLiteral))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float i = 10;"
, HasFloatLiteral))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2359, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float i = 10;\", HasFloatLiteral)", "false", "true"
).c_str()) = ::testing::Message()
;
2360 EXPECT_TRUE(notMatches("double i = 5.0;", floatLiteral(equals(6.0))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("double i = 5.0;"
, floatLiteral(equals(6.0))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2360, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"double i = 5.0;\", floatLiteral(equals(6.0)))"
, "false", "true").c_str()) = ::testing::Message()
;
2361 EXPECT_TRUE(notMatches("double i = 5.0;", floatLiteral(equals(6.0f))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("double i = 5.0;"
, floatLiteral(equals(6.0f))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2361, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"double i = 5.0;\", floatLiteral(equals(6.0f)))"
, "false", "true").c_str()) = ::testing::Message()
;
2362 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("double i = 5.0;"
, floatLiteral(equals(llvm::APFloat(6.0)))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2363, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"double i = 5.0;\", floatLiteral(equals(llvm::APFloat(6.0))))"
, "false", "true").c_str()) = ::testing::Message()
2363 notMatches("double i = 5.0;", floatLiteral(equals(llvm::APFloat(6.0)))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("double i = 5.0;"
, floatLiteral(equals(llvm::APFloat(6.0)))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2363, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"double i = 5.0;\", floatLiteral(equals(llvm::APFloat(6.0))))"
, "false", "true").c_str()) = ::testing::Message()
;
2364}
2365
2366TEST(Matcher, NullPtrLiteral)class Matcher_NullPtrLiteral_Test : public ::testing::Test { public
: Matcher_NullPtrLiteral_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_NullPtrLiteral_Test(Matcher_NullPtrLiteral_Test
const &); void operator=(Matcher_NullPtrLiteral_Test const
&);};::testing::TestInfo* const Matcher_NullPtrLiteral_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "NullPtrLiteral", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_NullPtrLiteral_Test>);void Matcher_NullPtrLiteral_Test
::TestBody()
{
2367 EXPECT_TRUE(matches("int* i = nullptr;", cxxNullPtrLiteralExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int* i = nullptr;"
, cxxNullPtrLiteralExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2367, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int* i = nullptr;\", cxxNullPtrLiteralExpr())", "false"
, "true").c_str()) = ::testing::Message()
;
2368}
2369
2370TEST(Matcher, GNUNullExpr)class Matcher_GNUNullExpr_Test : public ::testing::Test { public
: Matcher_GNUNullExpr_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_GNUNullExpr_Test(Matcher_GNUNullExpr_Test
const &); void operator=(Matcher_GNUNullExpr_Test const &
);};::testing::TestInfo* const Matcher_GNUNullExpr_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "GNUNullExpr"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_GNUNullExpr_Test
>);void Matcher_GNUNullExpr_Test::TestBody()
{
2371 EXPECT_TRUE(matches("int* i = __null;", gnuNullExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int* i = __null;"
, gnuNullExpr()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2371, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int* i = __null;\", gnuNullExpr())", "false", "true"
).c_str()) = ::testing::Message()
;
2372}
2373
2374TEST(Matcher, AsmStatement)class Matcher_AsmStatement_Test : public ::testing::Test { public
: Matcher_AsmStatement_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_AsmStatement_Test(Matcher_AsmStatement_Test
const &); void operator=(Matcher_AsmStatement_Test const
&);};::testing::TestInfo* const Matcher_AsmStatement_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "AsmStatement", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_AsmStatement_Test>);void Matcher_AsmStatement_Test
::TestBody()
{
2375 EXPECT_TRUE(matches("void foo() { __asm(\"mov al, 2\"); }", asmStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() { __asm(\"mov al, 2\"); }"
, asmStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2375, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() { __asm(\\\"mov al, 2\\\"); }\", asmStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
2376}
2377
2378TEST(Matcher, Conditions)class Matcher_Conditions_Test : public ::testing::Test { public
: Matcher_Conditions_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_Conditions_Test(Matcher_Conditions_Test const
&); void operator=(Matcher_Conditions_Test const &);
};::testing::TestInfo* const Matcher_Conditions_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "Conditions"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_Conditions_Test
>);void Matcher_Conditions_Test::TestBody()
{
2379 StatementMatcher Condition =
2380 ifStmt(hasCondition(cxxBoolLiteral(equals(true))));
2381
2382 EXPECT_TRUE(matches("void x() { if (true) {} }", Condition))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { if (true) {} }"
, Condition))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2382, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { if (true) {} }\", Condition)", "false"
, "true").c_str()) = ::testing::Message()
;
2383 EXPECT_TRUE(notMatches("void x() { if (false) {} }", Condition))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { if (false) {} }"
, Condition))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2383, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { if (false) {} }\", Condition)", "false"
, "true").c_str()) = ::testing::Message()
;
2384 EXPECT_TRUE(notMatches("void x() { bool a = true; if (a) {} }", Condition))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { bool a = true; if (a) {} }"
, Condition))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2384, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { bool a = true; if (a) {} }\", Condition)"
, "false", "true").c_str()) = ::testing::Message()
;
2385 EXPECT_TRUE(notMatches("void x() { if (true || false) {} }", Condition))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { if (true || false) {} }"
, Condition))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2385, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { if (true || false) {} }\", Condition)"
, "false", "true").c_str()) = ::testing::Message()
;
2386 EXPECT_TRUE(notMatches("void x() { if (1) {} }", Condition))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { if (1) {} }"
, Condition))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2386, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { if (1) {} }\", Condition)", "false"
, "true").c_str()) = ::testing::Message()
;
2387}
2388
2389TEST(IfStmt, ChildTraversalMatchers)class IfStmt_ChildTraversalMatchers_Test : public ::testing::
Test { public: IfStmt_ChildTraversalMatchers_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); IfStmt_ChildTraversalMatchers_Test
(IfStmt_ChildTraversalMatchers_Test const &); void operator
=(IfStmt_ChildTraversalMatchers_Test const &);};::testing
::TestInfo* const IfStmt_ChildTraversalMatchers_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "IfStmt", "ChildTraversalMatchers"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IfStmt_ChildTraversalMatchers_Test
>);void IfStmt_ChildTraversalMatchers_Test::TestBody()
{
2390 EXPECT_TRUE(matches("void f() { if (false) true; else false; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if (false) true; else false; }"
, ifStmt(hasThen(cxxBoolLiteral(equals(true))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2391, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if (false) true; else false; }\", ifStmt(hasThen(cxxBoolLiteral(equals(true)))))"
, "false", "true").c_str()) = ::testing::Message()
2391 ifStmt(hasThen(cxxBoolLiteral(equals(true))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if (false) true; else false; }"
, ifStmt(hasThen(cxxBoolLiteral(equals(true))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2391, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if (false) true; else false; }\", ifStmt(hasThen(cxxBoolLiteral(equals(true)))))"
, "false", "true").c_str()) = ::testing::Message()
;
2392 EXPECT_TRUE(notMatches("void f() { if (false) false; else true; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { if (false) false; else true; }"
, ifStmt(hasThen(cxxBoolLiteral(equals(true))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2393, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { if (false) false; else true; }\", ifStmt(hasThen(cxxBoolLiteral(equals(true)))))"
, "false", "true").c_str()) = ::testing::Message()
2393 ifStmt(hasThen(cxxBoolLiteral(equals(true))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { if (false) false; else true; }"
, ifStmt(hasThen(cxxBoolLiteral(equals(true))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2393, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { if (false) false; else true; }\", ifStmt(hasThen(cxxBoolLiteral(equals(true)))))"
, "false", "true").c_str()) = ::testing::Message()
;
2394 EXPECT_TRUE(matches("void f() { if (false) false; else true; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if (false) false; else true; }"
, ifStmt(hasElse(cxxBoolLiteral(equals(true))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2395, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if (false) false; else true; }\", ifStmt(hasElse(cxxBoolLiteral(equals(true)))))"
, "false", "true").c_str()) = ::testing::Message()
2395 ifStmt(hasElse(cxxBoolLiteral(equals(true))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if (false) false; else true; }"
, ifStmt(hasElse(cxxBoolLiteral(equals(true))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2395, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if (false) false; else true; }\", ifStmt(hasElse(cxxBoolLiteral(equals(true)))))"
, "false", "true").c_str()) = ::testing::Message()
;
2396 EXPECT_TRUE(notMatches("void f() { if (false) true; else false; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { if (false) true; else false; }"
, ifStmt(hasElse(cxxBoolLiteral(equals(true))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2397, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { if (false) true; else false; }\", ifStmt(hasElse(cxxBoolLiteral(equals(true)))))"
, "false", "true").c_str()) = ::testing::Message()
2397 ifStmt(hasElse(cxxBoolLiteral(equals(true))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { if (false) true; else false; }"
, ifStmt(hasElse(cxxBoolLiteral(equals(true))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2397, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { if (false) true; else false; }\", ifStmt(hasElse(cxxBoolLiteral(equals(true)))))"
, "false", "true").c_str()) = ::testing::Message()
;
2398}
2399
2400TEST(MatchBinaryOperator, HasOperatorName)class MatchBinaryOperator_HasOperatorName_Test : public ::testing
::Test { public: MatchBinaryOperator_HasOperatorName_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchBinaryOperator_HasOperatorName_Test
(MatchBinaryOperator_HasOperatorName_Test const &); void operator
=(MatchBinaryOperator_HasOperatorName_Test const &);};::testing
::TestInfo* const MatchBinaryOperator_HasOperatorName_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "MatchBinaryOperator"
, "HasOperatorName", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< MatchBinaryOperator_HasOperatorName_Test
>);void MatchBinaryOperator_HasOperatorName_Test::TestBody
()
{
2401 StatementMatcher OperatorOr = binaryOperator(hasOperatorName("||"));
2402
2403 EXPECT_TRUE(matches("void x() { true || false; }", OperatorOr))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { true || false; }"
, OperatorOr))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2403, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { true || false; }\", OperatorOr)", "false"
, "true").c_str()) = ::testing::Message()
;
2404 EXPECT_TRUE(notMatches("void x() { true && false; }", OperatorOr))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { true && false; }"
, OperatorOr))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2404, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { true && false; }\", OperatorOr)"
, "false", "true").c_str()) = ::testing::Message()
;
2405}
2406
2407TEST(MatchBinaryOperator, HasLHSAndHasRHS)class MatchBinaryOperator_HasLHSAndHasRHS_Test : public ::testing
::Test { public: MatchBinaryOperator_HasLHSAndHasRHS_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchBinaryOperator_HasLHSAndHasRHS_Test
(MatchBinaryOperator_HasLHSAndHasRHS_Test const &); void operator
=(MatchBinaryOperator_HasLHSAndHasRHS_Test const &);};::testing
::TestInfo* const MatchBinaryOperator_HasLHSAndHasRHS_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "MatchBinaryOperator"
, "HasLHSAndHasRHS", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< MatchBinaryOperator_HasLHSAndHasRHS_Test
>);void MatchBinaryOperator_HasLHSAndHasRHS_Test::TestBody
()
{
2408 StatementMatcher OperatorTrueFalse =
2409 binaryOperator(hasLHS(cxxBoolLiteral(equals(true))),
2410 hasRHS(cxxBoolLiteral(equals(false))));
2411
2412 EXPECT_TRUE(matches("void x() { true || false; }", OperatorTrueFalse))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { true || false; }"
, OperatorTrueFalse))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2412, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { true || false; }\", OperatorTrueFalse)"
, "false", "true").c_str()) = ::testing::Message()
;
2413 EXPECT_TRUE(matches("void x() { true && false; }", OperatorTrueFalse))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { true && false; }"
, OperatorTrueFalse))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2413, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { true && false; }\", OperatorTrueFalse)"
, "false", "true").c_str()) = ::testing::Message()
;
2414 EXPECT_TRUE(notMatches("void x() { false || true; }", OperatorTrueFalse))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { false || true; }"
, OperatorTrueFalse))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2414, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { false || true; }\", OperatorTrueFalse)"
, "false", "true").c_str()) = ::testing::Message()
;
2415
2416 StatementMatcher OperatorIntPointer = arraySubscriptExpr(
2417 hasLHS(hasType(isInteger())), hasRHS(hasType(pointsTo(qualType()))));
2418 EXPECT_TRUE(matches("void x() { 1[\"abc\"]; }", OperatorIntPointer))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { 1[\"abc\"]; }"
, OperatorIntPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2418, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { 1[\\\"abc\\\"]; }\", OperatorIntPointer)"
, "false", "true").c_str()) = ::testing::Message()
;
2419 EXPECT_TRUE(notMatches("void x() { \"abc\"[1]; }", OperatorIntPointer))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { \"abc\"[1]; }"
, OperatorIntPointer))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2419, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { \\\"abc\\\"[1]; }\", OperatorIntPointer)"
, "false", "true").c_str()) = ::testing::Message()
;
2420}
2421
2422TEST(MatchBinaryOperator, HasEitherOperand)class MatchBinaryOperator_HasEitherOperand_Test : public ::testing
::Test { public: MatchBinaryOperator_HasEitherOperand_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchBinaryOperator_HasEitherOperand_Test
(MatchBinaryOperator_HasEitherOperand_Test const &); void
operator=(MatchBinaryOperator_HasEitherOperand_Test const &
);};::testing::TestInfo* const MatchBinaryOperator_HasEitherOperand_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MatchBinaryOperator", "HasEitherOperand", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MatchBinaryOperator_HasEitherOperand_Test
>);void MatchBinaryOperator_HasEitherOperand_Test::TestBody
()
{
2423 StatementMatcher HasOperand =
2424 binaryOperator(hasEitherOperand(cxxBoolLiteral(equals(false))));
2425
2426 EXPECT_TRUE(matches("void x() { true || false; }", HasOperand))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { true || false; }"
, HasOperand))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2426, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { true || false; }\", HasOperand)", "false"
, "true").c_str()) = ::testing::Message()
;
2427 EXPECT_TRUE(matches("void x() { false && true; }", HasOperand))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { false && true; }"
, HasOperand))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2427, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { false && true; }\", HasOperand)"
, "false", "true").c_str()) = ::testing::Message()
;
2428 EXPECT_TRUE(notMatches("void x() { true || true; }", HasOperand))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { true || true; }"
, HasOperand))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2428, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { true || true; }\", HasOperand)", "false"
, "true").c_str()) = ::testing::Message()
;
2429}
2430
2431TEST(Matcher, BinaryOperatorTypes)class Matcher_BinaryOperatorTypes_Test : public ::testing::Test
{ public: Matcher_BinaryOperatorTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_BinaryOperatorTypes_Test(Matcher_BinaryOperatorTypes_Test
const &); void operator=(Matcher_BinaryOperatorTypes_Test
const &);};::testing::TestInfo* const Matcher_BinaryOperatorTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "BinaryOperatorTypes", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_BinaryOperatorTypes_Test>);void
Matcher_BinaryOperatorTypes_Test::TestBody()
{
2432 // Integration test that verifies the AST provides all binary operators in
2433 // a way we expect.
2434 // FIXME: Operator ','
2435 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { 3, 4; }"
, binaryOperator(hasOperatorName(","))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2436, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { 3, 4; }\", binaryOperator(hasOperatorName(\",\")))"
, "false", "true").c_str()) = ::testing::Message()
2436 matches("void x() { 3, 4; }", binaryOperator(hasOperatorName(","))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { 3, 4; }"
, binaryOperator(hasOperatorName(","))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2436, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { 3, 4; }\", binaryOperator(hasOperatorName(\",\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2437 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b; bool c = (b = true);"
, binaryOperator(hasOperatorName("="))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2439, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b; bool c = (b = true);\", binaryOperator(hasOperatorName(\"=\")))"
, "false", "true").c_str()) = ::testing::Message()
2438 matches("bool b; bool c = (b = true);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b; bool c = (b = true);"
, binaryOperator(hasOperatorName("="))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2439, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b; bool c = (b = true);\", binaryOperator(hasOperatorName(\"=\")))"
, "false", "true").c_str()) = ::testing::Message()
2439 binaryOperator(hasOperatorName("="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b; bool c = (b = true);"
, binaryOperator(hasOperatorName("="))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2439, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b; bool c = (b = true);\", binaryOperator(hasOperatorName(\"=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2440 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 != 2;"
, binaryOperator(hasOperatorName("!="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2441, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 != 2;\", binaryOperator(hasOperatorName(\"!=\")))"
, "false", "true").c_str()) = ::testing::Message()
2441 matches("bool b = 1 != 2;", binaryOperator(hasOperatorName("!="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 != 2;"
, binaryOperator(hasOperatorName("!="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2441, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 != 2;\", binaryOperator(hasOperatorName(\"!=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2442 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 == 2;"
, binaryOperator(hasOperatorName("=="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2443, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 == 2;\", binaryOperator(hasOperatorName(\"==\")))"
, "false", "true").c_str()) = ::testing::Message()
2443 matches("bool b = 1 == 2;", binaryOperator(hasOperatorName("=="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 == 2;"
, binaryOperator(hasOperatorName("=="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2443, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 == 2;\", binaryOperator(hasOperatorName(\"==\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2444 EXPECT_TRUE(matches("bool b = 1 < 2;", binaryOperator(hasOperatorName("<"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 < 2;"
, binaryOperator(hasOperatorName("<"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2444, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 < 2;\", binaryOperator(hasOperatorName(\"<\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2445 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 <= 2;"
, binaryOperator(hasOperatorName("<="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2446, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 <= 2;\", binaryOperator(hasOperatorName(\"<=\")))"
, "false", "true").c_str()) = ::testing::Message()
2446 matches("bool b = 1 <= 2;", binaryOperator(hasOperatorName("<="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 <= 2;"
, binaryOperator(hasOperatorName("<="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2446, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 <= 2;\", binaryOperator(hasOperatorName(\"<=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2447 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1 << 2;"
, binaryOperator(hasOperatorName("<<"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2448, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1 << 2;\", binaryOperator(hasOperatorName(\"<<\")))"
, "false", "true").c_str()) = ::testing::Message()
2448 matches("int i = 1 << 2;", binaryOperator(hasOperatorName("<<"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1 << 2;"
, binaryOperator(hasOperatorName("<<"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2448, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1 << 2;\", binaryOperator(hasOperatorName(\"<<\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2449 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1; int j = (i <<= 2);"
, binaryOperator(hasOperatorName("<<="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2451, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1; int j = (i <<= 2);\", binaryOperator(hasOperatorName(\"<<=\")))"
, "false", "true").c_str()) = ::testing::Message()
2450 matches("int i = 1; int j = (i <<= 2);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1; int j = (i <<= 2);"
, binaryOperator(hasOperatorName("<<="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2451, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1; int j = (i <<= 2);\", binaryOperator(hasOperatorName(\"<<=\")))"
, "false", "true").c_str()) = ::testing::Message()
2451 binaryOperator(hasOperatorName("<<="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1; int j = (i <<= 2);"
, binaryOperator(hasOperatorName("<<="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2451, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1; int j = (i <<= 2);\", binaryOperator(hasOperatorName(\"<<=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2452 EXPECT_TRUE(matches("bool b = 1 > 2;", binaryOperator(hasOperatorName(">"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 > 2;"
, binaryOperator(hasOperatorName(">"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2452, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 > 2;\", binaryOperator(hasOperatorName(\">\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2453 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 >= 2;"
, binaryOperator(hasOperatorName(">="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2454, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 >= 2;\", binaryOperator(hasOperatorName(\">=\")))"
, "false", "true").c_str()) = ::testing::Message()
2454 matches("bool b = 1 >= 2;", binaryOperator(hasOperatorName(">="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 1 >= 2;"
, binaryOperator(hasOperatorName(">="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2454, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 1 >= 2;\", binaryOperator(hasOperatorName(\">=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2455 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1 >> 2;"
, binaryOperator(hasOperatorName(">>"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2456, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1 >> 2;\", binaryOperator(hasOperatorName(\">>\")))"
, "false", "true").c_str()) = ::testing::Message()
2456 matches("int i = 1 >> 2;", binaryOperator(hasOperatorName(">>"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1 >> 2;"
, binaryOperator(hasOperatorName(">>"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2456, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1 >> 2;\", binaryOperator(hasOperatorName(\">>\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2457 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1; int j = (i >>= 2);"
, binaryOperator(hasOperatorName(">>="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2459, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1; int j = (i >>= 2);\", binaryOperator(hasOperatorName(\">>=\")))"
, "false", "true").c_str()) = ::testing::Message()
2458 matches("int i = 1; int j = (i >>= 2);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1; int j = (i >>= 2);"
, binaryOperator(hasOperatorName(">>="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2459, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1; int j = (i >>= 2);\", binaryOperator(hasOperatorName(\">>=\")))"
, "false", "true").c_str()) = ::testing::Message()
2459 binaryOperator(hasOperatorName(">>="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 1; int j = (i >>= 2);"
, binaryOperator(hasOperatorName(">>="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2459, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 1; int j = (i >>= 2);\", binaryOperator(hasOperatorName(\">>=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2460 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 ^ 23;"
, binaryOperator(hasOperatorName("^"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2461, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 ^ 23;\", binaryOperator(hasOperatorName(\"^\")))"
, "false", "true").c_str()) = ::testing::Message()
2461 matches("int i = 42 ^ 23;", binaryOperator(hasOperatorName("^"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 ^ 23;"
, binaryOperator(hasOperatorName("^"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2461, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 ^ 23;\", binaryOperator(hasOperatorName(\"^\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2462 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i ^= 42);"
, binaryOperator(hasOperatorName("^="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2464, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i ^= 42);\", binaryOperator(hasOperatorName(\"^=\")))"
, "false", "true").c_str()) = ::testing::Message()
2463 matches("int i = 42; int j = (i ^= 42);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i ^= 42);"
, binaryOperator(hasOperatorName("^="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2464, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i ^= 42);\", binaryOperator(hasOperatorName(\"^=\")))"
, "false", "true").c_str()) = ::testing::Message()
2464 binaryOperator(hasOperatorName("^="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i ^= 42);"
, binaryOperator(hasOperatorName("^="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2464, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i ^= 42);\", binaryOperator(hasOperatorName(\"^=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2465 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 % 23;"
, binaryOperator(hasOperatorName("%"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2466, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 % 23;\", binaryOperator(hasOperatorName(\"%\")))"
, "false", "true").c_str()) = ::testing::Message()
2466 matches("int i = 42 % 23;", binaryOperator(hasOperatorName("%"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 % 23;"
, binaryOperator(hasOperatorName("%"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2466, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 % 23;\", binaryOperator(hasOperatorName(\"%\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2467 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i %= 42);"
, binaryOperator(hasOperatorName("%="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2469, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i %= 42);\", binaryOperator(hasOperatorName(\"%=\")))"
, "false", "true").c_str()) = ::testing::Message()
2468 matches("int i = 42; int j = (i %= 42);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i %= 42);"
, binaryOperator(hasOperatorName("%="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2469, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i %= 42);\", binaryOperator(hasOperatorName(\"%=\")))"
, "false", "true").c_str()) = ::testing::Message()
2469 binaryOperator(hasOperatorName("%="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i %= 42);"
, binaryOperator(hasOperatorName("%="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2469, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i %= 42);\", binaryOperator(hasOperatorName(\"%=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2470 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 42 &23;"
, binaryOperator(hasOperatorName("&"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2471, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 42 &23;\", binaryOperator(hasOperatorName(\"&\")))"
, "false", "true").c_str()) = ::testing::Message()
2471 matches("bool b = 42 &23;", binaryOperator(hasOperatorName("&"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 42 &23;"
, binaryOperator(hasOperatorName("&"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2471, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 42 &23;\", binaryOperator(hasOperatorName(\"&\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2472 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true && false;"
, binaryOperator(hasOperatorName("&&"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2474, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true && false;\", binaryOperator(hasOperatorName(\"&&\")))"
, "false", "true").c_str()) = ::testing::Message()
2473 matches("bool b = true && false;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true && false;"
, binaryOperator(hasOperatorName("&&"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2474, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true && false;\", binaryOperator(hasOperatorName(\"&&\")))"
, "false", "true").c_str()) = ::testing::Message()
2474 binaryOperator(hasOperatorName("&&"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true && false;"
, binaryOperator(hasOperatorName("&&"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2474, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true && false;\", binaryOperator(hasOperatorName(\"&&\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2475 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true; bool c = (b &= false);"
, binaryOperator(hasOperatorName("&="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2477, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true; bool c = (b &= false);\", binaryOperator(hasOperatorName(\"&=\")))"
, "false", "true").c_str()) = ::testing::Message()
2476 matches("bool b = true; bool c = (b &= false);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true; bool c = (b &= false);"
, binaryOperator(hasOperatorName("&="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2477, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true; bool c = (b &= false);\", binaryOperator(hasOperatorName(\"&=\")))"
, "false", "true").c_str()) = ::testing::Message()
2477 binaryOperator(hasOperatorName("&="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true; bool c = (b &= false);"
, binaryOperator(hasOperatorName("&="))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2477, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true; bool c = (b &= false);\", binaryOperator(hasOperatorName(\"&=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2478 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 42 | 23;"
, binaryOperator(hasOperatorName("|"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 42 | 23;\", binaryOperator(hasOperatorName(\"|\")))"
, "false", "true").c_str()) = ::testing::Message()
2479 matches("bool b = 42 | 23;", binaryOperator(hasOperatorName("|"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = 42 | 23;"
, binaryOperator(hasOperatorName("|"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = 42 | 23;\", binaryOperator(hasOperatorName(\"|\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2480 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true || false;"
, binaryOperator(hasOperatorName("||"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2482, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true || false;\", binaryOperator(hasOperatorName(\"||\")))"
, "false", "true").c_str()) = ::testing::Message()
2481 matches("bool b = true || false;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true || false;"
, binaryOperator(hasOperatorName("||"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2482, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true || false;\", binaryOperator(hasOperatorName(\"||\")))"
, "false", "true").c_str()) = ::testing::Message()
2482 binaryOperator(hasOperatorName("||"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true || false;"
, binaryOperator(hasOperatorName("||"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2482, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true || false;\", binaryOperator(hasOperatorName(\"||\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2483 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true; bool c = (b |= false);"
, binaryOperator(hasOperatorName("|="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true; bool c = (b |= false);\", binaryOperator(hasOperatorName(\"|=\")))"
, "false", "true").c_str()) = ::testing::Message()
2484 matches("bool b = true; bool c = (b |= false);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true; bool c = (b |= false);"
, binaryOperator(hasOperatorName("|="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true; bool c = (b |= false);\", binaryOperator(hasOperatorName(\"|=\")))"
, "false", "true").c_str()) = ::testing::Message()
2485 binaryOperator(hasOperatorName("|="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = true; bool c = (b |= false);"
, binaryOperator(hasOperatorName("|="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = true; bool c = (b |= false);\", binaryOperator(hasOperatorName(\"|=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2486 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 *23;"
, binaryOperator(hasOperatorName("*"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2487, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 *23;\", binaryOperator(hasOperatorName(\"*\")))"
, "false", "true").c_str()) = ::testing::Message()
2487 matches("int i = 42 *23;", binaryOperator(hasOperatorName("*"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 *23;"
, binaryOperator(hasOperatorName("*"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2487, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 *23;\", binaryOperator(hasOperatorName(\"*\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2488 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i *= 23);"
, binaryOperator(hasOperatorName("*="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2490, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i *= 23);\", binaryOperator(hasOperatorName(\"*=\")))"
, "false", "true").c_str()) = ::testing::Message()
2489 matches("int i = 42; int j = (i *= 23);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i *= 23);"
, binaryOperator(hasOperatorName("*="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2490, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i *= 23);\", binaryOperator(hasOperatorName(\"*=\")))"
, "false", "true").c_str()) = ::testing::Message()
2490 binaryOperator(hasOperatorName("*="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i *= 23);"
, binaryOperator(hasOperatorName("*="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2490, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i *= 23);\", binaryOperator(hasOperatorName(\"*=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2491 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 / 23;"
, binaryOperator(hasOperatorName("/"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2492, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 / 23;\", binaryOperator(hasOperatorName(\"/\")))"
, "false", "true").c_str()) = ::testing::Message()
2492 matches("int i = 42 / 23;", binaryOperator(hasOperatorName("/"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 / 23;"
, binaryOperator(hasOperatorName("/"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2492, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 / 23;\", binaryOperator(hasOperatorName(\"/\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2493 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i /= 23);"
, binaryOperator(hasOperatorName("/="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2495, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i /= 23);\", binaryOperator(hasOperatorName(\"/=\")))"
, "false", "true").c_str()) = ::testing::Message()
2494 matches("int i = 42; int j = (i /= 23);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i /= 23);"
, binaryOperator(hasOperatorName("/="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2495, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i /= 23);\", binaryOperator(hasOperatorName(\"/=\")))"
, "false", "true").c_str()) = ::testing::Message()
2495 binaryOperator(hasOperatorName("/="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i /= 23);"
, binaryOperator(hasOperatorName("/="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2495, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i /= 23);\", binaryOperator(hasOperatorName(\"/=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2496 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 + 23;"
, binaryOperator(hasOperatorName("+"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2497, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 + 23;\", binaryOperator(hasOperatorName(\"+\")))"
, "false", "true").c_str()) = ::testing::Message()
2497 matches("int i = 42 + 23;", binaryOperator(hasOperatorName("+"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 + 23;"
, binaryOperator(hasOperatorName("+"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2497, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 + 23;\", binaryOperator(hasOperatorName(\"+\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2498 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i += 23);"
, binaryOperator(hasOperatorName("+="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2500, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i += 23);\", binaryOperator(hasOperatorName(\"+=\")))"
, "false", "true").c_str()) = ::testing::Message()
2499 matches("int i = 42; int j = (i += 23);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i += 23);"
, binaryOperator(hasOperatorName("+="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2500, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i += 23);\", binaryOperator(hasOperatorName(\"+=\")))"
, "false", "true").c_str()) = ::testing::Message()
2500 binaryOperator(hasOperatorName("+="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i += 23);"
, binaryOperator(hasOperatorName("+="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2500, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i += 23);\", binaryOperator(hasOperatorName(\"+=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2501 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 - 23;"
, binaryOperator(hasOperatorName("-"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2502, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 - 23;\", binaryOperator(hasOperatorName(\"-\")))"
, "false", "true").c_str()) = ::testing::Message()
2502 matches("int i = 42 - 23;", binaryOperator(hasOperatorName("-"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42 - 23;"
, binaryOperator(hasOperatorName("-"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2502, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42 - 23;\", binaryOperator(hasOperatorName(\"-\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2503 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i -= 23);"
, binaryOperator(hasOperatorName("-="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2505, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i -= 23);\", binaryOperator(hasOperatorName(\"-=\")))"
, "false", "true").c_str()) = ::testing::Message()
2504 matches("int i = 42; int j = (i -= 23);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i -= 23);"
, binaryOperator(hasOperatorName("-="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2505, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i -= 23);\", binaryOperator(hasOperatorName(\"-=\")))"
, "false", "true").c_str()) = ::testing::Message()
2505 binaryOperator(hasOperatorName("-="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int j = (i -= 23);"
, binaryOperator(hasOperatorName("-="))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2505, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int j = (i -= 23);\", binaryOperator(hasOperatorName(\"-=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2506 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void x() { void (A::*a)(); (this->*a)(); } };"
, binaryOperator(hasOperatorName("->*"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2508, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void x() { void (A::*a)(); (this->*a)(); } };\", binaryOperator(hasOperatorName(\"->*\")))"
, "false", "true").c_str()) = ::testing::Message()
2507 matches("struct A { void x() { void (A::*a)(); (this->*a)(); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void x() { void (A::*a)(); (this->*a)(); } };"
, binaryOperator(hasOperatorName("->*"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2508, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void x() { void (A::*a)(); (this->*a)(); } };\", binaryOperator(hasOperatorName(\"->*\")))"
, "false", "true").c_str()) = ::testing::Message()
2508 binaryOperator(hasOperatorName("->*"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void x() { void (A::*a)(); (this->*a)(); } };"
, binaryOperator(hasOperatorName("->*"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2508, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void x() { void (A::*a)(); (this->*a)(); } };\", binaryOperator(hasOperatorName(\"->*\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2509 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void x() { void (A::*a)(); ((*this).*a)(); } };"
, binaryOperator(hasOperatorName(".*"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2511, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void x() { void (A::*a)(); ((*this).*a)(); } };\", binaryOperator(hasOperatorName(\".*\")))"
, "false", "true").c_str()) = ::testing::Message()
2510 matches("struct A { void x() { void (A::*a)(); ((*this).*a)(); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void x() { void (A::*a)(); ((*this).*a)(); } };"
, binaryOperator(hasOperatorName(".*"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2511, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void x() { void (A::*a)(); ((*this).*a)(); } };\", binaryOperator(hasOperatorName(\".*\")))"
, "false", "true").c_str()) = ::testing::Message()
2511 binaryOperator(hasOperatorName(".*"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void x() { void (A::*a)(); ((*this).*a)(); } };"
, binaryOperator(hasOperatorName(".*"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2511, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void x() { void (A::*a)(); ((*this).*a)(); } };\", binaryOperator(hasOperatorName(\".*\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2512
2513 // Member expressions as operators are not supported in matches.
2514 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct A { void x(A *a) { a->x(this); } };"
, binaryOperator(hasOperatorName("->"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2516, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct A { void x(A *a) { a->x(this); } };\", binaryOperator(hasOperatorName(\"->\")))"
, "false", "true").c_str()) = ::testing::Message()
2515 notMatches("struct A { void x(A *a) { a->x(this); } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct A { void x(A *a) { a->x(this); } };"
, binaryOperator(hasOperatorName("->"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2516, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct A { void x(A *a) { a->x(this); } };\", binaryOperator(hasOperatorName(\"->\")))"
, "false", "true").c_str()) = ::testing::Message()
2516 binaryOperator(hasOperatorName("->"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct A { void x(A *a) { a->x(this); } };"
, binaryOperator(hasOperatorName("->"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2516, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct A { void x(A *a) { a->x(this); } };\", binaryOperator(hasOperatorName(\"->\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2517
2518 // Initializer assignments are not represented as operator equals.
2519 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("bool b = true;"
, binaryOperator(hasOperatorName("="))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2520, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"bool b = true;\", binaryOperator(hasOperatorName(\"=\")))"
, "false", "true").c_str()) = ::testing::Message()
2520 notMatches("bool b = true;", binaryOperator(hasOperatorName("="))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("bool b = true;"
, binaryOperator(hasOperatorName("="))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2520, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"bool b = true;\", binaryOperator(hasOperatorName(\"=\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2521
2522 // Array indexing is not represented as operator.
2523 EXPECT_TRUE(notMatches("int a[42]; void x() { a[23]; }", unaryOperator()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int a[42]; void x() { a[23]; }"
, unaryOperator()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2523, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int a[42]; void x() { a[23]; }\", unaryOperator())"
, "false", "true").c_str()) = ::testing::Message()
;
2524
2525 // Overloaded operators do not match at all.
2526 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { bool operator&&(const A &a) const { return false; } };"
"void x() { A a, b; a && b; }", binaryOperator()))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2529, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { bool operator&&(const A &a) const { return false; } };\" \"void x() { A a, b; a && b; }\", binaryOperator())"
, "false", "true").c_str()) = ::testing::Message()
2527 "struct A { bool operator&&(const A &a) const { return false; } };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { bool operator&&(const A &a) const { return false; } };"
"void x() { A a, b; a && b; }", binaryOperator()))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2529, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { bool operator&&(const A &a) const { return false; } };\" \"void x() { A a, b; a && b; }\", binaryOperator())"
, "false", "true").c_str()) = ::testing::Message()
2528 "void x() { A a, b; a && b; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { bool operator&&(const A &a) const { return false; } };"
"void x() { A a, b; a && b; }", binaryOperator()))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2529, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { bool operator&&(const A &a) const { return false; } };\" \"void x() { A a, b; a && b; }\", binaryOperator())"
, "false", "true").c_str()) = ::testing::Message()
2529 binaryOperator()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { bool operator&&(const A &a) const { return false; } };"
"void x() { A a, b; a && b; }", binaryOperator()))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2529, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { bool operator&&(const A &a) const { return false; } };\" \"void x() { A a, b; a && b; }\", binaryOperator())"
, "false", "true").c_str()) = ::testing::Message()
;
2530}
2531
2532TEST(MatchUnaryOperator, HasOperatorName)class MatchUnaryOperator_HasOperatorName_Test : public ::testing
::Test { public: MatchUnaryOperator_HasOperatorName_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchUnaryOperator_HasOperatorName_Test
(MatchUnaryOperator_HasOperatorName_Test const &); void operator
=(MatchUnaryOperator_HasOperatorName_Test const &);};::testing
::TestInfo* const MatchUnaryOperator_HasOperatorName_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "MatchUnaryOperator"
, "HasOperatorName", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< MatchUnaryOperator_HasOperatorName_Test
>);void MatchUnaryOperator_HasOperatorName_Test::TestBody(
)
{
2533 StatementMatcher OperatorNot = unaryOperator(hasOperatorName("!"));
2534
2535 EXPECT_TRUE(matches("void x() { !true; } ", OperatorNot))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { !true; } "
, OperatorNot))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2535, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { !true; } \", OperatorNot)", "false", "true"
).c_str()) = ::testing::Message()
;
2536 EXPECT_TRUE(notMatches("void x() { true; } ", OperatorNot))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { true; } "
, OperatorNot))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { true; } \", OperatorNot)", "false"
, "true").c_str()) = ::testing::Message()
;
2537}
2538
2539TEST(MatchUnaryOperator, HasUnaryOperand)class MatchUnaryOperator_HasUnaryOperand_Test : public ::testing
::Test { public: MatchUnaryOperator_HasUnaryOperand_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchUnaryOperator_HasUnaryOperand_Test
(MatchUnaryOperator_HasUnaryOperand_Test const &); void operator
=(MatchUnaryOperator_HasUnaryOperand_Test const &);};::testing
::TestInfo* const MatchUnaryOperator_HasUnaryOperand_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "MatchUnaryOperator"
, "HasUnaryOperand", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< MatchUnaryOperator_HasUnaryOperand_Test
>);void MatchUnaryOperator_HasUnaryOperand_Test::TestBody(
)
{
2540 StatementMatcher OperatorOnFalse =
2541 unaryOperator(hasUnaryOperand(cxxBoolLiteral(equals(false))));
2542
2543 EXPECT_TRUE(matches("void x() { !false; }", OperatorOnFalse))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { !false; }"
, OperatorOnFalse))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2543, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { !false; }\", OperatorOnFalse)", "false"
, "true").c_str()) = ::testing::Message()
;
2544 EXPECT_TRUE(notMatches("void x() { !true; }", OperatorOnFalse))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { !true; }"
, OperatorOnFalse))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2544, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { !true; }\", OperatorOnFalse)", "false"
, "true").c_str()) = ::testing::Message()
;
2545}
2546
2547TEST(Matcher, UnaryOperatorTypes)class Matcher_UnaryOperatorTypes_Test : public ::testing::Test
{ public: Matcher_UnaryOperatorTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_UnaryOperatorTypes_Test(Matcher_UnaryOperatorTypes_Test
const &); void operator=(Matcher_UnaryOperatorTypes_Test
const &);};::testing::TestInfo* const Matcher_UnaryOperatorTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "UnaryOperatorTypes", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_UnaryOperatorTypes_Test>);void Matcher_UnaryOperatorTypes_Test
::TestBody()
{
2548 // Integration test that verifies the AST provides all unary operators in
2549 // a way we expect.
2550 EXPECT_TRUE(matches("bool b = !true;", unaryOperator(hasOperatorName("!"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b = !true;"
, unaryOperator(hasOperatorName("!"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2550, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b = !true;\", unaryOperator(hasOperatorName(\"!\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2551 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b; bool *p = &b;"
, unaryOperator(hasOperatorName("&"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2552, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b; bool *p = &b;\", unaryOperator(hasOperatorName(\"&\")))"
, "false", "true").c_str()) = ::testing::Message()
2552 matches("bool b; bool *p = &b;", unaryOperator(hasOperatorName("&"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool b; bool *p = &b;"
, unaryOperator(hasOperatorName("&"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2552, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool b; bool *p = &b;\", unaryOperator(hasOperatorName(\"&\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2553 EXPECT_TRUE(matches("int i = ~ 1;", unaryOperator(hasOperatorName("~"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = ~ 1;"
, unaryOperator(hasOperatorName("~"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2553, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = ~ 1;\", unaryOperator(hasOperatorName(\"~\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2554 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool *p; bool b = *p;"
, unaryOperator(hasOperatorName("*"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2555, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool *p; bool b = *p;\", unaryOperator(hasOperatorName(\"*\")))"
, "false", "true").c_str()) = ::testing::Message()
2555 matches("bool *p; bool b = *p;", unaryOperator(hasOperatorName("*"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("bool *p; bool b = *p;"
, unaryOperator(hasOperatorName("*"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2555, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"bool *p; bool b = *p;\", unaryOperator(hasOperatorName(\"*\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2556 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = +i;"
, unaryOperator(hasOperatorName("+"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2557, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = +i;\", unaryOperator(hasOperatorName(\"+\")))"
, "false", "true").c_str()) = ::testing::Message()
2557 matches("int i; int j = +i;", unaryOperator(hasOperatorName("+"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = +i;"
, unaryOperator(hasOperatorName("+"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2557, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = +i;\", unaryOperator(hasOperatorName(\"+\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2558 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = -i;"
, unaryOperator(hasOperatorName("-"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2559, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = -i;\", unaryOperator(hasOperatorName(\"-\")))"
, "false", "true").c_str()) = ::testing::Message()
2559 matches("int i; int j = -i;", unaryOperator(hasOperatorName("-"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = -i;"
, unaryOperator(hasOperatorName("-"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2559, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = -i;\", unaryOperator(hasOperatorName(\"-\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2560 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = ++i;"
, unaryOperator(hasOperatorName("++"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2561, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = ++i;\", unaryOperator(hasOperatorName(\"++\")))"
, "false", "true").c_str()) = ::testing::Message()
2561 matches("int i; int j = ++i;", unaryOperator(hasOperatorName("++"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = ++i;"
, unaryOperator(hasOperatorName("++"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2561, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = ++i;\", unaryOperator(hasOperatorName(\"++\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2562 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = i++;"
, unaryOperator(hasOperatorName("++"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2563, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = i++;\", unaryOperator(hasOperatorName(\"++\")))"
, "false", "true").c_str()) = ::testing::Message()
2563 matches("int i; int j = i++;", unaryOperator(hasOperatorName("++"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = i++;"
, unaryOperator(hasOperatorName("++"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2563, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = i++;\", unaryOperator(hasOperatorName(\"++\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2564 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = --i;"
, unaryOperator(hasOperatorName("--"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2565, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = --i;\", unaryOperator(hasOperatorName(\"--\")))"
, "false", "true").c_str()) = ::testing::Message()
2565 matches("int i; int j = --i;", unaryOperator(hasOperatorName("--"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = --i;"
, unaryOperator(hasOperatorName("--"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2565, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = --i;\", unaryOperator(hasOperatorName(\"--\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2566 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = i--;"
, unaryOperator(hasOperatorName("--"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2567, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = i--;\", unaryOperator(hasOperatorName(\"--\")))"
, "false", "true").c_str()) = ::testing::Message()
2567 matches("int i; int j = i--;", unaryOperator(hasOperatorName("--"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i; int j = i--;"
, unaryOperator(hasOperatorName("--"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2567, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i; int j = i--;\", unaryOperator(hasOperatorName(\"--\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2568
2569 // We don't match conversion operators.
2570 EXPECT_TRUE(notMatches("int i; double d = (double)i;", unaryOperator()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i; double d = (double)i;"
, unaryOperator()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2570, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i; double d = (double)i;\", unaryOperator())"
, "false", "true").c_str()) = ::testing::Message()
;
2571
2572 // Function calls are not represented as operator.
2573 EXPECT_TRUE(notMatches("void f(); void x() { f(); }", unaryOperator()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(); void x() { f(); }"
, unaryOperator()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2573, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(); void x() { f(); }\", unaryOperator())"
, "false", "true").c_str()) = ::testing::Message()
;
2574
2575 // Overloaded operators do not match at all.
2576 // FIXME: We probably want to add that.
2577 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { bool operator!() const { return false; } };"
"void x() { A a; !a; }", unaryOperator(hasOperatorName("!"))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2579, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { bool operator!() const { return false; } };\" \"void x() { A a; !a; }\", unaryOperator(hasOperatorName(\"!\")))"
, "false", "true").c_str()) = ::testing::Message()
2578 "struct A { bool operator!() const { return false; } };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { bool operator!() const { return false; } };"
"void x() { A a; !a; }", unaryOperator(hasOperatorName("!"))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2579, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { bool operator!() const { return false; } };\" \"void x() { A a; !a; }\", unaryOperator(hasOperatorName(\"!\")))"
, "false", "true").c_str()) = ::testing::Message()
2579 "void x() { A a; !a; }", unaryOperator(hasOperatorName("!"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { bool operator!() const { return false; } };"
"void x() { A a; !a; }", unaryOperator(hasOperatorName("!"))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2579, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { bool operator!() const { return false; } };\" \"void x() { A a; !a; }\", unaryOperator(hasOperatorName(\"!\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2580}
2581
2582TEST(Matcher, ConditionalOperator)class Matcher_ConditionalOperator_Test : public ::testing::Test
{ public: Matcher_ConditionalOperator_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_ConditionalOperator_Test(Matcher_ConditionalOperator_Test
const &); void operator=(Matcher_ConditionalOperator_Test
const &);};::testing::TestInfo* const Matcher_ConditionalOperator_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "ConditionalOperator", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_ConditionalOperator_Test>);void
Matcher_ConditionalOperator_Test::TestBody()
{
2583 StatementMatcher Conditional = conditionalOperator(
2584 hasCondition(cxxBoolLiteral(equals(true))),
2585 hasTrueExpression(cxxBoolLiteral(equals(false))));
2586
2587 EXPECT_TRUE(matches("void x() { true ? false : true; }", Conditional))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { true ? false : true; }"
, Conditional))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2587, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { true ? false : true; }\", Conditional)"
, "false", "true").c_str()) = ::testing::Message()
;
2588 EXPECT_TRUE(notMatches("void x() { false ? false : true; }", Conditional))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { false ? false : true; }"
, Conditional))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2588, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { false ? false : true; }\", Conditional)"
, "false", "true").c_str()) = ::testing::Message()
;
2589 EXPECT_TRUE(notMatches("void x() { true ? true : false; }", Conditional))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { true ? true : false; }"
, Conditional))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2589, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { true ? true : false; }\", Conditional)"
, "false", "true").c_str()) = ::testing::Message()
;
2590
2591 StatementMatcher ConditionalFalse = conditionalOperator(
2592 hasFalseExpression(cxxBoolLiteral(equals(false))));
2593
2594 EXPECT_TRUE(matches("void x() { true ? true : false; }", ConditionalFalse))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { true ? true : false; }"
, ConditionalFalse))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2594, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { true ? true : false; }\", ConditionalFalse)"
, "false", "true").c_str()) = ::testing::Message()
;
2595 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { true ? false : true; }"
, ConditionalFalse))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2596, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { true ? false : true; }\", ConditionalFalse)"
, "false", "true").c_str()) = ::testing::Message()
2596 notMatches("void x() { true ? false : true; }", ConditionalFalse))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { true ? false : true; }"
, ConditionalFalse))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2596, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { true ? false : true; }\", ConditionalFalse)"
, "false", "true").c_str()) = ::testing::Message()
;
2597}
2598
2599TEST(ArraySubscriptMatchers, ArraySubscripts)class ArraySubscriptMatchers_ArraySubscripts_Test : public ::
testing::Test { public: ArraySubscriptMatchers_ArraySubscripts_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ArraySubscriptMatchers_ArraySubscripts_Test
(ArraySubscriptMatchers_ArraySubscripts_Test const &); void
operator=(ArraySubscriptMatchers_ArraySubscripts_Test const &
);};::testing::TestInfo* const ArraySubscriptMatchers_ArraySubscripts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ArraySubscriptMatchers", "ArraySubscripts", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ArraySubscriptMatchers_ArraySubscripts_Test
>);void ArraySubscriptMatchers_ArraySubscripts_Test::TestBody
()
{
2600 EXPECT_TRUE(matches("int i[2]; void f() { i[1] = 1; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i[2]; void f() { i[1] = 1; }"
, arraySubscriptExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2601, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i[2]; void f() { i[1] = 1; }\", arraySubscriptExpr())"
, "false", "true").c_str()) = ::testing::Message()
2601 arraySubscriptExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i[2]; void f() { i[1] = 1; }"
, arraySubscriptExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2601, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i[2]; void f() { i[1] = 1; }\", arraySubscriptExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
2602 EXPECT_TRUE(notMatches("int i; void f() { i = 1; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i; void f() { i = 1; }"
, arraySubscriptExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2603, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i; void f() { i = 1; }\", arraySubscriptExpr())"
, "false", "true").c_str()) = ::testing::Message()
2603 arraySubscriptExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i; void f() { i = 1; }"
, arraySubscriptExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2603, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i; void f() { i = 1; }\", arraySubscriptExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
2604}
2605
2606TEST(ArraySubscriptMatchers, ArrayIndex)class ArraySubscriptMatchers_ArrayIndex_Test : public ::testing
::Test { public: ArraySubscriptMatchers_ArrayIndex_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ArraySubscriptMatchers_ArrayIndex_Test
(ArraySubscriptMatchers_ArrayIndex_Test const &); void operator
=(ArraySubscriptMatchers_ArrayIndex_Test const &);};::testing
::TestInfo* const ArraySubscriptMatchers_ArrayIndex_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ArraySubscriptMatchers"
, "ArrayIndex", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ArraySubscriptMatchers_ArrayIndex_Test
>);void ArraySubscriptMatchers_ArrayIndex_Test::TestBody()
{
2607 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { i[1] = 1; }"
, arraySubscriptExpr(hasIndex(integerLiteral(equals(1))))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2609, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { i[1] = 1; }\", arraySubscriptExpr(hasIndex(integerLiteral(equals(1)))))"
, "false", "true").c_str()) = ::testing::Message()
2608 "int i[2]; void f() { i[1] = 1; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { i[1] = 1; }"
, arraySubscriptExpr(hasIndex(integerLiteral(equals(1))))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2609, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { i[1] = 1; }\", arraySubscriptExpr(hasIndex(integerLiteral(equals(1)))))"
, "false", "true").c_str()) = ::testing::Message()
2609 arraySubscriptExpr(hasIndex(integerLiteral(equals(1))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { i[1] = 1; }"
, arraySubscriptExpr(hasIndex(integerLiteral(equals(1))))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2609, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { i[1] = 1; }\", arraySubscriptExpr(hasIndex(integerLiteral(equals(1)))))"
, "false", "true").c_str()) = ::testing::Message()
;
2610 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { 1[i] = 1; }"
, arraySubscriptExpr(hasIndex(integerLiteral(equals(1))))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2612, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { 1[i] = 1; }\", arraySubscriptExpr(hasIndex(integerLiteral(equals(1)))))"
, "false", "true").c_str()) = ::testing::Message()
2611 "int i[2]; void f() { 1[i] = 1; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { 1[i] = 1; }"
, arraySubscriptExpr(hasIndex(integerLiteral(equals(1))))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2612, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { 1[i] = 1; }\", arraySubscriptExpr(hasIndex(integerLiteral(equals(1)))))"
, "false", "true").c_str()) = ::testing::Message()
2612 arraySubscriptExpr(hasIndex(integerLiteral(equals(1))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { 1[i] = 1; }"
, arraySubscriptExpr(hasIndex(integerLiteral(equals(1))))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2612, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { 1[i] = 1; }\", arraySubscriptExpr(hasIndex(integerLiteral(equals(1)))))"
, "false", "true").c_str()) = ::testing::Message()
;
2613 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int i[2]; void f() { i[1] = 1; }"
, arraySubscriptExpr(hasIndex(integerLiteral(equals(0))))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2615, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int i[2]; void f() { i[1] = 1; }\", arraySubscriptExpr(hasIndex(integerLiteral(equals(0)))))"
, "false", "true").c_str()) = ::testing::Message()
2614 "int i[2]; void f() { i[1] = 1; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int i[2]; void f() { i[1] = 1; }"
, arraySubscriptExpr(hasIndex(integerLiteral(equals(0))))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2615, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int i[2]; void f() { i[1] = 1; }\", arraySubscriptExpr(hasIndex(integerLiteral(equals(0)))))"
, "false", "true").c_str()) = ::testing::Message()
2615 arraySubscriptExpr(hasIndex(integerLiteral(equals(0))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int i[2]; void f() { i[1] = 1; }"
, arraySubscriptExpr(hasIndex(integerLiteral(equals(0))))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2615, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int i[2]; void f() { i[1] = 1; }\", arraySubscriptExpr(hasIndex(integerLiteral(equals(0)))))"
, "false", "true").c_str()) = ::testing::Message()
;
2616}
2617
2618TEST(ArraySubscriptMatchers, MatchesArrayBase)class ArraySubscriptMatchers_MatchesArrayBase_Test : public ::
testing::Test { public: ArraySubscriptMatchers_MatchesArrayBase_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ArraySubscriptMatchers_MatchesArrayBase_Test
(ArraySubscriptMatchers_MatchesArrayBase_Test const &); void
operator=(ArraySubscriptMatchers_MatchesArrayBase_Test const
&);};::testing::TestInfo* const ArraySubscriptMatchers_MatchesArrayBase_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ArraySubscriptMatchers", "MatchesArrayBase", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ArraySubscriptMatchers_MatchesArrayBase_Test
>);void ArraySubscriptMatchers_MatchesArrayBase_Test::TestBody
()
{
2619 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { i[1] = 2; }"
, arraySubscriptExpr(hasBase(implicitCastExpr( hasSourceExpression
(declRefExpr()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2622, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { i[1] = 2; }\", arraySubscriptExpr(hasBase(implicitCastExpr( hasSourceExpression(declRefExpr())))))"
, "false", "true").c_str()) = ::testing::Message()
2620 "int i[2]; void f() { i[1] = 2; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { i[1] = 2; }"
, arraySubscriptExpr(hasBase(implicitCastExpr( hasSourceExpression
(declRefExpr()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2622, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { i[1] = 2; }\", arraySubscriptExpr(hasBase(implicitCastExpr( hasSourceExpression(declRefExpr())))))"
, "false", "true").c_str()) = ::testing::Message()
2621 arraySubscriptExpr(hasBase(implicitCastExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { i[1] = 2; }"
, arraySubscriptExpr(hasBase(implicitCastExpr( hasSourceExpression
(declRefExpr()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2622, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { i[1] = 2; }\", arraySubscriptExpr(hasBase(implicitCastExpr( hasSourceExpression(declRefExpr())))))"
, "false", "true").c_str()) = ::testing::Message()
2622 hasSourceExpression(declRefExpr()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i[2]; void f() { i[1] = 2; }"
, arraySubscriptExpr(hasBase(implicitCastExpr( hasSourceExpression
(declRefExpr()))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2622, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i[2]; void f() { i[1] = 2; }\", arraySubscriptExpr(hasBase(implicitCastExpr( hasSourceExpression(declRefExpr())))))"
, "false", "true").c_str()) = ::testing::Message()
;
2623}
2624
2625TEST(Matcher, HasNameSupportsNamespaces)class Matcher_HasNameSupportsNamespaces_Test : public ::testing
::Test { public: Matcher_HasNameSupportsNamespaces_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_HasNameSupportsNamespaces_Test
(Matcher_HasNameSupportsNamespaces_Test const &); void operator
=(Matcher_HasNameSupportsNamespaces_Test const &);};::testing
::TestInfo* const Matcher_HasNameSupportsNamespaces_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "HasNameSupportsNamespaces"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_HasNameSupportsNamespaces_Test
>);void Matcher_HasNameSupportsNamespaces_Test::TestBody()
{
2626 EXPECT_TRUE(matches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("a::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2627, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"a::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2627 recordDecl(hasName("a::b::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("a::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2627, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"a::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2628 EXPECT_TRUE(matches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("::a::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2629, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"::a::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2629 recordDecl(hasName("::a::b::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("::a::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2629, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"::a::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2630 EXPECT_TRUE(matches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("b::C"))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2631, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2631 recordDecl(hasName("b::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("b::C"))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2631, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2632 EXPECT_TRUE(matches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2633, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"C\")))"
, "false", "true").c_str()) = ::testing::Message()
2633 recordDecl(hasName("C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2633, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2634 EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("c::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2635, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"c::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2635 recordDecl(hasName("c::b::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("c::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2635, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"c::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2636 EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("a::c::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2637, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"a::c::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2637 recordDecl(hasName("a::c::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("a::c::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2637, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"a::c::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2638 EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("a::b::A"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"a::b::A\")))"
, "false", "true").c_str()) = ::testing::Message()
2639 recordDecl(hasName("a::b::A"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("a::b::A"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"a::b::A\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2640 EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("::C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2641, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2641 recordDecl(hasName("::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("::C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2641, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2642 EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2643, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2643 recordDecl(hasName("::b::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2643, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2644 EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("z::a::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2645, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"z::a::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2645 recordDecl(hasName("z::a::b::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("z::a::b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2645, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"z::a::b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2646 EXPECT_TRUE(notMatches("namespace a { namespace b { class C; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("a+b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2647, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"a+b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2647 recordDecl(hasName("a+b::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class C; } }"
, recordDecl(hasName("a+b::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2647, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class C; } }\", recordDecl(hasName(\"a+b::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2648 EXPECT_TRUE(notMatches("namespace a { namespace b { class AC; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class AC; } }"
, recordDecl(hasName("C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2649, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class AC; } }\", recordDecl(hasName(\"C\")))"
, "false", "true").c_str()) = ::testing::Message()
2649 recordDecl(hasName("C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace a { namespace b { class AC; } }"
, recordDecl(hasName("C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2649, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace a { namespace b { class AC; } }\", recordDecl(hasName(\"C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2650}
2651
2652TEST(Matcher, HasNameSupportsOuterClasses)class Matcher_HasNameSupportsOuterClasses_Test : public ::testing
::Test { public: Matcher_HasNameSupportsOuterClasses_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_HasNameSupportsOuterClasses_Test
(Matcher_HasNameSupportsOuterClasses_Test const &); void operator
=(Matcher_HasNameSupportsOuterClasses_Test const &);};::testing
::TestInfo* const Matcher_HasNameSupportsOuterClasses_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "Matcher"
, "HasNameSupportsOuterClasses", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_HasNameSupportsOuterClasses_Test>);void Matcher_HasNameSupportsOuterClasses_Test
::TestBody()
{
2653 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("A::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2655, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2654 matches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("A::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2655, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2655 recordDecl(hasName("A::B::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("A::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2655, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2656 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("::A::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2658, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"::A::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2657 matches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("::A::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2658, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"::A::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2658 recordDecl(hasName("::A::B::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("::A::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2658, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"::A::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2659 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("B::C"))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2661, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2660 matches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("B::C"))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2661, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2661 recordDecl(hasName("B::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("B::C"))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2661, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2662 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2664, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"C\")))"
, "false", "true").c_str()) = ::testing::Message()
2663 matches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2664, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"C\")))"
, "false", "true").c_str()) = ::testing::Message()
2664 recordDecl(hasName("C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { class B { class C; }; };"
, recordDecl(hasName("C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2664, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2665 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("c::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2667, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"c::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2666 notMatches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("c::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2667, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"c::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2667 recordDecl(hasName("c::B::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("c::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2667, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"c::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2668 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("A::c::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2670, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A::c::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2669 notMatches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("A::c::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2670, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A::c::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2670 recordDecl(hasName("A::c::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("A::c::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2670, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A::c::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2671 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("A::B::A"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2673, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A::B::A\")))"
, "false", "true").c_str()) = ::testing::Message()
2672 notMatches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("A::B::A"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2673, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A::B::A\")))"
, "false", "true").c_str()) = ::testing::Message()
2673 recordDecl(hasName("A::B::A"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("A::B::A"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2673, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A::B::A\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2674 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("::C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2676, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2675 notMatches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("::C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2676, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2676 recordDecl(hasName("::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("::C"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2676, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2677 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2679, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2678 notMatches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2679, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2679 recordDecl(hasName("::B::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2679, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2680 EXPECT_TRUE(notMatches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("z::A::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2681, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"z::A::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2681 recordDecl(hasName("z::A::B::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("z::A::B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2681, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"z::A::B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2682 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("A+B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2684, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A+B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2683 notMatches("class A { class B { class C; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("A+B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2684, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A+B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
2684 recordDecl(hasName("A+B::C"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { class B { class C; }; };"
, recordDecl(hasName("A+B::C"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2684, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { class B { class C; }; };\", recordDecl(hasName(\"A+B::C\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2685}
2686
2687TEST(Matcher, IsDefinition)class Matcher_IsDefinition_Test : public ::testing::Test { public
: Matcher_IsDefinition_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Matcher_IsDefinition_Test(Matcher_IsDefinition_Test
const &); void operator=(Matcher_IsDefinition_Test const
&);};::testing::TestInfo* const Matcher_IsDefinition_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "IsDefinition", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Matcher_IsDefinition_Test>);void Matcher_IsDefinition_Test
::TestBody()
{
2688 DeclarationMatcher DefinitionOfClassA =
2689 recordDecl(hasName("A"), isDefinition());
2690 EXPECT_TRUE(matches("class A {};", DefinitionOfClassA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A {};"
, DefinitionOfClassA))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2690, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A {};\", DefinitionOfClassA)", "false", "true"
).c_str()) = ::testing::Message()
;
2691 EXPECT_TRUE(notMatches("class A;", DefinitionOfClassA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A;"
, DefinitionOfClassA))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2691, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A;\", DefinitionOfClassA)", "false", "true"
).c_str()) = ::testing::Message()
;
2692
2693 DeclarationMatcher DefinitionOfVariableA =
2694 varDecl(hasName("a"), isDefinition());
2695 EXPECT_TRUE(matches("int a;", DefinitionOfVariableA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a;", DefinitionOfVariableA
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2695, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a;\", DefinitionOfVariableA)", "false", "true"
).c_str()) = ::testing::Message()
;
2696 EXPECT_TRUE(notMatches("extern int a;", DefinitionOfVariableA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("extern int a;"
, DefinitionOfVariableA))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2696, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"extern int a;\", DefinitionOfVariableA)", "false"
, "true").c_str()) = ::testing::Message()
;
2697
2698 DeclarationMatcher DefinitionOfMethodA =
2699 cxxMethodDecl(hasName("a"), isDefinition());
2700 EXPECT_TRUE(matches("class A { void a() {} };", DefinitionOfMethodA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { void a() {} };"
, DefinitionOfMethodA))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2700, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { void a() {} };\", DefinitionOfMethodA)"
, "false", "true").c_str()) = ::testing::Message()
;
2701 EXPECT_TRUE(notMatches("class A { void a(); };", DefinitionOfMethodA))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class A { void a(); };"
, DefinitionOfMethodA))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2701, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class A { void a(); };\", DefinitionOfMethodA)"
, "false", "true").c_str()) = ::testing::Message()
;
2702}
2703
2704TEST(Matcher, OfClass)class Matcher_OfClass_Test : public ::testing::Test { public:
Matcher_OfClass_Test() {} private: virtual void TestBody(); static
::testing::TestInfo* const test_info_ __attribute__ ((unused
)); Matcher_OfClass_Test(Matcher_OfClass_Test const &); void
operator=(Matcher_OfClass_Test const &);};::testing::TestInfo
* const Matcher_OfClass_Test ::test_info_ = ::testing::internal
::MakeAndRegisterTestInfo( "Matcher", "OfClass", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_OfClass_Test>);void Matcher_OfClass_Test
::TestBody()
{
2705 StatementMatcher Constructor = cxxConstructExpr(hasDeclaration(cxxMethodDecl(
2706 ofClass(hasName("X")))));
2707
2708 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x(int) { X x; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2709, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x(int) { X x; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
2709 matches("class X { public: X(); }; void x(int) { X x; }", Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x(int) { X x; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2709, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x(int) { X x; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
2710 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x(int) { X x = X(); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2712, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x(int) { X x = X(); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
2711 matches("class X { public: X(); }; void x(int) { X x = X(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x(int) { X x = X(); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2712, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x(int) { X x = X(); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
2712 Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { public: X(); }; void x(int) { X x = X(); }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2712, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { public: X(); }; void x(int) { X x = X(); }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
2713 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: Y(); }; void x(int) { Y y; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: Y(); }; void x(int) { Y y; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
2714 notMatches("class Y { public: Y(); }; void x(int) { Y y; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: Y(); }; void x(int) { Y y; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: Y(); }; void x(int) { Y y; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
2715 Constructor))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class Y { public: Y(); }; void x(int) { Y y; }"
, Constructor))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class Y { public: Y(); }; void x(int) { Y y; }\", Constructor)"
, "false", "true").c_str()) = ::testing::Message()
;
2716}
2717
2718TEST(Matcher, VisitsTemplateInstantiations)class Matcher_VisitsTemplateInstantiations_Test : public ::testing
::Test { public: Matcher_VisitsTemplateInstantiations_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_VisitsTemplateInstantiations_Test
(Matcher_VisitsTemplateInstantiations_Test const &); void
operator=(Matcher_VisitsTemplateInstantiations_Test const &
);};::testing::TestInfo* const Matcher_VisitsTemplateInstantiations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "VisitsTemplateInstantiations", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_VisitsTemplateInstantiations_Test
>);void Matcher_VisitsTemplateInstantiations_Test::TestBody
()
{
2719 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"template <typename T> class B { public: void y() { T t; t.x(); } };"
"void f() { B<A> b; b.y(); }", callExpr(callee(cxxMethodDecl
(hasName("x"))))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2723, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"template <typename T> class B { public: void y() { T t; t.x(); } };\" \"void f() { B<A> b; b.y(); }\", callExpr(callee(cxxMethodDecl(hasName(\"x\")))))"
, "false", "true").c_str()) = ::testing::Message()
2720 "class A { public: void x(); };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"template <typename T> class B { public: void y() { T t; t.x(); } };"
"void f() { B<A> b; b.y(); }", callExpr(callee(cxxMethodDecl
(hasName("x"))))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2723, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"template <typename T> class B { public: void y() { T t; t.x(); } };\" \"void f() { B<A> b; b.y(); }\", callExpr(callee(cxxMethodDecl(hasName(\"x\")))))"
, "false", "true").c_str()) = ::testing::Message()
2721 "template <typename T> class B { public: void y() { T t; t.x(); } };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"template <typename T> class B { public: void y() { T t; t.x(); } };"
"void f() { B<A> b; b.y(); }", callExpr(callee(cxxMethodDecl
(hasName("x"))))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2723, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"template <typename T> class B { public: void y() { T t; t.x(); } };\" \"void f() { B<A> b; b.y(); }\", callExpr(callee(cxxMethodDecl(hasName(\"x\")))))"
, "false", "true").c_str()) = ::testing::Message()
2722 "void f() { B<A> b; b.y(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"template <typename T> class B { public: void y() { T t; t.x(); } };"
"void f() { B<A> b; b.y(); }", callExpr(callee(cxxMethodDecl
(hasName("x"))))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2723, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"template <typename T> class B { public: void y() { T t; t.x(); } };\" \"void f() { B<A> b; b.y(); }\", callExpr(callee(cxxMethodDecl(hasName(\"x\")))))"
, "false", "true").c_str()) = ::testing::Message()
2723 callExpr(callee(cxxMethodDecl(hasName("x"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"template <typename T> class B { public: void y() { T t; t.x(); } };"
"void f() { B<A> b; b.y(); }", callExpr(callee(cxxMethodDecl
(hasName("x"))))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2723, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"template <typename T> class B { public: void y() { T t; t.x(); } };\" \"void f() { B<A> b; b.y(); }\", callExpr(callee(cxxMethodDecl(hasName(\"x\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
2724
2725 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2726 "class A { public: void x(); };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2727 "class C {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2728 " public:"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2729 " template <typename T> class B { public: void y() { T t; t.x(); } };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2730 "};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2731 "void f() {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2732 " C::B<A> b; b.y();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2733 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2734 recordDecl(hasName("C"), hasDescendant(callExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2735 callee(cxxMethodDecl(hasName("x"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { public: void x(); };"
"class C {" " public:" " template <typename T> class B { public: void y() { T t; t.x(); } };"
"};" "void f() {" " C::B<A> b; b.y();" "}", recordDecl
(hasName("C"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName
("x"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2735, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { public: void x(); };\" \"class C {\" \" public:\" \" template <typename T> class B { public: void y() { T t; t.x(); } };\" \"};\" \"void f() {\" \" C::B<A> b; b.y();\" \"}\", recordDecl(hasName(\"C\"), hasDescendant(callExpr( callee(cxxMethodDecl(hasName(\"x\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
2736}
2737
2738TEST(Matcher, HandlesNullQualTypes)class Matcher_HandlesNullQualTypes_Test : public ::testing::Test
{ public: Matcher_HandlesNullQualTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_HandlesNullQualTypes_Test(
Matcher_HandlesNullQualTypes_Test const &); void operator
=(Matcher_HandlesNullQualTypes_Test const &);};::testing::
TestInfo* const Matcher_HandlesNullQualTypes_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "HandlesNullQualTypes"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_HandlesNullQualTypes_Test
>);void Matcher_HandlesNullQualTypes_Test::TestBody()
{
2739 // FIXME: Add a Type matcher so we can replace uses of this
2740 // variable with Type(True())
2741 const TypeMatcher AnyType = anything();
2742
2743 // We don't really care whether this matcher succeeds; we're testing that
2744 // it completes without crashing.
2745 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2746 "struct A { };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2747 "template <typename T>"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2748 "void f(T t) {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2749 " T local_t(t /* this becomes a null QualType in the AST */);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2750 "}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2751 "void g() {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2752 " f(0);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2753 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2754 expr(hasType(TypeMatcher(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2755 anyOf(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2756 TypeMatcher(hasDeclaration(anything())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2757 pointsTo(AnyType),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2758 references(AnyType)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2759 // Other QualType matchers should go here.switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
2760 ))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { };"
"template <typename T>" "void f(T t) {" " T local_t(t /* this becomes a null QualType in the AST */);"
"}" "void g() {" " f(0);" "}", expr(hasType(TypeMatcher( anyOf
( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType),
references(AnyType) ))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { };\" \"template <typename T>\" \"void f(T t) {\" \" T local_t(t /* this becomes a null QualType in the AST */);\" \"}\" \"void g() {\" \" f(0);\" \"}\", expr(hasType(TypeMatcher( anyOf( TypeMatcher(hasDeclaration(anything())), pointsTo(AnyType), references(AnyType) )))))"
, "false", "true").c_str()) = ::testing::Message()
;
2761}
2762
2763// For testing AST_MATCHER_P().
2764AST_MATCHER_P(Decl, just, internal::Matcher<Decl>, AMatcher)namespace internal { class matcher_just0Matcher : public ::clang
::ast_matchers::internal::MatcherInterface<Decl> { public
: explicit matcher_just0Matcher( internal::Matcher<Decl>
const &AAMatcher) : AMatcher(AAMatcher) {} bool matches(
const Decl &Node, ::clang::ast_matchers::internal::ASTMatchFinder
*Finder, ::clang::ast_matchers::internal::BoundNodesTreeBuilder
*Builder) const override; private: internal::Matcher<Decl
> const AMatcher; }; } inline ::clang::ast_matchers::internal
::Matcher<Decl> just( internal::Matcher<Decl> const
&AMatcher) { return ::clang::ast_matchers::internal::makeMatcher
( new internal::matcher_just0Matcher(AMatcher)); } typedef ::
clang::ast_matchers::internal::Matcher<Decl>( & just_Type0
)(internal::Matcher<Decl> const &AMatcher); inline bool
internal::matcher_just0Matcher::matches( const Decl &Node
, ::clang::ast_matchers::internal::ASTMatchFinder *Finder, ::
clang::ast_matchers::internal::BoundNodesTreeBuilder *Builder
) const
{
2765 // Make sure all special variables are used: node, match_finder,
2766 // bound_nodes_builder, and the parameter named 'AMatcher'.
2767 return AMatcher.matches(Node, Finder, Builder);
2768}
2769
2770TEST(AstMatcherPMacro, Works)class AstMatcherPMacro_Works_Test : public ::testing::Test { public
: AstMatcherPMacro_Works_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); AstMatcherPMacro_Works_Test(AstMatcherPMacro_Works_Test
const &); void operator=(AstMatcherPMacro_Works_Test const
&);};::testing::TestInfo* const AstMatcherPMacro_Works_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"AstMatcherPMacro", "Works", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< AstMatcherPMacro_Works_Test>);void AstMatcherPMacro_Works_Test
::TestBody()
{
2771 DeclarationMatcher HasClassB = just(has(recordDecl(hasName("B")).bind("b")));
2772
2773 EXPECT_TRUE(matchAndVerifyResultTrue("class A { class B {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { class B {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("b")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2774, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { class B {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
2774 HasClassB, new VerifyIdIsBoundTo<Decl>("b")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { class B {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("b")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2774, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { class B {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
;
2775
2776 EXPECT_TRUE(matchAndVerifyResultFalse("class A { class B {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class A { class B {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("a")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2777, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class A { class B {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"a\"))"
, "false", "true").c_str()) = ::testing::Message()
2777 HasClassB, new VerifyIdIsBoundTo<Decl>("a")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class A { class B {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("a")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2777, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class A { class B {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"a\"))"
, "false", "true").c_str()) = ::testing::Message()
;
2778
2779 EXPECT_TRUE(matchAndVerifyResultFalse("class A { class C {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class A { class C {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("b")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2780, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class A { class C {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
2780 HasClassB, new VerifyIdIsBoundTo<Decl>("b")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class A { class C {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("b")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2780, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class A { class C {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
;
2781}
2782
2783AST_POLYMORPHIC_MATCHER_P(polymorphicHas,namespace internal { template <typename NodeType, typename
ParamT> class matcher_polymorphicHas0Matcher : public ::clang
::ast_matchers::internal::MatcherInterface<NodeType> { public
: explicit matcher_polymorphicHas0Matcher( internal::Matcher<
Decl> const &AAMatcher) : AMatcher(AAMatcher) {} bool matches
(const NodeType &Node, ::clang::ast_matchers::internal::ASTMatchFinder
*Finder, ::clang::ast_matchers::internal::BoundNodesTreeBuilder
*Builder) const override; private: internal::Matcher<Decl
> const AMatcher; }; } inline ::clang::ast_matchers::internal
::PolymorphicMatcherWithParam1< internal::matcher_polymorphicHas0Matcher
, internal::Matcher<Decl>, void(::clang::ast_matchers::
internal::TypeList<Decl, Stmt>)> polymorphicHas(internal
::Matcher<Decl> const &AMatcher) { return ::clang::
ast_matchers::internal::PolymorphicMatcherWithParam1< internal
::matcher_polymorphicHas0Matcher, internal::Matcher<Decl>
, void(::clang::ast_matchers::internal::TypeList<Decl, Stmt
>)>(AMatcher); } typedef ::clang::ast_matchers::internal
::PolymorphicMatcherWithParam1< internal::matcher_polymorphicHas0Matcher
, internal::Matcher<Decl>, void(::clang::ast_matchers::
internal::TypeList<Decl, Stmt>)>(&polymorphicHas_Type0
)( internal::Matcher<Decl> const &AMatcher); template
<typename NodeType, typename ParamT> bool internal:: matcher_polymorphicHas0Matcher
<NodeType, ParamT>::matches( const NodeType &Node, ::
clang::ast_matchers::internal::ASTMatchFinder *Finder, ::clang
::ast_matchers::internal::BoundNodesTreeBuilder *Builder) const
2784 AST_POLYMORPHIC_SUPPORTED_TYPES(Decl, Stmt),namespace internal { template <typename NodeType, typename
ParamT> class matcher_polymorphicHas0Matcher : public ::clang
::ast_matchers::internal::MatcherInterface<NodeType> { public
: explicit matcher_polymorphicHas0Matcher( internal::Matcher<
Decl> const &AAMatcher) : AMatcher(AAMatcher) {} bool matches
(const NodeType &Node, ::clang::ast_matchers::internal::ASTMatchFinder
*Finder, ::clang::ast_matchers::internal::BoundNodesTreeBuilder
*Builder) const override; private: internal::Matcher<Decl
> const AMatcher; }; } inline ::clang::ast_matchers::internal
::PolymorphicMatcherWithParam1< internal::matcher_polymorphicHas0Matcher
, internal::Matcher<Decl>, void(::clang::ast_matchers::
internal::TypeList<Decl, Stmt>)> polymorphicHas(internal
::Matcher<Decl> const &AMatcher) { return ::clang::
ast_matchers::internal::PolymorphicMatcherWithParam1< internal
::matcher_polymorphicHas0Matcher, internal::Matcher<Decl>
, void(::clang::ast_matchers::internal::TypeList<Decl, Stmt
>)>(AMatcher); } typedef ::clang::ast_matchers::internal
::PolymorphicMatcherWithParam1< internal::matcher_polymorphicHas0Matcher
, internal::Matcher<Decl>, void(::clang::ast_matchers::
internal::TypeList<Decl, Stmt>)>(&polymorphicHas_Type0
)( internal::Matcher<Decl> const &AMatcher); template
<typename NodeType, typename ParamT> bool internal:: matcher_polymorphicHas0Matcher
<NodeType, ParamT>::matches( const NodeType &Node, ::
clang::ast_matchers::internal::ASTMatchFinder *Finder, ::clang
::ast_matchers::internal::BoundNodesTreeBuilder *Builder) const
2785 internal::Matcher<Decl>, AMatcher)namespace internal { template <typename NodeType, typename
ParamT> class matcher_polymorphicHas0Matcher : public ::clang
::ast_matchers::internal::MatcherInterface<NodeType> { public
: explicit matcher_polymorphicHas0Matcher( internal::Matcher<
Decl> const &AAMatcher) : AMatcher(AAMatcher) {} bool matches
(const NodeType &Node, ::clang::ast_matchers::internal::ASTMatchFinder
*Finder, ::clang::ast_matchers::internal::BoundNodesTreeBuilder
*Builder) const override; private: internal::Matcher<Decl
> const AMatcher; }; } inline ::clang::ast_matchers::internal
::PolymorphicMatcherWithParam1< internal::matcher_polymorphicHas0Matcher
, internal::Matcher<Decl>, void(::clang::ast_matchers::
internal::TypeList<Decl, Stmt>)> polymorphicHas(internal
::Matcher<Decl> const &AMatcher) { return ::clang::
ast_matchers::internal::PolymorphicMatcherWithParam1< internal
::matcher_polymorphicHas0Matcher, internal::Matcher<Decl>
, void(::clang::ast_matchers::internal::TypeList<Decl, Stmt
>)>(AMatcher); } typedef ::clang::ast_matchers::internal
::PolymorphicMatcherWithParam1< internal::matcher_polymorphicHas0Matcher
, internal::Matcher<Decl>, void(::clang::ast_matchers::
internal::TypeList<Decl, Stmt>)>(&polymorphicHas_Type0
)( internal::Matcher<Decl> const &AMatcher); template
<typename NodeType, typename ParamT> bool internal:: matcher_polymorphicHas0Matcher
<NodeType, ParamT>::matches( const NodeType &Node, ::
clang::ast_matchers::internal::ASTMatchFinder *Finder, ::clang
::ast_matchers::internal::BoundNodesTreeBuilder *Builder) const
{
2786 return Finder->matchesChildOf(
2787 Node, AMatcher, Builder,
2788 ASTMatchFinder::TK_IgnoreImplicitCastsAndParentheses,
2789 ASTMatchFinder::BK_First);
2790}
2791
2792TEST(AstPolymorphicMatcherPMacro, Works)class AstPolymorphicMatcherPMacro_Works_Test : public ::testing
::Test { public: AstPolymorphicMatcherPMacro_Works_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); AstPolymorphicMatcherPMacro_Works_Test
(AstPolymorphicMatcherPMacro_Works_Test const &); void operator
=(AstPolymorphicMatcherPMacro_Works_Test const &);};::testing
::TestInfo* const AstPolymorphicMatcherPMacro_Works_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "AstPolymorphicMatcherPMacro"
, "Works", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< AstPolymorphicMatcherPMacro_Works_Test
>);void AstPolymorphicMatcherPMacro_Works_Test::TestBody()
{
2793 DeclarationMatcher HasClassB =
2794 polymorphicHas(recordDecl(hasName("B")).bind("b"));
2795
2796 EXPECT_TRUE(matchAndVerifyResultTrue("class A { class B {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { class B {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("b")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2797, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { class B {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
2797 HasClassB, new VerifyIdIsBoundTo<Decl>("b")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class A { class B {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("b")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2797, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class A { class B {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
;
2798
2799 EXPECT_TRUE(matchAndVerifyResultFalse("class A { class B {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class A { class B {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("a")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2800, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class A { class B {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"a\"))"
, "false", "true").c_str()) = ::testing::Message()
2800 HasClassB, new VerifyIdIsBoundTo<Decl>("a")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class A { class B {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("a")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2800, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class A { class B {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"a\"))"
, "false", "true").c_str()) = ::testing::Message()
;
2801
2802 EXPECT_TRUE(matchAndVerifyResultFalse("class A { class C {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class A { class C {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("b")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2803, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class A { class C {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
2803 HasClassB, new VerifyIdIsBoundTo<Decl>("b")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
("class A { class C {}; };", HasClassB, new VerifyIdIsBoundTo
<Decl>("b")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2803, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse(\"class A { class C {}; };\", HasClassB, new VerifyIdIsBoundTo<Decl>(\"b\"))"
, "false", "true").c_str()) = ::testing::Message()
;
2804
2805 StatementMatcher StatementHasClassB =
2806 polymorphicHas(recordDecl(hasName("B")));
2807
2808 EXPECT_TRUE(matches("void x() { class B {}; }", StatementHasClassB))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { class B {}; }"
, StatementHasClassB))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2808, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { class B {}; }\", StatementHasClassB)"
, "false", "true").c_str()) = ::testing::Message()
;
2809}
2810
2811TEST(For, FindsForLoops)class For_FindsForLoops_Test : public ::testing::Test { public
: For_FindsForLoops_Test() {} private: virtual void TestBody(
); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); For_FindsForLoops_Test(For_FindsForLoops_Test const
&); void operator=(For_FindsForLoops_Test const &);}
;::testing::TestInfo* const For_FindsForLoops_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "For", "FindsForLoops"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< For_FindsForLoops_Test
>);void For_FindsForLoops_Test::TestBody()
{
2812 EXPECT_TRUE(matches("void f() { for(;;); }", forStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { for(;;); }"
, forStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2812, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { for(;;); }\", forStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
2813 EXPECT_TRUE(matches("void f() { if(true) for(;;); }", forStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if(true) for(;;); }"
, forStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2813, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if(true) for(;;); }\", forStmt())", "false"
, "true").c_str()) = ::testing::Message()
;
2814 EXPECT_TRUE(notMatches("int as[] = { 1, 2, 3 };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int as[] = { 1, 2, 3 };"
"void f() { for (auto &a : as); }", forStmt()))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2816, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int as[] = { 1, 2, 3 };\" \"void f() { for (auto &a : as); }\", forStmt())"
, "false", "true").c_str()) = ::testing::Message()
2815 "void f() { for (auto &a : as); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int as[] = { 1, 2, 3 };"
"void f() { for (auto &a : as); }", forStmt()))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2816, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int as[] = { 1, 2, 3 };\" \"void f() { for (auto &a : as); }\", forStmt())"
, "false", "true").c_str()) = ::testing::Message()
2816 forStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int as[] = { 1, 2, 3 };"
"void f() { for (auto &a : as); }", forStmt()))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2816, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int as[] = { 1, 2, 3 };\" \"void f() { for (auto &a : as); }\", forStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
2817}
2818
2819TEST(For, ForLoopInternals)class For_ForLoopInternals_Test : public ::testing::Test { public
: For_ForLoopInternals_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); For_ForLoopInternals_Test(For_ForLoopInternals_Test
const &); void operator=(For_ForLoopInternals_Test const
&);};::testing::TestInfo* const For_ForLoopInternals_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"For", "ForLoopInternals", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< For_ForLoopInternals_Test>);void For_ForLoopInternals_Test
::TestBody()
{
2820 EXPECT_TRUE(matches("void f(){ int i; for (; i < 3 ; ); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(){ int i; for (; i < 3 ; ); }"
, forStmt(hasCondition(anything()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2821, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(){ int i; for (; i < 3 ; ); }\", forStmt(hasCondition(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2821 forStmt(hasCondition(anything()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(){ int i; for (; i < 3 ; ); }"
, forStmt(hasCondition(anything()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2821, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(){ int i; for (; i < 3 ; ); }\", forStmt(hasCondition(anything())))"
, "false", "true").c_str()) = ::testing::Message()
;
2822 EXPECT_TRUE(matches("void f() { for (int i = 0; ;); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { for (int i = 0; ;); }"
, forStmt(hasLoopInit(anything()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { for (int i = 0; ;); }\", forStmt(hasLoopInit(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2823 forStmt(hasLoopInit(anything()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { for (int i = 0; ;); }"
, forStmt(hasLoopInit(anything()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { for (int i = 0; ;); }\", forStmt(hasLoopInit(anything())))"
, "false", "true").c_str()) = ::testing::Message()
;
2824}
2825
2826TEST(For, ForRangeLoopInternals)class For_ForRangeLoopInternals_Test : public ::testing::Test
{ public: For_ForRangeLoopInternals_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); For_ForRangeLoopInternals_Test(For_ForRangeLoopInternals_Test
const &); void operator=(For_ForRangeLoopInternals_Test const
&);};::testing::TestInfo* const For_ForRangeLoopInternals_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"For", "ForRangeLoopInternals", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< For_ForRangeLoopInternals_Test>);void For_ForRangeLoopInternals_Test
::TestBody()
{
2827 EXPECT_TRUE(matches("void f(){ int a[] {1, 2}; for (int i : a); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(){ int a[] {1, 2}; for (int i : a); }"
, cxxForRangeStmt(hasLoopVariable(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(){ int a[] {1, 2}; for (int i : a); }\", cxxForRangeStmt(hasLoopVariable(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2828 cxxForRangeStmt(hasLoopVariable(anything()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(){ int a[] {1, 2}; for (int i : a); }"
, cxxForRangeStmt(hasLoopVariable(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(){ int a[] {1, 2}; for (int i : a); }\", cxxForRangeStmt(hasLoopVariable(anything())))"
, "false", "true").c_str()) = ::testing::Message()
;
2829 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(){ int a[] {1, 2}; for (int i : a); }"
, cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName
("a"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2831, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(){ int a[] {1, 2}; for (int i : a); }\", cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2830 "void f(){ int a[] {1, 2}; for (int i : a); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(){ int a[] {1, 2}; for (int i : a); }"
, cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName
("a"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2831, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(){ int a[] {1, 2}; for (int i : a); }\", cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
2831 cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName("a"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(){ int a[] {1, 2}; for (int i : a); }"
, cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName
("a"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2831, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(){ int a[] {1, 2}; for (int i : a); }\", cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
2832}
2833
2834TEST(For, NegativeForLoopInternals)class For_NegativeForLoopInternals_Test : public ::testing::Test
{ public: For_NegativeForLoopInternals_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); For_NegativeForLoopInternals_Test(
For_NegativeForLoopInternals_Test const &); void operator
=(For_NegativeForLoopInternals_Test const &);};::testing::
TestInfo* const For_NegativeForLoopInternals_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "For", "NegativeForLoopInternals"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< For_NegativeForLoopInternals_Test
>);void For_NegativeForLoopInternals_Test::TestBody()
{
2835 EXPECT_TRUE(notMatches("void f(){ for (int i = 0; ; ++i); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(){ for (int i = 0; ; ++i); }"
, forStmt(hasCondition(expr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2836, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(){ for (int i = 0; ; ++i); }\", forStmt(hasCondition(expr())))"
, "false", "true").c_str()) = ::testing::Message()
2836 forStmt(hasCondition(expr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f(){ for (int i = 0; ; ++i); }"
, forStmt(hasCondition(expr()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2836, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f(){ for (int i = 0; ; ++i); }\", forStmt(hasCondition(expr())))"
, "false", "true").c_str()) = ::testing::Message()
;
2837 EXPECT_TRUE(notMatches("void f() {int i; for (; i < 4; ++i) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int i; for (; i < 4; ++i) {} }"
, forStmt(hasLoopInit(anything()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2838, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int i; for (; i < 4; ++i) {} }\", forStmt(hasLoopInit(anything())))"
, "false", "true").c_str()) = ::testing::Message()
2838 forStmt(hasLoopInit(anything()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int i; for (; i < 4; ++i) {} }"
, forStmt(hasLoopInit(anything()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2838, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int i; for (; i < 4; ++i) {} }\", forStmt(hasLoopInit(anything())))"
, "false", "true").c_str()) = ::testing::Message()
;
2839}
2840
2841TEST(For, ReportsNoFalsePositives)class For_ReportsNoFalsePositives_Test : public ::testing::Test
{ public: For_ReportsNoFalsePositives_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); For_ReportsNoFalsePositives_Test(For_ReportsNoFalsePositives_Test
const &); void operator=(For_ReportsNoFalsePositives_Test
const &);};::testing::TestInfo* const For_ReportsNoFalsePositives_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"For", "ReportsNoFalsePositives", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< For_ReportsNoFalsePositives_Test>);void
For_ReportsNoFalsePositives_Test::TestBody()
{
2842 EXPECT_TRUE(notMatches("void f() { ; }", forStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { ; }"
, forStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2842, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { ; }\", forStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
2843 EXPECT_TRUE(notMatches("void f() { if(true); }", forStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { if(true); }"
, forStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2843, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { if(true); }\", forStmt())", "false"
, "true").c_str()) = ::testing::Message()
;
2844}
2845
2846TEST(CompoundStatement, HandlesSimpleCases)class CompoundStatement_HandlesSimpleCases_Test : public ::testing
::Test { public: CompoundStatement_HandlesSimpleCases_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); CompoundStatement_HandlesSimpleCases_Test
(CompoundStatement_HandlesSimpleCases_Test const &); void
operator=(CompoundStatement_HandlesSimpleCases_Test const &
);};::testing::TestInfo* const CompoundStatement_HandlesSimpleCases_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"CompoundStatement", "HandlesSimpleCases", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< CompoundStatement_HandlesSimpleCases_Test
>);void CompoundStatement_HandlesSimpleCases_Test::TestBody
()
{
2847 EXPECT_TRUE(notMatches("void f();", compoundStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f();"
, compoundStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2847, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f();\", compoundStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
2848 EXPECT_TRUE(matches("void f() {}", compoundStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {}"
, compoundStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2848, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {}\", compoundStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
2849 EXPECT_TRUE(matches("void f() {{}}", compoundStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {{}}"
, compoundStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2849, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {{}}\", compoundStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
2850}
2851
2852TEST(CompoundStatement, DoesNotMatchEmptyStruct)class CompoundStatement_DoesNotMatchEmptyStruct_Test : public
::testing::Test { public: CompoundStatement_DoesNotMatchEmptyStruct_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); CompoundStatement_DoesNotMatchEmptyStruct_Test
(CompoundStatement_DoesNotMatchEmptyStruct_Test const &);
void operator=(CompoundStatement_DoesNotMatchEmptyStruct_Test
const &);};::testing::TestInfo* const CompoundStatement_DoesNotMatchEmptyStruct_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"CompoundStatement", "DoesNotMatchEmptyStruct", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< CompoundStatement_DoesNotMatchEmptyStruct_Test
>);void CompoundStatement_DoesNotMatchEmptyStruct_Test::TestBody
()
{
2853 // It's not a compound statement just because there's "{}" in the source
2854 // text. This is an AST search, not grep.
2855 EXPECT_TRUE(notMatches("namespace n { struct S {}; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace n { struct S {}; }"
, compoundStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2856, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace n { struct S {}; }\", compoundStmt())"
, "false", "true").c_str()) = ::testing::Message()
2856 compoundStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace n { struct S {}; }"
, compoundStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2856, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace n { struct S {}; }\", compoundStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
2857 EXPECT_TRUE(matches("namespace n { struct S { void f() {{}} }; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace n { struct S { void f() {{}} }; }"
, compoundStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2858, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace n { struct S { void f() {{}} }; }\", compoundStmt())"
, "false", "true").c_str()) = ::testing::Message()
2858 compoundStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace n { struct S { void f() {{}} }; }"
, compoundStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2858, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace n { struct S { void f() {{}} }; }\", compoundStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
2859}
2860
2861TEST(HasBody, FindsBodyOfForWhileDoLoops)class HasBody_FindsBodyOfForWhileDoLoops_Test : public ::testing
::Test { public: HasBody_FindsBodyOfForWhileDoLoops_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasBody_FindsBodyOfForWhileDoLoops_Test
(HasBody_FindsBodyOfForWhileDoLoops_Test const &); void operator
=(HasBody_FindsBodyOfForWhileDoLoops_Test const &);};::testing
::TestInfo* const HasBody_FindsBodyOfForWhileDoLoops_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasBody", "FindsBodyOfForWhileDoLoops"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< HasBody_FindsBodyOfForWhileDoLoops_Test
>);void HasBody_FindsBodyOfForWhileDoLoops_Test::TestBody(
)
{
2862 EXPECT_TRUE(matches("void f() { for(;;) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { for(;;) {} }"
, forStmt(hasBody(compoundStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2863, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { for(;;) {} }\", forStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
2863 forStmt(hasBody(compoundStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { for(;;) {} }"
, forStmt(hasBody(compoundStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2863, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { for(;;) {} }\", forStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
2864 EXPECT_TRUE(notMatches("void f() { for(;;); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { for(;;); }"
, forStmt(hasBody(compoundStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2865, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { for(;;); }\", forStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
2865 forStmt(hasBody(compoundStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { for(;;); }"
, forStmt(hasBody(compoundStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2865, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { for(;;); }\", forStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
2866 EXPECT_TRUE(matches("void f() { while(true) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { while(true) {} }"
, whileStmt(hasBody(compoundStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2867, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { while(true) {} }\", whileStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
2867 whileStmt(hasBody(compoundStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { while(true) {} }"
, whileStmt(hasBody(compoundStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2867, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { while(true) {} }\", whileStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
2868 EXPECT_TRUE(matches("void f() { do {} while(true); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { do {} while(true); }"
, doStmt(hasBody(compoundStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2869, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { do {} while(true); }\", doStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
2869 doStmt(hasBody(compoundStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { do {} while(true); }"
, doStmt(hasBody(compoundStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2869, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { do {} while(true); }\", doStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
2870 EXPECT_TRUE(matches("void f() { int p[2]; for (auto x : p) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int p[2]; for (auto x : p) {} }"
, cxxForRangeStmt(hasBody(compoundStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2871, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int p[2]; for (auto x : p) {} }\", cxxForRangeStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
2871 cxxForRangeStmt(hasBody(compoundStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { int p[2]; for (auto x : p) {} }"
, cxxForRangeStmt(hasBody(compoundStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2871, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { int p[2]; for (auto x : p) {} }\", cxxForRangeStmt(hasBody(compoundStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
2872}
2873
2874TEST(HasAnySubstatement, MatchesForTopLevelCompoundStatement)class HasAnySubstatement_MatchesForTopLevelCompoundStatement_Test
: public ::testing::Test { public: HasAnySubstatement_MatchesForTopLevelCompoundStatement_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnySubstatement_MatchesForTopLevelCompoundStatement_Test
(HasAnySubstatement_MatchesForTopLevelCompoundStatement_Test const
&); void operator=(HasAnySubstatement_MatchesForTopLevelCompoundStatement_Test
const &);};::testing::TestInfo* const HasAnySubstatement_MatchesForTopLevelCompoundStatement_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnySubstatement", "MatchesForTopLevelCompoundStatement",
__null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< HasAnySubstatement_MatchesForTopLevelCompoundStatement_Test
>);void HasAnySubstatement_MatchesForTopLevelCompoundStatement_Test
::TestBody()
{
2875 // The simplest case: every compound statement is in a function
2876 // definition, and the function body itself must be a compound
2877 // statement.
2878 EXPECT_TRUE(matches("void f() { for (;;); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { for (;;); }"
, compoundStmt(hasAnySubstatement(forStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2879, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { for (;;); }\", compoundStmt(hasAnySubstatement(forStmt())))"
, "false", "true").c_str()) = ::testing::Message()
2879 compoundStmt(hasAnySubstatement(forStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { for (;;); }"
, compoundStmt(hasAnySubstatement(forStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2879, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { for (;;); }\", compoundStmt(hasAnySubstatement(forStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
2880}
2881
2882TEST(HasAnySubstatement, IsNotRecursive)class HasAnySubstatement_IsNotRecursive_Test : public ::testing
::Test { public: HasAnySubstatement_IsNotRecursive_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); HasAnySubstatement_IsNotRecursive_Test
(HasAnySubstatement_IsNotRecursive_Test const &); void operator
=(HasAnySubstatement_IsNotRecursive_Test const &);};::testing
::TestInfo* const HasAnySubstatement_IsNotRecursive_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasAnySubstatement"
, "IsNotRecursive", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< HasAnySubstatement_IsNotRecursive_Test
>);void HasAnySubstatement_IsNotRecursive_Test::TestBody()
{
2883 // It's really "has any immediate substatement".
2884 EXPECT_TRUE(notMatches("void f() { if (true) for (;;); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { if (true) for (;;); }"
, compoundStmt(hasAnySubstatement(forStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2885, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { if (true) for (;;); }\", compoundStmt(hasAnySubstatement(forStmt())))"
, "false", "true").c_str()) = ::testing::Message()
2885 compoundStmt(hasAnySubstatement(forStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { if (true) for (;;); }"
, compoundStmt(hasAnySubstatement(forStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2885, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { if (true) for (;;); }\", compoundStmt(hasAnySubstatement(forStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
2886}
2887
2888TEST(HasAnySubstatement, MatchesInNestedCompoundStatements)class HasAnySubstatement_MatchesInNestedCompoundStatements_Test
: public ::testing::Test { public: HasAnySubstatement_MatchesInNestedCompoundStatements_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnySubstatement_MatchesInNestedCompoundStatements_Test
(HasAnySubstatement_MatchesInNestedCompoundStatements_Test const
&); void operator=(HasAnySubstatement_MatchesInNestedCompoundStatements_Test
const &);};::testing::TestInfo* const HasAnySubstatement_MatchesInNestedCompoundStatements_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnySubstatement", "MatchesInNestedCompoundStatements", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< HasAnySubstatement_MatchesInNestedCompoundStatements_Test
>);void HasAnySubstatement_MatchesInNestedCompoundStatements_Test
::TestBody()
{
2889 EXPECT_TRUE(matches("void f() { if (true) { for (;;); } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if (true) { for (;;); } }"
, compoundStmt(hasAnySubstatement(forStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2890, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if (true) { for (;;); } }\", compoundStmt(hasAnySubstatement(forStmt())))"
, "false", "true").c_str()) = ::testing::Message()
2890 compoundStmt(hasAnySubstatement(forStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if (true) { for (;;); } }"
, compoundStmt(hasAnySubstatement(forStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2890, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if (true) { for (;;); } }\", compoundStmt(hasAnySubstatement(forStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
2891}
2892
2893TEST(HasAnySubstatement, FindsSubstatementBetweenOthers)class HasAnySubstatement_FindsSubstatementBetweenOthers_Test :
public ::testing::Test { public: HasAnySubstatement_FindsSubstatementBetweenOthers_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAnySubstatement_FindsSubstatementBetweenOthers_Test
(HasAnySubstatement_FindsSubstatementBetweenOthers_Test const
&); void operator=(HasAnySubstatement_FindsSubstatementBetweenOthers_Test
const &);};::testing::TestInfo* const HasAnySubstatement_FindsSubstatementBetweenOthers_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAnySubstatement", "FindsSubstatementBetweenOthers", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< HasAnySubstatement_FindsSubstatementBetweenOthers_Test
>);void HasAnySubstatement_FindsSubstatementBetweenOthers_Test
::TestBody()
{
2894 EXPECT_TRUE(matches("void f() { 1; 2; 3; for (;;); 4; 5; 6; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { 1; 2; 3; for (;;); 4; 5; 6; }"
, compoundStmt(hasAnySubstatement(forStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2895, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { 1; 2; 3; for (;;); 4; 5; 6; }\", compoundStmt(hasAnySubstatement(forStmt())))"
, "false", "true").c_str()) = ::testing::Message()
2895 compoundStmt(hasAnySubstatement(forStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { 1; 2; 3; for (;;); 4; 5; 6; }"
, compoundStmt(hasAnySubstatement(forStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2895, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { 1; 2; 3; for (;;); 4; 5; 6; }\", compoundStmt(hasAnySubstatement(forStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
2896}
2897
2898TEST(StatementCountIs, FindsNoStatementsInAnEmptyCompoundStatement)class StatementCountIs_FindsNoStatementsInAnEmptyCompoundStatement_Test
: public ::testing::Test { public: StatementCountIs_FindsNoStatementsInAnEmptyCompoundStatement_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); StatementCountIs_FindsNoStatementsInAnEmptyCompoundStatement_Test
(StatementCountIs_FindsNoStatementsInAnEmptyCompoundStatement_Test
const &); void operator=(StatementCountIs_FindsNoStatementsInAnEmptyCompoundStatement_Test
const &);};::testing::TestInfo* const StatementCountIs_FindsNoStatementsInAnEmptyCompoundStatement_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"StatementCountIs", "FindsNoStatementsInAnEmptyCompoundStatement"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< StatementCountIs_FindsNoStatementsInAnEmptyCompoundStatement_Test
>);void StatementCountIs_FindsNoStatementsInAnEmptyCompoundStatement_Test
::TestBody()
{
2899 EXPECT_TRUE(matches("void f() { }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { }"
, compoundStmt(statementCountIs(0))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2900, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { }\", compoundStmt(statementCountIs(0)))"
, "false", "true").c_str()) = ::testing::Message()
2900 compoundStmt(statementCountIs(0))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { }"
, compoundStmt(statementCountIs(0))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2900, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { }\", compoundStmt(statementCountIs(0)))"
, "false", "true").c_str()) = ::testing::Message()
;
2901 EXPECT_TRUE(notMatches("void f() {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {}"
, compoundStmt(statementCountIs(1))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2902, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {}\", compoundStmt(statementCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
2902 compoundStmt(statementCountIs(1))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {}"
, compoundStmt(statementCountIs(1))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2902, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {}\", compoundStmt(statementCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
;
2903}
2904
2905TEST(StatementCountIs, AppearsToMatchOnlyOneCount)class StatementCountIs_AppearsToMatchOnlyOneCount_Test : public
::testing::Test { public: StatementCountIs_AppearsToMatchOnlyOneCount_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); StatementCountIs_AppearsToMatchOnlyOneCount_Test
(StatementCountIs_AppearsToMatchOnlyOneCount_Test const &
); void operator=(StatementCountIs_AppearsToMatchOnlyOneCount_Test
const &);};::testing::TestInfo* const StatementCountIs_AppearsToMatchOnlyOneCount_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"StatementCountIs", "AppearsToMatchOnlyOneCount", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< StatementCountIs_AppearsToMatchOnlyOneCount_Test
>);void StatementCountIs_AppearsToMatchOnlyOneCount_Test::
TestBody()
{
2906 EXPECT_TRUE(matches("void f() { 1; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { 1; }"
, compoundStmt(statementCountIs(1))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2907, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { 1; }\", compoundStmt(statementCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
2907 compoundStmt(statementCountIs(1))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { 1; }"
, compoundStmt(statementCountIs(1))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2907, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { 1; }\", compoundStmt(statementCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
;
2908 EXPECT_TRUE(notMatches("void f() { 1; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { 1; }"
, compoundStmt(statementCountIs(0))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2909, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { 1; }\", compoundStmt(statementCountIs(0)))"
, "false", "true").c_str()) = ::testing::Message()
2909 compoundStmt(statementCountIs(0))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { 1; }"
, compoundStmt(statementCountIs(0))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2909, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { 1; }\", compoundStmt(statementCountIs(0)))"
, "false", "true").c_str()) = ::testing::Message()
;
2910 EXPECT_TRUE(notMatches("void f() { 1; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { 1; }"
, compoundStmt(statementCountIs(2))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2911, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { 1; }\", compoundStmt(statementCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
2911 compoundStmt(statementCountIs(2))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { 1; }"
, compoundStmt(statementCountIs(2))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2911, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { 1; }\", compoundStmt(statementCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
;
2912}
2913
2914TEST(StatementCountIs, WorksWithMultipleStatements)class StatementCountIs_WorksWithMultipleStatements_Test : public
::testing::Test { public: StatementCountIs_WorksWithMultipleStatements_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); StatementCountIs_WorksWithMultipleStatements_Test
(StatementCountIs_WorksWithMultipleStatements_Test const &
); void operator=(StatementCountIs_WorksWithMultipleStatements_Test
const &);};::testing::TestInfo* const StatementCountIs_WorksWithMultipleStatements_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"StatementCountIs", "WorksWithMultipleStatements", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< StatementCountIs_WorksWithMultipleStatements_Test
>);void StatementCountIs_WorksWithMultipleStatements_Test::
TestBody()
{
2915 EXPECT_TRUE(matches("void f() { 1; 2; 3; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { 1; 2; 3; }"
, compoundStmt(statementCountIs(3))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2916, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { 1; 2; 3; }\", compoundStmt(statementCountIs(3)))"
, "false", "true").c_str()) = ::testing::Message()
2916 compoundStmt(statementCountIs(3))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { 1; 2; 3; }"
, compoundStmt(statementCountIs(3))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2916, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { 1; 2; 3; }\", compoundStmt(statementCountIs(3)))"
, "false", "true").c_str()) = ::testing::Message()
;
2917}
2918
2919TEST(StatementCountIs, WorksWithNestedCompoundStatements)class StatementCountIs_WorksWithNestedCompoundStatements_Test
: public ::testing::Test { public: StatementCountIs_WorksWithNestedCompoundStatements_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); StatementCountIs_WorksWithNestedCompoundStatements_Test
(StatementCountIs_WorksWithNestedCompoundStatements_Test const
&); void operator=(StatementCountIs_WorksWithNestedCompoundStatements_Test
const &);};::testing::TestInfo* const StatementCountIs_WorksWithNestedCompoundStatements_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"StatementCountIs", "WorksWithNestedCompoundStatements", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< StatementCountIs_WorksWithNestedCompoundStatements_Test
>);void StatementCountIs_WorksWithNestedCompoundStatements_Test
::TestBody()
{
2920 EXPECT_TRUE(matches("void f() { { 1; } { 1; 2; 3; 4; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { { 1; } { 1; 2; 3; 4; } }"
, compoundStmt(statementCountIs(1))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2921, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { { 1; } { 1; 2; 3; 4; } }\", compoundStmt(statementCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
2921 compoundStmt(statementCountIs(1))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { { 1; } { 1; 2; 3; 4; } }"
, compoundStmt(statementCountIs(1))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2921, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { { 1; } { 1; 2; 3; 4; } }\", compoundStmt(statementCountIs(1)))"
, "false", "true").c_str()) = ::testing::Message()
;
2922 EXPECT_TRUE(matches("void f() { { 1; } { 1; 2; 3; 4; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { { 1; } { 1; 2; 3; 4; } }"
, compoundStmt(statementCountIs(2))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2923, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { { 1; } { 1; 2; 3; 4; } }\", compoundStmt(statementCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
2923 compoundStmt(statementCountIs(2))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { { 1; } { 1; 2; 3; 4; } }"
, compoundStmt(statementCountIs(2))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2923, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { { 1; } { 1; 2; 3; 4; } }\", compoundStmt(statementCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
;
2924 EXPECT_TRUE(notMatches("void f() { { 1; } { 1; 2; 3; 4; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { { 1; } { 1; 2; 3; 4; } }"
, compoundStmt(statementCountIs(3))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2925, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { { 1; } { 1; 2; 3; 4; } }\", compoundStmt(statementCountIs(3)))"
, "false", "true").c_str()) = ::testing::Message()
2925 compoundStmt(statementCountIs(3))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() { { 1; } { 1; 2; 3; 4; } }"
, compoundStmt(statementCountIs(3))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2925, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() { { 1; } { 1; 2; 3; 4; } }\", compoundStmt(statementCountIs(3)))"
, "false", "true").c_str()) = ::testing::Message()
;
2926 EXPECT_TRUE(matches("void f() { { 1; } { 1; 2; 3; 4; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { { 1; } { 1; 2; 3; 4; } }"
, compoundStmt(statementCountIs(4))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2927, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { { 1; } { 1; 2; 3; 4; } }\", compoundStmt(statementCountIs(4)))"
, "false", "true").c_str()) = ::testing::Message()
2927 compoundStmt(statementCountIs(4))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { { 1; } { 1; 2; 3; 4; } }"
, compoundStmt(statementCountIs(4))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2927, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { { 1; } { 1; 2; 3; 4; } }\", compoundStmt(statementCountIs(4)))"
, "false", "true").c_str()) = ::testing::Message()
;
2928}
2929
2930TEST(Member, WorksInSimplestCase)class Member_WorksInSimplestCase_Test : public ::testing::Test
{ public: Member_WorksInSimplestCase_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Member_WorksInSimplestCase_Test(Member_WorksInSimplestCase_Test
const &); void operator=(Member_WorksInSimplestCase_Test
const &);};::testing::TestInfo* const Member_WorksInSimplestCase_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Member", "WorksInSimplestCase", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Member_WorksInSimplestCase_Test>);void Member_WorksInSimplestCase_Test
::TestBody()
{
2931 EXPECT_TRUE(matches("struct { int first; } s; int i(s.first);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct { int first; } s; int i(s.first);"
, memberExpr(member(hasName("first")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2932, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct { int first; } s; int i(s.first);\", memberExpr(member(hasName(\"first\"))))"
, "false", "true").c_str()) = ::testing::Message()
2932 memberExpr(member(hasName("first")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct { int first; } s; int i(s.first);"
, memberExpr(member(hasName("first")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2932, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct { int first; } s; int i(s.first);\", memberExpr(member(hasName(\"first\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2933}
2934
2935TEST(Member, DoesNotMatchTheBaseExpression)class Member_DoesNotMatchTheBaseExpression_Test : public ::testing
::Test { public: Member_DoesNotMatchTheBaseExpression_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Member_DoesNotMatchTheBaseExpression_Test
(Member_DoesNotMatchTheBaseExpression_Test const &); void
operator=(Member_DoesNotMatchTheBaseExpression_Test const &
);};::testing::TestInfo* const Member_DoesNotMatchTheBaseExpression_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Member", "DoesNotMatchTheBaseExpression", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Member_DoesNotMatchTheBaseExpression_Test
>);void Member_DoesNotMatchTheBaseExpression_Test::TestBody
()
{
2936 // Don't pick out the wrong part of the member expression, this should
2937 // be checking the member (name) only.
2938 EXPECT_TRUE(notMatches("struct { int i; } first; int i(first.i);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct { int i; } first; int i(first.i);"
, memberExpr(member(hasName("first")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2939, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct { int i; } first; int i(first.i);\", memberExpr(member(hasName(\"first\"))))"
, "false", "true").c_str()) = ::testing::Message()
2939 memberExpr(member(hasName("first")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct { int i; } first; int i(first.i);"
, memberExpr(member(hasName("first")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2939, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct { int i; } first; int i(first.i);\", memberExpr(member(hasName(\"first\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2940}
2941
2942TEST(Member, MatchesInMemberFunctionCall)class Member_MatchesInMemberFunctionCall_Test : public ::testing
::Test { public: Member_MatchesInMemberFunctionCall_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Member_MatchesInMemberFunctionCall_Test
(Member_MatchesInMemberFunctionCall_Test const &); void operator
=(Member_MatchesInMemberFunctionCall_Test const &);};::testing
::TestInfo* const Member_MatchesInMemberFunctionCall_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Member", "MatchesInMemberFunctionCall"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Member_MatchesInMemberFunctionCall_Test
>);void Member_MatchesInMemberFunctionCall_Test::TestBody(
)
{
2943 EXPECT_TRUE(matches("void f() {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {" " struct { void first() {}; } s;"
" s.first();" "};", memberExpr(member(hasName("first"))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2947, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {\" \" struct { void first() {}; } s;\" \" s.first();\" \"};\", memberExpr(member(hasName(\"first\"))))"
, "false", "true").c_str()) = ::testing::Message()
2944 " struct { void first() {}; } s;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {" " struct { void first() {}; } s;"
" s.first();" "};", memberExpr(member(hasName("first"))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2947, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {\" \" struct { void first() {}; } s;\" \" s.first();\" \"};\", memberExpr(member(hasName(\"first\"))))"
, "false", "true").c_str()) = ::testing::Message()
2945 " s.first();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {" " struct { void first() {}; } s;"
" s.first();" "};", memberExpr(member(hasName("first"))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2947, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {\" \" struct { void first() {}; } s;\" \" s.first();\" \"};\", memberExpr(member(hasName(\"first\"))))"
, "false", "true").c_str()) = ::testing::Message()
2946 "};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {" " struct { void first() {}; } s;"
" s.first();" "};", memberExpr(member(hasName("first"))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2947, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {\" \" struct { void first() {}; } s;\" \" s.first();\" \"};\", memberExpr(member(hasName(\"first\"))))"
, "false", "true").c_str()) = ::testing::Message()
2947 memberExpr(member(hasName("first")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {" " struct { void first() {}; } s;"
" s.first();" "};", memberExpr(member(hasName("first"))))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2947, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {\" \" struct { void first() {}; } s;\" \" s.first();\" \"};\", memberExpr(member(hasName(\"first\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2948}
2949
2950TEST(Member, MatchesMember)class Member_MatchesMember_Test : public ::testing::Test { public
: Member_MatchesMember_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Member_MatchesMember_Test(Member_MatchesMember_Test
const &); void operator=(Member_MatchesMember_Test const
&);};::testing::TestInfo* const Member_MatchesMember_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Member", "MatchesMember", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Member_MatchesMember_Test>);void Member_MatchesMember_Test
::TestBody()
{
2951 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { int i; }; void f() { A a; a.i = 2; }"
, memberExpr(hasDeclaration(fieldDecl(hasType(isInteger()))))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2953, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { int i; }; void f() { A a; a.i = 2; }\", memberExpr(hasDeclaration(fieldDecl(hasType(isInteger())))))"
, "false", "true").c_str()) = ::testing::Message()
2952 "struct A { int i; }; void f() { A a; a.i = 2; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { int i; }; void f() { A a; a.i = 2; }"
, memberExpr(hasDeclaration(fieldDecl(hasType(isInteger()))))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2953, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { int i; }; void f() { A a; a.i = 2; }\", memberExpr(hasDeclaration(fieldDecl(hasType(isInteger())))))"
, "false", "true").c_str()) = ::testing::Message()
2953 memberExpr(hasDeclaration(fieldDecl(hasType(isInteger()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { int i; }; void f() { A a; a.i = 2; }"
, memberExpr(hasDeclaration(fieldDecl(hasType(isInteger()))))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2953, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { int i; }; void f() { A a; a.i = 2; }\", memberExpr(hasDeclaration(fieldDecl(hasType(isInteger())))))"
, "false", "true").c_str()) = ::testing::Message()
;
2954 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { float f; }; void f() { A a; a.f = 2.0f; }"
, memberExpr(hasDeclaration(fieldDecl(hasType(isInteger()))))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2956, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { float f; }; void f() { A a; a.f = 2.0f; }\", memberExpr(hasDeclaration(fieldDecl(hasType(isInteger())))))"
, "false", "true").c_str()) = ::testing::Message()
2955 "struct A { float f; }; void f() { A a; a.f = 2.0f; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { float f; }; void f() { A a; a.f = 2.0f; }"
, memberExpr(hasDeclaration(fieldDecl(hasType(isInteger()))))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2956, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { float f; }; void f() { A a; a.f = 2.0f; }\", memberExpr(hasDeclaration(fieldDecl(hasType(isInteger())))))"
, "false", "true").c_str()) = ::testing::Message()
2956 memberExpr(hasDeclaration(fieldDecl(hasType(isInteger()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { float f; }; void f() { A a; a.f = 2.0f; }"
, memberExpr(hasDeclaration(fieldDecl(hasType(isInteger()))))
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2956, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { float f; }; void f() { A a; a.f = 2.0f; }\", memberExpr(hasDeclaration(fieldDecl(hasType(isInteger())))))"
, "false", "true").c_str()) = ::testing::Message()
;
2957}
2958
2959TEST(Member, UnderstandsAccess)class Member_UnderstandsAccess_Test : public ::testing::Test {
public: Member_UnderstandsAccess_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Member_UnderstandsAccess_Test(Member_UnderstandsAccess_Test
const &); void operator=(Member_UnderstandsAccess_Test const
&);};::testing::TestInfo* const Member_UnderstandsAccess_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Member", "UnderstandsAccess", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Member_UnderstandsAccess_Test>);void Member_UnderstandsAccess_Test
::TestBody()
{
2960 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { int i; };"
, fieldDecl(isPublic(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2961, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { int i; };\", fieldDecl(isPublic(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
2961 "struct A { int i; };", fieldDecl(isPublic(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { int i; };"
, fieldDecl(isPublic(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2961, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { int i; };\", fieldDecl(isPublic(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2962 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { int i; };"
, fieldDecl(isProtected(), hasName("i"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2963, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { int i; };\", fieldDecl(isProtected(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
2963 "struct A { int i; };", fieldDecl(isProtected(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { int i; };"
, fieldDecl(isProtected(), hasName("i"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2963, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { int i; };\", fieldDecl(isProtected(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2964 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { int i; };"
, fieldDecl(isPrivate(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2965, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { int i; };\", fieldDecl(isPrivate(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
2965 "struct A { int i; };", fieldDecl(isPrivate(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { int i; };"
, fieldDecl(isPrivate(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2965, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { int i; };\", fieldDecl(isPrivate(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2966
2967 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { int i; };"
, fieldDecl(isPublic(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2968, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { int i; };\", fieldDecl(isPublic(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
2968 "class A { int i; };", fieldDecl(isPublic(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { int i; };"
, fieldDecl(isPublic(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2968, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { int i; };\", fieldDecl(isPublic(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2969 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { int i; };"
, fieldDecl(isProtected(), hasName("i"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2970, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { int i; };\", fieldDecl(isProtected(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
2970 "class A { int i; };", fieldDecl(isProtected(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { int i; };"
, fieldDecl(isProtected(), hasName("i"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2970, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { int i; };\", fieldDecl(isProtected(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2971 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { int i; };"
, fieldDecl(isPrivate(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2972, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { int i; };\", fieldDecl(isPrivate(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
2972 "class A { int i; };", fieldDecl(isPrivate(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { int i; };"
, fieldDecl(isPrivate(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2972, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { int i; };\", fieldDecl(isPrivate(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2973
2974 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { protected: int i; };"
, fieldDecl(isPublic(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2975, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { protected: int i; };\", fieldDecl(isPublic(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
2975 "class A { protected: int i; };", fieldDecl(isPublic(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { protected: int i; };"
, fieldDecl(isPublic(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2975, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { protected: int i; };\", fieldDecl(isPublic(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2976 EXPECT_TRUE(matches("class A { protected: int i; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { protected: int i; };"
, fieldDecl(isProtected(), hasName("i"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2977, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { protected: int i; };\", fieldDecl(isProtected(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
2977 fieldDecl(isProtected(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class A { protected: int i; };"
, fieldDecl(isProtected(), hasName("i"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2977, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class A { protected: int i; };\", fieldDecl(isProtected(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2978 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { protected: int i; };"
, fieldDecl(isPrivate(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2979, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { protected: int i; };\", fieldDecl(isPrivate(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
2979 "class A { protected: int i; };", fieldDecl(isPrivate(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { protected: int i; };"
, fieldDecl(isPrivate(), hasName("i"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2979, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { protected: int i; };\", fieldDecl(isPrivate(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2980
2981 // Non-member decls have the AccessSpecifier AS_none and thus aren't matched.
2982 EXPECT_TRUE(notMatches("int i;", varDecl(isPublic(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i;", varDecl
(isPublic(), hasName("i"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2982, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i;\", varDecl(isPublic(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2983 EXPECT_TRUE(notMatches("int i;", varDecl(isProtected(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i;", varDecl
(isProtected(), hasName("i"))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2983, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i;\", varDecl(isProtected(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2984 EXPECT_TRUE(notMatches("int i;", varDecl(isPrivate(), hasName("i"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i;", varDecl
(isPrivate(), hasName("i"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2984, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i;\", varDecl(isPrivate(), hasName(\"i\")))"
, "false", "true").c_str()) = ::testing::Message()
;
2985}
2986
2987TEST(Member, MatchesMemberAllocationFunction)class Member_MatchesMemberAllocationFunction_Test : public ::
testing::Test { public: Member_MatchesMemberAllocationFunction_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Member_MatchesMemberAllocationFunction_Test
(Member_MatchesMemberAllocationFunction_Test const &); void
operator=(Member_MatchesMemberAllocationFunction_Test const &
);};::testing::TestInfo* const Member_MatchesMemberAllocationFunction_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Member", "MatchesMemberAllocationFunction", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Member_MatchesMemberAllocationFunction_Test
>);void Member_MatchesMemberAllocationFunction_Test::TestBody
()
{
2988 // Fails in C++11 mode
2989 EXPECT_TRUE(matchesConditionally(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"namespace std { typedef typeof(sizeof(int)) size_t; }" "class X { void *operator new(std::size_t); };"
, cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98")
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"namespace std { typedef typeof(sizeof(int)) size_t; }\" \"class X { void *operator new(std::size_t); };\", cxxMethodDecl(ofClass(hasName(\"X\"))), true, \"-std=gnu++98\")"
, "false", "true").c_str()) = ::testing::Message()
2990 "namespace std { typedef typeof(sizeof(int)) size_t; }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"namespace std { typedef typeof(sizeof(int)) size_t; }" "class X { void *operator new(std::size_t); };"
, cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98")
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"namespace std { typedef typeof(sizeof(int)) size_t; }\" \"class X { void *operator new(std::size_t); };\", cxxMethodDecl(ofClass(hasName(\"X\"))), true, \"-std=gnu++98\")"
, "false", "true").c_str()) = ::testing::Message()
2991 "class X { void *operator new(std::size_t); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"namespace std { typedef typeof(sizeof(int)) size_t; }" "class X { void *operator new(std::size_t); };"
, cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98")
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"namespace std { typedef typeof(sizeof(int)) size_t; }\" \"class X { void *operator new(std::size_t); };\", cxxMethodDecl(ofClass(hasName(\"X\"))), true, \"-std=gnu++98\")"
, "false", "true").c_str()) = ::testing::Message()
2992 cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98"))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"namespace std { typedef typeof(sizeof(int)) size_t; }" "class X { void *operator new(std::size_t); };"
, cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98")
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"namespace std { typedef typeof(sizeof(int)) size_t; }\" \"class X { void *operator new(std::size_t); };\", cxxMethodDecl(ofClass(hasName(\"X\"))), true, \"-std=gnu++98\")"
, "false", "true").c_str()) = ::testing::Message()
;
2993
2994 EXPECT_TRUE(matches("class X { void operator delete(void*); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void operator delete(void*); };"
, cxxMethodDecl(ofClass(hasName("X")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2995, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void operator delete(void*); };\", cxxMethodDecl(ofClass(hasName(\"X\"))))"
, "false", "true").c_str()) = ::testing::Message()
2995 cxxMethodDecl(ofClass(hasName("X")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { void operator delete(void*); };"
, cxxMethodDecl(ofClass(hasName("X")))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 2995, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { void operator delete(void*); };\", cxxMethodDecl(ofClass(hasName(\"X\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
2996
2997 // Fails in C++11 mode
2998 EXPECT_TRUE(matchesConditionally(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"namespace std { typedef typeof(sizeof(int)) size_t; }" "class X { void operator delete[](void*, std::size_t); };"
, cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98")
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3001, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"namespace std { typedef typeof(sizeof(int)) size_t; }\" \"class X { void operator delete[](void*, std::size_t); };\", cxxMethodDecl(ofClass(hasName(\"X\"))), true, \"-std=gnu++98\")"
, "false", "true").c_str()) = ::testing::Message()
2999 "namespace std { typedef typeof(sizeof(int)) size_t; }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"namespace std { typedef typeof(sizeof(int)) size_t; }" "class X { void operator delete[](void*, std::size_t); };"
, cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98")
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3001, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"namespace std { typedef typeof(sizeof(int)) size_t; }\" \"class X { void operator delete[](void*, std::size_t); };\", cxxMethodDecl(ofClass(hasName(\"X\"))), true, \"-std=gnu++98\")"
, "false", "true").c_str()) = ::testing::Message()
3000 "class X { void operator delete[](void*, std::size_t); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"namespace std { typedef typeof(sizeof(int)) size_t; }" "class X { void operator delete[](void*, std::size_t); };"
, cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98")
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3001, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"namespace std { typedef typeof(sizeof(int)) size_t; }\" \"class X { void operator delete[](void*, std::size_t); };\", cxxMethodDecl(ofClass(hasName(\"X\"))), true, \"-std=gnu++98\")"
, "false", "true").c_str()) = ::testing::Message()
3001 cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98"))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"namespace std { typedef typeof(sizeof(int)) size_t; }" "class X { void operator delete[](void*, std::size_t); };"
, cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98")
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3001, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"namespace std { typedef typeof(sizeof(int)) size_t; }\" \"class X { void operator delete[](void*, std::size_t); };\", cxxMethodDecl(ofClass(hasName(\"X\"))), true, \"-std=gnu++98\")"
, "false", "true").c_str()) = ::testing::Message()
;
3002}
3003
3004TEST(HasObjectExpression, DoesNotMatchMember)class HasObjectExpression_DoesNotMatchMember_Test : public ::
testing::Test { public: HasObjectExpression_DoesNotMatchMember_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasObjectExpression_DoesNotMatchMember_Test
(HasObjectExpression_DoesNotMatchMember_Test const &); void
operator=(HasObjectExpression_DoesNotMatchMember_Test const &
);};::testing::TestInfo* const HasObjectExpression_DoesNotMatchMember_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasObjectExpression", "DoesNotMatchMember", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasObjectExpression_DoesNotMatchMember_Test
>);void HasObjectExpression_DoesNotMatchMember_Test::TestBody
()
{
3005 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X {}; struct Z { X m; }; void f(Z z) { z.m; }"
, memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X {}; struct Z { X m; }; void f(Z z) { z.m; }\", memberExpr(hasObjectExpression(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
3006 "class X {}; struct Z { X m; }; void f(Z z) { z.m; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X {}; struct Z { X m; }; void f(Z z) { z.m; }"
, memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X {}; struct Z { X m; }; void f(Z z) { z.m; }\", memberExpr(hasObjectExpression(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
3007 memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X {}; struct Z { X m; }; void f(Z z) { z.m; }"
, memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X {}; struct Z { X m; }; void f(Z z) { z.m; }\", memberExpr(hasObjectExpression(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3008}
3009
3010TEST(HasObjectExpression, MatchesBaseOfVariable)class HasObjectExpression_MatchesBaseOfVariable_Test : public
::testing::Test { public: HasObjectExpression_MatchesBaseOfVariable_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasObjectExpression_MatchesBaseOfVariable_Test
(HasObjectExpression_MatchesBaseOfVariable_Test const &);
void operator=(HasObjectExpression_MatchesBaseOfVariable_Test
const &);};::testing::TestInfo* const HasObjectExpression_MatchesBaseOfVariable_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasObjectExpression", "MatchesBaseOfVariable", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasObjectExpression_MatchesBaseOfVariable_Test
>);void HasObjectExpression_MatchesBaseOfVariable_Test::TestBody
()
{
3011 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { int m; }; void f(X x) { x.m; }"
, memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { int m; }; void f(X x) { x.m; }\", memberExpr(hasObjectExpression(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
3012 "struct X { int m; }; void f(X x) { x.m; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { int m; }; void f(X x) { x.m; }"
, memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { int m; }; void f(X x) { x.m; }\", memberExpr(hasObjectExpression(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
3013 memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { int m; }; void f(X x) { x.m; }"
, memberExpr(hasObjectExpression(hasType(recordDecl(hasName("X"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { int m; }; void f(X x) { x.m; }\", memberExpr(hasObjectExpression(hasType(recordDecl(hasName(\"X\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3014 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { int m; }; void f(X* x) { x->m; }"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3017, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { int m; }; void f(X* x) { x->m; }\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3015 "struct X { int m; }; void f(X* x) { x->m; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { int m; }; void f(X* x) { x->m; }"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3017, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { int m; }; void f(X* x) { x->m; }\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3016 memberExpr(hasObjectExpression(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { int m; }; void f(X* x) { x->m; }"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3017, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { int m; }; void f(X* x) { x->m; }\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3017 hasType(pointsTo(recordDecl(hasName("X"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { int m; }; void f(X* x) { x->m; }"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("X"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3017, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { int m; }; void f(X* x) { x->m; }\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"X\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3018}
3019
3020TEST(HasObjectExpression,class HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
: public ::testing::Test { public: HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
(HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
const &); void operator=(HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
const &);};::testing::TestInfo* const HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasObjectExpression", "MatchesObjectExpressionOfImplicitlyFormedMemberExpression"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
>);void HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
::TestBody()
3021 MatchesObjectExpressionOfImplicitlyFormedMemberExpression)class HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
: public ::testing::Test { public: HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
(HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
const &); void operator=(HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
const &);};::testing::TestInfo* const HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasObjectExpression", "MatchesObjectExpressionOfImplicitlyFormedMemberExpression"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
>);void HasObjectExpression_MatchesObjectExpressionOfImplicitlyFormedMemberExpression_Test
::TestBody()
{
3022 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; struct S { X m; void f() { this->m; } };"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("S"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; struct S { X m; void f() { this->m; } };\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"S\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3023 "class X {}; struct S { X m; void f() { this->m; } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; struct S { X m; void f() { this->m; } };"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("S"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; struct S { X m; void f() { this->m; } };\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"S\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3024 memberExpr(hasObjectExpression(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; struct S { X m; void f() { this->m; } };"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("S"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; struct S { X m; void f() { this->m; } };\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"S\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3025 hasType(pointsTo(recordDecl(hasName("S"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; struct S { X m; void f() { this->m; } };"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("S"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3025, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; struct S { X m; void f() { this->m; } };\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"S\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3026 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; struct S { X m; void f() { m; } };"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("S"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3029, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; struct S { X m; void f() { m; } };\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"S\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3027 "class X {}; struct S { X m; void f() { m; } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; struct S { X m; void f() { m; } };"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("S"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3029, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; struct S { X m; void f() { m; } };\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"S\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3028 memberExpr(hasObjectExpression(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; struct S { X m; void f() { m; } };"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("S"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3029, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; struct S { X m; void f() { m; } };\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"S\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3029 hasType(pointsTo(recordDecl(hasName("S"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X {}; struct S { X m; void f() { m; } };"
, memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl
(hasName("S"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3029, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X {}; struct S { X m; void f() { m; } };\", memberExpr(hasObjectExpression( hasType(pointsTo(recordDecl(hasName(\"S\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3030}
3031
3032TEST(Field, DoesNotMatchNonFieldMembers)class Field_DoesNotMatchNonFieldMembers_Test : public ::testing
::Test { public: Field_DoesNotMatchNonFieldMembers_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Field_DoesNotMatchNonFieldMembers_Test
(Field_DoesNotMatchNonFieldMembers_Test const &); void operator
=(Field_DoesNotMatchNonFieldMembers_Test const &);};::testing
::TestInfo* const Field_DoesNotMatchNonFieldMembers_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Field", "DoesNotMatchNonFieldMembers"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Field_DoesNotMatchNonFieldMembers_Test
>);void Field_DoesNotMatchNonFieldMembers_Test::TestBody()
{
3033 EXPECT_TRUE(notMatches("class X { void m(); };", fieldDecl(hasName("m"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { void m(); };"
, fieldDecl(hasName("m"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3033, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { void m(); };\", fieldDecl(hasName(\"m\")))"
, "false", "true").c_str()) = ::testing::Message()
;
3034 EXPECT_TRUE(notMatches("class X { class m {}; };", fieldDecl(hasName("m"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { class m {}; };"
, fieldDecl(hasName("m"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3034, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { class m {}; };\", fieldDecl(hasName(\"m\")))"
, "false", "true").c_str()) = ::testing::Message()
;
3035 EXPECT_TRUE(notMatches("class X { enum { m }; };", fieldDecl(hasName("m"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { enum { m }; };"
, fieldDecl(hasName("m"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3035, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { enum { m }; };\", fieldDecl(hasName(\"m\")))"
, "false", "true").c_str()) = ::testing::Message()
;
3036 EXPECT_TRUE(notMatches("class X { enum m {}; };", fieldDecl(hasName("m"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { enum m {}; };"
, fieldDecl(hasName("m"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3036, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { enum m {}; };\", fieldDecl(hasName(\"m\")))"
, "false", "true").c_str()) = ::testing::Message()
;
3037}
3038
3039TEST(Field, MatchesField)class Field_MatchesField_Test : public ::testing::Test { public
: Field_MatchesField_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Field_MatchesField_Test(Field_MatchesField_Test const
&); void operator=(Field_MatchesField_Test const &);
};::testing::TestInfo* const Field_MatchesField_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Field", "MatchesField"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Field_MatchesField_Test
>);void Field_MatchesField_Test::TestBody()
{
3040 EXPECT_TRUE(matches("class X { int m; };", fieldDecl(hasName("m"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X { int m; };"
, fieldDecl(hasName("m"))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3040, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X { int m; };\", fieldDecl(hasName(\"m\")))"
, "false", "true").c_str()) = ::testing::Message()
;
3041}
3042
3043TEST(IsVolatileQualified, QualifiersMatch)class IsVolatileQualified_QualifiersMatch_Test : public ::testing
::Test { public: IsVolatileQualified_QualifiersMatch_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsVolatileQualified_QualifiersMatch_Test
(IsVolatileQualified_QualifiersMatch_Test const &); void operator
=(IsVolatileQualified_QualifiersMatch_Test const &);};::testing
::TestInfo* const IsVolatileQualified_QualifiersMatch_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "IsVolatileQualified"
, "QualifiersMatch", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< IsVolatileQualified_QualifiersMatch_Test
>);void IsVolatileQualified_QualifiersMatch_Test::TestBody
()
{
3044 EXPECT_TRUE(matches("volatile int i = 42;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("volatile int i = 42;"
, varDecl(hasType(isVolatileQualified()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3045, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"volatile int i = 42;\", varDecl(hasType(isVolatileQualified())))"
, "false", "true").c_str()) = ::testing::Message()
3045 varDecl(hasType(isVolatileQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("volatile int i = 42;"
, varDecl(hasType(isVolatileQualified()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3045, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"volatile int i = 42;\", varDecl(hasType(isVolatileQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
3046 EXPECT_TRUE(notMatches("volatile int *i;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("volatile int *i;"
, varDecl(hasType(isVolatileQualified()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3047, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"volatile int *i;\", varDecl(hasType(isVolatileQualified())))"
, "false", "true").c_str()) = ::testing::Message()
3047 varDecl(hasType(isVolatileQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("volatile int *i;"
, varDecl(hasType(isVolatileQualified()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3047, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"volatile int *i;\", varDecl(hasType(isVolatileQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
3048 EXPECT_TRUE(matches("typedef volatile int v_int; v_int i = 42;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef volatile int v_int; v_int i = 42;"
, varDecl(hasType(isVolatileQualified()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3049, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef volatile int v_int; v_int i = 42;\", varDecl(hasType(isVolatileQualified())))"
, "false", "true").c_str()) = ::testing::Message()
3049 varDecl(hasType(isVolatileQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef volatile int v_int; v_int i = 42;"
, varDecl(hasType(isVolatileQualified()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3049, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef volatile int v_int; v_int i = 42;\", varDecl(hasType(isVolatileQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
3050}
3051
3052TEST(IsConstQualified, MatchesConstInt)class IsConstQualified_MatchesConstInt_Test : public ::testing
::Test { public: IsConstQualified_MatchesConstInt_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); IsConstQualified_MatchesConstInt_Test
(IsConstQualified_MatchesConstInt_Test const &); void operator
=(IsConstQualified_MatchesConstInt_Test const &);};::testing
::TestInfo* const IsConstQualified_MatchesConstInt_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "IsConstQualified"
, "MatchesConstInt", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< IsConstQualified_MatchesConstInt_Test
>);void IsConstQualified_MatchesConstInt_Test::TestBody()
{
3053 EXPECT_TRUE(matches("const int i = 42;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int i = 42;"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3054, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int i = 42;\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
3054 varDecl(hasType(isConstQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int i = 42;"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3054, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int i = 42;\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
3055}
3056
3057TEST(IsConstQualified, MatchesConstPointer)class IsConstQualified_MatchesConstPointer_Test : public ::testing
::Test { public: IsConstQualified_MatchesConstPointer_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsConstQualified_MatchesConstPointer_Test
(IsConstQualified_MatchesConstPointer_Test const &); void
operator=(IsConstQualified_MatchesConstPointer_Test const &
);};::testing::TestInfo* const IsConstQualified_MatchesConstPointer_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsConstQualified", "MatchesConstPointer", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsConstQualified_MatchesConstPointer_Test
>);void IsConstQualified_MatchesConstPointer_Test::TestBody
()
{
3058 EXPECT_TRUE(matches("int i = 42; int* const p(&i);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int* const p(&i);"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3059, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int* const p(&i);\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
3059 varDecl(hasType(isConstQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = 42; int* const p(&i);"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3059, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = 42; int* const p(&i);\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
3060}
3061
3062TEST(IsConstQualified, MatchesThroughTypedef)class IsConstQualified_MatchesThroughTypedef_Test : public ::
testing::Test { public: IsConstQualified_MatchesThroughTypedef_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsConstQualified_MatchesThroughTypedef_Test
(IsConstQualified_MatchesThroughTypedef_Test const &); void
operator=(IsConstQualified_MatchesThroughTypedef_Test const &
);};::testing::TestInfo* const IsConstQualified_MatchesThroughTypedef_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsConstQualified", "MatchesThroughTypedef", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsConstQualified_MatchesThroughTypedef_Test
>);void IsConstQualified_MatchesThroughTypedef_Test::TestBody
()
{
3063 EXPECT_TRUE(matches("typedef const int const_int; const_int i = 42;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef const int const_int; const_int i = 42;"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3064, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef const int const_int; const_int i = 42;\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
3064 varDecl(hasType(isConstQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef const int const_int; const_int i = 42;"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3064, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef const int const_int; const_int i = 42;\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
3065 EXPECT_TRUE(matches("typedef int* int_ptr; const int_ptr p(0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int* int_ptr; const int_ptr p(0);"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3066, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int* int_ptr; const int_ptr p(0);\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
3066 varDecl(hasType(isConstQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int* int_ptr; const int_ptr p(0);"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3066, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int* int_ptr; const int_ptr p(0);\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
3067}
3068
3069TEST(IsConstQualified, DoesNotMatchInappropriately)class IsConstQualified_DoesNotMatchInappropriately_Test : public
::testing::Test { public: IsConstQualified_DoesNotMatchInappropriately_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsConstQualified_DoesNotMatchInappropriately_Test
(IsConstQualified_DoesNotMatchInappropriately_Test const &
); void operator=(IsConstQualified_DoesNotMatchInappropriately_Test
const &);};::testing::TestInfo* const IsConstQualified_DoesNotMatchInappropriately_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsConstQualified", "DoesNotMatchInappropriately", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsConstQualified_DoesNotMatchInappropriately_Test
>);void IsConstQualified_DoesNotMatchInappropriately_Test::
TestBody()
{
3070 EXPECT_TRUE(notMatches("typedef int nonconst_int; nonconst_int i = 42;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("typedef int nonconst_int; nonconst_int i = 42;"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3071, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"typedef int nonconst_int; nonconst_int i = 42;\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
3071 varDecl(hasType(isConstQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("typedef int nonconst_int; nonconst_int i = 42;"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3071, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"typedef int nonconst_int; nonconst_int i = 42;\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
3072 EXPECT_TRUE(notMatches("int const* p;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int const* p;"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3073, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int const* p;\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
3073 varDecl(hasType(isConstQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int const* p;"
, varDecl(hasType(isConstQualified()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3073, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int const* p;\", varDecl(hasType(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
3074}
3075
3076TEST(CastExpression, MatchesExplicitCasts)class CastExpression_MatchesExplicitCasts_Test : public ::testing
::Test { public: CastExpression_MatchesExplicitCasts_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); CastExpression_MatchesExplicitCasts_Test
(CastExpression_MatchesExplicitCasts_Test const &); void operator
=(CastExpression_MatchesExplicitCasts_Test const &);};::testing
::TestInfo* const CastExpression_MatchesExplicitCasts_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "CastExpression"
, "MatchesExplicitCasts", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< CastExpression_MatchesExplicitCasts_Test>);void CastExpression_MatchesExplicitCasts_Test
::TestBody()
{
3077 EXPECT_TRUE(matches("char *p = reinterpret_cast<char *>(&p);",castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char *p = reinterpret_cast<char *>(&p);"
,castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3077, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char *p = reinterpret_cast<char *>(&p);\",castExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3078 EXPECT_TRUE(matches("void *p = (void *)(&p);", castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void *p = (void *)(&p);"
, castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3078, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void *p = (void *)(&p);\", castExpr())", "false"
, "true").c_str()) = ::testing::Message()
;
3079 EXPECT_TRUE(matches("char q, *p = const_cast<char *>(&q);", castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char q, *p = const_cast<char *>(&q);"
, castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3079, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char q, *p = const_cast<char *>(&q);\", castExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3080 EXPECT_TRUE(matches("char c = char(0);", castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char c = char(0);"
, castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3080, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char c = char(0);\", castExpr())", "false", "true"
).c_str()) = ::testing::Message()
;
3081}
3082TEST(CastExpression, MatchesImplicitCasts)class CastExpression_MatchesImplicitCasts_Test : public ::testing
::Test { public: CastExpression_MatchesImplicitCasts_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); CastExpression_MatchesImplicitCasts_Test
(CastExpression_MatchesImplicitCasts_Test const &); void operator
=(CastExpression_MatchesImplicitCasts_Test const &);};::testing
::TestInfo* const CastExpression_MatchesImplicitCasts_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "CastExpression"
, "MatchesImplicitCasts", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< CastExpression_MatchesImplicitCasts_Test>);void CastExpression_MatchesImplicitCasts_Test
::TestBody()
{
3083 // This test creates an implicit cast from int to char.
3084 EXPECT_TRUE(matches("char c = 0;", castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char c = 0;"
, castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3084, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char c = 0;\", castExpr())", "false", "true").c_str
()) = ::testing::Message()
;
3085 // This test creates an implicit cast from lvalue to rvalue.
3086 EXPECT_TRUE(matches("char c = 0, d = c;", castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char c = 0, d = c;"
, castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3086, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char c = 0, d = c;\", castExpr())", "false", "true"
).c_str()) = ::testing::Message()
;
3087}
3088
3089TEST(CastExpression, DoesNotMatchNonCasts)class CastExpression_DoesNotMatchNonCasts_Test : public ::testing
::Test { public: CastExpression_DoesNotMatchNonCasts_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); CastExpression_DoesNotMatchNonCasts_Test
(CastExpression_DoesNotMatchNonCasts_Test const &); void operator
=(CastExpression_DoesNotMatchNonCasts_Test const &);};::testing
::TestInfo* const CastExpression_DoesNotMatchNonCasts_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "CastExpression"
, "DoesNotMatchNonCasts", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< CastExpression_DoesNotMatchNonCasts_Test>);void CastExpression_DoesNotMatchNonCasts_Test
::TestBody()
{
3090 EXPECT_TRUE(notMatches("char c = '0';", castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char c = '0';"
, castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3090, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char c = '0';\", castExpr())", "false", "true"
).c_str()) = ::testing::Message()
;
3091 EXPECT_TRUE(notMatches("char c, &q = c;", castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char c, &q = c;"
, castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char c, &q = c;\", castExpr())", "false",
"true").c_str()) = ::testing::Message()
;
3092 EXPECT_TRUE(notMatches("int i = (0);", castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = (0);"
, castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3092, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = (0);\", castExpr())", "false", "true"
).c_str()) = ::testing::Message()
;
3093 EXPECT_TRUE(notMatches("int i = 0;", castExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = 0;"
, castExpr()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3093, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = 0;\", castExpr())", "false", "true").
c_str()) = ::testing::Message()
;
3094}
3095
3096TEST(ReinterpretCast, MatchesSimpleCase)class ReinterpretCast_MatchesSimpleCase_Test : public ::testing
::Test { public: ReinterpretCast_MatchesSimpleCase_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ReinterpretCast_MatchesSimpleCase_Test
(ReinterpretCast_MatchesSimpleCase_Test const &); void operator
=(ReinterpretCast_MatchesSimpleCase_Test const &);};::testing
::TestInfo* const ReinterpretCast_MatchesSimpleCase_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ReinterpretCast"
, "MatchesSimpleCase", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< ReinterpretCast_MatchesSimpleCase_Test>);void ReinterpretCast_MatchesSimpleCase_Test
::TestBody()
{
3097 EXPECT_TRUE(matches("char* p = reinterpret_cast<char*>(&p);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char* p = reinterpret_cast<char*>(&p);"
, cxxReinterpretCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3098, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char* p = reinterpret_cast<char*>(&p);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3098 cxxReinterpretCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char* p = reinterpret_cast<char*>(&p);"
, cxxReinterpretCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3098, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char* p = reinterpret_cast<char*>(&p);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3099}
3100
3101TEST(ReinterpretCast, DoesNotMatchOtherCasts)class ReinterpretCast_DoesNotMatchOtherCasts_Test : public ::
testing::Test { public: ReinterpretCast_DoesNotMatchOtherCasts_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ReinterpretCast_DoesNotMatchOtherCasts_Test
(ReinterpretCast_DoesNotMatchOtherCasts_Test const &); void
operator=(ReinterpretCast_DoesNotMatchOtherCasts_Test const &
);};::testing::TestInfo* const ReinterpretCast_DoesNotMatchOtherCasts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ReinterpretCast", "DoesNotMatchOtherCasts", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ReinterpretCast_DoesNotMatchOtherCasts_Test
>);void ReinterpretCast_DoesNotMatchOtherCasts_Test::TestBody
()
{
3102 EXPECT_TRUE(notMatches("char* p = (char*)(&p);", cxxReinterpretCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = (char*)(&p);"
, cxxReinterpretCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3102, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = (char*)(&p);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3103 EXPECT_TRUE(notMatches("char q, *p = const_cast<char*>(&q);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char q, *p = const_cast<char*>(&q);"
, cxxReinterpretCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3104, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char q, *p = const_cast<char*>(&q);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3104 cxxReinterpretCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char q, *p = const_cast<char*>(&q);"
, cxxReinterpretCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3104, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char q, *p = const_cast<char*>(&q);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3105 EXPECT_TRUE(notMatches("void* p = static_cast<void*>(&p);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void* p = static_cast<void*>(&p);"
, cxxReinterpretCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3106, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void* p = static_cast<void*>(&p);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3106 cxxReinterpretCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void* p = static_cast<void*>(&p);"
, cxxReinterpretCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3106, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void* p = static_cast<void*>(&p);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3107 EXPECT_TRUE(notMatches("struct B { virtual ~B() {} }; struct D : B {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxReinterpretCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3110, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3108 "B b;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxReinterpretCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3110, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3109 "D* p = dynamic_cast<D*>(&b);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxReinterpretCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3110, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3110 cxxReinterpretCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxReinterpretCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3110, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxReinterpretCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3111}
3112
3113TEST(FunctionalCast, MatchesSimpleCase)class FunctionalCast_MatchesSimpleCase_Test : public ::testing
::Test { public: FunctionalCast_MatchesSimpleCase_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); FunctionalCast_MatchesSimpleCase_Test
(FunctionalCast_MatchesSimpleCase_Test const &); void operator
=(FunctionalCast_MatchesSimpleCase_Test const &);};::testing
::TestInfo* const FunctionalCast_MatchesSimpleCase_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "FunctionalCast"
, "MatchesSimpleCase", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< FunctionalCast_MatchesSimpleCase_Test>);void FunctionalCast_MatchesSimpleCase_Test
::TestBody()
{
3114 std::string foo_class = "class Foo { public: Foo(const char*); };";
3115 EXPECT_TRUE(matches(foo_class + "void r() { Foo f = Foo(\"hello world\"); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(foo_class + "void r() { Foo f = Foo(\"hello world\"); }"
, cxxFunctionalCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3116, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(foo_class + \"void r() { Foo f = Foo(\\\"hello world\\\"); }\", cxxFunctionalCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3116 cxxFunctionalCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(foo_class + "void r() { Foo f = Foo(\"hello world\"); }"
, cxxFunctionalCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3116, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(foo_class + \"void r() { Foo f = Foo(\\\"hello world\\\"); }\", cxxFunctionalCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3117}
3118
3119TEST(FunctionalCast, DoesNotMatchOtherCasts)class FunctionalCast_DoesNotMatchOtherCasts_Test : public ::testing
::Test { public: FunctionalCast_DoesNotMatchOtherCasts_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); FunctionalCast_DoesNotMatchOtherCasts_Test
(FunctionalCast_DoesNotMatchOtherCasts_Test const &); void
operator=(FunctionalCast_DoesNotMatchOtherCasts_Test const &
);};::testing::TestInfo* const FunctionalCast_DoesNotMatchOtherCasts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"FunctionalCast", "DoesNotMatchOtherCasts", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< FunctionalCast_DoesNotMatchOtherCasts_Test
>);void FunctionalCast_DoesNotMatchOtherCasts_Test::TestBody
()
{
3120 std::string FooClass = "class Foo { public: Foo(const char*); };";
3121 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(FooClass +
"void r() { Foo f = (Foo) \"hello world\"; }", cxxFunctionalCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3123, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(FooClass + \"void r() { Foo f = (Foo) \\\"hello world\\\"; }\", cxxFunctionalCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3122 notMatches(FooClass + "void r() { Foo f = (Foo) \"hello world\"; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(FooClass +
"void r() { Foo f = (Foo) \"hello world\"; }", cxxFunctionalCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3123, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(FooClass + \"void r() { Foo f = (Foo) \\\"hello world\\\"; }\", cxxFunctionalCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3123 cxxFunctionalCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(FooClass +
"void r() { Foo f = (Foo) \"hello world\"; }", cxxFunctionalCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3123, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(FooClass + \"void r() { Foo f = (Foo) \\\"hello world\\\"; }\", cxxFunctionalCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3124 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(FooClass +
"void r() { Foo f = \"hello world\"; }", cxxFunctionalCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3126, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(FooClass + \"void r() { Foo f = \\\"hello world\\\"; }\", cxxFunctionalCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3125 notMatches(FooClass + "void r() { Foo f = \"hello world\"; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(FooClass +
"void r() { Foo f = \"hello world\"; }", cxxFunctionalCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3126, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(FooClass + \"void r() { Foo f = \\\"hello world\\\"; }\", cxxFunctionalCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3126 cxxFunctionalCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(FooClass +
"void r() { Foo f = \"hello world\"; }", cxxFunctionalCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3126, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(FooClass + \"void r() { Foo f = \\\"hello world\\\"; }\", cxxFunctionalCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3127}
3128
3129TEST(DynamicCast, MatchesSimpleCase)class DynamicCast_MatchesSimpleCase_Test : public ::testing::
Test { public: DynamicCast_MatchesSimpleCase_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DynamicCast_MatchesSimpleCase_Test
(DynamicCast_MatchesSimpleCase_Test const &); void operator
=(DynamicCast_MatchesSimpleCase_Test const &);};::testing
::TestInfo* const DynamicCast_MatchesSimpleCase_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DynamicCast"
, "MatchesSimpleCase", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< DynamicCast_MatchesSimpleCase_Test>);void DynamicCast_MatchesSimpleCase_Test
::TestBody()
{
3130 EXPECT_TRUE(matches("struct B { virtual ~B() {} }; struct D : B {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxDynamicCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3133, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxDynamicCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3131 "B b;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxDynamicCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3133, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxDynamicCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3132 "D* p = dynamic_cast<D*>(&b);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxDynamicCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3133, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxDynamicCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3133 cxxDynamicCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxDynamicCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3133, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxDynamicCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3134}
3135
3136TEST(StaticCast, MatchesSimpleCase)class StaticCast_MatchesSimpleCase_Test : public ::testing::Test
{ public: StaticCast_MatchesSimpleCase_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); StaticCast_MatchesSimpleCase_Test(
StaticCast_MatchesSimpleCase_Test const &); void operator
=(StaticCast_MatchesSimpleCase_Test const &);};::testing::
TestInfo* const StaticCast_MatchesSimpleCase_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "StaticCast"
, "MatchesSimpleCase", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< StaticCast_MatchesSimpleCase_Test>);void StaticCast_MatchesSimpleCase_Test
::TestBody()
{
3137 EXPECT_TRUE(matches("void* p(static_cast<void*>(&p));",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void* p(static_cast<void*>(&p));"
, cxxStaticCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3138, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void* p(static_cast<void*>(&p));\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3138 cxxStaticCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void* p(static_cast<void*>(&p));"
, cxxStaticCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3138, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void* p(static_cast<void*>(&p));\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3139}
3140
3141TEST(StaticCast, DoesNotMatchOtherCasts)class StaticCast_DoesNotMatchOtherCasts_Test : public ::testing
::Test { public: StaticCast_DoesNotMatchOtherCasts_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); StaticCast_DoesNotMatchOtherCasts_Test
(StaticCast_DoesNotMatchOtherCasts_Test const &); void operator
=(StaticCast_DoesNotMatchOtherCasts_Test const &);};::testing
::TestInfo* const StaticCast_DoesNotMatchOtherCasts_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "StaticCast"
, "DoesNotMatchOtherCasts", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< StaticCast_DoesNotMatchOtherCasts_Test>);void StaticCast_DoesNotMatchOtherCasts_Test
::TestBody()
{
3142 EXPECT_TRUE(notMatches("char* p = (char*)(&p);", cxxStaticCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = (char*)(&p);"
, cxxStaticCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3142, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = (char*)(&p);\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3143 EXPECT_TRUE(notMatches("char q, *p = const_cast<char*>(&q);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char q, *p = const_cast<char*>(&q);"
, cxxStaticCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3144, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char q, *p = const_cast<char*>(&q);\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3144 cxxStaticCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char q, *p = const_cast<char*>(&q);"
, cxxStaticCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3144, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char q, *p = const_cast<char*>(&q);\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3145 EXPECT_TRUE(notMatches("void* p = reinterpret_cast<char*>(&p);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void* p = reinterpret_cast<char*>(&p);"
, cxxStaticCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3146, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void* p = reinterpret_cast<char*>(&p);\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3146 cxxStaticCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void* p = reinterpret_cast<char*>(&p);"
, cxxStaticCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3146, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void* p = reinterpret_cast<char*>(&p);\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3147 EXPECT_TRUE(notMatches("struct B { virtual ~B() {} }; struct D : B {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxStaticCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3150, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3148 "B b;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxStaticCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3150, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3149 "D* p = dynamic_cast<D*>(&b);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxStaticCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3150, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3150 cxxStaticCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct B { virtual ~B() {} }; struct D : B {};"
"B b;" "D* p = dynamic_cast<D*>(&b);", cxxStaticCastExpr
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3150, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* p = dynamic_cast<D*>(&b);\", cxxStaticCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3151}
3152
3153TEST(CStyleCast, MatchesSimpleCase)class CStyleCast_MatchesSimpleCase_Test : public ::testing::Test
{ public: CStyleCast_MatchesSimpleCase_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); CStyleCast_MatchesSimpleCase_Test(
CStyleCast_MatchesSimpleCase_Test const &); void operator
=(CStyleCast_MatchesSimpleCase_Test const &);};::testing::
TestInfo* const CStyleCast_MatchesSimpleCase_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "CStyleCast"
, "MatchesSimpleCase", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< CStyleCast_MatchesSimpleCase_Test>);void CStyleCast_MatchesSimpleCase_Test
::TestBody()
{
3154 EXPECT_TRUE(matches("int i = (int) 2.2f;", cStyleCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i = (int) 2.2f;"
, cStyleCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3154, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i = (int) 2.2f;\", cStyleCastExpr())", "false"
, "true").c_str()) = ::testing::Message()
;
3155}
3156
3157TEST(CStyleCast, DoesNotMatchOtherCasts)class CStyleCast_DoesNotMatchOtherCasts_Test : public ::testing
::Test { public: CStyleCast_DoesNotMatchOtherCasts_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); CStyleCast_DoesNotMatchOtherCasts_Test
(CStyleCast_DoesNotMatchOtherCasts_Test const &); void operator
=(CStyleCast_DoesNotMatchOtherCasts_Test const &);};::testing
::TestInfo* const CStyleCast_DoesNotMatchOtherCasts_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "CStyleCast"
, "DoesNotMatchOtherCasts", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< CStyleCast_DoesNotMatchOtherCasts_Test>);void CStyleCast_DoesNotMatchOtherCasts_Test
::TestBody()
{
3158 EXPECT_TRUE(notMatches("char* p = static_cast<char*>(0);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
"char q, *r = const_cast<char*>(&q);" "void* s = reinterpret_cast<char*>(&s);"
"struct B { virtual ~B() {} }; struct D : B {};" "B b;" "D* t = dynamic_cast<D*>(&b);"
, cStyleCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\" \"char q, *r = const_cast<char*>(&q);\" \"void* s = reinterpret_cast<char*>(&s);\" \"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* t = dynamic_cast<D*>(&b);\", cStyleCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3159 "char q, *r = const_cast<char*>(&q);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
"char q, *r = const_cast<char*>(&q);" "void* s = reinterpret_cast<char*>(&s);"
"struct B { virtual ~B() {} }; struct D : B {};" "B b;" "D* t = dynamic_cast<D*>(&b);"
, cStyleCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\" \"char q, *r = const_cast<char*>(&q);\" \"void* s = reinterpret_cast<char*>(&s);\" \"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* t = dynamic_cast<D*>(&b);\", cStyleCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3160 "void* s = reinterpret_cast<char*>(&s);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
"char q, *r = const_cast<char*>(&q);" "void* s = reinterpret_cast<char*>(&s);"
"struct B { virtual ~B() {} }; struct D : B {};" "B b;" "D* t = dynamic_cast<D*>(&b);"
, cStyleCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\" \"char q, *r = const_cast<char*>(&q);\" \"void* s = reinterpret_cast<char*>(&s);\" \"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* t = dynamic_cast<D*>(&b);\", cStyleCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3161 "struct B { virtual ~B() {} }; struct D : B {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
"char q, *r = const_cast<char*>(&q);" "void* s = reinterpret_cast<char*>(&s);"
"struct B { virtual ~B() {} }; struct D : B {};" "B b;" "D* t = dynamic_cast<D*>(&b);"
, cStyleCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\" \"char q, *r = const_cast<char*>(&q);\" \"void* s = reinterpret_cast<char*>(&s);\" \"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* t = dynamic_cast<D*>(&b);\", cStyleCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3162 "B b;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
"char q, *r = const_cast<char*>(&q);" "void* s = reinterpret_cast<char*>(&s);"
"struct B { virtual ~B() {} }; struct D : B {};" "B b;" "D* t = dynamic_cast<D*>(&b);"
, cStyleCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\" \"char q, *r = const_cast<char*>(&q);\" \"void* s = reinterpret_cast<char*>(&s);\" \"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* t = dynamic_cast<D*>(&b);\", cStyleCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3163 "D* t = dynamic_cast<D*>(&b);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
"char q, *r = const_cast<char*>(&q);" "void* s = reinterpret_cast<char*>(&s);"
"struct B { virtual ~B() {} }; struct D : B {};" "B b;" "D* t = dynamic_cast<D*>(&b);"
, cStyleCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\" \"char q, *r = const_cast<char*>(&q);\" \"void* s = reinterpret_cast<char*>(&s);\" \"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* t = dynamic_cast<D*>(&b);\", cStyleCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
3164 cStyleCastExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
"char q, *r = const_cast<char*>(&q);" "void* s = reinterpret_cast<char*>(&s);"
"struct B { virtual ~B() {} }; struct D : B {};" "B b;" "D* t = dynamic_cast<D*>(&b);"
, cStyleCastExpr()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\" \"char q, *r = const_cast<char*>(&q);\" \"void* s = reinterpret_cast<char*>(&s);\" \"struct B { virtual ~B() {} }; struct D : B {};\" \"B b;\" \"D* t = dynamic_cast<D*>(&b);\", cStyleCastExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3165}
3166
3167TEST(HasDestinationType, MatchesSimpleCase)class HasDestinationType_MatchesSimpleCase_Test : public ::testing
::Test { public: HasDestinationType_MatchesSimpleCase_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasDestinationType_MatchesSimpleCase_Test
(HasDestinationType_MatchesSimpleCase_Test const &); void
operator=(HasDestinationType_MatchesSimpleCase_Test const &
);};::testing::TestInfo* const HasDestinationType_MatchesSimpleCase_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasDestinationType", "MatchesSimpleCase", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasDestinationType_MatchesSimpleCase_Test
>);void HasDestinationType_MatchesSimpleCase_Test::TestBody
()
{
3168 EXPECT_TRUE(matches("char* p = static_cast<char*>(0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char* p = static_cast<char*>(0);"
, cxxStaticCastExpr(hasDestinationType( pointsTo(TypeMatcher(
anything()))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3170, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char* p = static_cast<char*>(0);\", cxxStaticCastExpr(hasDestinationType( pointsTo(TypeMatcher(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3169 cxxStaticCastExpr(hasDestinationType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char* p = static_cast<char*>(0);"
, cxxStaticCastExpr(hasDestinationType( pointsTo(TypeMatcher(
anything()))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3170, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char* p = static_cast<char*>(0);\", cxxStaticCastExpr(hasDestinationType( pointsTo(TypeMatcher(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3170 pointsTo(TypeMatcher(anything()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char* p = static_cast<char*>(0);"
, cxxStaticCastExpr(hasDestinationType( pointsTo(TypeMatcher(
anything()))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3170, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char* p = static_cast<char*>(0);\", cxxStaticCastExpr(hasDestinationType( pointsTo(TypeMatcher(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3171}
3172
3173TEST(HasImplicitDestinationType, MatchesSimpleCase)class HasImplicitDestinationType_MatchesSimpleCase_Test : public
::testing::Test { public: HasImplicitDestinationType_MatchesSimpleCase_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasImplicitDestinationType_MatchesSimpleCase_Test
(HasImplicitDestinationType_MatchesSimpleCase_Test const &
); void operator=(HasImplicitDestinationType_MatchesSimpleCase_Test
const &);};::testing::TestInfo* const HasImplicitDestinationType_MatchesSimpleCase_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasImplicitDestinationType", "MatchesSimpleCase", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasImplicitDestinationType_MatchesSimpleCase_Test
>);void HasImplicitDestinationType_MatchesSimpleCase_Test::
TestBody()
{
3174 // This test creates an implicit const cast.
3175 EXPECT_TRUE(matches("int x; const int i = x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x; const int i = x;"
, implicitCastExpr( hasImplicitDestinationType(isInteger())))
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x; const int i = x;\", implicitCastExpr( hasImplicitDestinationType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
3176 implicitCastExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x; const int i = x;"
, implicitCastExpr( hasImplicitDestinationType(isInteger())))
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x; const int i = x;\", implicitCastExpr( hasImplicitDestinationType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
3177 hasImplicitDestinationType(isInteger()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x; const int i = x;"
, implicitCastExpr( hasImplicitDestinationType(isInteger())))
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x; const int i = x;\", implicitCastExpr( hasImplicitDestinationType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
;
3178 // This test creates an implicit array-to-pointer cast.
3179 EXPECT_TRUE(matches("int arr[3]; int *p = arr;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int arr[3]; int *p = arr;"
, implicitCastExpr(hasImplicitDestinationType( pointsTo(TypeMatcher
(anything()))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3181, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int arr[3]; int *p = arr;\", implicitCastExpr(hasImplicitDestinationType( pointsTo(TypeMatcher(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3180 implicitCastExpr(hasImplicitDestinationType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int arr[3]; int *p = arr;"
, implicitCastExpr(hasImplicitDestinationType( pointsTo(TypeMatcher
(anything()))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3181, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int arr[3]; int *p = arr;\", implicitCastExpr(hasImplicitDestinationType( pointsTo(TypeMatcher(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3181 pointsTo(TypeMatcher(anything()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int arr[3]; int *p = arr;"
, implicitCastExpr(hasImplicitDestinationType( pointsTo(TypeMatcher
(anything()))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3181, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int arr[3]; int *p = arr;\", implicitCastExpr(hasImplicitDestinationType( pointsTo(TypeMatcher(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3182}
3183
3184TEST(HasImplicitDestinationType, DoesNotMatchIncorrectly)class HasImplicitDestinationType_DoesNotMatchIncorrectly_Test
: public ::testing::Test { public: HasImplicitDestinationType_DoesNotMatchIncorrectly_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasImplicitDestinationType_DoesNotMatchIncorrectly_Test
(HasImplicitDestinationType_DoesNotMatchIncorrectly_Test const
&); void operator=(HasImplicitDestinationType_DoesNotMatchIncorrectly_Test
const &);};::testing::TestInfo* const HasImplicitDestinationType_DoesNotMatchIncorrectly_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasImplicitDestinationType", "DoesNotMatchIncorrectly", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< HasImplicitDestinationType_DoesNotMatchIncorrectly_Test
>);void HasImplicitDestinationType_DoesNotMatchIncorrectly_Test
::TestBody()
{
3185 // This test creates an implicit cast from int to char.
3186 EXPECT_TRUE(notMatches("char c = 0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char c = 0;"
, implicitCastExpr(hasImplicitDestinationType( unless(anything
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3188, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char c = 0;\", implicitCastExpr(hasImplicitDestinationType( unless(anything()))))"
, "false", "true").c_str()) = ::testing::Message()
3187 implicitCastExpr(hasImplicitDestinationType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char c = 0;"
, implicitCastExpr(hasImplicitDestinationType( unless(anything
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3188, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char c = 0;\", implicitCastExpr(hasImplicitDestinationType( unless(anything()))))"
, "false", "true").c_str()) = ::testing::Message()
3188 unless(anything())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char c = 0;"
, implicitCastExpr(hasImplicitDestinationType( unless(anything
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3188, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char c = 0;\", implicitCastExpr(hasImplicitDestinationType( unless(anything()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3189 // This test creates an implicit array-to-pointer cast.
3190 EXPECT_TRUE(notMatches("int arr[3]; int *p = arr;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int arr[3]; int *p = arr;"
, implicitCastExpr(hasImplicitDestinationType( unless(anything
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3192, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int arr[3]; int *p = arr;\", implicitCastExpr(hasImplicitDestinationType( unless(anything()))))"
, "false", "true").c_str()) = ::testing::Message()
3191 implicitCastExpr(hasImplicitDestinationType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int arr[3]; int *p = arr;"
, implicitCastExpr(hasImplicitDestinationType( unless(anything
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3192, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int arr[3]; int *p = arr;\", implicitCastExpr(hasImplicitDestinationType( unless(anything()))))"
, "false", "true").c_str()) = ::testing::Message()
3192 unless(anything())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int arr[3]; int *p = arr;"
, implicitCastExpr(hasImplicitDestinationType( unless(anything
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3192, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int arr[3]; int *p = arr;\", implicitCastExpr(hasImplicitDestinationType( unless(anything()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3193}
3194
3195TEST(ImplicitCast, MatchesSimpleCase)class ImplicitCast_MatchesSimpleCase_Test : public ::testing::
Test { public: ImplicitCast_MatchesSimpleCase_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ImplicitCast_MatchesSimpleCase_Test
(ImplicitCast_MatchesSimpleCase_Test const &); void operator
=(ImplicitCast_MatchesSimpleCase_Test const &);};::testing
::TestInfo* const ImplicitCast_MatchesSimpleCase_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ImplicitCast"
, "MatchesSimpleCase", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< ImplicitCast_MatchesSimpleCase_Test>);void ImplicitCast_MatchesSimpleCase_Test
::TestBody()
{
3196 // This test creates an implicit const cast.
3197 EXPECT_TRUE(matches("int x = 0; const int y = x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; const int y = x;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3198, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; const int y = x;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3198 varDecl(hasInitializer(implicitCastExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; const int y = x;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3198, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; const int y = x;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
3199 // This test creates an implicit cast from int to char.
3200 EXPECT_TRUE(matches("char c = 0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char c = 0;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3201, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char c = 0;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3201 varDecl(hasInitializer(implicitCastExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char c = 0;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3201, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char c = 0;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
3202 // This test creates an implicit array-to-pointer cast.
3203 EXPECT_TRUE(matches("int arr[6]; int *p = arr;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int arr[6]; int *p = arr;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3204, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int arr[6]; int *p = arr;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3204 varDecl(hasInitializer(implicitCastExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int arr[6]; int *p = arr;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3204, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int arr[6]; int *p = arr;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
3205}
3206
3207TEST(ImplicitCast, DoesNotMatchIncorrectly)class ImplicitCast_DoesNotMatchIncorrectly_Test : public ::testing
::Test { public: ImplicitCast_DoesNotMatchIncorrectly_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ImplicitCast_DoesNotMatchIncorrectly_Test
(ImplicitCast_DoesNotMatchIncorrectly_Test const &); void
operator=(ImplicitCast_DoesNotMatchIncorrectly_Test const &
);};::testing::TestInfo* const ImplicitCast_DoesNotMatchIncorrectly_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ImplicitCast", "DoesNotMatchIncorrectly", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ImplicitCast_DoesNotMatchIncorrectly_Test
>);void ImplicitCast_DoesNotMatchIncorrectly_Test::TestBody
()
{
3208 // This test verifies that implicitCastExpr() matches exactly when implicit casts
3209 // are present, and that it ignores explicit and paren casts.
3210
3211 // These two test cases have no casts.
3212 EXPECT_TRUE(notMatches("int x = 0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = 0;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3213, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = 0;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3213 varDecl(hasInitializer(implicitCastExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = 0;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3213, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = 0;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
3214 EXPECT_TRUE(notMatches("int x = 0, &y = x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = 0, &y = x;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3215, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = 0, &y = x;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3215 varDecl(hasInitializer(implicitCastExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = 0, &y = x;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3215, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = 0, &y = x;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
3216
3217 EXPECT_TRUE(notMatches("int x = 0; double d = (double) x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = 0; double d = (double) x;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3218, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = 0; double d = (double) x;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3218 varDecl(hasInitializer(implicitCastExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = 0; double d = (double) x;"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3218, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = 0; double d = (double) x;\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
3219 EXPECT_TRUE(notMatches("const int *p; int *q = const_cast<int *>(p);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("const int *p; int *q = const_cast<int *>(p);"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3220, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"const int *p; int *q = const_cast<int *>(p);\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3220 varDecl(hasInitializer(implicitCastExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("const int *p; int *q = const_cast<int *>(p);"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3220, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"const int *p; int *q = const_cast<int *>(p);\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
3221
3222 EXPECT_TRUE(notMatches("int x = (0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = (0);"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3223, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = (0);\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3223 varDecl(hasInitializer(implicitCastExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = (0);"
, varDecl(hasInitializer(implicitCastExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3223, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = (0);\", varDecl(hasInitializer(implicitCastExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
3224}
3225
3226TEST(IgnoringImpCasts, MatchesImpCasts)class IgnoringImpCasts_MatchesImpCasts_Test : public ::testing
::Test { public: IgnoringImpCasts_MatchesImpCasts_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); IgnoringImpCasts_MatchesImpCasts_Test
(IgnoringImpCasts_MatchesImpCasts_Test const &); void operator
=(IgnoringImpCasts_MatchesImpCasts_Test const &);};::testing
::TestInfo* const IgnoringImpCasts_MatchesImpCasts_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "IgnoringImpCasts"
, "MatchesImpCasts", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< IgnoringImpCasts_MatchesImpCasts_Test
>);void IgnoringImpCasts_MatchesImpCasts_Test::TestBody()
{
3227 // This test checks that ignoringImpCasts matches when implicit casts are
3228 // present and its inner matcher alone does not match.
3229 // Note that this test creates an implicit const cast.
3230 EXPECT_TRUE(matches("int x = 0; const int y = x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; const int y = x;"
, varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl
(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3232, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; const int y = x;\", varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
3231 varDecl(hasInitializer(ignoringImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; const int y = x;"
, varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl
(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3232, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; const int y = x;\", varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
3232 declRefExpr(to(varDecl(hasName("x")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; const int y = x;"
, varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl
(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3232, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; const int y = x;\", varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3233 // This test creates an implict cast from int to char.
3234 EXPECT_TRUE(matches("char x = 0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char x = 0;"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3236, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char x = 0;\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3235 varDecl(hasInitializer(ignoringImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char x = 0;"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3236, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char x = 0;\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3236 integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char x = 0;"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3236, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char x = 0;\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3237}
3238
3239TEST(IgnoringImpCasts, DoesNotMatchIncorrectly)class IgnoringImpCasts_DoesNotMatchIncorrectly_Test : public ::
testing::Test { public: IgnoringImpCasts_DoesNotMatchIncorrectly_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IgnoringImpCasts_DoesNotMatchIncorrectly_Test
(IgnoringImpCasts_DoesNotMatchIncorrectly_Test const &); void
operator=(IgnoringImpCasts_DoesNotMatchIncorrectly_Test const
&);};::testing::TestInfo* const IgnoringImpCasts_DoesNotMatchIncorrectly_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IgnoringImpCasts", "DoesNotMatchIncorrectly", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IgnoringImpCasts_DoesNotMatchIncorrectly_Test
>);void IgnoringImpCasts_DoesNotMatchIncorrectly_Test::TestBody
()
{
3240 // These tests verify that ignoringImpCasts does not match if the inner
3241 // matcher does not match.
3242 // Note that the first test creates an implicit const cast.
3243 EXPECT_TRUE(notMatches("int x; const int y = x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x; const int y = x;"
, varDecl(hasInitializer(ignoringImpCasts( unless(anything())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3245, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x; const int y = x;\", varDecl(hasInitializer(ignoringImpCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3244 varDecl(hasInitializer(ignoringImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x; const int y = x;"
, varDecl(hasInitializer(ignoringImpCasts( unless(anything())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3245, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x; const int y = x;\", varDecl(hasInitializer(ignoringImpCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3245 unless(anything()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x; const int y = x;"
, varDecl(hasInitializer(ignoringImpCasts( unless(anything())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3245, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x; const int y = x;\", varDecl(hasInitializer(ignoringImpCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3246 EXPECT_TRUE(notMatches("int x; int y = x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x; int y = x;"
, varDecl(hasInitializer(ignoringImpCasts( unless(anything())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3248, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x; int y = x;\", varDecl(hasInitializer(ignoringImpCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3247 varDecl(hasInitializer(ignoringImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x; int y = x;"
, varDecl(hasInitializer(ignoringImpCasts( unless(anything())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3248, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x; int y = x;\", varDecl(hasInitializer(ignoringImpCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3248 unless(anything()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x; int y = x;"
, varDecl(hasInitializer(ignoringImpCasts( unless(anything())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3248, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x; int y = x;\", varDecl(hasInitializer(ignoringImpCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3249
3250 // These tests verify that ignoringImplictCasts does not look through explicit
3251 // casts or parentheses.
3252 EXPECT_TRUE(notMatches("char* p = static_cast<char*>(0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3254, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3253 varDecl(hasInitializer(ignoringImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3254, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3254 integerLiteral())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3254, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3255 EXPECT_TRUE(notMatches("int i = (0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = (0);"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = (0);\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3256 varDecl(hasInitializer(ignoringImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = (0);"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = (0);\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3257 integerLiteral())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = (0);"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = (0);\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3258 EXPECT_TRUE(notMatches("float i = (float)0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float i = (float)0;"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3260, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float i = (float)0;\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3259 varDecl(hasInitializer(ignoringImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float i = (float)0;"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3260, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float i = (float)0;\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3260 integerLiteral())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float i = (float)0;"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3260, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float i = (float)0;\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3261 EXPECT_TRUE(notMatches("float i = float(0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float i = float(0);"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3263, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float i = float(0);\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3262 varDecl(hasInitializer(ignoringImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float i = float(0);"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3263, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float i = float(0);\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3263 integerLiteral())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float i = float(0);"
, varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3263, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float i = float(0);\", varDecl(hasInitializer(ignoringImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3264}
3265
3266TEST(IgnoringImpCasts, MatchesWithoutImpCasts)class IgnoringImpCasts_MatchesWithoutImpCasts_Test : public ::
testing::Test { public: IgnoringImpCasts_MatchesWithoutImpCasts_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IgnoringImpCasts_MatchesWithoutImpCasts_Test
(IgnoringImpCasts_MatchesWithoutImpCasts_Test const &); void
operator=(IgnoringImpCasts_MatchesWithoutImpCasts_Test const
&);};::testing::TestInfo* const IgnoringImpCasts_MatchesWithoutImpCasts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IgnoringImpCasts", "MatchesWithoutImpCasts", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IgnoringImpCasts_MatchesWithoutImpCasts_Test
>);void IgnoringImpCasts_MatchesWithoutImpCasts_Test::TestBody
()
{
3267 // This test verifies that expressions that do not have implicit casts
3268 // still match the inner matcher.
3269 EXPECT_TRUE(matches("int x = 0; int &y = x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; int &y = x;"
, varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl
(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3271, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; int &y = x;\", varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
3270 varDecl(hasInitializer(ignoringImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; int &y = x;"
, varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl
(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3271, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; int &y = x;\", varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
3271 declRefExpr(to(varDecl(hasName("x")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; int &y = x;"
, varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl
(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3271, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; int &y = x;\", varDecl(hasInitializer(ignoringImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3272}
3273
3274TEST(IgnoringParenCasts, MatchesParenCasts)class IgnoringParenCasts_MatchesParenCasts_Test : public ::testing
::Test { public: IgnoringParenCasts_MatchesParenCasts_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IgnoringParenCasts_MatchesParenCasts_Test
(IgnoringParenCasts_MatchesParenCasts_Test const &); void
operator=(IgnoringParenCasts_MatchesParenCasts_Test const &
);};::testing::TestInfo* const IgnoringParenCasts_MatchesParenCasts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IgnoringParenCasts", "MatchesParenCasts", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IgnoringParenCasts_MatchesParenCasts_Test
>);void IgnoringParenCasts_MatchesParenCasts_Test::TestBody
()
{
3275 // This test checks that ignoringParenCasts matches when parentheses and/or
3276 // casts are present and its inner matcher alone does not match.
3277 EXPECT_TRUE(matches("int x = (0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = (0);"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3279, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = (0);\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3278 varDecl(hasInitializer(ignoringParenCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = (0);"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3279, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = (0);\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3279 integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = (0);"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3279, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = (0);\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3280 EXPECT_TRUE(matches("int x = (((((0)))));",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = (((((0)))));"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = (((((0)))));\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3281 varDecl(hasInitializer(ignoringParenCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = (((((0)))));"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = (((((0)))));\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3282 integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = (((((0)))));"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = (((((0)))));\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3283
3284 // This test creates an implict cast from int to char in addition to the
3285 // parentheses.
3286 EXPECT_TRUE(matches("char x = (0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char x = (0);"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3288, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char x = (0);\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3287 varDecl(hasInitializer(ignoringParenCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char x = (0);"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3288, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char x = (0);\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3288 integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char x = (0);"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3288, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char x = (0);\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3289
3290 EXPECT_TRUE(matches("char x = (char)0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char x = (char)0;"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3292, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char x = (char)0;\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3291 varDecl(hasInitializer(ignoringParenCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char x = (char)0;"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3292, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char x = (char)0;\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3292 integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char x = (char)0;"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3292, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char x = (char)0;\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3293 EXPECT_TRUE(matches("char* p = static_cast<char*>(0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char* p = static_cast<char*>(0);"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3295, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char* p = static_cast<char*>(0);\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3294 varDecl(hasInitializer(ignoringParenCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char* p = static_cast<char*>(0);"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3295, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char* p = static_cast<char*>(0);\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3295 integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("char* p = static_cast<char*>(0);"
, varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3295, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"char* p = static_cast<char*>(0);\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3296}
3297
3298TEST(IgnoringParenCasts, MatchesWithoutParenCasts)class IgnoringParenCasts_MatchesWithoutParenCasts_Test : public
::testing::Test { public: IgnoringParenCasts_MatchesWithoutParenCasts_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IgnoringParenCasts_MatchesWithoutParenCasts_Test
(IgnoringParenCasts_MatchesWithoutParenCasts_Test const &
); void operator=(IgnoringParenCasts_MatchesWithoutParenCasts_Test
const &);};::testing::TestInfo* const IgnoringParenCasts_MatchesWithoutParenCasts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IgnoringParenCasts", "MatchesWithoutParenCasts", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IgnoringParenCasts_MatchesWithoutParenCasts_Test
>);void IgnoringParenCasts_MatchesWithoutParenCasts_Test::
TestBody()
{
3299 // This test verifies that expressions that do not have any casts still match.
3300 EXPECT_TRUE(matches("int x = 0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0;",
varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3302, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0;\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3301 varDecl(hasInitializer(ignoringParenCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0;",
varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3302, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0;\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3302 integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0;",
varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals
(0)))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3302, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0;\", varDecl(hasInitializer(ignoringParenCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3303}
3304
3305TEST(IgnoringParenCasts, DoesNotMatchIncorrectly)class IgnoringParenCasts_DoesNotMatchIncorrectly_Test : public
::testing::Test { public: IgnoringParenCasts_DoesNotMatchIncorrectly_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IgnoringParenCasts_DoesNotMatchIncorrectly_Test
(IgnoringParenCasts_DoesNotMatchIncorrectly_Test const &)
; void operator=(IgnoringParenCasts_DoesNotMatchIncorrectly_Test
const &);};::testing::TestInfo* const IgnoringParenCasts_DoesNotMatchIncorrectly_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IgnoringParenCasts", "DoesNotMatchIncorrectly", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IgnoringParenCasts_DoesNotMatchIncorrectly_Test
>);void IgnoringParenCasts_DoesNotMatchIncorrectly_Test::TestBody
()
{
3306 // These tests verify that ignoringImpCasts does not match if the inner
3307 // matcher does not match.
3308 EXPECT_TRUE(notMatches("int x = ((0));",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = ((0));"
, varDecl(hasInitializer(ignoringParenCasts( unless(anything(
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3310, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = ((0));\", varDecl(hasInitializer(ignoringParenCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3309 varDecl(hasInitializer(ignoringParenCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = ((0));"
, varDecl(hasInitializer(ignoringParenCasts( unless(anything(
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3310, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = ((0));\", varDecl(hasInitializer(ignoringParenCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3310 unless(anything()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int x = ((0));"
, varDecl(hasInitializer(ignoringParenCasts( unless(anything(
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3310, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int x = ((0));\", varDecl(hasInitializer(ignoringParenCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3311
3312 // This test creates an implicit cast from int to char in addition to the
3313 // parentheses.
3314 EXPECT_TRUE(notMatches("char x = ((0));",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char x = ((0));"
, varDecl(hasInitializer(ignoringParenCasts( unless(anything(
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3316, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char x = ((0));\", varDecl(hasInitializer(ignoringParenCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3315 varDecl(hasInitializer(ignoringParenCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char x = ((0));"
, varDecl(hasInitializer(ignoringParenCasts( unless(anything(
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3316, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char x = ((0));\", varDecl(hasInitializer(ignoringParenCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3316 unless(anything()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char x = ((0));"
, varDecl(hasInitializer(ignoringParenCasts( unless(anything(
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3316, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char x = ((0));\", varDecl(hasInitializer(ignoringParenCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3317
3318 EXPECT_TRUE(notMatches("char *x = static_cast<char *>((0));",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char *x = static_cast<char *>((0));"
, varDecl(hasInitializer(ignoringParenCasts( unless(anything(
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3320, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char *x = static_cast<char *>((0));\", varDecl(hasInitializer(ignoringParenCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3319 varDecl(hasInitializer(ignoringParenCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char *x = static_cast<char *>((0));"
, varDecl(hasInitializer(ignoringParenCasts( unless(anything(
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3320, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char *x = static_cast<char *>((0));\", varDecl(hasInitializer(ignoringParenCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3320 unless(anything()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char *x = static_cast<char *>((0));"
, varDecl(hasInitializer(ignoringParenCasts( unless(anything(
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3320, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char *x = static_cast<char *>((0));\", varDecl(hasInitializer(ignoringParenCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3321}
3322
3323TEST(IgnoringParenAndImpCasts, MatchesParenImpCasts)class IgnoringParenAndImpCasts_MatchesParenImpCasts_Test : public
::testing::Test { public: IgnoringParenAndImpCasts_MatchesParenImpCasts_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IgnoringParenAndImpCasts_MatchesParenImpCasts_Test
(IgnoringParenAndImpCasts_MatchesParenImpCasts_Test const &
); void operator=(IgnoringParenAndImpCasts_MatchesParenImpCasts_Test
const &);};::testing::TestInfo* const IgnoringParenAndImpCasts_MatchesParenImpCasts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IgnoringParenAndImpCasts", "MatchesParenImpCasts", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IgnoringParenAndImpCasts_MatchesParenImpCasts_Test
>);void IgnoringParenAndImpCasts_MatchesParenImpCasts_Test
::TestBody()
{
3324 // This test checks that ignoringParenAndImpCasts matches when
3325 // parentheses and/or implicit casts are present and its inner matcher alone
3326 // does not match.
3327 // Note that this test creates an implicit const cast.
3328 EXPECT_TRUE(matches("int x = 0; const int y = x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; const int y = x;"
, varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to
(varDecl(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3330, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; const int y = x;\", varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
3329 varDecl(hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; const int y = x;"
, varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to
(varDecl(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3330, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; const int y = x;\", varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
3330 declRefExpr(to(varDecl(hasName("x")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; const int y = x;"
, varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to
(varDecl(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3330, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; const int y = x;\", varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3331 // This test creates an implicit cast from int to char.
3332 EXPECT_TRUE(matches("const char x = (0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const char x = (0);"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
(equals(0)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const char x = (0);\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3333 varDecl(hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const char x = (0);"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
(equals(0)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const char x = (0);\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3334 integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const char x = (0);"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
(equals(0)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3334, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const char x = (0);\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3335}
3336
3337TEST(IgnoringParenAndImpCasts, MatchesWithoutParenImpCasts)class IgnoringParenAndImpCasts_MatchesWithoutParenImpCasts_Test
: public ::testing::Test { public: IgnoringParenAndImpCasts_MatchesWithoutParenImpCasts_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IgnoringParenAndImpCasts_MatchesWithoutParenImpCasts_Test
(IgnoringParenAndImpCasts_MatchesWithoutParenImpCasts_Test const
&); void operator=(IgnoringParenAndImpCasts_MatchesWithoutParenImpCasts_Test
const &);};::testing::TestInfo* const IgnoringParenAndImpCasts_MatchesWithoutParenImpCasts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IgnoringParenAndImpCasts", "MatchesWithoutParenImpCasts", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< IgnoringParenAndImpCasts_MatchesWithoutParenImpCasts_Test
>);void IgnoringParenAndImpCasts_MatchesWithoutParenImpCasts_Test
::TestBody()
{
3338 // This test verifies that expressions that do not have parentheses or
3339 // implicit casts still match.
3340 EXPECT_TRUE(matches("int x = 0; int &y = x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; int &y = x;"
, varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to
(varDecl(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3342, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; int &y = x;\", varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
3341 varDecl(hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; int &y = x;"
, varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to
(varDecl(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3342, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; int &y = x;\", varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
3342 declRefExpr(to(varDecl(hasName("x")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0; int &y = x;"
, varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to
(varDecl(hasName("x")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3342, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0; int &y = x;\", varDecl(hasInitializer(ignoringParenImpCasts( declRefExpr(to(varDecl(hasName(\"x\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3343 EXPECT_TRUE(matches("int x = 0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0;",
varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
(equals(0)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3345, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0;\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3344 varDecl(hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0;",
varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
(equals(0)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3345, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0;\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
3345 integerLiteral(equals(0)))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int x = 0;",
varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
(equals(0)))))))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3345, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int x = 0;\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral(equals(0))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3346}
3347
3348TEST(IgnoringParenAndImpCasts, DoesNotMatchIncorrectly)class IgnoringParenAndImpCasts_DoesNotMatchIncorrectly_Test :
public ::testing::Test { public: IgnoringParenAndImpCasts_DoesNotMatchIncorrectly_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IgnoringParenAndImpCasts_DoesNotMatchIncorrectly_Test
(IgnoringParenAndImpCasts_DoesNotMatchIncorrectly_Test const &
); void operator=(IgnoringParenAndImpCasts_DoesNotMatchIncorrectly_Test
const &);};::testing::TestInfo* const IgnoringParenAndImpCasts_DoesNotMatchIncorrectly_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IgnoringParenAndImpCasts", "DoesNotMatchIncorrectly", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< IgnoringParenAndImpCasts_DoesNotMatchIncorrectly_Test
>);void IgnoringParenAndImpCasts_DoesNotMatchIncorrectly_Test
::TestBody()
{
3349 // These tests verify that ignoringParenImpCasts does not match if
3350 // the inner matcher does not match.
3351 // This test creates an implicit cast.
3352 EXPECT_TRUE(notMatches("char c = ((3));",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char c = ((3));"
, varDecl(hasInitializer(ignoringParenImpCasts( unless(anything
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3354, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char c = ((3));\", varDecl(hasInitializer(ignoringParenImpCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3353 varDecl(hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char c = ((3));"
, varDecl(hasInitializer(ignoringParenImpCasts( unless(anything
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3354, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char c = ((3));\", varDecl(hasInitializer(ignoringParenImpCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
3354 unless(anything()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char c = ((3));"
, varDecl(hasInitializer(ignoringParenImpCasts( unless(anything
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3354, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char c = ((3));\", varDecl(hasInitializer(ignoringParenImpCasts( unless(anything())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3355 // These tests verify that ignoringParenAndImplictCasts does not look
3356 // through explicit casts.
3357 EXPECT_TRUE(notMatches("float y = (float(0));",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float y = (float(0));"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3359, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float y = (float(0));\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3358 varDecl(hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float y = (float(0));"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3359, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float y = (float(0));\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3359 integerLiteral())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float y = (float(0));"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3359, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float y = (float(0));\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3360 EXPECT_TRUE(notMatches("float y = (float)0;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float y = (float)0;"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float y = (float)0;\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3361 varDecl(hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float y = (float)0;"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float y = (float)0;\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3362 integerLiteral())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("float y = (float)0;"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3362, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"float y = (float)0;\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3363 EXPECT_TRUE(notMatches("char* p = static_cast<char*>(0);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3365, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3364 varDecl(hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3365, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
3365 integerLiteral())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("char* p = static_cast<char*>(0);"
, varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3365, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"char* p = static_cast<char*>(0);\", varDecl(hasInitializer(ignoringParenImpCasts( integerLiteral()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3366}
3367
3368TEST(HasSourceExpression, MatchesImplicitCasts)class HasSourceExpression_MatchesImplicitCasts_Test : public ::
testing::Test { public: HasSourceExpression_MatchesImplicitCasts_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasSourceExpression_MatchesImplicitCasts_Test
(HasSourceExpression_MatchesImplicitCasts_Test const &); void
operator=(HasSourceExpression_MatchesImplicitCasts_Test const
&);};::testing::TestInfo* const HasSourceExpression_MatchesImplicitCasts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasSourceExpression", "MatchesImplicitCasts", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasSourceExpression_MatchesImplicitCasts_Test
>);void HasSourceExpression_MatchesImplicitCasts_Test::TestBody
()
{
3369 EXPECT_TRUE(matches("class string {}; class URL { public: URL(string s); };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class string {}; class URL { public: URL(string s); };"
"void r() {string a_string; URL url = a_string; }", implicitCastExpr
( hasSourceExpression(cxxConstructExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3372, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class string {}; class URL { public: URL(string s); };\" \"void r() {string a_string; URL url = a_string; }\", implicitCastExpr( hasSourceExpression(cxxConstructExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3370 "void r() {string a_string; URL url = a_string; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class string {}; class URL { public: URL(string s); };"
"void r() {string a_string; URL url = a_string; }", implicitCastExpr
( hasSourceExpression(cxxConstructExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3372, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class string {}; class URL { public: URL(string s); };\" \"void r() {string a_string; URL url = a_string; }\", implicitCastExpr( hasSourceExpression(cxxConstructExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3371 implicitCastExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class string {}; class URL { public: URL(string s); };"
"void r() {string a_string; URL url = a_string; }", implicitCastExpr
( hasSourceExpression(cxxConstructExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3372, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class string {}; class URL { public: URL(string s); };\" \"void r() {string a_string; URL url = a_string; }\", implicitCastExpr( hasSourceExpression(cxxConstructExpr())))"
, "false", "true").c_str()) = ::testing::Message()
3372 hasSourceExpression(cxxConstructExpr()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class string {}; class URL { public: URL(string s); };"
"void r() {string a_string; URL url = a_string; }", implicitCastExpr
( hasSourceExpression(cxxConstructExpr()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3372, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class string {}; class URL { public: URL(string s); };\" \"void r() {string a_string; URL url = a_string; }\", implicitCastExpr( hasSourceExpression(cxxConstructExpr())))"
, "false", "true").c_str()) = ::testing::Message()
;
3373}
3374
3375TEST(HasSourceExpression, MatchesExplicitCasts)class HasSourceExpression_MatchesExplicitCasts_Test : public ::
testing::Test { public: HasSourceExpression_MatchesExplicitCasts_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasSourceExpression_MatchesExplicitCasts_Test
(HasSourceExpression_MatchesExplicitCasts_Test const &); void
operator=(HasSourceExpression_MatchesExplicitCasts_Test const
&);};::testing::TestInfo* const HasSourceExpression_MatchesExplicitCasts_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasSourceExpression", "MatchesExplicitCasts", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasSourceExpression_MatchesExplicitCasts_Test
>);void HasSourceExpression_MatchesExplicitCasts_Test::TestBody
()
{
3376 EXPECT_TRUE(matches("float x = static_cast<float>(42);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("float x = static_cast<float>(42);"
, explicitCastExpr( hasSourceExpression(hasDescendant( expr(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3379, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"float x = static_cast<float>(42);\", explicitCastExpr( hasSourceExpression(hasDescendant( expr(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
3377 explicitCastExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("float x = static_cast<float>(42);"
, explicitCastExpr( hasSourceExpression(hasDescendant( expr(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3379, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"float x = static_cast<float>(42);\", explicitCastExpr( hasSourceExpression(hasDescendant( expr(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
3378 hasSourceExpression(hasDescendant(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("float x = static_cast<float>(42);"
, explicitCastExpr( hasSourceExpression(hasDescendant( expr(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3379, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"float x = static_cast<float>(42);\", explicitCastExpr( hasSourceExpression(hasDescendant( expr(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
3379 expr(integerLiteral()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("float x = static_cast<float>(42);"
, explicitCastExpr( hasSourceExpression(hasDescendant( expr(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3379, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"float x = static_cast<float>(42);\", explicitCastExpr( hasSourceExpression(hasDescendant( expr(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3380}
3381
3382TEST(Statement, DoesNotMatchDeclarations)class Statement_DoesNotMatchDeclarations_Test : public ::testing
::Test { public: Statement_DoesNotMatchDeclarations_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Statement_DoesNotMatchDeclarations_Test
(Statement_DoesNotMatchDeclarations_Test const &); void operator
=(Statement_DoesNotMatchDeclarations_Test const &);};::testing
::TestInfo* const Statement_DoesNotMatchDeclarations_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Statement",
"DoesNotMatchDeclarations", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Statement_DoesNotMatchDeclarations_Test>);void Statement_DoesNotMatchDeclarations_Test
::TestBody()
{
3383 EXPECT_TRUE(notMatches("class X {};", stmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {};"
, stmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3383, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", stmt())", "false", "true").c_str
()) = ::testing::Message()
;
3384}
3385
3386TEST(Statement, MatchesCompoundStatments)class Statement_MatchesCompoundStatments_Test : public ::testing
::Test { public: Statement_MatchesCompoundStatments_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Statement_MatchesCompoundStatments_Test
(Statement_MatchesCompoundStatments_Test const &); void operator
=(Statement_MatchesCompoundStatments_Test const &);};::testing
::TestInfo* const Statement_MatchesCompoundStatments_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Statement",
"MatchesCompoundStatments", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Statement_MatchesCompoundStatments_Test>);void Statement_MatchesCompoundStatments_Test
::TestBody()
{
3387 EXPECT_TRUE(matches("void x() {}", stmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() {}"
, stmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3387, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() {}\", stmt())", "false", "true").c_str(
)) = ::testing::Message()
;
3388}
3389
3390TEST(DeclarationStatement, DoesNotMatchCompoundStatements)class DeclarationStatement_DoesNotMatchCompoundStatements_Test
: public ::testing::Test { public: DeclarationStatement_DoesNotMatchCompoundStatements_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclarationStatement_DoesNotMatchCompoundStatements_Test
(DeclarationStatement_DoesNotMatchCompoundStatements_Test const
&); void operator=(DeclarationStatement_DoesNotMatchCompoundStatements_Test
const &);};::testing::TestInfo* const DeclarationStatement_DoesNotMatchCompoundStatements_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationStatement", "DoesNotMatchCompoundStatements", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< DeclarationStatement_DoesNotMatchCompoundStatements_Test
>);void DeclarationStatement_DoesNotMatchCompoundStatements_Test
::TestBody()
{
3391 EXPECT_TRUE(notMatches("void x() {}", declStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() {}"
, declStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3391, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() {}\", declStmt())", "false", "true")
.c_str()) = ::testing::Message()
;
3392}
3393
3394TEST(DeclarationStatement, MatchesVariableDeclarationStatements)class DeclarationStatement_MatchesVariableDeclarationStatements_Test
: public ::testing::Test { public: DeclarationStatement_MatchesVariableDeclarationStatements_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); DeclarationStatement_MatchesVariableDeclarationStatements_Test
(DeclarationStatement_MatchesVariableDeclarationStatements_Test
const &); void operator=(DeclarationStatement_MatchesVariableDeclarationStatements_Test
const &);};::testing::TestInfo* const DeclarationStatement_MatchesVariableDeclarationStatements_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"DeclarationStatement", "MatchesVariableDeclarationStatements"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< DeclarationStatement_MatchesVariableDeclarationStatements_Test
>);void DeclarationStatement_MatchesVariableDeclarationStatements_Test
::TestBody()
{
3395 EXPECT_TRUE(matches("void x() { int a; }", declStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { int a; }"
, declStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3395, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { int a; }\", declStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
3396}
3397
3398TEST(ExprWithCleanups, MatchesExprWithCleanups)class ExprWithCleanups_MatchesExprWithCleanups_Test : public ::
testing::Test { public: ExprWithCleanups_MatchesExprWithCleanups_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ExprWithCleanups_MatchesExprWithCleanups_Test
(ExprWithCleanups_MatchesExprWithCleanups_Test const &); void
operator=(ExprWithCleanups_MatchesExprWithCleanups_Test const
&);};::testing::TestInfo* const ExprWithCleanups_MatchesExprWithCleanups_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ExprWithCleanups", "MatchesExprWithCleanups", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ExprWithCleanups_MatchesExprWithCleanups_Test
>);void ExprWithCleanups_MatchesExprWithCleanups_Test::TestBody
()
{
3399 EXPECT_TRUE(matches("struct Foo { ~Foo(); };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct Foo { ~Foo(); };"
"const Foo f = Foo();", varDecl(hasInitializer(exprWithCleanups
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3401, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct Foo { ~Foo(); };\" \"const Foo f = Foo();\", varDecl(hasInitializer(exprWithCleanups())))"
, "false", "true").c_str()) = ::testing::Message()
3400 "const Foo f = Foo();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct Foo { ~Foo(); };"
"const Foo f = Foo();", varDecl(hasInitializer(exprWithCleanups
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3401, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct Foo { ~Foo(); };\" \"const Foo f = Foo();\", varDecl(hasInitializer(exprWithCleanups())))"
, "false", "true").c_str()) = ::testing::Message()
3401 varDecl(hasInitializer(exprWithCleanups()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct Foo { ~Foo(); };"
"const Foo f = Foo();", varDecl(hasInitializer(exprWithCleanups
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3401, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct Foo { ~Foo(); };\" \"const Foo f = Foo();\", varDecl(hasInitializer(exprWithCleanups())))"
, "false", "true").c_str()) = ::testing::Message()
;
3402 EXPECT_FALSE(matches("struct Foo { };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("struct Foo { };"
"const Foo f = Foo();", varDecl(hasInitializer(exprWithCleanups
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3404, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct Foo { };\" \"const Foo f = Foo();\", varDecl(hasInitializer(exprWithCleanups())))"
, "true", "false").c_str()) = ::testing::Message()
3403 "const Foo f = Foo();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("struct Foo { };"
"const Foo f = Foo();", varDecl(hasInitializer(exprWithCleanups
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3404, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct Foo { };\" \"const Foo f = Foo();\", varDecl(hasInitializer(exprWithCleanups())))"
, "true", "false").c_str()) = ::testing::Message()
3404 varDecl(hasInitializer(exprWithCleanups()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("struct Foo { };"
"const Foo f = Foo();", varDecl(hasInitializer(exprWithCleanups
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3404, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct Foo { };\" \"const Foo f = Foo();\", varDecl(hasInitializer(exprWithCleanups())))"
, "true", "false").c_str()) = ::testing::Message()
;
3405}
3406
3407TEST(InitListExpression, MatchesInitListExpression)class InitListExpression_MatchesInitListExpression_Test : public
::testing::Test { public: InitListExpression_MatchesInitListExpression_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); InitListExpression_MatchesInitListExpression_Test
(InitListExpression_MatchesInitListExpression_Test const &
); void operator=(InitListExpression_MatchesInitListExpression_Test
const &);};::testing::TestInfo* const InitListExpression_MatchesInitListExpression_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"InitListExpression", "MatchesInitListExpression", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< InitListExpression_MatchesInitListExpression_Test
>);void InitListExpression_MatchesInitListExpression_Test::
TestBody()
{
3408 EXPECT_TRUE(matches("int a[] = { 1, 2 };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a[] = { 1, 2 };"
, initListExpr(hasType(asString("int [2]")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3409, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a[] = { 1, 2 };\", initListExpr(hasType(asString(\"int [2]\"))))"
, "false", "true").c_str()) = ::testing::Message()
3409 initListExpr(hasType(asString("int [2]")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a[] = { 1, 2 };"
, initListExpr(hasType(asString("int [2]")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3409, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a[] = { 1, 2 };\", initListExpr(hasType(asString(\"int [2]\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
3410 EXPECT_TRUE(matches("struct B { int x, y; }; B b = { 5, 6 };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct B { int x, y; }; B b = { 5, 6 };"
, initListExpr(hasType(recordDecl(hasName("B"))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3411, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct B { int x, y; }; B b = { 5, 6 };\", initListExpr(hasType(recordDecl(hasName(\"B\")))))"
, "false", "true").c_str()) = ::testing::Message()
3411 initListExpr(hasType(recordDecl(hasName("B"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct B { int x, y; }; B b = { 5, 6 };"
, initListExpr(hasType(recordDecl(hasName("B"))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3411, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct B { int x, y; }; B b = { 5, 6 };\", initListExpr(hasType(recordDecl(hasName(\"B\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
3412 EXPECT_TRUE(matches("struct S { S(void (*a)()); };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(void (*a)()); };"
"void f();" "S s[1] = { &f };", declRefExpr(to(functionDecl
(hasName("f"))))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3415, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(void (*a)()); };\" \"void f();\" \"S s[1] = { &f };\", declRefExpr(to(functionDecl(hasName(\"f\")))))"
, "false", "true").c_str()) = ::testing::Message()
3413 "void f();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(void (*a)()); };"
"void f();" "S s[1] = { &f };", declRefExpr(to(functionDecl
(hasName("f"))))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3415, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(void (*a)()); };\" \"void f();\" \"S s[1] = { &f };\", declRefExpr(to(functionDecl(hasName(\"f\")))))"
, "false", "true").c_str()) = ::testing::Message()
3414 "S s[1] = { &f };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(void (*a)()); };"
"void f();" "S s[1] = { &f };", declRefExpr(to(functionDecl
(hasName("f"))))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3415, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(void (*a)()); };\" \"void f();\" \"S s[1] = { &f };\", declRefExpr(to(functionDecl(hasName(\"f\")))))"
, "false", "true").c_str()) = ::testing::Message()
3415 declRefExpr(to(functionDecl(hasName("f"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { S(void (*a)()); };"
"void f();" "S s[1] = { &f };", declRefExpr(to(functionDecl
(hasName("f"))))))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3415, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { S(void (*a)()); };\" \"void f();\" \"S s[1] = { &f };\", declRefExpr(to(functionDecl(hasName(\"f\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
3416 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i[1] = {42, [0] = 43};"
, integerLiteral(equals(42))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3417, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i[1] = {42, [0] = 43};\", integerLiteral(equals(42)))"
, "false", "true").c_str()) = ::testing::Message()
3417 matches("int i[1] = {42, [0] = 43};", integerLiteral(equals(42))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int i[1] = {42, [0] = 43};"
, integerLiteral(equals(42))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3417, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int i[1] = {42, [0] = 43};\", integerLiteral(equals(42)))"
, "false", "true").c_str()) = ::testing::Message()
;
3418}
3419
3420TEST(UsingDeclaration, MatchesUsingDeclarations)class UsingDeclaration_MatchesUsingDeclarations_Test : public
::testing::Test { public: UsingDeclaration_MatchesUsingDeclarations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); UsingDeclaration_MatchesUsingDeclarations_Test
(UsingDeclaration_MatchesUsingDeclarations_Test const &);
void operator=(UsingDeclaration_MatchesUsingDeclarations_Test
const &);};::testing::TestInfo* const UsingDeclaration_MatchesUsingDeclarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"UsingDeclaration", "MatchesUsingDeclarations", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< UsingDeclaration_MatchesUsingDeclarations_Test
>);void UsingDeclaration_MatchesUsingDeclarations_Test::TestBody
()
{
3421 EXPECT_TRUE(matches("namespace X { int x; } using X::x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace X { int x; } using X::x;"
, usingDecl()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3422, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace X { int x; } using X::x;\", usingDecl())"
, "false", "true").c_str()) = ::testing::Message()
3422 usingDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace X { int x; } using X::x;"
, usingDecl()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3422, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace X { int x; } using X::x;\", usingDecl())"
, "false", "true").c_str()) = ::testing::Message()
;
3423}
3424
3425TEST(UsingDeclaration, MatchesShadowUsingDelcarations)class UsingDeclaration_MatchesShadowUsingDelcarations_Test : public
::testing::Test { public: UsingDeclaration_MatchesShadowUsingDelcarations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); UsingDeclaration_MatchesShadowUsingDelcarations_Test
(UsingDeclaration_MatchesShadowUsingDelcarations_Test const &
); void operator=(UsingDeclaration_MatchesShadowUsingDelcarations_Test
const &);};::testing::TestInfo* const UsingDeclaration_MatchesShadowUsingDelcarations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"UsingDeclaration", "MatchesShadowUsingDelcarations", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< UsingDeclaration_MatchesShadowUsingDelcarations_Test
>);void UsingDeclaration_MatchesShadowUsingDelcarations_Test
::TestBody()
{
3426 EXPECT_TRUE(matches("namespace f { int a; } using f::a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace f { int a; } using f::a;"
, usingDecl(hasAnyUsingShadowDecl(hasName("a")))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3427, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace f { int a; } using f::a;\", usingDecl(hasAnyUsingShadowDecl(hasName(\"a\"))))"
, "false", "true").c_str()) = ::testing::Message()
3427 usingDecl(hasAnyUsingShadowDecl(hasName("a")))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace f { int a; } using f::a;"
, usingDecl(hasAnyUsingShadowDecl(hasName("a")))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3427, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace f { int a; } using f::a;\", usingDecl(hasAnyUsingShadowDecl(hasName(\"a\"))))"
, "false", "true").c_str()) = ::testing::Message()
;
3428}
3429
3430TEST(UsingDeclaration, MatchesSpecificTarget)class UsingDeclaration_MatchesSpecificTarget_Test : public ::
testing::Test { public: UsingDeclaration_MatchesSpecificTarget_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); UsingDeclaration_MatchesSpecificTarget_Test
(UsingDeclaration_MatchesSpecificTarget_Test const &); void
operator=(UsingDeclaration_MatchesSpecificTarget_Test const &
);};::testing::TestInfo* const UsingDeclaration_MatchesSpecificTarget_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"UsingDeclaration", "MatchesSpecificTarget", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< UsingDeclaration_MatchesSpecificTarget_Test
>);void UsingDeclaration_MatchesSpecificTarget_Test::TestBody
()
{
3431 EXPECT_TRUE(matches("namespace f { int a; void b(); } using f::b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace f { int a; void b(); } using f::b;"
, usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3433, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace f { int a; void b(); } using f::b;\", usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl()))))"
, "false", "true").c_str()) = ::testing::Message()
3432 usingDecl(hasAnyUsingShadowDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace f { int a; void b(); } using f::b;"
, usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3433, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace f { int a; void b(); } using f::b;\", usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl()))))"
, "false", "true").c_str()) = ::testing::Message()
3433 hasTargetDecl(functionDecl())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace f { int a; void b(); } using f::b;"
, usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3433, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace f { int a; void b(); } using f::b;\", usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3434 EXPECT_TRUE(notMatches("namespace f { int a; void b(); } using f::a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace f { int a; void b(); } using f::a;"
, usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3436, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace f { int a; void b(); } using f::a;\", usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl()))))"
, "false", "true").c_str()) = ::testing::Message()
3435 usingDecl(hasAnyUsingShadowDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace f { int a; void b(); } using f::a;"
, usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3436, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace f { int a; void b(); } using f::a;\", usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl()))))"
, "false", "true").c_str()) = ::testing::Message()
3436 hasTargetDecl(functionDecl())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace f { int a; void b(); } using f::a;"
, usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3436, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace f { int a; void b(); } using f::a;\", usingDecl(hasAnyUsingShadowDecl( hasTargetDecl(functionDecl()))))"
, "false", "true").c_str()) = ::testing::Message()
;
3437}
3438
3439TEST(UsingDeclaration, ThroughUsingDeclaration)class UsingDeclaration_ThroughUsingDeclaration_Test : public ::
testing::Test { public: UsingDeclaration_ThroughUsingDeclaration_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); UsingDeclaration_ThroughUsingDeclaration_Test
(UsingDeclaration_ThroughUsingDeclaration_Test const &); void
operator=(UsingDeclaration_ThroughUsingDeclaration_Test const
&);};::testing::TestInfo* const UsingDeclaration_ThroughUsingDeclaration_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"UsingDeclaration", "ThroughUsingDeclaration", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< UsingDeclaration_ThroughUsingDeclaration_Test
>);void UsingDeclaration_ThroughUsingDeclaration_Test::TestBody
()
{
3440 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace a { void f(); } using a::f; void g() { f(); }"
, declRefExpr(throughUsingDecl(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3442, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace a { void f(); } using a::f; void g() { f(); }\", declRefExpr(throughUsingDecl(anything())))"
, "false", "true").c_str()) = ::testing::Message()
3441 "namespace a { void f(); } using a::f; void g() { f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace a { void f(); } using a::f; void g() { f(); }"
, declRefExpr(throughUsingDecl(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3442, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace a { void f(); } using a::f; void g() { f(); }\", declRefExpr(throughUsingDecl(anything())))"
, "false", "true").c_str()) = ::testing::Message()
3442 declRefExpr(throughUsingDecl(anything()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace a { void f(); } using a::f; void g() { f(); }"
, declRefExpr(throughUsingDecl(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3442, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace a { void f(); } using a::f; void g() { f(); }\", declRefExpr(throughUsingDecl(anything())))"
, "false", "true").c_str()) = ::testing::Message()
;
3443 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace a { void f(); } using a::f; void g() { a::f(); }"
, declRefExpr(throughUsingDecl(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3445, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace a { void f(); } using a::f; void g() { a::f(); }\", declRefExpr(throughUsingDecl(anything())))"
, "false", "true").c_str()) = ::testing::Message()
3444 "namespace a { void f(); } using a::f; void g() { a::f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace a { void f(); } using a::f; void g() { a::f(); }"
, declRefExpr(throughUsingDecl(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3445, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace a { void f(); } using a::f; void g() { a::f(); }\", declRefExpr(throughUsingDecl(anything())))"
, "false", "true").c_str()) = ::testing::Message()
3445 declRefExpr(throughUsingDecl(anything()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace a { void f(); } using a::f; void g() { a::f(); }"
, declRefExpr(throughUsingDecl(anything()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3445, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace a { void f(); } using a::f; void g() { a::f(); }\", declRefExpr(throughUsingDecl(anything())))"
, "false", "true").c_str()) = ::testing::Message()
;
3446}
3447
3448TEST(UsingDirectiveDeclaration, MatchesUsingNamespace)class UsingDirectiveDeclaration_MatchesUsingNamespace_Test : public
::testing::Test { public: UsingDirectiveDeclaration_MatchesUsingNamespace_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); UsingDirectiveDeclaration_MatchesUsingNamespace_Test
(UsingDirectiveDeclaration_MatchesUsingNamespace_Test const &
); void operator=(UsingDirectiveDeclaration_MatchesUsingNamespace_Test
const &);};::testing::TestInfo* const UsingDirectiveDeclaration_MatchesUsingNamespace_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"UsingDirectiveDeclaration", "MatchesUsingNamespace", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< UsingDirectiveDeclaration_MatchesUsingNamespace_Test
>);void UsingDirectiveDeclaration_MatchesUsingNamespace_Test
::TestBody()
{
3449 EXPECT_TRUE(matches("namespace X { int x; } using namespace X;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace X { int x; } using namespace X;"
, usingDirectiveDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3450, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace X { int x; } using namespace X;\", usingDirectiveDecl())"
, "false", "true").c_str()) = ::testing::Message()
3450 usingDirectiveDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace X { int x; } using namespace X;"
, usingDirectiveDecl()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3450, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace X { int x; } using namespace X;\", usingDirectiveDecl())"
, "false", "true").c_str()) = ::testing::Message()
;
3451 EXPECT_FALSE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("namespace X { int x; } using X::x;"
, usingDirectiveDecl())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3452, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace X { int x; } using X::x;\", usingDirectiveDecl())"
, "true", "false").c_str()) = ::testing::Message()
3452 matches("namespace X { int x; } using X::x;", usingDirectiveDecl()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches("namespace X { int x; } using X::x;"
, usingDirectiveDecl())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3452, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace X { int x; } using X::x;\", usingDirectiveDecl())"
, "true", "false").c_str()) = ::testing::Message()
;
3453}
3454
3455TEST(SingleDecl, IsSingleDecl)class SingleDecl_IsSingleDecl_Test : public ::testing::Test {
public: SingleDecl_IsSingleDecl_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); SingleDecl_IsSingleDecl_Test(SingleDecl_IsSingleDecl_Test
const &); void operator=(SingleDecl_IsSingleDecl_Test const
&);};::testing::TestInfo* const SingleDecl_IsSingleDecl_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"SingleDecl", "IsSingleDecl", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< SingleDecl_IsSingleDecl_Test>);void SingleDecl_IsSingleDecl_Test
::TestBody()
{
3456 StatementMatcher SingleDeclStmt =
3457 declStmt(hasSingleDecl(varDecl(hasInitializer(anything()))));
3458 EXPECT_TRUE(matches("void f() {int a = 4;}", SingleDeclStmt))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {int a = 4;}"
, SingleDeclStmt))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3458, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {int a = 4;}\", SingleDeclStmt)", "false"
, "true").c_str()) = ::testing::Message()
;
3459 EXPECT_TRUE(notMatches("void f() {int a;}", SingleDeclStmt))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int a;}"
, SingleDeclStmt))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3459, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int a;}\", SingleDeclStmt)", "false"
, "true").c_str()) = ::testing::Message()
;
3460 EXPECT_TRUE(notMatches("void f() {int a = 4, b = 3;}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int a = 4, b = 3;}"
, SingleDeclStmt))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3461, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int a = 4, b = 3;}\", SingleDeclStmt)"
, "false", "true").c_str()) = ::testing::Message()
3461 SingleDeclStmt))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int a = 4, b = 3;}"
, SingleDeclStmt))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3461, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int a = 4, b = 3;}\", SingleDeclStmt)"
, "false", "true").c_str()) = ::testing::Message()
;
3462}
3463
3464TEST(DeclStmt, ContainsDeclaration)class DeclStmt_ContainsDeclaration_Test : public ::testing::Test
{ public: DeclStmt_ContainsDeclaration_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclStmt_ContainsDeclaration_Test(
DeclStmt_ContainsDeclaration_Test const &); void operator
=(DeclStmt_ContainsDeclaration_Test const &);};::testing::
TestInfo* const DeclStmt_ContainsDeclaration_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DeclStmt", "ContainsDeclaration"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< DeclStmt_ContainsDeclaration_Test
>);void DeclStmt_ContainsDeclaration_Test::TestBody()
{
3465 DeclarationMatcher MatchesInit = varDecl(hasInitializer(anything()));
3466
3467 EXPECT_TRUE(matches("void f() {int a = 4;}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {int a = 4;}"
, declStmt(containsDeclaration(0, MatchesInit))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3468, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {int a = 4;}\", declStmt(containsDeclaration(0, MatchesInit)))"
, "false", "true").c_str()) = ::testing::Message()
3468 declStmt(containsDeclaration(0, MatchesInit))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {int a = 4;}"
, declStmt(containsDeclaration(0, MatchesInit))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3468, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {int a = 4;}\", declStmt(containsDeclaration(0, MatchesInit)))"
, "false", "true").c_str()) = ::testing::Message()
;
3469 EXPECT_TRUE(matches("void f() {int a = 4, b = 3;}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {int a = 4, b = 3;}"
, declStmt(containsDeclaration(0, MatchesInit), containsDeclaration
(1, MatchesInit))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3471, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {int a = 4, b = 3;}\", declStmt(containsDeclaration(0, MatchesInit), containsDeclaration(1, MatchesInit)))"
, "false", "true").c_str()) = ::testing::Message()
3470 declStmt(containsDeclaration(0, MatchesInit),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {int a = 4, b = 3;}"
, declStmt(containsDeclaration(0, MatchesInit), containsDeclaration
(1, MatchesInit))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3471, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {int a = 4, b = 3;}\", declStmt(containsDeclaration(0, MatchesInit), containsDeclaration(1, MatchesInit)))"
, "false", "true").c_str()) = ::testing::Message()
3471 containsDeclaration(1, MatchesInit))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {int a = 4, b = 3;}"
, declStmt(containsDeclaration(0, MatchesInit), containsDeclaration
(1, MatchesInit))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3471, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {int a = 4, b = 3;}\", declStmt(containsDeclaration(0, MatchesInit), containsDeclaration(1, MatchesInit)))"
, "false", "true").c_str()) = ::testing::Message()
;
3472 unsigned WrongIndex = 42;
3473 EXPECT_TRUE(notMatches("void f() {int a = 4, b = 3;}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int a = 4, b = 3;}"
, declStmt(containsDeclaration(WrongIndex, MatchesInit))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3475, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int a = 4, b = 3;}\", declStmt(containsDeclaration(WrongIndex, MatchesInit)))"
, "false", "true").c_str()) = ::testing::Message()
3474 declStmt(containsDeclaration(WrongIndex,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int a = 4, b = 3;}"
, declStmt(containsDeclaration(WrongIndex, MatchesInit))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3475, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int a = 4, b = 3;}\", declStmt(containsDeclaration(WrongIndex, MatchesInit)))"
, "false", "true").c_str()) = ::testing::Message()
3475 MatchesInit))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int a = 4, b = 3;}"
, declStmt(containsDeclaration(WrongIndex, MatchesInit))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3475, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int a = 4, b = 3;}\", declStmt(containsDeclaration(WrongIndex, MatchesInit)))"
, "false", "true").c_str()) = ::testing::Message()
;
3476}
3477
3478TEST(DeclCount, DeclCountIsCorrect)class DeclCount_DeclCountIsCorrect_Test : public ::testing::Test
{ public: DeclCount_DeclCountIsCorrect_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); DeclCount_DeclCountIsCorrect_Test(
DeclCount_DeclCountIsCorrect_Test const &); void operator
=(DeclCount_DeclCountIsCorrect_Test const &);};::testing::
TestInfo* const DeclCount_DeclCountIsCorrect_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "DeclCount",
"DeclCountIsCorrect", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< DeclCount_DeclCountIsCorrect_Test>);void DeclCount_DeclCountIsCorrect_Test
::TestBody()
{
3479 EXPECT_TRUE(matches("void f() {int i,j;}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {int i,j;}"
, declStmt(declCountIs(2))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3480, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {int i,j;}\", declStmt(declCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
3480 declStmt(declCountIs(2))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {int i,j;}"
, declStmt(declCountIs(2))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3480, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {int i,j;}\", declStmt(declCountIs(2)))"
, "false", "true").c_str()) = ::testing::Message()
;
3481 EXPECT_TRUE(notMatches("void f() {int i,j; int k;}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int i,j; int k;}"
, declStmt(declCountIs(3))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3482, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int i,j; int k;}\", declStmt(declCountIs(3)))"
, "false", "true").c_str()) = ::testing::Message()
3482 declStmt(declCountIs(3))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int i,j; int k;}"
, declStmt(declCountIs(3))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3482, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int i,j; int k;}\", declStmt(declCountIs(3)))"
, "false", "true").c_str()) = ::testing::Message()
;
3483 EXPECT_TRUE(notMatches("void f() {int i,j, k, l;}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int i,j, k, l;}"
, declStmt(declCountIs(3))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3484, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int i,j, k, l;}\", declStmt(declCountIs(3)))"
, "false", "true").c_str()) = ::testing::Message()
3484 declStmt(declCountIs(3))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int i,j, k, l;}"
, declStmt(declCountIs(3))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3484, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int i,j, k, l;}\", declStmt(declCountIs(3)))"
, "false", "true").c_str()) = ::testing::Message()
;
3485}
3486
3487TEST(While, MatchesWhileLoops)class While_MatchesWhileLoops_Test : public ::testing::Test {
public: While_MatchesWhileLoops_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); While_MatchesWhileLoops_Test(While_MatchesWhileLoops_Test
const &); void operator=(While_MatchesWhileLoops_Test const
&);};::testing::TestInfo* const While_MatchesWhileLoops_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"While", "MatchesWhileLoops", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< While_MatchesWhileLoops_Test>);void While_MatchesWhileLoops_Test
::TestBody()
{
3488 EXPECT_TRUE(notMatches("void x() {}", whileStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() {}"
, whileStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3488, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() {}\", whileStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
3489 EXPECT_TRUE(matches("void x() { while(true); }", whileStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { while(true); }"
, whileStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3489, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { while(true); }\", whileStmt())", "false"
, "true").c_str()) = ::testing::Message()
;
3490 EXPECT_TRUE(notMatches("void x() { do {} while(true); }", whileStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { do {} while(true); }"
, whileStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3490, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { do {} while(true); }\", whileStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
3491}
3492
3493TEST(Do, MatchesDoLoops)class Do_MatchesDoLoops_Test : public ::testing::Test { public
: Do_MatchesDoLoops_Test() {} private: virtual void TestBody(
); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); Do_MatchesDoLoops_Test(Do_MatchesDoLoops_Test const
&); void operator=(Do_MatchesDoLoops_Test const &);}
;::testing::TestInfo* const Do_MatchesDoLoops_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Do", "MatchesDoLoops"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Do_MatchesDoLoops_Test
>);void Do_MatchesDoLoops_Test::TestBody()
{
3494 EXPECT_TRUE(matches("void x() { do {} while(true); }", doStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { do {} while(true); }"
, doStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3494, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { do {} while(true); }\", doStmt())", "false"
, "true").c_str()) = ::testing::Message()
;
3495 EXPECT_TRUE(matches("void x() { do ; while(false); }", doStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { do ; while(false); }"
, doStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3495, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { do ; while(false); }\", doStmt())", "false"
, "true").c_str()) = ::testing::Message()
;
3496}
3497
3498TEST(Do, DoesNotMatchWhileLoops)class Do_DoesNotMatchWhileLoops_Test : public ::testing::Test
{ public: Do_DoesNotMatchWhileLoops_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Do_DoesNotMatchWhileLoops_Test(Do_DoesNotMatchWhileLoops_Test
const &); void operator=(Do_DoesNotMatchWhileLoops_Test const
&);};::testing::TestInfo* const Do_DoesNotMatchWhileLoops_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Do", "DoesNotMatchWhileLoops", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Do_DoesNotMatchWhileLoops_Test>);void Do_DoesNotMatchWhileLoops_Test
::TestBody()
{
3499 EXPECT_TRUE(notMatches("void x() { while(true) {} }", doStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { while(true) {} }"
, doStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3499, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { while(true) {} }\", doStmt())", "false"
, "true").c_str()) = ::testing::Message()
;
3500}
3501
3502TEST(SwitchCase, MatchesCase)class SwitchCase_MatchesCase_Test : public ::testing::Test { public
: SwitchCase_MatchesCase_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); SwitchCase_MatchesCase_Test(SwitchCase_MatchesCase_Test
const &); void operator=(SwitchCase_MatchesCase_Test const
&);};::testing::TestInfo* const SwitchCase_MatchesCase_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"SwitchCase", "MatchesCase", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< SwitchCase_MatchesCase_Test>);void SwitchCase_MatchesCase_Test
::TestBody()
{
3503 EXPECT_TRUE(matches("void x() { switch(42) { case 42:; } }", switchCase()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) { case 42:; } }"
, switchCase()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3503, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) { case 42:; } }\", switchCase())"
, "false", "true").c_str()) = ::testing::Message()
;
3504 EXPECT_TRUE(matches("void x() { switch(42) { default:; } }", switchCase()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) { default:; } }"
, switchCase()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3504, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) { default:; } }\", switchCase())"
, "false", "true").c_str()) = ::testing::Message()
;
3505 EXPECT_TRUE(matches("void x() { switch(42) default:; }", switchCase()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) default:; }"
, switchCase()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3505, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) default:; }\", switchCase())"
, "false", "true").c_str()) = ::testing::Message()
;
3506 EXPECT_TRUE(notMatches("void x() { switch(42) {} }", switchCase()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { switch(42) {} }"
, switchCase()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3506, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { switch(42) {} }\", switchCase())",
"false", "true").c_str()) = ::testing::Message()
;
3507}
3508
3509TEST(SwitchCase, MatchesSwitch)class SwitchCase_MatchesSwitch_Test : public ::testing::Test {
public: SwitchCase_MatchesSwitch_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); SwitchCase_MatchesSwitch_Test(SwitchCase_MatchesSwitch_Test
const &); void operator=(SwitchCase_MatchesSwitch_Test const
&);};::testing::TestInfo* const SwitchCase_MatchesSwitch_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"SwitchCase", "MatchesSwitch", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< SwitchCase_MatchesSwitch_Test>);void SwitchCase_MatchesSwitch_Test
::TestBody()
{
3510 EXPECT_TRUE(matches("void x() { switch(42) { case 42:; } }", switchStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) { case 42:; } }"
, switchStmt()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3510, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) { case 42:; } }\", switchStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
3511 EXPECT_TRUE(matches("void x() { switch(42) { default:; } }", switchStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) { default:; } }"
, switchStmt()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3511, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) { default:; } }\", switchStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
3512 EXPECT_TRUE(matches("void x() { switch(42) default:; }", switchStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) default:; }"
, switchStmt()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3512, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) default:; }\", switchStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
3513 EXPECT_TRUE(notMatches("void x() {}", switchStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() {}"
, switchStmt()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3513, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() {}\", switchStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
3514}
3515
3516TEST(SwitchCase, MatchesEachCase)class SwitchCase_MatchesEachCase_Test : public ::testing::Test
{ public: SwitchCase_MatchesEachCase_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); SwitchCase_MatchesEachCase_Test(SwitchCase_MatchesEachCase_Test
const &); void operator=(SwitchCase_MatchesEachCase_Test
const &);};::testing::TestInfo* const SwitchCase_MatchesEachCase_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"SwitchCase", "MatchesEachCase", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< SwitchCase_MatchesEachCase_Test>);void SwitchCase_MatchesEachCase_Test
::TestBody()
{
3517 EXPECT_TRUE(notMatches("void x() { switch(42); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { switch(42); }"
, switchStmt(forEachSwitchCase(caseStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3518, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { switch(42); }\", switchStmt(forEachSwitchCase(caseStmt())))"
, "false", "true").c_str()) = ::testing::Message()
3518 switchStmt(forEachSwitchCase(caseStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { switch(42); }"
, switchStmt(forEachSwitchCase(caseStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3518, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { switch(42); }\", switchStmt(forEachSwitchCase(caseStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
3519 EXPECT_TRUE(matches("void x() { switch(42) case 42:; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) case 42:; }"
, switchStmt(forEachSwitchCase(caseStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3520, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) case 42:; }\", switchStmt(forEachSwitchCase(caseStmt())))"
, "false", "true").c_str()) = ::testing::Message()
3520 switchStmt(forEachSwitchCase(caseStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) case 42:; }"
, switchStmt(forEachSwitchCase(caseStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3520, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) case 42:; }\", switchStmt(forEachSwitchCase(caseStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
3521 EXPECT_TRUE(matches("void x() { switch(42) { case 42:; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) { case 42:; } }"
, switchStmt(forEachSwitchCase(caseStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3522, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) { case 42:; } }\", switchStmt(forEachSwitchCase(caseStmt())))"
, "false", "true").c_str()) = ::testing::Message()
3522 switchStmt(forEachSwitchCase(caseStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) { case 42:; } }"
, switchStmt(forEachSwitchCase(caseStmt()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3522, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) { case 42:; } }\", switchStmt(forEachSwitchCase(caseStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
3523 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void x() { if (1) switch(42) { case 42: switch (42) { default:; } } }"
, ifStmt(has(switchStmt(forEachSwitchCase(defaultStmt()))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3525, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void x() { if (1) switch(42) { case 42: switch (42) { default:; } } }\", ifStmt(has(switchStmt(forEachSwitchCase(defaultStmt())))))"
, "false", "true").c_str()) = ::testing::Message()
3524 "void x() { if (1) switch(42) { case 42: switch (42) { default:; } } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void x() { if (1) switch(42) { case 42: switch (42) { default:; } } }"
, ifStmt(has(switchStmt(forEachSwitchCase(defaultStmt()))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3525, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void x() { if (1) switch(42) { case 42: switch (42) { default:; } } }\", ifStmt(has(switchStmt(forEachSwitchCase(defaultStmt())))))"
, "false", "true").c_str()) = ::testing::Message()
3525 ifStmt(has(switchStmt(forEachSwitchCase(defaultStmt()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void x() { if (1) switch(42) { case 42: switch (42) { default:; } } }"
, ifStmt(has(switchStmt(forEachSwitchCase(defaultStmt()))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3525, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void x() { if (1) switch(42) { case 42: switch (42) { default:; } } }\", ifStmt(has(switchStmt(forEachSwitchCase(defaultStmt())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3526 EXPECT_TRUE(matches("void x() { switch(42) { case 1+1: case 4:; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) { case 1+1: case 4:; } }"
, switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3528, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) { case 1+1: case 4:; } }\", switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
3527 switchStmt(forEachSwitchCase(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) { case 1+1: case 4:; } }"
, switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3528, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) { case 1+1: case 4:; } }\", switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
3528 caseStmt(hasCaseConstant(integerLiteral()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void x() { switch(42) { case 1+1: case 4:; } }"
, switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3528, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void x() { switch(42) { case 1+1: case 4:; } }\", switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3529 EXPECT_TRUE(notMatches("void x() { switch(42) { case 1+1: case 2+2:; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { switch(42) { case 1+1: case 2+2:; } }"
, switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3531, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { switch(42) { case 1+1: case 2+2:; } }\", switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
3530 switchStmt(forEachSwitchCase(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { switch(42) { case 1+1: case 2+2:; } }"
, switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3531, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { switch(42) { case 1+1: case 2+2:; } }\", switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
3531 caseStmt(hasCaseConstant(integerLiteral()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { switch(42) { case 1+1: case 2+2:; } }"
, switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3531, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { switch(42) { case 1+1: case 2+2:; } }\", switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3532 EXPECT_TRUE(notMatches("void x() { switch(42) { case 1 ... 2:; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { switch(42) { case 1 ... 2:; } }"
, switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3534, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { switch(42) { case 1 ... 2:; } }\", switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
3533 switchStmt(forEachSwitchCase(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { switch(42) { case 1 ... 2:; } }"
, switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3534, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { switch(42) { case 1 ... 2:; } }\", switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
3534 caseStmt(hasCaseConstant(integerLiteral()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void x() { switch(42) { case 1 ... 2:; } }"
, switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral
()))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3534, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void x() { switch(42) { case 1 ... 2:; } }\", switchStmt(forEachSwitchCase( caseStmt(hasCaseConstant(integerLiteral())))))"
, "false", "true").c_str()) = ::testing::Message()
;
3535 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x() { switch (42) { case 1: case 2: case 3: default:; } }"
, switchStmt(forEachSwitchCase(caseStmt().bind("x"))), new VerifyIdIsBoundTo
<CaseStmt>("x", 3)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3538, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x() { switch (42) { case 1: case 2: case 3: default:; } }\", switchStmt(forEachSwitchCase(caseStmt().bind(\"x\"))), new VerifyIdIsBoundTo<CaseStmt>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3536 "void x() { switch (42) { case 1: case 2: case 3: default:; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x() { switch (42) { case 1: case 2: case 3: default:; } }"
, switchStmt(forEachSwitchCase(caseStmt().bind("x"))), new VerifyIdIsBoundTo
<CaseStmt>("x", 3)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3538, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x() { switch (42) { case 1: case 2: case 3: default:; } }\", switchStmt(forEachSwitchCase(caseStmt().bind(\"x\"))), new VerifyIdIsBoundTo<CaseStmt>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3537 switchStmt(forEachSwitchCase(caseStmt().bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x() { switch (42) { case 1: case 2: case 3: default:; } }"
, switchStmt(forEachSwitchCase(caseStmt().bind("x"))), new VerifyIdIsBoundTo
<CaseStmt>("x", 3)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3538, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x() { switch (42) { case 1: case 2: case 3: default:; } }\", switchStmt(forEachSwitchCase(caseStmt().bind(\"x\"))), new VerifyIdIsBoundTo<CaseStmt>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3538 new VerifyIdIsBoundTo<CaseStmt>("x", 3)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x() { switch (42) { case 1: case 2: case 3: default:; } }"
, switchStmt(forEachSwitchCase(caseStmt().bind("x"))), new VerifyIdIsBoundTo
<CaseStmt>("x", 3)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3538, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x() { switch (42) { case 1: case 2: case 3: default:; } }\", switchStmt(forEachSwitchCase(caseStmt().bind(\"x\"))), new VerifyIdIsBoundTo<CaseStmt>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
;
3539}
3540
3541TEST(ForEachConstructorInitializer, MatchesInitializers)class ForEachConstructorInitializer_MatchesInitializers_Test :
public ::testing::Test { public: ForEachConstructorInitializer_MatchesInitializers_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ForEachConstructorInitializer_MatchesInitializers_Test
(ForEachConstructorInitializer_MatchesInitializers_Test const
&); void operator=(ForEachConstructorInitializer_MatchesInitializers_Test
const &);};::testing::TestInfo* const ForEachConstructorInitializer_MatchesInitializers_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ForEachConstructorInitializer", "MatchesInitializers", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< ForEachConstructorInitializer_MatchesInitializers_Test
>);void ForEachConstructorInitializer_MatchesInitializers_Test
::TestBody()
{
3542 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { X() : i(42), j(42) {} int i, j; };"
, cxxConstructorDecl(forEachConstructorInitializer(cxxCtorInitializer
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3544, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { X() : i(42), j(42) {} int i, j; };\", cxxConstructorDecl(forEachConstructorInitializer(cxxCtorInitializer())))"
, "false", "true").c_str()) = ::testing::Message()
3543 "struct X { X() : i(42), j(42) {} int i, j; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { X() : i(42), j(42) {} int i, j; };"
, cxxConstructorDecl(forEachConstructorInitializer(cxxCtorInitializer
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3544, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { X() : i(42), j(42) {} int i, j; };\", cxxConstructorDecl(forEachConstructorInitializer(cxxCtorInitializer())))"
, "false", "true").c_str()) = ::testing::Message()
3544 cxxConstructorDecl(forEachConstructorInitializer(cxxCtorInitializer()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X { X() : i(42), j(42) {} int i, j; };"
, cxxConstructorDecl(forEachConstructorInitializer(cxxCtorInitializer
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3544, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X { X() : i(42), j(42) {} int i, j; };\", cxxConstructorDecl(forEachConstructorInitializer(cxxCtorInitializer())))"
, "false", "true").c_str()) = ::testing::Message()
;
3545}
3546
3547TEST(ExceptionHandling, SimpleCases)class ExceptionHandling_SimpleCases_Test : public ::testing::
Test { public: ExceptionHandling_SimpleCases_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ExceptionHandling_SimpleCases_Test
(ExceptionHandling_SimpleCases_Test const &); void operator
=(ExceptionHandling_SimpleCases_Test const &);};::testing
::TestInfo* const ExceptionHandling_SimpleCases_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ExceptionHandling"
, "SimpleCases", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ExceptionHandling_SimpleCases_Test
>);void ExceptionHandling_SimpleCases_Test::TestBody()
{
3548 EXPECT_TRUE(matches("void foo() try { } catch(int X) { }", cxxCatchStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { } catch(int X) { }"
, cxxCatchStmt()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3548, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { } catch(int X) { }\", cxxCatchStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
3549 EXPECT_TRUE(matches("void foo() try { } catch(int X) { }", cxxTryStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { } catch(int X) { }"
, cxxTryStmt()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3549, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { } catch(int X) { }\", cxxTryStmt())"
, "false", "true").c_str()) = ::testing::Message()
;
3550 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void foo() try { } catch(int X) { }"
, cxxThrowExpr()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3551, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void foo() try { } catch(int X) { }\", cxxThrowExpr())"
, "false", "true").c_str()) = ::testing::Message()
3551 notMatches("void foo() try { } catch(int X) { }", cxxThrowExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void foo() try { } catch(int X) { }"
, cxxThrowExpr()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3551, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void foo() try { } catch(int X) { }\", cxxThrowExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3552 EXPECT_TRUE(matches("void foo() try { throw; } catch(int X) { }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { throw; } catch(int X) { }"
, cxxThrowExpr()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3553, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { throw; } catch(int X) { }\", cxxThrowExpr())"
, "false", "true").c_str()) = ::testing::Message()
3553 cxxThrowExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { throw; } catch(int X) { }"
, cxxThrowExpr()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3553, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { throw; } catch(int X) { }\", cxxThrowExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3554 EXPECT_TRUE(matches("void foo() try { throw 5;} catch(int X) { }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { throw 5;} catch(int X) { }"
, cxxThrowExpr()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3555, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { throw 5;} catch(int X) { }\", cxxThrowExpr())"
, "false", "true").c_str()) = ::testing::Message()
3555 cxxThrowExpr()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { throw 5;} catch(int X) { }"
, cxxThrowExpr()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3555, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { throw 5;} catch(int X) { }\", cxxThrowExpr())"
, "false", "true").c_str()) = ::testing::Message()
;
3556 EXPECT_TRUE(matches("void foo() try { throw; } catch(...) { }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { throw; } catch(...) { }"
, cxxCatchStmt(isCatchAll())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3557, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { throw; } catch(...) { }\", cxxCatchStmt(isCatchAll()))"
, "false", "true").c_str()) = ::testing::Message()
3557 cxxCatchStmt(isCatchAll())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try { throw; } catch(...) { }"
, cxxCatchStmt(isCatchAll())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3557, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try { throw; } catch(...) { }\", cxxCatchStmt(isCatchAll()))"
, "false", "true").c_str()) = ::testing::Message()
;
3558 EXPECT_TRUE(notMatches("void foo() try { throw; } catch(int) { }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void foo() try { throw; } catch(int) { }"
, cxxCatchStmt(isCatchAll())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3559, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void foo() try { throw; } catch(int) { }\", cxxCatchStmt(isCatchAll()))"
, "false", "true").c_str()) = ::testing::Message()
3559 cxxCatchStmt(isCatchAll())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void foo() try { throw; } catch(int) { }"
, cxxCatchStmt(isCatchAll())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3559, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void foo() try { throw; } catch(int) { }\", cxxCatchStmt(isCatchAll()))"
, "false", "true").c_str()) = ::testing::Message()
;
3560 EXPECT_TRUE(matches("void foo() try {} catch(int X) { }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try {} catch(int X) { }"
, varDecl(isExceptionVariable())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3561, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try {} catch(int X) { }\", varDecl(isExceptionVariable()))"
, "false", "true").c_str()) = ::testing::Message()
3561 varDecl(isExceptionVariable())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void foo() try {} catch(int X) { }"
, varDecl(isExceptionVariable())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3561, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void foo() try {} catch(int X) { }\", varDecl(isExceptionVariable()))"
, "false", "true").c_str()) = ::testing::Message()
;
3562 EXPECT_TRUE(notMatches("void foo() try { int X; } catch (...) { }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void foo() try { int X; } catch (...) { }"
, varDecl(isExceptionVariable())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3563, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void foo() try { int X; } catch (...) { }\", varDecl(isExceptionVariable()))"
, "false", "true").c_str()) = ::testing::Message()
3563 varDecl(isExceptionVariable())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void foo() try { int X; } catch (...) { }"
, varDecl(isExceptionVariable())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3563, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void foo() try { int X; } catch (...) { }\", varDecl(isExceptionVariable()))"
, "false", "true").c_str()) = ::testing::Message()
;
3564}
3565
3566TEST(HasConditionVariableStatement, DoesNotMatchCondition)class HasConditionVariableStatement_DoesNotMatchCondition_Test
: public ::testing::Test { public: HasConditionVariableStatement_DoesNotMatchCondition_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasConditionVariableStatement_DoesNotMatchCondition_Test
(HasConditionVariableStatement_DoesNotMatchCondition_Test const
&); void operator=(HasConditionVariableStatement_DoesNotMatchCondition_Test
const &);};::testing::TestInfo* const HasConditionVariableStatement_DoesNotMatchCondition_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasConditionVariableStatement", "DoesNotMatchCondition", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< HasConditionVariableStatement_DoesNotMatchCondition_Test
>);void HasConditionVariableStatement_DoesNotMatchCondition_Test
::TestBody()
{
3567 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void x() { if(true) {} }"
, ifStmt(hasConditionVariableStatement(declStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3569, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void x() { if(true) {} }\", ifStmt(hasConditionVariableStatement(declStmt())))"
, "false", "true").c_str()) = ::testing::Message()
3568 "void x() { if(true) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void x() { if(true) {} }"
, ifStmt(hasConditionVariableStatement(declStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3569, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void x() { if(true) {} }\", ifStmt(hasConditionVariableStatement(declStmt())))"
, "false", "true").c_str()) = ::testing::Message()
3569 ifStmt(hasConditionVariableStatement(declStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void x() { if(true) {} }"
, ifStmt(hasConditionVariableStatement(declStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3569, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void x() { if(true) {} }\", ifStmt(hasConditionVariableStatement(declStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
3570 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void x() { int x; if((x = 42)) {} }"
, ifStmt(hasConditionVariableStatement(declStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3572, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void x() { int x; if((x = 42)) {} }\", ifStmt(hasConditionVariableStatement(declStmt())))"
, "false", "true").c_str()) = ::testing::Message()
3571 "void x() { int x; if((x = 42)) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void x() { int x; if((x = 42)) {} }"
, ifStmt(hasConditionVariableStatement(declStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3572, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void x() { int x; if((x = 42)) {} }\", ifStmt(hasConditionVariableStatement(declStmt())))"
, "false", "true").c_str()) = ::testing::Message()
3572 ifStmt(hasConditionVariableStatement(declStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void x() { int x; if((x = 42)) {} }"
, ifStmt(hasConditionVariableStatement(declStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3572, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void x() { int x; if((x = 42)) {} }\", ifStmt(hasConditionVariableStatement(declStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
3573}
3574
3575TEST(HasConditionVariableStatement, MatchesConditionVariables)class HasConditionVariableStatement_MatchesConditionVariables_Test
: public ::testing::Test { public: HasConditionVariableStatement_MatchesConditionVariables_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasConditionVariableStatement_MatchesConditionVariables_Test
(HasConditionVariableStatement_MatchesConditionVariables_Test
const &); void operator=(HasConditionVariableStatement_MatchesConditionVariables_Test
const &);};::testing::TestInfo* const HasConditionVariableStatement_MatchesConditionVariables_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasConditionVariableStatement", "MatchesConditionVariables"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< HasConditionVariableStatement_MatchesConditionVariables_Test
>);void HasConditionVariableStatement_MatchesConditionVariables_Test
::TestBody()
{
3576 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void x() { if(int* a = 0) {} }"
, ifStmt(hasConditionVariableStatement(declStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3578, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void x() { if(int* a = 0) {} }\", ifStmt(hasConditionVariableStatement(declStmt())))"
, "false", "true").c_str()) = ::testing::Message()
3577 "void x() { if(int* a = 0) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void x() { if(int* a = 0) {} }"
, ifStmt(hasConditionVariableStatement(declStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3578, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void x() { if(int* a = 0) {} }\", ifStmt(hasConditionVariableStatement(declStmt())))"
, "false", "true").c_str()) = ::testing::Message()
3578 ifStmt(hasConditionVariableStatement(declStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void x() { if(int* a = 0) {} }"
, ifStmt(hasConditionVariableStatement(declStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3578, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void x() { if(int* a = 0) {} }\", ifStmt(hasConditionVariableStatement(declStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
3579}
3580
3581TEST(ForEach, BindsOneNode)class ForEach_BindsOneNode_Test : public ::testing::Test { public
: ForEach_BindsOneNode_Test() {} private: virtual void TestBody
(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); ForEach_BindsOneNode_Test(ForEach_BindsOneNode_Test
const &); void operator=(ForEach_BindsOneNode_Test const
&);};::testing::TestInfo* const ForEach_BindsOneNode_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ForEach", "BindsOneNode", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< ForEach_BindsOneNode_Test>);void ForEach_BindsOneNode_Test
::TestBody()
{
3582 EXPECT_TRUE(matchAndVerifyResultTrue("class C { int x; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { int x; };", recordDecl(hasName("C"), forEach(fieldDecl
(hasName("x")).bind("x"))), new VerifyIdIsBoundTo<FieldDecl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3584, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { int x; };\", recordDecl(hasName(\"C\"), forEach(fieldDecl(hasName(\"x\")).bind(\"x\"))), new VerifyIdIsBoundTo<FieldDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3583 recordDecl(hasName("C"), forEach(fieldDecl(hasName("x")).bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { int x; };", recordDecl(hasName("C"), forEach(fieldDecl
(hasName("x")).bind("x"))), new VerifyIdIsBoundTo<FieldDecl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3584, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { int x; };\", recordDecl(hasName(\"C\"), forEach(fieldDecl(hasName(\"x\")).bind(\"x\"))), new VerifyIdIsBoundTo<FieldDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3584 new VerifyIdIsBoundTo<FieldDecl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { int x; };", recordDecl(hasName("C"), forEach(fieldDecl
(hasName("x")).bind("x"))), new VerifyIdIsBoundTo<FieldDecl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3584, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { int x; };\", recordDecl(hasName(\"C\"), forEach(fieldDecl(hasName(\"x\")).bind(\"x\"))), new VerifyIdIsBoundTo<FieldDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3585}
3586
3587TEST(ForEach, BindsMultipleNodes)class ForEach_BindsMultipleNodes_Test : public ::testing::Test
{ public: ForEach_BindsMultipleNodes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ForEach_BindsMultipleNodes_Test(ForEach_BindsMultipleNodes_Test
const &); void operator=(ForEach_BindsMultipleNodes_Test
const &);};::testing::TestInfo* const ForEach_BindsMultipleNodes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ForEach", "BindsMultipleNodes", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< ForEach_BindsMultipleNodes_Test>);void ForEach_BindsMultipleNodes_Test
::TestBody()
{
3588 EXPECT_TRUE(matchAndVerifyResultTrue("class C { int x; int y; int z; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { int x; int y; int z; };", recordDecl(hasName("C")
, forEach(fieldDecl().bind("f"))), new VerifyIdIsBoundTo<FieldDecl
>("f", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3590, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { int x; int y; int z; };\", recordDecl(hasName(\"C\"), forEach(fieldDecl().bind(\"f\"))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3589 recordDecl(hasName("C"), forEach(fieldDecl().bind("f"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { int x; int y; int z; };", recordDecl(hasName("C")
, forEach(fieldDecl().bind("f"))), new VerifyIdIsBoundTo<FieldDecl
>("f", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3590, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { int x; int y; int z; };\", recordDecl(hasName(\"C\"), forEach(fieldDecl().bind(\"f\"))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3590 new VerifyIdIsBoundTo<FieldDecl>("f", 3)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { int x; int y; int z; };", recordDecl(hasName("C")
, forEach(fieldDecl().bind("f"))), new VerifyIdIsBoundTo<FieldDecl
>("f", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3590, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { int x; int y; int z; };\", recordDecl(hasName(\"C\"), forEach(fieldDecl().bind(\"f\"))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 3))"
, "false", "true").c_str()) = ::testing::Message()
;
3591}
3592
3593TEST(ForEach, BindsRecursiveCombinations)class ForEach_BindsRecursiveCombinations_Test : public ::testing
::Test { public: ForEach_BindsRecursiveCombinations_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ForEach_BindsRecursiveCombinations_Test
(ForEach_BindsRecursiveCombinations_Test const &); void operator
=(ForEach_BindsRecursiveCombinations_Test const &);};::testing
::TestInfo* const ForEach_BindsRecursiveCombinations_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ForEach", "BindsRecursiveCombinations"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< ForEach_BindsRecursiveCombinations_Test
>);void ForEach_BindsRecursiveCombinations_Test::TestBody(
)
{
3594 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; class E { int y; int z; }; };"
, recordDecl(hasName("C"), forEach(recordDecl(forEach(fieldDecl
().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl>("f",
4)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3598, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; class E { int y; int z; }; };\", recordDecl(hasName(\"C\"), forEach(recordDecl(forEach(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
3595 "class C { class D { int x; int y; }; class E { int y; int z; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; class E { int y; int z; }; };"
, recordDecl(hasName("C"), forEach(recordDecl(forEach(fieldDecl
().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl>("f",
4)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3598, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; class E { int y; int z; }; };\", recordDecl(hasName(\"C\"), forEach(recordDecl(forEach(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
3596 recordDecl(hasName("C"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; class E { int y; int z; }; };"
, recordDecl(hasName("C"), forEach(recordDecl(forEach(fieldDecl
().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl>("f",
4)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3598, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; class E { int y; int z; }; };\", recordDecl(hasName(\"C\"), forEach(recordDecl(forEach(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
3597 forEach(recordDecl(forEach(fieldDecl().bind("f"))))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; class E { int y; int z; }; };"
, recordDecl(hasName("C"), forEach(recordDecl(forEach(fieldDecl
().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl>("f",
4)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3598, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; class E { int y; int z; }; };\", recordDecl(hasName(\"C\"), forEach(recordDecl(forEach(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
3598 new VerifyIdIsBoundTo<FieldDecl>("f", 4)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; class E { int y; int z; }; };"
, recordDecl(hasName("C"), forEach(recordDecl(forEach(fieldDecl
().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl>("f",
4)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3598, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; class E { int y; int z; }; };\", recordDecl(hasName(\"C\"), forEach(recordDecl(forEach(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
;
3599}
3600
3601TEST(ForEachDescendant, BindsOneNode)class ForEachDescendant_BindsOneNode_Test : public ::testing::
Test { public: ForEachDescendant_BindsOneNode_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ForEachDescendant_BindsOneNode_Test
(ForEachDescendant_BindsOneNode_Test const &); void operator
=(ForEachDescendant_BindsOneNode_Test const &);};::testing
::TestInfo* const ForEachDescendant_BindsOneNode_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ForEachDescendant"
, "BindsOneNode", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ForEachDescendant_BindsOneNode_Test
>);void ForEachDescendant_BindsOneNode_Test::TestBody()
{
3602 EXPECT_TRUE(matchAndVerifyResultTrue("class C { class D { int x; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { class D { int x; }; };", recordDecl(hasName("C"),
forEachDescendant(fieldDecl(hasName("x")).bind("x"))), new VerifyIdIsBoundTo
<FieldDecl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3605, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { class D { int x; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(fieldDecl(hasName(\"x\")).bind(\"x\"))), new VerifyIdIsBoundTo<FieldDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3603 recordDecl(hasName("C"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { class D { int x; }; };", recordDecl(hasName("C"),
forEachDescendant(fieldDecl(hasName("x")).bind("x"))), new VerifyIdIsBoundTo
<FieldDecl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3605, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { class D { int x; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(fieldDecl(hasName(\"x\")).bind(\"x\"))), new VerifyIdIsBoundTo<FieldDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3604 forEachDescendant(fieldDecl(hasName("x")).bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { class D { int x; }; };", recordDecl(hasName("C"),
forEachDescendant(fieldDecl(hasName("x")).bind("x"))), new VerifyIdIsBoundTo
<FieldDecl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3605, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { class D { int x; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(fieldDecl(hasName(\"x\")).bind(\"x\"))), new VerifyIdIsBoundTo<FieldDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3605 new VerifyIdIsBoundTo<FieldDecl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
("class C { class D { int x; }; };", recordDecl(hasName("C"),
forEachDescendant(fieldDecl(hasName("x")).bind("x"))), new VerifyIdIsBoundTo
<FieldDecl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3605, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue(\"class C { class D { int x; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(fieldDecl(hasName(\"x\")).bind(\"x\"))), new VerifyIdIsBoundTo<FieldDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3606}
3607
3608TEST(ForEachDescendant, NestedForEachDescendant)class ForEachDescendant_NestedForEachDescendant_Test : public
::testing::Test { public: ForEachDescendant_NestedForEachDescendant_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ForEachDescendant_NestedForEachDescendant_Test
(ForEachDescendant_NestedForEachDescendant_Test const &);
void operator=(ForEachDescendant_NestedForEachDescendant_Test
const &);};::testing::TestInfo* const ForEachDescendant_NestedForEachDescendant_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ForEachDescendant", "NestedForEachDescendant", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ForEachDescendant_NestedForEachDescendant_Test
>);void ForEachDescendant_NestedForEachDescendant_Test::TestBody
()
{
3609 DeclarationMatcher m = recordDecl(
3610 isDefinition(), decl().bind("x"), hasName("C"));
3611 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class C {}; }; };", recordDecl(hasName
("A"), anyOf(m, forEachDescendant(m))), new VerifyIdIsBoundTo
<Decl>("x", "C")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3614, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"A\"), anyOf(m, forEachDescendant(m))), new VerifyIdIsBoundTo<Decl>(\"x\", \"C\"))"
, "false", "true").c_str()) = ::testing::Message()
3612 "class A { class B { class C {}; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class C {}; }; };", recordDecl(hasName
("A"), anyOf(m, forEachDescendant(m))), new VerifyIdIsBoundTo
<Decl>("x", "C")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3614, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"A\"), anyOf(m, forEachDescendant(m))), new VerifyIdIsBoundTo<Decl>(\"x\", \"C\"))"
, "false", "true").c_str()) = ::testing::Message()
3613 recordDecl(hasName("A"), anyOf(m, forEachDescendant(m))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class C {}; }; };", recordDecl(hasName
("A"), anyOf(m, forEachDescendant(m))), new VerifyIdIsBoundTo
<Decl>("x", "C")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3614, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"A\"), anyOf(m, forEachDescendant(m))), new VerifyIdIsBoundTo<Decl>(\"x\", \"C\"))"
, "false", "true").c_str()) = ::testing::Message()
3614 new VerifyIdIsBoundTo<Decl>("x", "C")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class C {}; }; };", recordDecl(hasName
("A"), anyOf(m, forEachDescendant(m))), new VerifyIdIsBoundTo
<Decl>("x", "C")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3614, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"A\"), anyOf(m, forEachDescendant(m))), new VerifyIdIsBoundTo<Decl>(\"x\", \"C\"))"
, "false", "true").c_str()) = ::testing::Message()
;
3615
3616 // Check that a partial match of 'm' that binds 'x' in the
3617 // first part of anyOf(m, anything()) will not overwrite the
3618 // binding created by the earlier binding in the hasDescendant.
3619 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class C {}; }; };", recordDecl(hasName
("A"), allOf(hasDescendant(m), anyOf(m, anything()))), new VerifyIdIsBoundTo
<Decl>("x", "C")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3622, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"A\"), allOf(hasDescendant(m), anyOf(m, anything()))), new VerifyIdIsBoundTo<Decl>(\"x\", \"C\"))"
, "false", "true").c_str()) = ::testing::Message()
3620 "class A { class B { class C {}; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class C {}; }; };", recordDecl(hasName
("A"), allOf(hasDescendant(m), anyOf(m, anything()))), new VerifyIdIsBoundTo
<Decl>("x", "C")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3622, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"A\"), allOf(hasDescendant(m), anyOf(m, anything()))), new VerifyIdIsBoundTo<Decl>(\"x\", \"C\"))"
, "false", "true").c_str()) = ::testing::Message()
3621 recordDecl(hasName("A"), allOf(hasDescendant(m), anyOf(m, anything()))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class C {}; }; };", recordDecl(hasName
("A"), allOf(hasDescendant(m), anyOf(m, anything()))), new VerifyIdIsBoundTo
<Decl>("x", "C")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3622, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"A\"), allOf(hasDescendant(m), anyOf(m, anything()))), new VerifyIdIsBoundTo<Decl>(\"x\", \"C\"))"
, "false", "true").c_str()) = ::testing::Message()
3622 new VerifyIdIsBoundTo<Decl>("x", "C")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { class C {}; }; };", recordDecl(hasName
("A"), allOf(hasDescendant(m), anyOf(m, anything()))), new VerifyIdIsBoundTo
<Decl>("x", "C")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3622, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"A\"), allOf(hasDescendant(m), anyOf(m, anything()))), new VerifyIdIsBoundTo<Decl>(\"x\", \"C\"))"
, "false", "true").c_str()) = ::testing::Message()
;
3623}
3624
3625TEST(ForEachDescendant, BindsMultipleNodes)class ForEachDescendant_BindsMultipleNodes_Test : public ::testing
::Test { public: ForEachDescendant_BindsMultipleNodes_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ForEachDescendant_BindsMultipleNodes_Test
(ForEachDescendant_BindsMultipleNodes_Test const &); void
operator=(ForEachDescendant_BindsMultipleNodes_Test const &
);};::testing::TestInfo* const ForEachDescendant_BindsMultipleNodes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ForEachDescendant", "BindsMultipleNodes", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ForEachDescendant_BindsMultipleNodes_Test
>);void ForEachDescendant_BindsMultipleNodes_Test::TestBody
()
{
3626 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; " " class E { class F { int y; int z; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(fieldDecl().bind
("f"))), new VerifyIdIsBoundTo<FieldDecl>("f", 4)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3630, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; \" \" class E { class F { int y; int z; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(fieldDecl().bind(\"f\"))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
3627 "class C { class D { int x; int y; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; " " class E { class F { int y; int z; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(fieldDecl().bind
("f"))), new VerifyIdIsBoundTo<FieldDecl>("f", 4)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3630, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; \" \" class E { class F { int y; int z; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(fieldDecl().bind(\"f\"))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
3628 " class E { class F { int y; int z; }; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; " " class E { class F { int y; int z; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(fieldDecl().bind
("f"))), new VerifyIdIsBoundTo<FieldDecl>("f", 4)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3630, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; \" \" class E { class F { int y; int z; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(fieldDecl().bind(\"f\"))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
3629 recordDecl(hasName("C"), forEachDescendant(fieldDecl().bind("f"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; " " class E { class F { int y; int z; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(fieldDecl().bind
("f"))), new VerifyIdIsBoundTo<FieldDecl>("f", 4)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3630, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; \" \" class E { class F { int y; int z; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(fieldDecl().bind(\"f\"))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
3630 new VerifyIdIsBoundTo<FieldDecl>("f", 4)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { int x; int y; }; " " class E { class F { int y; int z; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(fieldDecl().bind
("f"))), new VerifyIdIsBoundTo<FieldDecl>("f", 4)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3630, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { int x; int y; }; \" \" class E { class F { int y; int z; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(fieldDecl().bind(\"f\"))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 4))"
, "false", "true").c_str()) = ::testing::Message()
;
3631}
3632
3633TEST(ForEachDescendant, BindsRecursiveCombinations)class ForEachDescendant_BindsRecursiveCombinations_Test : public
::testing::Test { public: ForEachDescendant_BindsRecursiveCombinations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ForEachDescendant_BindsRecursiveCombinations_Test
(ForEachDescendant_BindsRecursiveCombinations_Test const &
); void operator=(ForEachDescendant_BindsRecursiveCombinations_Test
const &);};::testing::TestInfo* const ForEachDescendant_BindsRecursiveCombinations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ForEachDescendant", "BindsRecursiveCombinations", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ForEachDescendant_BindsRecursiveCombinations_Test
>);void ForEachDescendant_BindsRecursiveCombinations_Test::
TestBody()
{
3634 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { " " class E { class F { class G { int y; int z; }; }; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(recordDecl( forEachDescendant
(fieldDecl().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl
>("f", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { \" \" class E { class F { class G { int y; int z; }; }; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(recordDecl( forEachDescendant(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 8))"
, "false", "true").c_str()) = ::testing::Message()
3635 "class C { class D { "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { " " class E { class F { class G { int y; int z; }; }; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(recordDecl( forEachDescendant
(fieldDecl().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl
>("f", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { \" \" class E { class F { class G { int y; int z; }; }; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(recordDecl( forEachDescendant(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 8))"
, "false", "true").c_str()) = ::testing::Message()
3636 " class E { class F { class G { int y; int z; }; }; }; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { " " class E { class F { class G { int y; int z; }; }; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(recordDecl( forEachDescendant
(fieldDecl().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl
>("f", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { \" \" class E { class F { class G { int y; int z; }; }; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(recordDecl( forEachDescendant(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 8))"
, "false", "true").c_str()) = ::testing::Message()
3637 recordDecl(hasName("C"), forEachDescendant(recordDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { " " class E { class F { class G { int y; int z; }; }; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(recordDecl( forEachDescendant
(fieldDecl().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl
>("f", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { \" \" class E { class F { class G { int y; int z; }; }; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(recordDecl( forEachDescendant(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 8))"
, "false", "true").c_str()) = ::testing::Message()
3638 forEachDescendant(fieldDecl().bind("f"))))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { " " class E { class F { class G { int y; int z; }; }; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(recordDecl( forEachDescendant
(fieldDecl().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl
>("f", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { \" \" class E { class F { class G { int y; int z; }; }; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(recordDecl( forEachDescendant(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 8))"
, "false", "true").c_str()) = ::testing::Message()
3639 new VerifyIdIsBoundTo<FieldDecl>("f", 8)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { " " class E { class F { class G { int y; int z; }; }; }; }; };"
, recordDecl(hasName("C"), forEachDescendant(recordDecl( forEachDescendant
(fieldDecl().bind("f"))))), new VerifyIdIsBoundTo<FieldDecl
>("f", 8)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3639, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { \" \" class E { class F { class G { int y; int z; }; }; }; }; };\", recordDecl(hasName(\"C\"), forEachDescendant(recordDecl( forEachDescendant(fieldDecl().bind(\"f\"))))), new VerifyIdIsBoundTo<FieldDecl>(\"f\", 8))"
, "false", "true").c_str()) = ::testing::Message()
;
3640}
3641
3642TEST(ForEachDescendant, BindsCombinations)class ForEachDescendant_BindsCombinations_Test : public ::testing
::Test { public: ForEachDescendant_BindsCombinations_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ForEachDescendant_BindsCombinations_Test
(ForEachDescendant_BindsCombinations_Test const &); void operator
=(ForEachDescendant_BindsCombinations_Test const &);};::testing
::TestInfo* const ForEachDescendant_BindsCombinations_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "ForEachDescendant"
, "BindsCombinations", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< ForEachDescendant_BindsCombinations_Test>);void ForEachDescendant_BindsCombinations_Test
::TestBody()
{
3643 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if(true) {} if (true) {} while (true) {} if (true) {} while "
"(true) {} }", compoundStmt(forEachDescendant(ifStmt().bind(
"if")), forEachDescendant(whileStmt().bind("while"))), new VerifyIdIsBoundTo
<IfStmt>("if", 6)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if(true) {} if (true) {} while (true) {} if (true) {} while \" \"(true) {} }\", compoundStmt(forEachDescendant(ifStmt().bind(\"if\")), forEachDescendant(whileStmt().bind(\"while\"))), new VerifyIdIsBoundTo<IfStmt>(\"if\", 6))"
, "false", "true").c_str()) = ::testing::Message()
3644 "void f() { if(true) {} if (true) {} while (true) {} if (true) {} while "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if(true) {} if (true) {} while (true) {} if (true) {} while "
"(true) {} }", compoundStmt(forEachDescendant(ifStmt().bind(
"if")), forEachDescendant(whileStmt().bind("while"))), new VerifyIdIsBoundTo
<IfStmt>("if", 6)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if(true) {} if (true) {} while (true) {} if (true) {} while \" \"(true) {} }\", compoundStmt(forEachDescendant(ifStmt().bind(\"if\")), forEachDescendant(whileStmt().bind(\"while\"))), new VerifyIdIsBoundTo<IfStmt>(\"if\", 6))"
, "false", "true").c_str()) = ::testing::Message()
3645 "(true) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if(true) {} if (true) {} while (true) {} if (true) {} while "
"(true) {} }", compoundStmt(forEachDescendant(ifStmt().bind(
"if")), forEachDescendant(whileStmt().bind("while"))), new VerifyIdIsBoundTo
<IfStmt>("if", 6)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if(true) {} if (true) {} while (true) {} if (true) {} while \" \"(true) {} }\", compoundStmt(forEachDescendant(ifStmt().bind(\"if\")), forEachDescendant(whileStmt().bind(\"while\"))), new VerifyIdIsBoundTo<IfStmt>(\"if\", 6))"
, "false", "true").c_str()) = ::testing::Message()
3646 compoundStmt(forEachDescendant(ifStmt().bind("if")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if(true) {} if (true) {} while (true) {} if (true) {} while "
"(true) {} }", compoundStmt(forEachDescendant(ifStmt().bind(
"if")), forEachDescendant(whileStmt().bind("while"))), new VerifyIdIsBoundTo
<IfStmt>("if", 6)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if(true) {} if (true) {} while (true) {} if (true) {} while \" \"(true) {} }\", compoundStmt(forEachDescendant(ifStmt().bind(\"if\")), forEachDescendant(whileStmt().bind(\"while\"))), new VerifyIdIsBoundTo<IfStmt>(\"if\", 6))"
, "false", "true").c_str()) = ::testing::Message()
3647 forEachDescendant(whileStmt().bind("while"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if(true) {} if (true) {} while (true) {} if (true) {} while "
"(true) {} }", compoundStmt(forEachDescendant(ifStmt().bind(
"if")), forEachDescendant(whileStmt().bind("while"))), new VerifyIdIsBoundTo
<IfStmt>("if", 6)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if(true) {} if (true) {} while (true) {} if (true) {} while \" \"(true) {} }\", compoundStmt(forEachDescendant(ifStmt().bind(\"if\")), forEachDescendant(whileStmt().bind(\"while\"))), new VerifyIdIsBoundTo<IfStmt>(\"if\", 6))"
, "false", "true").c_str()) = ::testing::Message()
3648 new VerifyIdIsBoundTo<IfStmt>("if", 6)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if(true) {} if (true) {} while (true) {} if (true) {} while "
"(true) {} }", compoundStmt(forEachDescendant(ifStmt().bind(
"if")), forEachDescendant(whileStmt().bind("while"))), new VerifyIdIsBoundTo
<IfStmt>("if", 6)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3648, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if(true) {} if (true) {} while (true) {} if (true) {} while \" \"(true) {} }\", compoundStmt(forEachDescendant(ifStmt().bind(\"if\")), forEachDescendant(whileStmt().bind(\"while\"))), new VerifyIdIsBoundTo<IfStmt>(\"if\", 6))"
, "false", "true").c_str()) = ::testing::Message()
;
3649}
3650
3651TEST(Has, DoesNotDeleteBindings)class Has_DoesNotDeleteBindings_Test : public ::testing::Test
{ public: Has_DoesNotDeleteBindings_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Has_DoesNotDeleteBindings_Test(Has_DoesNotDeleteBindings_Test
const &); void operator=(Has_DoesNotDeleteBindings_Test const
&);};::testing::TestInfo* const Has_DoesNotDeleteBindings_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Has", "DoesNotDeleteBindings", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< Has_DoesNotDeleteBindings_Test>);void Has_DoesNotDeleteBindings_Test
::TestBody()
{
3652 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { int a; };", recordDecl(decl().bind("x"), has(fieldDecl
())), new VerifyIdIsBoundTo<Decl>("x", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3654, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { int a; };\", recordDecl(decl().bind(\"x\"), has(fieldDecl())), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3653 "class X { int a; };", recordDecl(decl().bind("x"), has(fieldDecl())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { int a; };", recordDecl(decl().bind("x"), has(fieldDecl
())), new VerifyIdIsBoundTo<Decl>("x", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3654, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { int a; };\", recordDecl(decl().bind(\"x\"), has(fieldDecl())), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3654 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { int a; };", recordDecl(decl().bind("x"), has(fieldDecl
())), new VerifyIdIsBoundTo<Decl>("x", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3654, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { int a; };\", recordDecl(decl().bind(\"x\"), has(fieldDecl())), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3655}
3656
3657TEST(LoopingMatchers, DoNotOverwritePreviousMatchResultOnFailure)class LoopingMatchers_DoNotOverwritePreviousMatchResultOnFailure_Test
: public ::testing::Test { public: LoopingMatchers_DoNotOverwritePreviousMatchResultOnFailure_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); LoopingMatchers_DoNotOverwritePreviousMatchResultOnFailure_Test
(LoopingMatchers_DoNotOverwritePreviousMatchResultOnFailure_Test
const &); void operator=(LoopingMatchers_DoNotOverwritePreviousMatchResultOnFailure_Test
const &);};::testing::TestInfo* const LoopingMatchers_DoNotOverwritePreviousMatchResultOnFailure_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"LoopingMatchers", "DoNotOverwritePreviousMatchResultOnFailure"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< LoopingMatchers_DoNotOverwritePreviousMatchResultOnFailure_Test
>);void LoopingMatchers_DoNotOverwritePreviousMatchResultOnFailure_Test
::TestBody()
{
3658 // Those matchers cover all the cases where an inner matcher is called
3659 // and there is not a 1:1 relationship between the match of the outer
3660 // matcher and the match of the inner matcher.
3661 // The pattern to look for is:
3662 // ... return InnerMatcher.matches(...); ...
3663 // In which case no special handling is needed.
3664 //
3665 // On the other hand, if there are multiple alternative matches
3666 // (for example forEach*) or matches might be discarded (for example has*)
3667 // the implementation must make sure that the discarded matches do not
3668 // affect the bindings.
3669 // When new such matchers are added, add a test here that:
3670 // - matches a simple node, and binds it as the first thing in the matcher:
3671 // recordDecl(decl().bind("x"), hasName("X")))
3672 // - uses the matcher under test afterwards in a way that not the first
3673 // alternative is matched; for anyOf, that means the first branch
3674 // would need to return false; for hasAncestor, it means that not
3675 // the direct parent matches the inner matcher.
3676
3677 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { int y; };", recordDecl( recordDecl().bind("x"), hasName
("::X"), anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything
())), new VerifyIdIsBoundTo<CXXRecordDecl>("x", 1)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3682, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { int y; };\", recordDecl( recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(forEachDescendant(recordDecl(hasName(\"Y\"))), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3678 "class X { int y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { int y; };", recordDecl( recordDecl().bind("x"), hasName
("::X"), anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything
())), new VerifyIdIsBoundTo<CXXRecordDecl>("x", 1)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3682, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { int y; };\", recordDecl( recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(forEachDescendant(recordDecl(hasName(\"Y\"))), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3679 recordDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { int y; };", recordDecl( recordDecl().bind("x"), hasName
("::X"), anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything
())), new VerifyIdIsBoundTo<CXXRecordDecl>("x", 1)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3682, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { int y; };\", recordDecl( recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(forEachDescendant(recordDecl(hasName(\"Y\"))), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3680 recordDecl().bind("x"), hasName("::X"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { int y; };", recordDecl( recordDecl().bind("x"), hasName
("::X"), anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything
())), new VerifyIdIsBoundTo<CXXRecordDecl>("x", 1)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3682, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { int y; };\", recordDecl( recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(forEachDescendant(recordDecl(hasName(\"Y\"))), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3681 anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { int y; };", recordDecl( recordDecl().bind("x"), hasName
("::X"), anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything
())), new VerifyIdIsBoundTo<CXXRecordDecl>("x", 1)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3682, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { int y; };\", recordDecl( recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(forEachDescendant(recordDecl(hasName(\"Y\"))), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3682 new VerifyIdIsBoundTo<CXXRecordDecl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { int y; };", recordDecl( recordDecl().bind("x"), hasName
("::X"), anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything
())), new VerifyIdIsBoundTo<CXXRecordDecl>("x", 1)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3682, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { int y; };\", recordDecl( recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(forEachDescendant(recordDecl(hasName(\"Y\"))), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3683 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X {};", recordDecl(recordDecl().bind("x"), hasName("::X"
), anyOf(unless(anything()), anything())), new VerifyIdIsBoundTo
<CXXRecordDecl>("x", 1)))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3686, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X {};\", recordDecl(recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(unless(anything()), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3684 "class X {};", recordDecl(recordDecl().bind("x"), hasName("::X"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X {};", recordDecl(recordDecl().bind("x"), hasName("::X"
), anyOf(unless(anything()), anything())), new VerifyIdIsBoundTo
<CXXRecordDecl>("x", 1)))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3686, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X {};\", recordDecl(recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(unless(anything()), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3685 anyOf(unless(anything()), anything())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X {};", recordDecl(recordDecl().bind("x"), hasName("::X"
), anyOf(unless(anything()), anything())), new VerifyIdIsBoundTo
<CXXRecordDecl>("x", 1)))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3686, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X {};\", recordDecl(recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(unless(anything()), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3686 new VerifyIdIsBoundTo<CXXRecordDecl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X {};", recordDecl(recordDecl().bind("x"), hasName("::X"
), anyOf(unless(anything()), anything())), new VerifyIdIsBoundTo
<CXXRecordDecl>("x", 1)))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3686, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X {};\", recordDecl(recordDecl().bind(\"x\"), hasName(\"::X\"), anyOf(unless(anything()), anything())), new VerifyIdIsBoundTo<CXXRecordDecl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3687 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template<typename T1, typename T2> class X {}; X<float, int> x;"
, classTemplateSpecializationDecl( decl().bind("x"), hasAnyTemplateArgument
(refersToType(asString("int")))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template<typename T1, typename T2> class X {}; X<float, int> x;\", classTemplateSpecializationDecl( decl().bind(\"x\"), hasAnyTemplateArgument(refersToType(asString(\"int\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3688 "template<typename T1, typename T2> class X {}; X<float, int> x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template<typename T1, typename T2> class X {}; X<float, int> x;"
, classTemplateSpecializationDecl( decl().bind("x"), hasAnyTemplateArgument
(refersToType(asString("int")))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template<typename T1, typename T2> class X {}; X<float, int> x;\", classTemplateSpecializationDecl( decl().bind(\"x\"), hasAnyTemplateArgument(refersToType(asString(\"int\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3689 classTemplateSpecializationDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template<typename T1, typename T2> class X {}; X<float, int> x;"
, classTemplateSpecializationDecl( decl().bind("x"), hasAnyTemplateArgument
(refersToType(asString("int")))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template<typename T1, typename T2> class X {}; X<float, int> x;\", classTemplateSpecializationDecl( decl().bind(\"x\"), hasAnyTemplateArgument(refersToType(asString(\"int\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3690 decl().bind("x"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template<typename T1, typename T2> class X {}; X<float, int> x;"
, classTemplateSpecializationDecl( decl().bind("x"), hasAnyTemplateArgument
(refersToType(asString("int")))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template<typename T1, typename T2> class X {}; X<float, int> x;\", classTemplateSpecializationDecl( decl().bind(\"x\"), hasAnyTemplateArgument(refersToType(asString(\"int\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3691 hasAnyTemplateArgument(refersToType(asString("int")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template<typename T1, typename T2> class X {}; X<float, int> x;"
, classTemplateSpecializationDecl( decl().bind("x"), hasAnyTemplateArgument
(refersToType(asString("int")))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template<typename T1, typename T2> class X {}; X<float, int> x;\", classTemplateSpecializationDecl( decl().bind(\"x\"), hasAnyTemplateArgument(refersToType(asString(\"int\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3692 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template<typename T1, typename T2> class X {}; X<float, int> x;"
, classTemplateSpecializationDecl( decl().bind("x"), hasAnyTemplateArgument
(refersToType(asString("int")))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template<typename T1, typename T2> class X {}; X<float, int> x;\", classTemplateSpecializationDecl( decl().bind(\"x\"), hasAnyTemplateArgument(refersToType(asString(\"int\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3693 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { void f(); void g(); };", cxxRecordDecl(decl().bind
("x"), hasMethod(hasName("g"))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3696, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { void f(); void g(); };\", cxxRecordDecl(decl().bind(\"x\"), hasMethod(hasName(\"g\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3694 "class X { void f(); void g(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { void f(); void g(); };", cxxRecordDecl(decl().bind
("x"), hasMethod(hasName("g"))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3696, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { void f(); void g(); };\", cxxRecordDecl(decl().bind(\"x\"), hasMethod(hasName(\"g\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3695 cxxRecordDecl(decl().bind("x"), hasMethod(hasName("g"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { void f(); void g(); };", cxxRecordDecl(decl().bind
("x"), hasMethod(hasName("g"))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3696, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { void f(); void g(); };\", cxxRecordDecl(decl().bind(\"x\"), hasMethod(hasName(\"g\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3696 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { void f(); void g(); };", cxxRecordDecl(decl().bind
("x"), hasMethod(hasName("g"))), new VerifyIdIsBoundTo<Decl
>("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3696, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { void f(); void g(); };\", cxxRecordDecl(decl().bind(\"x\"), hasMethod(hasName(\"g\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3697 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { X() : a(1), b(2) {} double a; int b; };", recordDecl
(decl().bind("x"), has(cxxConstructorDecl( hasAnyConstructorInitializer
(forField(hasName("b")))))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3702, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { X() : a(1), b(2) {} double a; int b; };\", recordDecl(decl().bind(\"x\"), has(cxxConstructorDecl( hasAnyConstructorInitializer(forField(hasName(\"b\")))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3698 "class X { X() : a(1), b(2) {} double a; int b; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { X() : a(1), b(2) {} double a; int b; };", recordDecl
(decl().bind("x"), has(cxxConstructorDecl( hasAnyConstructorInitializer
(forField(hasName("b")))))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3702, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { X() : a(1), b(2) {} double a; int b; };\", recordDecl(decl().bind(\"x\"), has(cxxConstructorDecl( hasAnyConstructorInitializer(forField(hasName(\"b\")))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3699 recordDecl(decl().bind("x"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { X() : a(1), b(2) {} double a; int b; };", recordDecl
(decl().bind("x"), has(cxxConstructorDecl( hasAnyConstructorInitializer
(forField(hasName("b")))))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3702, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { X() : a(1), b(2) {} double a; int b; };\", recordDecl(decl().bind(\"x\"), has(cxxConstructorDecl( hasAnyConstructorInitializer(forField(hasName(\"b\")))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3700 has(cxxConstructorDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { X() : a(1), b(2) {} double a; int b; };", recordDecl
(decl().bind("x"), has(cxxConstructorDecl( hasAnyConstructorInitializer
(forField(hasName("b")))))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3702, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { X() : a(1), b(2) {} double a; int b; };\", recordDecl(decl().bind(\"x\"), has(cxxConstructorDecl( hasAnyConstructorInitializer(forField(hasName(\"b\")))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3701 hasAnyConstructorInitializer(forField(hasName("b")))))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { X() : a(1), b(2) {} double a; int b; };", recordDecl
(decl().bind("x"), has(cxxConstructorDecl( hasAnyConstructorInitializer
(forField(hasName("b")))))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3702, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { X() : a(1), b(2) {} double a; int b; };\", recordDecl(decl().bind(\"x\"), has(cxxConstructorDecl( hasAnyConstructorInitializer(forField(hasName(\"b\")))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3702 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { X() : a(1), b(2) {} double a; int b; };", recordDecl
(decl().bind("x"), has(cxxConstructorDecl( hasAnyConstructorInitializer
(forField(hasName("b")))))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3702, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { X() : a(1), b(2) {} double a; int b; };\", recordDecl(decl().bind(\"x\"), has(cxxConstructorDecl( hasAnyConstructorInitializer(forField(hasName(\"b\")))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3703 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x(int, int) { x(0, 42); }", callExpr(expr().bind("x")
, hasAnyArgument(integerLiteral(equals(42)))), new VerifyIdIsBoundTo
<Expr>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3706, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x(int, int) { x(0, 42); }\", callExpr(expr().bind(\"x\"), hasAnyArgument(integerLiteral(equals(42)))), new VerifyIdIsBoundTo<Expr>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3704 "void x(int, int) { x(0, 42); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x(int, int) { x(0, 42); }", callExpr(expr().bind("x")
, hasAnyArgument(integerLiteral(equals(42)))), new VerifyIdIsBoundTo
<Expr>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3706, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x(int, int) { x(0, 42); }\", callExpr(expr().bind(\"x\"), hasAnyArgument(integerLiteral(equals(42)))), new VerifyIdIsBoundTo<Expr>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3705 callExpr(expr().bind("x"), hasAnyArgument(integerLiteral(equals(42)))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x(int, int) { x(0, 42); }", callExpr(expr().bind("x")
, hasAnyArgument(integerLiteral(equals(42)))), new VerifyIdIsBoundTo
<Expr>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3706, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x(int, int) { x(0, 42); }\", callExpr(expr().bind(\"x\"), hasAnyArgument(integerLiteral(equals(42)))), new VerifyIdIsBoundTo<Expr>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3706 new VerifyIdIsBoundTo<Expr>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x(int, int) { x(0, 42); }", callExpr(expr().bind("x")
, hasAnyArgument(integerLiteral(equals(42)))), new VerifyIdIsBoundTo
<Expr>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3706, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x(int, int) { x(0, 42); }\", callExpr(expr().bind(\"x\"), hasAnyArgument(integerLiteral(equals(42)))), new VerifyIdIsBoundTo<Expr>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3707 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x(int, int y) {}", functionDecl(decl().bind("x"), hasAnyParameter
(hasName("y"))), new VerifyIdIsBoundTo<Decl>("x", 1))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x(int, int y) {}\", functionDecl(decl().bind(\"x\"), hasAnyParameter(hasName(\"y\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3708 "void x(int, int y) {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x(int, int y) {}", functionDecl(decl().bind("x"), hasAnyParameter
(hasName("y"))), new VerifyIdIsBoundTo<Decl>("x", 1))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x(int, int y) {}\", functionDecl(decl().bind(\"x\"), hasAnyParameter(hasName(\"y\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3709 functionDecl(decl().bind("x"), hasAnyParameter(hasName("y"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x(int, int y) {}", functionDecl(decl().bind("x"), hasAnyParameter
(hasName("y"))), new VerifyIdIsBoundTo<Decl>("x", 1))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x(int, int y) {}\", functionDecl(decl().bind(\"x\"), hasAnyParameter(hasName(\"y\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3710 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x(int, int y) {}", functionDecl(decl().bind("x"), hasAnyParameter
(hasName("y"))), new VerifyIdIsBoundTo<Decl>("x", 1))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x(int, int y) {}\", functionDecl(decl().bind(\"x\"), hasAnyParameter(hasName(\"y\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3711 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x() { return; if (true) {} }", functionDecl(decl().bind
("x"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x() { return; if (true) {} }\", functionDecl(decl().bind(\"x\"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3712 "void x() { return; if (true) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x() { return; if (true) {} }", functionDecl(decl().bind
("x"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x() { return; if (true) {} }\", functionDecl(decl().bind(\"x\"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3713 functionDecl(decl().bind("x"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x() { return; if (true) {} }", functionDecl(decl().bind
("x"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x() { return; if (true) {} }\", functionDecl(decl().bind(\"x\"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3714 has(compoundStmt(hasAnySubstatement(ifStmt())))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x() { return; if (true) {} }", functionDecl(decl().bind
("x"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x() { return; if (true) {} }\", functionDecl(decl().bind(\"x\"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3715 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void x() { return; if (true) {} }", functionDecl(decl().bind
("x"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3715, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void x() { return; if (true) {} }\", functionDecl(decl().bind(\"x\"), has(compoundStmt(hasAnySubstatement(ifStmt())))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3716 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace X { void b(int); void b(); }" "using X::b;", usingDecl
(decl().bind("x"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl
(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>("x"
, 1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3721, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace X { void b(int); void b(); }\" \"using X::b;\", usingDecl(decl().bind(\"x\"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3717 "namespace X { void b(int); void b(); }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace X { void b(int); void b(); }" "using X::b;", usingDecl
(decl().bind("x"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl
(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>("x"
, 1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3721, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace X { void b(int); void b(); }\" \"using X::b;\", usingDecl(decl().bind(\"x\"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3718 "using X::b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace X { void b(int); void b(); }" "using X::b;", usingDecl
(decl().bind("x"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl
(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>("x"
, 1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3721, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace X { void b(int); void b(); }\" \"using X::b;\", usingDecl(decl().bind(\"x\"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3719 usingDecl(decl().bind("x"), hasAnyUsingShadowDecl(hasTargetDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace X { void b(int); void b(); }" "using X::b;", usingDecl
(decl().bind("x"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl
(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>("x"
, 1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3721, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace X { void b(int); void b(); }\" \"using X::b;\", usingDecl(decl().bind(\"x\"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3720 functionDecl(parameterCountIs(1))))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace X { void b(int); void b(); }" "using X::b;", usingDecl
(decl().bind("x"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl
(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>("x"
, 1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3721, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace X { void b(int); void b(); }\" \"using X::b;\", usingDecl(decl().bind(\"x\"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3721 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace X { void b(int); void b(); }" "using X::b;", usingDecl
(decl().bind("x"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl
(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>("x"
, 1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3721, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace X { void b(int); void b(); }\" \"using X::b;\", usingDecl(decl().bind(\"x\"), hasAnyUsingShadowDecl(hasTargetDecl( functionDecl(parameterCountIs(1))))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3722 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A{}; class B{}; class C : B, A {};", cxxRecordDecl(decl
().bind("x"), isDerivedFrom("::A")), new VerifyIdIsBoundTo<
Decl>("x", 1)))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3725, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A{}; class B{}; class C : B, A {};\", cxxRecordDecl(decl().bind(\"x\"), isDerivedFrom(\"::A\")), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3723 "class A{}; class B{}; class C : B, A {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A{}; class B{}; class C : B, A {};", cxxRecordDecl(decl
().bind("x"), isDerivedFrom("::A")), new VerifyIdIsBoundTo<
Decl>("x", 1)))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3725, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A{}; class B{}; class C : B, A {};\", cxxRecordDecl(decl().bind(\"x\"), isDerivedFrom(\"::A\")), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3724 cxxRecordDecl(decl().bind("x"), isDerivedFrom("::A")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A{}; class B{}; class C : B, A {};", cxxRecordDecl(decl
().bind("x"), isDerivedFrom("::A")), new VerifyIdIsBoundTo<
Decl>("x", 1)))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3725, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A{}; class B{}; class C : B, A {};\", cxxRecordDecl(decl().bind(\"x\"), isDerivedFrom(\"::A\")), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3725 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A{}; class B{}; class C : B, A {};", cxxRecordDecl(decl
().bind("x"), isDerivedFrom("::A")), new VerifyIdIsBoundTo<
Decl>("x", 1)))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3725, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A{}; class B{}; class C : B, A {};\", cxxRecordDecl(decl().bind(\"x\"), isDerivedFrom(\"::A\")), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3726 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A{}; typedef A B; typedef A C; typedef A D;" "class E : A {};"
, cxxRecordDecl(decl().bind("x"), isDerivedFrom("C")), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3730, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A{}; typedef A B; typedef A C; typedef A D;\" \"class E : A {};\", cxxRecordDecl(decl().bind(\"x\"), isDerivedFrom(\"C\")), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3727 "class A{}; typedef A B; typedef A C; typedef A D;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A{}; typedef A B; typedef A C; typedef A D;" "class E : A {};"
, cxxRecordDecl(decl().bind("x"), isDerivedFrom("C")), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3730, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A{}; typedef A B; typedef A C; typedef A D;\" \"class E : A {};\", cxxRecordDecl(decl().bind(\"x\"), isDerivedFrom(\"C\")), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3728 "class E : A {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A{}; typedef A B; typedef A C; typedef A D;" "class E : A {};"
, cxxRecordDecl(decl().bind("x"), isDerivedFrom("C")), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3730, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A{}; typedef A B; typedef A C; typedef A D;\" \"class E : A {};\", cxxRecordDecl(decl().bind(\"x\"), isDerivedFrom(\"C\")), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3729 cxxRecordDecl(decl().bind("x"), isDerivedFrom("C")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A{}; typedef A B; typedef A C; typedef A D;" "class E : A {};"
, cxxRecordDecl(decl().bind("x"), isDerivedFrom("C")), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3730, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A{}; typedef A B; typedef A C; typedef A D;\" \"class E : A {};\", cxxRecordDecl(decl().bind(\"x\"), isDerivedFrom(\"C\")), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3730 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A{}; typedef A B; typedef A C; typedef A D;" "class E : A {};"
, cxxRecordDecl(decl().bind("x"), isDerivedFrom("C")), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3730, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A{}; typedef A B; typedef A C; typedef A D;\" \"class E : A {};\", cxxRecordDecl(decl().bind(\"x\"), isDerivedFrom(\"C\")), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3731 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { void f() {} }; };", functionDecl(decl(
).bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3734, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { void f() {} }; };\", functionDecl(decl().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3732 "class A { class B { void f() {} }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { void f() {} }; };", functionDecl(decl(
).bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3734, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { void f() {} }; };\", functionDecl(decl().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3733 functionDecl(decl().bind("x"), hasAncestor(recordDecl(hasName("::A")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { void f() {} }; };", functionDecl(decl(
).bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3734, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { void f() {} }; };\", functionDecl(decl().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3734 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B { void f() {} }; };", functionDecl(decl(
).bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Decl>("x", 1)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3734, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B { void f() {} }; };\", functionDecl(decl().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3735 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct A { struct B {" " void f() { if(true) {} }"
"}; };" "void t() { A<int>::B b; b.f(); }", ifStmt(stmt
().bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Stmt>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3741, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct A { struct B {\" \" void f() { if(true) {} }\" \"}; };\" \"void t() { A<int>::B b; b.f(); }\", ifStmt(stmt().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Stmt>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3736 "template <typename T> struct A { struct B {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct A { struct B {" " void f() { if(true) {} }"
"}; };" "void t() { A<int>::B b; b.f(); }", ifStmt(stmt
().bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Stmt>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3741, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct A { struct B {\" \" void f() { if(true) {} }\" \"}; };\" \"void t() { A<int>::B b; b.f(); }\", ifStmt(stmt().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Stmt>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3737 " void f() { if(true) {} }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct A { struct B {" " void f() { if(true) {} }"
"}; };" "void t() { A<int>::B b; b.f(); }", ifStmt(stmt
().bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Stmt>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3741, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct A { struct B {\" \" void f() { if(true) {} }\" \"}; };\" \"void t() { A<int>::B b; b.f(); }\", ifStmt(stmt().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Stmt>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3738 "}; };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct A { struct B {" " void f() { if(true) {} }"
"}; };" "void t() { A<int>::B b; b.f(); }", ifStmt(stmt
().bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Stmt>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3741, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct A { struct B {\" \" void f() { if(true) {} }\" \"}; };\" \"void t() { A<int>::B b; b.f(); }\", ifStmt(stmt().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Stmt>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3739 "void t() { A<int>::B b; b.f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct A { struct B {" " void f() { if(true) {} }"
"}; };" "void t() { A<int>::B b; b.f(); }", ifStmt(stmt
().bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Stmt>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3741, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct A { struct B {\" \" void f() { if(true) {} }\" \"}; };\" \"void t() { A<int>::B b; b.f(); }\", ifStmt(stmt().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Stmt>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3740 ifStmt(stmt().bind("x"), hasAncestor(recordDecl(hasName("::A")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct A { struct B {" " void f() { if(true) {} }"
"}; };" "void t() { A<int>::B b; b.f(); }", ifStmt(stmt
().bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Stmt>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3741, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct A { struct B {\" \" void f() { if(true) {} }\" \"}; };\" \"void t() { A<int>::B b; b.f(); }\", ifStmt(stmt().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Stmt>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3741 new VerifyIdIsBoundTo<Stmt>("x", 2)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct A { struct B {" " void f() { if(true) {} }"
"}; };" "void t() { A<int>::B b; b.f(); }", ifStmt(stmt
().bind("x"), hasAncestor(recordDecl(hasName("::A")))), new VerifyIdIsBoundTo
<Stmt>("x", 2)))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3741, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct A { struct B {\" \" void f() { if(true) {} }\" \"}; };\" \"void t() { A<int>::B b; b.f(); }\", ifStmt(stmt().bind(\"x\"), hasAncestor(recordDecl(hasName(\"::A\")))), new VerifyIdIsBoundTo<Stmt>(\"x\", 2))"
, "false", "true").c_str()) = ::testing::Message()
;
3742 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A {};", recordDecl(hasName("::A"), decl().bind("x"),
unless(hasName("fooble"))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3745, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A {};\", recordDecl(hasName(\"::A\"), decl().bind(\"x\"), unless(hasName(\"fooble\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3743 "class A {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A {};", recordDecl(hasName("::A"), decl().bind("x"),
unless(hasName("fooble"))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3745, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A {};\", recordDecl(hasName(\"::A\"), decl().bind(\"x\"), unless(hasName(\"fooble\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3744 recordDecl(hasName("::A"), decl().bind("x"), unless(hasName("fooble"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A {};", recordDecl(hasName("::A"), decl().bind("x"),
unless(hasName("fooble"))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3745, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A {};\", recordDecl(hasName(\"::A\"), decl().bind(\"x\"), unless(hasName(\"fooble\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3745 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A {};", recordDecl(hasName("::A"), decl().bind("x"),
unless(hasName("fooble"))), new VerifyIdIsBoundTo<Decl>
("x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3745, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A {};\", recordDecl(hasName(\"::A\"), decl().bind(\"x\"), unless(hasName(\"fooble\"))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3746 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { A() : s(), i(42) {} const char *s; int i; };", cxxConstructorDecl
(hasName("::A::A"), decl().bind("x"), forEachConstructorInitializer
(forField(hasName("i")))), new VerifyIdIsBoundTo<Decl>(
"x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3750, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { A() : s(), i(42) {} const char *s; int i; };\", cxxConstructorDecl(hasName(\"::A::A\"), decl().bind(\"x\"), forEachConstructorInitializer(forField(hasName(\"i\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3747 "class A { A() : s(), i(42) {} const char *s; int i; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { A() : s(), i(42) {} const char *s; int i; };", cxxConstructorDecl
(hasName("::A::A"), decl().bind("x"), forEachConstructorInitializer
(forField(hasName("i")))), new VerifyIdIsBoundTo<Decl>(
"x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3750, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { A() : s(), i(42) {} const char *s; int i; };\", cxxConstructorDecl(hasName(\"::A::A\"), decl().bind(\"x\"), forEachConstructorInitializer(forField(hasName(\"i\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3748 cxxConstructorDecl(hasName("::A::A"), decl().bind("x"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { A() : s(), i(42) {} const char *s; int i; };", cxxConstructorDecl
(hasName("::A::A"), decl().bind("x"), forEachConstructorInitializer
(forField(hasName("i")))), new VerifyIdIsBoundTo<Decl>(
"x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3750, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { A() : s(), i(42) {} const char *s; int i; };\", cxxConstructorDecl(hasName(\"::A::A\"), decl().bind(\"x\"), forEachConstructorInitializer(forField(hasName(\"i\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3749 forEachConstructorInitializer(forField(hasName("i")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { A() : s(), i(42) {} const char *s; int i; };", cxxConstructorDecl
(hasName("::A::A"), decl().bind("x"), forEachConstructorInitializer
(forField(hasName("i")))), new VerifyIdIsBoundTo<Decl>(
"x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3750, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { A() : s(), i(42) {} const char *s; int i; };\", cxxConstructorDecl(hasName(\"::A::A\"), decl().bind(\"x\"), forEachConstructorInitializer(forField(hasName(\"i\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3750 new VerifyIdIsBoundTo<Decl>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { A() : s(), i(42) {} const char *s; int i; };", cxxConstructorDecl
(hasName("::A::A"), decl().bind("x"), forEachConstructorInitializer
(forField(hasName("i")))), new VerifyIdIsBoundTo<Decl>(
"x", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3750, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { A() : s(), i(42) {} const char *s; int i; };\", cxxConstructorDecl(hasName(\"::A::A\"), decl().bind(\"x\"), forEachConstructorInitializer(forField(hasName(\"i\")))), new VerifyIdIsBoundTo<Decl>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3751}
3752
3753TEST(ForEachDescendant, BindsCorrectNodes)class ForEachDescendant_BindsCorrectNodes_Test : public ::testing
::Test { public: ForEachDescendant_BindsCorrectNodes_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ForEachDescendant_BindsCorrectNodes_Test
(ForEachDescendant_BindsCorrectNodes_Test const &); void operator
=(ForEachDescendant_BindsCorrectNodes_Test const &);};::testing
::TestInfo* const ForEachDescendant_BindsCorrectNodes_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "ForEachDescendant"
, "BindsCorrectNodes", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< ForEachDescendant_BindsCorrectNodes_Test>);void ForEachDescendant_BindsCorrectNodes_Test
::TestBody()
{
3754 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { void f(); int i; };", recordDecl(hasName("C"), forEachDescendant
(decl().bind("decl"))), new VerifyIdIsBoundTo<FieldDecl>
("decl", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3757, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { void f(); int i; };\", recordDecl(hasName(\"C\"), forEachDescendant(decl().bind(\"decl\"))), new VerifyIdIsBoundTo<FieldDecl>(\"decl\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3755 "class C { void f(); int i; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { void f(); int i; };", recordDecl(hasName("C"), forEachDescendant
(decl().bind("decl"))), new VerifyIdIsBoundTo<FieldDecl>
("decl", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3757, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { void f(); int i; };\", recordDecl(hasName(\"C\"), forEachDescendant(decl().bind(\"decl\"))), new VerifyIdIsBoundTo<FieldDecl>(\"decl\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3756 recordDecl(hasName("C"), forEachDescendant(decl().bind("decl"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { void f(); int i; };", recordDecl(hasName("C"), forEachDescendant
(decl().bind("decl"))), new VerifyIdIsBoundTo<FieldDecl>
("decl", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3757, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { void f(); int i; };\", recordDecl(hasName(\"C\"), forEachDescendant(decl().bind(\"decl\"))), new VerifyIdIsBoundTo<FieldDecl>(\"decl\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3757 new VerifyIdIsBoundTo<FieldDecl>("decl", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { void f(); int i; };", recordDecl(hasName("C"), forEachDescendant
(decl().bind("decl"))), new VerifyIdIsBoundTo<FieldDecl>
("decl", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3757, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { void f(); int i; };\", recordDecl(hasName(\"C\"), forEachDescendant(decl().bind(\"decl\"))), new VerifyIdIsBoundTo<FieldDecl>(\"decl\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3758 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { void f() {} int i; };", recordDecl(hasName("C"),
forEachDescendant(decl().bind("decl"))), new VerifyIdIsBoundTo
<FunctionDecl>("decl", 1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3761, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { void f() {} int i; };\", recordDecl(hasName(\"C\"), forEachDescendant(decl().bind(\"decl\"))), new VerifyIdIsBoundTo<FunctionDecl>(\"decl\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3759 "class C { void f() {} int i; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { void f() {} int i; };", recordDecl(hasName("C"),
forEachDescendant(decl().bind("decl"))), new VerifyIdIsBoundTo
<FunctionDecl>("decl", 1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3761, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { void f() {} int i; };\", recordDecl(hasName(\"C\"), forEachDescendant(decl().bind(\"decl\"))), new VerifyIdIsBoundTo<FunctionDecl>(\"decl\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3760 recordDecl(hasName("C"), forEachDescendant(decl().bind("decl"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { void f() {} int i; };", recordDecl(hasName("C"),
forEachDescendant(decl().bind("decl"))), new VerifyIdIsBoundTo
<FunctionDecl>("decl", 1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3761, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { void f() {} int i; };\", recordDecl(hasName(\"C\"), forEachDescendant(decl().bind(\"decl\"))), new VerifyIdIsBoundTo<FunctionDecl>(\"decl\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3761 new VerifyIdIsBoundTo<FunctionDecl>("decl", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { void f() {} int i; };", recordDecl(hasName("C"),
forEachDescendant(decl().bind("decl"))), new VerifyIdIsBoundTo
<FunctionDecl>("decl", 1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3761, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { void f() {} int i; };\", recordDecl(hasName(\"C\"), forEachDescendant(decl().bind(\"decl\"))), new VerifyIdIsBoundTo<FunctionDecl>(\"decl\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3762}
3763
3764TEST(FindAll, BindsNodeOnMatch)class FindAll_BindsNodeOnMatch_Test : public ::testing::Test {
public: FindAll_BindsNodeOnMatch_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); FindAll_BindsNodeOnMatch_Test(FindAll_BindsNodeOnMatch_Test
const &); void operator=(FindAll_BindsNodeOnMatch_Test const
&);};::testing::TestInfo* const FindAll_BindsNodeOnMatch_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"FindAll", "BindsNodeOnMatch", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< FindAll_BindsNodeOnMatch_Test>);void FindAll_BindsNodeOnMatch_Test
::TestBody()
{
3765 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A {};", recordDecl(hasName("::A"), findAll(recordDecl
(hasName("::A")).bind("v"))), new VerifyIdIsBoundTo<CXXRecordDecl
>("v", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3768, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A {};\", recordDecl(hasName(\"::A\"), findAll(recordDecl(hasName(\"::A\")).bind(\"v\"))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3766 "class A {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A {};", recordDecl(hasName("::A"), findAll(recordDecl
(hasName("::A")).bind("v"))), new VerifyIdIsBoundTo<CXXRecordDecl
>("v", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3768, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A {};\", recordDecl(hasName(\"::A\"), findAll(recordDecl(hasName(\"::A\")).bind(\"v\"))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3767 recordDecl(hasName("::A"), findAll(recordDecl(hasName("::A")).bind("v"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A {};", recordDecl(hasName("::A"), findAll(recordDecl
(hasName("::A")).bind("v"))), new VerifyIdIsBoundTo<CXXRecordDecl
>("v", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3768, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A {};\", recordDecl(hasName(\"::A\"), findAll(recordDecl(hasName(\"::A\")).bind(\"v\"))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3768 new VerifyIdIsBoundTo<CXXRecordDecl>("v", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A {};", recordDecl(hasName("::A"), findAll(recordDecl
(hasName("::A")).bind("v"))), new VerifyIdIsBoundTo<CXXRecordDecl
>("v", 1)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3768, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A {};\", recordDecl(hasName(\"::A\"), findAll(recordDecl(hasName(\"::A\")).bind(\"v\"))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3769}
3770
3771TEST(FindAll, BindsDescendantNodeOnMatch)class FindAll_BindsDescendantNodeOnMatch_Test : public ::testing
::Test { public: FindAll_BindsDescendantNodeOnMatch_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); FindAll_BindsDescendantNodeOnMatch_Test
(FindAll_BindsDescendantNodeOnMatch_Test const &); void operator
=(FindAll_BindsDescendantNodeOnMatch_Test const &);};::testing
::TestInfo* const FindAll_BindsDescendantNodeOnMatch_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "FindAll", "BindsDescendantNodeOnMatch"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< FindAll_BindsDescendantNodeOnMatch_Test
>);void FindAll_BindsDescendantNodeOnMatch_Test::TestBody(
)
{
3772 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(fieldDecl().bind("v"))), new VerifyIdIsBoundTo<FieldDecl>
("v", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3775, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(fieldDecl().bind(\"v\"))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3773 "class A { int a; int b; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(fieldDecl().bind("v"))), new VerifyIdIsBoundTo<FieldDecl>
("v", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3775, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(fieldDecl().bind(\"v\"))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3774 recordDecl(hasName("::A"), findAll(fieldDecl().bind("v"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(fieldDecl().bind("v"))), new VerifyIdIsBoundTo<FieldDecl>
("v", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3775, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(fieldDecl().bind(\"v\"))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3775 new VerifyIdIsBoundTo<FieldDecl>("v", 2)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(fieldDecl().bind("v"))), new VerifyIdIsBoundTo<FieldDecl>
("v", 2)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3775, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(fieldDecl().bind(\"v\"))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 2))"
, "false", "true").c_str()) = ::testing::Message()
;
3776}
3777
3778TEST(FindAll, BindsNodeAndDescendantNodesOnOneMatch)class FindAll_BindsNodeAndDescendantNodesOnOneMatch_Test : public
::testing::Test { public: FindAll_BindsNodeAndDescendantNodesOnOneMatch_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); FindAll_BindsNodeAndDescendantNodesOnOneMatch_Test
(FindAll_BindsNodeAndDescendantNodesOnOneMatch_Test const &
); void operator=(FindAll_BindsNodeAndDescendantNodesOnOneMatch_Test
const &);};::testing::TestInfo* const FindAll_BindsNodeAndDescendantNodesOnOneMatch_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"FindAll", "BindsNodeAndDescendantNodesOnOneMatch", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< FindAll_BindsNodeAndDescendantNodesOnOneMatch_Test
>);void FindAll_BindsNodeAndDescendantNodesOnOneMatch_Test
::TestBody()
{
3779 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(decl(anyOf(recordDecl(hasName("::A")).bind("v"), fieldDecl()
.bind("v"))))), new VerifyIdIsBoundTo<Decl>("v", 3)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3784, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(decl(anyOf(recordDecl(hasName(\"::A\")).bind(\"v\"), fieldDecl().bind(\"v\"))))), new VerifyIdIsBoundTo<Decl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3780 "class A { int a; int b; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(decl(anyOf(recordDecl(hasName("::A")).bind("v"), fieldDecl()
.bind("v"))))), new VerifyIdIsBoundTo<Decl>("v", 3)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3784, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(decl(anyOf(recordDecl(hasName(\"::A\")).bind(\"v\"), fieldDecl().bind(\"v\"))))), new VerifyIdIsBoundTo<Decl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3781 recordDecl(hasName("::A"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(decl(anyOf(recordDecl(hasName("::A")).bind("v"), fieldDecl()
.bind("v"))))), new VerifyIdIsBoundTo<Decl>("v", 3)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3784, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(decl(anyOf(recordDecl(hasName(\"::A\")).bind(\"v\"), fieldDecl().bind(\"v\"))))), new VerifyIdIsBoundTo<Decl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3782 findAll(decl(anyOf(recordDecl(hasName("::A")).bind("v"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(decl(anyOf(recordDecl(hasName("::A")).bind("v"), fieldDecl()
.bind("v"))))), new VerifyIdIsBoundTo<Decl>("v", 3)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3784, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(decl(anyOf(recordDecl(hasName(\"::A\")).bind(\"v\"), fieldDecl().bind(\"v\"))))), new VerifyIdIsBoundTo<Decl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3783 fieldDecl().bind("v"))))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(decl(anyOf(recordDecl(hasName("::A")).bind("v"), fieldDecl()
.bind("v"))))), new VerifyIdIsBoundTo<Decl>("v", 3)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3784, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(decl(anyOf(recordDecl(hasName(\"::A\")).bind(\"v\"), fieldDecl().bind(\"v\"))))), new VerifyIdIsBoundTo<Decl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3784 new VerifyIdIsBoundTo<Decl>("v", 3)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(hasName("::A"), findAll
(decl(anyOf(recordDecl(hasName("::A")).bind("v"), fieldDecl()
.bind("v"))))), new VerifyIdIsBoundTo<Decl>("v", 3)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3784, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(hasName(\"::A\"), findAll(decl(anyOf(recordDecl(hasName(\"::A\")).bind(\"v\"), fieldDecl().bind(\"v\"))))), new VerifyIdIsBoundTo<Decl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
;
3785
3786 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B {}; class C {}; };", recordDecl(hasName(
"::A"), findAll(recordDecl(isDefinition()).bind("v"))), new VerifyIdIsBoundTo
<CXXRecordDecl>("v", 3)))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3789, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B {}; class C {}; };\", recordDecl(hasName(\"::A\"), findAll(recordDecl(isDefinition()).bind(\"v\"))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3787 "class A { class B {}; class C {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B {}; class C {}; };", recordDecl(hasName(
"::A"), findAll(recordDecl(isDefinition()).bind("v"))), new VerifyIdIsBoundTo
<CXXRecordDecl>("v", 3)))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3789, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B {}; class C {}; };\", recordDecl(hasName(\"::A\"), findAll(recordDecl(isDefinition()).bind(\"v\"))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3788 recordDecl(hasName("::A"), findAll(recordDecl(isDefinition()).bind("v"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B {}; class C {}; };", recordDecl(hasName(
"::A"), findAll(recordDecl(isDefinition()).bind("v"))), new VerifyIdIsBoundTo
<CXXRecordDecl>("v", 3)))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3789, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B {}; class C {}; };\", recordDecl(hasName(\"::A\"), findAll(recordDecl(isDefinition()).bind(\"v\"))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
3789 new VerifyIdIsBoundTo<CXXRecordDecl>("v", 3)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { class B {}; class C {}; };", recordDecl(hasName(
"::A"), findAll(recordDecl(isDefinition()).bind("v"))), new VerifyIdIsBoundTo
<CXXRecordDecl>("v", 3)))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3789, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { class B {}; class C {}; };\", recordDecl(hasName(\"::A\"), findAll(recordDecl(isDefinition()).bind(\"v\"))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"v\", 3))"
, "false", "true").c_str()) = ::testing::Message()
;
3790}
3791
3792TEST(EachOf, TriggersForEachMatch)class EachOf_TriggersForEachMatch_Test : public ::testing::Test
{ public: EachOf_TriggersForEachMatch_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); EachOf_TriggersForEachMatch_Test(EachOf_TriggersForEachMatch_Test
const &); void operator=(EachOf_TriggersForEachMatch_Test
const &);};::testing::TestInfo* const EachOf_TriggersForEachMatch_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EachOf", "TriggersForEachMatch", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< EachOf_TriggersForEachMatch_Test>);void
EachOf_TriggersForEachMatch_Test::TestBody()
{
3793 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 2)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3797, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3794 "class A { int a; int b; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 2)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3797, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3795 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 2)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3797, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3796 has(fieldDecl(hasName("b")).bind("v")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 2)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3797, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 2))"
, "false", "true").c_str()) = ::testing::Message()
3797 new VerifyIdIsBoundTo<FieldDecl>("v", 2)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 2)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3797, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 2))"
, "false", "true").c_str()) = ::testing::Message()
;
3798}
3799
3800TEST(EachOf, BehavesLikeAnyOfUnlessBothMatch)class EachOf_BehavesLikeAnyOfUnlessBothMatch_Test : public ::
testing::Test { public: EachOf_BehavesLikeAnyOfUnlessBothMatch_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); EachOf_BehavesLikeAnyOfUnlessBothMatch_Test
(EachOf_BehavesLikeAnyOfUnlessBothMatch_Test const &); void
operator=(EachOf_BehavesLikeAnyOfUnlessBothMatch_Test const &
);};::testing::TestInfo* const EachOf_BehavesLikeAnyOfUnlessBothMatch_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EachOf", "BehavesLikeAnyOfUnlessBothMatch", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< EachOf_BehavesLikeAnyOfUnlessBothMatch_Test
>);void EachOf_BehavesLikeAnyOfUnlessBothMatch_Test::TestBody
()
{
3801 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int c; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3805, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int c; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3802 "class A { int a; int c; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int c; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3805, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int c; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3803 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int c; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3805, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int c; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3804 has(fieldDecl(hasName("b")).bind("v")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int c; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3805, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int c; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3805 new VerifyIdIsBoundTo<FieldDecl>("v", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int a; int c; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3805, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int a; int c; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3806 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int c; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3810, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int c; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3807 "class A { int c; int b; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int c; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3810, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int c; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3808 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int c; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3810, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int c; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3809 has(fieldDecl(hasName("b")).bind("v")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int c; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3810, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int c; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
3810 new VerifyIdIsBoundTo<FieldDecl>("v", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class A { int c; int b; };", recordDecl(eachOf(has(fieldDecl
(hasName("a")).bind("v")), has(fieldDecl(hasName("b")).bind("v"
)))), new VerifyIdIsBoundTo<FieldDecl>("v", 1)))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3810, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class A { int c; int b; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))), new VerifyIdIsBoundTo<FieldDecl>(\"v\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
3811 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { int c; int d; };"
, recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")), has
(fieldDecl(hasName("b")).bind("v"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3814, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { int c; int d; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))))"
, "false", "true").c_str()) = ::testing::Message()
3812 "class A { int c; int d; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { int c; int d; };"
, recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")), has
(fieldDecl(hasName("b")).bind("v"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3814, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { int c; int d; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))))"
, "false", "true").c_str()) = ::testing::Message()
3813 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { int c; int d; };"
, recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")), has
(fieldDecl(hasName("b")).bind("v"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3814, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { int c; int d; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))))"
, "false", "true").c_str()) = ::testing::Message()
3814 has(fieldDecl(hasName("b")).bind("v"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { int c; int d; };"
, recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")), has
(fieldDecl(hasName("b")).bind("v"))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3814, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { int c; int d; };\", recordDecl(eachOf(has(fieldDecl(hasName(\"a\")).bind(\"v\")), has(fieldDecl(hasName(\"b\")).bind(\"v\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
3815}
3816
3817TEST(IsTemplateInstantiation, MatchesImplicitClassTemplateInstantiation)class IsTemplateInstantiation_MatchesImplicitClassTemplateInstantiation_Test
: public ::testing::Test { public: IsTemplateInstantiation_MatchesImplicitClassTemplateInstantiation_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_MatchesImplicitClassTemplateInstantiation_Test
(IsTemplateInstantiation_MatchesImplicitClassTemplateInstantiation_Test
const &); void operator=(IsTemplateInstantiation_MatchesImplicitClassTemplateInstantiation_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_MatchesImplicitClassTemplateInstantiation_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "MatchesImplicitClassTemplateInstantiation"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsTemplateInstantiation_MatchesImplicitClassTemplateInstantiation_Test
>);void IsTemplateInstantiation_MatchesImplicitClassTemplateInstantiation_Test
::TestBody()
{
3818 // Make sure that we can both match the class by name (::X) and by the type
3819 // the template was instantiated with (via a field).
3820
3821 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {}; class A {}; X<A> x;"
, cxxRecordDecl(hasName("::X"), isTemplateInstantiation()))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {}; class A {}; X<A> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3822 "template <typename T> class X {}; class A {}; X<A> x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {}; class A {}; X<A> x;"
, cxxRecordDecl(hasName("::X"), isTemplateInstantiation()))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {}; class A {}; X<A> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3823 cxxRecordDecl(hasName("::X"), isTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {}; class A {}; X<A> x;"
, cxxRecordDecl(hasName("::X"), isTemplateInstantiation()))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3823, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {}; class A {}; X<A> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3824
3825 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X { T t; }; class A {}; X<A> x;"
, cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl
(hasType(recordDecl(hasName("A"))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X { T t; }; class A {}; X<A> x;\", cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl(hasType(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3826 "template <typename T> class X { T t; }; class A {}; X<A> x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X { T t; }; class A {}; X<A> x;"
, cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl
(hasType(recordDecl(hasName("A"))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X { T t; }; class A {}; X<A> x;\", cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl(hasType(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3827 cxxRecordDecl(isTemplateInstantiation(), hasDescendant(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X { T t; }; class A {}; X<A> x;"
, cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl
(hasType(recordDecl(hasName("A"))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X { T t; }; class A {}; X<A> x;\", cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl(hasType(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3828 fieldDecl(hasType(recordDecl(hasName("A"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X { T t; }; class A {}; X<A> x;"
, cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl
(hasType(recordDecl(hasName("A"))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3828, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X { T t; }; class A {}; X<A> x;\", cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl(hasType(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3829}
3830
3831TEST(IsTemplateInstantiation, MatchesImplicitFunctionTemplateInstantiation)class IsTemplateInstantiation_MatchesImplicitFunctionTemplateInstantiation_Test
: public ::testing::Test { public: IsTemplateInstantiation_MatchesImplicitFunctionTemplateInstantiation_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_MatchesImplicitFunctionTemplateInstantiation_Test
(IsTemplateInstantiation_MatchesImplicitFunctionTemplateInstantiation_Test
const &); void operator=(IsTemplateInstantiation_MatchesImplicitFunctionTemplateInstantiation_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_MatchesImplicitFunctionTemplateInstantiation_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "MatchesImplicitFunctionTemplateInstantiation"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsTemplateInstantiation_MatchesImplicitFunctionTemplateInstantiation_Test
>);void IsTemplateInstantiation_MatchesImplicitFunctionTemplateInstantiation_Test
::TestBody()
{
3832 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> void f(T t) {} class A {}; void g() { f(A()); }"
, functionDecl(hasParameter(0, hasType(recordDecl(hasName("A"
)))), isTemplateInstantiation())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3835, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> void f(T t) {} class A {}; void g() { f(A()); }\", functionDecl(hasParameter(0, hasType(recordDecl(hasName(\"A\")))), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3833 "template <typename T> void f(T t) {} class A {}; void g() { f(A()); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> void f(T t) {} class A {}; void g() { f(A()); }"
, functionDecl(hasParameter(0, hasType(recordDecl(hasName("A"
)))), isTemplateInstantiation())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3835, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> void f(T t) {} class A {}; void g() { f(A()); }\", functionDecl(hasParameter(0, hasType(recordDecl(hasName(\"A\")))), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3834 functionDecl(hasParameter(0, hasType(recordDecl(hasName("A")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> void f(T t) {} class A {}; void g() { f(A()); }"
, functionDecl(hasParameter(0, hasType(recordDecl(hasName("A"
)))), isTemplateInstantiation())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3835, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> void f(T t) {} class A {}; void g() { f(A()); }\", functionDecl(hasParameter(0, hasType(recordDecl(hasName(\"A\")))), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3835 isTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> void f(T t) {} class A {}; void g() { f(A()); }"
, functionDecl(hasParameter(0, hasType(recordDecl(hasName("A"
)))), isTemplateInstantiation())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3835, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> void f(T t) {} class A {}; void g() { f(A()); }\", functionDecl(hasParameter(0, hasType(recordDecl(hasName(\"A\")))), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3836}
3837
3838TEST(IsTemplateInstantiation, MatchesExplicitClassTemplateInstantiation)class IsTemplateInstantiation_MatchesExplicitClassTemplateInstantiation_Test
: public ::testing::Test { public: IsTemplateInstantiation_MatchesExplicitClassTemplateInstantiation_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_MatchesExplicitClassTemplateInstantiation_Test
(IsTemplateInstantiation_MatchesExplicitClassTemplateInstantiation_Test
const &); void operator=(IsTemplateInstantiation_MatchesExplicitClassTemplateInstantiation_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_MatchesExplicitClassTemplateInstantiation_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "MatchesExplicitClassTemplateInstantiation"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsTemplateInstantiation_MatchesExplicitClassTemplateInstantiation_Test
>);void IsTemplateInstantiation_MatchesExplicitClassTemplateInstantiation_Test
::TestBody()
{
3839 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X { T t; }; class A {};"
"template class X<A>;", cxxRecordDecl(isTemplateInstantiation
(), hasDescendant( fieldDecl(hasType(recordDecl(hasName("A"))
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3843, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X { T t; }; class A {};\" \"template class X<A>;\", cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl(hasType(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3840 "template <typename T> class X { T t; }; class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X { T t; }; class A {};"
"template class X<A>;", cxxRecordDecl(isTemplateInstantiation
(), hasDescendant( fieldDecl(hasType(recordDecl(hasName("A"))
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3843, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X { T t; }; class A {};\" \"template class X<A>;\", cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl(hasType(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3841 "template class X<A>;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X { T t; }; class A {};"
"template class X<A>;", cxxRecordDecl(isTemplateInstantiation
(), hasDescendant( fieldDecl(hasType(recordDecl(hasName("A"))
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3843, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X { T t; }; class A {};\" \"template class X<A>;\", cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl(hasType(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3842 cxxRecordDecl(isTemplateInstantiation(), hasDescendant(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X { T t; }; class A {};"
"template class X<A>;", cxxRecordDecl(isTemplateInstantiation
(), hasDescendant( fieldDecl(hasType(recordDecl(hasName("A"))
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3843, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X { T t; }; class A {};\" \"template class X<A>;\", cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl(hasType(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
3843 fieldDecl(hasType(recordDecl(hasName("A"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X { T t; }; class A {};"
"template class X<A>;", cxxRecordDecl(isTemplateInstantiation
(), hasDescendant( fieldDecl(hasType(recordDecl(hasName("A"))
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3843, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X { T t; }; class A {};\" \"template class X<A>;\", cxxRecordDecl(isTemplateInstantiation(), hasDescendant( fieldDecl(hasType(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
3844}
3845
3846TEST(IsTemplateInstantiation,class IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
: public ::testing::Test { public: IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
(IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
const &); void operator=(IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "MatchesInstantiationOfPartiallySpecializedClassTemplate"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
>);void IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
::TestBody()
3847 MatchesInstantiationOfPartiallySpecializedClassTemplate)class IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
: public ::testing::Test { public: IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
(IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
const &); void operator=(IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "MatchesInstantiationOfPartiallySpecializedClassTemplate"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
>);void IsTemplateInstantiation_MatchesInstantiationOfPartiallySpecializedClassTemplate_Test
::TestBody()
{
3848 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {};"
"template <typename T> class X<T*> {}; class A {}; X<A*> x;"
, cxxRecordDecl(hasName("::X"), isTemplateInstantiation()))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3851, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {};\" \"template <typename T> class X<T*> {}; class A {}; X<A*> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3849 "template <typename T> class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {};"
"template <typename T> class X<T*> {}; class A {}; X<A*> x;"
, cxxRecordDecl(hasName("::X"), isTemplateInstantiation()))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3851, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {};\" \"template <typename T> class X<T*> {}; class A {}; X<A*> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3850 "template <typename T> class X<T*> {}; class A {}; X<A*> x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {};"
"template <typename T> class X<T*> {}; class A {}; X<A*> x;"
, cxxRecordDecl(hasName("::X"), isTemplateInstantiation()))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3851, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {};\" \"template <typename T> class X<T*> {}; class A {}; X<A*> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3851 cxxRecordDecl(hasName("::X"), isTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {};"
"template <typename T> class X<T*> {}; class A {}; X<A*> x;"
, cxxRecordDecl(hasName("::X"), isTemplateInstantiation()))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3851, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {};\" \"template <typename T> class X<T*> {}; class A {}; X<A*> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3852}
3853
3854TEST(IsTemplateInstantiation,class IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
: public ::testing::Test { public: IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
(IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
const &); void operator=(IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "MatchesInstantiationOfClassTemplateNestedInNonTemplate"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
>);void IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
::TestBody()
3855 MatchesInstantiationOfClassTemplateNestedInNonTemplate)class IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
: public ::testing::Test { public: IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
(IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
const &); void operator=(IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "MatchesInstantiationOfClassTemplateNestedInNonTemplate"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
>);void IsTemplateInstantiation_MatchesInstantiationOfClassTemplateNestedInNonTemplate_Test
::TestBody()
{
3856 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"class X {" " template <typename U> class Y { U u; };"
" Y<A> y;" "};", cxxRecordDecl(hasName("::X::Y"), isTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3862, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"class X {\" \" template <typename U> class Y { U u; };\" \" Y<A> y;\" \"};\", cxxRecordDecl(hasName(\"::X::Y\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3857 "class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"class X {" " template <typename U> class Y { U u; };"
" Y<A> y;" "};", cxxRecordDecl(hasName("::X::Y"), isTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3862, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"class X {\" \" template <typename U> class Y { U u; };\" \" Y<A> y;\" \"};\", cxxRecordDecl(hasName(\"::X::Y\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3858 "class X {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"class X {" " template <typename U> class Y { U u; };"
" Y<A> y;" "};", cxxRecordDecl(hasName("::X::Y"), isTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3862, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"class X {\" \" template <typename U> class Y { U u; };\" \" Y<A> y;\" \"};\", cxxRecordDecl(hasName(\"::X::Y\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3859 " template <typename U> class Y { U u; };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"class X {" " template <typename U> class Y { U u; };"
" Y<A> y;" "};", cxxRecordDecl(hasName("::X::Y"), isTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3862, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"class X {\" \" template <typename U> class Y { U u; };\" \" Y<A> y;\" \"};\", cxxRecordDecl(hasName(\"::X::Y\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3860 " Y<A> y;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"class X {" " template <typename U> class Y { U u; };"
" Y<A> y;" "};", cxxRecordDecl(hasName("::X::Y"), isTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3862, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"class X {\" \" template <typename U> class Y { U u; };\" \" Y<A> y;\" \"};\", cxxRecordDecl(hasName(\"::X::Y\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3861 "};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"class X {" " template <typename U> class Y { U u; };"
" Y<A> y;" "};", cxxRecordDecl(hasName("::X::Y"), isTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3862, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"class X {\" \" template <typename U> class Y { U u; };\" \" Y<A> y;\" \"};\", cxxRecordDecl(hasName(\"::X::Y\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3862 cxxRecordDecl(hasName("::X::Y"), isTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"class X {" " template <typename U> class Y { U u; };"
" Y<A> y;" "};", cxxRecordDecl(hasName("::X::Y"), isTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3862, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"class X {\" \" template <typename U> class Y { U u; };\" \" Y<A> y;\" \"};\", cxxRecordDecl(hasName(\"::X::Y\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3863}
3864
3865TEST(IsTemplateInstantiation, DoesNotMatchInstantiationsInsideOfInstantiation)class IsTemplateInstantiation_DoesNotMatchInstantiationsInsideOfInstantiation_Test
: public ::testing::Test { public: IsTemplateInstantiation_DoesNotMatchInstantiationsInsideOfInstantiation_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_DoesNotMatchInstantiationsInsideOfInstantiation_Test
(IsTemplateInstantiation_DoesNotMatchInstantiationsInsideOfInstantiation_Test
const &); void operator=(IsTemplateInstantiation_DoesNotMatchInstantiationsInsideOfInstantiation_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_DoesNotMatchInstantiationsInsideOfInstantiation_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "DoesNotMatchInstantiationsInsideOfInstantiation"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsTemplateInstantiation_DoesNotMatchInstantiationsInsideOfInstantiation_Test
>);void IsTemplateInstantiation_DoesNotMatchInstantiationsInsideOfInstantiation_Test
::TestBody()
{
3866 // FIXME: Figure out whether this makes sense. It doesn't affect the
3867 // normal use case as long as the uppermost instantiation always is marked
3868 // as template instantiation, but it might be confusing as a predicate.
3869 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"template <typename T> class X {" " template <typename U> class Y { U u; };"
" Y<T> y;" "}; X<A> x;", cxxRecordDecl(hasName(
"::X<A>::Y"), unless(isTemplateInstantiation()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3875, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"template <typename T> class X {\" \" template <typename U> class Y { U u; };\" \" Y<T> y;\" \"}; X<A> x;\", cxxRecordDecl(hasName(\"::X<A>::Y\"), unless(isTemplateInstantiation())))"
, "false", "true").c_str()) = ::testing::Message()
3870 "class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"template <typename T> class X {" " template <typename U> class Y { U u; };"
" Y<T> y;" "}; X<A> x;", cxxRecordDecl(hasName(
"::X<A>::Y"), unless(isTemplateInstantiation()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3875, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"template <typename T> class X {\" \" template <typename U> class Y { U u; };\" \" Y<T> y;\" \"}; X<A> x;\", cxxRecordDecl(hasName(\"::X<A>::Y\"), unless(isTemplateInstantiation())))"
, "false", "true").c_str()) = ::testing::Message()
3871 "template <typename T> class X {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"template <typename T> class X {" " template <typename U> class Y { U u; };"
" Y<T> y;" "}; X<A> x;", cxxRecordDecl(hasName(
"::X<A>::Y"), unless(isTemplateInstantiation()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3875, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"template <typename T> class X {\" \" template <typename U> class Y { U u; };\" \" Y<T> y;\" \"}; X<A> x;\", cxxRecordDecl(hasName(\"::X<A>::Y\"), unless(isTemplateInstantiation())))"
, "false", "true").c_str()) = ::testing::Message()
3872 " template <typename U> class Y { U u; };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"template <typename T> class X {" " template <typename U> class Y { U u; };"
" Y<T> y;" "}; X<A> x;", cxxRecordDecl(hasName(
"::X<A>::Y"), unless(isTemplateInstantiation()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3875, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"template <typename T> class X {\" \" template <typename U> class Y { U u; };\" \" Y<T> y;\" \"}; X<A> x;\", cxxRecordDecl(hasName(\"::X<A>::Y\"), unless(isTemplateInstantiation())))"
, "false", "true").c_str()) = ::testing::Message()
3873 " Y<T> y;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"template <typename T> class X {" " template <typename U> class Y { U u; };"
" Y<T> y;" "}; X<A> x;", cxxRecordDecl(hasName(
"::X<A>::Y"), unless(isTemplateInstantiation()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3875, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"template <typename T> class X {\" \" template <typename U> class Y { U u; };\" \" Y<T> y;\" \"}; X<A> x;\", cxxRecordDecl(hasName(\"::X<A>::Y\"), unless(isTemplateInstantiation())))"
, "false", "true").c_str()) = ::testing::Message()
3874 "}; X<A> x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"template <typename T> class X {" " template <typename U> class Y { U u; };"
" Y<T> y;" "}; X<A> x;", cxxRecordDecl(hasName(
"::X<A>::Y"), unless(isTemplateInstantiation()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3875, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"template <typename T> class X {\" \" template <typename U> class Y { U u; };\" \" Y<T> y;\" \"}; X<A> x;\", cxxRecordDecl(hasName(\"::X<A>::Y\"), unless(isTemplateInstantiation())))"
, "false", "true").c_str()) = ::testing::Message()
3875 cxxRecordDecl(hasName("::X<A>::Y"), unless(isTemplateInstantiation()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A {};"
"template <typename T> class X {" " template <typename U> class Y { U u; };"
" Y<T> y;" "}; X<A> x;", cxxRecordDecl(hasName(
"::X<A>::Y"), unless(isTemplateInstantiation()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3875, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A {};\" \"template <typename T> class X {\" \" template <typename U> class Y { U u; };\" \" Y<T> y;\" \"}; X<A> x;\", cxxRecordDecl(hasName(\"::X<A>::Y\"), unless(isTemplateInstantiation())))"
, "false", "true").c_str()) = ::testing::Message()
;
3876}
3877
3878TEST(IsTemplateInstantiation, DoesNotMatchExplicitClassTemplateSpecialization)class IsTemplateInstantiation_DoesNotMatchExplicitClassTemplateSpecialization_Test
: public ::testing::Test { public: IsTemplateInstantiation_DoesNotMatchExplicitClassTemplateSpecialization_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_DoesNotMatchExplicitClassTemplateSpecialization_Test
(IsTemplateInstantiation_DoesNotMatchExplicitClassTemplateSpecialization_Test
const &); void operator=(IsTemplateInstantiation_DoesNotMatchExplicitClassTemplateSpecialization_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_DoesNotMatchExplicitClassTemplateSpecialization_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "DoesNotMatchExplicitClassTemplateSpecialization"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsTemplateInstantiation_DoesNotMatchExplicitClassTemplateSpecialization_Test
>);void IsTemplateInstantiation_DoesNotMatchExplicitClassTemplateSpecialization_Test
::TestBody()
{
3879 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {}; class A {};"
"template <> class X<A> {}; X<A> x;", cxxRecordDecl
(hasName("::X"), isTemplateInstantiation())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3882, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {}; class A {};\" \"template <> class X<A> {}; X<A> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3880 "template <typename T> class X {}; class A {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {}; class A {};"
"template <> class X<A> {}; X<A> x;", cxxRecordDecl
(hasName("::X"), isTemplateInstantiation())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3882, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {}; class A {};\" \"template <> class X<A> {}; X<A> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3881 "template <> class X<A> {}; X<A> x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {}; class A {};"
"template <> class X<A> {}; X<A> x;", cxxRecordDecl
(hasName("::X"), isTemplateInstantiation())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3882, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {}; class A {};\" \"template <> class X<A> {}; X<A> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3882 cxxRecordDecl(hasName("::X"), isTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {}; class A {};"
"template <> class X<A> {}; X<A> x;", cxxRecordDecl
(hasName("::X"), isTemplateInstantiation())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3882, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {}; class A {};\" \"template <> class X<A> {}; X<A> x;\", cxxRecordDecl(hasName(\"::X\"), isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3883}
3884
3885TEST(IsTemplateInstantiation, DoesNotMatchNonTemplate)class IsTemplateInstantiation_DoesNotMatchNonTemplate_Test : public
::testing::Test { public: IsTemplateInstantiation_DoesNotMatchNonTemplate_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsTemplateInstantiation_DoesNotMatchNonTemplate_Test
(IsTemplateInstantiation_DoesNotMatchNonTemplate_Test const &
); void operator=(IsTemplateInstantiation_DoesNotMatchNonTemplate_Test
const &);};::testing::TestInfo* const IsTemplateInstantiation_DoesNotMatchNonTemplate_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsTemplateInstantiation", "DoesNotMatchNonTemplate", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< IsTemplateInstantiation_DoesNotMatchNonTemplate_Test
>);void IsTemplateInstantiation_DoesNotMatchNonTemplate_Test
::TestBody()
{
3886 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A {}; class Y { A a; };"
, cxxRecordDecl(isTemplateInstantiation())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3888, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A {}; class Y { A a; };\", cxxRecordDecl(isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3887 "class A {}; class Y { A a; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A {}; class Y { A a; };"
, cxxRecordDecl(isTemplateInstantiation())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3888, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A {}; class Y { A a; };\", cxxRecordDecl(isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3888 cxxRecordDecl(isTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A {}; class Y { A a; };"
, cxxRecordDecl(isTemplateInstantiation())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3888, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A {}; class Y { A a; };\", cxxRecordDecl(isTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3889}
3890
3891TEST(IsInstantiated, MatchesInstantiation)class IsInstantiated_MatchesInstantiation_Test : public ::testing
::Test { public: IsInstantiated_MatchesInstantiation_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsInstantiated_MatchesInstantiation_Test
(IsInstantiated_MatchesInstantiation_Test const &); void operator
=(IsInstantiated_MatchesInstantiation_Test const &);};::testing
::TestInfo* const IsInstantiated_MatchesInstantiation_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "IsInstantiated"
, "MatchesInstantiation", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< IsInstantiated_MatchesInstantiation_Test>);void IsInstantiated_MatchesInstantiation_Test
::TestBody()
{
3892 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> class A { T i; }; class Y { A<int> a; };"
, cxxRecordDecl(isInstantiated())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3894, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> class A { T i; }; class Y { A<int> a; };\", cxxRecordDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
3893 matches("template<typename T> class A { T i; }; class Y { A<int> a; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> class A { T i; }; class Y { A<int> a; };"
, cxxRecordDecl(isInstantiated())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3894, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> class A { T i; }; class Y { A<int> a; };\", cxxRecordDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
3894 cxxRecordDecl(isInstantiated())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> class A { T i; }; class Y { A<int> a; };"
, cxxRecordDecl(isInstantiated())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3894, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> class A { T i; }; class Y { A<int> a; };\", cxxRecordDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
;
3895}
3896
3897TEST(IsInstantiated, NotMatchesDefinition)class IsInstantiated_NotMatchesDefinition_Test : public ::testing
::Test { public: IsInstantiated_NotMatchesDefinition_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsInstantiated_NotMatchesDefinition_Test
(IsInstantiated_NotMatchesDefinition_Test const &); void operator
=(IsInstantiated_NotMatchesDefinition_Test const &);};::testing
::TestInfo* const IsInstantiated_NotMatchesDefinition_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "IsInstantiated"
, "NotMatchesDefinition", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< IsInstantiated_NotMatchesDefinition_Test>);void IsInstantiated_NotMatchesDefinition_Test
::TestBody()
{
3898 EXPECT_TRUE(notMatches("template<typename T> class A { T i; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> class A { T i; };"
, cxxRecordDecl(isInstantiated())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3899, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> class A { T i; };\", cxxRecordDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
3899 cxxRecordDecl(isInstantiated())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> class A { T i; };"
, cxxRecordDecl(isInstantiated())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3899, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> class A { T i; };\", cxxRecordDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
;
3900}
3901
3902TEST(IsInTemplateInstantiation, MatchesInstantiationStmt)class IsInTemplateInstantiation_MatchesInstantiationStmt_Test
: public ::testing::Test { public: IsInTemplateInstantiation_MatchesInstantiationStmt_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsInTemplateInstantiation_MatchesInstantiationStmt_Test
(IsInTemplateInstantiation_MatchesInstantiationStmt_Test const
&); void operator=(IsInTemplateInstantiation_MatchesInstantiationStmt_Test
const &);};::testing::TestInfo* const IsInTemplateInstantiation_MatchesInstantiationStmt_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsInTemplateInstantiation", "MatchesInstantiationStmt", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< IsInTemplateInstantiation_MatchesInstantiationStmt_Test
>);void IsInTemplateInstantiation_MatchesInstantiationStmt_Test
::TestBody()
{
3903 EXPECT_TRUE(matches("template<typename T> struct A { A() { T i; } };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct A { A() { T i; } };"
"class Y { A<int> a; }; Y y;", declStmt(isInTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3905, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct A { A() { T i; } };\" \"class Y { A<int> a; }; Y y;\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3904 "class Y { A<int> a; }; Y y;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct A { A() { T i; } };"
"class Y { A<int> a; }; Y y;", declStmt(isInTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3905, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct A { A() { T i; } };\" \"class Y { A<int> a; }; Y y;\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3905 declStmt(isInTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> struct A { A() { T i; } };"
"class Y { A<int> a; }; Y y;", declStmt(isInTemplateInstantiation
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3905, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> struct A { A() { T i; } };\" \"class Y { A<int> a; }; Y y;\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3906}
3907
3908TEST(IsInTemplateInstantiation, NotMatchesDefinitionStmt)class IsInTemplateInstantiation_NotMatchesDefinitionStmt_Test
: public ::testing::Test { public: IsInTemplateInstantiation_NotMatchesDefinitionStmt_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsInTemplateInstantiation_NotMatchesDefinitionStmt_Test
(IsInTemplateInstantiation_NotMatchesDefinitionStmt_Test const
&); void operator=(IsInTemplateInstantiation_NotMatchesDefinitionStmt_Test
const &);};::testing::TestInfo* const IsInTemplateInstantiation_NotMatchesDefinitionStmt_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsInTemplateInstantiation", "NotMatchesDefinitionStmt", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< IsInTemplateInstantiation_NotMatchesDefinitionStmt_Test
>);void IsInTemplateInstantiation_NotMatchesDefinitionStmt_Test
::TestBody()
{
3909 EXPECT_TRUE(notMatches("template<typename T> struct A { void x() { T i; } };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct A { void x() { T i; } };"
, declStmt(isInTemplateInstantiation())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3910, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct A { void x() { T i; } };\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3910 declStmt(isInTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> struct A { void x() { T i; } };"
, declStmt(isInTemplateInstantiation())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3910, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> struct A { void x() { T i; } };\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3911}
3912
3913TEST(IsInstantiated, MatchesFunctionInstantiation)class IsInstantiated_MatchesFunctionInstantiation_Test : public
::testing::Test { public: IsInstantiated_MatchesFunctionInstantiation_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsInstantiated_MatchesFunctionInstantiation_Test
(IsInstantiated_MatchesFunctionInstantiation_Test const &
); void operator=(IsInstantiated_MatchesFunctionInstantiation_Test
const &);};::testing::TestInfo* const IsInstantiated_MatchesFunctionInstantiation_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsInstantiated", "MatchesFunctionInstantiation", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsInstantiated_MatchesFunctionInstantiation_Test
>);void IsInstantiated_MatchesFunctionInstantiation_Test::
TestBody()
{
3914 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> void A(T t) { T i; } void x() { A(0); }"
, functionDecl(isInstantiated())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3916, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> void A(T t) { T i; } void x() { A(0); }\", functionDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
3915 matches("template<typename T> void A(T t) { T i; } void x() { A(0); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> void A(T t) { T i; } void x() { A(0); }"
, functionDecl(isInstantiated())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3916, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> void A(T t) { T i; } void x() { A(0); }\", functionDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
3916 functionDecl(isInstantiated())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> void A(T t) { T i; } void x() { A(0); }"
, functionDecl(isInstantiated())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3916, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> void A(T t) { T i; } void x() { A(0); }\", functionDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
;
3917}
3918
3919TEST(IsInstantiated, NotMatchesFunctionDefinition)class IsInstantiated_NotMatchesFunctionDefinition_Test : public
::testing::Test { public: IsInstantiated_NotMatchesFunctionDefinition_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsInstantiated_NotMatchesFunctionDefinition_Test
(IsInstantiated_NotMatchesFunctionDefinition_Test const &
); void operator=(IsInstantiated_NotMatchesFunctionDefinition_Test
const &);};::testing::TestInfo* const IsInstantiated_NotMatchesFunctionDefinition_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsInstantiated", "NotMatchesFunctionDefinition", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< IsInstantiated_NotMatchesFunctionDefinition_Test
>);void IsInstantiated_NotMatchesFunctionDefinition_Test::
TestBody()
{
3920 EXPECT_TRUE(notMatches("template<typename T> void A(T t) { T i; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> void A(T t) { T i; }"
, varDecl(isInstantiated())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3921, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> void A(T t) { T i; }\", varDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
3921 varDecl(isInstantiated())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> void A(T t) { T i; }"
, varDecl(isInstantiated())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3921, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> void A(T t) { T i; }\", varDecl(isInstantiated()))"
, "false", "true").c_str()) = ::testing::Message()
;
3922}
3923
3924TEST(IsInTemplateInstantiation, MatchesFunctionInstantiationStmt)class IsInTemplateInstantiation_MatchesFunctionInstantiationStmt_Test
: public ::testing::Test { public: IsInTemplateInstantiation_MatchesFunctionInstantiationStmt_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsInTemplateInstantiation_MatchesFunctionInstantiationStmt_Test
(IsInTemplateInstantiation_MatchesFunctionInstantiationStmt_Test
const &); void operator=(IsInTemplateInstantiation_MatchesFunctionInstantiationStmt_Test
const &);};::testing::TestInfo* const IsInTemplateInstantiation_MatchesFunctionInstantiationStmt_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsInTemplateInstantiation", "MatchesFunctionInstantiationStmt"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsInTemplateInstantiation_MatchesFunctionInstantiationStmt_Test
>);void IsInTemplateInstantiation_MatchesFunctionInstantiationStmt_Test
::TestBody()
{
3925 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> void A(T t) { T i; } void x() { A(0); }"
, declStmt(isInTemplateInstantiation())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3927, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> void A(T t) { T i; } void x() { A(0); }\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3926 matches("template<typename T> void A(T t) { T i; } void x() { A(0); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> void A(T t) { T i; } void x() { A(0); }"
, declStmt(isInTemplateInstantiation())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3927, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> void A(T t) { T i; } void x() { A(0); }\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3927 declStmt(isInTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template<typename T> void A(T t) { T i; } void x() { A(0); }"
, declStmt(isInTemplateInstantiation())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3927, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template<typename T> void A(T t) { T i; } void x() { A(0); }\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3928}
3929
3930TEST(IsInTemplateInstantiation, NotMatchesFunctionDefinitionStmt)class IsInTemplateInstantiation_NotMatchesFunctionDefinitionStmt_Test
: public ::testing::Test { public: IsInTemplateInstantiation_NotMatchesFunctionDefinitionStmt_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsInTemplateInstantiation_NotMatchesFunctionDefinitionStmt_Test
(IsInTemplateInstantiation_NotMatchesFunctionDefinitionStmt_Test
const &); void operator=(IsInTemplateInstantiation_NotMatchesFunctionDefinitionStmt_Test
const &);};::testing::TestInfo* const IsInTemplateInstantiation_NotMatchesFunctionDefinitionStmt_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsInTemplateInstantiation", "NotMatchesFunctionDefinitionStmt"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsInTemplateInstantiation_NotMatchesFunctionDefinitionStmt_Test
>);void IsInTemplateInstantiation_NotMatchesFunctionDefinitionStmt_Test
::TestBody()
{
3931 EXPECT_TRUE(notMatches("template<typename T> void A(T t) { T i; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> void A(T t) { T i; }"
, declStmt(isInTemplateInstantiation())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3932, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> void A(T t) { T i; }\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
3932 declStmt(isInTemplateInstantiation())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template<typename T> void A(T t) { T i; }"
, declStmt(isInTemplateInstantiation())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3932, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template<typename T> void A(T t) { T i; }\", declStmt(isInTemplateInstantiation()))"
, "false", "true").c_str()) = ::testing::Message()
;
3933}
3934
3935TEST(IsInTemplateInstantiation, Sharing)class IsInTemplateInstantiation_Sharing_Test : public ::testing
::Test { public: IsInTemplateInstantiation_Sharing_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); IsInTemplateInstantiation_Sharing_Test
(IsInTemplateInstantiation_Sharing_Test const &); void operator
=(IsInTemplateInstantiation_Sharing_Test const &);};::testing
::TestInfo* const IsInTemplateInstantiation_Sharing_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "IsInTemplateInstantiation"
, "Sharing", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< IsInTemplateInstantiation_Sharing_Test
>);void IsInTemplateInstantiation_Sharing_Test::TestBody()
{
3936 auto Matcher = binaryOperator(unless(isInTemplateInstantiation()));
3937 // FIXME: Node sharing is an implementation detail, exposing it is ugly
3938 // and makes the matcher behave in non-obvious ways.
3939 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int j; template<typename T> void A(T t) { j += 42; } void x() { A(0); }"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3941, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int j; template<typename T> void A(T t) { j += 42; } void x() { A(0); }\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
3940 "int j; template<typename T> void A(T t) { j += 42; } void x() { A(0); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int j; template<typename T> void A(T t) { j += 42; } void x() { A(0); }"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3941, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int j; template<typename T> void A(T t) { j += 42; } void x() { A(0); }\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
3941 Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int j; template<typename T> void A(T t) { j += 42; } void x() { A(0); }"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3941, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int j; template<typename T> void A(T t) { j += 42; } void x() { A(0); }\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
;
3942 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int j; template<typename T> void A(T t) { j += t; } void x() { A(0); }"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3944, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int j; template<typename T> void A(T t) { j += t; } void x() { A(0); }\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
3943 "int j; template<typename T> void A(T t) { j += t; } void x() { A(0); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int j; template<typename T> void A(T t) { j += t; } void x() { A(0); }"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3944, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int j; template<typename T> void A(T t) { j += t; } void x() { A(0); }\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
3944 Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int j; template<typename T> void A(T t) { j += t; } void x() { A(0); }"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3944, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int j; template<typename T> void A(T t) { j += t; } void x() { A(0); }\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
;
3945}
3946
3947TEST(IsExplicitTemplateSpecialization,class IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
: public ::testing::Test { public: IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
(IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
const &); void operator=(IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
const &);};::testing::TestInfo* const IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsExplicitTemplateSpecialization", "DoesNotMatchPrimaryTemplate"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
>);void IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
::TestBody()
3948 DoesNotMatchPrimaryTemplate)class IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
: public ::testing::Test { public: IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
(IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
const &); void operator=(IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
const &);};::testing::TestInfo* const IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsExplicitTemplateSpecialization", "DoesNotMatchPrimaryTemplate"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
>);void IsExplicitTemplateSpecialization_DoesNotMatchPrimaryTemplate_Test
::TestBody()
{
3949 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {};"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3951, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {};\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3950 "template <typename T> class X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {};"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3951, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {};\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3951 cxxRecordDecl(isExplicitTemplateSpecialization())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {};"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3951, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {};\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
;
3952 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t);"
, functionDecl(isExplicitTemplateSpecialization())))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3954, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t);\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3953 "template <typename T> void f(T t);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t);"
, functionDecl(isExplicitTemplateSpecialization())))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3954, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t);\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3954 functionDecl(isExplicitTemplateSpecialization())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t);"
, functionDecl(isExplicitTemplateSpecialization())))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3954, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t);\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
;
3955}
3956
3957TEST(IsExplicitTemplateSpecialization,class IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
: public ::testing::Test { public: IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
(IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
const &); void operator=(IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
const &);};::testing::TestInfo* const IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsExplicitTemplateSpecialization", "DoesNotMatchExplicitTemplateInstantiations"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
>);void IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
::TestBody()
3958 DoesNotMatchExplicitTemplateInstantiations)class IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
: public ::testing::Test { public: IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
(IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
const &); void operator=(IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
const &);};::testing::TestInfo* const IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsExplicitTemplateSpecialization", "DoesNotMatchExplicitTemplateInstantiations"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
>);void IsExplicitTemplateSpecialization_DoesNotMatchExplicitTemplateInstantiations_Test
::TestBody()
{
3959 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {};"
"template class X<int>; extern template class X<long>;"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3962, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {};\" \"template class X<int>; extern template class X<long>;\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3960 "template <typename T> class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {};"
"template class X<int>; extern template class X<long>;"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3962, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {};\" \"template class X<int>; extern template class X<long>;\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3961 "template class X<int>; extern template class X<long>;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {};"
"template class X<int>; extern template class X<long>;"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3962, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {};\" \"template class X<int>; extern template class X<long>;\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3962 cxxRecordDecl(isExplicitTemplateSpecialization())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {};"
"template class X<int>; extern template class X<long>;"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3962, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {};\" \"template class X<int>; extern template class X<long>;\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
;
3963 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t) {}"
"template void f(int t); extern template void f(long t);", functionDecl
(isExplicitTemplateSpecialization())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3966, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t) {}\" \"template void f(int t); extern template void f(long t);\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3964 "template <typename T> void f(T t) {}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t) {}"
"template void f(int t); extern template void f(long t);", functionDecl
(isExplicitTemplateSpecialization())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3966, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t) {}\" \"template void f(int t); extern template void f(long t);\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3965 "template void f(int t); extern template void f(long t);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t) {}"
"template void f(int t); extern template void f(long t);", functionDecl
(isExplicitTemplateSpecialization())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3966, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t) {}\" \"template void f(int t); extern template void f(long t);\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3966 functionDecl(isExplicitTemplateSpecialization())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t) {}"
"template void f(int t); extern template void f(long t);", functionDecl
(isExplicitTemplateSpecialization())))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3966, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t) {}\" \"template void f(int t); extern template void f(long t);\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
;
3967}
3968
3969TEST(IsExplicitTemplateSpecialization,class IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
: public ::testing::Test { public: IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
(IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
const &); void operator=(IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
const &);};::testing::TestInfo* const IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsExplicitTemplateSpecialization", "DoesNotMatchImplicitTemplateInstantiations"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
>);void IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
::TestBody()
3970 DoesNotMatchImplicitTemplateInstantiations)class IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
: public ::testing::Test { public: IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
(IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
const &); void operator=(IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
const &);};::testing::TestInfo* const IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsExplicitTemplateSpecialization", "DoesNotMatchImplicitTemplateInstantiations"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
>);void IsExplicitTemplateSpecialization_DoesNotMatchImplicitTemplateInstantiations_Test
::TestBody()
{
3971 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {}; X<int> x;"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3973, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {}; X<int> x;\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3972 "template <typename T> class X {}; X<int> x;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {}; X<int> x;"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3973, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {}; X<int> x;\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3973 cxxRecordDecl(isExplicitTemplateSpecialization())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> class X {}; X<int> x;"
, cxxRecordDecl(isExplicitTemplateSpecialization())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3973, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> class X {}; X<int> x;\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
;
3974 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t); void g() { f(10); }"
, functionDecl(isExplicitTemplateSpecialization())))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3976, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t); void g() { f(10); }\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3975 "template <typename T> void f(T t); void g() { f(10); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t); void g() { f(10); }"
, functionDecl(isExplicitTemplateSpecialization())))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3976, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t); void g() { f(10); }\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3976 functionDecl(isExplicitTemplateSpecialization())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "template <typename T> void f(T t); void g() { f(10); }"
, functionDecl(isExplicitTemplateSpecialization())))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3976, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"template <typename T> void f(T t); void g() { f(10); }\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
;
3977}
3978
3979TEST(IsExplicitTemplateSpecialization,class IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
: public ::testing::Test { public: IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
(IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
const &); void operator=(IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
const &);};::testing::TestInfo* const IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsExplicitTemplateSpecialization", "MatchesExplicitTemplateSpecializations"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
>);void IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
::TestBody()
3980 MatchesExplicitTemplateSpecializations)class IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
: public ::testing::Test { public: IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
(IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
const &); void operator=(IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
const &);};::testing::TestInfo* const IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsExplicitTemplateSpecialization", "MatchesExplicitTemplateSpecializations"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
>);void IsExplicitTemplateSpecialization_MatchesExplicitTemplateSpecializations_Test
::TestBody()
{
3981 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {};"
"template<> class X<int> {};", cxxRecordDecl(isExplicitTemplateSpecialization
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3984, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {};\" \"template<> class X<int> {};\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3982 "template <typename T> class X {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {};"
"template<> class X<int> {};", cxxRecordDecl(isExplicitTemplateSpecialization
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3984, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {};\" \"template<> class X<int> {};\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3983 "template<> class X<int> {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {};"
"template<> class X<int> {};", cxxRecordDecl(isExplicitTemplateSpecialization
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3984, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {};\" \"template<> class X<int> {};\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3984 cxxRecordDecl(isExplicitTemplateSpecialization())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> class X {};"
"template<> class X<int> {};", cxxRecordDecl(isExplicitTemplateSpecialization
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3984, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> class X {};\" \"template<> class X<int> {};\", cxxRecordDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
;
3985 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> void f(T t) {}"
"template<> void f(int t) {}", functionDecl(isExplicitTemplateSpecialization
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3988, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> void f(T t) {}\" \"template<> void f(int t) {}\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3986 "template <typename T> void f(T t) {}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> void f(T t) {}"
"template<> void f(int t) {}", functionDecl(isExplicitTemplateSpecialization
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3988, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> void f(T t) {}\" \"template<> void f(int t) {}\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3987 "template<> void f(int t) {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> void f(T t) {}"
"template<> void f(int t) {}", functionDecl(isExplicitTemplateSpecialization
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3988, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> void f(T t) {}\" \"template<> void f(int t) {}\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
3988 functionDecl(isExplicitTemplateSpecialization())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> void f(T t) {}"
"template<> void f(int t) {}", functionDecl(isExplicitTemplateSpecialization
())))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3988, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> void f(T t) {}\" \"template<> void f(int t) {}\", functionDecl(isExplicitTemplateSpecialization()))"
, "false", "true").c_str()) = ::testing::Message()
;
3989}
3990
3991TEST(HasAncenstor, MatchesDeclarationAncestors)class HasAncenstor_MatchesDeclarationAncestors_Test : public ::
testing::Test { public: HasAncenstor_MatchesDeclarationAncestors_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAncenstor_MatchesDeclarationAncestors_Test
(HasAncenstor_MatchesDeclarationAncestors_Test const &); void
operator=(HasAncenstor_MatchesDeclarationAncestors_Test const
&);};::testing::TestInfo* const HasAncenstor_MatchesDeclarationAncestors_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAncenstor", "MatchesDeclarationAncestors", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAncenstor_MatchesDeclarationAncestors_Test
>);void HasAncenstor_MatchesDeclarationAncestors_Test::TestBody
()
{
3992 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { class B { class C {}; }; };"
, recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("A"
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3994, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
3993 "class A { class B { class C {}; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { class B { class C {}; }; };"
, recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("A"
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3994, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
3994 recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("A"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { class B { class C {}; }; };"
, recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("A"
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 3994, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
3995}
3996
3997TEST(HasAncenstor, FailsIfNoAncestorMatches)class HasAncenstor_FailsIfNoAncestorMatches_Test : public ::testing
::Test { public: HasAncenstor_FailsIfNoAncestorMatches_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAncenstor_FailsIfNoAncestorMatches_Test
(HasAncenstor_FailsIfNoAncestorMatches_Test const &); void
operator=(HasAncenstor_FailsIfNoAncestorMatches_Test const &
);};::testing::TestInfo* const HasAncenstor_FailsIfNoAncestorMatches_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAncenstor", "FailsIfNoAncestorMatches", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAncenstor_FailsIfNoAncestorMatches_Test
>);void HasAncenstor_FailsIfNoAncestorMatches_Test::TestBody
()
{
3998 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { class B { class C {}; }; };"
, recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("X"
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4000, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"X\")))))"
, "false", "true").c_str()) = ::testing::Message()
3999 "class A { class B { class C {}; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { class B { class C {}; }; };"
, recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("X"
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4000, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"X\")))))"
, "false", "true").c_str()) = ::testing::Message()
4000 recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("X"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class A { class B { class C {}; }; };"
, recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("X"
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4000, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class A { class B { class C {}; }; };\", recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"X\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
4001}
4002
4003TEST(HasAncestor, MatchesDeclarationsThatGetVisitedLater)class HasAncestor_MatchesDeclarationsThatGetVisitedLater_Test
: public ::testing::Test { public: HasAncestor_MatchesDeclarationsThatGetVisitedLater_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAncestor_MatchesDeclarationsThatGetVisitedLater_Test
(HasAncestor_MatchesDeclarationsThatGetVisitedLater_Test const
&); void operator=(HasAncestor_MatchesDeclarationsThatGetVisitedLater_Test
const &);};::testing::TestInfo* const HasAncestor_MatchesDeclarationsThatGetVisitedLater_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAncestor", "MatchesDeclarationsThatGetVisitedLater", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< HasAncestor_MatchesDeclarationsThatGetVisitedLater_Test
>);void HasAncestor_MatchesDeclarationsThatGetVisitedLater_Test
::TestBody()
{
4004 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { class B { void f() { C c; } class C {}; }; };"
, varDecl(hasName("c"), hasType(recordDecl(hasName("C"), hasAncestor
(recordDecl(hasName("A"))))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { class B { void f() { C c; } class C {}; }; };\", varDecl(hasName(\"c\"), hasType(recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4005 "class A { class B { void f() { C c; } class C {}; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { class B { void f() { C c; } class C {}; }; };"
, varDecl(hasName("c"), hasType(recordDecl(hasName("C"), hasAncestor
(recordDecl(hasName("A"))))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { class B { void f() { C c; } class C {}; }; };\", varDecl(hasName(\"c\"), hasType(recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4006 varDecl(hasName("c"), hasType(recordDecl(hasName("C"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { class B { void f() { C c; } class C {}; }; };"
, varDecl(hasName("c"), hasType(recordDecl(hasName("C"), hasAncestor
(recordDecl(hasName("A"))))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { class B { void f() { C c; } class C {}; }; };\", varDecl(hasName(\"c\"), hasType(recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4007 hasAncestor(recordDecl(hasName("A"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class A { class B { void f() { C c; } class C {}; }; };"
, varDecl(hasName("c"), hasType(recordDecl(hasName("C"), hasAncestor
(recordDecl(hasName("A"))))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4007, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class A { class B { void f() { C c; } class C {}; }; };\", varDecl(hasName(\"c\"), hasType(recordDecl(hasName(\"C\"), hasAncestor(recordDecl(hasName(\"A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4008}
4009
4010TEST(HasAncenstor, MatchesStatementAncestors)class HasAncenstor_MatchesStatementAncestors_Test : public ::
testing::Test { public: HasAncenstor_MatchesStatementAncestors_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAncenstor_MatchesStatementAncestors_Test
(HasAncenstor_MatchesStatementAncestors_Test const &); void
operator=(HasAncenstor_MatchesStatementAncestors_Test const &
);};::testing::TestInfo* const HasAncenstor_MatchesStatementAncestors_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAncenstor", "MatchesStatementAncestors", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAncenstor_MatchesStatementAncestors_Test
>);void HasAncenstor_MatchesStatementAncestors_Test::TestBody
()
{
4011 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f() { if (true) { while (false) { 42; } } }"
, integerLiteral(equals(42), hasAncestor(ifStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f() { if (true) { while (false) { 42; } } }\", integerLiteral(equals(42), hasAncestor(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
4012 "void f() { if (true) { while (false) { 42; } } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f() { if (true) { while (false) { 42; } } }"
, integerLiteral(equals(42), hasAncestor(ifStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f() { if (true) { while (false) { 42; } } }\", integerLiteral(equals(42), hasAncestor(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
4013 integerLiteral(equals(42), hasAncestor(ifStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f() { if (true) { while (false) { 42; } } }"
, integerLiteral(equals(42), hasAncestor(ifStmt()))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4013, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f() { if (true) { while (false) { 42; } } }\", integerLiteral(equals(42), hasAncestor(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
4014}
4015
4016TEST(HasAncestor, DrillsThroughDifferentHierarchies)class HasAncestor_DrillsThroughDifferentHierarchies_Test : public
::testing::Test { public: HasAncestor_DrillsThroughDifferentHierarchies_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAncestor_DrillsThroughDifferentHierarchies_Test
(HasAncestor_DrillsThroughDifferentHierarchies_Test const &
); void operator=(HasAncestor_DrillsThroughDifferentHierarchies_Test
const &);};::testing::TestInfo* const HasAncestor_DrillsThroughDifferentHierarchies_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAncestor", "DrillsThroughDifferentHierarchies", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAncestor_DrillsThroughDifferentHierarchies_Test
>);void HasAncestor_DrillsThroughDifferentHierarchies_Test
::TestBody()
{
4017 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f() { if (true) { int x = 42; } }"
, integerLiteral(equals(42), hasAncestor(functionDecl(hasName
("f"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4019, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f() { if (true) { int x = 42; } }\", integerLiteral(equals(42), hasAncestor(functionDecl(hasName(\"f\")))))"
, "false", "true").c_str()) = ::testing::Message()
4018 "void f() { if (true) { int x = 42; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f() { if (true) { int x = 42; } }"
, integerLiteral(equals(42), hasAncestor(functionDecl(hasName
("f"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4019, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f() { if (true) { int x = 42; } }\", integerLiteral(equals(42), hasAncestor(functionDecl(hasName(\"f\")))))"
, "false", "true").c_str()) = ::testing::Message()
4019 integerLiteral(equals(42), hasAncestor(functionDecl(hasName("f"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f() { if (true) { int x = 42; } }"
, integerLiteral(equals(42), hasAncestor(functionDecl(hasName
("f"))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4019, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f() { if (true) { int x = 42; } }\", integerLiteral(equals(42), hasAncestor(functionDecl(hasName(\"f\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
4020}
4021
4022TEST(HasAncestor, BindsRecursiveCombinations)class HasAncestor_BindsRecursiveCombinations_Test : public ::
testing::Test { public: HasAncestor_BindsRecursiveCombinations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAncestor_BindsRecursiveCombinations_Test
(HasAncestor_BindsRecursiveCombinations_Test const &); void
operator=(HasAncestor_BindsRecursiveCombinations_Test const &
);};::testing::TestInfo* const HasAncestor_BindsRecursiveCombinations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAncestor", "BindsRecursiveCombinations", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAncestor_BindsRecursiveCombinations_Test
>);void HasAncestor_BindsRecursiveCombinations_Test::TestBody
()
{
4023 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind
("r"))))), new VerifyIdIsBoundTo<CXXRecordDecl>("r", 1)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4026, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind(\"r\"))))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"r\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4024 "class C { class D { class E { class F { int y; }; }; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind
("r"))))), new VerifyIdIsBoundTo<CXXRecordDecl>("r", 1)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4026, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind(\"r\"))))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"r\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4025 fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind("r"))))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind
("r"))))), new VerifyIdIsBoundTo<CXXRecordDecl>("r", 1)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4026, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind(\"r\"))))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"r\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4026 new VerifyIdIsBoundTo<CXXRecordDecl>("r", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind
("r"))))), new VerifyIdIsBoundTo<CXXRecordDecl>("r", 1)
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4026, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind(\"r\"))))), new VerifyIdIsBoundTo<CXXRecordDecl>(\"r\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
4027}
4028
4029TEST(HasAncestor, BindsCombinationsWithHasDescendant)class HasAncestor_BindsCombinationsWithHasDescendant_Test : public
::testing::Test { public: HasAncestor_BindsCombinationsWithHasDescendant_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAncestor_BindsCombinationsWithHasDescendant_Test
(HasAncestor_BindsCombinationsWithHasDescendant_Test const &
); void operator=(HasAncestor_BindsCombinationsWithHasDescendant_Test
const &);};::testing::TestInfo* const HasAncestor_BindsCombinationsWithHasDescendant_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAncestor", "BindsCombinationsWithHasDescendant", __null,
__null, (::testing::internal::GetTestTypeId()), ::testing::Test
::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::testing
::internal::TestFactoryImpl< HasAncestor_BindsCombinationsWithHasDescendant_Test
>);void HasAncestor_BindsCombinationsWithHasDescendant_Test
::TestBody()
{
4030 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition
(), hasAncestor(recordDecl()))) ).bind("d") )), new VerifyIdIsBoundTo
<CXXRecordDecl>("d", "E")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4038, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition(), hasAncestor(recordDecl()))) ).bind(\"d\") )), new VerifyIdIsBoundTo<CXXRecordDecl>(\"d\", \"E\"))"
, "false", "true").c_str()) = ::testing::Message()
4031 "class C { class D { class E { class F { int y; }; }; }; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition
(), hasAncestor(recordDecl()))) ).bind("d") )), new VerifyIdIsBoundTo
<CXXRecordDecl>("d", "E")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4038, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition(), hasAncestor(recordDecl()))) ).bind(\"d\") )), new VerifyIdIsBoundTo<CXXRecordDecl>(\"d\", \"E\"))"
, "false", "true").c_str()) = ::testing::Message()
4032 fieldDecl(hasAncestor(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition
(), hasAncestor(recordDecl()))) ).bind("d") )), new VerifyIdIsBoundTo
<CXXRecordDecl>("d", "E")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4038, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition(), hasAncestor(recordDecl()))) ).bind(\"d\") )), new VerifyIdIsBoundTo<CXXRecordDecl>(\"d\", \"E\"))"
, "false", "true").c_str()) = ::testing::Message()
4033 decl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition
(), hasAncestor(recordDecl()))) ).bind("d") )), new VerifyIdIsBoundTo
<CXXRecordDecl>("d", "E")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4038, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition(), hasAncestor(recordDecl()))) ).bind(\"d\") )), new VerifyIdIsBoundTo<CXXRecordDecl>(\"d\", \"E\"))"
, "false", "true").c_str()) = ::testing::Message()
4034 hasDescendant(recordDecl(isDefinition(),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition
(), hasAncestor(recordDecl()))) ).bind("d") )), new VerifyIdIsBoundTo
<CXXRecordDecl>("d", "E")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4038, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition(), hasAncestor(recordDecl()))) ).bind(\"d\") )), new VerifyIdIsBoundTo<CXXRecordDecl>(\"d\", \"E\"))"
, "false", "true").c_str()) = ::testing::Message()
4035 hasAncestor(recordDecl())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition
(), hasAncestor(recordDecl()))) ).bind("d") )), new VerifyIdIsBoundTo
<CXXRecordDecl>("d", "E")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4038, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition(), hasAncestor(recordDecl()))) ).bind(\"d\") )), new VerifyIdIsBoundTo<CXXRecordDecl>(\"d\", \"E\"))"
, "false", "true").c_str()) = ::testing::Message()
4036 ).bind("d")switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition
(), hasAncestor(recordDecl()))) ).bind("d") )), new VerifyIdIsBoundTo
<CXXRecordDecl>("d", "E")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4038, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition(), hasAncestor(recordDecl()))) ).bind(\"d\") )), new VerifyIdIsBoundTo<CXXRecordDecl>(\"d\", \"E\"))"
, "false", "true").c_str()) = ::testing::Message()
4037 )),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition
(), hasAncestor(recordDecl()))) ).bind("d") )), new VerifyIdIsBoundTo
<CXXRecordDecl>("d", "E")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4038, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition(), hasAncestor(recordDecl()))) ).bind(\"d\") )), new VerifyIdIsBoundTo<CXXRecordDecl>(\"d\", \"E\"))"
, "false", "true").c_str()) = ::testing::Message()
4038 new VerifyIdIsBoundTo<CXXRecordDecl>("d", "E")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class C { class D { class E { class F { int y; }; }; }; };"
, fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition
(), hasAncestor(recordDecl()))) ).bind("d") )), new VerifyIdIsBoundTo
<CXXRecordDecl>("d", "E")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4038, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class C { class D { class E { class F { int y; }; }; }; };\", fieldDecl(hasAncestor( decl( hasDescendant(recordDecl(isDefinition(), hasAncestor(recordDecl()))) ).bind(\"d\") )), new VerifyIdIsBoundTo<CXXRecordDecl>(\"d\", \"E\"))"
, "false", "true").c_str()) = ::testing::Message()
;
4039}
4040
4041TEST(HasAncestor, MatchesClosestAncestor)class HasAncestor_MatchesClosestAncestor_Test : public ::testing
::Test { public: HasAncestor_MatchesClosestAncestor_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAncestor_MatchesClosestAncestor_Test
(HasAncestor_MatchesClosestAncestor_Test const &); void operator
=(HasAncestor_MatchesClosestAncestor_Test const &);};::testing
::TestInfo* const HasAncestor_MatchesClosestAncestor_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasAncestor"
, "MatchesClosestAncestor", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< HasAncestor_MatchesClosestAncestor_Test>);void HasAncestor_MatchesClosestAncestor_Test
::TestBody()
{
4042 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4043 "template <typename T> struct C {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4044 " void f(int) {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4045 " struct I { void g(T) { int x; } } i; i.g(42);"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4046 " }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4047 "};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4048 "template struct C<int>;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4049 varDecl(hasName("x"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4050 hasAncestor(functionDecl(hasParameter(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4051 0, varDecl(hasType(asString("int"))))).bind("f"))).bind("v"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4052 new VerifyIdIsBoundTo<FunctionDecl>("f", "g", 2)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "template <typename T> struct C {" " void f(int) {" " struct I { void g(T) { int x; } } i; i.g(42);"
" }" "};" "template struct C<int>;", varDecl(hasName(
"x"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType
(asString("int"))))).bind("f"))).bind("v"), new VerifyIdIsBoundTo
<FunctionDecl>("f", "g", 2)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4052, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> struct C {\" \" void f(int) {\" \" struct I { void g(T) { int x; } } i; i.g(42);\" \" }\" \"};\" \"template struct C<int>;\", varDecl(hasName(\"x\"), hasAncestor(functionDecl(hasParameter( 0, varDecl(hasType(asString(\"int\"))))).bind(\"f\"))).bind(\"v\"), new VerifyIdIsBoundTo<FunctionDecl>(\"f\", \"g\", 2))"
, "false", "true").c_str()) = ::testing::Message()
;
4053}
4054
4055TEST(HasAncestor, MatchesInTemplateInstantiations)class HasAncestor_MatchesInTemplateInstantiations_Test : public
::testing::Test { public: HasAncestor_MatchesInTemplateInstantiations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); HasAncestor_MatchesInTemplateInstantiations_Test
(HasAncestor_MatchesInTemplateInstantiations_Test const &
); void operator=(HasAncestor_MatchesInTemplateInstantiations_Test
const &);};::testing::TestInfo* const HasAncestor_MatchesInTemplateInstantiations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasAncestor", "MatchesInTemplateInstantiations", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasAncestor_MatchesInTemplateInstantiations_Test
>);void HasAncestor_MatchesInTemplateInstantiations_Test::
TestBody()
{
4056 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A { struct B { struct C { T t; }; }; }; "
"A<int>::B::C a;", fieldDecl(hasType(asString("int")),
hasAncestor(recordDecl(hasName("A"))))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A { struct B { struct C { T t; }; }; }; \" \"A<int>::B::C a;\", fieldDecl(hasType(asString(\"int\")), hasAncestor(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
4057 "template <typename T> struct A { struct B { struct C { T t; }; }; }; "switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A { struct B { struct C { T t; }; }; }; "
"A<int>::B::C a;", fieldDecl(hasType(asString("int")),
hasAncestor(recordDecl(hasName("A"))))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A { struct B { struct C { T t; }; }; }; \" \"A<int>::B::C a;\", fieldDecl(hasType(asString(\"int\")), hasAncestor(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
4058 "A<int>::B::C a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A { struct B { struct C { T t; }; }; }; "
"A<int>::B::C a;", fieldDecl(hasType(asString("int")),
hasAncestor(recordDecl(hasName("A"))))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A { struct B { struct C { T t; }; }; }; \" \"A<int>::B::C a;\", fieldDecl(hasType(asString(\"int\")), hasAncestor(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
4059 fieldDecl(hasType(asString("int")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A { struct B { struct C { T t; }; }; }; "
"A<int>::B::C a;", fieldDecl(hasType(asString("int")),
hasAncestor(recordDecl(hasName("A"))))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A { struct B { struct C { T t; }; }; }; \" \"A<int>::B::C a;\", fieldDecl(hasType(asString(\"int\")), hasAncestor(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
4060 hasAncestor(recordDecl(hasName("A"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct A { struct B { struct C { T t; }; }; }; "
"A<int>::B::C a;", fieldDecl(hasType(asString("int")),
hasAncestor(recordDecl(hasName("A"))))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct A { struct B { struct C { T t; }; }; }; \" \"A<int>::B::C a;\", fieldDecl(hasType(asString(\"int\")), hasAncestor(recordDecl(hasName(\"A\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
4061}
4062
4063TEST(HasAncestor, MatchesInImplicitCode)class HasAncestor_MatchesInImplicitCode_Test : public ::testing
::Test { public: HasAncestor_MatchesInImplicitCode_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); HasAncestor_MatchesInImplicitCode_Test
(HasAncestor_MatchesInImplicitCode_Test const &); void operator
=(HasAncestor_MatchesInImplicitCode_Test const &);};::testing
::TestInfo* const HasAncestor_MatchesInImplicitCode_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasAncestor"
, "MatchesInImplicitCode", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< HasAncestor_MatchesInImplicitCode_Test>);void HasAncestor_MatchesInImplicitCode_Test
::TestBody()
{
4064 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X {}; struct A { A() {} X x; };"
, cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer
(expr( hasAncestor(recordDecl(hasName("A")))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4068, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X {}; struct A { A() {} X x; };\", cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer(expr( hasAncestor(recordDecl(hasName(\"A\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4065 "struct X {}; struct A { A() {} X x; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X {}; struct A { A() {} X x; };"
, cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer
(expr( hasAncestor(recordDecl(hasName("A")))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4068, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X {}; struct A { A() {} X x; };\", cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer(expr( hasAncestor(recordDecl(hasName(\"A\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4066 cxxConstructorDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X {}; struct A { A() {} X x; };"
, cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer
(expr( hasAncestor(recordDecl(hasName("A")))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4068, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X {}; struct A { A() {} X x; };\", cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer(expr( hasAncestor(recordDecl(hasName(\"A\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4067 hasAnyConstructorInitializer(withInitializer(expr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X {}; struct A { A() {} X x; };"
, cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer
(expr( hasAncestor(recordDecl(hasName("A")))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4068, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X {}; struct A { A() {} X x; };\", cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer(expr( hasAncestor(recordDecl(hasName(\"A\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4068 hasAncestor(recordDecl(hasName("A")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct X {}; struct A { A() {} X x; };"
, cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer
(expr( hasAncestor(recordDecl(hasName("A")))))))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4068, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct X {}; struct A { A() {} X x; };\", cxxConstructorDecl( hasAnyConstructorInitializer(withInitializer(expr( hasAncestor(recordDecl(hasName(\"A\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4069}
4070
4071TEST(HasParent, MatchesOnlyParent)class HasParent_MatchesOnlyParent_Test : public ::testing::Test
{ public: HasParent_MatchesOnlyParent_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); HasParent_MatchesOnlyParent_Test(HasParent_MatchesOnlyParent_Test
const &); void operator=(HasParent_MatchesOnlyParent_Test
const &);};::testing::TestInfo* const HasParent_MatchesOnlyParent_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasParent", "MatchesOnlyParent", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasParent_MatchesOnlyParent_Test>);void
HasParent_MatchesOnlyParent_Test::TestBody()
{
4072 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f() { if (true) { int x = 42; } }"
, compoundStmt(hasParent(ifStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f() { if (true) { int x = 42; } }\", compoundStmt(hasParent(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
4073 "void f() { if (true) { int x = 42; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f() { if (true) { int x = 42; } }"
, compoundStmt(hasParent(ifStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f() { if (true) { int x = 42; } }\", compoundStmt(hasParent(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
4074 compoundStmt(hasParent(ifStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f() { if (true) { int x = 42; } }"
, compoundStmt(hasParent(ifStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4074, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f() { if (true) { int x = 42; } }\", compoundStmt(hasParent(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
4075 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { for (;;) { int x = 42; } }"
, compoundStmt(hasParent(ifStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4077, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { for (;;) { int x = 42; } }\", compoundStmt(hasParent(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
4076 "void f() { for (;;) { int x = 42; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { for (;;) { int x = 42; } }"
, compoundStmt(hasParent(ifStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4077, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { for (;;) { int x = 42; } }\", compoundStmt(hasParent(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
4077 compoundStmt(hasParent(ifStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { for (;;) { int x = 42; } }"
, compoundStmt(hasParent(ifStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4077, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { for (;;) { int x = 42; } }\", compoundStmt(hasParent(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
4078 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { if (true) for (;;) { int x = 42; } }"
, compoundStmt(hasParent(ifStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4080, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { if (true) for (;;) { int x = 42; } }\", compoundStmt(hasParent(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
4079 "void f() { if (true) for (;;) { int x = 42; } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { if (true) for (;;) { int x = 42; } }"
, compoundStmt(hasParent(ifStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4080, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { if (true) for (;;) { int x = 42; } }\", compoundStmt(hasParent(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
4080 compoundStmt(hasParent(ifStmt()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { if (true) for (;;) { int x = 42; } }"
, compoundStmt(hasParent(ifStmt()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4080, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { if (true) for (;;) { int x = 42; } }\", compoundStmt(hasParent(ifStmt())))"
, "false", "true").c_str()) = ::testing::Message()
;
4081}
4082
4083TEST(HasAncestor, MatchesAllAncestors)class HasAncestor_MatchesAllAncestors_Test : public ::testing
::Test { public: HasAncestor_MatchesAllAncestors_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); HasAncestor_MatchesAllAncestors_Test
(HasAncestor_MatchesAllAncestors_Test const &); void operator
=(HasAncestor_MatchesAllAncestors_Test const &);};::testing
::TestInfo* const HasAncestor_MatchesAllAncestors_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasAncestor"
, "MatchesAllAncestors", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< HasAncestor_MatchesAllAncestors_Test>);void HasAncestor_MatchesAllAncestors_Test
::TestBody()
{
4084 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation()
)), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation(
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation())), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation()))))))"
, "false", "true").c_str()) = ::testing::Message()
4085 "template <typename T> struct C { static void f() { 42; } };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation()
)), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation(
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation())), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation()))))))"
, "false", "true").c_str()) = ::testing::Message()
4086 "void t() { C<int>::f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation()
)), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation(
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation())), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation()))))))"
, "false", "true").c_str()) = ::testing::Message()
4087 integerLiteral(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation()
)), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation(
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation())), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation()))))))"
, "false", "true").c_str()) = ::testing::Message()
4088 equals(42),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation()
)), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation(
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation())), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation()))))))"
, "false", "true").c_str()) = ::testing::Message()
4089 allOf(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation()
)), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation(
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation())), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation()))))))"
, "false", "true").c_str()) = ::testing::Message()
4090 hasAncestor(cxxRecordDecl(isTemplateInstantiation())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation()
)), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation(
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation())), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation()))))))"
, "false", "true").c_str()) = ::testing::Message()
4091 hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation())))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation()
)), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation(
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4091, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), allOf( hasAncestor(cxxRecordDecl(isTemplateInstantiation())), hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation()))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4092}
4093
4094TEST(HasParent, MatchesAllParents)class HasParent_MatchesAllParents_Test : public ::testing::Test
{ public: HasParent_MatchesAllParents_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); HasParent_MatchesAllParents_Test(HasParent_MatchesAllParents_Test
const &); void operator=(HasParent_MatchesAllParents_Test
const &);};::testing::TestInfo* const HasParent_MatchesAllParents_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"HasParent", "MatchesAllParents", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< HasParent_MatchesAllParents_Test>);void
HasParent_MatchesAllParents_Test::TestBody()
{
4095 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl
(isTemplateInstantiation())))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4101, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl(isTemplateInstantiation()))))))))"
, "false", "true").c_str()) = ::testing::Message()
4096 "template <typename T> struct C { static void f() { 42; } };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl
(isTemplateInstantiation())))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4101, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl(isTemplateInstantiation()))))))))"
, "false", "true").c_str()) = ::testing::Message()
4097 "void t() { C<int>::f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl
(isTemplateInstantiation())))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4101, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl(isTemplateInstantiation()))))))))"
, "false", "true").c_str()) = ::testing::Message()
4098 integerLiteral(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl
(isTemplateInstantiation())))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4101, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl(isTemplateInstantiation()))))))))"
, "false", "true").c_str()) = ::testing::Message()
4099 equals(42),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl
(isTemplateInstantiation())))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4101, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl(isTemplateInstantiation()))))))))"
, "false", "true").c_str()) = ::testing::Message()
4100 hasParent(compoundStmt(hasParent(functionDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl
(isTemplateInstantiation())))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4101, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl(isTemplateInstantiation()))))))))"
, "false", "true").c_str()) = ::testing::Message()
4101 hasParent(cxxRecordDecl(isTemplateInstantiation())))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl
(isTemplateInstantiation())))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4101, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl( hasParent(cxxRecordDecl(isTemplateInstantiation()))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4102 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl
(unless(isTemplateInstantiation()))))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4108, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl(unless(isTemplateInstantiation())))))))))"
, "false", "true").c_str()) = ::testing::Message()
4103 matches("template <typename T> struct C { static void f() { 42; } };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl
(unless(isTemplateInstantiation()))))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4108, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl(unless(isTemplateInstantiation())))))))))"
, "false", "true").c_str()) = ::testing::Message()
4104 "void t() { C<int>::f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl
(unless(isTemplateInstantiation()))))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4108, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl(unless(isTemplateInstantiation())))))))))"
, "false", "true").c_str()) = ::testing::Message()
4105 integerLiteral(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl
(unless(isTemplateInstantiation()))))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4108, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl(unless(isTemplateInstantiation())))))))))"
, "false", "true").c_str()) = ::testing::Message()
4106 equals(42),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl
(unless(isTemplateInstantiation()))))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4108, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl(unless(isTemplateInstantiation())))))))))"
, "false", "true").c_str()) = ::testing::Message()
4107 hasParent(compoundStmt(hasParent(functionDecl(hasParent(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl
(unless(isTemplateInstantiation()))))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4108, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl(unless(isTemplateInstantiation())))))))))"
, "false", "true").c_str()) = ::testing::Message()
4108 cxxRecordDecl(unless(isTemplateInstantiation()))))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral( equals(42
), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl
(unless(isTemplateInstantiation()))))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4108, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral( equals(42), hasParent(compoundStmt(hasParent(functionDecl(hasParent( cxxRecordDecl(unless(isTemplateInstantiation())))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4109 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral(equals(42)
, hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent
( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl
(hasParent(cxxRecordDecl( unless(isTemplateInstantiation())))
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral(equals(42), hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl(hasParent(cxxRecordDecl( unless(isTemplateInstantiation()))))))))))"
, "false", "true").c_str()) = ::testing::Message()
4110 "template <typename T> struct C { static void f() { 42; } };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral(equals(42)
, hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent
( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl
(hasParent(cxxRecordDecl( unless(isTemplateInstantiation())))
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral(equals(42), hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl(hasParent(cxxRecordDecl( unless(isTemplateInstantiation()))))))))))"
, "false", "true").c_str()) = ::testing::Message()
4111 "void t() { C<int>::f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral(equals(42)
, hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent
( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl
(hasParent(cxxRecordDecl( unless(isTemplateInstantiation())))
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral(equals(42), hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl(hasParent(cxxRecordDecl( unless(isTemplateInstantiation()))))))))))"
, "false", "true").c_str()) = ::testing::Message()
4112 integerLiteral(equals(42),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral(equals(42)
, hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent
( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl
(hasParent(cxxRecordDecl( unless(isTemplateInstantiation())))
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral(equals(42), hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl(hasParent(cxxRecordDecl( unless(isTemplateInstantiation()))))))))))"
, "false", "true").c_str()) = ::testing::Message()
4113 hasParent(compoundStmt(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral(equals(42)
, hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent
( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl
(hasParent(cxxRecordDecl( unless(isTemplateInstantiation())))
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral(equals(42), hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl(hasParent(cxxRecordDecl( unless(isTemplateInstantiation()))))))))))"
, "false", "true").c_str()) = ::testing::Message()
4114 allOf(hasParent(functionDecl(hasParent(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral(equals(42)
, hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent
( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl
(hasParent(cxxRecordDecl( unless(isTemplateInstantiation())))
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral(equals(42), hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl(hasParent(cxxRecordDecl( unless(isTemplateInstantiation()))))))))))"
, "false", "true").c_str()) = ::testing::Message()
4115 cxxRecordDecl(isTemplateInstantiation())))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral(equals(42)
, hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent
( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl
(hasParent(cxxRecordDecl( unless(isTemplateInstantiation())))
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral(equals(42), hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl(hasParent(cxxRecordDecl( unless(isTemplateInstantiation()))))))))))"
, "false", "true").c_str()) = ::testing::Message()
4116 hasParent(functionDecl(hasParent(cxxRecordDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral(equals(42)
, hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent
( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl
(hasParent(cxxRecordDecl( unless(isTemplateInstantiation())))
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral(equals(42), hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl(hasParent(cxxRecordDecl( unless(isTemplateInstantiation()))))))))))"
, "false", "true").c_str()) = ::testing::Message()
4117 unless(isTemplateInstantiation())))))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T> struct C { static void f() { 42; } };"
"void t() { C<int>::f(); }", integerLiteral(equals(42)
, hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent
( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl
(hasParent(cxxRecordDecl( unless(isTemplateInstantiation())))
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T> struct C { static void f() { 42; } };\" \"void t() { C<int>::f(); }\", integerLiteral(equals(42), hasParent(compoundStmt( allOf(hasParent(functionDecl(hasParent( cxxRecordDecl(isTemplateInstantiation())))), hasParent(functionDecl(hasParent(cxxRecordDecl( unless(isTemplateInstantiation()))))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4118 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> struct C { static void f() {} };"
"void t() { C<int>::f(); }", compoundStmt(hasParent(recordDecl
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4121, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> struct C { static void f() {} };\" \"void t() { C<int>::f(); }\", compoundStmt(hasParent(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
4119 notMatches("template <typename T> struct C { static void f() {} };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> struct C { static void f() {} };"
"void t() { C<int>::f(); }", compoundStmt(hasParent(recordDecl
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4121, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> struct C { static void f() {} };\" \"void t() { C<int>::f(); }\", compoundStmt(hasParent(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
4120 "void t() { C<int>::f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> struct C { static void f() {} };"
"void t() { C<int>::f(); }", compoundStmt(hasParent(recordDecl
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4121, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> struct C { static void f() {} };\" \"void t() { C<int>::f(); }\", compoundStmt(hasParent(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
4121 compoundStmt(hasParent(recordDecl()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("template <typename T> struct C { static void f() {} };"
"void t() { C<int>::f(); }", compoundStmt(hasParent(recordDecl
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4121, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"template <typename T> struct C { static void f() {} };\" \"void t() { C<int>::f(); }\", compoundStmt(hasParent(recordDecl())))"
, "false", "true").c_str()) = ::testing::Message()
;
4122}
4123
4124TEST(HasParent, NoDuplicateParents)class HasParent_NoDuplicateParents_Test : public ::testing::Test
{ public: HasParent_NoDuplicateParents_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); HasParent_NoDuplicateParents_Test(
HasParent_NoDuplicateParents_Test const &); void operator
=(HasParent_NoDuplicateParents_Test const &);};::testing::
TestInfo* const HasParent_NoDuplicateParents_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "HasParent",
"NoDuplicateParents", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< HasParent_NoDuplicateParents_Test>);void HasParent_NoDuplicateParents_Test
::TestBody()
{
4125 class HasDuplicateParents : public BoundNodesCallback {
4126 public:
4127 bool run(const BoundNodes *Nodes) override { return false; }
4128 bool run(const BoundNodes *Nodes, ASTContext *Context) override {
4129 const Stmt *Node = Nodes->getNodeAs<Stmt>("node");
4130 std::set<const void *> Parents;
4131 for (const auto &Parent : Context->getParents(*Node)) {
4132 if (!Parents.insert(Parent.getMemoizationData()).second) {
4133 return true;
4134 }
4135 }
4136 return false;
4137 }
4138 };
4139 EXPECT_FALSE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matchAndVerifyResultTrue
( "template <typename T> int Foo() { return 1 + 2; }\n"
"int x = Foo<int>() + Foo<unsigned>();", stmt().
bind("node"), new HasDuplicateParents())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4142, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> int Foo() { return 1 + 2; }\\n\" \"int x = Foo<int>() + Foo<unsigned>();\", stmt().bind(\"node\"), new HasDuplicateParents())"
, "true", "false").c_str()) = ::testing::Message()
4140 "template <typename T> int Foo() { return 1 + 2; }\n"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matchAndVerifyResultTrue
( "template <typename T> int Foo() { return 1 + 2; }\n"
"int x = Foo<int>() + Foo<unsigned>();", stmt().
bind("node"), new HasDuplicateParents())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4142, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> int Foo() { return 1 + 2; }\\n\" \"int x = Foo<int>() + Foo<unsigned>();\", stmt().bind(\"node\"), new HasDuplicateParents())"
, "true", "false").c_str()) = ::testing::Message()
4141 "int x = Foo<int>() + Foo<unsigned>();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matchAndVerifyResultTrue
( "template <typename T> int Foo() { return 1 + 2; }\n"
"int x = Foo<int>() + Foo<unsigned>();", stmt().
bind("node"), new HasDuplicateParents())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4142, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> int Foo() { return 1 + 2; }\\n\" \"int x = Foo<int>() + Foo<unsigned>();\", stmt().bind(\"node\"), new HasDuplicateParents())"
, "true", "false").c_str()) = ::testing::Message()
4142 stmt().bind("node"), new HasDuplicateParents()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matchAndVerifyResultTrue
( "template <typename T> int Foo() { return 1 + 2; }\n"
"int x = Foo<int>() + Foo<unsigned>();", stmt().
bind("node"), new HasDuplicateParents())))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4142, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"template <typename T> int Foo() { return 1 + 2; }\\n\" \"int x = Foo<int>() + Foo<unsigned>();\", stmt().bind(\"node\"), new HasDuplicateParents())"
, "true", "false").c_str()) = ::testing::Message()
;
4143}
4144
4145TEST(TypeMatching, MatchesTypes)class TypeMatching_MatchesTypes_Test : public ::testing::Test
{ public: TypeMatching_MatchesTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_MatchesTypes_Test(TypeMatching_MatchesTypes_Test
const &); void operator=(TypeMatching_MatchesTypes_Test const
&);};::testing::TestInfo* const TypeMatching_MatchesTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "MatchesTypes", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_MatchesTypes_Test>);void TypeMatching_MatchesTypes_Test
::TestBody()
{
4146 EXPECT_TRUE(matches("struct S {};", qualType().bind("loc")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S {};"
, qualType().bind("loc")))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4146, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S {};\", qualType().bind(\"loc\"))", "false"
, "true").c_str()) = ::testing::Message()
;
4147}
4148
4149TEST(TypeMatching, MatchesVoid)class TypeMatching_MatchesVoid_Test : public ::testing::Test {
public: TypeMatching_MatchesVoid_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); TypeMatching_MatchesVoid_Test(TypeMatching_MatchesVoid_Test
const &); void operator=(TypeMatching_MatchesVoid_Test const
&);};::testing::TestInfo* const TypeMatching_MatchesVoid_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "MatchesVoid", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_MatchesVoid_Test>);void TypeMatching_MatchesVoid_Test
::TestBody()
{
4150 EXPECT_TRUE(matches("struct S { void func(); };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { void func(); };"
, cxxMethodDecl(returns(voidType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4151, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { void func(); };\", cxxMethodDecl(returns(voidType())))"
, "false", "true").c_str()) = ::testing::Message()
4151 cxxMethodDecl(returns(voidType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S { void func(); };"
, cxxMethodDecl(returns(voidType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4151, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S { void func(); };\", cxxMethodDecl(returns(voidType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4152}
4153
4154TEST(TypeMatching, MatchesArrayTypes)class TypeMatching_MatchesArrayTypes_Test : public ::testing::
Test { public: TypeMatching_MatchesArrayTypes_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_MatchesArrayTypes_Test
(TypeMatching_MatchesArrayTypes_Test const &); void operator
=(TypeMatching_MatchesArrayTypes_Test const &);};::testing
::TestInfo* const TypeMatching_MatchesArrayTypes_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatching"
, "MatchesArrayTypes", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_MatchesArrayTypes_Test>);void TypeMatching_MatchesArrayTypes_Test
::TestBody()
{
4155 EXPECT_TRUE(matches("int a[] = {2,3};", arrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a[] = {2,3};"
, arrayType()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4155, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a[] = {2,3};\", arrayType())", "false", "true"
).c_str()) = ::testing::Message()
;
4156 EXPECT_TRUE(matches("int a[42];", arrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a[42];",
arrayType()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4156, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a[42];\", arrayType())", "false", "true").c_str
()) = ::testing::Message()
;
4157 EXPECT_TRUE(matches("void f(int b) { int a[b]; }", arrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(int b) { int a[b]; }"
, arrayType()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4157, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(int b) { int a[b]; }\", arrayType())", "false"
, "true").c_str()) = ::testing::Message()
;
4158
4159 EXPECT_TRUE(notMatches("struct A {}; A a[7];",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct A {}; A a[7];"
, arrayType(hasElementType(builtinType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4160, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct A {}; A a[7];\", arrayType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4160 arrayType(hasElementType(builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct A {}; A a[7];"
, arrayType(hasElementType(builtinType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4160, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct A {}; A a[7];\", arrayType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4161
4162 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int const a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(builtinType())))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int const a[] = { 2, 3 };\", qualType(arrayType(hasElementType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4163 "int const a[] = { 2, 3 };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int const a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(builtinType())))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int const a[] = { 2, 3 };\", qualType(arrayType(hasElementType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4164 qualType(arrayType(hasElementType(builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int const a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(builtinType())))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4164, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int const a[] = { 2, 3 };\", qualType(arrayType(hasElementType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4165 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int const a[] = { 2, 3 };"
, qualType(isConstQualified(), arrayType(hasElementType(builtinType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4167, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int const a[] = { 2, 3 };\", qualType(isConstQualified(), arrayType(hasElementType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4166 "int const a[] = { 2, 3 };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int const a[] = { 2, 3 };"
, qualType(isConstQualified(), arrayType(hasElementType(builtinType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4167, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int const a[] = { 2, 3 };\", qualType(isConstQualified(), arrayType(hasElementType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4167 qualType(isConstQualified(), arrayType(hasElementType(builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int const a[] = { 2, 3 };"
, qualType(isConstQualified(), arrayType(hasElementType(builtinType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4167, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int const a[] = { 2, 3 };\", qualType(isConstQualified(), arrayType(hasElementType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4168 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "typedef const int T; T x[] = { 1, 2 };"
, qualType(isConstQualified(), arrayType())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4170, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"typedef const int T; T x[] = { 1, 2 };\", qualType(isConstQualified(), arrayType()))"
, "false", "true").c_str()) = ::testing::Message()
4169 "typedef const int T; T x[] = { 1, 2 };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "typedef const int T; T x[] = { 1, 2 };"
, qualType(isConstQualified(), arrayType())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4170, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"typedef const int T; T x[] = { 1, 2 };\", qualType(isConstQualified(), arrayType()))"
, "false", "true").c_str()) = ::testing::Message()
4170 qualType(isConstQualified(), arrayType())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "typedef const int T; T x[] = { 1, 2 };"
, qualType(isConstQualified(), arrayType())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4170, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"typedef const int T; T x[] = { 1, 2 };\", qualType(isConstQualified(), arrayType()))"
, "false", "true").c_str()) = ::testing::Message()
;
4171
4172 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int a[] = { 2, 3 };"
, qualType(isConstQualified(), arrayType(hasElementType(builtinType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4174, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int a[] = { 2, 3 };\", qualType(isConstQualified(), arrayType(hasElementType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4173 "int a[] = { 2, 3 };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int a[] = { 2, 3 };"
, qualType(isConstQualified(), arrayType(hasElementType(builtinType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4174, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int a[] = { 2, 3 };\", qualType(isConstQualified(), arrayType(hasElementType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4174 qualType(isConstQualified(), arrayType(hasElementType(builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int a[] = { 2, 3 };"
, qualType(isConstQualified(), arrayType(hasElementType(builtinType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4174, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int a[] = { 2, 3 };\", qualType(isConstQualified(), arrayType(hasElementType(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4175 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(isConstQualified(), builtinType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int a[] = { 2, 3 };\", qualType(arrayType(hasElementType(isConstQualified(), builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4176 "int a[] = { 2, 3 };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(isConstQualified(), builtinType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int a[] = { 2, 3 };\", qualType(arrayType(hasElementType(isConstQualified(), builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4177 qualType(arrayType(hasElementType(isConstQualified(), builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(isConstQualified(), builtinType
())))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4177, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int a[] = { 2, 3 };\", qualType(arrayType(hasElementType(isConstQualified(), builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4178 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int const a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(builtinType())), unless(isConstQualified
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4181, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int const a[] = { 2, 3 };\", qualType(arrayType(hasElementType(builtinType())), unless(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
4179 "int const a[] = { 2, 3 };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int const a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(builtinType())), unless(isConstQualified
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4181, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int const a[] = { 2, 3 };\", qualType(arrayType(hasElementType(builtinType())), unless(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
4180 qualType(arrayType(hasElementType(builtinType())),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int const a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(builtinType())), unless(isConstQualified
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4181, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int const a[] = { 2, 3 };\", qualType(arrayType(hasElementType(builtinType())), unless(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
4181 unless(isConstQualified()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int const a[] = { 2, 3 };"
, qualType(arrayType(hasElementType(builtinType())), unless(isConstQualified
()))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4181, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int const a[] = { 2, 3 };\", qualType(arrayType(hasElementType(builtinType())), unless(isConstQualified())))"
, "false", "true").c_str()) = ::testing::Message()
;
4182
4183 EXPECT_TRUE(matches("int a[2];",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a[2];", constantArrayType
(hasElementType(builtinType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4184, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a[2];\", constantArrayType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4184 constantArrayType(hasElementType(builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a[2];", constantArrayType
(hasElementType(builtinType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4184, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a[2];\", constantArrayType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4185 EXPECT_TRUE(matches("const int a = 0;", qualType(isInteger())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("const int a = 0;"
, qualType(isInteger())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4185, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"const int a = 0;\", qualType(isInteger()))", "false"
, "true").c_str()) = ::testing::Message()
;
4186}
4187
4188TEST(TypeMatching, DecayedType)class TypeMatching_DecayedType_Test : public ::testing::Test {
public: TypeMatching_DecayedType_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); TypeMatching_DecayedType_Test(TypeMatching_DecayedType_Test
const &); void operator=(TypeMatching_DecayedType_Test const
&);};::testing::TestInfo* const TypeMatching_DecayedType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "DecayedType", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_DecayedType_Test>);void TypeMatching_DecayedType_Test
::TestBody()
{
4189 EXPECT_TRUE(matches("void f(int i[]);", valueDecl(hasType(decayedType(hasDecayedType(pointerType()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(int i[]);"
, valueDecl(hasType(decayedType(hasDecayedType(pointerType())
)))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4189, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(int i[]);\", valueDecl(hasType(decayedType(hasDecayedType(pointerType())))))"
, "false", "true").c_str()) = ::testing::Message()
;
4190 EXPECT_TRUE(notMatches("int i[7];", decayedType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i[7];"
, decayedType()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4190, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i[7];\", decayedType())", "false", "true"
).c_str()) = ::testing::Message()
;
4191}
4192
4193TEST(TypeMatching, MatchesComplexTypes)class TypeMatching_MatchesComplexTypes_Test : public ::testing
::Test { public: TypeMatching_MatchesComplexTypes_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_MatchesComplexTypes_Test
(TypeMatching_MatchesComplexTypes_Test const &); void operator
=(TypeMatching_MatchesComplexTypes_Test const &);};::testing
::TestInfo* const TypeMatching_MatchesComplexTypes_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatching"
, "MatchesComplexTypes", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_MatchesComplexTypes_Test>);void TypeMatching_MatchesComplexTypes_Test
::TestBody()
{
4194 EXPECT_TRUE(matches("_Complex float f;", complexType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("_Complex float f;"
, complexType()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4194, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"_Complex float f;\", complexType())", "false", "true"
).c_str()) = ::testing::Message()
;
4195 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "_Complex float f;"
, complexType(hasElementType(builtinType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4197, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"_Complex float f;\", complexType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4196 "_Complex float f;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "_Complex float f;"
, complexType(hasElementType(builtinType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4197, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"_Complex float f;\", complexType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4197 complexType(hasElementType(builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "_Complex float f;"
, complexType(hasElementType(builtinType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4197, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"_Complex float f;\", complexType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4198 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "_Complex float f;"
, complexType(hasElementType(isInteger()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4200, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"_Complex float f;\", complexType(hasElementType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
4199 "_Complex float f;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "_Complex float f;"
, complexType(hasElementType(isInteger()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4200, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"_Complex float f;\", complexType(hasElementType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
4200 complexType(hasElementType(isInteger()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "_Complex float f;"
, complexType(hasElementType(isInteger()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4200, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"_Complex float f;\", complexType(hasElementType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
;
4201}
4202
4203TEST(TypeMatching, MatchesConstantArrayTypes)class TypeMatching_MatchesConstantArrayTypes_Test : public ::
testing::Test { public: TypeMatching_MatchesConstantArrayTypes_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); TypeMatching_MatchesConstantArrayTypes_Test
(TypeMatching_MatchesConstantArrayTypes_Test const &); void
operator=(TypeMatching_MatchesConstantArrayTypes_Test const &
);};::testing::TestInfo* const TypeMatching_MatchesConstantArrayTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "MatchesConstantArrayTypes", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< TypeMatching_MatchesConstantArrayTypes_Test
>);void TypeMatching_MatchesConstantArrayTypes_Test::TestBody
()
{
4204 EXPECT_TRUE(matches("int a[2];", constantArrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a[2];", constantArrayType
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4204, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a[2];\", constantArrayType())", "false", "true"
).c_str()) = ::testing::Message()
;
4205 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { int a[] = { 2, 3 }; int b[a[0]]; }"
, constantArrayType(hasElementType(builtinType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4207, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { int a[] = { 2, 3 }; int b[a[0]]; }\", constantArrayType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4206 "void f() { int a[] = { 2, 3 }; int b[a[0]]; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { int a[] = { 2, 3 }; int b[a[0]]; }"
, constantArrayType(hasElementType(builtinType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4207, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { int a[] = { 2, 3 }; int b[a[0]]; }\", constantArrayType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4207 constantArrayType(hasElementType(builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { int a[] = { 2, 3 }; int b[a[0]]; }"
, constantArrayType(hasElementType(builtinType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4207, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { int a[] = { 2, 3 }; int b[a[0]]; }\", constantArrayType(hasElementType(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4208
4209 EXPECT_TRUE(matches("int a[42];", constantArrayType(hasSize(42))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a[42];",
constantArrayType(hasSize(42))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4209, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a[42];\", constantArrayType(hasSize(42)))", "false"
, "true").c_str()) = ::testing::Message()
;
4210 EXPECT_TRUE(matches("int b[2*21];", constantArrayType(hasSize(42))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int b[2*21];"
, constantArrayType(hasSize(42))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4210, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int b[2*21];\", constantArrayType(hasSize(42)))"
, "false", "true").c_str()) = ::testing::Message()
;
4211 EXPECT_TRUE(notMatches("int c[41], d[43];", constantArrayType(hasSize(42))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int c[41], d[43];"
, constantArrayType(hasSize(42))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4211, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int c[41], d[43];\", constantArrayType(hasSize(42)))"
, "false", "true").c_str()) = ::testing::Message()
;
4212}
4213
4214TEST(TypeMatching, MatchesDependentSizedArrayTypes)class TypeMatching_MatchesDependentSizedArrayTypes_Test : public
::testing::Test { public: TypeMatching_MatchesDependentSizedArrayTypes_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); TypeMatching_MatchesDependentSizedArrayTypes_Test
(TypeMatching_MatchesDependentSizedArrayTypes_Test const &
); void operator=(TypeMatching_MatchesDependentSizedArrayTypes_Test
const &);};::testing::TestInfo* const TypeMatching_MatchesDependentSizedArrayTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "MatchesDependentSizedArrayTypes", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< TypeMatching_MatchesDependentSizedArrayTypes_Test
>);void TypeMatching_MatchesDependentSizedArrayTypes_Test::
TestBody()
{
4215 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T, int Size> class array { T data[Size]; };"
, dependentSizedArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4217, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T, int Size> class array { T data[Size]; };\", dependentSizedArrayType())"
, "false", "true").c_str()) = ::testing::Message()
4216 "template <typename T, int Size> class array { T data[Size]; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T, int Size> class array { T data[Size]; };"
, dependentSizedArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4217, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T, int Size> class array { T data[Size]; };\", dependentSizedArrayType())"
, "false", "true").c_str()) = ::testing::Message()
4217 dependentSizedArrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "template <typename T, int Size> class array { T data[Size]; };"
, dependentSizedArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4217, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"template <typename T, int Size> class array { T data[Size]; };\", dependentSizedArrayType())"
, "false", "true").c_str()) = ::testing::Message()
;
4218 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int a[42]; int b[] = { 2, 3 }; void f() { int c[b[0]]; }"
, dependentSizedArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4220, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int a[42]; int b[] = { 2, 3 }; void f() { int c[b[0]]; }\", dependentSizedArrayType())"
, "false", "true").c_str()) = ::testing::Message()
4219 "int a[42]; int b[] = { 2, 3 }; void f() { int c[b[0]]; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int a[42]; int b[] = { 2, 3 }; void f() { int c[b[0]]; }"
, dependentSizedArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4220, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int a[42]; int b[] = { 2, 3 }; void f() { int c[b[0]]; }\", dependentSizedArrayType())"
, "false", "true").c_str()) = ::testing::Message()
4220 dependentSizedArrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int a[42]; int b[] = { 2, 3 }; void f() { int c[b[0]]; }"
, dependentSizedArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4220, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int a[42]; int b[] = { 2, 3 }; void f() { int c[b[0]]; }\", dependentSizedArrayType())"
, "false", "true").c_str()) = ::testing::Message()
;
4221}
4222
4223TEST(TypeMatching, MatchesIncompleteArrayType)class TypeMatching_MatchesIncompleteArrayType_Test : public ::
testing::Test { public: TypeMatching_MatchesIncompleteArrayType_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); TypeMatching_MatchesIncompleteArrayType_Test
(TypeMatching_MatchesIncompleteArrayType_Test const &); void
operator=(TypeMatching_MatchesIncompleteArrayType_Test const
&);};::testing::TestInfo* const TypeMatching_MatchesIncompleteArrayType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "MatchesIncompleteArrayType", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< TypeMatching_MatchesIncompleteArrayType_Test
>);void TypeMatching_MatchesIncompleteArrayType_Test::TestBody
()
{
4224 EXPECT_TRUE(matches("int a[] = { 2, 3 };", incompleteArrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int a[] = { 2, 3 };"
, incompleteArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4224, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int a[] = { 2, 3 };\", incompleteArrayType())", "false"
, "true").c_str()) = ::testing::Message()
;
4225 EXPECT_TRUE(matches("void f(int a[]) {}", incompleteArrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(int a[]) {}"
, incompleteArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4225, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(int a[]) {}\", incompleteArrayType())", "false"
, "true").c_str()) = ::testing::Message()
;
4226
4227 EXPECT_TRUE(notMatches("int a[42]; void f() { int b[a[0]]; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int a[42]; void f() { int b[a[0]]; }"
, incompleteArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4228, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int a[42]; void f() { int b[a[0]]; }\", incompleteArrayType())"
, "false", "true").c_str()) = ::testing::Message()
4228 incompleteArrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int a[42]; void f() { int b[a[0]]; }"
, incompleteArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4228, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int a[42]; void f() { int b[a[0]]; }\", incompleteArrayType())"
, "false", "true").c_str()) = ::testing::Message()
;
4229}
4230
4231TEST(TypeMatching, MatchesVariableArrayType)class TypeMatching_MatchesVariableArrayType_Test : public ::testing
::Test { public: TypeMatching_MatchesVariableArrayType_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); TypeMatching_MatchesVariableArrayType_Test
(TypeMatching_MatchesVariableArrayType_Test const &); void
operator=(TypeMatching_MatchesVariableArrayType_Test const &
);};::testing::TestInfo* const TypeMatching_MatchesVariableArrayType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "MatchesVariableArrayType", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< TypeMatching_MatchesVariableArrayType_Test
>);void TypeMatching_MatchesVariableArrayType_Test::TestBody
()
{
4232 EXPECT_TRUE(matches("void f(int b) { int a[b]; }", variableArrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(int b) { int a[b]; }"
, variableArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4232, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(int b) { int a[b]; }\", variableArrayType())"
, "false", "true").c_str()) = ::testing::Message()
;
4233 EXPECT_TRUE(notMatches("int a[] = {2, 3}; int b[42];", variableArrayType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int a[] = {2, 3}; int b[42];"
, variableArrayType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4233, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int a[] = {2, 3}; int b[42];\", variableArrayType())"
, "false", "true").c_str()) = ::testing::Message()
;
4234
4235 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(int b) { int a[b]; }"
, variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(
to( varDecl(hasName("b")))))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4238, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(int b) { int a[b]; }\", variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(to( varDecl(hasName(\"b\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4236 "void f(int b) { int a[b]; }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(int b) { int a[b]; }"
, variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(
to( varDecl(hasName("b")))))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4238, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(int b) { int a[b]; }\", variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(to( varDecl(hasName(\"b\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4237 variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(to(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(int b) { int a[b]; }"
, variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(
to( varDecl(hasName("b")))))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4238, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(int b) { int a[b]; }\", variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(to( varDecl(hasName(\"b\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4238 varDecl(hasName("b")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "void f(int b) { int a[b]; }"
, variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(
to( varDecl(hasName("b")))))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4238, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"void f(int b) { int a[b]; }\", variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(to( varDecl(hasName(\"b\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4239}
4240
4241TEST(TypeMatching, MatchesAtomicTypes)class TypeMatching_MatchesAtomicTypes_Test : public ::testing
::Test { public: TypeMatching_MatchesAtomicTypes_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_MatchesAtomicTypes_Test
(TypeMatching_MatchesAtomicTypes_Test const &); void operator
=(TypeMatching_MatchesAtomicTypes_Test const &);};::testing
::TestInfo* const TypeMatching_MatchesAtomicTypes_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatching"
, "MatchesAtomicTypes", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_MatchesAtomicTypes_Test>);void TypeMatching_MatchesAtomicTypes_Test
::TestBody()
{
4242 if (llvm::Triple(llvm::sys::getDefaultTargetTriple()).getOS() !=
4243 llvm::Triple::Win32) {
4244 // FIXME: Make this work for MSVC.
4245 EXPECT_TRUE(matches("_Atomic(int) i;", atomicType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("_Atomic(int) i;"
, atomicType()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4245, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"_Atomic(int) i;\", atomicType())", "false", "true"
).c_str()) = ::testing::Message()
;
4246
4247 EXPECT_TRUE(matches("_Atomic(int) i;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("_Atomic(int) i;"
, atomicType(hasValueType(isInteger()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4248, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"_Atomic(int) i;\", atomicType(hasValueType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
4248 atomicType(hasValueType(isInteger()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("_Atomic(int) i;"
, atomicType(hasValueType(isInteger()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4248, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"_Atomic(int) i;\", atomicType(hasValueType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
;
4249 EXPECT_TRUE(notMatches("_Atomic(float) f;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("_Atomic(float) f;"
, atomicType(hasValueType(isInteger()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4250, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"_Atomic(float) f;\", atomicType(hasValueType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
4250 atomicType(hasValueType(isInteger()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("_Atomic(float) f;"
, atomicType(hasValueType(isInteger()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4250, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"_Atomic(float) f;\", atomicType(hasValueType(isInteger())))"
, "false", "true").c_str()) = ::testing::Message()
;
4251 }
4252}
4253
4254TEST(TypeMatching, MatchesAutoTypes)class TypeMatching_MatchesAutoTypes_Test : public ::testing::
Test { public: TypeMatching_MatchesAutoTypes_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_MatchesAutoTypes_Test
(TypeMatching_MatchesAutoTypes_Test const &); void operator
=(TypeMatching_MatchesAutoTypes_Test const &);};::testing
::TestInfo* const TypeMatching_MatchesAutoTypes_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatching"
, "MatchesAutoTypes", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< TypeMatching_MatchesAutoTypes_Test
>);void TypeMatching_MatchesAutoTypes_Test::TestBody()
{
4255 EXPECT_TRUE(matches("auto i = 2;", autoType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("auto i = 2;"
, autoType()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4255, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"auto i = 2;\", autoType())", "false", "true").c_str
()) = ::testing::Message()
;
4256 EXPECT_TRUE(matches("int v[] = { 2, 3 }; void f() { for (int i : v) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int v[] = { 2, 3 }; void f() { for (int i : v) {} }"
, autoType()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int v[] = { 2, 3 }; void f() { for (int i : v) {} }\", autoType())"
, "false", "true").c_str()) = ::testing::Message()
4257 autoType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int v[] = { 2, 3 }; void f() { for (int i : v) {} }"
, autoType()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4257, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int v[] = { 2, 3 }; void f() { for (int i : v) {} }\", autoType())"
, "false", "true").c_str()) = ::testing::Message()
;
4258
4259 // FIXME: Matching against the type-as-written can't work here, because the
4260 // type as written was not deduced.
4261 //EXPECT_TRUE(matches("auto a = 1;",
4262 // autoType(hasDeducedType(isInteger()))));
4263 //EXPECT_TRUE(notMatches("auto b = 2.0;",
4264 // autoType(hasDeducedType(isInteger()))));
4265}
4266
4267TEST(TypeMatching, MatchesFunctionTypes)class TypeMatching_MatchesFunctionTypes_Test : public ::testing
::Test { public: TypeMatching_MatchesFunctionTypes_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_MatchesFunctionTypes_Test
(TypeMatching_MatchesFunctionTypes_Test const &); void operator
=(TypeMatching_MatchesFunctionTypes_Test const &);};::testing
::TestInfo* const TypeMatching_MatchesFunctionTypes_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatching"
, "MatchesFunctionTypes", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_MatchesFunctionTypes_Test>);void TypeMatching_MatchesFunctionTypes_Test
::TestBody()
{
4268 EXPECT_TRUE(matches("int (*f)(int);", functionType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int (*f)(int);"
, functionType()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4268, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int (*f)(int);\", functionType())", "false", "true"
).c_str()) = ::testing::Message()
;
4269 EXPECT_TRUE(matches("void f(int i) {}", functionType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f(int i) {}"
, functionType()))) ; else ::testing::internal::AssertHelper(
::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4269, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f(int i) {}\", functionType())", "false", "true"
).c_str()) = ::testing::Message()
;
4270}
4271
4272TEST(TypeMatching, MatchesParenType)class TypeMatching_MatchesParenType_Test : public ::testing::
Test { public: TypeMatching_MatchesParenType_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_MatchesParenType_Test
(TypeMatching_MatchesParenType_Test const &); void operator
=(TypeMatching_MatchesParenType_Test const &);};::testing
::TestInfo* const TypeMatching_MatchesParenType_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatching"
, "MatchesParenType", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< TypeMatching_MatchesParenType_Test
>);void TypeMatching_MatchesParenType_Test::TestBody()
{
4273 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int (*array)[4];"
, varDecl(hasType(pointsTo(parenType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4274, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int (*array)[4];\", varDecl(hasType(pointsTo(parenType()))))"
, "false", "true").c_str()) = ::testing::Message()
4274 matches("int (*array)[4];", varDecl(hasType(pointsTo(parenType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int (*array)[4];"
, varDecl(hasType(pointsTo(parenType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4274, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int (*array)[4];\", varDecl(hasType(pointsTo(parenType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4275 EXPECT_TRUE(notMatches("int *array[4];", varDecl(hasType(parenType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int *array[4];"
, varDecl(hasType(parenType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4275, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int *array[4];\", varDecl(hasType(parenType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4276
4277 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int (*ptr_to_func)(int);"
, varDecl(hasType(pointsTo(parenType(innerType(functionType()
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4279, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int (*ptr_to_func)(int);\", varDecl(hasType(pointsTo(parenType(innerType(functionType()))))))"
, "false", "true").c_str()) = ::testing::Message()
4278 "int (*ptr_to_func)(int);",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int (*ptr_to_func)(int);"
, varDecl(hasType(pointsTo(parenType(innerType(functionType()
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4279, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int (*ptr_to_func)(int);\", varDecl(hasType(pointsTo(parenType(innerType(functionType()))))))"
, "false", "true").c_str()) = ::testing::Message()
4279 varDecl(hasType(pointsTo(parenType(innerType(functionType())))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int (*ptr_to_func)(int);"
, varDecl(hasType(pointsTo(parenType(innerType(functionType()
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4279, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int (*ptr_to_func)(int);\", varDecl(hasType(pointsTo(parenType(innerType(functionType()))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4280 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int (*ptr_to_array)[4];"
, varDecl(hasType(pointsTo(parenType(innerType(functionType()
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int (*ptr_to_array)[4];\", varDecl(hasType(pointsTo(parenType(innerType(functionType()))))))"
, "false", "true").c_str()) = ::testing::Message()
4281 "int (*ptr_to_array)[4];",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int (*ptr_to_array)[4];"
, varDecl(hasType(pointsTo(parenType(innerType(functionType()
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int (*ptr_to_array)[4];\", varDecl(hasType(pointsTo(parenType(innerType(functionType()))))))"
, "false", "true").c_str()) = ::testing::Message()
4282 varDecl(hasType(pointsTo(parenType(innerType(functionType())))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int (*ptr_to_array)[4];"
, varDecl(hasType(pointsTo(parenType(innerType(functionType()
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4282, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int (*ptr_to_array)[4];\", varDecl(hasType(pointsTo(parenType(innerType(functionType()))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4283}
4284
4285TEST(TypeMatching, PointerTypes)class TypeMatching_PointerTypes_Test : public ::testing::Test
{ public: TypeMatching_PointerTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_PointerTypes_Test(TypeMatching_PointerTypes_Test
const &); void operator=(TypeMatching_PointerTypes_Test const
&);};::testing::TestInfo* const TypeMatching_PointerTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "PointerTypes", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_PointerTypes_Test>);void TypeMatching_PointerTypes_Test
::TestBody()
{
4286 // FIXME: Reactive when these tests can be more specific (not matching
4287 // implicit code on certain platforms), likely when we have hasDescendant for
4288 // Types/TypeLocs.
4289 //EXPECT_TRUE(matchAndVerifyResultTrue(
4290 // "int* a;",
4291 // pointerTypeLoc(pointeeLoc(typeLoc().bind("loc"))),
4292 // new VerifyIdIsBoundTo<TypeLoc>("loc", 1)));
4293 //EXPECT_TRUE(matchAndVerifyResultTrue(
4294 // "int* a;",
4295 // pointerTypeLoc().bind("loc"),
4296 // new VerifyIdIsBoundTo<TypeLoc>("loc", 1)));
4297 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int** a;", loc
(pointerType(pointee(qualType())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4299, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int** a;\", loc(pointerType(pointee(qualType()))))"
, "false", "true").c_str()) = ::testing::Message()
4298 "int** a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int** a;", loc
(pointerType(pointee(qualType())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4299, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int** a;\", loc(pointerType(pointee(qualType()))))"
, "false", "true").c_str()) = ::testing::Message()
4299 loc(pointerType(pointee(qualType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int** a;", loc
(pointerType(pointee(qualType())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4299, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int** a;\", loc(pointerType(pointee(qualType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4300 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int** a;", loc
(pointerType(pointee(pointerType())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4302, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int** a;\", loc(pointerType(pointee(pointerType()))))"
, "false", "true").c_str()) = ::testing::Message()
4301 "int** a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int** a;", loc
(pointerType(pointee(pointerType())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4302, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int** a;\", loc(pointerType(pointee(pointerType()))))"
, "false", "true").c_str()) = ::testing::Message()
4302 loc(pointerType(pointee(pointerType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int** a;", loc
(pointerType(pointee(pointerType())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4302, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int** a;\", loc(pointerType(pointee(pointerType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4303 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int* b; int* * const a = &b;"
, loc(qualType(isConstQualified(), pointerType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4305, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int* b; int* * const a = &b;\", loc(qualType(isConstQualified(), pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4304 "int* b; int* * const a = &b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int* b; int* * const a = &b;"
, loc(qualType(isConstQualified(), pointerType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4305, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int* b; int* * const a = &b;\", loc(qualType(isConstQualified(), pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4305 loc(qualType(isConstQualified(), pointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int* b; int* * const a = &b;"
, loc(qualType(isConstQualified(), pointerType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4305, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int* b; int* * const a = &b;\", loc(qualType(isConstQualified(), pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4306
4307 std::string Fragment = "struct A { int i; }; int A::* ptr = &A::i;";
4308 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(blockPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4309, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(blockPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4309 hasType(blockPointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(blockPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4309, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(blockPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4310 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ptr"), hasType(memberPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4311, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ptr\"), hasType(memberPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4311 hasType(memberPointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ptr"), hasType(memberPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4311, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ptr\"), hasType(memberPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4312 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(pointerType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4313, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4313 hasType(pointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(pointerType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4313, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4314 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(referenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4315, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4315 hasType(referenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(referenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4315, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4316 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(lValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4317 hasType(lValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(lValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4317, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4318 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(rValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4319, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4319 hasType(rValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(rValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4319, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4320
4321 Fragment = "int *ptr;";
4322 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(blockPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4323, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(blockPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4323 hasType(blockPointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(blockPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4323, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(blockPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4324 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(memberPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4325, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(memberPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4325 hasType(memberPointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(memberPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4325, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(memberPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4326 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ptr"), hasType(pointerType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4327, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ptr\"), hasType(pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4327 hasType(pointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ptr"), hasType(pointerType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4327, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ptr\"), hasType(pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4328 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ptr"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(referenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4329, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4329 hasType(referenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ptr"), hasType(referenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4329, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ptr\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4330
4331 Fragment = "int a; int &ref = a;";
4332 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(blockPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4333, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(blockPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4333 hasType(blockPointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(blockPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4333, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(blockPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4334 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(memberPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4335, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(memberPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4335 hasType(memberPointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(memberPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4335, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(memberPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4336 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(pointerType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4337, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4337 hasType(pointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(pointerType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4337, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4338 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ref"), hasType(referenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4339, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ref\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4339 hasType(referenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ref"), hasType(referenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4339, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ref\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4340 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ref"), hasType(lValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4341, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ref\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4341 hasType(lValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ref"), hasType(lValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4341, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ref\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4342 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(rValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4343 hasType(rValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(rValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4343, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4344
4345 Fragment = "int &&ref = 2;";
4346 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(blockPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4347, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(blockPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4347 hasType(blockPointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(blockPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4347, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(blockPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4348 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(memberPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4349, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(memberPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4349 hasType(memberPointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(memberPointerType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4349, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(memberPointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4350 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(pointerType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4351, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
4351 hasType(pointerType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(pointerType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4351, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(pointerType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4352 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ref"), hasType(referenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4353, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ref\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4353 hasType(referenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ref"), hasType(referenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4353, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ref\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4354 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(lValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4355, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4355 hasType(lValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("ref"), hasType(lValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4355, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"ref\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4356 EXPECT_TRUE(matches(Fragment, varDecl(hasName("ref"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ref"), hasType(rValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4357, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ref\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4357 hasType(rValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("ref"), hasType(rValueReferenceType()))))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4357, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"ref\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4358}
4359
4360TEST(TypeMatching, AutoRefTypes)class TypeMatching_AutoRefTypes_Test : public ::testing::Test
{ public: TypeMatching_AutoRefTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_AutoRefTypes_Test(TypeMatching_AutoRefTypes_Test
const &); void operator=(TypeMatching_AutoRefTypes_Test const
&);};::testing::TestInfo* const TypeMatching_AutoRefTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "AutoRefTypes", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_AutoRefTypes_Test>);void TypeMatching_AutoRefTypes_Test
::TestBody()
{
4361 std::string Fragment = "auto a = 1;"
4362 "auto b = a;"
4363 "auto &c = a;"
4364 "auto &&d = c;"
4365 "auto &&e = 2;";
4366 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("a"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("a"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4367, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"a\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4367 hasType(referenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("a"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4367, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"a\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4368 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("b"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("b"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"b\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4369 hasType(referenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("b"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4369, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"b\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4370 EXPECT_TRUE(matches(Fragment, varDecl(hasName("c"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("c"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4371, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"c\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4371 hasType(referenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("c"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4371, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"c\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4372 EXPECT_TRUE(matches(Fragment, varDecl(hasName("c"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("c"), hasType(lValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4373, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"c\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4373 hasType(lValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("c"), hasType(lValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4373, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"c\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4374 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("c"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("c"), hasType(rValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4375, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"c\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4375 hasType(rValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("c"), hasType(rValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4375, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"c\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4376 EXPECT_TRUE(matches(Fragment, varDecl(hasName("d"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("d"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"d\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4377 hasType(referenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("d"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4377, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"d\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4378 EXPECT_TRUE(matches(Fragment, varDecl(hasName("d"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("d"), hasType(lValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4379, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"d\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4379 hasType(lValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("d"), hasType(lValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4379, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"d\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4380 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("d"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("d"), hasType(rValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4381, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"d\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4381 hasType(rValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("d"), hasType(rValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4381, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"d\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4382 EXPECT_TRUE(matches(Fragment, varDecl(hasName("e"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("e"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4383, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"e\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4383 hasType(referenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("e"), hasType(referenceType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4383, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"e\"), hasType(referenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4384 EXPECT_TRUE(notMatches(Fragment, varDecl(hasName("e"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("e"), hasType(lValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4385, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"e\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4385 hasType(lValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches(Fragment, varDecl
(hasName("e"), hasType(lValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4385, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(Fragment, varDecl(hasName(\"e\"), hasType(lValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4386 EXPECT_TRUE(matches(Fragment, varDecl(hasName("e"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("e"), hasType(rValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4387, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"e\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
4387 hasType(rValueReferenceType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(Fragment, varDecl
(hasName("e"), hasType(rValueReferenceType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4387, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(Fragment, varDecl(hasName(\"e\"), hasType(rValueReferenceType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4388}
4389
4390TEST(TypeMatching, PointeeTypes)class TypeMatching_PointeeTypes_Test : public ::testing::Test
{ public: TypeMatching_PointeeTypes_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_PointeeTypes_Test(TypeMatching_PointeeTypes_Test
const &); void operator=(TypeMatching_PointeeTypes_Test const
&);};::testing::TestInfo* const TypeMatching_PointeeTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "PointeeTypes", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_PointeeTypes_Test>);void TypeMatching_PointeeTypes_Test
::TestBody()
{
4391 EXPECT_TRUE(matches("int b; int &a = b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int b; int &a = b;"
, referenceType(pointee(builtinType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4392, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int b; int &a = b;\", referenceType(pointee(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4392 referenceType(pointee(builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int b; int &a = b;"
, referenceType(pointee(builtinType()))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4392, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int b; int &a = b;\", referenceType(pointee(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4393 EXPECT_TRUE(matches("int *a;", pointerType(pointee(builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int *a;", pointerType
(pointee(builtinType()))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4393, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int *a;\", pointerType(pointee(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4394
4395 EXPECT_TRUE(matches("int *a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int *a;", loc
(pointerType(pointee(builtinType())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4396, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int *a;\", loc(pointerType(pointee(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4396 loc(pointerType(pointee(builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int *a;", loc
(pointerType(pointee(builtinType())))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4396, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int *a;\", loc(pointerType(pointee(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4397
4398 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int const *A;"
, pointerType(pointee(isConstQualified(), builtinType()))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4400, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int const *A;\", pointerType(pointee(isConstQualified(), builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4399 "int const *A;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int const *A;"
, pointerType(pointee(isConstQualified(), builtinType()))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4400, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int const *A;\", pointerType(pointee(isConstQualified(), builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4400 pointerType(pointee(isConstQualified(), builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int const *A;"
, pointerType(pointee(isConstQualified(), builtinType()))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4400, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int const *A;\", pointerType(pointee(isConstQualified(), builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4401 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int *A;"
, pointerType(pointee(isConstQualified(), builtinType()))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4403, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int *A;\", pointerType(pointee(isConstQualified(), builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4402 "int *A;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int *A;"
, pointerType(pointee(isConstQualified(), builtinType()))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4403, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int *A;\", pointerType(pointee(isConstQualified(), builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4403 pointerType(pointee(isConstQualified(), builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int *A;"
, pointerType(pointee(isConstQualified(), builtinType()))))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4403, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int *A;\", pointerType(pointee(isConstQualified(), builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4404}
4405
4406TEST(TypeMatching, MatchesPointersToConstTypes)class TypeMatching_MatchesPointersToConstTypes_Test : public ::
testing::Test { public: TypeMatching_MatchesPointersToConstTypes_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); TypeMatching_MatchesPointersToConstTypes_Test
(TypeMatching_MatchesPointersToConstTypes_Test const &); void
operator=(TypeMatching_MatchesPointersToConstTypes_Test const
&);};::testing::TestInfo* const TypeMatching_MatchesPointersToConstTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "MatchesPointersToConstTypes", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< TypeMatching_MatchesPointersToConstTypes_Test
>);void TypeMatching_MatchesPointersToConstTypes_Test::TestBody
()
{
4407 EXPECT_TRUE(matches("int b; int * const a = &b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int b; int * const a = &b;"
, loc(pointerType())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4408, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int b; int * const a = &b;\", loc(pointerType()))"
, "false", "true").c_str()) = ::testing::Message()
4408 loc(pointerType())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int b; int * const a = &b;"
, loc(pointerType())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4408, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int b; int * const a = &b;\", loc(pointerType()))"
, "false", "true").c_str()) = ::testing::Message()
;
4409 EXPECT_TRUE(matches("int b; int * const a = &b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int b; int * const a = &b;"
, loc(pointerType())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4410, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int b; int * const a = &b;\", loc(pointerType()))"
, "false", "true").c_str()) = ::testing::Message()
4410 loc(pointerType())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("int b; int * const a = &b;"
, loc(pointerType())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4410, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"int b; int * const a = &b;\", loc(pointerType()))"
, "false", "true").c_str()) = ::testing::Message()
;
4411 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int b; const int * a = &b;"
, loc(pointerType(pointee(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4413, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int b; const int * a = &b;\", loc(pointerType(pointee(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4412 "int b; const int * a = &b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int b; const int * a = &b;"
, loc(pointerType(pointee(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4413, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int b; const int * a = &b;\", loc(pointerType(pointee(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
4413 loc(pointerType(pointee(builtinType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int b; const int * a = &b;"
, loc(pointerType(pointee(builtinType())))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4413, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int b; const int * a = &b;\", loc(pointerType(pointee(builtinType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4414 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int b; const int * a = &b;"
, pointerType(pointee(builtinType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4416, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int b; const int * a = &b;\", pointerType(pointee(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4415 "int b; const int * a = &b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int b; const int * a = &b;"
, pointerType(pointee(builtinType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4416, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int b; const int * a = &b;\", pointerType(pointee(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
4416 pointerType(pointee(builtinType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int b; const int * a = &b;"
, pointerType(pointee(builtinType()))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4416, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int b; const int * a = &b;\", pointerType(pointee(builtinType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4417}
4418
4419TEST(TypeMatching, MatchesTypedefTypes)class TypeMatching_MatchesTypedefTypes_Test : public ::testing
::Test { public: TypeMatching_MatchesTypedefTypes_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_MatchesTypedefTypes_Test
(TypeMatching_MatchesTypedefTypes_Test const &); void operator
=(TypeMatching_MatchesTypedefTypes_Test const &);};::testing
::TestInfo* const TypeMatching_MatchesTypedefTypes_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatching"
, "MatchesTypedefTypes", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_MatchesTypedefTypes_Test>);void TypeMatching_MatchesTypedefTypes_Test
::TestBody()
{
4420 EXPECT_TRUE(matches("typedef int X; X a;", varDecl(hasName("a"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int X; X a;"
, varDecl(hasName("a"), hasType(typedefType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4421, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int X; X a;\", varDecl(hasName(\"a\"), hasType(typedefType())))"
, "false", "true").c_str()) = ::testing::Message()
4421 hasType(typedefType()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int X; X a;"
, varDecl(hasName("a"), hasType(typedefType()))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4421, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int X; X a;\", varDecl(hasName(\"a\"), hasType(typedefType())))"
, "false", "true").c_str()) = ::testing::Message()
;
4422}
4423
4424TEST(TypeMatching, MatchesTemplateSpecializationType)class TypeMatching_MatchesTemplateSpecializationType_Test : public
::testing::Test { public: TypeMatching_MatchesTemplateSpecializationType_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); TypeMatching_MatchesTemplateSpecializationType_Test
(TypeMatching_MatchesTemplateSpecializationType_Test const &
); void operator=(TypeMatching_MatchesTemplateSpecializationType_Test
const &);};::testing::TestInfo* const TypeMatching_MatchesTemplateSpecializationType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "MatchesTemplateSpecializationType", __null,
__null, (::testing::internal::GetTestTypeId()), ::testing::Test
::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::testing
::internal::TestFactoryImpl< TypeMatching_MatchesTemplateSpecializationType_Test
>);void TypeMatching_MatchesTemplateSpecializationType_Test
::TestBody()
{
4425 EXPECT_TRUE(matches("template <typename T> class A{}; A<int> a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class A{}; A<int> a;"
, templateSpecializationType()))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4426, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class A{}; A<int> a;\", templateSpecializationType())"
, "false", "true").c_str()) = ::testing::Message()
4426 templateSpecializationType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class A{}; A<int> a;"
, templateSpecializationType()))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4426, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class A{}; A<int> a;\", templateSpecializationType())"
, "false", "true").c_str()) = ::testing::Message()
;
4427}
4428
4429TEST(TypeMatching, MatchesRecordType)class TypeMatching_MatchesRecordType_Test : public ::testing::
Test { public: TypeMatching_MatchesRecordType_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); TypeMatching_MatchesRecordType_Test
(TypeMatching_MatchesRecordType_Test const &); void operator
=(TypeMatching_MatchesRecordType_Test const &);};::testing
::TestInfo* const TypeMatching_MatchesRecordType_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatching"
, "MatchesRecordType", __null, __null, (::testing::internal::
GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing::
Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_MatchesRecordType_Test>);void TypeMatching_MatchesRecordType_Test
::TestBody()
{
4430 EXPECT_TRUE(matches("class C{}; C c;", recordType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class C{}; C c;"
, recordType()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4430, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class C{}; C c;\", recordType())", "false", "true"
).c_str()) = ::testing::Message()
;
4431 EXPECT_TRUE(matches("struct S{}; S s;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S{}; S s;"
, recordType(hasDeclaration(recordDecl(hasName("S"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4432, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S{}; S s;\", recordType(hasDeclaration(recordDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
4432 recordType(hasDeclaration(recordDecl(hasName("S"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct S{}; S s;"
, recordType(hasDeclaration(recordDecl(hasName("S"))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4432, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct S{}; S s;\", recordType(hasDeclaration(recordDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
4433 EXPECT_TRUE(notMatches("int i;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i;", recordType
(hasDeclaration(recordDecl(hasName("S"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4434, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i;\", recordType(hasDeclaration(recordDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
4434 recordType(hasDeclaration(recordDecl(hasName("S"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i;", recordType
(hasDeclaration(recordDecl(hasName("S"))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4434, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i;\", recordType(hasDeclaration(recordDecl(hasName(\"S\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
4435}
4436
4437TEST(TypeMatching, MatchesElaboratedType)class TypeMatching_MatchesElaboratedType_Test : public ::testing
::Test { public: TypeMatching_MatchesElaboratedType_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); TypeMatching_MatchesElaboratedType_Test
(TypeMatching_MatchesElaboratedType_Test const &); void operator
=(TypeMatching_MatchesElaboratedType_Test const &);};::testing
::TestInfo* const TypeMatching_MatchesElaboratedType_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "TypeMatching"
, "MatchesElaboratedType", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeMatching_MatchesElaboratedType_Test>);void TypeMatching_MatchesElaboratedType_Test
::TestBody()
{
4438 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4444, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType())"
, "false", "true").c_str()) = ::testing::Message()
4439 "namespace N {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4444, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType())"
, "false", "true").c_str()) = ::testing::Message()
4440 " namespace M {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4444, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType())"
, "false", "true").c_str()) = ::testing::Message()
4441 " class D {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4444, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType())"
, "false", "true").c_str()) = ::testing::Message()
4442 " }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4444, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType())"
, "false", "true").c_str()) = ::testing::Message()
4443 "}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4444, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType())"
, "false", "true").c_str()) = ::testing::Message()
4444 "N::M::D d;", elaboratedType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4444, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType())"
, "false", "true").c_str()) = ::testing::Message()
;
4445 EXPECT_TRUE(matches("class C {} c;", elaboratedType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class C {} c;"
, elaboratedType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4445, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class C {} c;\", elaboratedType())", "false", "true"
).c_str()) = ::testing::Message()
;
4446 EXPECT_TRUE(notMatches("class C {}; C c;", elaboratedType()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class C {}; C c;"
, elaboratedType()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4446, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class C {}; C c;\", elaboratedType())", "false"
, "true").c_str()) = ::testing::Message()
;
4447}
4448
4449TEST(ElaboratedTypeNarrowing, hasQualifier)class ElaboratedTypeNarrowing_hasQualifier_Test : public ::testing
::Test { public: ElaboratedTypeNarrowing_hasQualifier_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ElaboratedTypeNarrowing_hasQualifier_Test
(ElaboratedTypeNarrowing_hasQualifier_Test const &); void
operator=(ElaboratedTypeNarrowing_hasQualifier_Test const &
);};::testing::TestInfo* const ElaboratedTypeNarrowing_hasQualifier_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"ElaboratedTypeNarrowing", "hasQualifier", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< ElaboratedTypeNarrowing_hasQualifier_Test
>);void ElaboratedTypeNarrowing_hasQualifier_Test::TestBody
()
{
4450 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4457, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4451 "namespace N {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4457, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4452 " namespace M {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4457, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4453 " class D {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4457, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4454 " }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4457, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4455 "}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4457, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4456 "N::M::D d;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4457, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4457 elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))
) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4457, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4458 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(hasQualifier(hasPrefix
(specifiesNamespace(hasName("N")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4459 "namespace M {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(hasQualifier(hasPrefix
(specifiesNamespace(hasName("N")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4460 " class D {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(hasQualifier(hasPrefix
(specifiesNamespace(hasName("N")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4461 "}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(hasQualifier(hasPrefix
(specifiesNamespace(hasName("N")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4462 "M::D d;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(hasQualifier(hasPrefix
(specifiesNamespace(hasName("N")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4463 elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName("N")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(hasQualifier(hasPrefix
(specifiesNamespace(hasName("N")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4463, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(hasQualifier(hasPrefix(specifiesNamespace(hasName(\"N\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4464 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct D {"
"} d;", elaboratedType(hasQualifier(nestedNameSpecifier())))
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4467, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct D {\" \"} d;\", elaboratedType(hasQualifier(nestedNameSpecifier())))"
, "false", "true").c_str()) = ::testing::Message()
4465 "struct D {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct D {"
"} d;", elaboratedType(hasQualifier(nestedNameSpecifier())))
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4467, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct D {\" \"} d;\", elaboratedType(hasQualifier(nestedNameSpecifier())))"
, "false", "true").c_str()) = ::testing::Message()
4466 "} d;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct D {"
"} d;", elaboratedType(hasQualifier(nestedNameSpecifier())))
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4467, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct D {\" \"} d;\", elaboratedType(hasQualifier(nestedNameSpecifier())))"
, "false", "true").c_str()) = ::testing::Message()
4467 elaboratedType(hasQualifier(nestedNameSpecifier()))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct D {"
"} d;", elaboratedType(hasQualifier(nestedNameSpecifier())))
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4467, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct D {\" \"} d;\", elaboratedType(hasQualifier(nestedNameSpecifier())))"
, "false", "true").c_str()) = ::testing::Message()
;
4468}
4469
4470TEST(ElaboratedTypeNarrowing, namesType)class ElaboratedTypeNarrowing_namesType_Test : public ::testing
::Test { public: ElaboratedTypeNarrowing_namesType_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); ElaboratedTypeNarrowing_namesType_Test
(ElaboratedTypeNarrowing_namesType_Test const &); void operator
=(ElaboratedTypeNarrowing_namesType_Test const &);};::testing
::TestInfo* const ElaboratedTypeNarrowing_namesType_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ElaboratedTypeNarrowing"
, "namesType", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ElaboratedTypeNarrowing_namesType_Test
>);void ElaboratedTypeNarrowing_namesType_Test::TestBody()
{
4471 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(elaboratedType(namesType(recordType( hasDeclaration(namedDecl
(hasName("D")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(elaboratedType(namesType(recordType( hasDeclaration(namedDecl(hasName(\"D\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4472 "namespace N {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(elaboratedType(namesType(recordType( hasDeclaration(namedDecl
(hasName("D")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(elaboratedType(namesType(recordType( hasDeclaration(namedDecl(hasName(\"D\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4473 " namespace M {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(elaboratedType(namesType(recordType( hasDeclaration(namedDecl
(hasName("D")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(elaboratedType(namesType(recordType( hasDeclaration(namedDecl(hasName(\"D\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4474 " class D {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(elaboratedType(namesType(recordType( hasDeclaration(namedDecl
(hasName("D")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(elaboratedType(namesType(recordType( hasDeclaration(namedDecl(hasName(\"D\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4475 " }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(elaboratedType(namesType(recordType( hasDeclaration(namedDecl
(hasName("D")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(elaboratedType(namesType(recordType( hasDeclaration(namedDecl(hasName(\"D\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4476 "}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(elaboratedType(namesType(recordType( hasDeclaration(namedDecl
(hasName("D")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(elaboratedType(namesType(recordType( hasDeclaration(namedDecl(hasName(\"D\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4477 "N::M::D d;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(elaboratedType(namesType(recordType( hasDeclaration(namedDecl
(hasName("D")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(elaboratedType(namesType(recordType( hasDeclaration(namedDecl(hasName(\"D\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4478 elaboratedType(elaboratedType(namesType(recordType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(elaboratedType(namesType(recordType( hasDeclaration(namedDecl
(hasName("D")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(elaboratedType(namesType(recordType( hasDeclaration(namedDecl(hasName(\"D\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4479 hasDeclaration(namedDecl(hasName("D")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "namespace N {"
" namespace M {" " class D {};" " }" "}" "N::M::D d;", elaboratedType
(elaboratedType(namesType(recordType( hasDeclaration(namedDecl
(hasName("D")))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4479, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"namespace N {\" \" namespace M {\" \" class D {};\" \" }\" \"}\" \"N::M::D d;\", elaboratedType(elaboratedType(namesType(recordType( hasDeclaration(namedDecl(hasName(\"D\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4480 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(elaboratedType
(namesType(typedefType())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(elaboratedType(namesType(typedefType()))))"
, "false", "true").c_str()) = ::testing::Message()
4481 "namespace M {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(elaboratedType
(namesType(typedefType())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(elaboratedType(namesType(typedefType()))))"
, "false", "true").c_str()) = ::testing::Message()
4482 " class D {};"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(elaboratedType
(namesType(typedefType())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(elaboratedType(namesType(typedefType()))))"
, "false", "true").c_str()) = ::testing::Message()
4483 "}"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(elaboratedType
(namesType(typedefType())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(elaboratedType(namesType(typedefType()))))"
, "false", "true").c_str()) = ::testing::Message()
4484 "M::D d;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(elaboratedType
(namesType(typedefType())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(elaboratedType(namesType(typedefType()))))"
, "false", "true").c_str()) = ::testing::Message()
4485 elaboratedType(elaboratedType(namesType(typedefType())))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "namespace M {"
" class D {};" "}" "M::D d;", elaboratedType(elaboratedType
(namesType(typedefType())))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4485, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"namespace M {\" \" class D {};\" \"}\" \"M::D d;\", elaboratedType(elaboratedType(namesType(typedefType()))))"
, "false", "true").c_str()) = ::testing::Message()
;
4486}
4487
4488TEST(TypeMatching, MatchesSubstTemplateTypeParmType)class TypeMatching_MatchesSubstTemplateTypeParmType_Test : public
::testing::Test { public: TypeMatching_MatchesSubstTemplateTypeParmType_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); TypeMatching_MatchesSubstTemplateTypeParmType_Test
(TypeMatching_MatchesSubstTemplateTypeParmType_Test const &
); void operator=(TypeMatching_MatchesSubstTemplateTypeParmType_Test
const &);};::testing::TestInfo* const TypeMatching_MatchesSubstTemplateTypeParmType_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeMatching", "MatchesSubstTemplateTypeParmType", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< TypeMatching_MatchesSubstTemplateTypeParmType_Test
>);void TypeMatching_MatchesSubstTemplateTypeParmType_Test
::TestBody()
{
4489 const std::string code = "template <typename T>"
4490 "int F() {"
4491 " return 1 + T();"
4492 "}"
4493 "int i = F<int>();";
4494 EXPECT_FALSE(matches(code, binaryOperator(hasLHS(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches(code, binaryOperator
(hasLHS( expr(hasType(substTemplateTypeParmType())))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4495, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(code, binaryOperator(hasLHS( expr(hasType(substTemplateTypeParmType())))))"
, "true", "false").c_str()) = ::testing::Message()
4495 expr(hasType(substTemplateTypeParmType()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches(code, binaryOperator
(hasLHS( expr(hasType(substTemplateTypeParmType())))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4495, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(code, binaryOperator(hasLHS( expr(hasType(substTemplateTypeParmType())))))"
, "true", "false").c_str()) = ::testing::Message()
;
4496 EXPECT_TRUE(matches(code, binaryOperator(hasRHS(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(code, binaryOperator
(hasRHS( expr(hasType(substTemplateTypeParmType()))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4497, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(code, binaryOperator(hasRHS( expr(hasType(substTemplateTypeParmType())))))"
, "false", "true").c_str()) = ::testing::Message()
4497 expr(hasType(substTemplateTypeParmType()))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches(code, binaryOperator
(hasRHS( expr(hasType(substTemplateTypeParmType()))))))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4497, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(code, binaryOperator(hasRHS( expr(hasType(substTemplateTypeParmType())))))"
, "false", "true").c_str()) = ::testing::Message()
;
4498}
4499
4500TEST(NNS, MatchesNestedNameSpecifiers)class NNS_MatchesNestedNameSpecifiers_Test : public ::testing
::Test { public: NNS_MatchesNestedNameSpecifiers_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); NNS_MatchesNestedNameSpecifiers_Test
(NNS_MatchesNestedNameSpecifiers_Test const &); void operator
=(NNS_MatchesNestedNameSpecifiers_Test const &);};::testing
::TestInfo* const NNS_MatchesNestedNameSpecifiers_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "NNS", "MatchesNestedNameSpecifiers"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< NNS_MatchesNestedNameSpecifiers_Test
>);void NNS_MatchesNestedNameSpecifiers_Test::TestBody()
{
4501 EXPECT_TRUE(matches("namespace ns { struct A {}; } ns::A a;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace ns { struct A {}; } ns::A a;"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4502, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace ns { struct A {}; } ns::A a;\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
4502 nestedNameSpecifier()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace ns { struct A {}; } ns::A a;"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4502, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace ns { struct A {}; } ns::A a;\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
;
4503 EXPECT_TRUE(matches("template <typename T> class A { typename T::B b; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class A { typename T::B b; };"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4504, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class A { typename T::B b; };\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
4504 nestedNameSpecifier()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("template <typename T> class A { typename T::B b; };"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4504, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"template <typename T> class A { typename T::B b; };\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
;
4505 EXPECT_TRUE(matches("struct A { void f(); }; void A::f() {}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void f(); }; void A::f() {}"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4506, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void f(); }; void A::f() {}\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
4506 nestedNameSpecifier()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { void f(); }; void A::f() {}"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4506, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { void f(); }; void A::f() {}\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
;
4507 EXPECT_TRUE(matches("namespace a { namespace b {} } namespace ab = a::b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b {} } namespace ab = a::b;"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4508, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b {} } namespace ab = a::b;\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
4508 nestedNameSpecifier()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace a { namespace b {} } namespace ab = a::b;"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4508, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace a { namespace b {} } namespace ab = a::b;\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
;
4509
4510 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { static void f() {} }; void g() { A::f(); }"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4512, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { static void f() {} }; void g() { A::f(); }\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
4511 "struct A { static void f() {} }; void g() { A::f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { static void f() {} }; void g() { A::f(); }"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4512, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { static void f() {} }; void g() { A::f(); }\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
4512 nestedNameSpecifier()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { static void f() {} }; void g() { A::f(); }"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4512, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { static void f() {} }; void g() { A::f(); }\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
;
4513 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { static void f() {} }; void g(A* a) { a->f(); }"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4515, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { static void f() {} }; void g(A* a) { a->f(); }\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
4514 "struct A { static void f() {} }; void g(A* a) { a->f(); }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { static void f() {} }; void g(A* a) { a->f(); }"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4515, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { static void f() {} }; void g(A* a) { a->f(); }\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
4515 nestedNameSpecifier()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "struct A { static void f() {} }; void g(A* a) { a->f(); }"
, nestedNameSpecifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4515, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"struct A { static void f() {} }; void g(A* a) { a->f(); }\", nestedNameSpecifier())"
, "false", "true").c_str()) = ::testing::Message()
;
4516}
4517
4518TEST(NullStatement, SimpleCases)class NullStatement_SimpleCases_Test : public ::testing::Test
{ public: NullStatement_SimpleCases_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); NullStatement_SimpleCases_Test(NullStatement_SimpleCases_Test
const &); void operator=(NullStatement_SimpleCases_Test const
&);};::testing::TestInfo* const NullStatement_SimpleCases_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"NullStatement", "SimpleCases", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< NullStatement_SimpleCases_Test>);void NullStatement_SimpleCases_Test
::TestBody()
{
4519 EXPECT_TRUE(matches("void f() {int i;;}", nullStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() {int i;;}"
, nullStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4519, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() {int i;;}\", nullStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
4520 EXPECT_TRUE(notMatches("void f() {int i;}", nullStmt()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("void f() {int i;}"
, nullStmt()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4520, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"void f() {int i;}\", nullStmt())", "false", "true"
).c_str()) = ::testing::Message()
;
4521}
4522
4523TEST(NS, Anonymous)class NS_Anonymous_Test : public ::testing::Test { public: NS_Anonymous_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); NS_Anonymous_Test
(NS_Anonymous_Test const &); void operator=(NS_Anonymous_Test
const &);};::testing::TestInfo* const NS_Anonymous_Test ::
test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "NS"
, "Anonymous", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< NS_Anonymous_Test
>);void NS_Anonymous_Test::TestBody()
{
4524 EXPECT_TRUE(notMatches("namespace N {}", namespaceDecl(isAnonymous())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace N {}"
, namespaceDecl(isAnonymous())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4524, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace N {}\", namespaceDecl(isAnonymous()))"
, "false", "true").c_str()) = ::testing::Message()
;
4525 EXPECT_TRUE(matches("namespace {}", namespaceDecl(isAnonymous())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace {}"
, namespaceDecl(isAnonymous())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4525, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace {}\", namespaceDecl(isAnonymous()))", "false"
, "true").c_str()) = ::testing::Message()
;
4526}
4527
4528TEST(NS, Alias)class NS_Alias_Test : public ::testing::Test { public: NS_Alias_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); NS_Alias_Test(NS_Alias_Test
const &); void operator=(NS_Alias_Test const &);};::
testing::TestInfo* const NS_Alias_Test ::test_info_ = ::testing
::internal::MakeAndRegisterTestInfo( "NS", "Alias", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< NS_Alias_Test>);void NS_Alias_Test::TestBody
()
{
4529 EXPECT_TRUE(matches("namespace test {} namespace alias = ::test;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace test {} namespace alias = ::test;"
, namespaceAliasDecl(hasName("alias"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4530, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace test {} namespace alias = ::test;\", namespaceAliasDecl(hasName(\"alias\")))"
, "false", "true").c_str()) = ::testing::Message()
4530 namespaceAliasDecl(hasName("alias"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace test {} namespace alias = ::test;"
, namespaceAliasDecl(hasName("alias"))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4530, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace test {} namespace alias = ::test;\", namespaceAliasDecl(hasName(\"alias\")))"
, "false", "true").c_str()) = ::testing::Message()
;
4531}
4532
4533TEST(NNS, MatchesTypes)class NNS_MatchesTypes_Test : public ::testing::Test { public
: NNS_MatchesTypes_Test() {} private: virtual void TestBody()
; static ::testing::TestInfo* const test_info_ __attribute__ (
(unused)); NNS_MatchesTypes_Test(NNS_MatchesTypes_Test const &
); void operator=(NNS_MatchesTypes_Test const &);};::testing
::TestInfo* const NNS_MatchesTypes_Test ::test_info_ = ::testing
::internal::MakeAndRegisterTestInfo( "NNS", "MatchesTypes", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< NNS_MatchesTypes_Test>
);void NNS_MatchesTypes_Test::TestBody()
{
4534 NestedNameSpecifierMatcher Matcher = nestedNameSpecifier(
4535 specifiesType(hasDeclaration(recordDecl(hasName("A")))));
4536 EXPECT_TRUE(matches("struct A { struct B {}; }; A::B b;", Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { struct B {}; }; A::B b;"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4536, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { struct B {}; }; A::B b;\", Matcher)",
"false", "true").c_str()) = ::testing::Message()
;
4537 EXPECT_TRUE(matches("struct A { struct B { struct C {}; }; }; A::B::C c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { struct B { struct C {}; }; }; A::B::C c;"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4538, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { struct B { struct C {}; }; }; A::B::C c;\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
4538 Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("struct A { struct B { struct C {}; }; }; A::B::C c;"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4538, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"struct A { struct B { struct C {}; }; }; A::B::C c;\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
;
4539 EXPECT_TRUE(notMatches("namespace A { struct B {}; } A::B b;", Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace A { struct B {}; } A::B b;"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4539, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace A { struct B {}; } A::B b;\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
;
4540}
4541
4542TEST(NNS, MatchesNamespaceDecls)class NNS_MatchesNamespaceDecls_Test : public ::testing::Test
{ public: NNS_MatchesNamespaceDecls_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); NNS_MatchesNamespaceDecls_Test(NNS_MatchesNamespaceDecls_Test
const &); void operator=(NNS_MatchesNamespaceDecls_Test const
&);};::testing::TestInfo* const NNS_MatchesNamespaceDecls_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"NNS", "MatchesNamespaceDecls", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< NNS_MatchesNamespaceDecls_Test>);void NNS_MatchesNamespaceDecls_Test
::TestBody()
{
4543 NestedNameSpecifierMatcher Matcher = nestedNameSpecifier(
4544 specifiesNamespace(hasName("ns")));
4545 EXPECT_TRUE(matches("namespace ns { struct A {}; } ns::A a;", Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace ns { struct A {}; } ns::A a;"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4545, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace ns { struct A {}; } ns::A a;\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
;
4546 EXPECT_TRUE(notMatches("namespace xx { struct A {}; } xx::A a;", Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("namespace xx { struct A {}; } xx::A a;"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4546, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"namespace xx { struct A {}; } xx::A a;\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
;
4547 EXPECT_TRUE(notMatches("struct ns { struct A {}; }; ns::A a;", Matcher))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("struct ns { struct A {}; }; ns::A a;"
, Matcher))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4547, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"struct ns { struct A {}; }; ns::A a;\", Matcher)"
, "false", "true").c_str()) = ::testing::Message()
;
4548}
4549
4550TEST(NNS, BindsNestedNameSpecifiers)class NNS_BindsNestedNameSpecifiers_Test : public ::testing::
Test { public: NNS_BindsNestedNameSpecifiers_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); NNS_BindsNestedNameSpecifiers_Test
(NNS_BindsNestedNameSpecifiers_Test const &); void operator
=(NNS_BindsNestedNameSpecifiers_Test const &);};::testing
::TestInfo* const NNS_BindsNestedNameSpecifiers_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "NNS", "BindsNestedNameSpecifiers"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< NNS_BindsNestedNameSpecifiers_Test
>);void NNS_BindsNestedNameSpecifiers_Test::TestBody()
{
4551 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace ns { struct E { struct B {}; }; } ns::E::B b;", nestedNameSpecifier
(specifiesType(asString("struct ns::E"))).bind("nns"), new VerifyIdIsBoundTo
<NestedNameSpecifier>("nns", "ns::struct E::")))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4554, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace ns { struct E { struct B {}; }; } ns::E::B b;\", nestedNameSpecifier(specifiesType(asString(\"struct ns::E\"))).bind(\"nns\"), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"nns\", \"ns::struct E::\"))"
, "false", "true").c_str()) = ::testing::Message()
4552 "namespace ns { struct E { struct B {}; }; } ns::E::B b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace ns { struct E { struct B {}; }; } ns::E::B b;", nestedNameSpecifier
(specifiesType(asString("struct ns::E"))).bind("nns"), new VerifyIdIsBoundTo
<NestedNameSpecifier>("nns", "ns::struct E::")))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4554, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace ns { struct E { struct B {}; }; } ns::E::B b;\", nestedNameSpecifier(specifiesType(asString(\"struct ns::E\"))).bind(\"nns\"), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"nns\", \"ns::struct E::\"))"
, "false", "true").c_str()) = ::testing::Message()
4553 nestedNameSpecifier(specifiesType(asString("struct ns::E"))).bind("nns"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace ns { struct E { struct B {}; }; } ns::E::B b;", nestedNameSpecifier
(specifiesType(asString("struct ns::E"))).bind("nns"), new VerifyIdIsBoundTo
<NestedNameSpecifier>("nns", "ns::struct E::")))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4554, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace ns { struct E { struct B {}; }; } ns::E::B b;\", nestedNameSpecifier(specifiesType(asString(\"struct ns::E\"))).bind(\"nns\"), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"nns\", \"ns::struct E::\"))"
, "false", "true").c_str()) = ::testing::Message()
4554 new VerifyIdIsBoundTo<NestedNameSpecifier>("nns", "ns::struct E::")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace ns { struct E { struct B {}; }; } ns::E::B b;", nestedNameSpecifier
(specifiesType(asString("struct ns::E"))).bind("nns"), new VerifyIdIsBoundTo
<NestedNameSpecifier>("nns", "ns::struct E::")))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4554, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace ns { struct E { struct B {}; }; } ns::E::B b;\", nestedNameSpecifier(specifiesType(asString(\"struct ns::E\"))).bind(\"nns\"), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"nns\", \"ns::struct E::\"))"
, "false", "true").c_str()) = ::testing::Message()
;
4555}
4556
4557TEST(NNS, BindsNestedNameSpecifierLocs)class NNS_BindsNestedNameSpecifierLocs_Test : public ::testing
::Test { public: NNS_BindsNestedNameSpecifierLocs_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); NNS_BindsNestedNameSpecifierLocs_Test
(NNS_BindsNestedNameSpecifierLocs_Test const &); void operator
=(NNS_BindsNestedNameSpecifierLocs_Test const &);};::testing
::TestInfo* const NNS_BindsNestedNameSpecifierLocs_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "NNS", "BindsNestedNameSpecifierLocs"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< NNS_BindsNestedNameSpecifierLocs_Test
>);void NNS_BindsNestedNameSpecifierLocs_Test::TestBody()
{
4558 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace ns { struct B {}; } ns::B b;", loc(nestedNameSpecifier
()).bind("loc"), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("loc", 1)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4561, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace ns { struct B {}; } ns::B b;\", loc(nestedNameSpecifier()).bind(\"loc\"), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"loc\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4559 "namespace ns { struct B {}; } ns::B b;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace ns { struct B {}; } ns::B b;", loc(nestedNameSpecifier
()).bind("loc"), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("loc", 1)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4561, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace ns { struct B {}; } ns::B b;\", loc(nestedNameSpecifier()).bind(\"loc\"), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"loc\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4560 loc(nestedNameSpecifier()).bind("loc"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace ns { struct B {}; } ns::B b;", loc(nestedNameSpecifier
()).bind("loc"), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("loc", 1)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4561, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace ns { struct B {}; } ns::B b;\", loc(nestedNameSpecifier()).bind(\"loc\"), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"loc\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4561 new VerifyIdIsBoundTo<NestedNameSpecifierLoc>("loc", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "namespace ns { struct B {}; } ns::B b;", loc(nestedNameSpecifier
()).bind("loc"), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("loc", 1)))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4561, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"namespace ns { struct B {}; } ns::B b;\", loc(nestedNameSpecifier()).bind(\"loc\"), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"loc\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
4562}
4563
4564TEST(NNS, MatchesNestedNameSpecifierPrefixes)class NNS_MatchesNestedNameSpecifierPrefixes_Test : public ::
testing::Test { public: NNS_MatchesNestedNameSpecifierPrefixes_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); NNS_MatchesNestedNameSpecifierPrefixes_Test
(NNS_MatchesNestedNameSpecifierPrefixes_Test const &); void
operator=(NNS_MatchesNestedNameSpecifierPrefixes_Test const &
);};::testing::TestInfo* const NNS_MatchesNestedNameSpecifierPrefixes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"NNS", "MatchesNestedNameSpecifierPrefixes", __null, __null,
(::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< NNS_MatchesNestedNameSpecifierPrefixes_Test
>);void NNS_MatchesNestedNameSpecifierPrefixes_Test::TestBody
()
{
4565 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { struct B { struct C {}; }; }; A::B::C c;"
, nestedNameSpecifier(hasPrefix(specifiesType(asString("struct A"
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4567, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { struct B { struct C {}; }; }; A::B::C c;\", nestedNameSpecifier(hasPrefix(specifiesType(asString(\"struct A\")))))"
, "false", "true").c_str()) = ::testing::Message()
4566 "struct A { struct B { struct C {}; }; }; A::B::C c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { struct B { struct C {}; }; }; A::B::C c;"
, nestedNameSpecifier(hasPrefix(specifiesType(asString("struct A"
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4567, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { struct B { struct C {}; }; }; A::B::C c;\", nestedNameSpecifier(hasPrefix(specifiesType(asString(\"struct A\")))))"
, "false", "true").c_str()) = ::testing::Message()
4567 nestedNameSpecifier(hasPrefix(specifiesType(asString("struct A"))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { struct B { struct C {}; }; }; A::B::C c;"
, nestedNameSpecifier(hasPrefix(specifiesType(asString("struct A"
))))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4567, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { struct B { struct C {}; }; }; A::B::C c;\", nestedNameSpecifier(hasPrefix(specifiesType(asString(\"struct A\")))))"
, "false", "true").c_str()) = ::testing::Message()
;
4568 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { struct B { struct C {}; }; }; A::B::C c;"
, nestedNameSpecifierLoc(hasPrefix( specifiesTypeLoc(loc(qualType
(asString("struct A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4571, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { struct B { struct C {}; }; }; A::B::C c;\", nestedNameSpecifierLoc(hasPrefix( specifiesTypeLoc(loc(qualType(asString(\"struct A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4569 "struct A { struct B { struct C {}; }; }; A::B::C c;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { struct B { struct C {}; }; }; A::B::C c;"
, nestedNameSpecifierLoc(hasPrefix( specifiesTypeLoc(loc(qualType
(asString("struct A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4571, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { struct B { struct C {}; }; }; A::B::C c;\", nestedNameSpecifierLoc(hasPrefix( specifiesTypeLoc(loc(qualType(asString(\"struct A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4570 nestedNameSpecifierLoc(hasPrefix(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { struct B { struct C {}; }; }; A::B::C c;"
, nestedNameSpecifierLoc(hasPrefix( specifiesTypeLoc(loc(qualType
(asString("struct A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4571, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { struct B { struct C {}; }; }; A::B::C c;\", nestedNameSpecifierLoc(hasPrefix( specifiesTypeLoc(loc(qualType(asString(\"struct A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4571 specifiesTypeLoc(loc(qualType(asString("struct A"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "struct A { struct B { struct C {}; }; }; A::B::C c;"
, nestedNameSpecifierLoc(hasPrefix( specifiesTypeLoc(loc(qualType
(asString("struct A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4571, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct A { struct B { struct C {}; }; }; A::B::C c;\", nestedNameSpecifierLoc(hasPrefix( specifiesTypeLoc(loc(qualType(asString(\"struct A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4572}
4573
4574TEST(NNS, DescendantsOfNestedNameSpecifiers)class NNS_DescendantsOfNestedNameSpecifiers_Test : public ::testing
::Test { public: NNS_DescendantsOfNestedNameSpecifiers_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); NNS_DescendantsOfNestedNameSpecifiers_Test
(NNS_DescendantsOfNestedNameSpecifiers_Test const &); void
operator=(NNS_DescendantsOfNestedNameSpecifiers_Test const &
);};::testing::TestInfo* const NNS_DescendantsOfNestedNameSpecifiers_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"NNS", "DescendantsOfNestedNameSpecifiers", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< NNS_DescendantsOfNestedNameSpecifiers_Test
>);void NNS_DescendantsOfNestedNameSpecifiers_Test::TestBody
()
{
4575 std::string Fragment =
4576 "namespace a { struct A { struct B { struct C {}; }; }; };"
4577 "void f() { a::A::B::C c; }";
4578 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A::B")), hasDescendant(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4582, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), hasDescendant(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4579 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A::B")), hasDescendant(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4582, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), hasDescendant(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4580 nestedNameSpecifier(specifiesType(asString("struct a::A::B")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A::B")), hasDescendant(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4582, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), hasDescendant(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4581 hasDescendant(nestedNameSpecifier(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A::B")), hasDescendant(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4582, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), hasDescendant(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4582 specifiesNamespace(hasName("a")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A::B")), hasDescendant(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4582, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), hasDescendant(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4583 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifier(specifiesType(asString("struct a::A::B")
), has(nestedNameSpecifier( specifiesNamespace(hasName("a")))
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4587, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4584 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifier(specifiesType(asString("struct a::A::B")
), has(nestedNameSpecifier( specifiesNamespace(hasName("a")))
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4587, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4585 nestedNameSpecifier(specifiesType(asString("struct a::A::B")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifier(specifiesType(asString("struct a::A::B")
), has(nestedNameSpecifier( specifiesNamespace(hasName("a")))
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4587, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4586 has(nestedNameSpecifier(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifier(specifiesType(asString("struct a::A::B")
), has(nestedNameSpecifier( specifiesNamespace(hasName("a")))
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4587, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4587 specifiesNamespace(hasName("a")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifier(specifiesType(asString("struct a::A::B")
), has(nestedNameSpecifier( specifiesNamespace(hasName("a")))
))))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4587, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4588 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A")), has(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4592, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4589 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A")), has(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4592, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4590 nestedNameSpecifier(specifiesType(asString("struct a::A")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A")), has(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4592, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4591 has(nestedNameSpecifier(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A")), has(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4592, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4592 specifiesNamespace(hasName("a")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifier
(specifiesType(asString("struct a::A")), has(nestedNameSpecifier
( specifiesNamespace(hasName("a")))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4592, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A\")), has(nestedNameSpecifier( specifiesNamespace(hasName(\"a\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4593
4594 // Not really useful because a NestedNameSpecifier can af at most one child,
4595 // but to complete the interface.
4596 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifier(specifiesType(asString("struct a::A::B"
)), forEach(nestedNameSpecifier().bind("x"))), new VerifyIdIsBoundTo
<NestedNameSpecifier>("x", 1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4600, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), forEach(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4597 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifier(specifiesType(asString("struct a::A::B"
)), forEach(nestedNameSpecifier().bind("x"))), new VerifyIdIsBoundTo
<NestedNameSpecifier>("x", 1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4600, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), forEach(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4598 nestedNameSpecifier(specifiesType(asString("struct a::A::B")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifier(specifiesType(asString("struct a::A::B"
)), forEach(nestedNameSpecifier().bind("x"))), new VerifyIdIsBoundTo
<NestedNameSpecifier>("x", 1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4600, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), forEach(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4599 forEach(nestedNameSpecifier().bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifier(specifiesType(asString("struct a::A::B"
)), forEach(nestedNameSpecifier().bind("x"))), new VerifyIdIsBoundTo
<NestedNameSpecifier>("x", 1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4600, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), forEach(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4600 new VerifyIdIsBoundTo<NestedNameSpecifier>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifier(specifiesType(asString("struct a::A::B"
)), forEach(nestedNameSpecifier().bind("x"))), new VerifyIdIsBoundTo
<NestedNameSpecifier>("x", 1)))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4600, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifier(specifiesType(asString(\"struct a::A::B\")), forEach(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
4601}
4602
4603TEST(NNS, NestedNameSpecifiersAsDescendants)class NNS_NestedNameSpecifiersAsDescendants_Test : public ::testing
::Test { public: NNS_NestedNameSpecifiersAsDescendants_Test()
{} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); NNS_NestedNameSpecifiersAsDescendants_Test
(NNS_NestedNameSpecifiersAsDescendants_Test const &); void
operator=(NNS_NestedNameSpecifiersAsDescendants_Test const &
);};::testing::TestInfo* const NNS_NestedNameSpecifiersAsDescendants_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"NNS", "NestedNameSpecifiersAsDescendants", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< NNS_NestedNameSpecifiersAsDescendants_Test
>);void NNS_NestedNameSpecifiersAsDescendants_Test::TestBody
()
{
4604 std::string Fragment =
4605 "namespace a { struct A { struct B { struct C {}; }; }; };"
4606 "void f() { a::A::B::C c; }";
4607 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, decl
(hasDescendant(nestedNameSpecifier(specifiesType( asString("struct a::A"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4610, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, decl(hasDescendant(nestedNameSpecifier(specifiesType( asString(\"struct a::A\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4608 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, decl
(hasDescendant(nestedNameSpecifier(specifiesType( asString("struct a::A"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4610, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, decl(hasDescendant(nestedNameSpecifier(specifiesType( asString(\"struct a::A\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4609 decl(hasDescendant(nestedNameSpecifier(specifiesType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, decl
(hasDescendant(nestedNameSpecifier(specifiesType( asString("struct a::A"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4610, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, decl(hasDescendant(nestedNameSpecifier(specifiesType( asString(\"struct a::A\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4610 asString("struct a::A")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, decl
(hasDescendant(nestedNameSpecifier(specifiesType( asString("struct a::A"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4610, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, decl(hasDescendant(nestedNameSpecifier(specifiesType( asString(\"struct a::A\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4611 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifier
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifier>
("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4616, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4612 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifier
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifier>
("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4616, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4613 functionDecl(hasName("f"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifier
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifier>
("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4616, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4614 forEachDescendant(nestedNameSpecifier().bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifier
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifier>
("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4616, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4615 // Nested names: a, a::A and a::A::B.switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifier
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifier>
("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4616, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4616 new VerifyIdIsBoundTo<NestedNameSpecifier>("x", 3)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifier
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifier>
("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4616, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifier().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifier>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
;
4617}
4618
4619TEST(NNSLoc, DescendantsOfNestedNameSpecifierLocs)class NNSLoc_DescendantsOfNestedNameSpecifierLocs_Test : public
::testing::Test { public: NNSLoc_DescendantsOfNestedNameSpecifierLocs_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); NNSLoc_DescendantsOfNestedNameSpecifierLocs_Test
(NNSLoc_DescendantsOfNestedNameSpecifierLocs_Test const &
); void operator=(NNSLoc_DescendantsOfNestedNameSpecifierLocs_Test
const &);};::testing::TestInfo* const NNSLoc_DescendantsOfNestedNameSpecifierLocs_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"NNSLoc", "DescendantsOfNestedNameSpecifierLocs", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< NNSLoc_DescendantsOfNestedNameSpecifierLocs_Test
>);void NNSLoc_DescendantsOfNestedNameSpecifierLocs_Test::
TestBody()
{
4620 std::string Fragment =
4621 "namespace a { struct A { struct B { struct C {}; }; }; };"
4622 "void f() { a::A::B::C c; }";
4623 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A::B"))), hasDescendant
(loc(nestedNameSpecifier( specifiesNamespace(hasName("a")))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4627, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), hasDescendant(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4624 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A::B"))), hasDescendant
(loc(nestedNameSpecifier( specifiesNamespace(hasName("a")))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4627, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), hasDescendant(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4625 nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A::B"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A::B"))), hasDescendant
(loc(nestedNameSpecifier( specifiesNamespace(hasName("a")))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4627, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), hasDescendant(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4626 hasDescendant(loc(nestedNameSpecifier(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A::B"))), hasDescendant
(loc(nestedNameSpecifier( specifiesNamespace(hasName("a")))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4627, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), hasDescendant(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4627 specifiesNamespace(hasName("a"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A::B"))), hasDescendant
(loc(nestedNameSpecifier( specifiesNamespace(hasName("a")))))
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4627, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), hasDescendant(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4628 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A::B"
))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(
"a"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4632, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4629 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A::B"
))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(
"a"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4632, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4630 nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A::B"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A::B"
))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(
"a"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4632, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4631 has(loc(nestedNameSpecifier(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A::B"
))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(
"a"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4632, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4632 specifiesNamespace(hasName("a"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( Fragment,
nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A::B"
))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(
"a"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4632, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4633 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A"))), has(loc(nestedNameSpecifier
( specifiesNamespace(hasName("a"))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4637, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4634 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A"))), has(loc(nestedNameSpecifier
( specifiesNamespace(hasName("a"))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4637, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4635 nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A"))), has(loc(nestedNameSpecifier
( specifiesNamespace(hasName("a"))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4637, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4636 has(loc(nestedNameSpecifier(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A"))), has(loc(nestedNameSpecifier
( specifiesNamespace(hasName("a"))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4637, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4637 specifiesNamespace(hasName("a"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, nestedNameSpecifierLoc
(loc(specifiesType(asString("struct a::A"))), has(loc(nestedNameSpecifier
( specifiesNamespace(hasName("a"))))))))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4637, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A\"))), has(loc(nestedNameSpecifier( specifiesNamespace(hasName(\"a\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4638
4639 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString
("struct a::A::B"))), forEach(nestedNameSpecifierLoc().bind("x"
))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>("x",
1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4643, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), forEach(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4640 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString
("struct a::A::B"))), forEach(nestedNameSpecifierLoc().bind("x"
))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>("x",
1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4643, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), forEach(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4641 nestedNameSpecifierLoc(loc(specifiesType(asString("struct a::A::B"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString
("struct a::A::B"))), forEach(nestedNameSpecifierLoc().bind("x"
))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>("x",
1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4643, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), forEach(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4642 forEach(nestedNameSpecifierLoc().bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString
("struct a::A::B"))), forEach(nestedNameSpecifierLoc().bind("x"
))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>("x",
1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4643, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), forEach(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4643 new VerifyIdIsBoundTo<NestedNameSpecifierLoc>("x", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString
("struct a::A::B"))), forEach(nestedNameSpecifierLoc().bind("x"
))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>("x",
1)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4643, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, nestedNameSpecifierLoc(loc(specifiesType(asString(\"struct a::A::B\"))), forEach(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
4644}
4645
4646TEST(NNSLoc, NestedNameSpecifierLocsAsDescendants)class NNSLoc_NestedNameSpecifierLocsAsDescendants_Test : public
::testing::Test { public: NNSLoc_NestedNameSpecifierLocsAsDescendants_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); NNSLoc_NestedNameSpecifierLocsAsDescendants_Test
(NNSLoc_NestedNameSpecifierLocsAsDescendants_Test const &
); void operator=(NNSLoc_NestedNameSpecifierLocsAsDescendants_Test
const &);};::testing::TestInfo* const NNSLoc_NestedNameSpecifierLocsAsDescendants_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"NNSLoc", "NestedNameSpecifierLocsAsDescendants", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< NNSLoc_NestedNameSpecifierLocsAsDescendants_Test
>);void NNSLoc_NestedNameSpecifierLocsAsDescendants_Test::
TestBody()
{
4647 std::string Fragment =
4648 "namespace a { struct A { struct B { struct C {}; }; }; };"
4649 "void f() { a::A::B::C c; }";
4650 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, decl
(hasDescendant(loc(nestedNameSpecifier(specifiesType( asString
("struct a::A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, decl(hasDescendant(loc(nestedNameSpecifier(specifiesType( asString(\"struct a::A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4651 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, decl
(hasDescendant(loc(nestedNameSpecifier(specifiesType( asString
("struct a::A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, decl(hasDescendant(loc(nestedNameSpecifier(specifiesType( asString(\"struct a::A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4652 decl(hasDescendant(loc(nestedNameSpecifier(specifiesType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, decl
(hasDescendant(loc(nestedNameSpecifier(specifiesType( asString
("struct a::A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, decl(hasDescendant(loc(nestedNameSpecifier(specifiesType( asString(\"struct a::A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4653 asString("struct a::A"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( Fragment, decl
(hasDescendant(loc(nestedNameSpecifier(specifiesType( asString
("struct a::A"))))))))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4653, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( Fragment, decl(hasDescendant(loc(nestedNameSpecifier(specifiesType( asString(\"struct a::A\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4654 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifierLoc
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4659, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4655 Fragment,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifierLoc
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4659, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4656 functionDecl(hasName("f"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifierLoc
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4659, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4657 forEachDescendant(nestedNameSpecifierLoc().bind("x"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifierLoc
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4659, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4658 // Nested names: a, a::A and a::A::B.switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifierLoc
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4659, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
4659 new VerifyIdIsBoundTo<NestedNameSpecifierLoc>("x", 3)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( Fragment, functionDecl(hasName("f"), forEachDescendant(nestedNameSpecifierLoc
().bind("x"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc
>("x", 3)))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4659, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( Fragment, functionDecl(hasName(\"f\"), forEachDescendant(nestedNameSpecifierLoc().bind(\"x\"))), new VerifyIdIsBoundTo<NestedNameSpecifierLoc>(\"x\", 3))"
, "false", "true").c_str()) = ::testing::Message()
;
4660}
4661
4662template <typename T> class VerifyMatchOnNode : public BoundNodesCallback {
4663public:
4664 VerifyMatchOnNode(StringRef Id, const internal::Matcher<T> &InnerMatcher,
4665 StringRef InnerId)
4666 : Id(Id), InnerMatcher(InnerMatcher), InnerId(InnerId) {
4667 }
4668
4669 bool run(const BoundNodes *Nodes) override { return false; }
4670
4671 bool run(const BoundNodes *Nodes, ASTContext *Context) override {
4672 const T *Node = Nodes->getNodeAs<T>(Id);
4673 return selectFirst<T>(InnerId, match(InnerMatcher, *Node, *Context)) !=
4674 nullptr;
4675 }
4676private:
4677 std::string Id;
4678 internal::Matcher<T> InnerMatcher;
4679 std::string InnerId;
4680};
4681
4682TEST(MatchFinder, CanMatchDeclarationsRecursively)class MatchFinder_CanMatchDeclarationsRecursively_Test : public
::testing::Test { public: MatchFinder_CanMatchDeclarationsRecursively_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchFinder_CanMatchDeclarationsRecursively_Test
(MatchFinder_CanMatchDeclarationsRecursively_Test const &
); void operator=(MatchFinder_CanMatchDeclarationsRecursively_Test
const &);};::testing::TestInfo* const MatchFinder_CanMatchDeclarationsRecursively_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MatchFinder", "CanMatchDeclarationsRecursively", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MatchFinder_CanMatchDeclarationsRecursively_Test
>);void MatchFinder_CanMatchDeclarationsRecursively_Test::
TestBody()
{
4683 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4687, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Y\")).bind(\"Y\"))), \"Y\"))"
, "false", "true").c_str()) = ::testing::Message()
4684 "class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4687, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Y\")).bind(\"Y\"))), \"Y\"))"
, "false", "true").c_str()) = ::testing::Message()
4685 new VerifyMatchOnNode<clang::Decl>(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4687, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Y\")).bind(\"Y\"))), \"Y\"))"
, "false", "true").c_str()) = ::testing::Message()
4686 "X", decl(hasDescendant(recordDecl(hasName("X::Y")).bind("Y"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4687, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Y\")).bind(\"Y\"))), \"Y\"))"
, "false", "true").c_str()) = ::testing::Message()
4687 "Y")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4687, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Y\")).bind(\"Y\"))), \"Y\"))"
, "false", "true").c_str()) = ::testing::Message()
;
4688 EXPECT_TRUE(matchAndVerifyResultFalse(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Z\")).bind(\"Z\"))), \"Z\"))"
, "false", "true").c_str()) = ::testing::Message()
4689 "class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Z\")).bind(\"Z\"))), \"Z\"))"
, "false", "true").c_str()) = ::testing::Message()
4690 new VerifyMatchOnNode<clang::Decl>(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Z\")).bind(\"Z\"))), \"Z\"))"
, "false", "true").c_str()) = ::testing::Message()
4691 "X", decl(hasDescendant(recordDecl(hasName("X::Z")).bind("Z"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Z\")).bind(\"Z\"))), \"Z\"))"
, "false", "true").c_str()) = ::testing::Message()
4692 "Z")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", decl(hasDescendant
(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4692, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", decl(hasDescendant(recordDecl(hasName(\"X::Z\")).bind(\"Z\"))), \"Z\"))"
, "false", "true").c_str()) = ::testing::Message()
;
4693}
4694
4695TEST(MatchFinder, CanMatchStatementsRecursively)class MatchFinder_CanMatchStatementsRecursively_Test : public
::testing::Test { public: MatchFinder_CanMatchStatementsRecursively_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchFinder_CanMatchStatementsRecursively_Test
(MatchFinder_CanMatchStatementsRecursively_Test const &);
void operator=(MatchFinder_CanMatchStatementsRecursively_Test
const &);};::testing::TestInfo* const MatchFinder_CanMatchStatementsRecursively_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MatchFinder", "CanMatchStatementsRecursively", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MatchFinder_CanMatchStatementsRecursively_Test
>);void MatchFinder_CanMatchStatementsRecursively_Test::TestBody
()
{
4696 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if")
, new VerifyMatchOnNode<clang::Stmt>( "if", stmt(hasDescendant
(forStmt().bind("for"))), "for")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4699, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if (1) { for (;;) { } } }\", ifStmt().bind(\"if\"), new VerifyMatchOnNode<clang::Stmt>( \"if\", stmt(hasDescendant(forStmt().bind(\"for\"))), \"for\"))"
, "false", "true").c_str()) = ::testing::Message()
4697 "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if")
, new VerifyMatchOnNode<clang::Stmt>( "if", stmt(hasDescendant
(forStmt().bind("for"))), "for")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4699, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if (1) { for (;;) { } } }\", ifStmt().bind(\"if\"), new VerifyMatchOnNode<clang::Stmt>( \"if\", stmt(hasDescendant(forStmt().bind(\"for\"))), \"for\"))"
, "false", "true").c_str()) = ::testing::Message()
4698 new VerifyMatchOnNode<clang::Stmt>(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if")
, new VerifyMatchOnNode<clang::Stmt>( "if", stmt(hasDescendant
(forStmt().bind("for"))), "for")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4699, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if (1) { for (;;) { } } }\", ifStmt().bind(\"if\"), new VerifyMatchOnNode<clang::Stmt>( \"if\", stmt(hasDescendant(forStmt().bind(\"for\"))), \"for\"))"
, "false", "true").c_str()) = ::testing::Message()
4699 "if", stmt(hasDescendant(forStmt().bind("for"))), "for")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if")
, new VerifyMatchOnNode<clang::Stmt>( "if", stmt(hasDescendant
(forStmt().bind("for"))), "for")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4699, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if (1) { for (;;) { } } }\", ifStmt().bind(\"if\"), new VerifyMatchOnNode<clang::Stmt>( \"if\", stmt(hasDescendant(forStmt().bind(\"for\"))), \"for\"))"
, "false", "true").c_str()) = ::testing::Message()
;
4700 EXPECT_TRUE(matchAndVerifyResultFalse(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if")
, new VerifyMatchOnNode<clang::Stmt>( "if", stmt(hasDescendant
(declStmt().bind("decl"))), "decl")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4703, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"void f() { if (1) { for (;;) { } } }\", ifStmt().bind(\"if\"), new VerifyMatchOnNode<clang::Stmt>( \"if\", stmt(hasDescendant(declStmt().bind(\"decl\"))), \"decl\"))"
, "false", "true").c_str()) = ::testing::Message()
4701 "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if")
, new VerifyMatchOnNode<clang::Stmt>( "if", stmt(hasDescendant
(declStmt().bind("decl"))), "decl")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4703, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"void f() { if (1) { for (;;) { } } }\", ifStmt().bind(\"if\"), new VerifyMatchOnNode<clang::Stmt>( \"if\", stmt(hasDescendant(declStmt().bind(\"decl\"))), \"decl\"))"
, "false", "true").c_str()) = ::testing::Message()
4702 new VerifyMatchOnNode<clang::Stmt>(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if")
, new VerifyMatchOnNode<clang::Stmt>( "if", stmt(hasDescendant
(declStmt().bind("decl"))), "decl")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4703, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"void f() { if (1) { for (;;) { } } }\", ifStmt().bind(\"if\"), new VerifyMatchOnNode<clang::Stmt>( \"if\", stmt(hasDescendant(declStmt().bind(\"decl\"))), \"decl\"))"
, "false", "true").c_str()) = ::testing::Message()
4703 "if", stmt(hasDescendant(declStmt().bind("decl"))), "decl")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if")
, new VerifyMatchOnNode<clang::Stmt>( "if", stmt(hasDescendant
(declStmt().bind("decl"))), "decl")))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4703, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"void f() { if (1) { for (;;) { } } }\", ifStmt().bind(\"if\"), new VerifyMatchOnNode<clang::Stmt>( \"if\", stmt(hasDescendant(declStmt().bind(\"decl\"))), \"decl\"))"
, "false", "true").c_str()) = ::testing::Message()
;
4704}
4705
4706TEST(MatchFinder, CanMatchSingleNodesRecursively)class MatchFinder_CanMatchSingleNodesRecursively_Test : public
::testing::Test { public: MatchFinder_CanMatchSingleNodesRecursively_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchFinder_CanMatchSingleNodesRecursively_Test
(MatchFinder_CanMatchSingleNodesRecursively_Test const &)
; void operator=(MatchFinder_CanMatchSingleNodesRecursively_Test
const &);};::testing::TestInfo* const MatchFinder_CanMatchSingleNodesRecursively_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MatchFinder", "CanMatchSingleNodesRecursively", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MatchFinder_CanMatchSingleNodesRecursively_Test
>);void MatchFinder_CanMatchSingleNodesRecursively_Test::TestBody
()
{
4707 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", recordDecl
(has(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", recordDecl(has(recordDecl(hasName(\"X::Y\")).bind(\"Y\"))), \"Y\"))"
, "false", "true").c_str()) = ::testing::Message()
4708 "class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", recordDecl
(has(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", recordDecl(has(recordDecl(hasName(\"X::Y\")).bind(\"Y\"))), \"Y\"))"
, "false", "true").c_str()) = ::testing::Message()
4709 new VerifyMatchOnNode<clang::Decl>(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", recordDecl
(has(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", recordDecl(has(recordDecl(hasName(\"X::Y\")).bind(\"Y\"))), \"Y\"))"
, "false", "true").c_str()) = ::testing::Message()
4710 "X", recordDecl(has(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", recordDecl
(has(recordDecl(hasName("X::Y")).bind("Y"))), "Y")))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4710, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", recordDecl(has(recordDecl(hasName(\"X::Y\")).bind(\"Y\"))), \"Y\"))"
, "false", "true").c_str()) = ::testing::Message()
;
4711 EXPECT_TRUE(matchAndVerifyResultFalse(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", recordDecl
(has(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4714, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", recordDecl(has(recordDecl(hasName(\"X::Z\")).bind(\"Z\"))), \"Z\"))"
, "false", "true").c_str()) = ::testing::Message()
4712 "class X { class Y {}; };", recordDecl(hasName("::X")).bind("X"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", recordDecl
(has(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4714, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", recordDecl(has(recordDecl(hasName(\"X::Z\")).bind(\"Z\"))), \"Z\"))"
, "false", "true").c_str()) = ::testing::Message()
4713 new VerifyMatchOnNode<clang::Decl>(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", recordDecl
(has(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4714, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", recordDecl(has(recordDecl(hasName(\"X::Z\")).bind(\"Z\"))), \"Z\"))"
, "false", "true").c_str()) = ::testing::Message()
4714 "X", recordDecl(has(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultFalse
( "class X { class Y {}; };", recordDecl(hasName("::X")).bind
("X"), new VerifyMatchOnNode<clang::Decl>( "X", recordDecl
(has(recordDecl(hasName("X::Z")).bind("Z"))), "Z")))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4714, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultFalse( \"class X { class Y {}; };\", recordDecl(hasName(\"::X\")).bind(\"X\"), new VerifyMatchOnNode<clang::Decl>( \"X\", recordDecl(has(recordDecl(hasName(\"X::Z\")).bind(\"Z\"))), \"Z\"))"
, "false", "true").c_str()) = ::testing::Message()
;
4715}
4716
4717template <typename T>
4718class VerifyAncestorHasChildIsEqual : public BoundNodesCallback {
4719public:
4720 bool run(const BoundNodes *Nodes) override { return false; }
4721
4722 bool run(const BoundNodes *Nodes, ASTContext *Context) override {
4723 const T *Node = Nodes->getNodeAs<T>("");
4724 return verify(*Nodes, *Context, Node);
4725 }
4726
4727 bool verify(const BoundNodes &Nodes, ASTContext &Context, const Stmt *Node) {
4728 // Use the original typed pointer to verify we can pass pointers to subtypes
4729 // to equalsNode.
4730 const T *TypedNode = cast<T>(Node);
4731 return selectFirst<T>(
4732 "", match(stmt(hasParent(
4733 stmt(has(stmt(equalsNode(TypedNode)))).bind(""))),
4734 *Node, Context)) != nullptr;
4735 }
4736 bool verify(const BoundNodes &Nodes, ASTContext &Context, const Decl *Node) {
4737 // Use the original typed pointer to verify we can pass pointers to subtypes
4738 // to equalsNode.
4739 const T *TypedNode = cast<T>(Node);
4740 return selectFirst<T>(
4741 "", match(decl(hasParent(
4742 decl(has(decl(equalsNode(TypedNode)))).bind(""))),
4743 *Node, Context)) != nullptr;
4744 }
4745 bool verify(const BoundNodes &Nodes, ASTContext &Context, const Type *Node) {
4746 // Use the original typed pointer to verify we can pass pointers to subtypes
4747 // to equalsNode.
4748 const T *TypedNode = cast<T>(Node);
4749 const auto *Dec = Nodes.getNodeAs<FieldDecl>("decl");
4750 return selectFirst<T>(
4751 "", match(fieldDecl(hasParent(decl(has(fieldDecl(
4752 hasType(type(equalsNode(TypedNode)).bind(""))))))),
4753 *Dec, Context)) != nullptr;
4754 }
4755};
4756
4757TEST(IsEqualTo, MatchesNodesByIdentity)class IsEqualTo_MatchesNodesByIdentity_Test : public ::testing
::Test { public: IsEqualTo_MatchesNodesByIdentity_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); IsEqualTo_MatchesNodesByIdentity_Test
(IsEqualTo_MatchesNodesByIdentity_Test const &); void operator
=(IsEqualTo_MatchesNodesByIdentity_Test const &);};::testing
::TestInfo* const IsEqualTo_MatchesNodesByIdentity_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "IsEqualTo",
"MatchesNodesByIdentity", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< IsEqualTo_MatchesNodesByIdentity_Test>);void IsEqualTo_MatchesNodesByIdentity_Test
::TestBody()
{
4758 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X::Y")).bind
(""), new VerifyAncestorHasChildIsEqual<CXXRecordDecl>(
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X::Y\")).bind(\"\"), new VerifyAncestorHasChildIsEqual<CXXRecordDecl>())"
, "false", "true").c_str()) = ::testing::Message()
4759 "class X { class Y {}; };", recordDecl(hasName("::X::Y")).bind(""),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X::Y")).bind
(""), new VerifyAncestorHasChildIsEqual<CXXRecordDecl>(
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X::Y\")).bind(\"\"), new VerifyAncestorHasChildIsEqual<CXXRecordDecl>())"
, "false", "true").c_str()) = ::testing::Message()
4760 new VerifyAncestorHasChildIsEqual<CXXRecordDecl>()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {}; };", recordDecl(hasName("::X::Y")).bind
(""), new VerifyAncestorHasChildIsEqual<CXXRecordDecl>(
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4760, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {}; };\", recordDecl(hasName(\"::X::Y\")).bind(\"\"), new VerifyAncestorHasChildIsEqual<CXXRecordDecl>())"
, "false", "true").c_str()) = ::testing::Message()
;
4761 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if (true) if(true) {} }", ifStmt().bind(""), new
VerifyAncestorHasChildIsEqual<IfStmt>()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4763, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if (true) if(true) {} }\", ifStmt().bind(\"\"), new VerifyAncestorHasChildIsEqual<IfStmt>())"
, "false", "true").c_str()) = ::testing::Message()
4762 "void f() { if (true) if(true) {} }", ifStmt().bind(""),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if (true) if(true) {} }", ifStmt().bind(""), new
VerifyAncestorHasChildIsEqual<IfStmt>()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4763, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if (true) if(true) {} }\", ifStmt().bind(\"\"), new VerifyAncestorHasChildIsEqual<IfStmt>())"
, "false", "true").c_str()) = ::testing::Message()
4763 new VerifyAncestorHasChildIsEqual<IfStmt>()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() { if (true) if(true) {} }", ifStmt().bind(""), new
VerifyAncestorHasChildIsEqual<IfStmt>()))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4763, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() { if (true) if(true) {} }\", ifStmt().bind(\"\"), new VerifyAncestorHasChildIsEqual<IfStmt>())"
, "false", "true").c_str()) = ::testing::Message()
;
4764 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {} y; };", fieldDecl(hasName("y"), hasType
(type().bind(""))).bind("decl"), new VerifyAncestorHasChildIsEqual
<Type>()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4767, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {} y; };\", fieldDecl(hasName(\"y\"), hasType(type().bind(\"\"))).bind(\"decl\"), new VerifyAncestorHasChildIsEqual<Type>())"
, "false", "true").c_str()) = ::testing::Message()
4765 "class X { class Y {} y; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {} y; };", fieldDecl(hasName("y"), hasType
(type().bind(""))).bind("decl"), new VerifyAncestorHasChildIsEqual
<Type>()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4767, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {} y; };\", fieldDecl(hasName(\"y\"), hasType(type().bind(\"\"))).bind(\"decl\"), new VerifyAncestorHasChildIsEqual<Type>())"
, "false", "true").c_str()) = ::testing::Message()
4766 fieldDecl(hasName("y"), hasType(type().bind(""))).bind("decl"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {} y; };", fieldDecl(hasName("y"), hasType
(type().bind(""))).bind("decl"), new VerifyAncestorHasChildIsEqual
<Type>()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4767, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {} y; };\", fieldDecl(hasName(\"y\"), hasType(type().bind(\"\"))).bind(\"decl\"), new VerifyAncestorHasChildIsEqual<Type>())"
, "false", "true").c_str()) = ::testing::Message()
4767 new VerifyAncestorHasChildIsEqual<Type>()))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "class X { class Y {} y; };", fieldDecl(hasName("y"), hasType
(type().bind(""))).bind("decl"), new VerifyAncestorHasChildIsEqual
<Type>()))) ; else ::testing::internal::AssertHelper(::
testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4767, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"class X { class Y {} y; };\", fieldDecl(hasName(\"y\"), hasType(type().bind(\"\"))).bind(\"decl\"), new VerifyAncestorHasChildIsEqual<Type>())"
, "false", "true").c_str()) = ::testing::Message()
;
4768}
4769
4770TEST(MatchFinder, CheckProfiling)class MatchFinder_CheckProfiling_Test : public ::testing::Test
{ public: MatchFinder_CheckProfiling_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); MatchFinder_CheckProfiling_Test(MatchFinder_CheckProfiling_Test
const &); void operator=(MatchFinder_CheckProfiling_Test
const &);};::testing::TestInfo* const MatchFinder_CheckProfiling_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MatchFinder", "CheckProfiling", __null, __null, (::testing::
internal::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::
testing::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< MatchFinder_CheckProfiling_Test>);void MatchFinder_CheckProfiling_Test
::TestBody()
{
4771 MatchFinder::MatchFinderOptions Options;
4772 llvm::StringMap<llvm::TimeRecord> Records;
4773 Options.CheckProfiling.emplace(Records);
4774 MatchFinder Finder(std::move(Options));
4775
4776 struct NamedCallback : public MatchFinder::MatchCallback {
4777 void run(const MatchFinder::MatchResult &Result) override {}
4778 StringRef getID() const override { return "MyID"; }
4779 } Callback;
4780 Finder.addMatcher(decl(), &Callback);
4781 std::unique_ptr<FrontendActionFactory> Factory(
4782 newFrontendActionFactory(&Finder));
4783 ASSERT_TRUE(tooling::runToolOnCode(Factory->create(), "int x;"))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(tooling::runToolOnCode
(Factory->create(), "int x;"))) ; else return ::testing::internal
::AssertHelper(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4783, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "tooling::runToolOnCode(Factory->create(), \"int x;\")",
"false", "true").c_str()) = ::testing::Message()
;
4784
4785 EXPECT_EQ(1u, Records.size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"Records.size()", 1u, Records.size()))) ; else ::testing::internal
::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4785, gtest_ar.failure_message()) = ::testing::Message()
;
4786 EXPECT_EQ("MyID", Records.begin()->getKey())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper("MyID")) == 1)>::Compare("\"MyID\""
, "Records.begin()->getKey()", "MyID", Records.begin()->
getKey()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4786, gtest_ar.failure_message()) = ::testing::Message()
;
4787}
4788
4789class VerifyStartOfTranslationUnit : public MatchFinder::MatchCallback {
4790public:
4791 VerifyStartOfTranslationUnit() : Called(false) {}
4792 void run(const MatchFinder::MatchResult &Result) override {
4793 EXPECT_TRUE(Called)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(Called)) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4793, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Called", "false", "true").c_str()) = ::testing::Message()
;
4794 }
4795 void onStartOfTranslationUnit() override { Called = true; }
4796 bool Called;
4797};
4798
4799TEST(MatchFinder, InterceptsStartOfTranslationUnit)class MatchFinder_InterceptsStartOfTranslationUnit_Test : public
::testing::Test { public: MatchFinder_InterceptsStartOfTranslationUnit_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchFinder_InterceptsStartOfTranslationUnit_Test
(MatchFinder_InterceptsStartOfTranslationUnit_Test const &
); void operator=(MatchFinder_InterceptsStartOfTranslationUnit_Test
const &);};::testing::TestInfo* const MatchFinder_InterceptsStartOfTranslationUnit_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MatchFinder", "InterceptsStartOfTranslationUnit", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MatchFinder_InterceptsStartOfTranslationUnit_Test
>);void MatchFinder_InterceptsStartOfTranslationUnit_Test::
TestBody()
{
4800 MatchFinder Finder;
4801 VerifyStartOfTranslationUnit VerifyCallback;
4802 Finder.addMatcher(decl(), &VerifyCallback);
4803 std::unique_ptr<FrontendActionFactory> Factory(
4804 newFrontendActionFactory(&Finder));
4805 ASSERT_TRUE(tooling::runToolOnCode(Factory->create(), "int x;"))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(tooling::runToolOnCode
(Factory->create(), "int x;"))) ; else return ::testing::internal
::AssertHelper(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4805, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "tooling::runToolOnCode(Factory->create(), \"int x;\")",
"false", "true").c_str()) = ::testing::Message()
;
4806 EXPECT_TRUE(VerifyCallback.Called)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(VerifyCallback.Called
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4806, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "VerifyCallback.Called", "false", "true").c_str()) = ::testing
::Message()
;
4807
4808 VerifyCallback.Called = false;
4809 std::unique_ptr<ASTUnit> AST(tooling::buildASTFromCode("int x;"));
4810 ASSERT_TRUE(AST.get())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(AST.get())) ; else return
::testing::internal::AssertHelper(::testing::TestPartResult::
kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4810, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "AST.get()", "false", "true").c_str()) = ::testing::Message
()
;
4811 Finder.matchAST(AST->getASTContext());
4812 EXPECT_TRUE(VerifyCallback.Called)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(VerifyCallback.Called
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4812, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "VerifyCallback.Called", "false", "true").c_str()) = ::testing
::Message()
;
4813}
4814
4815class VerifyEndOfTranslationUnit : public MatchFinder::MatchCallback {
4816public:
4817 VerifyEndOfTranslationUnit() : Called(false) {}
4818 void run(const MatchFinder::MatchResult &Result) override {
4819 EXPECT_FALSE(Called)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(Called))) ; else ::
testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4819, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "Called", "true", "false").c_str()) = ::testing::Message()
;
4820 }
4821 void onEndOfTranslationUnit() override { Called = true; }
4822 bool Called;
4823};
4824
4825TEST(MatchFinder, InterceptsEndOfTranslationUnit)class MatchFinder_InterceptsEndOfTranslationUnit_Test : public
::testing::Test { public: MatchFinder_InterceptsEndOfTranslationUnit_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); MatchFinder_InterceptsEndOfTranslationUnit_Test
(MatchFinder_InterceptsEndOfTranslationUnit_Test const &)
; void operator=(MatchFinder_InterceptsEndOfTranslationUnit_Test
const &);};::testing::TestInfo* const MatchFinder_InterceptsEndOfTranslationUnit_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"MatchFinder", "InterceptsEndOfTranslationUnit", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< MatchFinder_InterceptsEndOfTranslationUnit_Test
>);void MatchFinder_InterceptsEndOfTranslationUnit_Test::TestBody
()
{
4826 MatchFinder Finder;
4827 VerifyEndOfTranslationUnit VerifyCallback;
4828 Finder.addMatcher(decl(), &VerifyCallback);
4829 std::unique_ptr<FrontendActionFactory> Factory(
4830 newFrontendActionFactory(&Finder));
4831 ASSERT_TRUE(tooling::runToolOnCode(Factory->create(), "int x;"))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(tooling::runToolOnCode
(Factory->create(), "int x;"))) ; else return ::testing::internal
::AssertHelper(::testing::TestPartResult::kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4831, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "tooling::runToolOnCode(Factory->create(), \"int x;\")",
"false", "true").c_str()) = ::testing::Message()
;
4832 EXPECT_TRUE(VerifyCallback.Called)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(VerifyCallback.Called
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4832, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "VerifyCallback.Called", "false", "true").c_str()) = ::testing
::Message()
;
4833
4834 VerifyCallback.Called = false;
4835 std::unique_ptr<ASTUnit> AST(tooling::buildASTFromCode("int x;"));
4836 ASSERT_TRUE(AST.get())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(AST.get())) ; else return
::testing::internal::AssertHelper(::testing::TestPartResult::
kFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4836, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "AST.get()", "false", "true").c_str()) = ::testing::Message
()
;
4837 Finder.matchAST(AST->getASTContext());
4838 EXPECT_TRUE(VerifyCallback.Called)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(VerifyCallback.Called
)) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4838, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "VerifyCallback.Called", "false", "true").c_str()) = ::testing
::Message()
;
4839}
4840
4841TEST(EqualsBoundNodeMatcher, QualType)class EqualsBoundNodeMatcher_QualType_Test : public ::testing
::Test { public: EqualsBoundNodeMatcher_QualType_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); EqualsBoundNodeMatcher_QualType_Test
(EqualsBoundNodeMatcher_QualType_Test const &); void operator
=(EqualsBoundNodeMatcher_QualType_Test const &);};::testing
::TestInfo* const EqualsBoundNodeMatcher_QualType_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "EqualsBoundNodeMatcher"
, "QualType", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< EqualsBoundNodeMatcher_QualType_Test
>);void EqualsBoundNodeMatcher_QualType_Test::TestBody()
{
4842 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i = 1;"
, varDecl(hasType(qualType().bind("type")), hasInitializer(ignoringParenImpCasts
( hasType(qualType(equalsBoundNode("type"))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4845, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i = 1;\", varDecl(hasType(qualType().bind(\"type\")), hasInitializer(ignoringParenImpCasts( hasType(qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4843 "int i = 1;", varDecl(hasType(qualType().bind("type")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i = 1;"
, varDecl(hasType(qualType().bind("type")), hasInitializer(ignoringParenImpCasts
( hasType(qualType(equalsBoundNode("type"))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4845, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i = 1;\", varDecl(hasType(qualType().bind(\"type\")), hasInitializer(ignoringParenImpCasts( hasType(qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4844 hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i = 1;"
, varDecl(hasType(qualType().bind("type")), hasInitializer(ignoringParenImpCasts
( hasType(qualType(equalsBoundNode("type"))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4845, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i = 1;\", varDecl(hasType(qualType().bind(\"type\")), hasInitializer(ignoringParenImpCasts( hasType(qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4845 hasType(qualType(equalsBoundNode("type"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "int i = 1;"
, varDecl(hasType(qualType().bind("type")), hasInitializer(ignoringParenImpCasts
( hasType(qualType(equalsBoundNode("type"))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4845, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"int i = 1;\", varDecl(hasType(qualType().bind(\"type\")), hasInitializer(ignoringParenImpCasts( hasType(qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4846 EXPECT_TRUE(notMatches("int i = 1.f;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = 1.f;"
, varDecl(hasType(qualType().bind("type")), hasInitializer(ignoringParenImpCasts
(hasType( qualType(equalsBoundNode("type"))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4849, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = 1.f;\", varDecl(hasType(qualType().bind(\"type\")), hasInitializer(ignoringParenImpCasts(hasType( qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4847 varDecl(hasType(qualType().bind("type")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = 1.f;"
, varDecl(hasType(qualType().bind("type")), hasInitializer(ignoringParenImpCasts
(hasType( qualType(equalsBoundNode("type"))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4849, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = 1.f;\", varDecl(hasType(qualType().bind(\"type\")), hasInitializer(ignoringParenImpCasts(hasType( qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4848 hasInitializer(ignoringParenImpCasts(hasType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = 1.f;"
, varDecl(hasType(qualType().bind("type")), hasInitializer(ignoringParenImpCasts
(hasType( qualType(equalsBoundNode("type"))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4849, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = 1.f;\", varDecl(hasType(qualType().bind(\"type\")), hasInitializer(ignoringParenImpCasts(hasType( qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4849 qualType(equalsBoundNode("type"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("int i = 1.f;"
, varDecl(hasType(qualType().bind("type")), hasInitializer(ignoringParenImpCasts
(hasType( qualType(equalsBoundNode("type"))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4849, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"int i = 1.f;\", varDecl(hasType(qualType().bind(\"type\")), hasInitializer(ignoringParenImpCasts(hasType( qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4850}
4851
4852TEST(EqualsBoundNodeMatcher, NonMatchingTypes)class EqualsBoundNodeMatcher_NonMatchingTypes_Test : public ::
testing::Test { public: EqualsBoundNodeMatcher_NonMatchingTypes_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); EqualsBoundNodeMatcher_NonMatchingTypes_Test
(EqualsBoundNodeMatcher_NonMatchingTypes_Test const &); void
operator=(EqualsBoundNodeMatcher_NonMatchingTypes_Test const
&);};::testing::TestInfo* const EqualsBoundNodeMatcher_NonMatchingTypes_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EqualsBoundNodeMatcher", "NonMatchingTypes", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< EqualsBoundNodeMatcher_NonMatchingTypes_Test
>);void EqualsBoundNodeMatcher_NonMatchingTypes_Test::TestBody
()
{
4853 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int i = 1;"
, varDecl(namedDecl(hasName("i")).bind("name"), hasInitializer
(ignoringParenImpCasts( hasType(qualType(equalsBoundNode("type"
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4856, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int i = 1;\", varDecl(namedDecl(hasName(\"i\")).bind(\"name\"), hasInitializer(ignoringParenImpCasts( hasType(qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4854 "int i = 1;", varDecl(namedDecl(hasName("i")).bind("name"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int i = 1;"
, varDecl(namedDecl(hasName("i")).bind("name"), hasInitializer
(ignoringParenImpCasts( hasType(qualType(equalsBoundNode("type"
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4856, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int i = 1;\", varDecl(namedDecl(hasName(\"i\")).bind(\"name\"), hasInitializer(ignoringParenImpCasts( hasType(qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4855 hasInitializer(ignoringParenImpCasts(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int i = 1;"
, varDecl(namedDecl(hasName("i")).bind("name"), hasInitializer
(ignoringParenImpCasts( hasType(qualType(equalsBoundNode("type"
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4856, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int i = 1;\", varDecl(namedDecl(hasName(\"i\")).bind(\"name\"), hasInitializer(ignoringParenImpCasts( hasType(qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4856 hasType(qualType(equalsBoundNode("type"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "int i = 1;"
, varDecl(namedDecl(hasName("i")).bind("name"), hasInitializer
(ignoringParenImpCasts( hasType(qualType(equalsBoundNode("type"
))))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4856, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"int i = 1;\", varDecl(namedDecl(hasName(\"i\")).bind(\"name\"), hasInitializer(ignoringParenImpCasts( hasType(qualType(equalsBoundNode(\"type\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4857}
4858
4859TEST(EqualsBoundNodeMatcher, Stmt)class EqualsBoundNodeMatcher_Stmt_Test : public ::testing::Test
{ public: EqualsBoundNodeMatcher_Stmt_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); EqualsBoundNodeMatcher_Stmt_Test(EqualsBoundNodeMatcher_Stmt_Test
const &); void operator=(EqualsBoundNodeMatcher_Stmt_Test
const &);};::testing::TestInfo* const EqualsBoundNodeMatcher_Stmt_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EqualsBoundNodeMatcher", "Stmt", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< EqualsBoundNodeMatcher_Stmt_Test>);void
EqualsBoundNodeMatcher_Stmt_Test::TestBody()
{
4860 EXPECT_TRUE(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if(true) {} }"
, stmt(allOf(ifStmt().bind("if"), hasParent(stmt(has(stmt(equalsBoundNode
("if")))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4863, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if(true) {} }\", stmt(allOf(ifStmt().bind(\"if\"), hasParent(stmt(has(stmt(equalsBoundNode(\"if\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4861 matches("void f() { if(true) {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if(true) {} }"
, stmt(allOf(ifStmt().bind("if"), hasParent(stmt(has(stmt(equalsBoundNode
("if")))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4863, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if(true) {} }\", stmt(allOf(ifStmt().bind(\"if\"), hasParent(stmt(has(stmt(equalsBoundNode(\"if\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4862 stmt(allOf(ifStmt().bind("if"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if(true) {} }"
, stmt(allOf(ifStmt().bind("if"), hasParent(stmt(has(stmt(equalsBoundNode
("if")))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4863, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if(true) {} }\", stmt(allOf(ifStmt().bind(\"if\"), hasParent(stmt(has(stmt(equalsBoundNode(\"if\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4863 hasParent(stmt(has(stmt(equalsBoundNode("if")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void f() { if(true) {} }"
, stmt(allOf(ifStmt().bind("if"), hasParent(stmt(has(stmt(equalsBoundNode
("if")))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4863, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void f() { if(true) {} }\", stmt(allOf(ifStmt().bind(\"if\"), hasParent(stmt(has(stmt(equalsBoundNode(\"if\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4864
4865 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { if(true) { if (true) {} } }"
, stmt(allOf(ifStmt().bind("if"), has(stmt(equalsBoundNode("if"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4867, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { if(true) { if (true) {} } }\", stmt(allOf(ifStmt().bind(\"if\"), has(stmt(equalsBoundNode(\"if\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4866 "void f() { if(true) { if (true) {} } }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { if(true) { if (true) {} } }"
, stmt(allOf(ifStmt().bind("if"), has(stmt(equalsBoundNode("if"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4867, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { if(true) { if (true) {} } }\", stmt(allOf(ifStmt().bind(\"if\"), has(stmt(equalsBoundNode(\"if\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4867 stmt(allOf(ifStmt().bind("if"), has(stmt(equalsBoundNode("if")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "void f() { if(true) { if (true) {} } }"
, stmt(allOf(ifStmt().bind("if"), has(stmt(equalsBoundNode("if"
)))))))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4867, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"void f() { if(true) { if (true) {} } }\", stmt(allOf(ifStmt().bind(\"if\"), has(stmt(equalsBoundNode(\"if\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4868}
4869
4870TEST(EqualsBoundNodeMatcher, Decl)class EqualsBoundNodeMatcher_Decl_Test : public ::testing::Test
{ public: EqualsBoundNodeMatcher_Decl_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); EqualsBoundNodeMatcher_Decl_Test(EqualsBoundNodeMatcher_Decl_Test
const &); void operator=(EqualsBoundNodeMatcher_Decl_Test
const &);};::testing::TestInfo* const EqualsBoundNodeMatcher_Decl_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EqualsBoundNodeMatcher", "Decl", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< EqualsBoundNodeMatcher_Decl_Test>);void
EqualsBoundNodeMatcher_Decl_Test::TestBody()
{
4871 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { class Y {}; };"
, decl(allOf(recordDecl(hasName("::X::Y")).bind("record"), hasParent
(decl(has(decl(equalsBoundNode("record")))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4874, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { class Y {}; };\", decl(allOf(recordDecl(hasName(\"::X::Y\")).bind(\"record\"), hasParent(decl(has(decl(equalsBoundNode(\"record\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4872 "class X { class Y {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { class Y {}; };"
, decl(allOf(recordDecl(hasName("::X::Y")).bind("record"), hasParent
(decl(has(decl(equalsBoundNode("record")))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4874, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { class Y {}; };\", decl(allOf(recordDecl(hasName(\"::X::Y\")).bind(\"record\"), hasParent(decl(has(decl(equalsBoundNode(\"record\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4873 decl(allOf(recordDecl(hasName("::X::Y")).bind("record"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { class Y {}; };"
, decl(allOf(recordDecl(hasName("::X::Y")).bind("record"), hasParent
(decl(has(decl(equalsBoundNode("record")))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4874, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { class Y {}; };\", decl(allOf(recordDecl(hasName(\"::X::Y\")).bind(\"record\"), hasParent(decl(has(decl(equalsBoundNode(\"record\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
4874 hasParent(decl(has(decl(equalsBoundNode("record")))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { class Y {}; };"
, decl(allOf(recordDecl(hasName("::X::Y")).bind("record"), hasParent
(decl(has(decl(equalsBoundNode("record")))))))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4874, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { class Y {}; };\", decl(allOf(recordDecl(hasName(\"::X::Y\")).bind(\"record\"), hasParent(decl(has(decl(equalsBoundNode(\"record\"))))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4875
4876 EXPECT_TRUE(notMatches("class X { class Y {}; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { class Y {}; };"
, decl(allOf(recordDecl(hasName("::X")).bind("record"), has(decl
(equalsBoundNode("record")))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4878, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { class Y {}; };\", decl(allOf(recordDecl(hasName(\"::X\")).bind(\"record\"), has(decl(equalsBoundNode(\"record\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4877 decl(allOf(recordDecl(hasName("::X")).bind("record"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { class Y {}; };"
, decl(allOf(recordDecl(hasName("::X")).bind("record"), has(decl
(equalsBoundNode("record")))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4878, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { class Y {}; };\", decl(allOf(recordDecl(hasName(\"::X\")).bind(\"record\"), has(decl(equalsBoundNode(\"record\"))))))"
, "false", "true").c_str()) = ::testing::Message()
4878 has(decl(equalsBoundNode("record")))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X { class Y {}; };"
, decl(allOf(recordDecl(hasName("::X")).bind("record"), has(decl
(equalsBoundNode("record")))))))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4878, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X { class Y {}; };\", decl(allOf(recordDecl(hasName(\"::X\")).bind(\"record\"), has(decl(equalsBoundNode(\"record\"))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4879}
4880
4881TEST(EqualsBoundNodeMatcher, Type)class EqualsBoundNodeMatcher_Type_Test : public ::testing::Test
{ public: EqualsBoundNodeMatcher_Type_Test() {} private: virtual
void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); EqualsBoundNodeMatcher_Type_Test(EqualsBoundNodeMatcher_Type_Test
const &); void operator=(EqualsBoundNodeMatcher_Type_Test
const &);};::testing::TestInfo* const EqualsBoundNodeMatcher_Type_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EqualsBoundNodeMatcher", "Type", __null, __null, (::testing
::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase,
::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< EqualsBoundNodeMatcher_Type_Test>);void
EqualsBoundNodeMatcher_Type_Test::TestBody()
{
4882 EXPECT_TRUE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { int a; int b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4886, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { int a; int b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4883 "class X { int a; int b; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { int a; int b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4886, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { int a; int b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4884 recordDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { int a; int b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4886, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { int a; int b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4885 has(fieldDecl(hasName("a"), hasType(type().bind("t")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { int a; int b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4886, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { int a; int b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4886 has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches( "class X { int a; int b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4886, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"class X { int a; int b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4887
4888 EXPECT_TRUE(notMatches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X { int a; double b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4892, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X { int a; double b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4889 "class X { int a; double b; };",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X { int a; double b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4892, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X { int a; double b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4890 recordDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X { int a; double b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4892, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X { int a; double b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4891 has(fieldDecl(hasName("a"), hasType(type().bind("t")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X { int a; double b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4892, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X { int a; double b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
4892 has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches( "class X { int a; double b; };"
, recordDecl( has(fieldDecl(hasName("a"), hasType(type().bind
("t")))), has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode
("t"))))))))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4892, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches( \"class X { int a; double b; };\", recordDecl( has(fieldDecl(hasName(\"a\"), hasType(type().bind(\"t\")))), has(fieldDecl(hasName(\"b\"), hasType(type(equalsBoundNode(\"t\")))))))"
, "false", "true").c_str()) = ::testing::Message()
;
4893}
4894
4895TEST(EqualsBoundNodeMatcher, UsingForEachDescendant)class EqualsBoundNodeMatcher_UsingForEachDescendant_Test : public
::testing::Test { public: EqualsBoundNodeMatcher_UsingForEachDescendant_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); EqualsBoundNodeMatcher_UsingForEachDescendant_Test
(EqualsBoundNodeMatcher_UsingForEachDescendant_Test const &
); void operator=(EqualsBoundNodeMatcher_UsingForEachDescendant_Test
const &);};::testing::TestInfo* const EqualsBoundNodeMatcher_UsingForEachDescendant_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EqualsBoundNodeMatcher", "UsingForEachDescendant", __null, __null
, (::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< EqualsBoundNodeMatcher_UsingForEachDescendant_Test
>);void EqualsBoundNodeMatcher_UsingForEachDescendant_Test
::TestBody()
{
4896 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4897 "int f() {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4898 " if (1) {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4899 " int i = 9;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4900 " }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4901 " int j = 10;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4902 " {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4903 " float k = 9.0;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4904 " }"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4905 " return 0;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4906 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4907 // Look for variable declarations within functions whose type is the sameswitch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4908 // as the function return type.switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4909 functionDecl(returns(qualType().bind("type")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4910 forEachDescendant(varDecl(hasType(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4911 qualType(equalsBoundNode("type")))).bind("decl"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4912 // Only i and j should match, not k.switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
4913 new VerifyIdIsBoundTo<VarDecl>("decl", 2)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "int f() {" " if (1) {" " int i = 9;" " }" " int j = 10;"
" {" " float k = 9.0;" " }" " return 0;" "}", functionDecl
(returns(qualType().bind("type")), forEachDescendant(varDecl(
hasType( qualType(equalsBoundNode("type")))).bind("decl"))), new
VerifyIdIsBoundTo<VarDecl>("decl", 2)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4913, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"int f() {\" \" if (1) {\" \" int i = 9;\" \" }\" \" int j = 10;\" \" {\" \" float k = 9.0;\" \" }\" \" return 0;\" \"}\", functionDecl(returns(qualType().bind(\"type\")), forEachDescendant(varDecl(hasType( qualType(equalsBoundNode(\"type\")))).bind(\"decl\"))), new VerifyIdIsBoundTo<VarDecl>(\"decl\", 2))"
, "false", "true").c_str()) = ::testing::Message()
;
4914}
4915
4916TEST(EqualsBoundNodeMatcher, FiltersMatchedCombinations)class EqualsBoundNodeMatcher_FiltersMatchedCombinations_Test :
public ::testing::Test { public: EqualsBoundNodeMatcher_FiltersMatchedCombinations_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); EqualsBoundNodeMatcher_FiltersMatchedCombinations_Test
(EqualsBoundNodeMatcher_FiltersMatchedCombinations_Test const
&); void operator=(EqualsBoundNodeMatcher_FiltersMatchedCombinations_Test
const &);};::testing::TestInfo* const EqualsBoundNodeMatcher_FiltersMatchedCombinations_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EqualsBoundNodeMatcher", "FiltersMatchedCombinations", __null
, __null, (::testing::internal::GetTestTypeId()), ::testing::
Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new ::
testing::internal::TestFactoryImpl< EqualsBoundNodeMatcher_FiltersMatchedCombinations_Test
>);void EqualsBoundNodeMatcher_FiltersMatchedCombinations_Test
::TestBody()
{
4917 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
4918 "void f() {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
4919 " int x;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
4920 " double d;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
4921 " x = d + x - d + x;"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
4922 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
4923 functionDecl(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
4924 hasName("f"), forEachDescendant(varDecl().bind("d")),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
4925 forEachDescendant(declRefExpr(to(decl(equalsBoundNode("d")))))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
4926 new VerifyIdIsBoundTo<VarDecl>("d", 5)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "void f() {" " int x;" " double d;" " x = d + x - d + x;"
"}", functionDecl( hasName("f"), forEachDescendant(varDecl()
.bind("d")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode
("d")))))), new VerifyIdIsBoundTo<VarDecl>("d", 5)))) ;
else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4926, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"void f() {\" \" int x;\" \" double d;\" \" x = d + x - d + x;\" \"}\", functionDecl( hasName(\"f\"), forEachDescendant(varDecl().bind(\"d\")), forEachDescendant(declRefExpr(to(decl(equalsBoundNode(\"d\")))))), new VerifyIdIsBoundTo<VarDecl>(\"d\", 5))"
, "false", "true").c_str()) = ::testing::Message()
;
4927}
4928
4929TEST(EqualsBoundNodeMatcher, UnlessDescendantsOfAncestorsMatch)class EqualsBoundNodeMatcher_UnlessDescendantsOfAncestorsMatch_Test
: public ::testing::Test { public: EqualsBoundNodeMatcher_UnlessDescendantsOfAncestorsMatch_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); EqualsBoundNodeMatcher_UnlessDescendantsOfAncestorsMatch_Test
(EqualsBoundNodeMatcher_UnlessDescendantsOfAncestorsMatch_Test
const &); void operator=(EqualsBoundNodeMatcher_UnlessDescendantsOfAncestorsMatch_Test
const &);};::testing::TestInfo* const EqualsBoundNodeMatcher_UnlessDescendantsOfAncestorsMatch_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"EqualsBoundNodeMatcher", "UnlessDescendantsOfAncestorsMatch"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< EqualsBoundNodeMatcher_UnlessDescendantsOfAncestorsMatch_Test
>);void EqualsBoundNodeMatcher_UnlessDescendantsOfAncestorsMatch_Test
::TestBody()
{
4930 EXPECT_TRUE(matchAndVerifyResultTrue(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4931 "struct StringRef { int size() const; const char* data() const; };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4932 "void f(StringRef v) {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4933 " v.data();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4934 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4935 cxxMemberCallExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4936 callee(cxxMethodDecl(hasName("data"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4937 on(declRefExpr(to(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4938 varDecl(hasType(recordDecl(hasName("StringRef")))).bind("var")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4939 unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4940 callee(cxxMethodDecl(anyOf(hasName("size"), hasName("length")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4941 on(declRefExpr(to(varDecl(equalsBoundNode("var")))))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4942 .bind("data"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
4943 new VerifyIdIsBoundTo<Expr>("data", 1)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchAndVerifyResultTrue
( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data"), new
VerifyIdIsBoundTo<Expr>("data", 1)))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4943, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchAndVerifyResultTrue( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"), new VerifyIdIsBoundTo<Expr>(\"data\", 1))"
, "false", "true").c_str()) = ::testing::Message()
;
4944
4945 EXPECT_FALSE(matches(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4946 "struct StringRef { int size() const; const char* data() const; };"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4947 "void f(StringRef v) {"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4948 " v.data();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4949 " v.size();"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4950 "}",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4951 cxxMemberCallExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4952 callee(cxxMethodDecl(hasName("data"))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4953 on(declRefExpr(to(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4954 varDecl(hasType(recordDecl(hasName("StringRef")))).bind("var")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4955 unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4956 callee(cxxMethodDecl(anyOf(hasName("size"), hasName("length")))),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4957 on(declRefExpr(to(varDecl(equalsBoundNode("var")))))))))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
4958 .bind("data")))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matches( "struct StringRef { int size() const; const char* data() const; };"
"void f(StringRef v) {" " v.data();" " v.size();" "}", cxxMemberCallExpr
( callee(cxxMethodDecl(hasName("data"))), on(declRefExpr(to( varDecl
(hasType(recordDecl(hasName("StringRef")))).bind("var")))), unless
(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl
(anyOf(hasName("size"), hasName("length")))), on(declRefExpr(
to(varDecl(equalsBoundNode("var"))))))))))) .bind("data")))))
; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4958, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches( \"struct StringRef { int size() const; const char* data() const; };\" \"void f(StringRef v) {\" \" v.data();\" \" v.size();\" \"}\", cxxMemberCallExpr( callee(cxxMethodDecl(hasName(\"data\"))), on(declRefExpr(to( varDecl(hasType(recordDecl(hasName(\"StringRef\")))).bind(\"var\")))), unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr( callee(cxxMethodDecl(anyOf(hasName(\"size\"), hasName(\"length\")))), on(declRefExpr(to(varDecl(equalsBoundNode(\"var\"))))))))))) .bind(\"data\"))"
, "true", "false").c_str()) = ::testing::Message()
;
4959}
4960
4961TEST(TypeDefDeclMatcher, Match)class TypeDefDeclMatcher_Match_Test : public ::testing::Test {
public: TypeDefDeclMatcher_Match_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); TypeDefDeclMatcher_Match_Test(TypeDefDeclMatcher_Match_Test
const &); void operator=(TypeDefDeclMatcher_Match_Test const
&);};::testing::TestInfo* const TypeDefDeclMatcher_Match_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"TypeDefDeclMatcher", "Match", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< TypeDefDeclMatcher_Match_Test>);void TypeDefDeclMatcher_Match_Test
::TestBody()
{
4962 EXPECT_TRUE(matches("typedef int typedefDeclTest;",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int typedefDeclTest;"
, typedefDecl(hasName("typedefDeclTest"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4963, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int typedefDeclTest;\", typedefDecl(hasName(\"typedefDeclTest\")))"
, "false", "true").c_str()) = ::testing::Message()
4963 typedefDecl(hasName("typedefDeclTest"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("typedef int typedefDeclTest;"
, typedefDecl(hasName("typedefDeclTest"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4963, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"typedef int typedefDeclTest;\", typedefDecl(hasName(\"typedefDeclTest\")))"
, "false", "true").c_str()) = ::testing::Message()
;
4964}
4965
4966TEST(IsInlineMatcher, IsInline)class IsInlineMatcher_IsInline_Test : public ::testing::Test {
public: IsInlineMatcher_IsInline_Test() {} private: virtual void
TestBody(); static ::testing::TestInfo* const test_info_ __attribute__
((unused)); IsInlineMatcher_IsInline_Test(IsInlineMatcher_IsInline_Test
const &); void operator=(IsInlineMatcher_IsInline_Test const
&);};::testing::TestInfo* const IsInlineMatcher_IsInline_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IsInlineMatcher", "IsInline", __null, __null, (::testing::internal
::GetTestTypeId()), ::testing::Test::SetUpTestCase, ::testing
::Test::TearDownTestCase, new ::testing::internal::TestFactoryImpl
< IsInlineMatcher_IsInline_Test>);void IsInlineMatcher_IsInline_Test
::TestBody()
{
4967 EXPECT_TRUE(matches("void g(); inline void f();",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void g(); inline void f();"
, functionDecl(isInline(), hasName("f"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4968, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void g(); inline void f();\", functionDecl(isInline(), hasName(\"f\")))"
, "false", "true").c_str()) = ::testing::Message()
4968 functionDecl(isInline(), hasName("f"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("void g(); inline void f();"
, functionDecl(isInline(), hasName("f"))))) ; else ::testing::
internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4968, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"void g(); inline void f();\", functionDecl(isInline(), hasName(\"f\")))"
, "false", "true").c_str()) = ::testing::Message()
;
4969 EXPECT_TRUE(matches("namespace n { inline namespace m {} }",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace n { inline namespace m {} }"
, namespaceDecl(isInline(), hasName("m"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4970, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace n { inline namespace m {} }\", namespaceDecl(isInline(), hasName(\"m\")))"
, "false", "true").c_str()) = ::testing::Message()
4970 namespaceDecl(isInline(), hasName("m"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("namespace n { inline namespace m {} }"
, namespaceDecl(isInline(), hasName("m"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4970, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"namespace n { inline namespace m {} }\", namespaceDecl(isInline(), hasName(\"m\")))"
, "false", "true").c_str()) = ::testing::Message()
;
4971}
4972
4973// FIXME: Figure out how to specify paths so the following tests pass on Windows.
4974#ifndef LLVM_ON_WIN32
4975
4976TEST(Matcher, IsExpansionInMainFileMatcher)class Matcher_IsExpansionInMainFileMatcher_Test : public ::testing
::Test { public: Matcher_IsExpansionInMainFileMatcher_Test() {
} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); Matcher_IsExpansionInMainFileMatcher_Test
(Matcher_IsExpansionInMainFileMatcher_Test const &); void
operator=(Matcher_IsExpansionInMainFileMatcher_Test const &
);};::testing::TestInfo* const Matcher_IsExpansionInMainFileMatcher_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"Matcher", "IsExpansionInMainFileMatcher", __null, __null, (
::testing::internal::GetTestTypeId()), ::testing::Test::SetUpTestCase
, ::testing::Test::TearDownTestCase, new ::testing::internal::
TestFactoryImpl< Matcher_IsExpansionInMainFileMatcher_Test
>);void Matcher_IsExpansionInMainFileMatcher_Test::TestBody
()
{
4977 EXPECT_TRUE(matches("class X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
, recordDecl(hasName("X"), isExpansionInMainFile())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4978, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\", recordDecl(hasName(\"X\"), isExpansionInMainFile()))"
, "false", "true").c_str()) = ::testing::Message()
4978 recordDecl(hasName("X"), isExpansionInMainFile())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matches("class X {};"
, recordDecl(hasName("X"), isExpansionInMainFile())))) ; else
::testing::internal::AssertHelper(::testing::TestPartResult::
kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4978, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matches(\"class X {};\", recordDecl(hasName(\"X\"), isExpansionInMainFile()))"
, "false", "true").c_str()) = ::testing::Message()
;
4979 EXPECT_TRUE(notMatches("", recordDecl(isExpansionInMainFile())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("", recordDecl
(isExpansionInMainFile())))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4979, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"\", recordDecl(isExpansionInMainFile()))", "false"
, "true").c_str()) = ::testing::Message()
;
4980 FileContentMappings M;
4981 M.push_back(std::make_pair("/other", "class X {};"));
4982 EXPECT_TRUE(matchesConditionally("#include <other>\n",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <other>\n", recordDecl(isExpansionInMainFile(
)), false, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4984, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally(\"#include <other>\\n\", recordDecl(isExpansionInMainFile()), false, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
4983 recordDecl(isExpansionInMainFile()), false,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <other>\n", recordDecl(isExpansionInMainFile(
)), false, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4984, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally(\"#include <other>\\n\", recordDecl(isExpansionInMainFile()), false, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
4984 "-isystem/", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <other>\n", recordDecl(isExpansionInMainFile(
)), false, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4984, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally(\"#include <other>\\n\", recordDecl(isExpansionInMainFile()), false, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
;
4985}
4986
4987TEST(Matcher, IsExpansionInSystemHeader)class Matcher_IsExpansionInSystemHeader_Test : public ::testing
::Test { public: Matcher_IsExpansionInSystemHeader_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_IsExpansionInSystemHeader_Test
(Matcher_IsExpansionInSystemHeader_Test const &); void operator
=(Matcher_IsExpansionInSystemHeader_Test const &);};::testing
::TestInfo* const Matcher_IsExpansionInSystemHeader_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "IsExpansionInSystemHeader"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_IsExpansionInSystemHeader_Test
>);void Matcher_IsExpansionInSystemHeader_Test::TestBody()
{
4988 FileContentMappings M;
4989 M.push_back(std::make_pair("/other", "class X {};"));
4990 EXPECT_TRUE(matchesConditionally(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include \"other\"\n", recordDecl(isExpansionInSystemHeader
()), true, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include \\\"other\\\"\\n\", recordDecl(isExpansionInSystemHeader()), true, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
4991 "#include \"other\"\n", recordDecl(isExpansionInSystemHeader()), true,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include \"other\"\n", recordDecl(isExpansionInSystemHeader
()), true, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include \\\"other\\\"\\n\", recordDecl(isExpansionInSystemHeader()), true, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
4992 "-isystem/", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include \"other\"\n", recordDecl(isExpansionInSystemHeader
()), true, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4992, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include \\\"other\\\"\\n\", recordDecl(isExpansionInSystemHeader()), true, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
;
4993 EXPECT_TRUE(matchesConditionally("#include \"other\"\n",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include \"other\"\n", recordDecl(isExpansionInSystemHeader(
)), false, "-I/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4995, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally(\"#include \\\"other\\\"\\n\", recordDecl(isExpansionInSystemHeader()), false, \"-I/\", M)"
, "false", "true").c_str()) = ::testing::Message()
4994 recordDecl(isExpansionInSystemHeader()),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include \"other\"\n", recordDecl(isExpansionInSystemHeader(
)), false, "-I/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4995, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally(\"#include \\\"other\\\"\\n\", recordDecl(isExpansionInSystemHeader()), false, \"-I/\", M)"
, "false", "true").c_str()) = ::testing::Message()
4995 false, "-I/", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include \"other\"\n", recordDecl(isExpansionInSystemHeader(
)), false, "-I/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4995, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally(\"#include \\\"other\\\"\\n\", recordDecl(isExpansionInSystemHeader()), false, \"-I/\", M)"
, "false", "true").c_str()) = ::testing::Message()
;
4996 EXPECT_TRUE(notMatches("class X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {};"
, recordDecl(isExpansionInSystemHeader())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4997, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", recordDecl(isExpansionInSystemHeader()))"
, "false", "true").c_str()) = ::testing::Message()
4997 recordDecl(isExpansionInSystemHeader())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("class X {};"
, recordDecl(isExpansionInSystemHeader())))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4997, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"class X {};\", recordDecl(isExpansionInSystemHeader()))"
, "false", "true").c_str()) = ::testing::Message()
;
4998 EXPECT_TRUE(notMatches("", recordDecl(isExpansionInSystemHeader())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatches("", recordDecl
(isExpansionInSystemHeader())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 4998, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatches(\"\", recordDecl(isExpansionInSystemHeader()))"
, "false", "true").c_str()) = ::testing::Message()
;
4999}
5000
5001TEST(Matcher, IsExpansionInFileMatching)class Matcher_IsExpansionInFileMatching_Test : public ::testing
::Test { public: Matcher_IsExpansionInFileMatching_Test() {} private
: virtual void TestBody(); static ::testing::TestInfo* const test_info_
__attribute__ ((unused)); Matcher_IsExpansionInFileMatching_Test
(Matcher_IsExpansionInFileMatching_Test const &); void operator
=(Matcher_IsExpansionInFileMatching_Test const &);};::testing
::TestInfo* const Matcher_IsExpansionInFileMatching_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "Matcher", "IsExpansionInFileMatching"
, __null, __null, (::testing::internal::GetTestTypeId()), ::testing
::Test::SetUpTestCase, ::testing::Test::TearDownTestCase, new
::testing::internal::TestFactoryImpl< Matcher_IsExpansionInFileMatching_Test
>);void Matcher_IsExpansionInFileMatching_Test::TestBody()
{
5002 FileContentMappings M;
5003 M.push_back(std::make_pair("/foo", "class A {};"));
5004 M.push_back(std::make_pair("/bar", "class B {};"));
5005 EXPECT_TRUE(matchesConditionally(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("b.*"), hasName("B")),
true, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5010, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"b.*\"), hasName(\"B\")), true, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5006 "#include <foo>\n"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("b.*"), hasName("B")),
true, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5010, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"b.*\"), hasName(\"B\")), true, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5007 "#include <bar>\n"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("b.*"), hasName("B")),
true, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5010, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"b.*\"), hasName(\"B\")), true, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5008 "class X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("b.*"), hasName("B")),
true, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5010, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"b.*\"), hasName(\"B\")), true, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5009 recordDecl(isExpansionInFileMatching("b.*"), hasName("B")), true,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("b.*"), hasName("B")),
true, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5010, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"b.*\"), hasName(\"B\")), true, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5010 "-isystem/", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("b.*"), hasName("B")),
true, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5010, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"b.*\"), hasName(\"B\")), true, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
;
5011 EXPECT_TRUE(matchesConditionally(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("f.*"), hasName("X")),
false, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5016, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"f.*\"), hasName(\"X\")), false, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5012 "#include <foo>\n"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("f.*"), hasName("X")),
false, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5016, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"f.*\"), hasName(\"X\")), false, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5013 "#include <bar>\n"switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("f.*"), hasName("X")),
false, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5016, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"f.*\"), hasName(\"X\")), false, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5014 "class X {};",switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("f.*"), hasName("X")),
false, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5016, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"f.*\"), hasName(\"X\")), false, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5015 recordDecl(isExpansionInFileMatching("f.*"), hasName("X")), false,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("f.*"), hasName("X")),
false, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5016, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"f.*\"), hasName(\"X\")), false, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
5016 "-isystem/", M))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesConditionally(
"#include <foo>\n" "#include <bar>\n" "class X {};"
, recordDecl(isExpansionInFileMatching("f.*"), hasName("X")),
false, "-isystem/", M))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5016, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesConditionally( \"#include <foo>\\n\" \"#include <bar>\\n\" \"class X {};\", recordDecl(isExpansionInFileMatching(\"f.*\"), hasName(\"X\")), false, \"-isystem/\", M)"
, "false", "true").c_str()) = ::testing::Message()
;
5017}
5018
5019#endif // LLVM_ON_WIN32
5020
5021
5022TEST(ObjCMessageExprMatcher, SimpleExprs)class ObjCMessageExprMatcher_SimpleExprs_Test : public ::testing
::Test { public: ObjCMessageExprMatcher_SimpleExprs_Test() {}
private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); ObjCMessageExprMatcher_SimpleExprs_Test
(ObjCMessageExprMatcher_SimpleExprs_Test const &); void operator
=(ObjCMessageExprMatcher_SimpleExprs_Test const &);};::testing
::TestInfo* const ObjCMessageExprMatcher_SimpleExprs_Test ::test_info_
= ::testing::internal::MakeAndRegisterTestInfo( "ObjCMessageExprMatcher"
, "SimpleExprs", __null, __null, (::testing::internal::GetTestTypeId
()), ::testing::Test::SetUpTestCase, ::testing::Test::TearDownTestCase
, new ::testing::internal::TestFactoryImpl< ObjCMessageExprMatcher_SimpleExprs_Test
>);void ObjCMessageExprMatcher_SimpleExprs_Test::TestBody(
)
{
5023 // don't find ObjCMessageExpr where none are present
5024 EXPECT_TRUE(notMatchesObjC("", objcMessageExpr(anything())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatchesObjC("", objcMessageExpr
(anything())))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5024, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatchesObjC(\"\", objcMessageExpr(anything()))", "false"
, "true").c_str()) = ::testing::Message()
;
5025
5026 std::string Objc1String =
5027 "@interface Str "
5028 " - (Str *)uppercaseString:(Str *)str;"
5029 "@end "
5030 "@interface foo "
5031 "- (void)meth:(Str *)text;"
5032 "@end "
5033 " "
5034 "@implementation foo "
5035 "- (void) meth:(Str *)text { "
5036 " [self contents];"
5037 " Str *up = [text uppercaseString];"
5038 "} "
5039 "@end ";
5040 EXPECT_TRUE(matchesObjC(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(anything())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5042, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(anything()))", "false"
, "true").c_str()) = ::testing::Message()
5041 Objc1String,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(anything())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5042, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(anything()))", "false"
, "true").c_str()) = ::testing::Message()
5042 objcMessageExpr(anything())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(anything())))) ; else ::testing::internal::
AssertHelper(::testing::TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5042, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(anything()))", "false"
, "true").c_str()) = ::testing::Message()
;
5043 EXPECT_TRUE(matchesObjC(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5045, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\")))"
, "false", "true").c_str()) = ::testing::Message()
5044 Objc1String,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5045, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\")))"
, "false", "true").c_str()) = ::testing::Message()
5045 objcMessageExpr(hasSelector("contents"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5045, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\")))"
, "false", "true").c_str()) = ::testing::Message()
;
5046 EXPECT_TRUE(matchesObjC(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("cont*"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5048, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"cont*\")))"
, "false", "true").c_str()) = ::testing::Message()
5047 Objc1String,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("cont*"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5048, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"cont*\")))"
, "false", "true").c_str()) = ::testing::Message()
5048 objcMessageExpr(matchesSelector("cont*"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("cont*"))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5048, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"cont*\")))"
, "false", "true").c_str()) = ::testing::Message()
;
5049 EXPECT_FALSE(matchesObjC(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("?cont*")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5051, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"?cont*\")))"
, "true", "false").c_str()) = ::testing::Message()
5050 Objc1String,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("?cont*")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5051, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"?cont*\")))"
, "true", "false").c_str()) = ::testing::Message()
5051 objcMessageExpr(matchesSelector("?cont*"))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(!(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("?cont*")))))) ; else ::testing
::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure
, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5051, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"?cont*\")))"
, "true", "false").c_str()) = ::testing::Message()
;
5052 EXPECT_TRUE(notMatchesObjC(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"), hasNullSelector())
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5054, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\"), hasNullSelector()))"
, "false", "true").c_str()) = ::testing::Message()
5053 Objc1String,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"), hasNullSelector())
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5054, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\"), hasNullSelector()))"
, "false", "true").c_str()) = ::testing::Message()
5054 objcMessageExpr(hasSelector("contents"), hasNullSelector())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(notMatchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"), hasNullSelector())
))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5054, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "notMatchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\"), hasNullSelector()))"
, "false", "true").c_str()) = ::testing::Message()
;
5055 EXPECT_TRUE(matchesObjC(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"), hasUnarySelector()
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5057, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\"), hasUnarySelector()))"
, "false", "true").c_str()) = ::testing::Message()
5056 Objc1String,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"), hasUnarySelector()
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5057, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\"), hasUnarySelector()))"
, "false", "true").c_str()) = ::testing::Message()
5057 objcMessageExpr(hasSelector("contents"), hasUnarySelector())))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"), hasUnarySelector()
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5057, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\"), hasUnarySelector()))"
, "false", "true").c_str()) = ::testing::Message()
;
5058 EXPECT_TRUE(matchesObjC(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"), numSelectorArgs(0)
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\"), numSelectorArgs(0)))"
, "false", "true").c_str()) = ::testing::Message()
5059 Objc1String,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"), numSelectorArgs(0)
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\"), numSelectorArgs(0)))"
, "false", "true").c_str()) = ::testing::Message()
5060 objcMessageExpr(hasSelector("contents"), numSelectorArgs(0))))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(hasSelector("contents"), numSelectorArgs(0)
)))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5060, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(hasSelector(\"contents\"), numSelectorArgs(0)))"
, "false", "true").c_str()) = ::testing::Message()
;
5061 EXPECT_TRUE(matchesObjC(switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("uppercase*"), argumentCountIs
(0) )))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5065, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"uppercase*\"), argumentCountIs(0) ))"
, "false", "true").c_str()) = ::testing::Message()
5062 Objc1String,switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("uppercase*"), argumentCountIs
(0) )))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5065, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"uppercase*\"), argumentCountIs(0) ))"
, "false", "true").c_str()) = ::testing::Message()
5063 objcMessageExpr(matchesSelector("uppercase*"),switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("uppercase*"), argumentCountIs
(0) )))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5065, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"uppercase*\"), argumentCountIs(0) ))"
, "false", "true").c_str()) = ::testing::Message()
5064 argumentCountIs(0)switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("uppercase*"), argumentCountIs
(0) )))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5065, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"uppercase*\"), argumentCountIs(0) ))"
, "false", "true").c_str()) = ::testing::Message()
5065 )))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(matchesObjC( Objc1String
, objcMessageExpr(matchesSelector("uppercase*"), argumentCountIs
(0) )))) ; else ::testing::internal::AssertHelper(::testing::
TestPartResult::kNonFatalFailure, "/tmp/buildd/llvm-toolchain-snapshot-3.8~svn255820/tools/clang/unittests/ASTMatchers/ASTMatchersTest.cpp"
, 5065, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "matchesObjC( Objc1String, objcMessageExpr(matchesSelector(\"uppercase*\"), argumentCountIs(0) ))"
, "false", "true").c_str()) = ::testing::Message()
;
5066
5067}
5068
5069} // end namespace ast_matchers
5070} // end namespace clang