“死亡测试”用于测试程序是否会按照预期的方式崩溃。
1.执行顺序
编写死亡测试时,在测试中第一个参数以“DeathTest”为结尾,运行测试时会优先于其他测试用例
using namespace std;
void Foo(){
int *p=0;
*p = 42;
}
int Add(int a,int b)
“死亡测试”用于测试程序是否会按照预期的方式崩溃。
1.执行顺序
编写死亡测试时,在测试中第一个参数以“DeathTest”为结尾,运行测试时会优先于其他测试用例
using namespace std;
void Foo(){
int *p=0;
*p = 42;
}
int Add(int a,int b)