[Lldb-commits] [lldb] cad79f7 - [lldb][NFC] Use expect_expr in TestStructTypes.py

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 24 13:12:37 PDT 2020


Author: Raphael Isemann
Date: 2020-06-24T22:12:17+02:00
New Revision: cad79f73b6b67c9306ad147381e8a8be5db6d5cf

URL: https://github.com/llvm/llvm-project/commit/cad79f73b6b67c9306ad147381e8a8be5db6d5cf
DIFF: https://github.com/llvm/llvm-project/commit/cad79f73b6b67c9306ad147381e8a8be5db6d5cf.diff

LOG: [lldb][NFC] Use expect_expr in TestStructTypes.py

Added: 
    

Modified: 
    lldb/test/API/lang/c/struct_types/main.c

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/lang/c/struct_types/main.c b/lldb/test/API/lang/c/struct_types/main.c
index 0b87bb193032..08ef0a703f22 100644
--- a/lldb/test/API/lang/c/struct_types/main.c
+++ b/lldb/test/API/lang/c/struct_types/main.c
@@ -17,7 +17,7 @@ int main (int argc, char const *argv[])
         char padding[0];
     }; //% self.expect("frame variable pt.padding[0]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["pt.padding[0] = "])
        //% self.expect("frame variable pt.padding[1]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["pt.padding[1] = "])
-       //% self.expect("expression -- (pt.padding[0])", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["(char)", " = "])
+       //% self.expect_expr("pt.padding[0]", result_type="char")
        //% self.expect("image lookup -t point_tag", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['padding[]'])
 
     struct {} empty;
@@ -32,7 +32,7 @@ int main (int argc, char const *argv[])
     struct rect_tag rect = {{1, 2, {}}, {3, 4, {}}};
     struct things_to_sum tts = { 2, 3, 4 };
 
-    int sum = sum_things(tts); //% self.expect("expression -- &pt == (struct point_tag*)0", substrs = ['false'])
-                               //% self.expect("expression -- sum_things(tts)", substrs = ['9'])
+    int sum = sum_things(tts); //% self.expect_expr("&pt == (struct point_tag*)0", result_value="false")
+                               //% self.expect_expr("sum_things(tts)", result_value="9")
     return 0;
 }


        


More information about the lldb-commits mailing list