/** ** Copyright (c) 2007-2009 Illumina, Inc. ** ** This software is covered by the "Illumina Genome Analyzer Software ** License Agreement" and the "Illumina Source Code License Agreement", ** and certain third party copyright/licenses, and any user of this ** source file is bound by the terms therein (see accompanying files ** Illumina_Genome_Analyzer_Software_License_Agreement.pdf and ** Illumina_Source_Code_License_Agreement.pdf and third party ** copyright/license notices). ** ** This file is part of the Consensus Assessment of Sequence And VAriation ** (CASAVA) software package. ** ** \file cppunitTest.cpp ** ** Main program used for all the cppunit tests ** ** \author Come Raczy **/ #include #include #include #include #include "RegistryName.hh" int main() { CppUnit::TextUi::TestRunner runner; // First add the tests from the named registries in the right order // To add/remove/modify a registry name, or to change its sequence // number, edit RegistryName.cpp for (std::vector::const_iterator name = getRegistryNameList().begin(); getRegistryNameList().end() != name; ++name) { CppUnit::Test *namedSuite = CppUnit::TestFactoryRegistry::getRegistry(*name).makeTest(); runner.addTest(namedSuite); } // Add the top level (unnamed) suite from the list of tests to run CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); runner.addTest( suite ); // Change the default outputter to a compiler error format outputter runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(), std::cerr ) ); // Run the tests. bool wasSucessful = runner.run(); // Return error code 1 if the one of test failed. return wasSucessful ? 0 : 1; }