[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...
Size: 6825 bytes
Desc: not available
More information about the lldb-commits