diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-05 12:28:25 -0800 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-05 12:33:21 -0800 |
commit | 2abcf44f4c91a326d1f4513fb5c25fec51c6ca66 (patch) | |
tree | 0a3327f9c7bae780cf13a6288dad60feb14b61c9 /lldb/test/Shell/Reproducer/Functionalities | |
parent | 5f158d8e21bed00a6d7377742660397bd4765456 (diff) | |
download | bcm5719-llvm-2abcf44f4c91a326d1f4513fb5c25fec51c6ca66.tar.gz bcm5719-llvm-2abcf44f4c91a326d1f4513fb5c25fec51c6ca66.zip |
[Reproducer] Add test case for expression evaluation
Diffstat (limited to 'lldb/test/Shell/Reproducer/Functionalities')
-rw-r--r-- | lldb/test/Shell/Reproducer/Functionalities/Inputs/ExpressionEvaluation.in | 10 | ||||
-rw-r--r-- | lldb/test/Shell/Reproducer/Functionalities/TestExpressionEvaluation.test | 18 |
2 files changed, 28 insertions, 0 deletions
diff --git a/lldb/test/Shell/Reproducer/Functionalities/Inputs/ExpressionEvaluation.in b/lldb/test/Shell/Reproducer/Functionalities/Inputs/ExpressionEvaluation.in new file mode 100644 index 00000000000..8887c201d92 --- /dev/null +++ b/lldb/test/Shell/Reproducer/Functionalities/Inputs/ExpressionEvaluation.in @@ -0,0 +1,10 @@ +breakpoint set -f foo.cpp -l 11 +run +p foo +next +p Foo(2, 3.33); +p $1 +p foo = Foo(3, 4.44); +p foo +cont +reproducer generate diff --git a/lldb/test/Shell/Reproducer/Functionalities/TestExpressionEvaluation.test b/lldb/test/Shell/Reproducer/Functionalities/TestExpressionEvaluation.test new file mode 100644 index 00000000000..d826a47cb24 --- /dev/null +++ b/lldb/test/Shell/Reproducer/Functionalities/TestExpressionEvaluation.test @@ -0,0 +1,18 @@ +# UNSUPPORTED: system-windows, system-freebsd + +# This tests that expression evaluation continues to work when replaying a +# reproducer. + +# RUN: rm -rf %t.repro +# RUN: %clangxx_host %S/Inputs/foo.cpp -g -o %t.out + +# RUN: %lldb -x -b -s %S/Inputs/ExpressionEvaluation.in --capture --capture-path %t.repro %t.out | FileCheck %s +# RUN: %lldb --replay %t.repro | FileCheck %s + +# CHECK: stop reason = breakpoint 1.1 +# CHECK: (Foo) $0 = (m_i = 0, m_d = 0) +# CHECK: stop reason = step over +# CHECK: (Foo) $1 = (m_i = 2, m_d = 3) +# CHECK: (Foo) $1 = (m_i = 2, m_d = 3) +# CHECK: (Foo) $2 = (m_i = 3, m_d = 4) +# CHECK: (Foo) $3 = (m_i = 3, m_d = 4) |