[Interest] Strange undeletable QTemporaryFile. Is it a bug?

Thiago Macieira 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*
> *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
> think).
> 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...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130824/632cfaff/attachment.sig>

More information about the Interest mailing list