玩转Google开源C++单元测试框架Google Test系列(gtest)之二 - 断言
2013-11-03 15:09
561 查看
传送门:/article/4688623.html
一、前言
这篇文章主要总结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)之三 - 事件机制
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之五 - 死亡测试
- 玩转Google开源C++单元测试框架Google Test系列(gtest)(总)
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之六 - 运行参数