In tests it is more easirer for you to use http://code.google.com/p/googletest/wiki/V1_6_AdvancedGuide#Asserting_on_Subroutines