summaryrefslogtreecommitdiffstats
path: root/lldb/lit/Expr/TestCallUserDefinedFunction.test
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-09-15 20:13:55 +0000
committerChris Bieneman <beanz@apple.com>2016-09-15 20:13:55 +0000
commit4851558f556c03b12c8f15740d0281bd61dde796 (patch)
tree0d2318fb159832b31b96f5fdba5f76ae95844951 /lldb/lit/Expr/TestCallUserDefinedFunction.test
parent8b16da87444eb1399ce32e7027e2ab5c69c42e5e (diff)
downloadbcm5719-llvm-4851558f556c03b12c8f15740d0281bd61dde796.tar.gz
bcm5719-llvm-4851558f556c03b12c8f15740d0281bd61dde796.zip
[LIT] First pass of LLDB LIT support
Summary: This patch supplies basic infrastructure for LLDB to use LIT, and ports a few basic test cases from the LLDB test suite into LIT. With this patch the LLDB lit system is not capable or intended to fully replace the existing LLDB test suite, but this first patch enables people to write lit tests for LLDB. The lit substitution for %cc and %cxx default to the host compiler unless the CMake option LLDB_TEST_CLANG is On, in which case the in-tree clang will be used. The target check-lldb-lit will run all lit tests including the lit-based executor for the unit tests. Alternatively there is a target generated for each subdirectory under the lit directory, so check-lldb-unit and check-lldb-expr will run just the tests under their respective directories. The ported tests are not removed from the existing suite, and should not be until such a time when the lit runner is mature and in use by bots and workflows. Reviewers: zturner, labath, jingham, tfiala Subscribers: beanz, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D24591 llvm-svn: 281651
Diffstat (limited to 'lldb/lit/Expr/TestCallUserDefinedFunction.test')
-rw-r--r--lldb/lit/Expr/TestCallUserDefinedFunction.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/lit/Expr/TestCallUserDefinedFunction.test b/lldb/lit/Expr/TestCallUserDefinedFunction.test
new file mode 100644
index 00000000000..0c98a9bae78
--- /dev/null
+++ b/lldb/lit/Expr/TestCallUserDefinedFunction.test
@@ -0,0 +1,20 @@
+# XFAIL: windows
+# -> llvm.org/pr24489
+
+# RUN: %cxx %p/Inputs/call-function.cpp -g -o %t && %lldb -b -s %s -- %t | FileCheck %s
+
+breakpoint set --file call-function.cpp --line 52
+run
+expression fib(5)
+# CHECK: $0 = 5
+expression add(4,8)
+# CHECK: $1 = 12
+
+expression add(add(5,2),add(3,4))
+# CHECK: $2 = 14
+expression add(add(5,2),fib(5))
+# CHECK: $3 = 12
+expression stringCompare((const char*) "Hello world")
+# CHECK: $4 = true
+expression stringCompare((const char*) "Hellworld")
+# CHECK: $5 = false
OpenPOWER on IntegriCloud