Add trivial numeric_cast tests for floating types.

[SVN r8007]
This commit is contained in:
Dave Abrahams 2000-10-19 19:12:53 +00:00
parent 860cf0b321
commit e8265e09a3

View File

@ -110,6 +110,10 @@ int main( int argc, char * argv[] )
c = numeric_cast<signed char>( small_negative_value ); c = numeric_cast<signed char>( small_negative_value );
assert( c == -1 ); assert( c == -1 );
// These tests courtesy of Joe R NWP Swatosh<joe.r.swatosh@usace.army.mil>
assert( 0.0f == numeric_cast<float>( 0.0 ) );
assert( 0.0 == numeric_cast<double>( 0.0 ) );
// tests which should result in errors being detected // tests which should result in errors being detected
caught_exception = false; caught_exception = false;