Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
cbce23fb
Commit
cbce23fb
authored
Nov 11, 2015
by
Mark Mentovai
Browse files
Leave decltype(max_ulps_) alone and cast, not sure this is better
parent
322a4914
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
googlemock/test/gmock-matchers_test.cc
googlemock/test/gmock-matchers_test.cc
+14
-12
No files found.
googlemock/test/gmock-matchers_test.cc
View file @
cbce23fb
...
@@ -2708,19 +2708,21 @@ class FloatingPointTest : public testing::Test {
...
@@ -2708,19 +2708,21 @@ class FloatingPointTest : public testing::Test {
zero_bits_
(
Floating
(
0
).
bits
()),
zero_bits_
(
Floating
(
0
).
bits
()),
one_bits_
(
Floating
(
1
).
bits
()),
one_bits_
(
Floating
(
1
).
bits
()),
infinity_bits_
(
Floating
(
Floating
::
Infinity
()).
bits
()),
infinity_bits_
(
Floating
(
Floating
::
Infinity
()).
bits
()),
close_to_positive_zero_
(
close_to_positive_zero_
(
Floating
::
ReinterpretBits
(
Floating
::
Reinterpret
Bits
(
zero_bits_
+
max_ulps_
/
2
)),
static_cast
<
Bits
>
(
zero_bits_
+
max_ulps_
/
2
))
)
,
close_to_negative_zero_
(
close_to_negative_zero_
(
-
Floating
::
ReinterpretBits
(
-
Floating
::
Reinterpret
Bits
(
zero_bits_
+
max_ulps_
-
max_ulps_
/
2
)),
static_cast
<
Bits
>
(
zero_bits_
+
max_ulps_
-
max_ulps_
/
2
))
)
,
further_from_negative_zero_
(
-
Floating
::
ReinterpretBits
(
further_from_negative_zero_
(
-
Floating
::
ReinterpretBits
(
zero_bits_
+
max_ulps_
+
1
-
max_ulps_
/
2
)),
static_cast
<
Bits
>
(
zero_bits_
+
max_ulps_
+
1
-
max_ulps_
/
2
))),
close_to_one_
(
Floating
::
ReinterpretBits
(
one_bits_
+
max_ulps_
)),
close_to_one_
(
Floating
::
ReinterpretBits
(
further_from_one_
(
Floating
::
ReinterpretBits
(
one_bits_
+
max_ulps_
+
1
)),
static_cast
<
Bits
>
(
one_bits_
+
max_ulps_
))),
further_from_one_
(
Floating
::
ReinterpretBits
(
static_cast
<
Bits
>
(
one_bits_
+
max_ulps_
+
1
))),
infinity_
(
Floating
::
Infinity
()),
infinity_
(
Floating
::
Infinity
()),
close_to_infinity_
(
close_to_infinity_
(
Floating
::
ReinterpretBits
(
Floating
::
Reinterpret
Bits
(
infinity_bits_
-
max_ulps_
)),
static_cast
<
Bits
>
(
infinity_bits_
-
max_ulps_
))
)
,
further_from_infinity_
(
further_from_infinity_
(
Floating
::
ReinterpretBits
(
Floating
::
Reinterpret
Bits
(
infinity_bits_
-
max_ulps_
-
1
)),
static_cast
<
Bits
>
(
infinity_bits_
-
max_ulps_
-
1
))
)
,
max_
(
Floating
::
Max
()),
max_
(
Floating
::
Max
()),
nan1_
(
Floating
::
ReinterpretBits
(
Floating
::
kExponentBitMask
|
1
)),
nan1_
(
Floating
::
ReinterpretBits
(
Floating
::
kExponentBitMask
|
1
)),
nan2_
(
Floating
::
ReinterpretBits
(
Floating
::
kExponentBitMask
|
200
))
{
nan2_
(
Floating
::
ReinterpretBits
(
Floating
::
kExponentBitMask
|
200
))
{
...
@@ -2778,7 +2780,7 @@ class FloatingPointTest : public testing::Test {
...
@@ -2778,7 +2780,7 @@ class FloatingPointTest : public testing::Test {
// Pre-calculated numbers to be used by the tests.
// Pre-calculated numbers to be used by the tests.
const
unsigned
in
t
max_ulps_
;
const
size_
t
max_ulps_
;
const
Bits
zero_bits_
;
// The bits that represent 0.0.
const
Bits
zero_bits_
;
// The bits that represent 0.0.
const
Bits
one_bits_
;
// The bits that represent 1.0.
const
Bits
one_bits_
;
// The bits that represent 1.0.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment