玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
2013-06-06 23:48
736 查看
一、前言
这篇文章主要总结gtest中的所有断言相关的宏。 gtest中,断言的宏可以理解为分为两类,一类是ASSERT系列,一类是EXPECT系列。一个直观的解释就是:
1. ASSERT_* 系列的断言,当检查点失败时,退出当前函数(注意:并非退出当前案例)。
2. EXPECT_* 系列的断言,当检查点失败时,继续往下执行。
二、示例
相关文章推荐
- 【转】玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- (转)玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 【转】玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之一 - 初识gtest
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之六 - 运行参数
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之八 - 打造自己的单元测试框架
- 玩转 Google开源C++单元测试框架Google Test系列(gtest)之七 - 深入解析gtest(转载)