|
|
@ -8,6 +8,25 @@ using namespace std; |
|
|
|
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE(util_tests) |
|
|
|
BOOST_AUTO_TEST_SUITE(util_tests) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE(util_criticalsection) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CCriticalSection cs; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
|
|
|
CRITICAL_BLOCK(cs) |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOST_ERROR("break was swallowed!"); |
|
|
|
|
|
|
|
} while(0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
|
|
|
TRY_CRITICAL_BLOCK(cs) |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOST_ERROR("break was swallowed!"); |
|
|
|
|
|
|
|
} while(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE(util_MedianFilter) |
|
|
|
BOOST_AUTO_TEST_CASE(util_MedianFilter) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CMedianFilter<int> filter(5, 15); |
|
|
|
CMedianFilter<int> filter(5, 15); |
|
|
|