
[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
The compiler stops the compilation with an error if you try to change a const variable/type. Still you want to write a unit test that checks that the variable cannot be changed. [...]
IMO there is little value to be had by writing such a test, since as you state above you can't assign to a const quantity and still have the code compile. Test the behavior of your classes and leave the const'ness of members and variables up to the implementor of the class. -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/ Legalize Adulthood! http://legalizeadulthood.wordpress.com