听说TUT是一个很轻量级的C++单元测试框架.我喜欢简单,轻量等字眼,所以就去下了个试试(
http://tut-framework.sourceforge.net/) .
用它自带的例子测试,发现改了ensure的第二个参数为false时,弹出Debug Error对话框:
(---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Error!
Program: e:/pgpwork/test/test/Debug/test.exe
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
(Press Retry to debug the application)
---------------------------
终止(A) 重试(R) 忽略(I)
---------------------------
)
不是我预期的输出是哪个测试用例出错了,出错在哪行的信息...
调了下代码,发现是没用开启RTTI,在编译时加上/GR就OK了
用它自带的例子测试,发现改了ensure的第二个参数为false时,弹出Debug Error对话框:
(---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Error!
Program: e:/pgpwork/test/test/Debug/test.exe
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
(Press Retry to debug the application)
---------------------------
终止(A) 重试(R) 忽略(I)
---------------------------
)
不是我预期的输出是哪个测试用例出错了,出错在哪行的信息...
调了下代码,发现是没用开启RTTI,在编译时加上/GR就OK了