labath wrote: gmock doesn't let you do anything that wouldn't be possible without it. For this to work, the code which interacts with the mock needs to be ready to accept something other than the real object.... somehow. That usually means making the mocked object polymorphic, but that is a nonstarter here due to the interface stability. Other options I see are: - write a wrapper around SBProcess and then mock that - make everything a template so that it can be instantiated with a different (mock) implementation - use the fact that liblldb is a (shared) library to write an "alternative implementation" of that library
Each of those options comes with a fairly high cost (both upfront and in ongoing maintenance)... https://github.com/llvm/llvm-project/pull/140566 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits