diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-12-20 11:07:27 +0100 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-20 11:07:30 +0100 |
commit | 29bd2194979c50097edb39a4beb714bff8c153a1 (patch) | |
tree | b8850f9b37ee462e4689e0e57884464ca4a334d7 /lldb/packages/Python/lldbsuite/test | |
parent | acbc9aed726d4b7428691e026a214cb26ee2cf94 (diff) | |
download | bcm5719-llvm-29bd2194979c50097edb39a4beb714bff8c153a1.tar.gz bcm5719-llvm-29bd2194979c50097edb39a4beb714bff8c153a1.zip |
[lldb] Added test for objc_direct calls with categories
As pointed out in D71694 this wasn't tested before in LLDB.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m b/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m index 1a199acdda4..6799f22500c 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m @@ -24,6 +24,7 @@ const char *directCallConflictingName() { //%self.expect("expr [self directCallNSStringArg: str]", substrs=['@"some string"']) //%self.expect("expr [self directCallIdArg: (id)str]", substrs=['@"some string appendix"']) //%self.expect("expr [self directCallConflictingName]", substrs=["correct function"]) + //%self.expect("expr [self directCallWithCategory]", substrs=["called function with category"]) } // Declare several objc_direct functions we can test. @@ -61,6 +62,17 @@ const char *directCallConflictingName() { } @end + +@interface Foo (Cat) +@end + +@implementation Foo (Cat) +-(const char *) directCallWithCategory __attribute__((objc_direct)) +{ + return "called function with category"; +} +@end + int main() { Foo *foo = [[Foo alloc] init]; @@ -75,5 +87,6 @@ int main() //%self.expect("expr [foo directCallNSStringArg: str]", substrs=['@"some string"']) //%self.expect("expr [foo directCallIdArg: (id)str]", substrs=['@"some string appendix"']) //%self.expect("expr [foo directCallConflictingName]", substrs=["correct function"]) + //%self.expect("expr [foo directCallWithCategory]", substrs=["called function with category"]) return 0; } |