[Lldb-commits] [lldb] f6ffe6f - [lldb] Also test Get[De]mangledName of SBType in TestSBTypeClassMembers.py
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 19 05:04:47 PST 2019
Author: Raphael Isemann
Date: 2019-11-19T14:04:02+01:00
New Revision: f6ffe6fc9d9b8b0e197500b5b61f3e8d55599d7a
URL: https://github.com/llvm/llvm-project/commit/f6ffe6fc9d9b8b0e197500b5b61f3e8d55599d7a
DIFF: https://github.com/llvm/llvm-project/commit/f6ffe6fc9d9b8b0e197500b5b61f3e8d55599d7a.diff
LOG: [lldb] Also test Get[De]mangledName of SBType in TestSBTypeClassMembers.py
I just used the mangled names as this test is anyway a Darwin-only ObjC++ test.
We probably should also test this on other platforms but that will be
another commit as we need to untangle the ObjC and C++ parts first.
Added:
Modified:
lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py b/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
index 960df3f184db..3517abb1ebb9 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
+++ b/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
@@ -102,3 +102,17 @@ def test(self):
self.assertEquals("int",
Thingy.GetMemberFunctionAtIndex(1).GetArgumentTypeAtIndex(
0).GetName(), "Thingy::foo takes an int")
+
+ self.assertEquals("Derived::dImpl()", Derived.GetMemberFunctionAtIndex(0).GetDemangledName())
+ self.assertEquals("Derived::baz(float)", Derived.GetMemberFunctionAtIndex(1).GetDemangledName())
+ self.assertEquals("Base::foo(int, int)", Base.GetMemberFunctionAtIndex(0).GetDemangledName())
+ self.assertEquals("Base::bar(int, char)", Base.GetMemberFunctionAtIndex(1).GetDemangledName())
+ self.assertEquals("Base::dat()", Base.GetMemberFunctionAtIndex(2).GetDemangledName())
+ self.assertEquals("Base::sfunc(char, int, float)", Base.GetMemberFunctionAtIndex(3).GetDemangledName())
+
+ self.assertEquals("_ZN7Derived5dImplEv", Derived.GetMemberFunctionAtIndex(0).GetMangledName())
+ self.assertEquals("_ZN7Derived3bazEf", Derived.GetMemberFunctionAtIndex(1).GetMangledName())
+ self.assertEquals("_ZN4Base3fooEii", Base.GetMemberFunctionAtIndex(0).GetMangledName())
+ self.assertEquals("_ZN4Base3barEic", Base.GetMemberFunctionAtIndex(1).GetMangledName())
+ self.assertEquals("_ZN4Base3datEv", Base.GetMemberFunctionAtIndex(2).GetMangledName())
+ self.assertEquals("_ZN4Base5sfuncEcif", Base.GetMemberFunctionAtIndex(3).GetMangledName())
More information about the lldb-commits
mailing list