[lldb] Fix Python test formatting (NFC)
All Python files in the LLVM repository were reformatted with Black [1].
Files inside the LLDB subproject were reformatted in 2238dcc393. This
patch updates a handful of tests that were added or modified since then
and weren't formatted with Black.
[1] https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style/68257
This commit is contained in:
@@ -151,13 +151,17 @@ class ValueAPITestCase(TestBase):
|
||||
# smaller type to a larger as we often wouldn't know how to get the extra data:
|
||||
val_f = target.EvaluateExpression("f")
|
||||
bad_cast = val_s.Cast(val_f.GetType())
|
||||
self.assertFailure(bad_cast.GetError(),
|
||||
"Can only cast to a type that is equal to or smaller than the orignal type.")
|
||||
self.assertFailure(
|
||||
bad_cast.GetError(),
|
||||
"Can only cast to a type that is equal to or smaller than the orignal type.",
|
||||
)
|
||||
weird_cast = val_f.Cast(val_s.GetType())
|
||||
self.assertSuccess(weird_cast.GetError(),
|
||||
"Can cast from a larger to a smaller")
|
||||
self.assertEqual(weird_cast.GetChildMemberWithName("a").GetValueAsSigned(0), 33,
|
||||
"Got the right value")
|
||||
self.assertSuccess(weird_cast.GetError(), "Can cast from a larger to a smaller")
|
||||
self.assertEqual(
|
||||
weird_cast.GetChildMemberWithName("a").GetValueAsSigned(0),
|
||||
33,
|
||||
"Got the right value",
|
||||
)
|
||||
|
||||
# Check that lldb.value implements truth testing.
|
||||
self.assertFalse(lldb.value(frame0.FindVariable("bogus")))
|
||||
|
||||
Reference in New Issue
Block a user