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/TestResults.cpp

    r418 r477  
    66namespace UnitTest { 
    77 
    8 TestResults::TestResults(TestReporter* testReporter) 
    9     : m_testReporter(testReporter) 
    10     , m_totalTestCount(0) 
    11     , m_failedTestCount(0) 
    12     , m_failureCount(0) 
    13     , m_currentTestFailed(false) 
    14 { 
     8TestResults::TestResults ( TestReporter* testReporter ) 
     9                : m_testReporter ( testReporter ) 
     10                , m_totalTestCount ( 0 ) 
     11                , m_failedTestCount ( 0 ) 
     12                , m_failureCount ( 0 ) 
     13                , m_currentTestFailed ( false ) { 
    1514} 
    1615 
    17 void TestResults::OnTestStart(TestDetails const& test) 
    18 { 
    19     ++m_totalTestCount; 
    20     m_currentTestFailed = false; 
    21     if (m_testReporter) 
    22         m_testReporter->ReportTestStart(test); 
     16void TestResults::OnTestStart ( TestDetails const& test ) { 
     17        ++m_totalTestCount; 
     18        m_currentTestFailed = false; 
     19        if ( m_testReporter ) 
     20                m_testReporter->ReportTestStart ( test ); 
    2321} 
    2422 
    25 void TestResults::OnTestFailure(TestDetails const& test, char const* failure) 
    26 { 
    27     ++m_failureCount; 
    28     if (!m_currentTestFailed) 
    29     { 
    30         ++m_failedTestCount; 
    31         m_currentTestFailed = true; 
    32     } 
     23void TestResults::OnTestFailure ( TestDetails const& test, char const* failure ) { 
     24        ++m_failureCount; 
     25        if ( !m_currentTestFailed ) { 
     26                ++m_failedTestCount; 
     27                m_currentTestFailed = true; 
     28        } 
    3329 
    34     if (m_testReporter) 
    35         m_testReporter->ReportFailure(test, failure); 
     30        if ( m_testReporter ) 
     31                m_testReporter->ReportFailure ( test, failure ); 
    3632} 
    3733 
    38 void TestResults::OnTestFinish(TestDetails const& test, float secondsElapsed) 
    39 { 
    40     if (m_testReporter) 
    41         m_testReporter->ReportTestFinish(test, secondsElapsed); 
     34void TestResults::OnTestFinish ( TestDetails const& test, float secondsElapsed ) { 
     35        if ( m_testReporter ) 
     36                m_testReporter->ReportTestFinish ( test, secondsElapsed ); 
    4237} 
    4338 
    44 int TestResults::GetTotalTestCount() const 
    45 { 
    46     return m_totalTestCount; 
     39int TestResults::GetTotalTestCount() const { 
     40        return m_totalTestCount; 
    4741} 
    4842 
    49 int TestResults::GetFailedTestCount() const 
    50 { 
    51     return m_failedTestCount; 
     43int TestResults::GetFailedTestCount() const { 
     44        return m_failedTestCount; 
    5245} 
    5346 
    54 int TestResults::GetFailureCount() const 
    55 { 
    56     return m_failureCount; 
     47int TestResults::GetFailureCount() const { 
     48        return m_failureCount; 
    5749} 
    5850