PlasCom2  1.0
XPACC Multi-physics simluation application
TestUtil.C
Go to the documentation of this file.
1 #include "UtilTest.H"
7 
8 namespace ix {
9  namespace util {
10 
19  int UtilTest(int argc,char *argv[])
20  {
21  util::testmanager test;
23  test.Process(results);
24  std::ofstream Ouf;
25  std::ostream *Out = &std::cout;
26  if(argc > 1){
27  Ouf.open(argv[1]);
28  if(!Ouf){
29  std::cout << "Error: Could not open output file, " << argv[1] << "."
30  << std::endl;
31  return(1);
32  }
33  Out = &Ouf;
34  }
35  *Out << results << std::endl;
36  if(Ouf)
37  Ouf.close();
38  return(0);
39  }
40  };
41 };
42 
43 int main(int argc,char *argv[])
44 {
45  return(ix::util::UtilTest(argc,argv));
46 }
Defines MPI-specific parallel global and program classes.
Encapsulating class for collections of test results.
Definition: Testing.H:18
void Process(test::results &result)
Process all tests and populate a "results" object.
Definition: UtilTest.H:44
int UtilTest(int argc, char *argv[])
Drives the ix::util namespace&#39;s test object.
Definition: TestUtil.C:19
Testing object for primitive utilities.
int main(int argc, char *argv[])
Definition: TestUtil.C:43