Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TestSuite.cpp
Go to the documentation of this file.
1 // $Id$
2 // $Source$
3 // @HEADER
4 // ***********************************************************************
5 //
6 // Sacado Package
7 // Copyright (2006) Sandia Corporation
8 //
9 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
10 // the U.S. Government retains certain rights in this software.
11 //
12 // This library is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU Lesser General Public License as
14 // published by the Free Software Foundation; either version 2.1 of the
15 // License, or (at your option) any later version.
16 //
17 // This library is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 // Lesser General Public License for more details.
21 //
22 // You should have received a copy of the GNU Lesser General Public
23 // License along with this library; if not, write to the Free Software
24 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
25 // USA
26 // Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps
27 // (etphipp@sandia.gov).
28 //
29 // ***********************************************************************
30 // @HEADER
31 #include <iostream>
32 
33 // Cppunit includes
34 #include <cppunit/extensions/TestFactoryRegistry.h>
35 #include <cppunit/ui/text/TestRunner.h>
36 
37 int main(int argc, char *argv[]) {
38  bool wasSuccessful = false;
39 
40  try {
41  CppUnit::TextUi::TestRunner runner;
42  CppUnit::TestFactoryRegistry &registry =
43  CppUnit::TestFactoryRegistry::getRegistry();
44 
45  runner.addTest(registry.makeTest());
46  wasSuccessful = runner.run("", false,true,true);
47  }
48  catch (std::exception& e) {
49  std::cout << e.what() << std::endl;
50  }
51  catch (...) {
52  std::cout << "Caught unknown exception!" << std::endl;
53  }
54 
55  return wasSuccessful;
56 }
int main()
Definition: ad_example.cpp:191