This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
33 lines
762 B
Python
33 lines
762 B
Python
"""
|
|
Test that we can have persistent pointer variables
|
|
"""
|
|
|
|
|
|
import lldb
|
|
import lldbsuite.test.lldbutil as lldbutil
|
|
from lldbsuite.test.lldbtest import *
|
|
|
|
|
|
class PersistentPtrUpdateTestCase(TestBase):
|
|
def test(self):
|
|
"""Test that we can have persistent pointer variables"""
|
|
self.build()
|
|
|
|
def cleanup():
|
|
pass
|
|
|
|
# Execute the cleanup function during test case tear down.
|
|
self.addTearDownHook(cleanup)
|
|
|
|
self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
|
|
|
|
self.runCmd("break set -p here")
|
|
|
|
self.runCmd("run", RUN_SUCCEEDED)
|
|
|
|
self.runCmd("expr void* $foo = 0")
|
|
|
|
self.runCmd("continue")
|
|
|
|
self.expect("expr $foo", substrs=["$foo", "0x0"])
|