diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-02-03 18:40:35 -0500 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-02-05 13:53:16 -0500 |
commit | 93e72f29f5d58dff1229c8db9db62b4f02324117 (patch) | |
tree | 975970f00278485ab112767e2758d290da588665 /src/mongo/dbtests/jsobjtests.cpp | |
parent | 68fe6570d19c744f84861b70d541e8b46ac24935 (diff) | |
download | mongo-93e72f29f5d58dff1229c8db9db62b4f02324117.tar.gz |
SERVER-8944 Use C++11 standard library functions for double NaN and Infinity detection
Diffstat (limited to 'src/mongo/dbtests/jsobjtests.cpp')
-rw-r--r-- | src/mongo/dbtests/jsobjtests.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/dbtests/jsobjtests.cpp b/src/mongo/dbtests/jsobjtests.cpp index 401f4648c80..ff99677170a 100644 --- a/src/mongo/dbtests/jsobjtests.cpp +++ b/src/mongo/dbtests/jsobjtests.cpp @@ -33,6 +33,7 @@ #include "mongo/platform/basic.h" +#include <cmath> #include <iostream> #include "mongo/bson/util/builder.h" @@ -40,7 +41,6 @@ #include "mongo/db/json.h" #include "mongo/db/storage/mmap_v1/btree/key.h" #include "mongo/dbtests/dbtests.h" -#include "mongo/platform/float_utils.h" #include "mongo/util/allocator.h" #include "mongo/util/embedded_builder.h" #include "mongo/util/log.h" @@ -458,9 +458,9 @@ namespace JsobjTests { double inf = numeric_limits< double >::infinity(); double nan = numeric_limits< double >::quiet_NaN(); double nan2 = numeric_limits< double >::signaling_NaN(); - ASSERT( isNaN(nan) ); - ASSERT( isNaN(nan2) ); - ASSERT( !isNaN(inf) ); + ASSERT( std::isnan(nan) ); + ASSERT( std::isnan(nan2) ); + ASSERT( !std::isnan(inf) ); ASSERT( BSON( "a" << inf ).woCompare( BSON( "a" << inf ) ) == 0 ); ASSERT( BSON( "a" << inf ).woCompare( BSON( "a" << 1 ) ) > 0 ); |