Skip to content

Commit 532bfea

Browse files
committed
add test for struct description
1 parent f54992a commit 532bfea

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
OBJC_SOURCES := main.m
2+
include Makefile.rules
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import lldb
2+
from lldbsuite.test.decorators import *
3+
from lldbsuite.test.lldbtest import *
4+
from lldbsuite.test import lldbutil
5+
6+
7+
class TestCase(TestBase):
8+
def test(self):
9+
self.build()
10+
lldbutil.run_to_source_breakpoint(self, "break here", lldb.SBFileSpec("main.m"))
11+
self.expect(
12+
"vo pair",
13+
substrs=["error:", "not a pointer type", "(Pair) pair = (f = 2, e = 3)"],
14+
)
15+
self.expect(
16+
"expr -O -- pair",
17+
substrs=["error:", "not a pointer type", "(Pair) (f = 2, e = 3)"],
18+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <stdio.h>
2+
3+
typedef struct Pair {
4+
int f;
5+
int e;
6+
} Pair;
7+
8+
int main() {
9+
Pair pair = {2, 3};
10+
printf("break here\n");
11+
return 0;
12+
}

0 commit comments

Comments
 (0)