[Lldb-commits] [PATCH] D69453: Modernize TestThreadStepOut.py
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 28 12:41:09 PDT 2019
aprantl added a comment.
Thanks! Nitpicking inside.
================
Comment at: lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py:136
+ (self.inferior_target, self.inferior_process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+ self, self.bkpt_string, self.main_file, only_one_thread = False)
----------------
If `self.bkpt_string` and `self.main_file` are only used here, I would find this easier to read:
`ldbutil.run_to_source_breakpoint(self, 'break here', lldb.SBFileSpec('main.cpp'), only_one_thread = False)`
================
Comment at: lldb/packages/Python/lldbsuite/test/lldbutil.py:783
+ if only_one_thread:
+ test.assertTrue(len(threads) == 1, "Expected 1 thread to stop at breakpoint, %d did."%(len(threads)))
+ else:
----------------
assertEquals! :-)
================
Comment at: lldb/packages/Python/lldbsuite/test/lldbutil.py:785
+ else:
+ test.assertTrue(len(threads) > 0, "No threads stopped at breakpoint")
+
----------------
`assertGreater` (see `.../unittest2/case.py`)
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69453/new/
https://reviews.llvm.org/D69453
More information about the lldb-commits
mailing list