Show
Ignore:
Timestamp:
08/05/09 14:40:03 (15 years ago)
Author:
mido
Message:

panove, vite, jak jsem peclivej na upravu kodu.. snad se vam bude libit:) konfigurace je v souboru /system/astylerc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/unittest-cpp/TestReporterStdout.cpp

    r456 r477  
    66// cstdio doesn't pull in namespace std on VC6, so we do it here. 
    77#if defined(_MSC_VER) && (_MSC_VER == 1200) 
    8         namespace std {} 
     8namespace std {} 
    99#endif 
    1010 
    1111namespace UnitTest { 
    1212 
    13 void TestReporterStdout::ReportFailure(TestDetails const& details, char const* failure) 
    14 { 
     13void TestReporterStdout::ReportFailure ( TestDetails const& details, char const* failure ) { 
    1514#if defined(__APPLE__) || defined(__GNUG__) 
    16     char const* const errorFormat = "%s:%d: error: Failure in %s: %s\n"; 
     15        char const* const errorFormat = "%s:%d: error: Failure in %s: %s\n"; 
    1716#else 
    18     char const* const errorFormat = "%s(%d): error: Failure in %s: %s\n"; 
     17        char const* const errorFormat = "%s(%d): error: Failure in %s: %s\n"; 
    1918#endif 
    2019 
    21     using namespace std; 
     20        using namespace std; 
    2221 
    23     if (details.useFilename) { 
    24         // standard way 
    25         printf(errorFormat, details.filename, details.lineNumber, details.testName, failure); 
    26     } else {  
    27         // extended for BDM - the failure string already includes 
    28         // (custom) test location info 
    29         printf("%s\n", failure); 
    30     } 
     22        if ( details.useFilename ) { 
     23                // standard way 
     24                printf ( errorFormat, details.filename, details.lineNumber, details.testName, failure ); 
     25        } else { 
     26                // extended for BDM - the failure string already includes 
     27                // (custom) test location info 
     28                printf ( "%s\n", failure ); 
     29        } 
    3130} 
    3231 
    33 void TestReporterStdout::ReportTestStart(TestDetails const& /*test*/) 
    34 { 
     32void TestReporterStdout::ReportTestStart ( TestDetails const& /*test*/ ) { 
    3533} 
    3634 
    37 void TestReporterStdout::ReportTestFinish(TestDetails const& /*test*/, float) 
    38 { 
     35void TestReporterStdout::ReportTestFinish ( TestDetails const& /*test*/, float ) { 
    3936} 
    4037 
    41 void TestReporterStdout::ReportSummary(int const totalTestCount, int const failedTestCount, 
    42                                        int const failureCount, float secondsElapsed) 
    43 { 
     38void TestReporterStdout::ReportSummary ( int const totalTestCount, int const failedTestCount, 
     39        int const failureCount, float secondsElapsed ) { 
    4440        using namespace std; 
    4541 
    46     if (failureCount > 0) 
    47         printf("FAILURE: %d out of %d tests failed (%d failures).\n", failedTestCount, totalTestCount, failureCount); 
    48     else 
    49         printf("Success: %d tests passed.\n", totalTestCount); 
     42        if ( failureCount > 0 ) 
     43                printf ( "FAILURE: %d out of %d tests failed (%d failures).\n", failedTestCount, totalTestCount, failureCount ); 
     44        else 
     45                printf ( "Success: %d tests passed.\n", totalTestCount ); 
    5046 
    51     printf("Test time: %.2f seconds.\n", secondsElapsed); 
     47        printf ( "Test time: %.2f seconds.\n", secondsElapsed ); 
    5248} 
    5349