2 Test more expression command sequences with objective-c.
7 from lldbsuite
.test
.decorators
import *
8 from lldbsuite
.test
.lldbtest
import *
9 from lldbsuite
.test
import lldbutil
12 class FoundationTestCaseNSArray(TestBase
):
13 def test_NSArray_expr_commands(self
):
14 """Test expression commands for NSArray."""
16 self
.target
, process
, thread
, bkpt
= lldbutil
.run_to_source_breakpoint(
17 self
, "// Break here for NSArray tests", lldb
.SBFileSpec("main.m", False)
20 self
.runCmd("thread backtrace")
22 "expression (int)[nil_mutable_array count]", patterns
=["\(int\) \$.* = 0"]
24 self
.expect("expression (int)[array1 count]", patterns
=["\(int\) \$.* = 3"])
25 self
.expect("expression (int)[array2 count]", patterns
=["\(int\) \$.* = 3"])
26 self
.expect("expression (int)array1.count", patterns
=["\(int\) \$.* = 3"])
27 self
.expect("expression (int)array2.count", patterns
=["\(int\) \$.* = 3"])
28 self
.runCmd("process continue")