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

    r418 r477  
    77 
    88 
    9 TimeConstraint::TimeConstraint(int ms, TestDetails const& details) 
    10         : m_details(details) 
    11     , m_maxMs(ms) 
    12 { 
    13     m_timer.Start(); 
     9TimeConstraint::TimeConstraint ( int ms, TestDetails const& details ) 
     10                : m_details ( details ) 
     11                , m_maxMs ( ms ) { 
     12        m_timer.Start(); 
    1413} 
    1514 
    16 TimeConstraint::~TimeConstraint() 
    17 { 
    18     double const totalTimeInMs = m_timer.GetTimeInMs(); 
    19     if (totalTimeInMs > m_maxMs) 
    20     { 
    21         MemoryOutStream stream; 
    22         stream << "Time constraint failed. Expected to run test under " << m_maxMs << 
    23                   "ms but took " << totalTimeInMs << "ms."; 
     15TimeConstraint::~TimeConstraint() { 
     16        double const totalTimeInMs = m_timer.GetTimeInMs(); 
     17        if ( totalTimeInMs > m_maxMs ) { 
     18                MemoryOutStream stream; 
     19                stream << "Time constraint failed. Expected to run test under " << m_maxMs << 
     20                "ms but took " << totalTimeInMs << "ms."; 
    2421 
    25                 UnitTest::CurrentTest::Results()->OnTestFailure(m_details, stream.GetText()); 
    26     } 
     22                UnitTest::CurrentTest::Results()->OnTestFailure ( m_details, stream.GetText() ); 
     23        } 
    2724} 
    2825