summaryrefslogtreecommitdiff
path: root/lldb/docs
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2022-06-09 09:10:14 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2022-06-09 09:14:56 -0700
commit6565580f1b40edf8d9339fa849f4a1778d8816a9 (patch)
treef1d60f9b4e146e61ca1c5b65d3ae525957ba0b03 /lldb/docs
parent5a1062055e44f4b9623800aeaed06dc1e405a9d9 (diff)
downloadllvm-6565580f1b40edf8d9339fa849f4a1778d8816a9.tar.gz
[lldb] Add table with custom LLDB asserts to the docs
Add table with custom LLDB asserts to the documentation. Differential revision: https://reviews.llvm.org/D127410
Diffstat (limited to 'lldb/docs')
-rw-r--r--lldb/docs/resources/test.rst17
1 files changed, 14 insertions, 3 deletions
diff --git a/lldb/docs/resources/test.rst b/lldb/docs/resources/test.rst
index 258a8083baca..001803dc5d28 100644
--- a/lldb/docs/resources/test.rst
+++ b/lldb/docs/resources/test.rst
@@ -320,9 +320,20 @@ A better way to write the test above would be using LLDB's testing function
several expressive asserts such as `self.assertIn` that automatically
generate an explanation how the received values differ from the expected
ones. Check the documentation of Python's `unittest` module to see what
- asserts are available. If you can't find a specific assert that fits your
- needs and you fall back to a generic assert, make sure you put useful
- information into the assert's `msg` argument that helps explain the failure.
+ asserts are available. LLDB also has a few custom asserts that are tailored
+ to our own data types.
+
++-----------------------------------------------+---------------------------------------------------------------+
+| **Assert** | **Description** |
++-----------------------------------------------+---------------------------------------------------------------+
+| ``assertSuccess`` | Assert that an ``lldb.SBError`` is in the "success" state. |
++-----------------------------------------------+---------------------------------------------------------------+
+| ``assertState`` | Assert that two states (``lldb.eState*``) are equal. |
++-----------------------------------------------+---------------------------------------------------------------+
+
+ If you can't find a specific assert that fits your needs and you fall back
+ to a generic assert, make sure you put useful information into the assert's
+ `msg` argument that helps explain the failure.
::