什么是Check
Check是C语言的一个单元测试框架。它提供一个小巧的单元测试接口。测试案例运行在各自独立的地址空间,所以断言失败和代码错误造成的段错误或者其他的信号可以被捕捉到。另外,测试的结果显示也兼容以下这些格式:Subunit、TAP、XML和通用的日志格式。
Check is a unit testing framework for C. It features a simple interface for defining unit tests, putting little in the way of the developer. Tests are run in a separate address space继续阅读 »
Named namespaces in Google Code Style
Namespaces wrap the entire source file after includes, gflags definitions/declarations and forward declarations of classes from other namespaces.继续阅读 »
Here is a simple example, what is the output of this program?
```
include
using namespace std;
int main()
{
float f = 0.0;
int i = 5;
f = (float)i;
cout<继续阅读 »
QNAN wiki上是这样说的:
A QNaN is a NaN with the most significant fraction bit set. QNaN’s propagate freely through most arithmetic operations. These values pop out of an operation when the result is not mathematically defined. (details)[http://en.wikipedia.org/wiki/NaN]
我尝试过sqrt(-1), 1/0, NAN/NAN都不行
结果:继续阅读 »