summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallBuiltinFunction.py
Commit message (Collapse)AuthorAgeFilesLines
* [lldb] Add expect_expr function for testing expression evaluation in dotests.Raphael Isemann2020-01-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a new function to lldbtest: `expect_expr`. This function is supposed to replace the current approach of calling `expect`/`runCmd` with `expr`, `p` etc. `expect_expr` allows evaluating expressions and matching their value/summary/type/error message without having to do any string matching that might allow unintended passes (e.g., `self.expect("expr 3+4", substrs=["7"])` can unexpectedly pass for results like `(Class7) $0 = 7`, `(int) $7 = 22`, `(int) $0 = 77` and so on). This only uses the function in a few places to test and demonstrate it. I'll migrate the tests in follow up commits. Reviewers: JDevlieghere, shafik, labath Reviewed By: labath Subscribers: christof, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70314
* [lldb][NFC] Remove 'from __future__ import print_function' from all tests ↵Raphael Isemann2019-12-131-1/+0
| | | | | | | | | | | | | | | | | | | | | that don't actually call 'print()' Summary: A lot of tests do this trick but the vast majority of them don't even call `print()`. Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no `print (` or `print(` anywhere else in the file. I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like `expr print(...)` and similar false-positives). I also corrected the additional empty lines after the import in the files that I manually edited. Reviewers: JDevlieghere, labath, jfb Reviewed By: labath Subscribers: dexonsmith, wuzish, nemanjai, kbarton, christof, arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71452
* [lldb][NFC] Refactor TestCallBuiltinFunctionRaphael Isemann2019-09-251-11/+4
| | | | | | Using asserts doesn't print a useful error message in case this test fails. llvm-svn: 372815
* [lldb] Restructure test folders to match LLDB command hierarchyRaphael Isemann2019-09-011-0/+53
Summary: As discussed on lldb-dev, this patch moves some LLDB tests into a hierarchy that more closely resembles the commands we use in the LLDB interpreter. This patch should only move tests that use the command interpreter and shouldn't touch any tests that primarily test the SB API. Reviewers: #lldb, jfb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: dexonsmith, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67033 llvm-svn: 370605
OpenPOWER on IntegriCloud