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
7e7e3a6f
Unverified
Commit
7e7e3a6f
authored
Aug 15, 2018
by
Gennadiy Civil
Committed by
GitHub
Aug 15, 2018
Browse files
Merge branch 'master' into patch-1
parents
b50b2f77
997d343d
Changes
204
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
133 additions
and
93 deletions
+133
-93
googletest/include/gtest/gtest_pred_impl.h
googletest/include/gtest/gtest_pred_impl.h
+2
-0
googletest/include/gtest/gtest_prod.h
googletest/include/gtest/gtest_prod.h
+2
-2
googletest/include/gtest/internal/custom/README.md
googletest/include/gtest/internal/custom/README.md
+56
-0
googletest/include/gtest/internal/custom/gtest-port.h
googletest/include/gtest/internal/custom/gtest-port.h
+1
-34
googletest/include/gtest/internal/custom/gtest-printers.h
googletest/include/gtest/internal/custom/gtest-printers.h
+2
-2
googletest/include/gtest/internal/custom/gtest.h
googletest/include/gtest/internal/custom/gtest.h
+1
-9
googletest/include/gtest/internal/gtest-death-test-internal.h
...letest/include/gtest/internal/gtest-death-test-internal.h
+1
-1
googletest/include/gtest/internal/gtest-filepath.h
googletest/include/gtest/internal/gtest-filepath.h
+2
-1
googletest/include/gtest/internal/gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+2
-1
googletest/include/gtest/internal/gtest-linked_ptr.h
googletest/include/gtest/internal/gtest-linked_ptr.h
+3
-3
googletest/include/gtest/internal/gtest-param-util-generated.h
...etest/include/gtest/internal/gtest-param-util-generated.h
+3
-2
googletest/include/gtest/internal/gtest-param-util-generated.h.pump
.../include/gtest/internal/gtest-param-util-generated.h.pump
+3
-2
googletest/include/gtest/internal/gtest-param-util.h
googletest/include/gtest/internal/gtest-param-util.h
+3
-2
googletest/include/gtest/internal/gtest-port.h
googletest/include/gtest/internal/gtest-port.h
+33
-18
googletest/include/gtest/internal/gtest-string.h
googletest/include/gtest/internal/gtest-string.h
+3
-3
googletest/include/gtest/internal/gtest-tuple.h
googletest/include/gtest/internal/gtest-tuple.h
+4
-3
googletest/include/gtest/internal/gtest-tuple.h.pump
googletest/include/gtest/internal/gtest-tuple.h.pump
+4
-3
googletest/include/gtest/internal/gtest-type-util.h
googletest/include/gtest/internal/gtest-type-util.h
+3
-2
googletest/include/gtest/internal/gtest-type-util.h.pump
googletest/include/gtest/internal/gtest-type-util.h.pump
+3
-2
googletest/samples/prime_tables.h
googletest/samples/prime_tables.h
+2
-3
No files found.
googletest/include/gtest/gtest_pred_impl.h
View file @
7e7e3a6f
...
...
@@ -32,6 +32,8 @@
//
// Implements a family of generic predicate assertion macros.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
#define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
...
...
googletest/include/gtest/gtest_prod.h
View file @
7e7e3a6f
...
...
@@ -26,10 +26,10 @@
// 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 C++ Testing and Mocking Framework definitions useful in production code.
// GOOGLETEST_CM0003 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
...
...
googletest/include/gtest/internal/custom/README.md
0 → 100644
View file @
7e7e3a6f
# Customization Points
The custom directory is an injection point for custom user configurations.
## Header `gtest.h`
### The following macros can be defined:
*
`GTEST_OS_STACK_TRACE_GETTER_`
- The name of an implementation of
`OsStackTraceGetterInterface`
.
*
`GTEST_CUSTOM_TEMPDIR_FUNCTION_`
- An override for
`testing::TempDir()`
. See
`testing::TempDir`
for semantics and signature.
## Header `gtest-port.h`
The following macros can be defined:
### Flag related macros:
*
`GTEST_FLAG(flag_name)`
*
`GTEST_USE_OWN_FLAGFILE_FLAG_`
- Define to 0 when the system provides its
own flagfile flag parsing.
*
`GTEST_DECLARE_bool_(name)`
*
`GTEST_DECLARE_int32_(name)`
*
`GTEST_DECLARE_string_(name)`
*
`GTEST_DEFINE_bool_(name, default_val, doc)`
*
`GTEST_DEFINE_int32_(name, default_val, doc)`
*
`GTEST_DEFINE_string_(name, default_val, doc)`
### Logging:
*
`GTEST_LOG_(severity)`
*
`GTEST_CHECK_(condition)`
*
Functions
`LogToStderr()`
and
`FlushInfoLog()`
have to be provided too.
### Threading:
*
`GTEST_HAS_NOTIFICATION_`
- Enabled if Notification is already provided.
*
`GTEST_HAS_MUTEX_AND_THREAD_LOCAL_`
- Enabled if
`Mutex`
and
`ThreadLocal`
are already provided. Must also provide
`GTEST_DECLARE_STATIC_MUTEX_(mutex)`
and
`GTEST_DEFINE_STATIC_MUTEX_(mutex)`
*
`GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)`
*
`GTEST_LOCK_EXCLUDED_(locks)`
### Underlying library support features
*
`GTEST_HAS_CXXABI_H_`
### Exporting API symbols:
*
`GTEST_API_`
- Specifier for exported symbols.
## Header `gtest-printers.h`
*
See documentation at
`gtest/gtest-printers.h`
for details on how to define a
custom printer.
googletest/include/gtest/internal/custom/gtest-port.h
View file @
7e7e3a6f
...
...
@@ -27,40 +27,7 @@
// (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:
// GTEST_FLAG(flag_name)
// GTEST_USE_OWN_FLAGFILE_FLAG_ - Define to 0 when the system provides its
// own flagfile flag parsing.
// GTEST_DECLARE_bool_(name)
// GTEST_DECLARE_int32_(name)
// GTEST_DECLARE_string_(name)
// GTEST_DEFINE_bool_(name, default_val, doc)
// GTEST_DEFINE_int32_(name, default_val, doc)
// GTEST_DEFINE_string_(name, default_val, doc)
//
// Logging:
// GTEST_LOG_(severity)
// GTEST_CHECK_(condition)
// Functions LogToStderr() and FlushInfoLog() have to be provided too.
//
// Threading:
// GTEST_HAS_NOTIFICATION_ - Enabled if Notification is already provided.
// GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Enabled if Mutex and ThreadLocal are
// already provided.
// Must also provide GTEST_DECLARE_STATIC_MUTEX_(mutex) and
// GTEST_DEFINE_STATIC_MUTEX_(mutex)
//
// GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
// GTEST_LOCK_EXCLUDED_(locks)
//
// Underlying library support features:
// GTEST_HAS_CXXABI_H_
//
// Exporting API symbols:
// GTEST_API_ - Specifier for exported symbols.
// Injection point for custom user configurations. See README for details
//
// ** Custom implementation starts here **
...
...
googletest/include/gtest/internal/custom/gtest-printers.h
View file @
7e7e3a6f
...
...
@@ -31,8 +31,8 @@
// installation of gTest.
// It will be included from gtest-printers.h and the overrides in this file
// will be visible to everyone.
//
See documentation at gtest/gtest-printers.h for details on how to define a
//
custom printer.
//
//
Injection point for custom user configurations. See README for details
//
// ** Custom implementation starts here **
...
...
googletest/include/gtest/internal/custom/gtest.h
View file @
7e7e3a6f
...
...
@@ -27,15 +27,7 @@
// (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:
//
// GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of
// OsStackTraceGetterInterface.
//
// GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir().
// See testing::TempDir for semantics and
// signature.
// Injection point for custom user configurations. See README for details
//
// ** Custom implementation starts here **
...
...
googletest/include/gtest/internal/gtest-death-test-internal.h
View file @
7e7e3a6f
...
...
@@ -27,11 +27,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file defines internal utilities needed for implementing
// death tests. They are subject to change without notice.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
...
...
googletest/include/gtest/internal/gtest-filepath.h
View file @
7e7e3a6f
...
...
@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Google Test filepath utilities
//
// This header file declares classes and functions used internally by
...
...
@@ -36,6 +35,8 @@
// This file is #included in gtest/internal/gtest-internal.h.
// Do not include this header file separately!
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
...
...
googletest/include/gtest/internal/gtest-internal.h
View file @
7e7e3a6f
...
...
@@ -27,12 +27,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file declares functions and macros used internally by
// Google Test. They are subject to change without notice.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
...
...
googletest/include/gtest/internal/gtest-linked_ptr.h
View file @
7e7e3a6f
...
...
@@ -27,8 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Authors: Dan Egnor (egnor@google.com)
//
// A "smart" pointer type with reference tracking. Every pointer to a
// particular object is kept on a circular linked list. When the last pointer
// to an object is destroyed or reassigned, the object is deleted.
...
...
@@ -62,9 +60,11 @@
// raw pointer (e.g. via get()) concurrently, and
// - it's safe to write to two linked_ptrs that point to the same
// shared object concurrently.
//
TODO(wan@google.com)
: rename this to safe_linked_ptr to avoid
//
FIXME
: rename this to safe_linked_ptr to avoid
// confusion with normal linked_ptr.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
...
...
googletest/include/gtest/internal/gtest-param-util-generated.h
View file @
7e7e3a6f
...
...
@@ -30,8 +30,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: vladl@google.com (Vlad Losev)
// Type and function utilities for implementing parameterized tests.
// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
...
...
@@ -43,6 +42,8 @@
// by the maximum arity of the implementation of tuple which is
// currently set at 10.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
...
...
googletest/include/gtest/internal/gtest-param-util-generated.h.pump
View file @
7e7e3a6f
...
...
@@ -29,8 +29,7 @@ $var maxtuple = 10 $$ Maximum number of Combine arguments we want to 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: vladl@google.com (Vlad Losev)
// Type and function utilities for implementing parameterized tests.
// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
...
...
@@ -42,6 +41,8 @@ $var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
// by the maximum arity of the implementation of tuple which is
// currently set at $maxtuple.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
...
...
googletest/include/gtest/internal/gtest-param-util.h
View file @
7e7e3a6f
...
...
@@ -26,11 +26,12 @@
// 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: vladl@google.com (Vlad Losev)
// Type and function utilities for implementing parameterized tests.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
...
...
googletest/include/gtest/internal/gtest-port.h
View file @
7e7e3a6f
...
...
@@ -27,8 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Authors: wan@google.com (Zhanyong Wan)
//
// Low-level types and utilities for porting Google Test to various
// platforms. All macros ending with _ and symbols defined in an
// internal namespace are subject to change without notice. Code
...
...
@@ -40,6 +38,8 @@
// files are expected to #include this. Therefore, it cannot #include
// any other Google Test header.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
...
...
@@ -178,6 +178,7 @@
// GTEST_HAS_TYPED_TEST - typed tests
// GTEST_HAS_TYPED_TEST_P - type-parameterized tests
// GTEST_IS_THREADSAFE - Google Test is thread-safe.
// GOOGLETEST_CM0007 DO NOT DELETE
// GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with
// GTEST_HAS_POSIX_RE (see above) which users can
// define themselves.
...
...
@@ -229,6 +230,7 @@
// Regular expressions:
// RE - a simple regular expression class using the POSIX
// Extended Regular Expression syntax on UNIX-like platforms
// GOOGLETEST_CM0008 DO NOT DELETE
// or a reduced regular exception syntax on other
// platforms, including Windows.
// Logging:
...
...
@@ -313,7 +315,7 @@
// GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385)
// /* code that triggers warnings C4800 and C4385 */
// GTEST_DISABLE_MSC_WARNINGS_POP_()
#if _MSC_VER >= 1
5
00
#if _MSC_VER >= 1
4
00
# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \
__pragma(warning(push)) \
__pragma(warning(disable: warnings))
...
...
@@ -325,6 +327,22 @@
# define GTEST_DISABLE_MSC_WARNINGS_POP_()
#endif
// Clang on Windows does not understand MSVC's pragma warning.
// We need clang-specific way to disable function deprecation warning.
#ifdef __clang__
# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \
_Pragma("clang diagnostic ignored \"-Wdeprecated-implementations\"")
#define GTEST_DISABLE_MSC_DEPRECATED_POP_() \
_Pragma("clang diagnostic pop")
#else
# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)
# define GTEST_DISABLE_MSC_DEPRECATED_POP_() \
GTEST_DISABLE_MSC_WARNINGS_POP_()
#endif
#ifndef GTEST_LANG_CXX11
// gcc and clang define __GXX_EXPERIMENTAL_CXX0X__ when
// -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a
...
...
@@ -379,7 +397,8 @@
#if GTEST_LANG_CXX11
# define GTEST_HAS_STD_TUPLE_ 1
# if defined(__clang__)
// Inspired by http://clang.llvm.org/docs/LanguageExtensions.html#__has_include
// Inspired by
// https://clang.llvm.org/docs/LanguageExtensions.html#include-file-checking-macros
# if defined(__has_include) && !__has_include(<tuple>)
# undef GTEST_HAS_STD_TUPLE_
# endif
...
...
@@ -391,7 +410,7 @@
# elif defined(__GLIBCXX__)
// Inspired by boost/config/stdlib/libstdcpp3.hpp,
// http://gcc.gnu.org/gcc-4.2/changes.html and
// http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01.html#manual.intro.status.standard.200x
// http
s
://
web.archive.org/web/20140227044429/
gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01.html#manual.intro.status.standard.200x
# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
# undef GTEST_HAS_STD_TUPLE_
# endif
...
...
@@ -522,17 +541,13 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#endif // !defined(GTEST_HAS_STD_STRING)
#ifndef GTEST_HAS_GLOBAL_STRING
// The user didn't tell us whether ::string is available, so we need
// to figure it out.
# define GTEST_HAS_GLOBAL_STRING 0
#endif // GTEST_HAS_GLOBAL_STRING
#ifndef GTEST_HAS_STD_WSTRING
// The user didn't tell us whether ::std::wstring is available, so we need
// to figure it out.
//
TODO(wan@google.com)
: uses autoconf to detect whether ::std::wstring
//
FIXME
: uses autoconf to detect whether ::std::wstring
// is available.
// Cygwin 1.7 and below doesn't support ::std::wstring.
...
...
@@ -744,7 +759,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
// Until version 4.3.2, gcc has a bug that causes <tr1/functional>,
// which is #included by <tr1/tuple>, to not compile when RTTI is
// disabled. _TR1_FUNCTIONAL is the header guard for
// <tr1/functional>. Hence the following #define is
a hack
to prevent
// <tr1/functional>. Hence the following #define is
used
to prevent
// <tr1/functional> from being included.
# define _TR1_FUNCTIONAL 1
# include <tr1/tuple>
...
...
@@ -1218,7 +1233,7 @@ class scoped_ptr {
// Defines RE.
#if GTEST_USES_PCRE
using
::
RE
;
// if used, PCRE is injected by custom/gtest-port.h
#elif GTEST_USES_POSIX_RE || GTEST_USES_SIMPLE_RE
// A simple C++ wrapper for <regex.h>. It uses the POSIX Extended
...
...
@@ -1249,7 +1264,7 @@ class GTEST_API_ RE {
// PartialMatch(str, re) returns true iff regular expression re
// matches a substring of str (including str itself).
//
//
TODO(wan@google.com)
: make FullMatch() and PartialMatch() work
//
FIXME
: make FullMatch() and PartialMatch() work
// when str contains NUL characters.
static
bool
FullMatch
(
const
::
std
::
string
&
str
,
const
RE
&
re
)
{
return
FullMatch
(
str
.
c_str
(),
re
);
...
...
@@ -1276,7 +1291,7 @@ class GTEST_API_ RE {
void
Init
(
const
char
*
regex
);
// We use a const char* instead of an std::string, as Google Test used to be
// used where std::string is not available.
TODO(wan@google.com)
: change to
// used where std::string is not available.
FIXME
: change to
// std::string.
const
char
*
pattern_
;
bool
is_valid_
;
...
...
@@ -1803,7 +1818,7 @@ class GTEST_API_ Mutex {
// Initializes owner_thread_id_ and critical_section_ in static mutexes.
void
ThreadSafeLazyInit
();
// Per http://blogs.msdn.com/
b/
oldnewthing/
archive/
2004
/
02
/
23
/78395.aspx
,
// Per http
s
://blogs.msdn.
microsoft.
com/oldnewthing/20040223
-00/?p=40503
,
// we assume that 0 is an invalid value for thread IDs.
unsigned
int
owner_thread_id_
;
...
...
@@ -2483,7 +2498,7 @@ inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
// Functions deprecated by MSVC 8.0.
GTEST_DISABLE_MSC_
WARNINGS_PUSH_
(
4996
/* deprecated function */
)
GTEST_DISABLE_MSC_
DEPRECATED_PUSH_
(
)
inline
const
char
*
StrNCpy
(
char
*
dest
,
const
char
*
src
,
size_t
n
)
{
return
strncpy
(
dest
,
src
,
n
);
...
...
@@ -2531,7 +2546,7 @@ inline const char* GetEnv(const char* name) {
#endif
}
GTEST_DISABLE_MSC_
WARNINGS
_POP_
()
GTEST_DISABLE_MSC_
DEPRECATED
_POP_
()
#if GTEST_OS_WINDOWS_MOBILE
// Windows CE has no C library. The abort() function is used in
...
...
@@ -2669,7 +2684,7 @@ typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
// Parses 'str' for a 32-bit signed integer. If successful, writes the result
// to *value and returns true; otherwise leaves *value unchanged and returns
// false.
//
TODO(chandlerc)
: Find a better way to refactor flag and environment parsing
//
FIXME
: Find a better way to refactor flag and environment parsing
// out of both gtest-port.cc and gtest.cc to avoid exporting this utility
// function.
bool
ParseInt32
(
const
Message
&
src_text
,
const
char
*
str
,
Int32
*
value
);
...
...
googletest/include/gtest/internal/gtest-string.h
View file @
7e7e3a6f
...
...
@@ -27,17 +27,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file declares the String class and functions used internally by
// Google Test. They are subject to change without notice. They should not used
// 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.h.
// It should not be #included by other files.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
...
...
googletest/include/gtest/internal/gtest-tuple.h
View file @
7e7e3a6f
...
...
@@ -30,11 +30,12 @@
// 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)
// Implements a subset of TR1 tuple needed by Google Test and Google Mock.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
...
...
@@ -42,7 +43,7 @@
// The compiler used in Symbian has a bug that prevents us from declaring the
// tuple template as a friend (it complains that tuple is redefined). This
//
hack
bypasses the bug by declaring the members that should otherwise be
// bypasses the bug by declaring the members that should otherwise be
// private as public.
// Sun Studio versions < 12 also have the above bug.
#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)
...
...
googletest/include/gtest/internal/gtest-tuple.h.pump
View file @
7e7e3a6f
...
...
@@ -29,11 +29,12 @@ $$ This meta comment fixes auto-indentation in Emacs. }}
// 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)
// Implements a subset of TR1 tuple needed by Google Test and Google Mock.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
...
...
@@ -41,7 +42,7 @@ $$ This meta comment fixes auto-indentation in Emacs. }}
// The compiler used in Symbian has a bug that prevents us from declaring the
// tuple template as a friend (it complains that tuple is redefined). This
//
hack
bypasses the bug by declaring the members that should otherwise be
// bypasses the bug by declaring the members that should otherwise be
// private as public.
// Sun Studio versions < 12 also have the above bug.
#if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)
...
...
googletest/include/gtest/internal/gtest-type-util.h
View file @
7e7e3a6f
...
...
@@ -30,8 +30,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)
// Type utilities needed for implementing typed and type-parameterized
// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
...
...
@@ -41,6 +40,8 @@
// Please contact googletestframework@googlegroups.com if you need
// more.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
...
...
googletest/include/gtest/internal/gtest-type-util.h.pump
View file @
7e7e3a6f
...
...
@@ -28,8 +28,7 @@ $var n = 50 $$ Maximum length of type lists we want to 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)
// Type utilities needed for implementing typed and type-parameterized
// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
...
...
@@ -39,6 +38,8 @@ $var n = 50 $$ Maximum length of type lists we want to support.
// Please contact googletestframework@googlegroups.com if you need
// more.
// GOOGLETEST_CM0001 DO NOT DELETE
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
...
...
googletest/samples/prime_tables.h
View file @
7e7e3a6f
...
...
@@ -26,9 +26,8 @@
// 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)
// Author: vladl@google.com (Vlad Losev)
// This provides interface PrimeTable that determines whether a number is a
// prime and determines a next prime number. This interface is used
...
...
Prev
1
2
3
4
5
6
7
8
9
…
11
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