自定义的C++断言宏
时间:2010-12-24 来源:DOF_KL
#define MyAssert(Expression,Message,TestID) if(!(Expression)) { cout<<"Assert Fail In Test #"<<(TestID)<<endl<<"Fail Message: "<<(Message)<<endl; throw; }
调用例子
MyAssert(Function()==OK, "Not Ok", 2);
相关阅读 更多 +