this should be a private member that you can set from the test fixture constructor (assuming it's a friend). is it really necessary though? this leaking of test logic into production code is worrying.