mirror of
https://github.com/boostorg/test.git
synced 2026-02-14 13:12:10 +00:00
fixed bug with const value comparison
This commit is contained in:
@@ -146,6 +146,7 @@ error: in "test_BOOST_TEST_fpv_comp": check d1-1e-5 == 0. has failed [1e-05 - 1e
|
||||
error: in "test_BOOST_TEST_fpv_comp": check d1-1e-5 != 0. has failed [1e-05 - 1e-05 == 0]. Absolute value is within tolerance [|1e-06| < 0.0001]
|
||||
error: in "test_BOOST_TEST_fpv_comp": check 0. != 1e-5-d1 has failed [0 == -1e-06]. Absolute value is within tolerance [|-1e-06| < 0.0001]
|
||||
error: in "test_BOOST_TEST_fpv_comp": check d2-1e-5 < 0. has failed [1e-05 - 1e-05 >= 0]
|
||||
error: in "test_BOOST_TEST_fpv_comp": check 1.01 == cd has failed [1 != 1]. Relative difference exceeds tolerance [0.01 > 0.001]
|
||||
error: in "test_BOOST_TEST_cstring_comp": check str1 == str2 has failed [test1 != test12]
|
||||
error: in "test_BOOST_TEST_cstring_comp": check str1 == str3 has failed [test1 != test2]
|
||||
error: in "test_BOOST_TEST_cstring_comp": check str3 == str2 has failed [test2 != test12]
|
||||
|
||||
@@ -90,8 +90,8 @@ struct shorten_lf : public boost::unit_test::output::compiler_log_formatter
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
std::string match_file_name( "./test_files/test_tools_test.pattern" );
|
||||
std::string save_file_name( "test_tools_test.pattern" );
|
||||
std::string match_file_name( "./test_files/test_tools-test.pattern" );
|
||||
std::string save_file_name( "test_tools-test.pattern" );
|
||||
|
||||
static tt::output_test_stream&
|
||||
ots()
|
||||
@@ -759,6 +759,12 @@ TEST_CASE( test_BOOST_TEST_fpv_comp )
|
||||
BOOST_TEST( d1-1e-5 != 0., tt::tolerance( 1e-4 ) );
|
||||
BOOST_TEST( 0. != 1e-5-d1, tt::tolerance( 1e-4 ) );
|
||||
BOOST_TEST( d2-1e-5 < 0., tt::tolerance( 1e-6 ) );
|
||||
|
||||
const double cd = 1.0;
|
||||
BOOST_TEST( cd == 1.0);
|
||||
BOOST_TEST( 1.0 == cd );
|
||||
BOOST_TEST( cd == 1.01, 10.% tt::tolerance());
|
||||
BOOST_TEST( 1.01 == cd, 0.1% tt::tolerance() );
|
||||
}
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
Reference in New Issue
Block a user