1 // Copyright (C) 2007-2012 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
20 #include "MEDCouplingMeshFieldFactoryComponentClt.hxx"
21 #include "MEDCouplingMeshFieldFactoryComponent.hxx"
22 #include "MEDCouplingUMeshClient.hxx"
24 #include <cppunit/CompilerOutputter.h>
25 #include <cppunit/TestResult.h>
26 #include <cppunit/TestResultCollector.h>
27 #include <cppunit/TextTestProgressListener.h>
28 #include <cppunit/BriefTestProgressListener.h>
29 #include <cppunit/extensions/TestFactoryRegistry.h>
30 #include <cppunit/TestRunner.h>
32 #include CORBA_CLIENT_HEADER(MEDCouplingCorbaServantTest)
38 using namespace ParaMEDMEM;
40 CPPUNIT_TEST_SUITE_REGISTRATION( SALOME_TEST::MEDCouplingCorbaServBasicsTestClt );
42 int main(int argc, char* argv[])
44 CPPUNIT_NS::TestResult controller;
45 CPPUNIT_NS::TestResultCollector result;
46 controller.addListener( &result );
48 CPPUNIT_NS::TextTestProgressListener progress;
50 CPPUNIT_NS::BriefTestProgressListener progress;
52 controller.addListener( &progress );
53 SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::_argc=argc;
54 SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::_argv=argv;
55 CPPUNIT_NS::Test *suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest();
56 CPPUNIT_NS::TestRunner runner;
57 runner.addTest( suite );
58 runner.run( controller);
59 // --- Print test in a compiler compatible format.
60 std::ofstream testFile;
61 testFile.open("UnitTestsResult", std::ios::out | std::ios::trunc);
62 //CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr );
63 CPPUNIT_NS::CompilerOutputter outputter( &result, testFile );
66 bool wasSucessful = result.wasSuccessful();
68 // --- Return error code 1 if the one of test failed.
69 return wasSucessful ? 0 : 1;