Salome HOME
Merge from V6_main 01/04/2013
[modules/med.git] / src / INTERP_KERNELTest / TransformedTriangleTest.hxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __TU_TRANSFORMED_TRIANGLE_HXX__
21 #define __TU_TRANSFORMED_TRIANGLE_HXX__
22
23 #include <cppunit/extensions/HelperMacros.h>
24
25 #include "InterpKernelTestExport.hxx"
26 #include "TransformedTriangle.hxx"
27
28 #define ERR_TOL 1.0e-8
29
30 using INTERP_KERNEL::TransformedTriangle;
31
32 namespace INTERP_TEST
33 {
34
35   /**
36    * \brief Test suite testing some of the low level methods of TransformedTriangle.
37    *
38    */
39   class INTERPKERNELTEST_EXPORT TransformedTriangleTest : public CppUnit::TestFixture
40   {
41
42     CPPUNIT_TEST_SUITE( TransformedTriangleTest );
43     CPPUNIT_TEST( test_constructor );
44     CPPUNIT_TEST( test_calcUnstableC );
45     CPPUNIT_TEST( test_calcUnstableT );
46     //removed because the test fails to enter the desired code branch
47  //   CPPUNIT_TEST( test_calcStableC_Consistency );
48     CPPUNIT_TEST_SUITE_END();
49
50     typedef INTERP_KERNEL::TransformedTriangle::TriSegment TriSegment;
51     typedef INTERP_KERNEL::TransformedTriangle::DoubleProduct DoubleProduct;
52
53   public:
54     void setUp();
55
56     void tearDown();
57
58     // tests
59     void test_constructor();
60
61     void test_calcUnstableC(); 
62
63     void test_calcUnstableT();
64
65     void test_calcStableC_Consistency();
66
67     double p1[3], q1[3], r1[3];
68     double hp1, hq1, hr1;
69     double Hp1, Hq1, Hr1;
70
71     double p2[3], q2[3], r2[3];
72     double hp2, hq2, hr2;
73     double Hp2, Hq2, Hr2;
74
75     double stable_c2[24];
76   
77   private:
78     TransformedTriangle* tri1;
79     TransformedTriangle* tri2;
80
81   };
82
83
84
85
86 }
87
88
89
90 #endif