Changeset 736

Show
Ignore:
Timestamp:
11/24/09 17:26:50 (14 years ago)
Author:
mido
Message:

a small improvement of TestRunner?, now cleaning enviroment for each test - but it did not help, merger_2d_stress (and others) is stil running improperly

Location:
library/tests/unittest-cpp
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • library/tests/unittest-cpp/CMakeLists.txt

    r691 r736  
    1212add_library(unittest ${unittest_src}) 
    1313 
     14target_link_libraries(unittest  bdm) 
     15 
     16 
    1417# From CMake version 2.8, it is not allowed to add subdirectories without  
    1518# their CMakeLists, therfore the following two lines were commented out: 
  • library/tests/unittest-cpp/TestRunner.cpp

    r706 r736  
    55#include "TimeHelpers.h" 
    66#include "MemoryOutStream.h" 
     7 
     8 
     9#include "../bdm/base/bdmbase.h" 
    710 
    811#include <cstring> 
     
    6770} 
    6871 
     72void TestRunner::ClearEnvironment() const { 
     73        bdm::RV::clear_all();    
    6974} 
     75 
     76} 
  • library/tests/unittest-cpp/TestRunner.h

    r706 r736  
    3232                while ( curTest != 0 ) { 
    3333                        if ( IsTestInSuite ( curTest, suiteName ) && predicate ( curTest ) ) 
     34                        { 
     35                                ClearEnvironment(); 
    3436                                RunTest ( m_result, curTest, maxTestTimeInMs ); 
     37                        } 
     38 
    3539 
    3640                        curTest = curTest->next; 
     
    4751        int Finish() const; 
    4852        bool IsTestInSuite ( const Test* const curTest, char const* suiteName ) const; 
    49         void RunTest ( TestResults* const result, Test* const curTest, int const maxTestTimeInMs ) const; 
     53        void RunTest ( TestResults* const result, Test* const curTest, int const maxTestTimeInMs ) const;        
     54        void ClearEnvironment() const; 
    5055}; 
    5156