diff options
| author | Todd Fiala <todd.fiala@gmail.com> | 2014-06-02 20:55:29 +0000 |
|---|---|---|
| committer | Todd Fiala <todd.fiala@gmail.com> | 2014-06-02 20:55:29 +0000 |
| commit | 732215f989c37638501c8064762bd93a36b6ec3c (patch) | |
| tree | 4a290598e3e6ad29619a3ad569189009d21e2d0c /lldb/test/python_api | |
| parent | d91d605f7fa7855159dc63bf5a26b985f02372a9 (diff) | |
| download | bcm5719-llvm-732215f989c37638501c8064762bd93a36b6ec3c.tar.gz bcm5719-llvm-732215f989c37638501c8064762bd93a36b6ec3c.zip | |
Add support for inspecting enum members.
Change by Russell Harmon.
Xcode project updates (and all errors therein)
by Todd Fiala.
llvm-svn: 210046
Diffstat (limited to 'lldb/test/python_api')
| -rw-r--r-- | lldb/test/python_api/type/TestTypeList.py | 5 | ||||
| -rw-r--r-- | lldb/test/python_api/type/main.cpp | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lldb/test/python_api/type/TestTypeList.py b/lldb/test/python_api/type/TestTypeList.py index 39f4a29d3a7..71d1f4593ca 100644 --- a/lldb/test/python_api/type/TestTypeList.py +++ b/lldb/test/python_api/type/TestTypeList.py @@ -70,6 +70,11 @@ class TypeAndTypeListTestCase(TestBase): for type in type_list: self.assertTrue(type) self.DebugSBType(type) + for field in type.fields: + if field.name == "type": + for enum_member in field.type.enum_members: + self.assertTrue(enum_member) + self.DebugSBType(enum_member.type) # Pass an empty string. LLDB should not crash. :-) fuzz_types = target.FindTypes(None) diff --git a/lldb/test/python_api/type/main.cpp b/lldb/test/python_api/type/main.cpp index db0e249cc91..67b57ace08f 100644 --- a/lldb/test/python_api/type/main.cpp +++ b/lldb/test/python_api/type/main.cpp @@ -12,9 +12,14 @@ class Task { public: int id; Task *next; + enum { + TASK_TYPE_1, + TASK_TYPE_2 + } type; Task(int i, Task *n): id(i), - next(n) + next(n), + type(TASK_TYPE_1) {} }; |

