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
f6887b5c
Unverified
Commit
f6887b5c
authored
Jan 13, 2018
by
Gennadiy Civil
Committed by
GitHub
Jan 13, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into fix-core-dump-shared
parents
0e6da4ce
63ded6c2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
146 additions
and
120 deletions
+146
-120
.travis.yml
.travis.yml
+6
-4
.keep
googletest/build-aux/.keep
+0
-0
gtest-death-test.h
googletest/include/gtest/gtest-death-test.h
+51
-3
gtest-message.h
googletest/include/gtest/gtest-message.h
+0
-1
gtest-param-test.h
googletest/include/gtest/gtest-param-test.h
+22
-19
gtest-param-test.h.pump
googletest/include/gtest/gtest-param-test.h.pump
+2
-2
gtest-typed-test.h
googletest/include/gtest/gtest-typed-test.h
+1
-1
gtest.h
googletest/include/gtest/gtest.h
+6
-1
gtest-port.h
googletest/include/gtest/internal/custom/gtest-port.h
+3
-0
gtest.h
googletest/include/gtest/internal/custom/gtest.h
+1
-1
gtest-death-test-internal.h
...letest/include/gtest/internal/gtest-death-test-internal.h
+0
-48
gtest-filepath.h
googletest/include/gtest/internal/gtest-filepath.h
+1
-2
gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+29
-7
gtest-param-util-generated.h
...etest/include/gtest/internal/gtest-param-util-generated.h
+0
-0
gtest-param-util-generated.h.pump
.../include/gtest/internal/gtest-param-util-generated.h.pump
+3
-3
gtest-string.h
googletest/include/gtest/internal/gtest-string.h
+2
-2
gtest-filepath.cc
googletest/src/gtest-filepath.cc
+4
-6
gtest.cc
googletest/src/gtest.cc
+2
-3
gtest-param-test2_test.cc
googletest/test/gtest-param-test2_test.cc
+0
-1
gtest-printers_test.cc
googletest/test/gtest-printers_test.cc
+11
-14
production.cc
googletest/test/production.cc
+1
-1
production.h
googletest/test/production.h
+1
-1
No files found.
.travis.yml
View file @
f6887b5c
...
@@ -12,27 +12,29 @@ matrix:
...
@@ -12,27 +12,29 @@ matrix:
include
:
include
:
-
os
:
linux
-
os
:
linux
compiler
:
gcc
compiler
:
gcc
sudo
:
true
sudo
:
true
cache
:
install
:
./ci/install-linux.sh && ./ci/log-config.sh
install
:
./ci/install-linux.sh && ./ci/log-config.sh
script
:
./ci/build-linux-bazel.sh
script
:
./ci/build-linux-bazel.sh
-
os
:
linux
-
os
:
linux
compiler
:
clang
compiler
:
clang
sudo
:
true
sudo
:
true
cache
:
install
:
./ci/install-linux.sh && ./ci/log-config.sh
install
:
./ci/install-linux.sh && ./ci/log-config.sh
script
:
./ci/build-linux-bazel.sh
script
:
./ci/build-linux-bazel.sh
-
os
:
linux
-
os
:
linux
group
:
deprecated-2017Q4
compiler
:
gcc
compiler
:
gcc
install
:
./ci/install-linux.sh && ./ci/log-config.sh
install
:
./ci/install-linux.sh && ./ci/log-config.sh
script
:
./ci/build-linux-autotools.sh
script
:
./ci/build-linux-autotools.sh
-
os
:
linux
-
os
:
linux
group
:
deprecated-2017Q4
compiler
:
gcc
compiler
:
gcc
env
:
BUILD_TYPE=Debug VERBOSE=1 CXX_FLAGS=-std=c++11
env
:
BUILD_TYPE=Debug VERBOSE=1 CXX_FLAGS=-std=c++11
-
os
:
linux
-
os
:
linux
group
:
deprecated-2017Q4
compiler
:
clang
compiler
:
clang
env
:
BUILD_TYPE=Debug VERBOSE=1
env
:
BUILD_TYPE=Debug VERBOSE=1
-
os
:
linux
-
os
:
linux
group
:
deprecated-2017Q4
compiler
:
clang
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
:
osx
-
os
:
osx
...
...
googletest/build-aux/.keep
deleted
100644 → 0
View file @
0e6da4ce
googletest/include/gtest/gtest-death-test.h
View file @
f6887b5c
...
@@ -102,7 +102,7 @@ GTEST_API_ bool InDeathTestChild();
...
@@ -102,7 +102,7 @@ GTEST_API_ bool InDeathTestChild();
// On POSIX-compliant systems (*nix), we use the <regex.h> library,
// On POSIX-compliant systems (*nix), we use the <regex.h> library,
// which uses the POSIX extended regex syntax.
// which uses the POSIX extended regex syntax.
//
//
// On other platforms (e.g. Windows), we only support a simple regex
// On other platforms (e.g. Windows
or Mac
), we only support a simple regex
// syntax implemented as part of Google Test. This limited
// syntax implemented as part of Google Test. This limited
// implementation should be enough most of the time when writing
// implementation should be enough most of the time when writing
// death tests; though it lacks many features you can find in PCRE
// death tests; though it lacks many features you can find in PCRE
...
@@ -272,6 +272,54 @@ class GTEST_API_ KilledBySignal {
...
@@ -272,6 +272,54 @@ class GTEST_API_ KilledBySignal {
# endif // NDEBUG for EXPECT_DEBUG_DEATH
# endif // NDEBUG for EXPECT_DEBUG_DEATH
#endif // GTEST_HAS_DEATH_TEST
#endif // GTEST_HAS_DEATH_TEST
// This macro is used for implementing macros such as
// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
// death tests are not supported. Those macros must compile on such systems
// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
// systems that support death tests. This allows one to write such a macro
// on a system that does not support death tests and be sure that it will
// compile on a death-test supporting system. It is exposed publicly so that
// systems that have death-tests with stricter requirements than
// GTEST_HAS_DEATH_TEST can write their own equivalent of
// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED.
//
// Parameters:
// statement - A statement that a macro such as EXPECT_DEATH would test
// for program termination. This macro has to make sure this
// statement is compiled but not executed, to ensure that
// EXPECT_DEATH_IF_SUPPORTED compiles with a certain
// parameter iff EXPECT_DEATH compiles with it.
// regex - A regex that a macro such as EXPECT_DEATH would use to test
// the output of statement. This parameter has to be
// compiled but not evaluated by this macro, to ensure that
// this macro only accepts expressions that a macro such as
// EXPECT_DEATH would accept.
// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
// and a return statement for ASSERT_DEATH_IF_SUPPORTED.
// This ensures that ASSERT_DEATH_IF_SUPPORTED will not
// compile inside functions where ASSERT_DEATH doesn't
// compile.
//
// The branch that has an always false condition is used to ensure that
// statement and regex are compiled (and thus syntactically correct) but
// never executed. The unreachable code macro protects the terminator
// statement from generating an 'unreachable code' warning in case
// statement unconditionally returns or throws. The Message constructor at
// the end allows the syntax of streaming additional messages into the
// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
# define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::AlwaysTrue()) { \
GTEST_LOG_(WARNING) \
<< "Death tests are not supported on this platform.\n" \
<< "Statement '" #statement "' cannot be verified."; \
} else if (::testing::internal::AlwaysFalse()) { \
::testing::internal::RE::PartialMatch(".*", (regex)); \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
terminator; \
} else \
::testing::Message()
// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
// death tests are supported; otherwise they just issue a warning. This is
// death tests are supported; otherwise they just issue a warning. This is
...
@@ -284,9 +332,9 @@ class GTEST_API_ KilledBySignal {
...
@@ -284,9 +332,9 @@ class GTEST_API_ KilledBySignal {
ASSERT_DEATH(statement, regex)
ASSERT_DEATH(statement, regex)
#else
#else
# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
GTEST_UNSUPPORTED_DEATH_TEST
_
(statement, regex, )
GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, )
# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
GTEST_UNSUPPORTED_DEATH_TEST
_
(statement, regex, return)
GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, return)
#endif
#endif
}
// namespace testing
}
// namespace testing
...
...
googletest/include/gtest/gtest-message.h
View file @
f6887b5c
...
@@ -196,7 +196,6 @@ class GTEST_API_ Message {
...
@@ -196,7 +196,6 @@ class GTEST_API_ Message {
std
::
string
GetString
()
const
;
std
::
string
GetString
()
const
;
private
:
private
:
#if GTEST_OS_SYMBIAN
#if GTEST_OS_SYMBIAN
// These are needed as the Nokia Symbian Compiler cannot decide between
// These are needed as the Nokia Symbian Compiler cannot decide between
// const T& and const T* in a function template. The Nokia compiler _can_
// const T& and const T* in a function template. The Nokia compiler _can_
...
...
googletest/include/gtest/gtest-param-test.h
View file @
f6887b5c
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
//
//
// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
//
//
#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
...
@@ -79,7 +80,7 @@ TEST_P(FooTest, HasBlahBlah) {
...
@@ -79,7 +80,7 @@ TEST_P(FooTest, HasBlahBlah) {
// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
// case with any set of parameters you want. Google Test defines a number
// case with any set of parameters you want. Google Test defines a number
// of functions for generating test parameters. They return what we call
// of functions for generating test parameters. They return what we call
// (surprise!) parameter generators. Here is a
summary of them, which
// (surprise!) parameter generators. Here is a summary of them, which
// are all in the testing namespace:
// are all in the testing namespace:
//
//
//
//
...
@@ -268,7 +269,7 @@ internal::ParamGenerator<T> Range(T start, T end) {
...
@@ -268,7 +269,7 @@ internal::ParamGenerator<T> Range(T start, T end) {
// each with C-string values of "foo", "bar", and "baz":
// each with C-string values of "foo", "bar", and "baz":
//
//
// const char* strings[] = {"foo", "bar", "baz"};
// const char* strings[] = {"foo", "bar", "baz"};
// INSTANTIATE_TEST_CASE_P(StringSequence, S
rt
ingTest, ValuesIn(strings));
// INSTANTIATE_TEST_CASE_P(StringSequence, S
tr
ingTest, ValuesIn(strings));
//
//
// This instantiates tests from test case StlStringTest
// This instantiates tests from test case StlStringTest
// each with STL strings with values "a" and "b":
// each with STL strings with values "a" and "b":
...
@@ -1413,24 +1414,26 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
...
@@ -1413,24 +1414,26 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
// alphanumeric characters or underscore. Because PrintToString adds quotes
// alphanumeric characters or underscore. Because PrintToString adds quotes
// to std::string and C strings, it won't work for these types.
// to std::string and C strings, it won't work for these types.
# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator, ...) \
#define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator, ...) \
static ::testing::internal::ParamGenerator<test_case_name::ParamType> \
static ::testing::internal::ParamGenerator<test_case_name::ParamType> \
gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
gtest_##prefix##test_case_name##_EvalGenerator_() { \
static ::std::string gtest_##prefix##test_case_name##_EvalGenerateName_( \
return generator; \
const ::testing::TestParamInfo<test_case_name::ParamType>& info) { \
} \
return ::testing::internal::GetParamNameGen<test_case_name::ParamType> \
static ::std::string gtest_##prefix##test_case_name##_EvalGenerateName_( \
(__VA_ARGS__)(info); \
const ::testing::TestParamInfo<test_case_name::ParamType>& info) { \
} \
return ::testing::internal::GetParamNameGen<test_case_name::ParamType>( \
__VA_ARGS__)(info); \
} \
static int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
static int gtest_##prefix##test_case_name##_dummy_ GTEST_ATTRIBUTE_UNUSED_ = \
::testing::UnitTest::GetInstance()
->parameterized_test_registry().
\
::testing::UnitTest::GetInstance()
\
GetTestCasePatternHolder<test_case_name>(
\
->parameterized_test_registry()
\
#test_case_name,
\
.GetTestCasePatternHolder<test_case_name>(
\
::testing::internal::CodeLocation(
\
#test_case_name,
\
__FILE__, __LINE__))->AddTestCaseInstantiation(
\
::testing::internal::CodeLocation(__FILE__, __LINE__))
\
#prefix,
\
->AddTestCaseInstantiation(
\
>est_##prefix##test_case_name##_EvalGenerator_,
\
#prefix, >est_##prefix##test_case_name##_EvalGenerator_,
\
>est_##prefix##test_case_name##_EvalGenerateName_,
\
>est_##prefix##test_case_name##_EvalGenerateName_, __FILE__,
\
__FILE__,
__LINE__)
__LINE__)
}
// namespace testing
}
// namespace testing
...
...
googletest/include/gtest/gtest-param-test.h.pump
View file @
f6887b5c
...
@@ -78,7 +78,7 @@ TEST_P(FooTest, HasBlahBlah) {
...
@@ -78,7 +78,7 @@ TEST_P(FooTest, HasBlahBlah) {
// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
// case with any set of parameters you want. Google Test defines a number
// case with any set of parameters you want. Google Test defines a number
// of functions for generating test parameters. They return what we call
// of functions for generating test parameters. They return what we call
// (surprise!) parameter generators. Here is a
summary of them, which
// (surprise!) parameter generators. Here is a summary of them, which
// are all in the testing namespace:
// are all in the testing namespace:
//
//
//
//
...
@@ -267,7 +267,7 @@ internal::ParamGenerator<T> Range(T start, T end) {
...
@@ -267,7 +267,7 @@ internal::ParamGenerator<T> Range(T start, T end) {
// each with C-string values of "foo", "bar", and "baz":
// each with C-string values of "foo", "bar", and "baz":
//
//
// const char* strings[] = {"foo", "bar", "baz"};
// const char* strings[] = {"foo", "bar", "baz"};
// INSTANTIATE_TEST_CASE_P(StringSequence, S
rt
ingTest, ValuesIn(strings));
// INSTANTIATE_TEST_CASE_P(StringSequence, S
tr
ingTest, ValuesIn(strings));
//
//
// This instantiates tests from test case StlStringTest
// This instantiates tests from test case StlStringTest
// each with STL strings with values "a" and "b":
// each with STL strings with values "a" and "b":
...
...
googletest/include/gtest/gtest-typed-test.h
View file @
f6887b5c
...
@@ -243,7 +243,7 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
...
@@ -243,7 +243,7 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
} \
} \
static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) \
static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) \
GTEST_ATTRIBUTE_UNUSED_ = \
GTEST_ATTRIBUTE_UNUSED_ = \
GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\
GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(
\
__FILE__, __LINE__, #__VA_ARGS__)
__FILE__, __LINE__, #__VA_ARGS__)
// The 'Types' template argument below must have spaces around it
// The 'Types' template argument below must have spaces around it
...
...
googletest/include/gtest/gtest.h
View file @
f6887b5c
...
@@ -2110,9 +2110,14 @@ GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,
...
@@ -2110,9 +2110,14 @@ GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,
// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s
// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s
// to appear in the same block - as long as they are on different
// to appear in the same block - as long as they are on different
// lines.
// lines.
//
// Assuming that each thread maintains its own stack of traces.
// Therefore, a SCOPED_TRACE() would (correctly) only affect the
// assertions in its own thread.
#define SCOPED_TRACE(message) \
#define SCOPED_TRACE(message) \
::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\
::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\
__FILE__, __LINE__, ::testing::Message() << (message))
__FILE__, __LINE__, (message))
// Compile-time assertion for type equality.
// Compile-time assertion for type equality.
// StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are
// StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are
...
...
googletest/include/gtest/internal/custom/gtest-port.h
View file @
f6887b5c
...
@@ -61,6 +61,9 @@
...
@@ -61,6 +61,9 @@
// GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
// GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
// GTEST_LOCK_EXCLUDED_(locks)
// GTEST_LOCK_EXCLUDED_(locks)
//
//
// Underlying library support features:
// GTEST_HAS_CXXABI_H_
//
// Exporting API symbols:
// Exporting API symbols:
// GTEST_API_ - Specifier for exported symbols.
// GTEST_API_ - Specifier for exported symbols.
//
//
...
...
googletest/include/gtest/internal/custom/gtest.h
View file @
f6887b5c
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
// GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir().
// GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir().
// See testing::TempDir for semantics and
// See testing::TempDir for semantics and
// signature.
// signature.
//
//
// ** Custom implementation starts here **
// ** Custom implementation starts here **
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
...
...
googletest/include/gtest/internal/gtest-death-test-internal.h
View file @
f6887b5c
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
//
//
// The Google C++ Testing Framework (Google Test)
// The Google C++ Testing Framework (Google Test)
//
//
...
@@ -264,53 +263,6 @@ class InternalRunDeathTestFlag {
...
@@ -264,53 +263,6 @@ class InternalRunDeathTestFlag {
// the flag is specified; otherwise returns NULL.
// the flag is specified; otherwise returns NULL.
InternalRunDeathTestFlag
*
ParseInternalRunDeathTestFlag
();
InternalRunDeathTestFlag
*
ParseInternalRunDeathTestFlag
();
#else // GTEST_HAS_DEATH_TEST
// This macro is used for implementing macros such as
// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
// death tests are not supported. Those macros must compile on such systems
// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
// systems that support death tests. This allows one to write such a macro
// on a system that does not support death tests and be sure that it will
// compile on a death-test supporting system.
//
// Parameters:
// statement - A statement that a macro such as EXPECT_DEATH would test
// for program termination. This macro has to make sure this
// statement is compiled but not executed, to ensure that
// EXPECT_DEATH_IF_SUPPORTED compiles with a certain
// parameter iff EXPECT_DEATH compiles with it.
// regex - A regex that a macro such as EXPECT_DEATH would use to test
// the output of statement. This parameter has to be
// compiled but not evaluated by this macro, to ensure that
// this macro only accepts expressions that a macro such as
// EXPECT_DEATH would accept.
// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
// and a return statement for ASSERT_DEATH_IF_SUPPORTED.
// This ensures that ASSERT_DEATH_IF_SUPPORTED will not
// compile inside functions where ASSERT_DEATH doesn't
// compile.
//
// The branch that has an always false condition is used to ensure that
// statement and regex are compiled (and thus syntactically correct) but
// never executed. The unreachable code macro protects the terminator
// statement from generating an 'unreachable code' warning in case
// statement unconditionally returns or throws. The Message constructor at
// the end allows the syntax of streaming additional messages into the
// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
# define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::AlwaysTrue()) { \
GTEST_LOG_(WARNING) \
<< "Death tests are not supported on this platform.\n" \
<< "Statement '" #statement "' cannot be verified."; \
} else if (::testing::internal::AlwaysFalse()) { \
::testing::internal::RE::PartialMatch(".*", (regex)); \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
terminator; \
} else \
::testing::Message()
#endif // GTEST_HAS_DEATH_TEST
#endif // GTEST_HAS_DEATH_TEST
}
// namespace internal
}
// namespace internal
...
...
googletest/include/gtest/internal/gtest-filepath.h
View file @
f6887b5c
...
@@ -27,14 +27,13 @@
...
@@ -27,14 +27,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Author: keith.ray@gmail.com (Keith Ray)
//
//
// Google Test filepath utilities
// Google Test filepath utilities
//
//
// This header file declares classes and functions used internally by
// This header file declares classes and functions used internally by
// Google Test. They are subject to change without notice.
// Google Test. They are subject to change without notice.
//
//
// This file is #included in
<gtest/internal/gtest-internal.h>
.
// This file is #included in
gtest/internal/gtest-internal.h
.
// Do not include this header file separately!
// Do not include this header file separately!
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
...
...
googletest/include/gtest/internal/gtest-internal.h
View file @
f6887b5c
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
//
//
// The Google C++ Testing Framework (Google Test)
// The Google C++ Testing Framework (Google Test)
//
//
...
@@ -61,8 +60,8 @@
...
@@ -61,8 +60,8 @@
#include <vector>
#include <vector>
#include "gtest/gtest-message.h"
#include "gtest/gtest-message.h"
#include "gtest/internal/gtest-string.h"
#include "gtest/internal/gtest-filepath.h"
#include "gtest/internal/gtest-filepath.h"
#include "gtest/internal/gtest-string.h"
#include "gtest/internal/gtest-type-util.h"
#include "gtest/internal/gtest-type-util.h"
// Due to C++ preprocessor weirdness, we need double indirection to
// Due to C++ preprocessor weirdness, we need double indirection to
...
@@ -157,7 +156,28 @@ class GTEST_API_ ScopedTrace {
...
@@ -157,7 +156,28 @@ class GTEST_API_ ScopedTrace {
public
:
public
:
// The c'tor pushes the given source file location and message onto
// The c'tor pushes the given source file location and message onto
// a trace stack maintained by Google Test.
// a trace stack maintained by Google Test.
ScopedTrace
(
const
char
*
file
,
int
line
,
const
Message
&
message
);
// Template version. Uses Message() to convert the values into strings.
// Slow, but flexible.
template
<
typename
T
>
ScopedTrace
(
const
char
*
file
,
int
line
,
const
T
&
message
)
{
PushTrace
(
file
,
line
,
(
Message
()
<<
message
).
GetString
());
}
// Optimize for some known types.
ScopedTrace
(
const
char
*
file
,
int
line
,
const
char
*
message
)
{
PushTrace
(
file
,
line
,
message
?
message
:
"(null)"
);
}
#if GTEST_HAS_GLOBAL_STRING
ScopedTrace
(
const
char
*
file
,
int
line
,
const
::
string
&
message
)
{
PushTrace
(
file
,
line
,
message
);
}
#endif
ScopedTrace
(
const
char
*
file
,
int
line
,
const
std
::
string
&
message
)
{
PushTrace
(
file
,
line
,
message
);
}
// The d'tor pops the info pushed by the c'tor.
// The d'tor pops the info pushed by the c'tor.
//
//
...
@@ -166,6 +186,8 @@ class GTEST_API_ ScopedTrace {
...
@@ -166,6 +186,8 @@ class GTEST_API_ ScopedTrace {
~
ScopedTrace
();
~
ScopedTrace
();
private
:
private
:
void
PushTrace
(
const
char
*
file
,
int
line
,
std
::
string
message
);
GTEST_DISALLOW_COPY_AND_ASSIGN_
(
ScopedTrace
);
GTEST_DISALLOW_COPY_AND_ASSIGN_
(
ScopedTrace
);
}
GTEST_ATTRIBUTE_UNUSED_
;
// A ScopedTrace object does its job in its
}
GTEST_ATTRIBUTE_UNUSED_
;
// A ScopedTrace object does its job in its
// c'tor and d'tor. Therefore it doesn't
// c'tor and d'tor. Therefore it doesn't
...
@@ -175,7 +197,7 @@ namespace edit_distance {
...
@@ -175,7 +197,7 @@ namespace edit_distance {
// Returns the optimal edits to go from 'left' to 'right'.
// Returns the optimal edits to go from 'left' to 'right'.
// All edits cost the same, with replace having lower priority than
// All edits cost the same, with replace having lower priority than
// add/remove.
// add/remove.
// Simple implementation of the Wagner
-
Fischer algorithm.
// Simple implementation of the Wagner
–
Fischer algorithm.
// See http://en.wikipedia.org/wiki/Wagner-Fischer_algorithm
// See http://en.wikipedia.org/wiki/Wagner-Fischer_algorithm
enum
EditType
{
kMatch
,
kAdd
,
kRemove
,
kReplace
};
enum
EditType
{
kMatch
,
kAdd
,
kRemove
,
kReplace
};
GTEST_API_
std
::
vector
<
EditType
>
CalculateOptimalEdits
(
GTEST_API_
std
::
vector
<
EditType
>
CalculateOptimalEdits
(
...
@@ -628,7 +650,7 @@ class TypeParameterizedTest {
...
@@ -628,7 +650,7 @@ class TypeParameterizedTest {
// Types). Valid values for 'index' are [0, N - 1] where N is the
// Types). Valid values for 'index' are [0, N - 1] where N is the
// length of Types.
// length of Types.
static
bool
Register
(
const
char
*
prefix
,
static
bool
Register
(
const
char
*
prefix
,
CodeLocation
code_location
,
const
CodeLocation
&
code_location
,
const
char
*
case_name
,
const
char
*
test_names
,
const
char
*
case_name
,
const
char
*
test_names
,
int
index
)
{
int
index
)
{
typedef
typename
Types
::
Head
Type
;
typedef
typename
Types
::
Head
Type
;
...
@@ -659,7 +681,7 @@ class TypeParameterizedTest {
...
@@ -659,7 +681,7 @@ class TypeParameterizedTest {
template
<
GTEST_TEMPLATE_
Fixture
,
class
TestSel
>
template
<
GTEST_TEMPLATE_
Fixture
,
class
TestSel
>
class
TypeParameterizedTest
<
Fixture
,
TestSel
,
Types0
>
{
class
TypeParameterizedTest
<
Fixture
,
TestSel
,
Types0
>
{
public
:
public
:
static
bool
Register
(
const
char
*
/*prefix*/
,
CodeLocation
,
static
bool
Register
(
const
char
*
/*prefix*/
,
const
CodeLocation
&
,
const
char
*
/*case_name*/
,
const
char
*
/*test_names*/
,
const
char
*
/*case_name*/
,
const
char
*
/*test_names*/
,
int
/*index*/
)
{
int
/*index*/
)
{
return
true
;
return
true
;
...
@@ -705,7 +727,7 @@ class TypeParameterizedTestCase {
...
@@ -705,7 +727,7 @@ class TypeParameterizedTestCase {
template
<
GTEST_TEMPLATE_
Fixture
,
typename
Types
>
template
<
GTEST_TEMPLATE_
Fixture
,
typename
Types
>
class
TypeParameterizedTestCase
<
Fixture
,
Templates0
,
Types
>
{
class
TypeParameterizedTestCase
<
Fixture
,
Templates0
,
Types
>
{
public
:
public
:
static
bool
Register
(
const
char
*
/*prefix*/
,
CodeLocation
,
static
bool
Register
(
const
char
*
/*prefix*/
,
const
CodeLocation
&
,
const
TypedTestCasePState
*
/*state*/
,
const
TypedTestCasePState
*
/*state*/
,
const
char
*
/*case_name*/
,
const
char
*
/*test_names*/
)
{
const
char
*
/*case_name*/
,
const
char
*
/*test_names*/
)
{
return
true
;
return
true
;
...
...
googletest/include/gtest/internal/gtest-param-util-generated.h
View file @
f6887b5c
This diff is collapsed.
Click to expand it.
googletest/include/gtest/internal/gtest-param-util-generated.h.pump
View file @
f6887b5c
...
@@ -160,7 +160,7 @@ $for k [[
...
@@ -160,7 +160,7 @@ $for k [[
virtual
ParamIteratorInterface
<
ParamType
>*
Clone
()
const
{
virtual
ParamIteratorInterface
<
ParamType
>*
Clone
()
const
{
return
new
Iterator
(
*
this
);
return
new
Iterator
(
*
this
);
}
}
virtual
const
ParamType
*
Current
()
const
{
return
&
current_value_
;
}
virtual
const
ParamType
*
Current
()
const
{
return
current_value_
.
get
()
;
}
virtual
bool
Equals
(
const
ParamIteratorInterface
<
ParamType
>&
other
)
const
{
virtual
bool
Equals
(
const
ParamIteratorInterface
<
ParamType
>&
other
)
const
{
// Having the same base generator guarantees that the other
// Having the same base generator guarantees that the other
// iterator is of the same type and we can downcast.
// iterator is of the same type and we can downcast.
...
@@ -192,7 +192,7 @@ $for k [[
...
@@ -192,7 +192,7 @@ $for k [[
void
ComputeCurrentValue
()
{
void
ComputeCurrentValue
()
{
if
(
!
AtEnd
())
if
(
!
AtEnd
())
current_value_
=
ParamType
(
$
for
j
,
[[
*
current
$
(
j
)
_
]]
);
current_value_
.
reset
(
new
ParamType
(
$
for
j
,
[[
*
current
$
(
j
)
_
]])
);
}
}
bool
AtEnd
()
const
{
bool
AtEnd
()
const
{
// We must report iterator past the end of the range when either of the
// We must report iterator past the end of the range when either of the
...
@@ -217,7 +217,7 @@ $for j [[
...
@@ -217,7 +217,7 @@ $for j [[
typename
ParamGenerator
<
T
$
j
>::
iterator
current
$
(
j
)
_
;
typename
ParamGenerator
<
T
$
j
>::
iterator
current
$
(
j
)
_
;
]]
]]
ParamType
current_value_
;
linked_ptr
<
ParamType
>
current_value_
;
};
// class CartesianProductGenerator$i::Iterator
};
// class CartesianProductGenerator$i::Iterator
// No implementation - assignment is unsupported.
// No implementation - assignment is unsupported.
...
...
googletest/include/gtest/internal/gtest-string.h
View file @
f6887b5c
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
//
//
// The Google C++ Testing Framework (Google Test)
// The Google C++ Testing Framework (Google Test)
//
//
...
@@ -35,7 +34,8 @@
...
@@ -35,7 +34,8 @@
// Google Test. They are subject to change without notice. They should not used
// Google Test. They are subject to change without notice. They should not used
// by code external to Google Test.
// by code external to Google Test.
//
//
// This header file is #included by <gtest/internal/gtest-internal.h>.
// This header file is #included by
// gtest/internal/gtest-internal.h.
// It should not be #included by other files.
// It should not be #included by other files.
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
...
...
googletest/src/gtest-filepath.cc
View file @
f6887b5c
...
@@ -26,14 +26,12 @@
...
@@ -26,14 +26,12 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Authors: keith.ray@gmail.com (Keith Ray)
#include "gtest/gtest-message.h"
#include "gtest/internal/gtest-filepath.h"
#include "gtest/internal/gtest-filepath.h"
#include "gtest/internal/gtest-port.h"
#include <stdlib.h>
#include <stdlib.h>
#include "gtest/internal/gtest-port.h"
#include "gtest/gtest-message.h"
#if GTEST_OS_WINDOWS_MOBILE
#if GTEST_OS_WINDOWS_MOBILE
# include <windows.h>
# include <windows.h>
...
@@ -48,6 +46,8 @@
...
@@ -48,6 +46,8 @@
# include <climits> // Some Linux distributions define PATH_MAX here.
# include <climits> // Some Linux distributions define PATH_MAX here.
#endif // GTEST_OS_WINDOWS_MOBILE
#endif // GTEST_OS_WINDOWS_MOBILE
#include "gtest/internal/gtest-string.h"
#if GTEST_OS_WINDOWS
#if GTEST_OS_WINDOWS
# define GTEST_PATH_MAX_ _MAX_PATH
# define GTEST_PATH_MAX_ _MAX_PATH
#elif defined(PATH_MAX)
#elif defined(PATH_MAX)
...
@@ -58,8 +58,6 @@
...
@@ -58,8 +58,6 @@
# define GTEST_PATH_MAX_ _POSIX_PATH_MAX
# define GTEST_PATH_MAX_ _POSIX_PATH_MAX
#endif // GTEST_OS_WINDOWS
#endif // GTEST_OS_WINDOWS
#include "gtest/internal/gtest-string.h"
namespace
testing
{
namespace
testing
{
namespace
internal
{
namespace
internal
{
...
...
googletest/src/gtest.cc
View file @
f6887b5c
...
@@ -3839,12 +3839,11 @@ void StreamingListener::SocketWriter::MakeConnection() {
...
@@ -3839,12 +3839,11 @@ void StreamingListener::SocketWriter::MakeConnection() {
// Pushes the given source file location and message onto a per-thread
// Pushes the given source file location and message onto a per-thread
// trace stack maintained by Google Test.
// trace stack maintained by Google Test.
ScopedTrace
::
ScopedTrace
(
const
char
*
file
,
int
line
,
const
Message
&
message
)
void
ScopedTrace
::
PushTrace
(
const
char
*
file
,
int
line
,
std
::
string
message
)
{
GTEST_LOCK_EXCLUDED_
(
&
UnitTest
::
mutex_
)
{
TraceInfo
trace
;
TraceInfo
trace
;
trace
.
file
=
file
;
trace
.
file
=
file
;
trace
.
line
=
line
;
trace
.
line
=
line
;
trace
.
message
=
message
.
GetString
(
);
trace
.
message
.
swap
(
message
);
UnitTest
::
GetInstance
()
->
PushGTestTrace
(
trace
);
UnitTest
::
GetInstance
()
->
PushGTestTrace
(
trace
);
}
}
...
...
googletest/test/gtest-param-test2_test.cc
View file @
f6887b5c
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
// Google Test work.
// Google Test work.
#include "gtest/gtest.h"
#include "gtest/gtest.h"
#include "test/gtest-param-test_test.h"
#include "test/gtest-param-test_test.h"
using
::
testing
::
Values
;
using
::
testing
::
Values
;
...
...
googletest/test/gtest-printers_test.cc
View file @
f6887b5c
...
@@ -52,13 +52,13 @@
...
@@ -52,13 +52,13 @@
// hash_map and hash_set are available under Visual C++, or on Linux.
// hash_map and hash_set are available under Visual C++, or on Linux.
#if GTEST_HAS_UNORDERED_MAP_
#if GTEST_HAS_UNORDERED_MAP_
# include <unordered_map>
// NOLINT
# include <unordered_map> // NOLINT
#elif GTEST_HAS_HASH_MAP_
#elif GTEST_HAS_HASH_MAP_
# include <hash_map> // NOLINT
# include <hash_map> // NOLINT
#endif // GTEST_HAS_HASH_MAP_
#endif // GTEST_HAS_HASH_MAP_
#if GTEST_HAS_UNORDERED_SET_
#if GTEST_HAS_UNORDERED_SET_
# include <unordered_set>
// NOLINT
# include <unordered_set> // NOLINT
#elif GTEST_HAS_HASH_SET_
#elif GTEST_HAS_HASH_SET_
# include <hash_set> // NOLINT
# include <hash_set> // NOLINT
#endif // GTEST_HAS_HASH_SET_
#endif // GTEST_HAS_HASH_SET_
...
@@ -192,13 +192,12 @@ inline ::std::ostream& operator<<(::std::ostream& os,
...
@@ -192,13 +192,12 @@ inline ::std::ostream& operator<<(::std::ostream& os,
return
os
<<
"StreamableTemplateInFoo: "
<<
x
.
value
();
return
os
<<
"StreamableTemplateInFoo: "
<<
x
.
value
();
}
}
// A user-defined streamable but recursivly-defined container type in
// A user-defined streamable but recursivly-defined container type in
// a user namespace, it mimics therefore std::filesystem::path or
// a user namespace, it mimics therefore std::filesystem::path or
// boost::filesystem::path.
// boost::filesystem::path.
class
PathLike
{
class
PathLike
{
public
:
public
:
struct
iterator
struct
iterator
{
{
typedef
PathLike
value_type
;
typedef
PathLike
value_type
;
};
};
typedef
iterator
const_iterator
;
typedef
iterator
const_iterator
;
...
@@ -208,9 +207,7 @@ class PathLike {
...
@@ -208,9 +207,7 @@ class PathLike {
iterator
begin
()
const
{
return
iterator
();
}
iterator
begin
()
const
{
return
iterator
();
}
iterator
end
()
const
{
return
iterator
();
}
iterator
end
()
const
{
return
iterator
();
}
friend
friend
::
std
::
ostream
&
operator
<<
(
::
std
::
ostream
&
os
,
const
PathLike
&
)
{
::
std
::
ostream
&
operator
<<
(
::
std
::
ostream
&
os
,
const
PathLike
&
)
{
return
os
<<
"Streamable-PathLike"
;
return
os
<<
"Streamable-PathLike"
;
}
}
};
};
...
@@ -250,9 +247,9 @@ using ::testing::internal::string;
...
@@ -250,9 +247,9 @@ using ::testing::internal::string;
#if GTEST_HAS_UNORDERED_MAP_
#if GTEST_HAS_UNORDERED_MAP_
#define GTEST_HAS_HASH_MAP_ 1
#define GTEST_HAS_HASH_MAP_ 1
template
<
class
Key
,
class
T
>
template
<
class
Key
,
class
T
>
using
hash_map
=
::
std
::
unordered_map
<
Key
,
T
>
;
using
hash_map
=
::
std
::
unordered_map
<
Key
,
T
>
;
template
<
class
Key
,
class
T
>
template
<
class
Key
,
class
T
>
using
hash_multimap
=
::
std
::
unordered_multimap
<
Key
,
T
>
;
using
hash_multimap
=
::
std
::
unordered_multimap
<
Key
,
T
>
;
#elif GTEST_HAS_HASH_MAP_
#elif GTEST_HAS_HASH_MAP_
...
@@ -270,9 +267,9 @@ using ::stdext::hash_multimap;
...
@@ -270,9 +267,9 @@ using ::stdext::hash_multimap;
#if GTEST_HAS_UNORDERED_SET_
#if GTEST_HAS_UNORDERED_SET_
#define GTEST_HAS_HASH_SET_ 1
#define GTEST_HAS_HASH_SET_ 1
template
<
class
Key
>
template
<
class
Key
>
using
hash_set
=
::
std
::
unordered_set
<
Key
>
;
using
hash_set
=
::
std
::
unordered_set
<
Key
>
;
template
<
class
Key
>
template
<
class
Key
>
using
hash_multiset
=
::
std
::
unordered_multiset
<
Key
>
;
using
hash_multiset
=
::
std
::
unordered_multiset
<
Key
>
;
#elif GTEST_HAS_HASH_SET_
#elif GTEST_HAS_HASH_SET_
...
@@ -1092,7 +1089,7 @@ TEST(PrintTr1TupleTest, VariousSizes) {
...
@@ -1092,7 +1089,7 @@ TEST(PrintTr1TupleTest, VariousSizes) {
::
std
::
tr1
::
tuple
<
bool
,
char
,
short
,
testing
::
internal
::
Int32
,
// NOLINT
::
std
::
tr1
::
tuple
<
bool
,
char
,
short
,
testing
::
internal
::
Int32
,
// NOLINT
testing
::
internal
::
Int64
,
float
,
double
,
const
char
*
,
void
*
,
testing
::
internal
::
Int64
,
float
,
double
,
const
char
*
,
void
*
,
std
::
string
>
std
::
string
>
t10
(
false
,
'a'
,
static_cast
<
short
>
(
3
),
4
,
5
,
1.5
F
,
-
2.5
,
str
,
t10
(
false
,
'a'
,
static_cast
<
short
>
(
3
),
4
,
5
,
1.5
F
,
-
2.5
,
str
,
// NOLINT
ImplicitCast_
<
void
*>
(
NULL
),
"10"
);
ImplicitCast_
<
void
*>
(
NULL
),
"10"
);
EXPECT_EQ
(
"(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, "
+
PrintPointer
(
str
)
+
EXPECT_EQ
(
"(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, "
+
PrintPointer
(
str
)
+
" pointing to
\"
8
\"
, NULL,
\"
10
\"
)"
,
" pointing to
\"
8
\"
, NULL,
\"
10
\"
)"
,
...
@@ -1152,7 +1149,7 @@ TEST(PrintStdTupleTest, VariousSizes) {
...
@@ -1152,7 +1149,7 @@ TEST(PrintStdTupleTest, VariousSizes) {
::
std
::
tuple
<
bool
,
char
,
short
,
testing
::
internal
::
Int32
,
// NOLINT
::
std
::
tuple
<
bool
,
char
,
short
,
testing
::
internal
::
Int32
,
// NOLINT
testing
::
internal
::
Int64
,
float
,
double
,
const
char
*
,
void
*
,
testing
::
internal
::
Int64
,
float
,
double
,
const
char
*
,
void
*
,
std
::
string
>
std
::
string
>
t10
(
false
,
'a'
,
static_cast
<
short
>
(
3
),
4
,
5
,
1.5
F
,
-
2.5
,
str
,
t10
(
false
,
'a'
,
static_cast
<
short
>
(
3
),
4
,
5
,
1.5
F
,
-
2.5
,
str
,
// NOLINT
ImplicitCast_
<
void
*>
(
NULL
),
"10"
);
ImplicitCast_
<
void
*>
(
NULL
),
"10"
);
EXPECT_EQ
(
"(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, "
+
PrintPointer
(
str
)
+
EXPECT_EQ
(
"(false, 'a' (97, 0x61), 3, 4, 5, 1.5, -2.5, "
+
PrintPointer
(
str
)
+
" pointing to
\"
8
\"
, NULL,
\"
10
\"
)"
,
" pointing to
\"
8
\"
, NULL,
\"
10
\"
)"
,
...
...
googletest/test/production.cc
View file @
f6887b5c
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
//
//
// Author: wan@google.com (Zhanyong Wan)
// Author: wan@google.com (Zhanyong Wan)
//
//
// This is part of the unit test for
include/gtest/
gtest_prod.h.
// This is part of the unit test for gtest_prod.h.
#include "production.h"
#include "production.h"
...
...
googletest/test/production.h
View file @
f6887b5c
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
//
//
// Author: wan@google.com (Zhanyong Wan)
// Author: wan@google.com (Zhanyong Wan)
//
//
// This is part of the unit test for
include/gtest/
gtest_prod.h.
// This is part of the unit test for gtest_prod.h.
#ifndef GTEST_TEST_PRODUCTION_H_
#ifndef GTEST_TEST_PRODUCTION_H_
#define GTEST_TEST_PRODUCTION_H_
#define GTEST_TEST_PRODUCTION_H_
...
...
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