Back to index

salome-med  6.5.0
TransformedTriangleTest.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __TU_TRANSFORMED_TRIANGLE_HXX__
00021 #define __TU_TRANSFORMED_TRIANGLE_HXX__
00022 
00023 #include <cppunit/extensions/HelperMacros.h>
00024 
00025 #include "InterpKernelTestExport.hxx"
00026 #include "TransformedTriangle.hxx"
00027 
00028 #define ERR_TOL 1.0e-8
00029 
00030 using INTERP_KERNEL::TransformedTriangle;
00031 
00032 namespace INTERP_TEST
00033 {
00034 
00039   class INTERPKERNELTEST_EXPORT TransformedTriangleTest : public CppUnit::TestFixture
00040   {
00041 
00042     CPPUNIT_TEST_SUITE( TransformedTriangleTest );
00043     CPPUNIT_TEST( test_constructor );
00044     CPPUNIT_TEST( test_calcUnstableC );
00045     CPPUNIT_TEST( test_calcUnstableT );
00046     //removed because the test fails to enter the desired code branch
00047  //   CPPUNIT_TEST( test_calcStableC_Consistency );
00048     CPPUNIT_TEST_SUITE_END();
00049 
00050     typedef INTERP_KERNEL::TransformedTriangle::TriSegment TriSegment;
00051     typedef INTERP_KERNEL::TransformedTriangle::DoubleProduct DoubleProduct;
00052 
00053   public:
00054     void setUp();
00055 
00056     void tearDown();
00057 
00058     // tests
00059     void test_constructor();
00060 
00061     void test_calcUnstableC(); 
00062 
00063     void test_calcUnstableT();
00064 
00065     void test_calcStableC_Consistency();
00066 
00067     double p1[3], q1[3], r1[3];
00068     double hp1, hq1, hr1;
00069     double Hp1, Hq1, Hr1;
00070 
00071     double p2[3], q2[3], r2[3];
00072     double hp2, hq2, hr2;
00073     double Hp2, Hq2, Hr2;
00074 
00075     double stable_c2[24];
00076   
00077   private:
00078     TransformedTriangle* tri1;
00079     TransformedTriangle* tri2;
00080 
00081   };
00082 
00083 
00084 
00085 
00086 }
00087 
00088 
00089 
00090 #endif