Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / lang / objc / foundation / TestObjCMethodsNSArray.py
blob81c409d08364c948207032454750d42858b9537a
1 """
2 Test more expression command sequences with objective-c.
3 """
6 import lldb
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."""
15 self.build()
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")
21 self.expect(
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")