[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.
This commit is contained in:
Raphael Isemann 2019-11-19 13:45:37 +01:00
parent df11117086
commit f6ffe6fc9d
1 changed files with 14 additions and 0 deletions

View File

@ -102,3 +102,17 @@ class SBTypeMemberFunctionsTest(TestBase):
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())