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
bc2d0935
Unverified
Commit
bc2d0935
authored
Sep 14, 2018
by
Gennadiy Civil
Committed by
GitHub
Sep 14, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1838 from google/
c370cf06
Googletest export
parents
28c2989e
fc2caf64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
21 deletions
+1
-21
.travis.yml
.travis.yml
+0
-11
gtest_unittest.cc
googletest/test/gtest_unittest.cc
+1
-10
No files found.
.travis.yml
View file @
bc2d0935
...
@@ -32,25 +32,14 @@ matrix:
...
@@ -32,25 +32,14 @@ matrix:
-
os
:
linux
-
os
:
linux
group
:
deprecated-2017Q4
group
:
deprecated-2017Q4
compiler
:
clang
compiler
:
clang
env
:
BUILD_TYPE=Debug VERBOSE=1
-
os
:
linux
group
:
deprecated-2017Q4
compiler
:
clang
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
-
os
:
linux
-
os
:
linux
compiler
:
clang
compiler
:
clang
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON
-
os
:
osx
-
os
:
osx
compiler
:
gcc
compiler
:
gcc
env
:
BUILD_TYPE=Debug VERBOSE=1
-
os
:
osx
compiler
:
gcc
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
-
os
:
osx
-
os
:
osx
compiler
:
clang
env
:
BUILD_TYPE=Debug VERBOSE=1
if
:
type != pull_request
-
os
:
osx
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
env
:
BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
if
:
type != pull_request
if
:
type != pull_request
...
...
googletest/test/gtest_unittest.cc
View file @
bc2d0935
...
@@ -63,9 +63,7 @@ TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
...
@@ -63,9 +63,7 @@ TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
#include <map>
#include <map>
#include <vector>
#include <vector>
#include <ostream>
#include <ostream>
#if GTEST_LANG_CXX11
#include <unordered_set>
#include <unordered_set>
#endif // GTEST_LANG_CXX11
#include "gtest/gtest-spi.h"
#include "gtest/gtest-spi.h"
#include "src/gtest-internal-inl.h"
#include "src/gtest-internal-inl.h"
...
@@ -5156,8 +5154,7 @@ TEST(AssertionResultTest, CanStreamOstreamManipulators) {
...
@@ -5156,8 +5154,7 @@ TEST(AssertionResultTest, CanStreamOstreamManipulators) {
EXPECT_STREQ
(
"Data
\n\\
0Will be visible"
,
r
.
message
());
EXPECT_STREQ
(
"Data
\n\\
0Will be visible"
,
r
.
message
());
}
}
// The next test uses explicit conversion operators -- a C++11 feature.
// The next test uses explicit conversion operators
#if GTEST_LANG_CXX11
TEST
(
AssertionResultTest
,
ConstructibleFromContextuallyConvertibleToBool
)
{
TEST
(
AssertionResultTest
,
ConstructibleFromContextuallyConvertibleToBool
)
{
struct
ExplicitlyConvertibleToBool
{
struct
ExplicitlyConvertibleToBool
{
...
@@ -5170,8 +5167,6 @@ TEST(AssertionResultTest, ConstructibleFromContextuallyConvertibleToBool) {
...
@@ -5170,8 +5167,6 @@ TEST(AssertionResultTest, ConstructibleFromContextuallyConvertibleToBool) {
EXPECT_TRUE
(
v2
);
EXPECT_TRUE
(
v2
);
}
}
#endif // GTEST_LANG_CXX11
struct
ConvertibleToAssertionResult
{
struct
ConvertibleToAssertionResult
{
operator
AssertionResult
()
const
{
return
AssertionResult
(
true
);
}
operator
AssertionResult
()
const
{
return
AssertionResult
(
true
);
}
};
};
...
@@ -7555,7 +7550,6 @@ TEST(IsContainerTestTest, WorksForContainer) {
...
@@ -7555,7 +7550,6 @@ TEST(IsContainerTestTest, WorksForContainer) {
sizeof
(
IsContainerTest
<
std
::
map
<
int
,
double
>
>
(
0
)));
sizeof
(
IsContainerTest
<
std
::
map
<
int
,
double
>
>
(
0
)));
}
}
#if GTEST_LANG_CXX11
struct
ConstOnlyContainerWithPointerIterator
{
struct
ConstOnlyContainerWithPointerIterator
{
using
const_iterator
=
int
*
;
using
const_iterator
=
int
*
;
const_iterator
begin
()
const
;
const_iterator
begin
()
const
;
...
@@ -7577,7 +7571,6 @@ TEST(IsContainerTestTest, ConstOnlyContainer) {
...
@@ -7577,7 +7571,6 @@ TEST(IsContainerTestTest, ConstOnlyContainer) {
EXPECT_EQ
(
sizeof
(
IsContainer
),
EXPECT_EQ
(
sizeof
(
IsContainer
),
sizeof
(
IsContainerTest
<
ConstOnlyContainerWithClassIterator
>
(
0
)));
sizeof
(
IsContainerTest
<
ConstOnlyContainerWithClassIterator
>
(
0
)));
}
}
#endif // GTEST_LANG_CXX11
// Tests IsHashTable.
// Tests IsHashTable.
struct
AHashTable
{
struct
AHashTable
{
...
@@ -7590,10 +7583,8 @@ struct NotReallyAHashTable {
...
@@ -7590,10 +7583,8 @@ struct NotReallyAHashTable {
TEST
(
IsHashTable
,
Basic
)
{
TEST
(
IsHashTable
,
Basic
)
{
EXPECT_TRUE
(
testing
::
internal
::
IsHashTable
<
AHashTable
>::
value
);
EXPECT_TRUE
(
testing
::
internal
::
IsHashTable
<
AHashTable
>::
value
);
EXPECT_FALSE
(
testing
::
internal
::
IsHashTable
<
NotReallyAHashTable
>::
value
);
EXPECT_FALSE
(
testing
::
internal
::
IsHashTable
<
NotReallyAHashTable
>::
value
);
#if GTEST_LANG_CXX11
EXPECT_FALSE
(
testing
::
internal
::
IsHashTable
<
std
::
vector
<
int
>>::
value
);
EXPECT_FALSE
(
testing
::
internal
::
IsHashTable
<
std
::
vector
<
int
>>::
value
);
EXPECT_TRUE
(
testing
::
internal
::
IsHashTable
<
std
::
unordered_set
<
int
>>::
value
);
EXPECT_TRUE
(
testing
::
internal
::
IsHashTable
<
std
::
unordered_set
<
int
>>::
value
);
#endif // GTEST_LANG_CXX11
#if GTEST_HAS_HASH_SET_
#if GTEST_HAS_HASH_SET_
EXPECT_TRUE
(
testing
::
internal
::
IsHashTable
<
__gnu_cxx
::
hash_set
<
int
>>::
value
);
EXPECT_TRUE
(
testing
::
internal
::
IsHashTable
<
__gnu_cxx
::
hash_set
<
int
>>::
value
);
#endif // GTEST_HAS_HASH_SET_
#endif // GTEST_HAS_HASH_SET_
...
...
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