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
786564fa
Commit
786564fa
authored
Nov 23, 2015
by
Billy Donahue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #627 from mark-chromium/tests_msvs
Fix warnings encountered in MSVC build of gtest/gmock tests
parents
71a26ac6
4a8e5440
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
gmock-matchers_test.cc
googlemock/test/gmock-matchers_test.cc
+15
-13
gtest-port_test.cc
googletest/test/gtest-port_test.cc
+2
-2
No files found.
googlemock/test/gmock-matchers_test.cc
View file @
786564fa
...
@@ -2708,22 +2708,18 @@ class FloatingPointTest : public testing::Test {
...
@@ -2708,22 +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_
(
close_to_positive_zero_
(
AsBits
(
zero_bits_
+
max_ulps_
/
2
)),
Floating
::
ReinterpretBits
(
zero_bits_
+
max_ulps_
/
2
)),
close_to_negative_zero_
(
AsBits
(
zero_bits_
+
max_ulps_
-
max_ulps_
/
2
)),
close_to_negative_zero_
(
further_from_negative_zero_
(
-
AsBits
(
-
Floating
::
ReinterpretBits
(
zero_bits_
+
max_ulps_
-
max_ulps_
/
2
)),
further_from_negative_zero_
(
-
Floating
::
ReinterpretBits
(
zero_bits_
+
max_ulps_
+
1
-
max_ulps_
/
2
)),
zero_bits_
+
max_ulps_
+
1
-
max_ulps_
/
2
)),
close_to_one_
(
Floating
::
Reinterpret
Bits
(
one_bits_
+
max_ulps_
)),
close_to_one_
(
As
Bits
(
one_bits_
+
max_ulps_
)),
further_from_one_
(
Floating
::
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_
(
close_to_infinity_
(
AsBits
(
infinity_bits_
-
max_ulps_
)),
Floating
::
ReinterpretBits
(
infinity_bits_
-
max_ulps_
)),
further_from_infinity_
(
AsBits
(
infinity_bits_
-
max_ulps_
-
1
)),
further_from_infinity_
(
Floating
::
ReinterpretBits
(
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,6 +2800,12 @@ class FloatingPointTest : public testing::Test {
...
@@ -2804,6 +2800,12 @@ class FloatingPointTest : public testing::Test {
// Some NaNs.
// Some NaNs.
const
RawType
nan1_
;
const
RawType
nan1_
;
const
RawType
nan2_
;
const
RawType
nan2_
;
private
:
template
<
typename
T
>
static
RawType
AsBits
(
T
value
)
{
return
Floating
::
ReinterpretBits
(
static_cast
<
Bits
>
(
value
));
}
};
};
// Tests floating-point matchers with fixed epsilons.
// Tests floating-point matchers with fixed epsilons.
...
...
googletest/test/gtest-port_test.cc
View file @
786564fa
...
@@ -75,8 +75,8 @@ TEST(IsXDigitTest, WorksForNarrowAscii) {
...
@@ -75,8 +75,8 @@ TEST(IsXDigitTest, WorksForNarrowAscii) {
}
}
TEST
(
IsXDigitTest
,
ReturnsFalseForNarrowNonAscii
)
{
TEST
(
IsXDigitTest
,
ReturnsFalseForNarrowNonAscii
)
{
EXPECT_FALSE
(
IsXDigit
(
static_cast
<
char
>
(
0x80
)
));
EXPECT_FALSE
(
IsXDigit
(
'\x80'
));
EXPECT_FALSE
(
IsXDigit
(
static_cast
<
char
>
(
'0'
|
0x80
)));
EXPECT_FALSE
(
IsXDigit
(
static_cast
<
char
>
(
'0'
|
'\x80'
)));
}
}
TEST
(
IsXDigitTest
,
WorksForWideAscii
)
{
TEST
(
IsXDigitTest
,
WorksForWideAscii
)
{
...
...
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