[Clang] Prevent `mlink-builtin-bitcode` from internalizing the RPC client (#118661)
[llvm-project.git] / lldb / test / API / commands / expression / po_verbosity / TestPoVerbosity.py
blob2dfbd2f8b7c891f8b732824c709f5866c2188f77
1 """
2 Test that the po command acts correctly.
3 """
6 import lldb
7 from lldbsuite.test.decorators import *
8 from lldbsuite.test.lldbtest import *
9 from lldbsuite.test import lldbutil
12 class PoVerbosityTestCase(TestBase):
13 def setUp(self):
14 # Call super's setUp().
15 TestBase.setUp(self)
16 # Find the line number to break for main.cpp.
17 self.line = line_number("main.m", "// Stop here")
19 @add_test_categories(["objc"])
20 def test(self):
21 """Test that the po command acts correctly."""
22 self.build()
24 # This is the function to remove the custom formats in order to have a
25 # clean slate for the next test case.
26 def cleanup():
27 self.runCmd("type summary clear", check=False)
28 self.runCmd("type synthetic clear", check=False)
30 # Execute the cleanup function during test case tear down.
31 self.addTearDownHook(cleanup)
33 """Test expr + formatters for good interoperability."""
34 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
36 lldbutil.run_break_set_by_file_and_line(
37 self, "main.m", self.line, loc_exact=True
40 self.runCmd("run", RUN_SUCCEEDED)
42 self.runCmd("settings set target.prefer-dynamic-value no-dynamic-values")
44 self.expect("expr -O -v -- foo", substrs=["(id) $", " = 0x", "1 = 2", "2 = 3;"])
45 self.expect(
46 "expr -O -vfull -- foo", substrs=["(id) $", " = 0x", "1 = 2", "2 = 3;"]
48 self.expect("expr -O -- foo", matching=False, substrs=["(id) $"])
50 self.expect("expr -O -- 22", matching=False, substrs=["(int) $"])
51 self.expect("expr -O -- 22", substrs=["22"])
53 self.expect("expr -O -vfull -- 22", substrs=["(int) $", " = 22"])
55 self.expect("expr -O -v -- 22", substrs=["(int) $", " = 22"])