1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef __TU_INTERPOLATION_PLANAR_TEST_SUITE_HXX__
20 #define __TU_INTERPOLATION_PLANAR_TEST_SUITE_HXX__
22 #include <cppunit/extensions/HelperMacros.h>
33 * \brief Base class for planar mesh intersection test suites.
36 class InterpolationPlanarTestSuite : public CppUnit::TestFixture
44 * Sets up the test suite.
54 // bool checkDequesEqual(std::deque< double > deque1, std::deque< double > deque2, double epsilon);
55 // bool checkVectorsEqual(std::vector< double > Vect1, std::vector< double > Vect2, double epsilon);
56 // void dequePrintOut(std::deque< double > deque1);
57 // void vectPrintOut(std::vector< double > vect);
58 // void tabPrintOut( const double * tab, int size);
60 bool checkDequesEqual(std::deque< double > deque1,
61 std::deque< double > deque2, double epsilon)
63 int size1 = deque1.size();
64 int size2 = deque2.size();
65 bool are_equal = size1 == size2;
68 for(int i = 0; i < size1 && are_equal; i++)
69 are_equal = fabs(deque1[i] - deque2[i]) < epsilon;
73 bool checkVectorsEqual(std::vector< double > vect1,
74 std::vector< double > vect2, double epsilon)
76 int size1 = vect1.size();
77 int size2 = vect2.size();
78 bool are_equal = size1 == size2;
81 for(int i = 0; i < size1 && are_equal; i++)
82 are_equal = fabs(vect1[i] - vect2[i]) < epsilon;
86 void dequePrintOut(std::deque< double > deque1)
88 for(int i = 0; i< (int)deque1.size(); i++)
90 std::cerr << deque1[i] << " ";
94 void vectPrintOut(std::vector< double > vect)
96 for(int i = 0; i< (int)vect.size(); i++)
98 std::cerr << vect[i] << " ";
102 void tabPrintOut( const double * tab,int size)
104 for(int i = 0; i< size; i++)
106 std::cerr << tab[i] << " ";
112 * Cleans up after the test suite.
113 * Liberates the MeshTestToolkit object used by the tests.
117 // delete _testTools;
123 // /// MeshTestToolkit object to which the tests are delegated
124 // MeshTestToolkit* _testTools;