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