Boost logo

Boost Users :

Subject: Re: [Boost-users] whitebox testing with boost unit test framework?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-12-22 16:05:54


On 12/22/2011 12:25 AM, Chris Cleeland wrote:
> I'm using the boost unit test framework to implement unit tests for
> code. I'm wondering if there is a best-practice for doing white-box
> testing/internal state inspection of types under test. My hack right
> now is to strip out "protected" and "private" from the header, but I
> hold my nose as I do that.
>
> Thoughts/suggestions?
>

There are tricks to access private/protected members of a class without
being a friend or anything like that.

<http://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.html>

Maybe that would be useful to you (haven't found a use for that yet)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net