Salome HOME
267e65d4e8a8972f2713e8df41cc4a214ab146f6
[tools/medcoupling.git] / src / INTERP_KERNELTest / TransformedTriangleTest.hxx
1 // Copyright (C) 2007-2016  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, or (at your option) any later version.
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 namespace INTERP_TEST
31 {
32
33   /**
34    * \brief Test suite testing some of the low level methods of TransformedTriangle.
35    *
36    */
37   class INTERPKERNELTEST_EXPORT TransformedTriangleTest : public CppUnit::TestFixture
38   {
39
40     CPPUNIT_TEST_SUITE( TransformedTriangleTest );
41     CPPUNIT_TEST( test_constructor );
42     CPPUNIT_TEST( test_calcUnstableC );
43     CPPUNIT_TEST( test_calcUnstableT );
44     //removed because the test fails to enter the desired code branch
45  //   CPPUNIT_TEST( test_calcStableC_Consistency );
46     CPPUNIT_TEST_SUITE_END();
47
48     typedef INTERP_KERNEL::TransformedTriangle::TriSegment TriSegment;
49     typedef INTERP_KERNEL::TransformedTriangle::DoubleProduct DoubleProduct;
50
51   public:
52     void setUp();
53
54     void tearDown();
55
56     // tests
57     void test_constructor();
58
59     void test_calcUnstableC(); 
60
61     void test_calcUnstableT();
62
63     void test_calcStableC_Consistency();
64
65     double p1[3], q1[3], r1[3];
66     double hp1, hq1, hr1;
67     double Hp1, Hq1, Hr1;
68
69     double p2[3], q2[3], r2[3];
70     double hp2, hq2, hr2;
71     double Hp2, Hq2, Hr2;
72
73     double stable_c2[24];
74   
75   private:
76     INTERP_KERNEL::TransformedTriangle* tri1;
77     INTERP_KERNEL::TransformedTriangle* tri2;
78
79   };
80
81
82
83
84 }
85
86
87
88 #endif