xref: /llvm-project/lldb/test/Shell/ScriptInterpreter/Python/bytecode.test (revision fffe8c668461e73055182f229765cb7de908e295)
1*fffe8c66SAdrian Prantl# RUN: %python %S/../../../../examples/python/formatter_bytecode.py --test
2*fffe8c66SAdrian Prantl# RUN: %python %S/../../../../examples/python/formatter_bytecode.py --compile "1u dup" | FileCheck %s --check-prefix=COMPILE
3*fffe8c66SAdrian Prantl# RUN: %python %S/../../../../examples/python/formatter_bytecode.py --disassemble "200101" | FileCheck %s --check-prefix=DISASSEMBLE
4*fffe8c66SAdrian Prantl# COMPILE: 200101
5*fffe8c66SAdrian Prantl# DISASSEMBLE: 1u dup
6*fffe8c66SAdrian Prantl
7*fffe8c66SAdrian Prantl# RUN: %clang_host -std=c++17 -g %S/Inputs/FormatterBytecode/MyOptional.cpp -o %t.exe
8*fffe8c66SAdrian Prantl# RUN: %lldb %t.exe -o "command script import %S/../../../../examples/python/formatter_bytecode.py" -o "command script import %S/Inputs/FormatterBytecode/formatter.py" -o "b -p here" -o "r" -o "v x" -o "v y" -o q | FileCheck %s --check-prefix=OPTIONAL
9*fffe8c66SAdrian Prantl# OPTIONAL: (lldb) v x
10*fffe8c66SAdrian Prantl# OPTIONAL: (MyOptional<int>) x = {
11*fffe8c66SAdrian Prantl# OPTIONAL: hasVal = false
12*fffe8c66SAdrian Prantl# OPTIONAL: }
13*fffe8c66SAdrian Prantl# OPTIONAL: (lldb) v y
14*fffe8c66SAdrian Prantl# OPTIONAL: (MyOptional<int>) y = {
15*fffe8c66SAdrian Prantl# OPTIONAL:   Storage = (value = 42, hasVal = true)
16*fffe8c66SAdrian Prantl# OPTIONAL: }
17