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
e1622337
Commit
e1622337
authored
Feb 27, 2018
by
Xiaoyi Zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'variant_matcher' of
https://github.com/zhangxy988/googletest
into variant_matcher
parents
62be6f34
576d689c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
147 additions
and
82 deletions
+147
-82
gmock-matchers.h
googlemock/include/gmock/gmock-matchers.h
+0
-0
gmock-matchers.cc
googlemock/src/gmock-matchers.cc
+119
-77
gmock_link_test.h
googlemock/test/gmock_link_test.h
+22
-2
internal_utils.cmake
googletest/cmake/internal_utils.cmake
+1
-1
gtest-port.h
googletest/include/gtest/internal/gtest-port.h
+5
-2
No files found.
googlemock/include/gmock/gmock-matchers.h
View file @
e1622337
This diff is collapsed.
Click to expand it.
googlemock/src/gmock-matchers.cc
View file @
e1622337
This diff is collapsed.
Click to expand it.
googlemock/test/gmock_link_test.h
View file @
e1622337
...
...
@@ -120,13 +120,15 @@
# include <errno.h>
#endif
#include "gmock/internal/gmock-port.h"
#include "gtest/gtest.h"
#include <iostream>
#include <vector>
#include "gtest/gtest.h"
#include "gtest/internal/gtest-port.h"
using
testing
::
_
;
using
testing
::
A
;
using
testing
::
Action
;
using
testing
::
AllOf
;
using
testing
::
AnyOf
;
using
testing
::
Assign
;
...
...
@@ -148,6 +150,8 @@ using testing::Invoke;
using
testing
::
InvokeArgument
;
using
testing
::
InvokeWithoutArgs
;
using
testing
::
IsNull
;
using
testing
::
IsSubsetOf
;
using
testing
::
IsSupersetOf
;
using
testing
::
Le
;
using
testing
::
Lt
;
using
testing
::
Matcher
;
...
...
@@ -592,6 +596,22 @@ TEST(LinkTest, TestMatcherElementsAreArray) {
ON_CALL
(
mock
,
VoidFromVector
(
ElementsAreArray
(
arr
))).
WillByDefault
(
Return
());
}
// Tests the linkage of the IsSubsetOf matcher.
TEST
(
LinkTest
,
TestMatcherIsSubsetOf
)
{
Mock
mock
;
char
arr
[]
=
{
'a'
,
'b'
};
ON_CALL
(
mock
,
VoidFromVector
(
IsSubsetOf
(
arr
))).
WillByDefault
(
Return
());
}
// Tests the linkage of the IsSupersetOf matcher.
TEST
(
LinkTest
,
TestMatcherIsSupersetOf
)
{
Mock
mock
;
char
arr
[]
=
{
'a'
,
'b'
};
ON_CALL
(
mock
,
VoidFromVector
(
IsSupersetOf
(
arr
))).
WillByDefault
(
Return
());
}
// Tests the linkage of the ContainerEq matcher.
TEST
(
LinkTest
,
TestMatcherContainerEq
)
{
Mock
mock
;
...
...
googletest/cmake/internal_utils.cmake
View file @
e1622337
...
...
@@ -91,7 +91,7 @@ macro(config_compiler_and_linker)
set
(
cxx_base_flags
"
${
cxx_base_flags
}
-D_UNICODE -DUNICODE -DWIN32 -D_WIN32"
)
set
(
cxx_base_flags
"
${
cxx_base_flags
}
-DSTRICT -DWIN32_LEAN_AND_MEAN"
)
set
(
cxx_exception_flags
"-EHsc -D_HAS_EXCEPTIONS=1"
)
set
(
cxx_no_exception_flags
"-D_HAS_EXCEPTIONS=0"
)
set
(
cxx_no_exception_flags
"-
EHs-c- -
D_HAS_EXCEPTIONS=0"
)
set
(
cxx_no_rtti_flags
"-GR-"
)
elseif
(
CMAKE_COMPILER_IS_GNUCXX
)
set
(
cxx_base_flags
"-Wall -Wshadow -Werror"
)
...
...
googletest/include/gtest/internal/gtest-port.h
View file @
e1622337
...
...
@@ -471,8 +471,11 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#ifndef GTEST_HAS_EXCEPTIONS
// The user didn't tell us whether exceptions are enabled, so we need
// to figure it out.
# if defined(_MSC_VER) || defined(__BORLANDC__)
// MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS
# if defined(_MSC_VER) && defined(_CPPUNWIND)
// MSVC defines _CPPUNWIND to 1 iff exceptions are enabled.
# define GTEST_HAS_EXCEPTIONS 1
# elif defined(__BORLANDC__)
// C++Builder's implementation of the STL uses the _HAS_EXCEPTIONS
// macro to enable exceptions, so we'll do the same.
// Assumes that exceptions are enabled by default.
# ifndef _HAS_EXCEPTIONS
...
...
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