Jordan Rupprecht
1eeeab82c6
[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 9c2468821e. I patched `teyit`
with a `visit_assertEqual` node handler to generate this.
2024-02-21 20:39:02 -06:00
..
2024-02-16 20:58:50 -08:00
2024-02-16 20:58:50 -08:00
2023-11-15 13:32:42 -08:00
2023-09-01 14:47:45 -07:00
2024-02-21 13:02:30 -06:00
2024-02-21 13:02:30 -06:00
2024-02-21 13:02:30 -06:00
2024-02-21 13:02:30 -06:00
2024-02-21 13:02:30 -06:00
2024-02-21 13:02:30 -06:00
2024-02-15 22:54:00 -08:00
2024-02-21 20:39:02 -06:00
2023-08-04 14:34:01 -07:00
2024-02-21 13:02:30 -06:00
2024-02-16 20:58:50 -08:00
2024-02-16 20:58:50 -08:00
2024-02-21 13:02:30 -06:00
2023-12-20 11:05:52 +00:00
2024-02-21 13:02:30 -06:00
2024-02-16 20:58:50 -08:00
2024-02-21 13:02:30 -06:00
2023-07-14 10:36:57 -07:00
2023-07-21 18:47:46 -07:00
2024-02-16 20:58:50 -08:00
2023-12-19 09:58:25 +01:00
2024-02-21 13:02:30 -06:00
2023-08-11 14:20:38 -07:00
2024-02-21 13:42:10 -08:00
2024-02-21 13:02:30 -06:00
2024-02-21 13:02:30 -06:00