~ubuntu-branches/ubuntu/maverick/libtorrent-rasterbar/maverick

« back to all changes in this revision

Viewing changes to test/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Sauthier
  • Date: 2010-08-10 12:59:37 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100810125937-jbcmmf17y8yo9hgz
Tags: 0.15.0-0ubuntu1
* New upstream version.
* debian/patches/100_fix_html_docs.patch: refreshed.
* debian/control: bump up standards-version to 3.9.1 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
*/
32
32
 
33
33
#include <iostream>
 
34
#include <boost/config.hpp>
34
35
 
35
36
int test_main();
36
37
 
37
 
bool tests_failure = false;
38
 
 
39
 
void report_failure(char const* err, char const* file, int line)
40
 
{
41
 
        std::cerr << "\033[31m" << file << ":" << line << " \"" << err << "\"\033[0m\n";
42
 
        tests_failure = true;
43
 
}
 
38
extern bool tests_failure;
44
39
 
45
40
int main()
46
41
{
 
42
#ifndef BOOST_NO_EXCEPTIONS
47
43
        try
48
44
        {
 
45
#endif
49
46
                test_main();
50
47
                return tests_failure ? 1 : 0;
 
48
#ifndef BOOST_NO_EXCEPTIONS
51
49
        }
52
50
        catch (std::exception const& e)
53
51
        {
59
57
                std::cerr << "Terminated with unknown exception\n";
60
58
                return 1;
61
59
        }
 
60
#endif
62
61
}
63
62