1 // Copyright (C) 2006 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef _MEDSPLITTERTEST_HXX_
22 #define _MEDSPLITTERTEST_HXX_
24 #include <cppunit/extensions/HelperMacros.h>
30 namespace MEDSPLITTER {
34 class MEDSPLITTERTest : public CppUnit::TestFixture
36 CPPUNIT_TEST_SUITE( MEDSPLITTERTest );
37 CPPUNIT_TEST( testMESHCollection_constructor );
38 CPPUNIT_TEST( testMESHCollection_read_seq);
39 CPPUNIT_TEST( testMESHCollection_read_para);
40 CPPUNIT_TEST( testMESHCollection_square);
41 CPPUNIT_TEST( testMESHCollection_square_with_faces);
42 CPPUNIT_TEST( testMESHCollection_indivisible);
43 CPPUNIT_TEST( testMESHCollection_user_partition);
44 CPPUNIT_TEST( testParallelTopology_graph_constructor);
45 CPPUNIT_TEST( testMESHCollection_complete_sequence);
46 CPPUNIT_TEST( testMESHCollection_complete_sequence_with_polygon);
47 CPPUNIT_TEST( testMESHCollection_families);
48 // CPPUNIT_TEST( testMESHCollection_complete_sequence_with_polyhedra);
49 CPPUNIT_TEST_SUITE_END();
56 void testMESHCollection_constructor();
57 void testMESHCollection_read_seq();
58 void testMESHCollection_read_para();
59 void testMESHCollection_square();
60 void testMESHCollection_square_with_faces();
61 void testMESHCollection_indivisible();
62 void testMESHCollection_user_partition();
63 void testMESHCollection_complete_sequence();
64 void testMESHCollection_complete_sequence_with_polygon();
65 void testMESHCollection_complete_sequence_with_polyhedra();
66 void testMESHCollection_families();
67 void testParallelTopology_graph_constructor();
71 // to automatically remove temporary files from disk
72 class MEDSPLITTERTest_TmpFilesRemover
75 MEDSPLITTERTest_TmpFilesRemover() {}
76 ~MEDSPLITTERTest_TmpFilesRemover();
77 bool Register(const std::string theTmpFile);
80 std::set<std::string> myTmpFiles;
84 * Tool to print array to stream.
87 void MEDSPLITTERTest_DumpArray (std::ostream & stream, const T* array, const int length, const std::string text)
89 stream << text << ": {";
92 for (int i = 1; i < length; i++) {
93 stream << ", " << array[i];
96 stream << "}" << std::endl;