diff options
author | Johnny Chen <johnny.chen@apple.com> | 2010-09-22 00:25:33 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2010-09-22 00:25:33 +0000 |
commit | 9bb7dade7b1ec2c26e56b9226fb32c45d9c191b9 (patch) | |
tree | 69ffff6244a4e5098c81e08f28d38cf432047cd4 | |
parent | 60e1aa56f7bfcc0272f6b54f63587f504967f2a6 (diff) | |
download | bcm5719-llvm-9bb7dade7b1ec2c26e56b9226fb32c45d9c191b9.tar.gz bcm5719-llvm-9bb7dade7b1ec2c26e56b9226fb32c45d9c191b9.zip |
Sanity check the print representation of lldb.SBProcess object.
llvm-svn: 114513
-rw-r--r-- | lldb/test/array_types/TestArrayTypes.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lldb/test/array_types/TestArrayTypes.py b/lldb/test/array_types/TestArrayTypes.py index f284490105a..38974a7649a 100644 --- a/lldb/test/array_types/TestArrayTypes.py +++ b/lldb/test/array_types/TestArrayTypes.py @@ -84,6 +84,7 @@ class ArrayTypesTestCase(TestBase): breakpoint = target.BreakpointCreateByLocation("main.c", 42) self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT) + # Sanity check the print representation of breakpoint. bp = repr(breakpoint) self.expect(bp, msg="Breakpoint looks good", exe=False, substrs = ["file ='main.c'", @@ -99,20 +100,24 @@ class ArrayTypesTestCase(TestBase): self.process = target.GetProcess() self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID) - #procRepr = repr(self.process) - #print "procRepr:", procRepr + # Sanity check the print representation of process. + proc = repr(self.process) + self.expect(proc, msg="Process looks good", exe=False, + patterns = ["executable.+array_types.a\.out", + "instance name:.+state: Stopped"]) # The stop reason of the thread should be breakpoint. thread = self.process.GetThreadAtIndex(0) self.assertTrue(thread.GetStopReason() == StopReasonEnum("Breakpoint"), STOPPED_DUE_TO_BREAKPOINT) - #threadRepr = repr(thread) - #print "threadRepr:", threadRepr + #thr = repr(thread) + #print "thr:", thr # The breakpoint should have a hit count of 1. self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE) + # The breakpoint should be resolved by now. bp = repr(breakpoint) self.expect(bp, "Breakpoint looks good and is resolved", exe=False, substrs = ["file ='main.c'", @@ -122,11 +127,11 @@ class ArrayTypesTestCase(TestBase): # Lookup the "strings" string array variable. frame = thread.GetFrameAtIndex(0) - #frameRepr = repr(frame) - #print "frameRepr:", frameRepr + #frm = repr(frame) + #print "frm:", frm variable = frame.LookupVar("strings") - #varRepr = repr(variable) - #print "varRepr:", varRepr + #var = repr(variable) + #print "var:", var self.DebugSBValue(frame, variable) self.assertTrue(variable.GetNumChildren() == 4, "Variable 'strings' should have 4 children") |