Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
4a8e5440
Commit
4a8e5440
authored
Nov 12, 2015
by
Mark Mentovai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Name the helper AsBits()
parent
cfe466a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
gmock-matchers_test.cc
googlemock/test/gmock-matchers_test.cc
+10
-11
No files found.
googlemock/test/gmock-matchers_test.cc
View file @
4a8e5440
...
@@ -2708,19 +2708,18 @@ class FloatingPointTest : public testing::Test {
...
@@ -2708,19 +2708,18 @@ 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_
(
ReinterpretBits
(
zero_bits_
+
max_ulps_
/
2
)),
close_to_positive_zero_
(
AsBits
(
zero_bits_
+
max_ulps_
/
2
)),
close_to_negative_zero_
(
ReinterpretBits
(
close_to_negative_zero_
(
AsBits
(
zero_bits_
+
max_ulps_
-
max_ulps_
/
2
)),
zero_bits_
+
max_ulps_
-
max_ulps_
/
2
)),
further_from_negative_zero_
(
-
AsBits
(
further_from_negative_zero_
(
-
ReinterpretBits
(
zero_bits_
+
max_ulps_
+
1
-
max_ulps_
/
2
)),
zero_bits_
+
max_ulps_
+
1
-
max_ulps_
/
2
)),
close_to_one_
(
Reinterpret
Bits
(
one_bits_
+
max_ulps_
)),
close_to_one_
(
As
Bits
(
one_bits_
+
max_ulps_
)),
further_from_one_
(
Reinterpret
Bits
(
one_bits_
+
max_ulps_
+
1
)),
further_from_one_
(
As
Bits
(
one_bits_
+
max_ulps_
+
1
)),
infinity_
(
Floating
::
Infinity
()),
infinity_
(
Floating
::
Infinity
()),
close_to_infinity_
(
Reinterpret
Bits
(
infinity_bits_
-
max_ulps_
)),
close_to_infinity_
(
As
Bits
(
infinity_bits_
-
max_ulps_
)),
further_from_infinity_
(
Reinterpret
Bits
(
infinity_bits_
-
max_ulps_
-
1
)),
further_from_infinity_
(
As
Bits
(
infinity_bits_
-
max_ulps_
-
1
)),
max_
(
Floating
::
Max
()),
max_
(
Floating
::
Max
()),
nan1_
(
Floating
::
Reinterpret
Bits
(
Floating
::
kExponentBitMask
|
1
)),
nan1_
(
As
Bits
(
Floating
::
kExponentBitMask
|
1
)),
nan2_
(
Floating
::
Reinterpret
Bits
(
Floating
::
kExponentBitMask
|
200
))
{
nan2_
(
As
Bits
(
Floating
::
kExponentBitMask
|
200
))
{
}
}
void
TestSize
()
{
void
TestSize
()
{
...
@@ -2804,7 +2803,7 @@ class FloatingPointTest : public testing::Test {
...
@@ -2804,7 +2803,7 @@ class FloatingPointTest : public testing::Test {
private
:
private
:
template
<
typename
T
>
template
<
typename
T
>
static
RawType
Reinterpret
Bits
(
T
value
)
{
static
RawType
As
Bits
(
T
value
)
{
return
Floating
::
ReinterpretBits
(
static_cast
<
Bits
>
(
value
));
return
Floating
::
ReinterpretBits
(
static_cast
<
Bits
>
(
value
));
}
}
};
};
...
...
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