1 // Copyright (C) 2006-2014 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, or (at your option) any later version.
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
20 #ifndef _ENGINETEST_HXX_
21 #define _ENGINETEST_HXX_
23 #include "ComposedNode.hxx"
24 #include "TypeCode.hxx"
26 #include <cppunit/extensions/HelperMacros.h>
32 class EngineTest: public CppUnit::TestFixture
34 CPPUNIT_TEST_SUITE( EngineTest );
35 CPPUNIT_TEST(checkGetRuntime );
36 CPPUNIT_TEST(checkAny1);
37 CPPUNIT_TEST(checkSharedPtr);
38 CPPUNIT_TEST(checkAny2);
39 CPPUNIT_TEST(checkAny3);
40 CPPUNIT_TEST(checkAny4);
41 CPPUNIT_TEST(checkAny5);
42 CPPUNIT_TEST(checkAny6);
43 CPPUNIT_TEST(checkAny7);
44 CPPUNIT_TEST(checkAny8);
45 CPPUNIT_TEST(checkInGateOutGate );
46 CPPUNIT_TEST(checkNodePortNumber );
47 CPPUNIT_TEST(checkPortTypeName );
48 CPPUNIT_TEST(checkDuplicatePortName );
49 CPPUNIT_TEST(checkRemovePort );
50 CPPUNIT_TEST(checkAddNodesToBloc );
51 CPPUNIT_TEST(checkAddingTwiceSameNodeInSameBloc );
52 CPPUNIT_TEST(checkAddingTwiceSameNodeInTwoBlocs );
53 CPPUNIT_TEST(checkRecursiveBlocs_NumberOfNodes );
54 CPPUNIT_TEST(checkRecursiveBlocs_NumberOfPorts );
55 CPPUNIT_TEST(checkPortNameInBloc );
56 CPPUNIT_TEST(checkGetNameOfPortNotInBloc );
57 CPPUNIT_TEST(checkRemoveNode );
58 CPPUNIT_TEST(RecursiveBlocs_multipleRecursion );
59 CPPUNIT_TEST(RecursiveBlocs_removeNodes );
60 CPPUNIT_TEST(cleanUp);
61 CPPUNIT_TEST(checkLogger);
62 CPPUNIT_TEST_SUITE_END();
70 void checkGetRuntime();
72 void checkSharedPtr();
80 void checkInGateOutGate();
81 void checkNodePortNumber();
82 void checkPortTypeName();
83 void checkDuplicatePortName();
84 void checkRemovePort();
85 void checkAddNodesToBloc();
86 void checkAddingTwiceSameNodeInSameBloc();
87 void checkAddingTwiceSameNodeInTwoBlocs();
88 void checkRecursiveBlocs_NumberOfNodes();
89 void checkRecursiveBlocs_NumberOfPorts();
90 void checkPortNameInBloc();
91 void checkGetNameOfPortNotInBloc();
92 void checkRemoveNode();
93 void RecursiveBlocs_multipleRecursion();
94 void RecursiveBlocs_removeNodes();
98 static std::map<std::string, YACS::ENGINE::Node*> _nodeMap;
99 static std::map<std::string, YACS::ENGINE::ComposedNode*> _compoMap;
101 static YACS::ENGINE::TypeCode *_tc_bool;
102 static YACS::ENGINE::TypeCode *_tc_int;
103 static YACS::ENGINE::TypeCode *_tc_double;