diff --git a/test/buffer_test.cpp b/test/buffer_test.cpp index ffe79ac..e214a03 100644 --- a/test/buffer_test.cpp +++ b/test/buffer_test.cpp @@ -196,26 +196,32 @@ namespace test_buffer_type( 0x01020304050607ULL, 0xFE020304050607ULL ); test_buffer_type( 0x0102030405060708ULL, 0xFE02030405060708LL ); - std::cout << "test construction and assignment" << std::endl; + std::cout << "test construction and assignment complete" << std::endl; } template + void test_boundary_values_() + { + test_buffer_type< endian_buffer >( std::numeric_limits::min(), std::numeric_limits::max() ); + test_buffer_type< endian_buffer >( std::numeric_limits::min(), std::numeric_limits::max() ); + test_buffer_type< endian_buffer >( std::numeric_limits::min(), std::numeric_limits::max() ); + test_buffer_type< endian_buffer >( std::numeric_limits::min(), std::numeric_limits::max() ); + } + void test_boundary_values() { - endian_buffer bmax( - std::numeric_limits::max()); - endian_buffer bmin( - std::numeric_limits::min()); - endian_buffer lmax( - std::numeric_limits::max()); - endian_buffer lmin( - std::numeric_limits::min()); + std::cout << "test boundary values..." << std::endl; - BOOST_TEST(bmax.value() == std::numeric_limits::max()); - BOOST_TEST(bmin.value() == std::numeric_limits::min()); - BOOST_TEST(lmax.value() == std::numeric_limits::max()); - BOOST_TEST(lmin.value() == std::numeric_limits::min()); + test_boundary_values_(); + test_boundary_values_(); + test_boundary_values_(); + test_boundary_values_(); + test_boundary_values_(); + test_boundary_values_(); + + std::cout << "test boundary values complete" << std::endl; } + } // unnamed namespace //--------------------------------------------------------------------------------------// @@ -247,13 +253,7 @@ int cpp_main(int, char *[]) check_size(); test_inserter_and_extractor(); test_construction_and_assignment(); - - test_boundary_values(); - test_boundary_values(); - test_boundary_values(); - test_boundary_values(); - test_boundary_values(); - test_boundary_values(); + test_boundary_values(); cout << " done" << endl;