So, I'm still getting used to the dpointer paradigm. Is anybody familiar with how to use QTest to simulate code paths dependent on values in the dpointer which have no exposed mutators?
For instance, I have QApt::Transaction which has its dpointer, and its dpointer has a property "error". This property is exposed via a Q_PROPERTY macro in the public class, but it's read-only. I'm adding error handling and I'd like to add some unit tests for the error handling, but I'm having trouble figuring out how to force an instance of QApt::Transaction into executing that error handling without violating encapsulation or adding a klugy method just for my test. I see that Google Mock has something that looks like it could be useful ( https://code.google.com/p/googlemock/wiki/CookBook#Mocking_Private_or_Protected_Methods), but that sounds like a new dependency that I don't think we want to add to the library. Much thanks.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<