Kindfield
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Friends Pages
main.cpp
Go to the documentation of this file.
5 
6 #include <unittest++/UnitTest++.h>
7 #include <unittest++/Test.h>
8 #include <unittest++/TestReporterStdout.h>
9 #include <unittest++/TestRunner.h>
10 
11 #include <memory>
12 
13 int main(int argc, char* argv[])
14 {
15  std::vector<std::string> tests;
16  if(argc > 1 && !strcmp(argv[1], "dev")) {
17  tests.push_back("Development");
18  } else {
19  tests.push_back("CoulombIntegrals");
20  tests.push_back("BoysFunction");
21  tests.push_back("GaussianIntegral");
22  tests.push_back("Hydrogen");
23  tests.push_back("GaussianOxygen");
24  tests.push_back("Parser");
25  tests.push_back("Systems");
26  tests.push_back("Unrestricted");
27  }
28  int result = 0;
29  for(const std::string& testName : tests) {
30  std::cout << "Running " << testName << std::endl;
31  UnitTest::TestReporterStdout reporter;
32  UnitTest::TestRunner runner(reporter);
33  result += runner.RunTestsIf(UnitTest::Test::GetTestList(), testName.c_str(), UnitTest::True(), 0);
34  }
35  if(result != 0) {
36  std::cerr << "FAILURE: Some tests failed! See above log for details..." << std::endl;
37  }
38  return result;
39 }
40