Salome HOME
f39dc12060fb9a99c3f772df2c43cbdadab16531
[modules/hexablock.git] / src / TEST_CPP / HexVertexTest.cxx
1 // Copyright (C) 2009-2023  CEA, EDF
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 #include <cppunit/extensions/HelperMacros.h>
21 #include "hexa_base.hxx"
22 #include "HexVertex.hxx"
23 #include "HexVertexTest.hxx"
24
25 CPPUNIT_TEST_SUITE_REGISTRATION( VertexTest );
26
27
28 VertexTest::VertexTest(void)
29 {
30   _myHexEngine = new HEXA_NS::Hex();
31   _myDoc= _myHexEngine->addDocument();
32 }
33
34 VertexTest::~VertexTest(void)
35 {
36   delete _myDoc;
37   delete _myHexEngine; //CS_TODO : Bug
38 }
39
40
41 void VertexTest::TestGetX(void)
42 {
43   double xValue = 1.;
44 //   std::cout<<"Hellllllooooooo TestGetX";
45
46 //   HEXA_NS::Vertex myVertex( xValue, 8. ,4. );
47   HEXA_NS::Vertex *myVertex = _myDoc->addVertex( xValue, 8. ,4. );
48
49   CPPUNIT_ASSERT(  myVertex->getX() == xValue );
50 //      CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
51 }
52
53 void VertexTest::TestGetY(void)
54 {
55   double yValue = 8.;
56 //   HEXA_NS::Vertex myVertex( 1. ,yValue ,4. );
57   HEXA_NS::Vertex *myVertex = _myDoc->addVertex( 1. ,yValue ,4. );
58
59   CPPUNIT_ASSERT(  myVertex->getY() == yValue );
60 //      CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
61 }
62
63
64 void VertexTest::TestGetZ(void)
65 {
66   double zValue = 1.;
67
68 //   HEXA_NS::Vertex myVertex( 1. ,8. ,zValue );
69   HEXA_NS::Vertex *myVertex = _myDoc->addVertex( 1. ,8. ,zValue );
70
71   CPPUNIT_ASSERT(  myVertex->getZ() == zValue );
72 //      CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
73 }