mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 08:27:50 +00:00
AST Matchers tests: test that member() matches member allocation functions:
declare size_t in system-independent way. llvm-svn: 162158
This commit is contained in:
parent
a4309c941c
commit
edee47891c
@ -2014,14 +2014,14 @@ TEST(Member, MatchesInMemberFunctionCall) {
|
||||
}
|
||||
|
||||
TEST(Member, MatchesMemberAllocationFunction) {
|
||||
EXPECT_TRUE(matches("namespace std { typedef unsigned long size_t; }"
|
||||
EXPECT_TRUE(matches("namespace std { typedef typeof(sizeof(int)) size_t; }"
|
||||
"class X { void *operator new(std::size_t); };",
|
||||
method(ofClass(hasName("X")))));
|
||||
|
||||
EXPECT_TRUE(matches("class X { void operator delete(void*); };",
|
||||
method(ofClass(hasName("X")))));
|
||||
|
||||
EXPECT_TRUE(matches("namespace std { typedef unsigned long size_t; }"
|
||||
EXPECT_TRUE(matches("namespace std { typedef typeof(sizeof(int)) size_t; }"
|
||||
"class X { void operator delete[](void*, std::size_t); };",
|
||||
method(ofClass(hasName("X")))));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user