aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectBreakpoint.cpp
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2024-02-21 20:39:02 -0600
committerGitHub <noreply@github.com>2024-02-21 20:39:02 -0600
commit1eeeab82c6eb185f5139e633a59c2dbcb15616e4 (patch)
tree5d96fb3074f6deb818dd84b7ec7258d68d320c1f /lldb/source/Commands/CommandObjectBreakpoint.cpp
parent0d12628d06b8ab37157faea474548735ddb7eeb2 (diff)
downloadllvm-1eeeab82c6eb185f5139e633a59c2dbcb15616e4.zip
llvm-1eeeab82c6eb185f5139e633a59c2dbcb15616e4.tar.gz
llvm-1eeeab82c6eb185f5139e633a59c2dbcb15616e4.tar.bz2
[lldb][test] Modernize assertEqual(value, bool) (#82526)
Any time we see the pattern `assertEqual(value, bool)`, we can replace that with `assert<bool>(value)`. Likewise for `assertNotEqual`. Technically this relaxes the test a bit, as we may want to make sure `value` is either `True` or `False`, and not something that implicitly converts to a bool. For example, `assertEqual("foo", True)` will fail, but `assertTrue("foo")` will not. In most cases, this distinction is not important. There are two such places that this patch does **not** transform, since it seems intentional that we want the result to be a bool: * https://github.com/llvm/llvm-project/blob/5daf2001a1e4d71ce1273a1e7e31cf6e6ac37c10/lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py#L90 * https://github.com/llvm/llvm-project/blob/5daf2001a1e4d71ce1273a1e7e31cf6e6ac37c10/lldb/test/API/commands/settings/TestSettings.py#L940 Followup to 9c2468821ec51defd09c246fea4a47886fff8c01. I patched `teyit` with a `visit_assertEqual` node handler to generate this.
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
0 files changed, 0 insertions, 0 deletions