Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
96d16157
Unverified
Commit
96d16157
authored
Oct 16, 2018
by
Jonathan Wendeborn
Browse files
Merge branch 'isnice' of
https://github.com/BrukerJWD/googletest
into isnice
parents
386391b0
8c82ba48
Changes
145
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
719 additions
and
248 deletions
+719
-248
googlemock/include/gmock/gmock-more-actions.h
googlemock/include/gmock/gmock-more-actions.h
+11
-10
googlemock/include/gmock/gmock-more-matchers.h
googlemock/include/gmock/gmock-more-matchers.h
+39
-5
googlemock/include/gmock/gmock-spec-builders.h
googlemock/include/gmock/gmock-spec-builders.h
+187
-115
googlemock/include/gmock/gmock.h
googlemock/include/gmock/gmock.h
+5
-3
googlemock/include/gmock/internal/custom/README.md
googlemock/include/gmock/internal/custom/README.md
+16
-0
googlemock/include/gmock/internal/custom/gmock-generated-actions.h
...k/include/gmock/internal/custom/gmock-generated-actions.h
+2
-0
googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump
...lude/gmock/internal/custom/gmock-generated-actions.h.pump
+3
-1
googlemock/include/gmock/internal/custom/gmock-matchers.h
googlemock/include/gmock/internal/custom/gmock-matchers.h
+5
-8
googlemock/include/gmock/internal/custom/gmock-port.h
googlemock/include/gmock/internal/custom/gmock-port.h
+3
-10
googlemock/include/gmock/internal/gmock-generated-internal-utils.h
...k/include/gmock/internal/gmock-generated-internal-utils.h
+36
-37
googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump
...lude/gmock/internal/gmock-generated-internal-utils.h.pump
+7
-6
googlemock/include/gmock/internal/gmock-internal-utils.h
googlemock/include/gmock/internal/gmock-internal-utils.h
+81
-16
googlemock/include/gmock/internal/gmock-port.h
googlemock/include/gmock/internal/gmock-port.h
+10
-13
googlemock/msvc/2010/gmock.sln
googlemock/msvc/2010/gmock.sln
+14
-0
googlemock/msvc/2010/gmock.vcxproj
googlemock/msvc/2010/gmock.vcxproj
+69
-6
googlemock/msvc/2010/gmock_config.props
googlemock/msvc/2010/gmock_config.props
+2
-2
googlemock/msvc/2010/gmock_main.vcxproj
googlemock/msvc/2010/gmock_main.vcxproj
+69
-6
googlemock/msvc/2010/gmock_test.vcxproj
googlemock/msvc/2010/gmock_test.vcxproj
+83
-8
googlemock/msvc/2015/gmock.sln
googlemock/msvc/2015/gmock.sln
+14
-0
googlemock/msvc/2015/gmock.vcxproj
googlemock/msvc/2015/gmock.vcxproj
+63
-2
No files found.
Too many changes to show.
To preserve performance only
145 of 145+
files are displayed.
Plain diff
Email patch
googlemock/include/gmock/gmock-more-actions.h
View file @
96d16157
...
...
@@ -26,13 +26,14 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
// This file implements some actions that depend on gmock-generated-actions.h.
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
...
...
@@ -161,7 +162,7 @@ WithArg(const InnerAction& action) {
ACTION_TEMPLATE
(
ReturnArg
,
HAS_1_TEMPLATE_PARAMS
(
int
,
k
),
AND_0_VALUE_PARAMS
())
{
return
::
testing
::
get
<
k
>
(
args
);
return
::
std
::
get
<
k
>
(
args
);
}
// Action SaveArg<k>(pointer) saves the k-th (0-based) argument of the
...
...
@@ -169,7 +170,7 @@ ACTION_TEMPLATE(ReturnArg,
ACTION_TEMPLATE
(
SaveArg
,
HAS_1_TEMPLATE_PARAMS
(
int
,
k
),
AND_1_VALUE_PARAMS
(
pointer
))
{
*
pointer
=
::
testing
::
get
<
k
>
(
args
);
*
pointer
=
::
std
::
get
<
k
>
(
args
);
}
// Action SaveArgPointee<k>(pointer) saves the value pointed to
...
...
@@ -177,7 +178,7 @@ ACTION_TEMPLATE(SaveArg,
ACTION_TEMPLATE
(
SaveArgPointee
,
HAS_1_TEMPLATE_PARAMS
(
int
,
k
),
AND_1_VALUE_PARAMS
(
pointer
))
{
*
pointer
=
*::
testing
::
get
<
k
>
(
args
);
*
pointer
=
*::
std
::
get
<
k
>
(
args
);
}
// Action SetArgReferee<k>(value) assigns 'value' to the variable
...
...
@@ -185,13 +186,13 @@ ACTION_TEMPLATE(SaveArgPointee,
ACTION_TEMPLATE
(
SetArgReferee
,
HAS_1_TEMPLATE_PARAMS
(
int
,
k
),
AND_1_VALUE_PARAMS
(
value
))
{
typedef
typename
::
testing
::
tuple_element
<
k
,
args_type
>::
type
argk_type
;
typedef
typename
::
std
::
tuple_element
<
k
,
args_type
>::
type
argk_type
;
// Ensures that argument #k is a reference. If you get a compiler
// error on the next line, you are using SetArgReferee<k>(value) in
// a mock function whose k-th (0-based) argument is not a reference.
GTEST_COMPILE_ASSERT_
(
internal
::
is_reference
<
argk_type
>::
value
,
SetArgReferee_must_be_used_with_a_reference_argument
);
::
testing
::
get
<
k
>
(
args
)
=
value
;
::
std
::
get
<
k
>
(
args
)
=
value
;
}
// Action SetArrayArgument<k>(first, last) copies the elements in
...
...
@@ -204,9 +205,9 @@ ACTION_TEMPLATE(SetArrayArgument,
AND_2_VALUE_PARAMS
(
first
,
last
))
{
// Visual Studio deprecates ::std::copy, so we use our own copy in that case.
#ifdef _MSC_VER
internal
::
CopyElements
(
first
,
last
,
::
testing
::
get
<
k
>
(
args
));
internal
::
CopyElements
(
first
,
last
,
::
std
::
get
<
k
>
(
args
));
#else
::
std
::
copy
(
first
,
last
,
::
testing
::
get
<
k
>
(
args
));
::
std
::
copy
(
first
,
last
,
::
std
::
get
<
k
>
(
args
));
#endif
}
...
...
@@ -215,7 +216,7 @@ ACTION_TEMPLATE(SetArrayArgument,
ACTION_TEMPLATE
(
DeleteArg
,
HAS_1_TEMPLATE_PARAMS
(
int
,
k
),
AND_0_VALUE_PARAMS
())
{
delete
::
testing
::
get
<
k
>
(
args
);
delete
::
std
::
get
<
k
>
(
args
);
}
// This action returns the value pointed to by 'pointer'.
...
...
googlemock/include/gmock/gmock-more-matchers.h
View file @
96d16157
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: marcus.boerger@google.com (Marcus Boerger)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
@@ -36,13 +35,27 @@
// Note that tests are implemented in gmock-matchers_test.cc rather than
// gmock-more-matchers-test.cc.
#ifndef GMOCK_GMOCK_MORE_MATCHERS_H_
#define GMOCK_GMOCK_MORE_MATCHERS_H_
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_
#define GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_
#include "gmock/gmock-generated-matchers.h"
namespace
testing
{
// Silence C4100 (unreferenced formal
// parameter) for MSVC
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable:4100)
#if (_MSC_VER == 1900)
// and silence C4800 (C4800: 'int *const ': forcing value
// to bool 'true' or 'false') for MSVC 14
# pragma warning(disable:4800)
#endif
#endif
// Defines a matcher that matches an empty container. The container must
// support both size() and empty(), which all STL-like containers provide.
MATCHER
(
IsEmpty
,
negation
?
"isn't empty"
:
"is empty"
)
{
...
...
@@ -53,6 +66,27 @@ MATCHER(IsEmpty, negation ? "isn't empty" : "is empty") {
return
false
;
}
// Define a matcher that matches a value that evaluates in boolean
// context to true. Useful for types that define "explicit operator
// bool" operators and so can't be compared for equality with true
// and false.
MATCHER
(
IsTrue
,
negation
?
"is false"
:
"is true"
)
{
return
static_cast
<
bool
>
(
arg
);
}
// Define a matcher that matches a value that evaluates in boolean
// context to false. Useful for types that define "explicit operator
// bool" operators and so can't be compared for equality with true
// and false.
MATCHER
(
IsFalse
,
negation
?
"is true"
:
"is false"
)
{
return
!
static_cast
<
bool
>
(
arg
);
}
#ifdef _MSC_VER
# pragma warning(pop)
#endif
}
// namespace testing
#endif // GMOCK_GMOCK_MORE_MATCHERS_H_
#endif // GMOCK_
INCLUDE_
GMOCK_MORE_MATCHERS_H_
googlemock/include/gmock/gmock-spec-builders.h
View file @
96d16157
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
@@ -57,6 +56,8 @@
// where all clauses are optional, and .InSequence()/.After()/
// .WillOnce() can appear any number of times.
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
...
...
@@ -65,11 +66,6 @@
#include <sstream>
#include <string>
#include <vector>
#if GTEST_HAS_EXCEPTIONS
# include <stdexcept> // NOLINT
#endif
#include "gmock/gmock-actions.h"
#include "gmock/gmock-cardinalities.h"
#include "gmock/gmock-matchers.h"
...
...
@@ -77,6 +73,13 @@
#include "gmock/internal/gmock-port.h"
#include "gtest/gtest.h"
#if GTEST_HAS_EXCEPTIONS
# include <stdexcept> // NOLINT
#endif
GTEST_DISABLE_MSC_WARNINGS_PUSH_
(
4251
\
/* class A needs to have dll-interface to be used by clients of class B */
)
namespace
testing
{
// An abstract handle of an expectation.
...
...
@@ -148,15 +151,13 @@ class GTEST_API_ UntypedFunctionMockerBase {
// action fails.
// L = *
virtual
UntypedActionResultHolderBase
*
UntypedPerformDefaultAction
(
const
void
*
untyped_args
,
const
string
&
call_description
)
const
=
0
;
void
*
untyped_args
,
const
std
::
string
&
call_description
)
const
=
0
;
// Performs the given action with the given arguments and returns
// the action's result.
// L = *
virtual
UntypedActionResultHolderBase
*
UntypedPerformAction
(
const
void
*
untyped_action
,
const
void
*
untyped_args
)
const
=
0
;
const
void
*
untyped_action
,
void
*
untyped_args
)
const
=
0
;
// Writes a message that the call is uninteresting (i.e. neither
// explicitly expected nor explicitly unexpected) to the given
...
...
@@ -186,7 +187,7 @@ class GTEST_API_ UntypedFunctionMockerBase {
// this information in the global mock registry. Will be called
// whenever an EXPECT_CALL() or ON_CALL() is executed on this mock
// method.
//
TODO(wan@google.com)
: rename to SetAndRegisterOwner().
//
FIXME
: rename to SetAndRegisterOwner().
void
RegisterOwner
(
const
void
*
mock_obj
)
GTEST_LOCK_EXCLUDED_
(
g_gmock_mutex
);
...
...
@@ -211,9 +212,8 @@ class GTEST_API_ UntypedFunctionMockerBase {
// arguments. This function can be safely called from multiple
// threads concurrently. The caller is responsible for deleting the
// result.
UntypedActionResultHolderBase
*
UntypedInvokeWith
(
const
void
*
untyped_args
)
GTEST_LOCK_EXCLUDED_
(
g_gmock_mutex
);
UntypedActionResultHolderBase
*
UntypedInvokeWith
(
void
*
untyped_args
)
GTEST_LOCK_EXCLUDED_
(
g_gmock_mutex
);
protected:
typedef
std
::
vector
<
const
void
*>
UntypedOnCallSpecs
;
...
...
@@ -238,6 +238,14 @@ class GTEST_API_ UntypedFunctionMockerBase {
UntypedOnCallSpecs
untyped_on_call_specs_
;
// All expectations for this function mocker.
//
// It's undefined behavior to interleave expectations (EXPECT_CALLs
// or ON_CALLs) and mock function calls. Also, the order of
// expectations is important. Therefore it's a logic race condition
// to read/write untyped_expectations_ concurrently. In order for
// tools like tsan to catch concurrent read/write accesses to
// untyped_expectations, we deliberately leave accesses to it
// unprotected.
UntypedExpectations
untyped_expectations_
;
};
// class UntypedFunctionMockerBase
...
...
@@ -263,12 +271,14 @@ class UntypedOnCallSpecBase {
};
// Asserts that the ON_CALL() statement has a certain property.
void
AssertSpecProperty
(
bool
property
,
const
string
&
failure_message
)
const
{
void
AssertSpecProperty
(
bool
property
,
const
std
::
string
&
failure_message
)
const
{
Assert
(
property
,
file_
,
line_
,
failure_message
);
}
// Expects that the ON_CALL() statement has a certain property.
void
ExpectSpecProperty
(
bool
property
,
const
string
&
failure_message
)
const
{
void
ExpectSpecProperty
(
bool
property
,
const
std
::
string
&
failure_message
)
const
{
Expect
(
property
,
file_
,
line_
,
failure_message
);
}
...
...
@@ -362,7 +372,6 @@ enum CallReaction {
kAllow
,
kWarn
,
kFail
,
kDefault
=
kWarn
// By default, warn about uninteresting calls.
};
}
// namespace internal
...
...
@@ -700,7 +709,7 @@ GTEST_API_ extern ThreadLocal<Sequence*> g_gmock_implicit_sequence;
class
GTEST_API_
ExpectationBase
{
public:
// source_text is the EXPECT_CALL(...) source that created this Expectation.
ExpectationBase
(
const
char
*
file
,
int
line
,
const
string
&
source_text
);
ExpectationBase
(
const
char
*
file
,
int
line
,
const
std
::
string
&
source_text
);
virtual
~
ExpectationBase
();
...
...
@@ -748,12 +757,14 @@ class GTEST_API_ ExpectationBase {
virtual
Expectation
GetHandle
()
=
0
;
// Asserts that the EXPECT_CALL() statement has the given property.
void
AssertSpecProperty
(
bool
property
,
const
string
&
failure_message
)
const
{
void
AssertSpecProperty
(
bool
property
,
const
std
::
string
&
failure_message
)
const
{
Assert
(
property
,
file_
,
line_
,
failure_message
);
}
// Expects that the EXPECT_CALL() statement has the given property.
void
ExpectSpecProperty
(
bool
property
,
const
string
&
failure_message
)
const
{
void
ExpectSpecProperty
(
bool
property
,
const
std
::
string
&
failure_message
)
const
{
Expect
(
property
,
file_
,
line_
,
failure_message
);
}
...
...
@@ -855,7 +866,7 @@ class GTEST_API_ ExpectationBase {
// an EXPECT_CALL() statement finishes.
const
char
*
file_
;
// The file that contains the expectation.
int
line_
;
// The line number of the expectation.
const
string
source_text_
;
// The EXPECT_CALL(...) source text.
const
std
::
string
source_text_
;
// The EXPECT_CALL(...) source text.
// True iff the cardinality is specified explicitly.
bool
cardinality_specified_
;
Cardinality
cardinality_
;
// The cardinality of the expectation.
...
...
@@ -890,8 +901,8 @@ class TypedExpectation : public ExpectationBase {
typedef
typename
Function
<
F
>::
ArgumentMatcherTuple
ArgumentMatcherTuple
;
typedef
typename
Function
<
F
>::
Result
Result
;
TypedExpectation
(
FunctionMockerBase
<
F
>*
owner
,
const
char
*
a_file
,
int
a_line
,
const
string
&
a_source_text
,
TypedExpectation
(
FunctionMockerBase
<
F
>*
owner
,
const
char
*
a_file
,
int
a_line
,
const
std
::
string
&
a_source_text
,
const
ArgumentMatcherTuple
&
m
)
:
ExpectationBase
(
a_file
,
a_line
,
a_source_text
),
owner_
(
owner
),
...
...
@@ -1183,9 +1194,10 @@ class TypedExpectation : public ExpectationBase {
Log
(
kWarning
,
ss
.
str
(),
1
);
}
return
count
<=
action_count
?
*
static_cast
<
const
Action
<
F
>*>
(
untyped_actions_
[
count
-
1
])
:
repeated_action
();
return
count
<=
action_count
?
*
static_cast
<
const
Action
<
F
>*>
(
untyped_actions_
[
static_cast
<
size_t
>
(
count
-
1
)])
:
repeated_action
();
}
// Given the arguments of a mock function call, if the call will
...
...
@@ -1209,10 +1221,10 @@ class TypedExpectation : public ExpectationBase {
mocker
->
DescribeDefaultActionTo
(
args
,
what
);
DescribeCallCountTo
(
why
);
//
TODO(wan@google.com)
: allow the user to control whether
//
FIXME
: allow the user to control whether
// unexpected calls should fail immediately or continue using a
// flag --gmock_unexpected_calls_are_fatal.
return
NULL
;
return
nullptr
;
}
IncrementCallCount
();
...
...
@@ -1250,7 +1262,7 @@ class TypedExpectation : public ExpectationBase {
// Logs a message including file and line number information.
GTEST_API_
void
LogWithLocation
(
testing
::
internal
::
LogSeverity
severity
,
const
char
*
file
,
int
line
,
const
string
&
message
);
const
std
::
string
&
message
);
template
<
typename
F
>
class
MockSpec
{
...
...
@@ -1261,15 +1273,16 @@ class MockSpec {
// Constructs a MockSpec object, given the function mocker object
// that the spec is associated with.
explicit
MockSpec
(
internal
::
FunctionMockerBase
<
F
>*
function_mocker
)
:
function_mocker_
(
function_mocker
)
{}
MockSpec
(
internal
::
FunctionMockerBase
<
F
>*
function_mocker
,
const
ArgumentMatcherTuple
&
matchers
)
:
function_mocker_
(
function_mocker
),
matchers_
(
matchers
)
{}
// Adds a new default action spec to the function mocker and returns
// the newly created spec.
internal
::
OnCallSpec
<
F
>&
InternalDefaultActionSetAt
(
const
char
*
file
,
int
line
,
const
char
*
obj
,
const
char
*
call
)
{
LogWithLocation
(
internal
::
kInfo
,
file
,
line
,
string
(
"ON_CALL("
)
+
obj
+
", "
+
call
+
") invoked"
);
std
::
string
(
"ON_CALL("
)
+
obj
+
", "
+
call
+
") invoked"
);
return
function_mocker_
->
AddNewOnCallSpec
(
file
,
line
,
matchers_
);
}
...
...
@@ -1277,20 +1290,24 @@ class MockSpec {
// the newly created spec.
internal
::
TypedExpectation
<
F
>&
InternalExpectedAt
(
const
char
*
file
,
int
line
,
const
char
*
obj
,
const
char
*
call
)
{
const
string
source_text
(
string
(
"EXPECT_CALL("
)
+
obj
+
", "
+
call
+
")"
);
const
std
::
string
source_text
(
std
::
string
(
"EXPECT_CALL("
)
+
obj
+
", "
+
call
+
")"
);
LogWithLocation
(
internal
::
kInfo
,
file
,
line
,
source_text
+
" invoked"
);
return
function_mocker_
->
AddNewExpectation
(
file
,
line
,
source_text
,
matchers_
);
}
// This operator overload is used to swallow the superfluous parameter list
// introduced by the ON/EXPECT_CALL macros. See the macro comments for more
// explanation.
MockSpec
<
F
>&
operator
()(
const
internal
::
WithoutMatchers
&
,
void
*
const
)
{
return
*
this
;
}
private:
template
<
typename
Function
>
friend
class
internal
::
FunctionMocker
;
void
SetMatchers
(
const
ArgumentMatcherTuple
&
matchers
)
{
matchers_
=
matchers
;
}
// The function mocker that owns this spec.
internal
::
FunctionMockerBase
<
F
>*
const
function_mocker_
;
// The argument matchers specified in the spec.
...
...
@@ -1354,11 +1371,7 @@ class ReferenceOrValueWrapper<T&> {
// we need to temporarily disable the warning. We have to do it for
// the entire class to suppress the warning, even though it's about
// the constructor only.
#ifdef _MSC_VER
# pragma warning(push) // Saves the current warning state.
# pragma warning(disable:4355) // Temporarily disables warning 4355.
#endif // _MSV_VER
GTEST_DISABLE_MSC_WARNINGS_PUSH_
(
4355
)
// C++ treats the void type specially. For example, you cannot define
// a void-typed variable or pass a void value to a function.
...
...
@@ -1398,19 +1411,20 @@ class ActionResultHolder : public UntypedActionResultHolderBase {
template
<
typename
F
>
static
ActionResultHolder
*
PerformDefaultAction
(
const
FunctionMockerBase
<
F
>*
func_mocker
,
const
typename
Function
<
F
>::
ArgumentTuple
&
args
,
const
string
&
call_description
)
{
return
new
ActionResultHolder
(
Wrapper
(
func_mocker
->
PerformDefaultAction
(
args
,
call_description
)));
typename
RvalueRef
<
typename
Function
<
F
>::
ArgumentTuple
>::
type
args
,
const
std
::
string
&
call_description
)
{
return
new
ActionResultHolder
(
Wrapper
(
func_mocker
->
PerformDefaultAction
(
internal
::
move
(
args
)
,
call_description
)));
}
// Performs the given action and returns the result in a new-ed
// ActionResultHolder.
template
<
typename
F
>
static
ActionResultHolder
*
PerformAction
(
const
Action
<
F
>&
action
,
const
typename
Function
<
F
>::
ArgumentTuple
&
args
)
{
return
new
ActionResultHolder
(
Wrapper
(
action
.
Perform
(
args
)));
static
ActionResultHolder
*
PerformAction
(
const
Action
<
F
>&
action
,
typename
RvalueRef
<
typename
Function
<
F
>::
ArgumentTuple
>::
type
args
)
{
return
new
ActionResultHolder
(
Wrapper
(
action
.
Perform
(
internal
::
move
(
args
))));
}
private:
...
...
@@ -1438,9 +1452,9 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
template
<
typename
F
>
static
ActionResultHolder
*
PerformDefaultAction
(
const
FunctionMockerBase
<
F
>*
func_mocker
,
const
typename
Function
<
F
>::
ArgumentTuple
&
args
,
const
string
&
call_description
)
{
func_mocker
->
PerformDefaultAction
(
args
,
call_description
);
typename
RvalueRef
<
typename
Function
<
F
>::
ArgumentTuple
>::
type
args
,
const
std
::
string
&
call_description
)
{
func_mocker
->
PerformDefaultAction
(
internal
::
move
(
args
)
,
call_description
);
return
new
ActionResultHolder
;
}
...
...
@@ -1449,8 +1463,8 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
template
<
typename
F
>
static
ActionResultHolder
*
PerformAction
(
const
Action
<
F
>&
action
,
const
typename
Function
<
F
>::
ArgumentTuple
&
args
)
{
action
.
Perform
(
args
);
typename
RvalueRef
<
typename
Function
<
F
>::
ArgumentTuple
>::
type
args
)
{
action
.
Perform
(
internal
::
move
(
args
)
)
;
return
new
ActionResultHolder
;
}
...
...
@@ -1469,7 +1483,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
typedef
typename
Function
<
F
>::
ArgumentTuple
ArgumentTuple
;
typedef
typename
Function
<
F
>::
ArgumentMatcherTuple
ArgumentMatcherTuple
;
FunctionMockerBase
()
:
current_spec_
(
this
)
{}
FunctionMockerBase
()
{}
// The destructor verifies that all expectations on this mock
// function have been satisfied. If not, it will report Google Test
...
...
@@ -1495,7 +1509,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
return
spec
;
}
return
NULL
;
return
nullptr
;
}
// Performs the default action of this mock function on the given
...
...
@@ -1505,14 +1519,16 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
// mutable state of this object, and thus can be called concurrently
// without locking.
// L = *
Result
PerformDefaultAction
(
const
ArgumentTuple
&
args
,
const
string
&
call_description
)
const
{
Result
PerformDefaultAction
(
typename
RvalueRef
<
typename
Function
<
F
>::
ArgumentTuple
>::
type
args
,
const
std
::
string
&
call_description
)
const
{
const
OnCallSpec
<
F
>*
const
spec
=
this
->
FindOnCallSpec
(
args
);
if
(
spec
!=
NULL
)
{
return
spec
->
GetAction
().
Perform
(
args
);
if
(
spec
!=
nullptr
)
{
return
spec
->
GetAction
().
Perform
(
internal
::
move
(
args
)
)
;
}
const
string
message
=
call_description
+
const
std
::
string
message
=
call_description
+
"
\n
The mock function has no default action "
"set, and its return type has no default value set."
;
#if GTEST_HAS_EXCEPTIONS
...
...
@@ -1531,11 +1547,11 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
// action fails. The caller is responsible for deleting the result.
// L = *
virtual
UntypedActionResultHolderBase
*
UntypedPerformDefaultAction
(
const
void
*
untyped_args
,
// must point to an ArgumentTuple
const
string
&
call_description
)
const
{
con
st
ArgumentTuple
&
args
=
*
static_cast
<
const
ArgumentTuple
*>
(
untyped_
args
)
;
return
ResultHolder
::
PerformDefaultAction
(
this
,
args
,
call_description
);
void
*
untyped_args
,
// must point to an ArgumentTuple
const
std
::
string
&
call_description
)
const
{
ArgumentTuple
*
args
=
static_ca
st
<
ArgumentTuple
*>
(
untyped_
args
);
return
ResultHolder
::
PerformDefaultAction
(
this
,
internal
::
move
(
*
args
)
,
call_description
);
}
// Performs the given action with the given arguments and returns
...
...
@@ -1543,13 +1559,12 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
// result.
// L = *
virtual
UntypedActionResultHolderBase
*
UntypedPerformAction
(
const
void
*
untyped_action
,
const
void
*
untyped_args
)
const
{
const
void
*
untyped_action
,
void
*
untyped_args
)
const
{
// Make a copy of the action before performing it, in case the
// action deletes the mock object (and thus deletes itself).
const
Action
<
F
>
action
=
*
static_cast
<
const
Action
<
F
>*>
(
untyped_action
);
const
ArgumentTuple
&
args
=
*
static_cast
<
const
ArgumentTuple
*>
(
untyped_args
);
return
ResultHolder
::
PerformAction
(
action
,
args
);
ArgumentTuple
*
args
=
static_cast
<
ArgumentTuple
*>
(
untyped_args
);
return
ResultHolder
::
PerformAction
(
action
,
internal
::
move
(
*
args
));
}
// Implements UntypedFunctionMockerBase::ClearDefaultActionsLocked():
...
...
@@ -1589,10 +1604,14 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
// Returns the result of invoking this mock function with the given
// arguments. This function can be safely called from multiple
// threads concurrently.
Result
InvokeWith
(
const
ArgumentTuple
&
args
)
GTEST_LOCK_EXCLUDED_
(
g_gmock_mutex
)
{
Result
InvokeWith
(
typename
RvalueRef
<
typename
Function
<
F
>::
ArgumentTuple
>::
type
args
)
GTEST_LOCK_EXCLUDED_
(
g_gmock_mutex
)
{
// const_cast is required since in C++98 we still pass ArgumentTuple around
// by const& instead of rvalue reference.
void
*
untyped_args
=
const_cast
<
void
*>
(
static_cast
<
const
void
*>
(
&
args
));
scoped_ptr
<
ResultHolder
>
holder
(
DownCast_
<
ResultHolder
*>
(
this
->
UntypedInvokeWith
(
&
args
)));
DownCast_
<
ResultHolder
*>
(
this
->
UntypedInvokeWith
(
untyped_
args
)));
return
holder
->
Unwrap
();
}
...
...
@@ -1608,31 +1627,27 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
}
// Adds and returns an expectation spec for this mock function.
TypedExpectation
<
F
>&
AddNewExpectation
(
const
char
*
file
,
int
line
,
const
string
&
source_text
,
const
ArgumentMatcherTuple
&
m
)
GTEST_LOCK_EXCLUDED_
(
g_gmock_mutex
)
{
TypedExpectation
<
F
>&
AddNewExpectation
(
const
char
*
file
,
int
line
,
const
std
::
string
&
source_text
,
const
ArgumentMatcherTuple
&
m
)
GTEST_LOCK_EXCLUDED_
(
g_gmock_mutex
)
{
Mock
::
RegisterUseByOnCallOrExpectCall
(
MockObject
(),
file
,
line
);
TypedExpectation
<
F
>*
const
expectation
=
new
TypedExpectation
<
F
>
(
this
,
file
,
line
,
source_text
,
m
);
const
linked_ptr
<
ExpectationBase
>
untyped_expectation
(
expectation
);
// See the definition of untyped_expectations_ for why access to
// it is unprotected here.
untyped_expectations_
.
push_back
(
untyped_expectation
);
// Adds this expectation into the implicit sequence if there is one.
Sequence
*
const
implicit_sequence
=
g_gmock_implicit_sequence
.
get
();
if
(
implicit_sequence
!=
NULL
)
{
if
(
implicit_sequence
!=
nullptr
)
{
implicit_sequence
->
AddExpectation
(
Expectation
(
untyped_expectation
));
}
return
*
expectation
;
}
// The current spec (either default action spec or expectation spec)
// being described on this function mocker.
MockSpec
<
F
>&
current_spec
()
{
return
current_spec_
;
}
private:
template
<
typename
Func
>
friend
class
TypedExpectation
;
...
...
@@ -1645,7 +1660,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
::
std
::
ostream
*
os
)
const
{
const
OnCallSpec
<
F
>*
const
spec
=
FindOnCallSpec
(
args
);
if
(
spec
==
NULL
)
{
if
(
spec
==
nullptr
)
{
*
os
<<
(
internal
::
type_equals
<
Result
,
void
>::
value
?
"returning directly.
\n
"
:
"returning default value.
\n
"
);
...
...
@@ -1695,9 +1710,9 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
*
static_cast
<
const
ArgumentTuple
*>
(
untyped_args
);
MutexLock
l
(
&
g_gmock_mutex
);
TypedExpectation
<
F
>*
exp
=
this
->
FindMatchingExpectationLocked
(
args
);
if
(
exp
==
NULL
)
{
// A match wasn't found.
if
(
exp
==
nullptr
)
{
// A match wasn't found.
this
->
FormatUnexpectedCallMessageLocked
(
args
,
what
,
why
);
return
NULL
;
return
nullptr
;
}
// This line must be done before calling GetActionForArguments(),
...
...
@@ -1705,8 +1720,8 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
// its saturation status.
*
is_excessive
=
exp
->
IsSaturated
();
const
Action
<
F
>*
action
=
exp
->
GetActionForArguments
(
this
,
args
,
what
,
why
);
if
(
action
!=
NULL
&&
action
->
IsDoDefault
())
action
=
NULL
;
// Normalize "do default" to NULL.
if
(
action
!=
nullptr
&&
action
->
IsDoDefault
())
action
=
nullptr
;
// Normalize "do default" to NULL.
*
untyped_action
=
action
;
return
exp
;
}
...
...
@@ -1725,6 +1740,8 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
const
ArgumentTuple
&
args
)
const
GTEST_EXCLUSIVE_LOCK_REQUIRED_
(
g_gmock_mutex
)
{
g_gmock_mutex
.
AssertHeld
();
// See the definition of untyped_expectations_ for why access to
// it is unprotected here.
for
(
typename
UntypedExpectations
::
const_reverse_iterator
it
=
untyped_expectations_
.
rbegin
();
it
!=
untyped_expectations_
.
rend
();
++
it
)
{
...
...
@@ -1734,7 +1751,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
return
exp
;
}
}
return
NULL
;
return
nullptr
;
}
// Returns a message that the arguments don't match any expectation.
...
...
@@ -1756,12 +1773,12 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
::
std
::
ostream
*
why
)
const
GTEST_EXCLUSIVE_LOCK_REQUIRED_
(
g_gmock_mutex
)
{
g_gmock_mutex
.
AssertHeld
();
const
in
t
count
=
static_cast
<
int
>
(
untyped_expectations_
.
size
()
)
;
const
size_
t
count
=
untyped_expectations_
.
size
();
*
why
<<
"Google Mock tried the following "
<<
count
<<
" "
<<
(
count
==
1
?
"expectation, but it didn't match"
:
"expectations, but none matched"
)
<<
":
\n
"
;
for
(
in
t
i
=
0
;
i
<
count
;
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
count
;
i
++
)
{
TypedExpectation
<
F
>*
const
expectation
=
static_cast
<
TypedExpectation
<
F
>*>
(
untyped_expectations_
[
i
].
get
());
*
why
<<
"
\n
"
;
...
...
@@ -1775,14 +1792,10 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
}
}
// The current spec (either default action spec or expectation spec)
// being described on this function mocker.
MockSpec
<
F
>
current_spec_
;
// There is no generally useful and implementable semantics of
// copying a mock object, so copying a mock is usually a user error.
// Thus we disallow copying function mockers. If the user really
// wants to copy a mock object, he should implement
his
own copy
// wants to copy a mock object,
t
he
y
should implement
their
own copy
// operation, for example:
//
// class MockFoo : public Foo {
...
...
@@ -1794,9 +1807,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
GTEST_DISALLOW_COPY_AND_ASSIGN_
(
FunctionMockerBase
);
};
// class FunctionMockerBase
#ifdef _MSC_VER
# pragma warning(pop) // Restores the warning state.
#endif // _MSV_VER
GTEST_DISABLE_MSC_WARNINGS_POP_
()
// 4355
// Implements methods of FunctionMockerBase.
...
...
@@ -1806,7 +1817,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
// Reports an uninteresting call (whose description is in msg) in the
// manner specified by 'reaction'.
void
ReportUninterestingCall
(
CallReaction
reaction
,
const
string
&
msg
);
void
ReportUninterestingCall
(
CallReaction
reaction
,
const
std
::
string
&
msg
);
}
// namespace internal
...
...
@@ -1841,17 +1852,78 @@ inline Expectation::Expectation(internal::ExpectationBase& exp) // NOLINT
}
// namespace testing
// A separate macro is required to avoid compile errors when the name
// of the method used in call is a result of macro expansion.
// See CompilesWithMethodNameExpandedFromMacro tests in
// internal/gmock-spec-builders_test.cc for more details.
#define GMOCK_ON_CALL_IMPL_(obj, call) \
((obj).gmock_##call).InternalDefaultActionSetAt(__FILE__, __LINE__, \
#obj, #call)
#define ON_CALL(obj, call) GMOCK_ON_CALL_IMPL_(obj, call)
#define GMOCK_EXPECT_CALL_IMPL_(obj, call) \
((obj).gmock_##call).InternalExpectedAt(__FILE__, __LINE__, #obj, #call)
#define EXPECT_CALL(obj, call) GMOCK_EXPECT_CALL_IMPL_(obj, call)
GTEST_DISABLE_MSC_WARNINGS_POP_
()
// 4251
// Implementation for ON_CALL and EXPECT_CALL macros. A separate macro is
// required to avoid compile errors when the name of the method used in call is
// a result of macro expansion. See CompilesWithMethodNameExpandedFromMacro
// tests in internal/gmock-spec-builders_test.cc for more details.
//
// This macro supports statements both with and without parameter matchers. If
// the parameter list is omitted, gMock will accept any parameters, which allows
// tests to be written that don't need to encode the number of method
// parameter. This technique may only be used for non-overloaded methods.
//
// // These are the same:
// ON_CALL(mock, NoArgsMethod()).WillByDefault(...);
// ON_CALL(mock, NoArgsMethod).WillByDefault(...);
//
// // As are these:
// ON_CALL(mock, TwoArgsMethod(_, _)).WillByDefault(...);
// ON_CALL(mock, TwoArgsMethod).WillByDefault(...);
//
// // Can also specify args if you want, of course:
// ON_CALL(mock, TwoArgsMethod(_, 45)).WillByDefault(...);
//
// // Overloads work as long as you specify parameters:
// ON_CALL(mock, OverloadedMethod(_)).WillByDefault(...);
// ON_CALL(mock, OverloadedMethod(_, _)).WillByDefault(...);
//
// // Oops! Which overload did you want?
// ON_CALL(mock, OverloadedMethod).WillByDefault(...);
// => ERROR: call to member function 'gmock_OverloadedMethod' is ambiguous
//
// How this works: The mock class uses two overloads of the gmock_Method
// expectation setter method plus an operator() overload on the MockSpec object.
// In the matcher list form, the macro expands to:
//
// // This statement:
// ON_CALL(mock, TwoArgsMethod(_, 45))...
//
// // ...expands to:
// mock.gmock_TwoArgsMethod(_, 45)(WithoutMatchers(), nullptr)...
// |-------------v---------------||------------v-------------|
// invokes first overload swallowed by operator()
//
// // ...which is essentially:
// mock.gmock_TwoArgsMethod(_, 45)...
//
// Whereas the form without a matcher list:
//
// // This statement:
// ON_CALL(mock, TwoArgsMethod)...
//
// // ...expands to:
// mock.gmock_TwoArgsMethod(WithoutMatchers(), nullptr)...
// |-----------------------v--------------------------|
// invokes second overload
//
// // ...which is essentially:
// mock.gmock_TwoArgsMethod(_, _)...
//
// The WithoutMatchers() argument is used to disambiguate overloads and to
// block the caller from accidentally invoking the second overload directly. The
// second argument is an internal type derived from the method signature. The
// failure to disambiguate two overloads of this method in the ON_CALL statement
// is how we block callers from setting expectations on overloaded methods.
#define GMOCK_ON_CALL_IMPL_(mock_expr, Setter, call) \
((mock_expr).gmock_##call)(::testing::internal::GetWithoutMatchers(), NULL) \
.Setter(__FILE__, __LINE__, #mock_expr, #call)
#define ON_CALL(obj, call) \
GMOCK_ON_CALL_IMPL_(obj, InternalDefaultActionSetAt, call)
#define EXPECT_CALL(obj, call) \
GMOCK_ON_CALL_IMPL_(obj, InternalExpectedAt, call)
#endif // GMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
googlemock/include/gmock/gmock.h
View file @
96d16157
...
...
@@ -26,13 +26,14 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
// This is the main header file a user should include.
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_H_
...
...
@@ -59,8 +60,8 @@
#include "gmock/gmock-cardinalities.h"
#include "gmock/gmock-generated-actions.h"
#include "gmock/gmock-generated-function-mockers.h"
#include "gmock/gmock-generated-nice-strict.h"
#include "gmock/gmock-generated-matchers.h"
#include "gmock/gmock-generated-nice-strict.h"
#include "gmock/gmock-matchers.h"
#include "gmock/gmock-more-actions.h"
#include "gmock/gmock-more-matchers.h"
...
...
@@ -71,6 +72,7 @@ namespace testing {
// Declares Google Mock flags that we want a user to use programmatically.
GMOCK_DECLARE_bool_
(
catch_leaked_mocks
);
GMOCK_DECLARE_string_
(
verbose
);
GMOCK_DECLARE_int32_
(
default_mock_behavior
);
// Initializes Google Mock. This must be called before running the
// tests. In particular, it parses the command line for the flags
...
...
googlemock/include/gmock/internal/custom/README.md
0 → 100644
View file @
96d16157
# Customization Points
The custom directory is an injection point for custom user configurations.
## Header `gmock-port.h`
The following macros can be defined:
### Flag related macros:
*
`GMOCK_DECLARE_bool_(name)`
*
`GMOCK_DECLARE_int32_(name)`
*
`GMOCK_DECLARE_string_(name)`
*
`GMOCK_DEFINE_bool_(name, default_val, doc)`
*
`GMOCK_DEFINE_int32_(name, default_val, doc)`
*
`GMOCK_DEFINE_string_(name, default_val, doc)`
googlemock/include/gmock/internal/custom/gmock-generated-actions.h
View file @
96d16157
...
...
@@ -2,6 +2,8 @@
// pump.py gmock-generated-actions.h.pump
// DO NOT EDIT BY HAND!!!
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
...
...
googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump
View file @
96d16157
$$
-*-
mode
:
c
++
;
-*-
$$
This
is
a
Pump
source
file
(
http
:
//go/pump).
Please use Pump to convert
$$
This
is
a
Pump
source
file
.
Please
use
Pump
to
convert
$$
it
to
callback
-
actions
.
h
.
$$
$
var
max_callback_arity
=
5
$$}}
This
meta
comment
fixes
auto
-
indentation
in
editors
.
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
...
...
googlemock/include/gmock/internal/custom/gmock-matchers.h
View file @
96d16157
...
...
@@ -27,13 +27,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ============================================================
// An installation-specific extension point for gmock-matchers.h.
// ============================================================
// Injection point for custom user configurations. See README for details
//
// Adds google3 callback support to CallableTraits.
//
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_CALLBACK_MATCHERS_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_CALLBACK_MATCHERS_H_
// GOOGLETEST_CM0002 DO NOT DELETE
#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_CALLBACK_MATCHERS_H_
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
googlemock/include/gmock/internal/custom/gmock-port.h
View file @
96d16157
...
...
@@ -27,19 +27,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Injection point for custom user configurations.
// The following macros can be defined:
//
// Flag related macros:
// GMOCK_DECLARE_bool_(name)
// GMOCK_DECLARE_int32_(name)
// GMOCK_DECLARE_string_(name)
// GMOCK_DEFINE_bool_(name, default_val, doc)
// GMOCK_DEFINE_int32_(name, default_val, doc)
// GMOCK_DEFINE_string_(name, default_val, doc)
// Injection point for custom user configurations. See README for details
//
// ** Custom implementation starts here **
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
...
...
googlemock/include/gmock/internal/gmock-generated-internal-utils.h
View file @
96d16157
...
...
@@ -30,14 +30,15 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
// This file contains template meta-programming utility classes needed
// for implementing Google Mock.
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
...
...
@@ -69,70 +70,69 @@ template <typename Tuple>
struct
MatcherTuple
;
template
<
>
struct
MatcherTuple
<
::
testing
::
tuple
<>
>
{
typedef
::
testing
::
tuple
<
>
type
;
struct
MatcherTuple
<
::
std
::
tuple
<>
>
{
typedef
::
std
::
tuple
<
>
type
;
};
template
<
typename
A1
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
>
type
;
struct
MatcherTuple
<
::
std
::
tuple
<
A1
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
>
type
;
};
template
<
typename
A1
,
typename
A2
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
,
A2
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
>
type
;
struct
MatcherTuple
<
::
std
::
tuple
<
A1
,
A2
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
>
type
;
};
template
<
typename
A1
,
typename
A2
,
typename
A3
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
,
A2
,
A3
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
>
type
;
struct
MatcherTuple
<
::
std
::
tuple
<
A1
,
A2
,
A3
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
>
type
;
};
template
<
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
struct
MatcherTuple
<
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
>
type
;
};
template
<
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
typename
A5
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
struct
MatcherTuple
<
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
Matcher
<
A5
>
>
type
;
};
template
<
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
typename
A5
,
typename
A6
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
struct
MatcherTuple
<
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
Matcher
<
A5
>
,
Matcher
<
A6
>
>
type
;
};
template
<
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
typename
A5
,
typename
A6
,
typename
A7
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
struct
MatcherTuple
<
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
Matcher
<
A5
>
,
Matcher
<
A6
>
,
Matcher
<
A7
>
>
type
;
};
template
<
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
typename
A5
,
typename
A6
,
typename
A7
,
typename
A8
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
struct
MatcherTuple
<
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
Matcher
<
A5
>
,
Matcher
<
A6
>
,
Matcher
<
A7
>
,
Matcher
<
A8
>
>
type
;
};
template
<
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
typename
A5
,
typename
A6
,
typename
A7
,
typename
A8
,
typename
A9
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
struct
MatcherTuple
<
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
Matcher
<
A5
>
,
Matcher
<
A6
>
,
Matcher
<
A7
>
,
Matcher
<
A8
>
,
Matcher
<
A9
>
>
type
;
};
template
<
typename
A1
,
typename
A2
,
typename
A3
,
typename
A4
,
typename
A5
,
typename
A6
,
typename
A7
,
typename
A8
,
typename
A9
,
typename
A10
>
struct
MatcherTuple
<
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
,
A10
>
>
{
typedef
::
testing
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
struct
MatcherTuple
<
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
,
A10
>
>
{
typedef
::
std
::
tuple
<
Matcher
<
A1
>
,
Matcher
<
A2
>
,
Matcher
<
A3
>
,
Matcher
<
A4
>
,
Matcher
<
A5
>
,
Matcher
<
A6
>
,
Matcher
<
A7
>
,
Matcher
<
A8
>
,
Matcher
<
A9
>
,
Matcher
<
A10
>
>
type
;
};
...
...
@@ -156,7 +156,7 @@ struct Function;
template
<
typename
R
>
struct
Function
<
R
()
>
{
typedef
R
Result
;
typedef
::
testing
::
tuple
<>
ArgumentTuple
;
typedef
::
std
::
tuple
<>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
();
typedef
IgnoredValue
MakeResultIgnoredValue
();
...
...
@@ -166,7 +166,7 @@ template <typename R, typename A1>
struct
Function
<
R
(
A1
)
>
:
Function
<
R
()
>
{
typedef
A1
Argument1
;
typedef
::
testing
::
tuple
<
A1
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
);
...
...
@@ -176,7 +176,7 @@ template <typename R, typename A1, typename A2>
struct
Function
<
R
(
A1
,
A2
)
>
:
Function
<
R
(
A1
)
>
{
typedef
A2
Argument2
;
typedef
::
testing
::
tuple
<
A1
,
A2
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
,
A2
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
,
A2
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
,
A2
);
...
...
@@ -186,7 +186,7 @@ template <typename R, typename A1, typename A2, typename A3>
struct
Function
<
R
(
A1
,
A2
,
A3
)
>
:
Function
<
R
(
A1
,
A2
)
>
{
typedef
A3
Argument3
;
typedef
::
testing
::
tuple
<
A1
,
A2
,
A3
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
,
A2
,
A3
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
,
A2
,
A3
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
,
A2
,
A3
);
...
...
@@ -196,7 +196,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4>
struct
Function
<
R
(
A1
,
A2
,
A3
,
A4
)
>
:
Function
<
R
(
A1
,
A2
,
A3
)
>
{
typedef
A4
Argument4
;
typedef
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
,
A2
,
A3
,
A4
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
,
A2
,
A3
,
A4
);
...
...
@@ -207,7 +207,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
struct
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
)
>
:
Function
<
R
(
A1
,
A2
,
A3
,
A4
)
>
{
typedef
A5
Argument5
;
typedef
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
,
A2
,
A3
,
A4
,
A5
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
,
A2
,
A3
,
A4
,
A5
);
...
...
@@ -218,7 +218,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
struct
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
)
>
:
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
)
>
{
typedef
A6
Argument6
;
typedef
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
);
...
...
@@ -229,7 +229,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
struct
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
)
>
:
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
)
>
{
typedef
A7
Argument7
;
typedef
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
);
...
...
@@ -240,7 +240,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
struct
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
)
>
:
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
)
>
{
typedef
A8
Argument8
;
typedef
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
);
...
...
@@ -251,7 +251,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
struct
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
)
>
:
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
)
>
{
typedef
A9
Argument9
;
typedef
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
...
...
@@ -264,8 +264,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
struct
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
,
A10
)
>
:
Function
<
R
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
)
>
{
typedef
A10
Argument10
;
typedef
::
testing
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
,
A10
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
,
A10
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
A9
,
A10
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
...
...
googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump
View file @
96d16157
...
...
@@ -31,14 +31,15 @@ $var n = 10 $$ The maximum arity we support.
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
// This file contains template meta-programming utility classes needed
// for implementing Google Mock.
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_GENERATED_INTERNAL_UTILS_H_
...
...
@@ -77,8 +78,8 @@ $var typename_As = [[$for j, [[typename A$j]]]]
$
var
As
=
[[
$
for
j
,
[[
A
$
j
]]]]
$
var
matcher_As
=
[[
$
for
j
,
[[
Matcher
<
A
$
j
>
]]]]
template
<
$
typename_As
>
struct
MatcherTuple
<
::
testing
::
tuple
<
$
As
>
>
{
typedef
::
testing
::
tuple
<
$
matcher_As
>
type
;
struct
MatcherTuple
<
::
std
::
tuple
<
$
As
>
>
{
typedef
::
std
::
tuple
<
$
matcher_As
>
type
;
};
...
...
@@ -102,7 +103,7 @@ struct Function;
template
<
typename
R
>
struct
Function
<
R
()
>
{
typedef
R
Result
;
typedef
::
testing
::
tuple
<>
ArgumentTuple
;
typedef
::
std
::
tuple
<>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
();
typedef
IgnoredValue
MakeResultIgnoredValue
();
...
...
@@ -121,7 +122,7 @@ template <typename R$typename_As>
struct
Function
<
R
(
$
As
)
>
:
Function
<
R
(
$
prev_As
)
>
{
typedef
A
$
i
Argument
$
i
;
typedef
::
testing
::
tuple
<
$
As
>
ArgumentTuple
;
typedef
::
std
::
tuple
<
$
As
>
ArgumentTuple
;
typedef
typename
MatcherTuple
<
ArgumentTuple
>::
type
ArgumentMatcherTuple
;
typedef
void
MakeResultVoid
(
$
As
);
typedef
IgnoredValue
MakeResultIgnoredValue
(
$
As
);
...
...
googlemock/include/gmock/internal/gmock-internal-utils.h
View file @
96d16157
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Google Mock - a framework for writing C++ mock classes.
//
...
...
@@ -35,13 +34,14 @@
// Mock. They are subject to change without notice, so please DO NOT
// USE THEM IN USER CODE.
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
#include <stdio.h>
#include <ostream> // NOLINT
#include <string>
#include "gmock/internal/gmock-generated-internal-utils.h"
#include "gmock/internal/gmock-port.h"
#include "gtest/gtest.h"
...
...
@@ -49,11 +49,23 @@
namespace
testing
{
namespace
internal
{
// Silence MSVC C4100 (unreferenced formal parameter) and
// C4805('==': unsafe mix of type 'const int' and type 'const bool')
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable:4100)
# pragma warning(disable:4805)
#endif
// Joins a vector of strings as if they are fields of a tuple; returns
// the joined string.
GTEST_API_
std
::
string
JoinAsTuple
(
const
Strings
&
fields
);
// Converts an identifier name to a space-separated list of lower-case
// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is
// treated as one word. For example, both "FooBar123" and
// "foo_bar_123" are converted to "foo bar 123".
GTEST_API_
string
ConvertIdentifierNameToWords
(
const
char
*
id_name
);
GTEST_API_
std
::
string
ConvertIdentifierNameToWords
(
const
char
*
id_name
);
// PointeeOf<Pointer>::type is the type of a value pointed to by a
// Pointer, which can be either a smart pointer or a raw pointer. The
...
...
@@ -114,9 +126,11 @@ struct LinkedPtrLessThan {
// To gcc,
// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
#ifdef __GNUC__
#if !defined(__WCHAR_UNSIGNED__)
// signed/unsigned wchar_t are valid types.
# define GMOCK_HAS_SIGNED_WCHAR_T_ 1
#endif
#endif
// In what follows, we use the term "kind" to indicate whether a type
// is bool, an integer type (excluding bool), a floating-point type,
...
...
@@ -267,7 +281,7 @@ class FailureReporterInterface {
// Reports a failure that occurred at the given source file location.
virtual
void
ReportFailure
(
FailureType
type
,
const
char
*
file
,
int
line
,
const
string
&
message
)
=
0
;
const
std
::
string
&
message
)
=
0
;
};
// Returns the failure reporter used by Google Mock.
...
...
@@ -279,7 +293,7 @@ GTEST_API_ FailureReporterInterface* GetFailureReporter();
// inline this function to prevent it from showing up in the stack
// trace.
inline
void
Assert
(
bool
condition
,
const
char
*
file
,
int
line
,
const
string
&
msg
)
{
const
std
::
string
&
msg
)
{
if
(
!
condition
)
{
GetFailureReporter
()
->
ReportFailure
(
FailureReporterInterface
::
kFatal
,
file
,
line
,
msg
);
...
...
@@ -292,7 +306,7 @@ inline void Assert(bool condition, const char* file, int line) {
// Verifies that condition is true; generates a non-fatal failure if
// condition is false.
inline
void
Expect
(
bool
condition
,
const
char
*
file
,
int
line
,
const
string
&
msg
)
{
const
std
::
string
&
msg
)
{
if
(
!
condition
)
{
GetFailureReporter
()
->
ReportFailure
(
FailureReporterInterface
::
kNonfatal
,
file
,
line
,
msg
);
...
...
@@ -328,11 +342,25 @@ GTEST_API_ bool LogIsVisible(LogSeverity severity);
// stack_frames_to_skip is treated as 0, since we don't know which
// function calls will be inlined by the compiler and need to be
// conservative.
GTEST_API_
void
Log
(
LogSeverity
severity
,
const
string
&
message
,
GTEST_API_
void
Log
(
LogSeverity
severity
,
const
std
::
string
&
message
,
int
stack_frames_to_skip
);
// TODO(wan@google.com): group all type utilities together.
// A marker class that is used to resolve parameterless expectations to the
// correct overload. This must not be instantiable, to prevent client code from
// accidentally resolving to the overload; for example:
//
// ON_CALL(mock, Method({}, nullptr))...
//
class
WithoutMatchers
{
private:
WithoutMatchers
()
{}
friend
GTEST_API_
WithoutMatchers
GetWithoutMatchers
();
};
// Internal use only: access the singleton instance of WithoutMatchers.
GTEST_API_
WithoutMatchers
GetWithoutMatchers
();
// FIXME: group all type utilities together.
// Type traits.
...
...
@@ -465,7 +493,7 @@ class StlContainerView<Element[N]> {
// This specialization is used when RawContainer is a native array
// represented as a (pointer, size) tuple.
template
<
typename
ElementPointer
,
typename
Size
>
class
StlContainerView
<
::
testing
::
tuple
<
ElementPointer
,
Size
>
>
{
class
StlContainerView
<
::
std
::
tuple
<
ElementPointer
,
Size
>
>
{
public:
typedef
GTEST_REMOVE_CONST_
(
typename
internal
::
PointeeOf
<
ElementPointer
>::
type
)
RawElement
;
...
...
@@ -473,11 +501,12 @@ class StlContainerView< ::testing::tuple<ElementPointer, Size> > {
typedef
const
type
const_reference
;
static
const_reference
ConstReference
(
const
::
testing
::
tuple
<
ElementPointer
,
Size
>&
array
)
{
return
type
(
get
<
0
>
(
array
),
get
<
1
>
(
array
),
RelationToSourceReference
());
const
::
std
::
tuple
<
ElementPointer
,
Size
>&
array
)
{
return
type
(
std
::
get
<
0
>
(
array
),
std
::
get
<
1
>
(
array
),
RelationToSourceReference
());
}
static
type
Copy
(
const
::
testing
::
tuple
<
ElementPointer
,
Size
>&
array
)
{
return
type
(
get
<
0
>
(
array
),
get
<
1
>
(
array
),
RelationToSourceCopy
());
static
type
Copy
(
const
::
std
::
tuple
<
ElementPointer
,
Size
>&
array
)
{
return
type
(
std
::
get
<
0
>
(
array
),
std
::
get
<
1
>
(
array
),
RelationToSourceCopy
());
}
};
...
...
@@ -504,8 +533,44 @@ struct RemoveConstFromKey<std::pair<const K, V> > {
template
<
bool
kValue
>
struct
BooleanConstant
{};
// Emit an assertion failure due to incorrect DoDefault() usage. Out-of-lined to
// reduce code size.
GTEST_API_
void
IllegalDoDefault
(
const
char
*
file
,
int
line
);
#if GTEST_LANG_CXX11
// Helper types for Apply() below.
template
<
size_t
...
Is
>
struct
int_pack
{
typedef
int_pack
type
;
};
template
<
class
Pack
,
size_t
I
>
struct
append
;
template
<
size_t
...
Is
,
size_t
I
>
struct
append
<
int_pack
<
Is
...
>
,
I
>
:
int_pack
<
Is
...,
I
>
{};
template
<
size_t
C
>
struct
make_int_pack
:
append
<
typename
make_int_pack
<
C
-
1
>::
type
,
C
-
1
>
{};
template
<
>
struct
make_int_pack
<
0
>
:
int_pack
<>
{};
template
<
typename
F
,
typename
Tuple
,
size_t
...
Idx
>
auto
ApplyImpl
(
F
&&
f
,
Tuple
&&
args
,
int_pack
<
Idx
...
>
)
->
decltype
(
std
::
forward
<
F
>
(
f
)(
std
::
get
<
Idx
>
(
std
::
forward
<
Tuple
>
(
args
))...))
{
return
std
::
forward
<
F
>
(
f
)(
std
::
get
<
Idx
>
(
std
::
forward
<
Tuple
>
(
args
))...);
}
// Apply the function to a tuple of arguments.
template
<
typename
F
,
typename
Tuple
>
auto
Apply
(
F
&&
f
,
Tuple
&&
args
)
->
decltype
(
ApplyImpl
(
std
::
forward
<
F
>
(
f
),
std
::
forward
<
Tuple
>
(
args
),
make_int_pack
<
std
::
tuple_size
<
Tuple
>::
value
>
()))
{
return
ApplyImpl
(
std
::
forward
<
F
>
(
f
),
std
::
forward
<
Tuple
>
(
args
),
make_int_pack
<
std
::
tuple_size
<
Tuple
>::
value
>
());
}
#endif
#ifdef _MSC_VER
# pragma warning(pop)
#endif
}
// namespace internal
}
// namespace testing
#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
googlemock/include/gmock/internal/gmock-port.h
View file @
96d16157
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vadimb@google.com (Vadim Berman)
//
// Low-level types and utilities for porting Google Mock to various
// platforms. All macros ending with _ and symbols defined in an
...
...
@@ -36,6 +35,8 @@
// end with _ are part of Google Mock's public API and can be used by
// code outside Google Mock.
// GOOGLETEST_CM0002 DO NOT DELETE
#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
#define GMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
...
...
@@ -50,15 +51,11 @@
// portability utilities to Google Test's gtest-port.h instead of
// here, as Google Mock depends on Google Test. Only add a utility
// here if it's truly specific to Google Mock.
#include "gtest/internal/gtest-linked_ptr.h"
#include "gtest/internal/gtest-port.h"
#include "gmock/internal/custom/gmock-port.h"
// To avoid conditional compilation everywhere, we make it
// gmock-port.h's responsibility to #include the header implementing
// tr1/tuple. gmock-port.h does this via gtest-port.h, which is
// guaranteed to pull in the tuple header.
// For MS Visual C++, check the compiler version. At least VS 2003 is
// required to compile Google Mock.
#if defined(_MSC_VER) && _MSC_VER < 1310
...
...
@@ -72,18 +69,18 @@
#if !defined(GMOCK_DECLARE_bool_)
// Macros for declaring flags.
#define GMOCK_DECLARE_bool_(name) extern GTEST_API_ bool GMOCK_FLAG(name)
#define GMOCK_DECLARE_int32_(name) \
#
define GMOCK_DECLARE_bool_(name) extern GTEST_API_ bool GMOCK_FLAG(name)
#
define GMOCK_DECLARE_int32_(name) \
extern GTEST_API_ ::testing::internal::Int32 GMOCK_FLAG(name)
#define GMOCK_DECLARE_string_(name) \
#
define GMOCK_DECLARE_string_(name) \
extern GTEST_API_ ::std::string GMOCK_FLAG(name)
// Macros for defining flags.
#define GMOCK_DEFINE_bool_(name, default_val, doc) \
#
define GMOCK_DEFINE_bool_(name, default_val, doc) \
GTEST_API_ bool GMOCK_FLAG(name) = (default_val)
#define GMOCK_DEFINE_int32_(name, default_val, doc) \
#
define GMOCK_DEFINE_int32_(name, default_val, doc) \
GTEST_API_ ::testing::internal::Int32 GMOCK_FLAG(name) = (default_val)
#define GMOCK_DEFINE_string_(name, default_val, doc) \
#
define GMOCK_DEFINE_string_(name, default_val, doc) \
GTEST_API_ ::std::string GMOCK_FLAG(name) = (default_val)
#endif // !defined(GMOCK_DECLARE_bool_)
...
...
googlemock/msvc/2010/gmock.sln
View file @
96d16157
...
...
@@ -10,21 +10,35 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.ActiveCfg = Debug|Win32
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.Build.0 = Debug|Win32
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|x64.ActiveCfg = Debug|x64
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|x64.Build.0 = Debug|x64
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.ActiveCfg = Release|Win32
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.Build.0 = Release|Win32
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|x64.ActiveCfg = Release|x64
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|x64.Build.0 = Release|x64
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.ActiveCfg = Debug|Win32
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.Build.0 = Debug|Win32
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|x64.ActiveCfg = Debug|x64
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|x64.Build.0 = Debug|x64
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.ActiveCfg = Release|Win32
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.Build.0 = Release|Win32
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|x64.ActiveCfg = Release|x64
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|x64.Build.0 = Release|x64
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.ActiveCfg = Debug|Win32
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.Build.0 = Debug|Win32
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|x64.ActiveCfg = Debug|x64
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|x64.Build.0 = Debug|x64
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.ActiveCfg = Release|Win32
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.Build.0 = Release|Win32
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|x64.ActiveCfg = Release|x64
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
googlemock/msvc/2010/gmock.vcxproj
View file @
96d16157
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets=
"Build"
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<ItemGroup
Label=
"ProjectConfigurations"
>
<ProjectConfiguration
Include=
"Debug|Win32"
>
<Configuration>
Debug
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Debug|x64"
>
<Configuration>
Debug
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|Win32"
>
<Configuration>
Release
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|x64"
>
<Configuration>
Release
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup
Label=
"Globals"
>
<ProjectGuid>
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}
</ProjectGuid>
...
...
@@ -20,10 +28,23 @@
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
...
...
@@ -32,23 +53,39 @@
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<PropertyGroup
Label=
"UserMacros"
/>
<PropertyGroup>
<_ProjectFileVersion>
10.0.30319.1
</_ProjectFileVersion>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(SolutionDir)$(Configuration)\
</OutDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(SolutionDir)$(
Platform)-$(
Configuration)\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(OutDir)$(ProjectName)\
</IntDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(SolutionDir)$(Configuration)\
</OutDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(SolutionDir)$(
Platform)-$(
Configuration)\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<OutDir>
$(SolutionDir)$(Platform)-$(Configuration)\
</OutDir>
<IntDir>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<OutDir>
$(SolutionDir)$(Platform)-$(Configuration)\
</OutDir>
<IntDir>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<ClCompile>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
..\..\include;..\..;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
WIN32;_
VARIADIC_MAX=10;_
DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<MinimalRebuild>
true
</MinimalRebuild>
<BasicRuntimeChecks>
EnableFastChecks
</BasicRuntimeChecks>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
...
...
@@ -58,10 +95,34 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
..\..\include;..\..;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<BasicRuntimeChecks>
EnableFastChecks
</BasicRuntimeChecks>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<ClCompile>
<AdditionalIncludeDirectories>
..\..\include;..\..;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<ClCompile>
<AdditionalIncludeDirectories>
..\..\include;..\..;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
...
...
@@ -73,10 +134,12 @@
<ClCompile
Include=
"..\..\src\gmock-all.cc"
/>
<ClCompile
Include=
"$(GTestDir)\src\gtest-all.cc"
>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
</ItemGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
</ImportGroup>
</Project>
</Project>
\ No newline at end of file
googlemock/msvc/2010/gmock_config.props
View file @
96d16157
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets=
"Build"
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup
Label=
"UserMacros"
>
<GTestDir>
../../../googletest
</GTestDir>
...
...
@@ -16,4 +16,4 @@
<Value>
$(GTestDir)
</Value>
</BuildMacro>
</ItemGroup>
</Project>
</Project>
\ No newline at end of file
googlemock/msvc/2010/gmock_main.vcxproj
View file @
96d16157
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets=
"Build"
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<ItemGroup
Label=
"ProjectConfigurations"
>
<ProjectConfiguration
Include=
"Debug|Win32"
>
<Configuration>
Debug
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Debug|x64"
>
<Configuration>
Debug
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|Win32"
>
<Configuration>
Release
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|x64"
>
<Configuration>
Release
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup
Label=
"Globals"
>
<ProjectGuid>
{E4EF614B-30DF-4954-8C53-580A0BF6B589}
</ProjectGuid>
...
...
@@ -20,10 +28,23 @@
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
...
...
@@ -32,23 +53,39 @@
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<PropertyGroup
Label=
"UserMacros"
/>
<PropertyGroup>
<_ProjectFileVersion>
10.0.30319.1
</_ProjectFileVersion>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(SolutionDir)$(Configuration)\
</OutDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(SolutionDir)$(
Platform)-$(
Configuration)\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(OutDir)$(ProjectName)\
</IntDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(SolutionDir)$(Configuration)\
</OutDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(SolutionDir)$(
Platform)-$(
Configuration)\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<OutDir>
$(SolutionDir)$(Platform)-$(Configuration)\
</OutDir>
<IntDir>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<OutDir>
$(SolutionDir)$(Platform)-$(Configuration)\
</OutDir>
<IntDir>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<ClCompile>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
../../include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
WIN32;_
VARIADIC_MAX=10;_
DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<MinimalRebuild>
true
</MinimalRebuild>
<BasicRuntimeChecks>
EnableFastChecks
</BasicRuntimeChecks>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
...
...
@@ -58,10 +95,34 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
../../include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<BasicRuntimeChecks>
EnableFastChecks
</BasicRuntimeChecks>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<ClCompile>
<AdditionalIncludeDirectories>
../../include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<ClCompile>
<AdditionalIncludeDirectories>
../../include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
...
...
@@ -79,10 +140,12 @@
<ItemGroup>
<ClCompile
Include=
"..\..\src\gmock_main.cc"
>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
../../include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
../../include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
../../include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
../../include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
</ItemGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
</ImportGroup>
</Project>
</Project>
\ No newline at end of file
googlemock/msvc/2010/gmock_test.vcxproj
View file @
96d16157
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets=
"Build"
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<ItemGroup
Label=
"ProjectConfigurations"
>
<ProjectConfiguration
Include=
"Debug|Win32"
>
<Configuration>
Debug
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Debug|x64"
>
<Configuration>
Debug
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|Win32"
>
<Configuration>
Release
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|x64"
>
<Configuration>
Release
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup
Label=
"Globals"
>
<ProjectGuid>
{F10D22F8-AC7B-4213-8720-608E7D878CD2}
</ProjectGuid>
...
...
@@ -20,10 +28,23 @@
<ConfigurationType>
Application
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<PlatformToolset>
v100
</PlatformToolset>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
...
...
@@ -32,26 +53,44 @@
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<PropertyGroup
Label=
"UserMacros"
/>
<PropertyGroup>
<_ProjectFileVersion>
10.0.30319.1
</_ProjectFileVersion>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(SolutionDir)$(Configuration)\
</OutDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(SolutionDir)$(
Platform)-$(
Configuration)\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(OutDir)$(ProjectName)\
</IntDir>
<LinkIncremental
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
true
</LinkIncremental>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(SolutionDir)$(Configuration)\
</OutDir>
<LinkIncremental
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
true
</LinkIncremental>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(SolutionDir)$(Platform)-$(Configuration)\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(OutDir)$(ProjectName)\
</IntDir>
<LinkIncremental
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
false
</LinkIncremental>
<LinkIncremental
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
false
</LinkIncremental>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<OutDir>
$(SolutionDir)$(Platform)-$(Configuration)\
</OutDir>
<IntDir>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<OutDir>
$(SolutionDir)$(Platform)-$(Configuration)\
</OutDir>
<IntDir>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<ClCompile>
<AdditionalOptions>
/bigobj %(AdditionalOptions)
</AdditionalOptions>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
..\..\include;..\..;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
..\..\include;..\..;
$(GTestDir);
%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_
VARIADIC_MAX=10;_
DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<MinimalRebuild>
true
</MinimalRebuild>
<BasicRuntimeChecks>
EnableFastChecks
</BasicRuntimeChecks>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
...
...
@@ -66,11 +105,29 @@
<TargetMachine>
MachineX86
</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<AdditionalOptions>
/bigobj %(AdditionalOptions)
</AdditionalOptions>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
..\..\include;..\..;$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<BasicRuntimeChecks>
EnableFastChecks
</BasicRuntimeChecks>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<SubSystem>
Console
</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<ClCompile>
<AdditionalOptions>
/bigobj %(AdditionalOptions)
</AdditionalOptions>
<AdditionalIncludeDirectories>
..\..\include;..\..;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
..\..\include;..\..;
$(GTestDir);
%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;
_VARIADIC_MAX=10;
NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
...
...
@@ -85,6 +142,24 @@
<TargetMachine>
MachineX86
</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<ClCompile>
<AdditionalOptions>
/bigobj %(AdditionalOptions)
</AdditionalOptions>
<AdditionalIncludeDirectories>
..\..\include;..\..;$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<SubSystem>
Console
</SubSystem>
<OptimizeReferences>
true
</OptimizeReferences>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference
Include=
"gmock_main.vcxproj"
>
<Project>
{e4ef614b-30df-4954-8c53-580a0bf6b589}
</Project>
...
...
@@ -98,4 +173,4 @@
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
</ImportGroup>
</Project>
</Project>
\ No newline at end of file
googlemock/msvc/2015/gmock.sln
View file @
96d16157
...
...
@@ -10,21 +10,35 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.ActiveCfg = Debug|Win32
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.Build.0 = Debug|Win32
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|x64.ActiveCfg = Debug|x64
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|x64.Build.0 = Debug|x64
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.ActiveCfg = Release|Win32
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.Build.0 = Release|Win32
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|x64.ActiveCfg = Release|x64
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|x64.Build.0 = Release|x64
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.ActiveCfg = Debug|Win32
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.Build.0 = Debug|Win32
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|x64.ActiveCfg = Debug|x64
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|x64.Build.0 = Debug|x64
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.ActiveCfg = Release|Win32
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.Build.0 = Release|Win32
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|x64.ActiveCfg = Release|x64
{F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|x64.Build.0 = Release|x64
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.ActiveCfg = Debug|Win32
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.Build.0 = Debug|Win32
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|x64.ActiveCfg = Debug|x64
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|x64.Build.0 = Debug|x64
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.ActiveCfg = Release|Win32
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.Build.0 = Release|Win32
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|x64.ActiveCfg = Release|x64
{E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
googlemock/msvc/2015/gmock.vcxproj
View file @
96d16157
...
...
@@ -5,10 +5,18 @@
<Configuration>
Debug
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Debug|x64"
>
<Configuration>
Debug
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|Win32"
>
<Configuration>
Release
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|x64"
>
<Configuration>
Release
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup
Label=
"Globals"
>
<ProjectGuid>
{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}
</ProjectGuid>
...
...
@@ -22,11 +30,22 @@
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<PlatformToolset>
v140
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<PlatformToolset>
v140
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<PlatformToolset>
v140
</PlatformToolset>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<CharacterSet>
Unicode
</CharacterSet>
<PlatformToolset>
v140
</PlatformToolset>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
</ImportGroup>
...
...
@@ -34,18 +53,34 @@
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<ImportGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"PropertySheets"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
<Import
Project=
"gmock_config.props"
/>
</ImportGroup>
<PropertyGroup
Label=
"UserMacros"
/>
<PropertyGroup>
<_ProjectFileVersion>
10.0.30319.1
</_ProjectFileVersion>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(SolutionDir)$(Configuration)\
</OutDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(SolutionDir)$(
Platform)-$(
Configuration)\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(OutDir)$(ProjectName)\
</IntDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(SolutionDir)$(Configuration)\
</OutDir>
<OutDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(SolutionDir)$(
Platform)-$(
Configuration)\
</OutDir>
<IntDir
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<OutDir>
$(SolutionDir)$(Platform)-$(Configuration)\
</OutDir>
<IntDir>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<OutDir>
$(SolutionDir)$(Platform)-$(Configuration)\
</OutDir>
<IntDir>
$(OutDir)$(ProjectName)\
</IntDir>
</PropertyGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<ClCompile>
<Optimization>
Disabled
</Optimization>
...
...
@@ -60,6 +95,19 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
..\..\include;..\..;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<BasicRuntimeChecks>
EnableFastChecks
</BasicRuntimeChecks>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<ClCompile>
<AdditionalIncludeDirectories>
..\..\include;..\..;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
...
...
@@ -71,11 +119,24 @@
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<ClCompile>
<AdditionalIncludeDirectories>
..\..\include;..\..;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile
Include=
"..\..\src\gmock-all.cc"
/>
<ClCompile
Include=
"$(GTestDir)\src\gtest-all.cc"
>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
$(GTestDir);%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
</ItemGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
...
...
Prev
1
2
3
4
5
6
7
8
Next
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