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