antioch-0.4.0
eigen_unit_tests.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // Antioch - A Gas Dynamics Thermochemistry Library
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Benjamin S. Kirk,
7 // Sylvain Plessis, Roy H. Stonger
8 //
9 // Copyright (C) 2013 The PECOS Development Team
10 //
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the Version 2.1 GNU Lesser General
13 // Public License as published by the Free Software Foundation.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
23 // Boston, MA 02110-1301 USA
24 //
25 //-----------------------------------------------------------------------el-
26 
27 #include "antioch_config.h"
28 
29 #ifdef ANTIOCH_HAVE_CPPUNIT
30 #include <cppunit/extensions/TestFactoryRegistry.h>
31 #include <cppunit/ui/text/TestRunner.h>
32 #endif // ANTIOCH_HAVE_CPPUNIT
33 
34 int main()
35 {
36 #ifdef ANTIOCH_HAVE_EIGEN
37 #ifdef ANTIOCH_HAVE_CPPUNIT
38  CppUnit::TextUi::TestRunner runner;
39  CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
40  runner.addTest( registry.makeTest() );
41 
42  // If the tests all succeed, report success
43  if (runner.run())
44  return 0;
45 
46  // If any test fails report failure
47  return 1;
48 #else // ANTIOCH_HAVE_CPPUNIT
49  // If we don't have CPPUnit, report we skipped
50  // 77 return code tells Automake we skipped this.
51  return 77;
52 #endif // ANTIOCH_HAVE_CPPUNIT
53 
54 #else // ANTIOCH_HAVE_EIGEN
55  // If we don't have Eigen, report we skipped
56  // 77 return code tells Automake we skipped this.
57  return 77;
58 #endif // ANTIOCH_HAVE_EIGEN
59 }
int main()

Generated on Thu Jul 7 2016 11:09:46 for antioch-0.4.0 by  doxygen 1.8.8