-TEST(HasType, MatchesTypedefDecl) {
- EXPECT_TRUE(matches("typedef int X;", typedefDecl(hasType(asString("int")))));
- EXPECT_TRUE(matches("typedef const int T;",
- typedefDecl(hasType(asString("const int")))));
- EXPECT_TRUE(notMatches("typedef const int T;",
- typedefDecl(hasType(asString("int")))));
- EXPECT_TRUE(matches("typedef int foo; typedef foo bar;",
- typedefDecl(hasType(asString("foo")), hasName("bar"))));
-}
-