Salome HOME
updated copyright message
[modules/yacs.git] / src / engine / Test / engineTest.hxx
1 // Copyright (C) 2006-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 #ifndef _ENGINETEST_HXX_
21 #define _ENGINETEST_HXX_
22
23 #include "ComposedNode.hxx"
24 #include "TypeCode.hxx"
25
26 #include <cppunit/extensions/HelperMacros.h>
27 #include <string>
28 #include <map>
29
30 namespace YACS
31 {
32   class EngineTest: public CppUnit::TestFixture
33   {
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(checkGraphAnalyser0);
63     CPPUNIT_TEST(checkGraphAnalyser1);
64     CPPUNIT_TEST(checkGraphAnalyser2);
65     CPPUNIT_TEST(checkGraphAnalyser3);
66     CPPUNIT_TEST(checkGraphAnalyser4);
67     CPPUNIT_TEST(checkGraphAnalyser5);
68     CPPUNIT_TEST_SUITE_END();
69       
70   public:
71       
72     void setUp();
73     void tearDown();
74     void cleanUp();
75
76     void checkGetRuntime();
77     void checkAny1();
78     void checkSharedPtr();
79     void checkAny2();
80     void checkAny3();
81     void checkAny4();
82     void checkAny5();
83     void checkAny6();
84     void checkAny7();
85     void checkAny8();
86     void checkInGateOutGate();
87     void checkNodePortNumber();
88     void checkPortTypeName();
89     void checkDuplicatePortName();
90     void checkRemovePort();
91     void checkAddNodesToBloc();
92     void checkAddingTwiceSameNodeInSameBloc();
93     void checkAddingTwiceSameNodeInTwoBlocs();
94     void checkRecursiveBlocs_NumberOfNodes();
95     void checkRecursiveBlocs_NumberOfPorts();
96     void checkPortNameInBloc();
97     void checkGetNameOfPortNotInBloc();
98     void checkRemoveNode();
99     void RecursiveBlocs_multipleRecursion();
100     void RecursiveBlocs_removeNodes();
101     void checkLogger();
102     void checkGraphAnalyser0();
103     void checkGraphAnalyser1();
104     void checkGraphAnalyser2();
105     void checkGraphAnalyser3();
106     void checkGraphAnalyser4();
107     void checkGraphAnalyser5();
108   protected:
109     static std::map<std::string, YACS::ENGINE::Node*> _nodeMap; 
110     static std::map<std::string, YACS::ENGINE::ComposedNode*> _compoMap;
111
112     static  YACS::ENGINE::TypeCode *_tc_bool;
113     static  YACS::ENGINE::TypeCode *_tc_int;
114     static  YACS::ENGINE::TypeCode *_tc_double;
115   private:
116
117   };
118
119 }
120
121 #endif