/[svn]/libgig/trunk/src/testcases/main.cpp
ViewVC logotype

Contents of /libgig/trunk/src/testcases/main.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2764 - (show annotations) (download)
Wed May 13 08:36:47 2015 UTC (8 years, 11 months ago) by schoenebeck
File size: 1184 byte(s)
* unit tests: fixed wrong return value when test suite app exits
  (patch by Ryan Schmidt)

1 // Unit Test Runner for libgig (text only version)
2 // -----------------------------------------------
3 //
4 // This console application is used to run all written tests against current
5 // libgig codebase. Progress of the test runs and the final result will be
6 // printed out as simple text on the console.
7 //
8 // The test runner is not compiled by default (means by just running 'make'
9 // or 'make all' at the top level directory), you have to compile it
10 // explicitly by running 'make tests' in the toplevel directory or
11 // 'make libgigtests' in this source directory. Note: you need to have
12 // cppunit installed on your system to be able to compile the unit tests.
13 //
14 // This file usually doesn't have to be changed, especially not for adding
15 // new tests !
16
17 #include <cppunit/extensions/TestFactoryRegistry.h>
18 #include <cppunit/ui/text/TestRunner.h>
19 #include <cstdlib>
20
21 int main(int argc, char** argv) {
22 CppUnit::TextUi::TestRunner runner;
23 CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
24 runner.addTest( registry.makeTest() );
25 bool wasSuccessful = runner.run( "", false );
26 return wasSuccessful ? EXIT_SUCCESS : EXIT_FAILURE;
27 }

  ViewVC Help
Powered by ViewVC