Files
clang-p2996/lldb/test/API/functionalities/data-formatter/bytecode-summary/TestBytecodeSummary.py
Adrian Prantl 87659a17d0 Reland: [lldb] Implement a formatter bytecode interpreter in C++
Compared to the python version, this also does type checking and error
handling, so it's slightly longer, however, it's still comfortably
under 500 lines.

Relanding with more explicit type conversions.
2024-12-10 16:37:53 -08:00

18 lines
546 B
Python

import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestCase(TestBase):
@skipUnlessDarwin
def test(self):
self.build()
if self.TraceOn():
self.expect("log enable -v lldb formatters")
lldbutil.run_to_source_breakpoint(
self, "break here", lldb.SBFileSpec("main.cpp")
)
self.expect("v x", substrs=["(MyOptional<int>) x = None"])
self.expect("v y", substrs=["(MyOptional<int>) y = 42"])