F:/KPlato/koffice/libs/pigment/tests/kis_color_conversions_tester.h

Aller à la documentation de ce fichier.
00001 /*
00002  *  Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 #ifndef KIS_COLOR_CONVERSIONS_TESTER_H
00020 #define KIS_COLOR_CONVERSIONS_TESTER_H
00021 
00022 #include <kunittest/tester.h>
00023 
00024 #define CHECK_TOLERANCE( x, y, tolerance ) \
00025 if ((x) <= (y) + (tolerance) && (x) >= (y) - (tolerance)) \
00026 { \
00027     success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #x); \
00028 } \
00029 else \
00030 { \
00031     failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed ") + #x + "\n Expected " + #y + ", Actual result " + QString::number(x)); \
00032 } \
00033 
00034 
00035 class KoColorConversionsTester : public KUnitTest::Tester
00036 {
00037 public:
00038         void allTests();
00039     void testRGBHSV();
00040     void testRGBHSL();
00041 };
00042 
00043 #endif
00044 

Généré le Wed Nov 22 23:41:13 2006 pour KPlato par  doxygen 1.5.1-p1