[Lldb-commits] [PATCH] D127410: [lldb] Add table with custom LLDB asserts

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 9 09:15:08 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6565580f1b40: [lldb] Add table with custom LLDB asserts to the docs (authored by JDevlieghere).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127410/new/

https://reviews.llvm.org/D127410

Files:
  lldb/docs/resources/test.rst


Index: lldb/docs/resources/test.rst
===================================================================
--- lldb/docs/resources/test.rst
+++ lldb/docs/resources/test.rst
@@ -320,9 +320,20 @@
     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.
 
 ::
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127410.435588.patch
Type: text/x-patch
Size: 1796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220609/d2e2170e/attachment.bin>


More information about the lldb-commits mailing list