File indexing completed on 2024-05-19 04:34:06

0001 /***************************************************************************
0002  *                                                                         *
0003  *   copyright : (C) 2010 The University of Toronto                        *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  *                                                                         *
0010  ***************************************************************************/
0011 
0012 #ifndef KST_TEST_H
0013 #define KST_TEST_H
0014 
0015 #include <QtTest>
0016 #include <QByteArray>
0017 
0018 #include "math_kst.h"
0019 
0020 namespace QTest
0021 {
0022 
0023   template<>
0024   inline bool qCompare(double const& val, double const * const& nan,  const char *actual, const char *expected,
0025                       const char *file, int line)
0026   {
0027           return qCompare(
0028                   QByteArray((char*) &val, sizeof(double)),
0029                   QByteArray((char*) nan, sizeof(double)),
0030                   actual, expected, file, line);
0031   }
0032 
0033 }
0034 
0035 #endif
0036 
0037 // vim: ts=2 sw=2 et