File tree 1 file changed +16
-0
lines changed 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -96,21 +96,37 @@ TEST_CASE(
96
96
SECTION (" Hex float to string (print a comment)" )
97
97
{
98
98
const float value = std::strtod (" 0x1p+37f" , nullptr );
99
+ #ifndef _MSC_VER
99
100
REQUIRE (
100
101
floating_point_to_java_string (value) == " 0x1p+37f /* 1.37439e+11 */" );
102
+ #else
103
+ REQUIRE (
104
+ floating_point_to_java_string (value) == " 0x1.000000p+37f /* 1.37439e+11 */" );
105
+ #endif
101
106
}
102
107
103
108
SECTION (" Hex double to string (print a comment)" )
104
109
{
105
110
const double value = std::strtod (" 0x1p+37f" , nullptr );
111
+ #ifndef _MSC_VER
106
112
REQUIRE (
107
113
floating_point_to_java_string (value) == " 0x1p+37 /* 1.37439e+11 */" );
114
+ #else
115
+ REQUIRE (
116
+ floating_point_to_java_string (value) == " 0x1.000000p+37 /* 1.37439e+11 */" );
117
+ #endif
108
118
}
109
119
110
120
SECTION (" Beyond numeric limits" )
111
121
{
122
+ #if 0
112
123
REQUIRE(
113
124
floating_point_to_java_string(-5.56268e-309)
114
125
.find("/* -5.56268e-309 */") != std::string::npos);
126
+ #else
127
+ REQUIRE (
128
+ floating_point_to_java_string (-5.56268e-309 ) ==
129
+ " -5.56268e-309 /* -5.56268e-309 */" );
130
+ #endif
115
131
}
116
132
}
You can’t perform that action at this time.
0 commit comments