From e8265e09a3b53425abaaee33bb2733ccf2d44ac3 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Thu, 19 Oct 2000 19:12:53 +0000 Subject: [PATCH] Add trivial numeric_cast tests for floating types. [SVN r8007] --- cast_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cast_test.cpp b/cast_test.cpp index 66ff462..1602f16 100644 --- a/cast_test.cpp +++ b/cast_test.cpp @@ -110,6 +110,10 @@ int main( int argc, char * argv[] ) c = numeric_cast( small_negative_value ); assert( c == -1 ); + // These tests courtesy of Joe R NWP Swatosh + assert( 0.0f == numeric_cast( 0.0 ) ); + assert( 0.0 == numeric_cast( 0.0 ) ); + // tests which should result in errors being detected caught_exception = false;