Bladeren bron

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

legacy
Sam Hocevar sam 13 jaren geleden
bovenliggende
commit
0bbd1e43c2
1 gewijzigde bestanden met toevoegingen van 8 en 0 verwijderingen
  1. +8
    -0
      test/half.cpp

+ 8
- 0
test/half.cpp Bestand weergeven

@@ -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
{



Laden…
Annuleren
Opslaan