Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
18489fa4
Commit
18489fa4
authored
Dec 04, 2013
by
kosak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Distinguish between C++11 language and library support for <initializer_list>.
Fix spelling: repositary -> repository. Pull in gtest 671.
parent
6414d806
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
README
README
+2
-2
gmock-matchers.h
include/gmock/gmock-matchers.h
+4
-4
gmock-generated-matchers_test.cc
test/gmock-generated-matchers_test.cc
+2
-2
gmock-matchers_test.cc
test/gmock-matchers_test.cc
+2
-2
No files found.
README
View file @
18489fa4
...
@@ -42,7 +42,7 @@ Requirements for End Users
...
@@ -42,7 +42,7 @@ Requirements for End Users
Google Mock is implemented on top of the Google Test C++ testing
Google Mock is implemented on top of the Google Test C++ testing
framework (http://code.google.com/p/googletest/), and includes the
framework (http://code.google.com/p/googletest/), and includes the
latter as part of the SVN reposit
a
ry and distribution package. You
latter as part of the SVN reposit
o
ry and distribution package. You
must use the bundled version of Google Test when using Google Mock, or
must use the bundled version of Google Test when using Google Mock, or
you may get compiler/linker errors.
you may get compiler/linker errors.
...
@@ -92,7 +92,7 @@ Getting the Source
...
@@ -92,7 +92,7 @@ Getting the Source
There are two primary ways of getting Google Mock'
s
source
code
:
you
There are two primary ways of getting Google Mock'
s
source
code
:
you
can
download
a
stable
source
release
in
your
preferred
archive
format
,
can
download
a
stable
source
release
in
your
preferred
archive
format
,
or
directly
check
out
the
source
from
our
Subversion
(
SVN
)
reposit
a
ry
.
or
directly
check
out
the
source
from
our
Subversion
(
SVN
)
reposit
o
ry
.
The
SVN
checkout
requires
a
few
extra
steps
and
some
extra
software
The
SVN
checkout
requires
a
few
extra
steps
and
some
extra
software
packages
on
your
system
,
but
lets
you
track
development
and
make
packages
on
your
system
,
but
lets
you
track
development
and
make
patches
much
more
easily
,
so
we
highly
encourage
it
.
patches
much
more
easily
,
so
we
highly
encourage
it
.
...
...
include/gmock/gmock-matchers.h
View file @
18489fa4
...
@@ -52,8 +52,8 @@
...
@@ -52,8 +52,8 @@
#include "gmock/internal/gmock-port.h"
#include "gmock/internal/gmock-port.h"
#include "gtest/gtest.h"
#include "gtest/gtest.h"
#if GTEST_
LANG_CXX11
#if GTEST_
HAS_STD_INITIALIZER_LIST_
#include <initializer_list> // NOLINT -- must be after gtest.h
#
include <initializer_list> // NOLINT -- must be after gtest.h
#endif
#endif
namespace
testing
{
namespace
testing
{
...
@@ -3350,7 +3350,7 @@ inline internal::ElementsAreArrayMatcher<T> ElementsAreArray(
...
@@ -3350,7 +3350,7 @@ inline internal::ElementsAreArrayMatcher<T> ElementsAreArray(
return
ElementsAreArray
(
vec
.
begin
(),
vec
.
end
());
return
ElementsAreArray
(
vec
.
begin
(),
vec
.
end
());
}
}
#if GTEST_
LANG_CXX11
#if GTEST_
HAS_STD_INITIALIZER_LIST_
template
<
typename
T
>
template
<
typename
T
>
inline
internal
::
ElementsAreArrayMatcher
<
T
>
inline
internal
::
ElementsAreArrayMatcher
<
T
>
ElementsAreArray
(
::
std
::
initializer_list
<
T
>
xs
)
{
ElementsAreArray
(
::
std
::
initializer_list
<
T
>
xs
)
{
...
@@ -3392,7 +3392,7 @@ UnorderedElementsAreArray(const ::std::vector<T, A>& vec) {
...
@@ -3392,7 +3392,7 @@ UnorderedElementsAreArray(const ::std::vector<T, A>& vec) {
return
UnorderedElementsAreArray
(
vec
.
begin
(),
vec
.
end
());
return
UnorderedElementsAreArray
(
vec
.
begin
(),
vec
.
end
());
}
}
#if GTEST_
LANG_CXX11
#if GTEST_
HAS_STD_INITIALIZER_LIST_
template
<
typename
T
>
template
<
typename
T
>
inline
internal
::
UnorderedElementsAreArrayMatcher
<
T
>
inline
internal
::
UnorderedElementsAreArrayMatcher
<
T
>
UnorderedElementsAreArray
(
::
std
::
initializer_list
<
T
>
xs
)
{
UnorderedElementsAreArray
(
::
std
::
initializer_list
<
T
>
xs
)
{
...
...
test/gmock-generated-matchers_test.cc
View file @
18489fa4
...
@@ -630,7 +630,7 @@ TEST(ElementsAreArrayTest, CanBeCreatedWithVector) {
...
@@ -630,7 +630,7 @@ TEST(ElementsAreArrayTest, CanBeCreatedWithVector) {
EXPECT_THAT
(
test_vector
,
Not
(
ElementsAreArray
(
expected
)));
EXPECT_THAT
(
test_vector
,
Not
(
ElementsAreArray
(
expected
)));
}
}
#if GTEST_
LANG_CXX11
#if GTEST_
HAS_STD_INITIALIZER_LIST_
TEST
(
ElementsAreArrayTest
,
TakesInitializerList
)
{
TEST
(
ElementsAreArrayTest
,
TakesInitializerList
)
{
const
int
a
[
5
]
=
{
1
,
2
,
3
,
4
,
5
};
const
int
a
[
5
]
=
{
1
,
2
,
3
,
4
,
5
};
...
@@ -666,7 +666,7 @@ TEST(ElementsAreArrayTest,
...
@@ -666,7 +666,7 @@ TEST(ElementsAreArrayTest,
{
Eq
(
1
),
Ne
(
-
2
),
Ge
(
3
),
Le
(
4
),
Eq
(
6
)
})));
{
Eq
(
1
),
Ne
(
-
2
),
Ge
(
3
),
Le
(
4
),
Eq
(
6
)
})));
}
}
#endif // GTEST_
LANG_CXX11
#endif // GTEST_
HAS_STD_INITIALIZER_LIST_
TEST
(
ElementsAreArrayTest
,
CanBeCreatedWithMatcherVector
)
{
TEST
(
ElementsAreArrayTest
,
CanBeCreatedWithMatcherVector
)
{
const
int
a
[]
=
{
1
,
2
,
3
};
const
int
a
[]
=
{
1
,
2
,
3
};
...
...
test/gmock-matchers_test.cc
View file @
18489fa4
...
@@ -4503,7 +4503,7 @@ TEST(UnorderedElementsAreArrayTest, WorksForStreamlike) {
...
@@ -4503,7 +4503,7 @@ TEST(UnorderedElementsAreArrayTest, WorksForStreamlike) {
EXPECT_THAT
(
s
,
Not
(
UnorderedElementsAreArray
(
expected
)));
EXPECT_THAT
(
s
,
Not
(
UnorderedElementsAreArray
(
expected
)));
}
}
#if GTEST_
LANG_CXX11
#if GTEST_
HAS_STD_INITIALIZER_LIST_
TEST
(
UnorderedElementsAreArrayTest
,
TakesInitializerList
)
{
TEST
(
UnorderedElementsAreArrayTest
,
TakesInitializerList
)
{
const
int
a
[
5
]
=
{
2
,
1
,
4
,
5
,
3
};
const
int
a
[
5
]
=
{
2
,
1
,
4
,
5
,
3
};
...
@@ -4537,7 +4537,7 @@ TEST(UnorderedElementsAreArrayTest,
...
@@ -4537,7 +4537,7 @@ TEST(UnorderedElementsAreArrayTest,
{
Eq
(
1
),
Ne
(
-
2
),
Ge
(
3
),
Le
(
4
),
Eq
(
6
)
})));
{
Eq
(
1
),
Ne
(
-
2
),
Ge
(
3
),
Le
(
4
),
Eq
(
6
)
})));
}
}
#endif // GTEST_
LANG_CXX11
#endif // GTEST_
HAS_STD_INITIALIZER_LIST_
class
UnorderedElementsAreTest
:
public
testing
::
Test
{
class
UnorderedElementsAreTest
:
public
testing
::
Test
{
protected
:
protected
:
...
...
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