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
fe112cfe
Commit
fe112cfe
authored
Oct 11, 2019
by
Joshua Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace compile-test with preprocessor test
parent
d935e8e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
gmock-function-mocker_test.cc
googlemock/test/gmock-function-mocker_test.cc
+0
-7
gmock-pp_test.cc
googlemock/test/gmock-pp_test.cc
+11
-0
No files found.
googlemock/test/gmock-function-mocker_test.cc
View file @
fe112cfe
...
@@ -656,12 +656,5 @@ TEST(MockMethodMockFunctionTest, MockMethodSizeOverhead) {
...
@@ -656,12 +656,5 @@ TEST(MockMethodMockFunctionTest, MockMethodSizeOverhead) {
EXPECT_EQ
(
sizeof
(
MockMethodSizes0
),
sizeof
(
MockMethodSizes4
));
EXPECT_EQ
(
sizeof
(
MockMethodSizes0
),
sizeof
(
MockMethodSizes4
));
}
}
// TODO(thejcannon): This just tests that this will compile, as gmock repeating the
// noexcept specifier isn't supported yet
struct
MockUsesNoexceptWithParenthesis
{
MOCK_METHOD
(
void
,
func
,
(),
(
noexcept
(
false
)));
};
}
// namespace gmock_function_mocker_test
}
// namespace gmock_function_mocker_test
}
// namespace testing
}
// namespace testing
googlemock/test/gmock-pp_test.cc
View file @
fe112cfe
#include "gmock/internal/gmock-pp.h"
#include "gmock/internal/gmock-pp.h"
// Used to test MSVC treating __VA_ARGS__ with a comma in it as one value
#define GMOCK_TEST_REPLACE_comma_WITH_COMMA_I_comma ,
#define GMOCK_TEST_REPLACE_comma_WITH_COMMA(x) \
GMOCK_PP_CAT(GMOCK_TEST_REPLACE_comma_WITH_COMMA_I_, x)
// Static assertions.
// Static assertions.
namespace
testing
{
namespace
testing
{
namespace
internal
{
namespace
internal
{
...
@@ -17,6 +22,12 @@ static_assert(GMOCK_PP_NARG(x, y, z, w) == 4, "");
...
@@ -17,6 +22,12 @@ static_assert(GMOCK_PP_NARG(x, y, z, w) == 4, "");
static_assert
(
!
GMOCK_PP_HAS_COMMA
(),
""
);
static_assert
(
!
GMOCK_PP_HAS_COMMA
(),
""
);
static_assert
(
GMOCK_PP_HAS_COMMA
(
b
,
),
""
);
static_assert
(
GMOCK_PP_HAS_COMMA
(
b
,
),
""
);
static_assert
(
!
GMOCK_PP_HAS_COMMA
((,
)),
""
);
static_assert
(
!
GMOCK_PP_HAS_COMMA
((,
)),
""
);
static_assert
(
GMOCK_PP_HAS_COMMA
(
GMOCK_TEST_REPLACE_comma_WITH_COMMA
(
comma
)),
""
);
static_assert
(
GMOCK_PP_HAS_COMMA
(
GMOCK_TEST_REPLACE_comma_WITH_COMMA
(
comma
(
unrelated
))),
""
);
static_assert
(
GMOCK_PP_HAS_COMMA
((,
)),
""
);
static_assert
(
!
GMOCK_PP_IS_EMPTY
(,
),
""
);
static_assert
(
!
GMOCK_PP_IS_EMPTY
(,
),
""
);
static_assert
(
!
GMOCK_PP_IS_EMPTY
(
a
),
""
);
static_assert
(
!
GMOCK_PP_IS_EMPTY
(
a
),
""
);
static_assert
(
!
GMOCK_PP_IS_EMPTY
(()),
""
);
static_assert
(
!
GMOCK_PP_IS_EMPTY
(()),
""
);
...
...
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