Aneesh Narayanan
Aneesh Narayanan

Reputation: 3434

Error while using cppunit

I am using cppunit for testing my project code. In my code in some places I have put some print statements for the debugging purpose like,

void TestSample()
{  
   //getting value from registry
   if( false == getvalue())
     printf("Error : Getting value form registry failed.");
   //.....
}

when I run this code I am getting anerror and the project is failing with an EXEC error.

 EXEC : Error : Getting value form registry failed.

Actually this is not an issue with the code. Its only with that print statement. When I replaced this printf its working fine. The only problem is the " Error : " keyword in the print statement.

How can I solve this issue? The print statement can't be removed. I think there will be an option in VS2010 for avoiding such an error. Help pls.

Upvotes: 2

Views: 199

Answers (1)

Related Questions