浏览代码

test: add a fallback for isnan() when not defined by the system includes.

legacy
Sam Hocevar sam 13 年前
父节点
当前提交
0bbd1e43c2
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. +8
    -0
      test/half.cpp

+ 8
- 0
test/half.cpp 查看文件

@@ -17,8 +17,16 @@
#include <cppunit/TestCase.h>
#include <cppunit/TestSuite.h>

#include <cmath>

#include "core.h"

/* This will not work with aggressive optimisation, but a reasonable
* assumption is that such environments do have a proper isnan(). */
#if !defined isnan
# define isnan(x) (!((x) == (x)))
#endif

namespace lol
{



正在加载...
取消
保存