[lldb][gmodules] Fix TestDataFormatterCpp with gmodules on macOS

'Point' is actually a system type defined on macOS.
This commit is contained in:
Raphael Isemann 2021-11-01 18:43:58 +01:00
parent 702fd3d323
commit ac7c8808ba
2 changed files with 9 additions and 9 deletions

View File

@ -120,32 +120,32 @@ class CppDataFormatterTestCase(TestBase):
' = ptr = ',
' "1234567890123456789012345678901234567890123456789012345678901234ABC"'])
self.runCmd("type summary add -c Point")
self.runCmd("type summary add -c TestPoint")
self.expect("frame variable iAmSomewhere",
substrs=['x = 4',
'y = 6'])
self.expect("type summary list",
substrs=['Point',
substrs=['TestPoint',
'one-line'])
self.runCmd("type summary add --summary-string \"y=${var.y%x}\" Point")
self.runCmd("type summary add --summary-string \"y=${var.y%x}\" TestPoint")
self.expect("frame variable iAmSomewhere",
substrs=['y=0x'])
self.runCmd(
"type summary add --summary-string \"y=${var.y},x=${var.x}\" Point")
"type summary add --summary-string \"y=${var.y},x=${var.x}\" TestPoint")
self.expect("frame variable iAmSomewhere",
substrs=['y=6',
'x=4'])
self.runCmd("type summary add --summary-string \"hello\" Point -e")
self.runCmd("type summary add --summary-string \"hello\" TestPoint -e")
self.expect("type summary list",
substrs=['Point',
substrs=['TestPoint',
'show children'])
self.expect("frame variable iAmSomewhere",

View File

@ -22,10 +22,10 @@ typedef Type3 Type4; // should show as char
typedef int ChildType; // should show as int
typedef int AnotherChildType; // should show as int
struct Point {
struct TestPoint {
int x;
int y;
Point(int X = 3, int Y = 2) : x(X), y(Y) {}
TestPoint(int X = 3, int Y = 2) : x(X), y(Y) {}
};
typedef float ShowMyGuts;
@ -85,7 +85,7 @@ int main (int argc, const char * argv[])
Speed* SPPtrILookHex = new Speed(16);
Point iAmSomewhere(4,6);
TestPoint iAmSomewhere(4,6);
i_am_cool *cool_pointer = (i_am_cool*)malloc(sizeof(i_am_cool)*3);
cool_pointer[0] = i_am_cool(3,-3.141592,'E');