[Lldb-commits] [PATCH] D88792: [lldb/test] Catch invalid calls to expect()
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat Oct 3 23:03:28 PDT 2020
kastiglione created this revision.
kastiglione added reviewers: aprantl, JDevlieghere, teemperor.
Herald added subscribers: lldb-commits, kbarton, nemanjai.
Herald added a project: LLDB.
kastiglione requested review of this revision.
Add preconditions to `TestBase.expect()` that catch semantically invalid calls
that happen to succeed anyway. This also fixes the broken callsites caught by
these checks.
This prevents the following incorrect calls:
1. `self.expect("lldb command", "some substr")`
2. `self.expect("lldb command", "assert message", "some substr")`
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88792
Files:
lldb/packages/Python/lldbsuite/test/lldbtest.py
lldb/test/API/commands/frame/diagnose/bad-reference/TestBadReference.py
lldb/test/API/commands/frame/diagnose/complicated-expression/TestComplicatedExpression.py
lldb/test/API/commands/frame/diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py
lldb/test/API/commands/frame/diagnose/dereference-this/TestDiagnoseDereferenceThis.py
lldb/test/API/commands/frame/diagnose/inheritance/TestDiagnoseInheritance.py
lldb/test/API/commands/frame/diagnose/local-variable/TestLocalVariable.py
lldb/test/API/commands/frame/diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py
lldb/test/API/commands/settings/TestSettings.py
lldb/test/API/driver/batch_mode/TestBatchMode.py
lldb/test/API/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
lldb/test/API/functionalities/data-formatter/data-formatter-objc/cmtime/TestDataFormatterCMTime.py
lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
lldb/test/API/types/TestRecursiveTypes.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88792.296022.patch
Type: text/x-patch
Size: 11869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201004/0ecfbe3a/attachment.bin>
More information about the lldb-commits
mailing list