[Lldb-commits] [PATCH] D52152: Add NativeProcessProtocol unit tests

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Sep 16 12:02:34 PDT 2018

labath created this revision.
labath added reviewers: zturner, teemperor.
Herald added a subscriber: mgorny.

NativeProcessProtocol is an abstract class, but it still contains a
significant amount of code. Some of that code is tested via tests of
specific derived classes, but these tests don't run everywhere, as they
are OS and arch-specific. They are also relatively high-level, which
means some functionalities (particularly the failure cases) are
hard/impossible to test.

In this approach, I replace the abstract methods with mocks, which
allows me to inject failures into the lowest levels of breakpoint
setting code and test the class behavior in this situation.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52152.165688.patch
Type: text/x-patch
Size: 6825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180916/2171615f/attachment.bin>

More information about the lldb-commits mailing list