|
43 | 43 | #define snprintf _snprintf
|
44 | 44 | #include <windows.h>
|
45 | 45 |
|
46 |
| -#ifndef nextafter |
| 46 | +#if defined(_MSC_VER) && (_MSC_VER == 1700 || _MSC_VER == 1800) |
47 | 47 | #define nextafter _nextafter
|
| 48 | +#if defined _M_X64 |
| 49 | +#define nextafterf _nextafterf /* x64 only */ |
| 50 | +#else |
| 51 | +#define DO_NOT_TEST_FLOAT |
48 | 52 | #endif
|
49 |
| - |
50 |
| -#ifndef nextafterf |
51 |
| -#define nextafterf _nextafterf |
52 | 53 | #endif
|
| 54 | + |
53 | 55 | #endif
|
54 | 56 |
|
55 | 57 | #include "dictionaries.h"
|
@@ -9605,6 +9607,7 @@ void testCompareFloatToReal(const RsslReal testReal, const RsslInt testIntVal)
|
9605 | 9607 | }
|
9606 | 9608 | }
|
9607 | 9609 |
|
| 9610 | +#ifndef DO_NOT_TEST_FLOAT |
9608 | 9611 | void testFloatToRealConvert(const RsslFloat dFactor, const RsslRealHints rhExponent)
|
9609 | 9612 | {
|
9610 | 9613 | RsslFloat testFloat;
|
@@ -9714,7 +9717,9 @@ void testFloatToRealConvert(const RsslFloat dFactor, const RsslRealHints rhExpon
|
9714 | 9717 | testCompareFloatToReal(testReal, (std::numeric_limits<RsslInt>::min)());
|
9715 | 9718 | }
|
9716 | 9719 | }
|
| 9720 | +#endif |
9717 | 9721 |
|
| 9722 | +#ifndef DO_NOT_TEST_FLOAT |
9718 | 9723 | TEST(realFloatIntConvertTest, RealHintExponentAllTest)
|
9719 | 9724 | {
|
9720 | 9725 | testFloatToRealConvert(1e14f, RSSL_RH_EXPONENT_14);
|
@@ -9751,6 +9756,7 @@ TEST(realFloatIntConvertTest, RealHintExponentAllTest)
|
9751 | 9756 | testFloatToRealConvert(128.f, RSSL_RH_FRACTION_128);
|
9752 | 9757 | testFloatToRealConvert(256.f, RSSL_RH_FRACTION_256);
|
9753 | 9758 | }
|
| 9759 | +#endif |
9754 | 9760 |
|
9755 | 9761 | TEST(realDoubleIntConvertTest, RealHintExponent0Test)
|
9756 | 9762 | {
|
@@ -10455,6 +10461,7 @@ TEST(realDoubleIntConvertTest, RealHintFraction_256Test)
|
10455 | 10461 | ASSERT_EQ(testReal.value, (std::numeric_limits<RsslInt>::min)());
|
10456 | 10462 | }
|
10457 | 10463 |
|
| 10464 | +#ifndef DO_NOT_TEST_FLOAT |
10458 | 10465 | TEST(realFloatIntConvertTest, RealHintExponent0Test)
|
10459 | 10466 | {
|
10460 | 10467 | RsslFloat testFloat;
|
@@ -10624,7 +10631,9 @@ TEST(realFloatIntConvertTest, RealHintExponent0Test)
|
10624 | 10631 | ASSERT_EQ(testReal.hint, rhExponent);
|
10625 | 10632 | ASSERT_EQ(testReal.value, (std::numeric_limits<RsslInt>::min)());
|
10626 | 10633 | }
|
| 10634 | +#endif |
10627 | 10635 |
|
| 10636 | +#ifndef DO_NOT_TEST_FLOAT |
10628 | 10637 | TEST(realFloatIntConvertTest, RealHintExponent_14Test)
|
10629 | 10638 | {
|
10630 | 10639 | RsslFloat testFloat;
|
@@ -10721,7 +10730,9 @@ TEST(realFloatIntConvertTest, RealHintExponent_14Test)
|
10721 | 10730 | ASSERT_EQ(testReal.hint, rhExponent);
|
10722 | 10731 | ASSERT_EQ(testReal.value, (std::numeric_limits<RsslInt>::min)());
|
10723 | 10732 | }
|
| 10733 | +#endif |
10724 | 10734 |
|
| 10735 | +#ifndef DO_NOT_TEST_FLOAT |
10725 | 10736 | TEST(realFloatIntConvertTest, RealHintExponent7Test)
|
10726 | 10737 | {
|
10727 | 10738 | RsslFloat testFloat;
|
@@ -10816,7 +10827,9 @@ TEST(realFloatIntConvertTest, RealHintExponent7Test)
|
10816 | 10827 | ASSERT_EQ(testReal.hint, rhExponent);
|
10817 | 10828 | ASSERT_EQ(testReal.value, (std::numeric_limits<RsslInt>::min)());
|
10818 | 10829 | }
|
| 10830 | +#endif |
10819 | 10831 |
|
| 10832 | +#ifndef DO_NOT_TEST_FLOAT |
10820 | 10833 | TEST(realFloatIntConvertTest, RealHintFraction_1Test)
|
10821 | 10834 | {
|
10822 | 10835 | RsslFloat testFloat;
|
@@ -10965,7 +10978,9 @@ TEST(realFloatIntConvertTest, RealHintFraction_1Test)
|
10965 | 10978 | ASSERT_EQ(testReal.hint, rhExponent);
|
10966 | 10979 | ASSERT_EQ(testReal.value, (std::numeric_limits<RsslInt>::min)());
|
10967 | 10980 | }
|
| 10981 | +#endif |
10968 | 10982 |
|
| 10983 | +#ifndef DO_NOT_TEST_FLOAT |
10969 | 10984 | TEST(realFloatIntConvertTest, RealHintFraction_256Test)
|
10970 | 10985 | {
|
10971 | 10986 | RsslFloat testFloat;
|
@@ -11060,6 +11075,7 @@ TEST(realFloatIntConvertTest, RealHintFraction_256Test)
|
11060 | 11075 | ASSERT_EQ(testReal.hint, rhExponent);
|
11061 | 11076 | ASSERT_EQ(testReal.value, (std::numeric_limits<RsslInt>::min)());
|
11062 | 11077 | }
|
| 11078 | +#endif |
11063 | 11079 |
|
11064 | 11080 | TEST(dateTimeStringToDateTimeTest, dateTimeStringValueRejected)
|
11065 | 11081 | {
|
|
0 commit comments