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
e1dd4983
Commit
e1dd4983
authored
Nov 22, 2019
by
Krystian Kuzniarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove g++ 2.95.0 workaround: no space after first comma in macros
parent
f9665846
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
gtest_unittest.cc
googletest/test/gtest_unittest.cc
+3
-9
No files found.
googletest/test/gtest_unittest.cc
View file @
e1dd4983
...
@@ -2924,22 +2924,18 @@ TEST_F(FloatTest, Commutative) {
...
@@ -2924,22 +2924,18 @@ TEST_F(FloatTest, Commutative) {
TEST_F
(
FloatTest
,
EXPECT_NEAR
)
{
TEST_F
(
FloatTest
,
EXPECT_NEAR
)
{
EXPECT_NEAR
(
-
1.0
f
,
-
1.1
f
,
0.2
f
);
EXPECT_NEAR
(
-
1.0
f
,
-
1.1
f
,
0.2
f
);
EXPECT_NEAR
(
2.0
f
,
3.0
f
,
1.0
f
);
EXPECT_NEAR
(
2.0
f
,
3.0
f
,
1.0
f
);
EXPECT_NONFATAL_FAILURE
(
EXPECT_NEAR
(
1.0
f
,
1.5
f
,
0.25
f
),
// NOLINT
EXPECT_NONFATAL_FAILURE
(
EXPECT_NEAR
(
1.0
f
,
1.5
f
,
0.25
f
),
// NOLINT
"The difference between 1.0f and 1.5f is 0.5, "
"The difference between 1.0f and 1.5f is 0.5, "
"which exceeds 0.25f"
);
"which exceeds 0.25f"
);
// To work around a bug in gcc 2.95.0, there is intentionally no
// space after the first comma in the previous line.
}
}
// Tests ASSERT_NEAR.
// Tests ASSERT_NEAR.
TEST_F
(
FloatTest
,
ASSERT_NEAR
)
{
TEST_F
(
FloatTest
,
ASSERT_NEAR
)
{
ASSERT_NEAR
(
-
1.0
f
,
-
1.1
f
,
0.2
f
);
ASSERT_NEAR
(
-
1.0
f
,
-
1.1
f
,
0.2
f
);
ASSERT_NEAR
(
2.0
f
,
3.0
f
,
1.0
f
);
ASSERT_NEAR
(
2.0
f
,
3.0
f
,
1.0
f
);
EXPECT_FATAL_FAILURE
(
ASSERT_NEAR
(
1.0
f
,
1.5
f
,
0.25
f
),
// NOLINT
EXPECT_FATAL_FAILURE
(
ASSERT_NEAR
(
1.0
f
,
1.5
f
,
0.25
f
),
// NOLINT
"The difference between 1.0f and 1.5f is 0.5, "
"The difference between 1.0f and 1.5f is 0.5, "
"which exceeds 0.25f"
);
"which exceeds 0.25f"
);
// To work around a bug in gcc 2.95.0, there is intentionally no
// space after the first comma in the previous line.
}
}
// Tests the cases where FloatLE() should succeed.
// Tests the cases where FloatLE() should succeed.
...
@@ -4314,10 +4310,8 @@ TEST(AssertionWithMessageTest, ASSERT_STR) {
...
@@ -4314,10 +4310,8 @@ TEST(AssertionWithMessageTest, ASSERT_STR) {
TEST
(
AssertionWithMessageTest
,
ASSERT_FLOATING
)
{
TEST
(
AssertionWithMessageTest
,
ASSERT_FLOATING
)
{
ASSERT_FLOAT_EQ
(
1
,
1
)
<<
"This should succeed."
;
ASSERT_FLOAT_EQ
(
1
,
1
)
<<
"This should succeed."
;
ASSERT_DOUBLE_EQ
(
1
,
1
)
<<
"This should succeed."
;
ASSERT_DOUBLE_EQ
(
1
,
1
)
<<
"This should succeed."
;
EXPECT_FATAL_FAILURE
(
ASSERT_NEAR
(
1
,
1.2
,
0.1
)
<<
"Expect failure."
,
// NOLINT
EXPECT_FATAL_FAILURE
(
ASSERT_NEAR
(
1
,
1.2
,
0.1
)
<<
"Expect failure."
,
// NOLINT
"Expect failure."
);
"Expect failure."
);
// To work around a bug in gcc 2.95.0, there is intentionally no
// space after the first comma in the previous statement.
}
}
// Tests using ASSERT_FALSE with a streamed message.
// Tests using ASSERT_FALSE with a streamed message.
...
...
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