зеркало из https://github.com/microsoft/clang-1.git
Adding tests since when I was asked whether this works I wasn't
100% sure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169725 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
29573b0a82
Коммит
ec33b6f644
|
@ -80,6 +80,13 @@ TEST(NameableDeclaration, REMatchesVariousDecls) {
|
|||
EXPECT_TRUE(matches("int aFOObBARc;", Abc));
|
||||
EXPECT_TRUE(notMatches("int cab;", Abc));
|
||||
EXPECT_TRUE(matches("int cabc;", Abc));
|
||||
|
||||
DeclarationMatcher StartsWithK = namedDecl(matchesName(":k[^:]*$"));
|
||||
EXPECT_TRUE(matches("int k;", StartsWithK));
|
||||
EXPECT_TRUE(matches("int kAbc;", StartsWithK));
|
||||
EXPECT_TRUE(matches("namespace x { int kTest; }", StartsWithK));
|
||||
EXPECT_TRUE(matches("class C { int k; };", StartsWithK));
|
||||
EXPECT_TRUE(notMatches("class C { int ckc; };", StartsWithK));
|
||||
}
|
||||
|
||||
TEST(DeclarationMatcher, MatchClass) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче