Changeset 565 for library/tests

Show
Ignore:
Timestamp:
08/19/09 16:54:24 (15 years ago)
Author:
vbarta
Message:

using own error macros (basically copied from IT++, but never aborting)

Location:
library/tests
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • library/tests/shared_ptr_test.cpp

    r499 r565  
    11#include "shared_ptr.h" 
    22#include "UnitTest++.h" 
     3#include <stdexcept> 
    34#include <vector> 
    45 
     
    5152        CHECK_EQUAL ( 2, v[2]->get_x() ); 
    5253} 
     54 
     55TEST ( test_shared_ptr_error ) { 
     56        bdm::shared_ptr<Foo> empty; 
     57        try { 
     58                Foo x(*empty); 
     59                CHECK ( false ); 
     60        } catch ( std::runtime_error &exc ) { 
     61                CHECK ( exc.what() ); 
     62        } 
     63} 
  • library/tests/test_kalman.cpp

    r527 r565  
    2121        bool xxx = fin.seek ( "d" ); 
    2222        if ( !xxx ) { 
    23                 it_error ( "testKF.it not found" ); 
     23                bdm_error ( "testKF.it not found" ); 
    2424        } 
    2525        fin >> Dt; 
  • library/tests/test_kalman_QR.cpp

    r488 r565  
    2222        bool xxx = fin.seek ( "d" ); 
    2323        if ( !xxx ) { 
    24                 it_error ( "testKF.it not found" ); 
     24                bdm_error ( "testKF.it not found" ); 
    2525        } 
    2626        fin >> Dt; 
  • library/tests/test_kalman_QRexh.cpp

    r477 r565  
    2323 
    2424        if ( !xxx ) { 
    25                 it_error ( "testKF.it not found" ); 
     25                bdm_error ( "testKF.it not found" ); 
    2626        } 
    2727 
  • library/tests/testsuite.cpp

    r496 r565  
    22#include "TestReporterStdout.h" 
    33#include "UnitTest++.h" 
     4#include "bdmerror.h" 
    45#include "itpp_ext.h" 
     6#include <string.h> 
    57 
    68using namespace itpp; 
     
    911 
    1012bool is_selected_test( const UnitTest::Test *test ) { 
    11         it_assert_debug ( test, "NULL test" ); 
     13        bdm_assert_debug ( test, "NULL test" ); 
    1214 
    1315        if (!selected_tests.length()) { 
     
    1719        for (int i = 0; i < selected_tests.length(); ++i) { 
    1820                const char *n = test->m_details.testName; 
    19                 it_assert_debug ( n, "NULL test name" ); 
     21                bdm_assert_debug ( n, "NULL test name" ); 
    2022                const char *sname = selected_tests(i); 
    21                 it_assert_debug ( sname, "NULL selected test name" ); 
     23                bdm_assert_debug ( sname, "NULL selected test name" ); 
    2224                if ( !strcmp ( n, sname ) ) { 
    2325                        return true;