~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to lib/cppunit-1.10.0/examples/money/MoneyApp.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2006-11-11 10:32:06 UTC
  • Revision ID: james.westby@ubuntu.com-20061111103206-f3p0r9g0vq44rp3r
Tags: upstream-3.0.PRE5
ImportĀ upstreamĀ versionĀ 3.0.PRE5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "StdAfx.h"
 
2
#include <cppunit/CompilerOutputter.h>
 
3
#include <cppunit/extensions/TestFactoryRegistry.h>
 
4
#include <cppunit/ui/text/TestRunner.h>
 
5
 
 
6
 
 
7
int main(int argc, char* argv[])
 
8
{
 
9
  // Get the top level suite from the registry
 
10
  CPPUNIT_NS::Test *suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest();
 
11
 
 
12
  // Adds the test to the list of test to run
 
13
  CPPUNIT_NS::TextUi::TestRunner runner;
 
14
  runner.addTest( suite );
 
15
 
 
16
  // Change the default outputter to a compiler error format outputter
 
17
  runner.setOutputter( new CPPUNIT_NS::CompilerOutputter( &runner.result(),
 
18
                                                       std::cerr ) );
 
19
  // Run the test.
 
20
  bool wasSucessful = runner.run();
 
21
 
 
22
  // Return error code 1 if the one of test failed.
 
23
  return wasSucessful ? 0 : 1;
 
24
}
 
25