Back to index

nordugrid-arc-nox  1.1.0~rc6
Functions
Test.cpp File Reference
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>
#include <arc/Logger.h>

Go to the source code of this file.

Functions

static Arc::Logger logger (Arc::Logger::getRootLogger(),"libarcdatatest")
int main (int argc, char **argv)

Function Documentation

static Arc::Logger logger ( Arc::Logger::  getRootLogger(),
"libarcdatatest"   
) [static]
int main ( int  argc,
char **  argv 
)

Definition at line 11 of file Test.cpp.

                                {

  Arc::LogStream logcerr(std::cerr);

  if (argc > 1 && strcmp(argv[1], "-v") == 0) {
    // set logging
    Arc::Logger::getRootLogger().addDestination(logcerr);
    Arc::Logger::getRootLogger().setThreshold(Arc::VERBOSE);
  }

  CppUnit::TextUi::TestRunner runner;
  runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());

  runner.setOutputter(CppUnit::CompilerOutputter::defaultOutputter
                      (&runner.result(), std::cerr));

  bool wasSuccessful = runner.run();

  return wasSuccessful ? 0 : 1;
}

Here is the call graph for this function: