summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-09-18 19:31:47 +0000
committerVedant Kumar <vsk@apple.com>2018-09-18 19:31:47 +0000
commit9b13bea61a576a41eda7c88d1628f9914bfc02b4 (patch)
treee3664f582263814503176f9237fa2a3b02b0f469 /lldb/packages/Python/lldbsuite/test/functionalities
parentee679e10bbd2f9d66ecc04cac0678ffe7082f83a (diff)
downloadbcm5719-llvm-9b13bea61a576a41eda7c88d1628f9914bfc02b4.tar.gz
bcm5719-llvm-9b13bea61a576a41eda7c88d1628f9914bfc02b4.zip
Allow use of self.filecheck in LLDB tests (c.f self.expect)
Add a "filecheck" method to the LLDB test base. This allows test authors to pattern match command output using FileCheck, making it possible to write stricter tests than what `self.expect` allows. For context (motivation, examples of stricter checking, etc), see the lldb-dev thread: "Using FileCheck in lldb inline tests". Differential Revision: https://reviews.llvm.org/D50751 llvm-svn: 342508
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/main.cpp
index 649c1e09a6a..5b43102c268 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/main.cpp
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/main.cpp
@@ -9,6 +9,11 @@
typedef int Foo;
int main() {
+ // CHECK: (Foo [3]) array = {
+ // CHECK-NEXT: (Foo) [0] = 1
+ // CHECK-NEXT: (Foo) [1] = 2
+ // CHECK-NEXT: (Foo) [2] = 3
+ // CHECK-NEXT: }
Foo array[3] = {1,2,3};
- return 0; //% self.expect("frame variable array --show-types --", substrs = ['(Foo [3]) array = {','(Foo) [0] = 1','(Foo) [1] = 2','(Foo) [2] = 3'])
+ return 0; //% self.filecheck("frame variable array --show-types --", 'main.cpp')
}
OpenPOWER on IntegriCloud