On Sun, Feb 16, 2014 at 3:25 AM, Michael Stemle <[email protected]> wrote:
> 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?

To be honest, you might get more useful answers from the kde-devel or
a qt mailing list.

Since you don't want a mock library, you can either mock the object
yourself manually (i.e. write a dummy version) or you do the
following:

- move TransactionPrivate to Transaction_p.h (i.e. own header)
- in your test include that header and you should be able to cast
Transaction::dptr approriately so you now have acces so the private
class of Transaction

depending on the specifics this may be a bit of cheating, but it
should be the easiest way to set stuff for which there are no setters.

HS

-- 
kubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel

Reply via email to