[Interest] Strange undeletable QTemporaryFile. Is it a bug?
thiago.macieira at intel.com
Sat Aug 24 20:16:36 CEST 2013
On sábado, 24 de agosto de 2013 19:16:19, Till Oliver Knoll wrote:
> Ha! I /knew/ it! MS is totally not adhering to "the standard" *rant*
> Okay, you got me there, I never actually tried it myself, even though
> unit-testing private methods was also the first thing which came to my mind
> as being very useful when I learnt this Evil Trick here on qt-interest (I
> The context was a similar one: trying pointer arithmetic, iterating over
> virtual function tables, casting... until someone just came up with this
> #define thing. At that time the simplicity and elegance just blew my mind -
> C++ rocks! It just gave me a rocket launcher to shot into my foot! ;)
The easiest way is to make your tester class a friend of the class, so it can
call the privates.
But I'd argue this: why the hell do you need to test the privates? If no one
can call them, you should be able to change them freely. You should test only
the interface available to others.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the Interest