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())


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to