mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Add trivial numeric_cast tests for floating types.
[SVN r8007]
This commit is contained in:
parent
860cf0b321
commit
e8265e09a3
@ -110,6 +110,10 @@ int main( int argc, char * argv[] )
|
||||
c = numeric_cast<signed char>( small_negative_value );
|
||||
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
|
||||
|
||||
caught_exception = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user