From f6b0ec36857f1a39a9476ae837d103b2b2a4a212 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Wed, 29 Sep 2004 11:44:04 +0000 Subject: [PATCH] fix syntax errors [SVN r25473] --- numeric_cast_test.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/numeric_cast_test.cpp b/numeric_cast_test.cpp index 4ba67c6..0b5bcde 100644 --- a/numeric_cast_test.cpp +++ b/numeric_cast_test.cpp @@ -28,7 +28,7 @@ using namespace boost; using std::cout; -int main( int argc, char * argv[] ) +int test_main( int argc, char * argv[] ) { # ifdef NDEBUG @@ -65,36 +65,36 @@ int main( int argc, char * argv[] ) // tests which should result in errors being detected - caught_exception = false; + bool caught_exception = false; try { c = numeric_cast( large_value ); } catch (bad_numeric_cast) { cout<<"caught bad_numeric_cast #1\n"; caught_exception = true; } - BOOST_CHECK ( caught_exception ) + BOOST_CHECK ( caught_exception ); caught_exception = false; try { c = numeric_cast( large_negative_value ); } catch (bad_numeric_cast) { cout<<"caught bad_numeric_cast #2\n"; caught_exception = true; } - BOOST_CHECK ( caught_exception ) + BOOST_CHECK ( caught_exception ); unsigned long ul; caught_exception = false; try { ul = numeric_cast( large_negative_value ); } catch (bad_numeric_cast) { cout<<"caught bad_numeric_cast #3\n"; caught_exception = true; } - BOOST_CHECK ( caught_exception ) + BOOST_CHECK ( caught_exception ); caught_exception = false; try { ul = numeric_cast( small_negative_value ); } catch (bad_numeric_cast) { cout<<"caught bad_numeric_cast #4\n"; caught_exception = true; } - BOOST_CHECK ( caught_exception ) + BOOST_CHECK ( caught_exception ); caught_exception = false; try { numeric_cast( DBL_MAX ); } catch (bad_numeric_cast) { cout<<"caught bad_numeric_cast #5\n"; caught_exception = true; } - BOOST_CHECK ( caught_exception ) + BOOST_CHECK ( caught_exception ); return 0 ; -} // main +}