Commit Graph

61 Commits

Author SHA1 Message Date
Gennadiy Civil
ec7faa943d merges 2018-02-09 10:41:09 -05:00
Gennadiy Civil
ad0146bfe2
Merge branch 'master' into win-libcxx 2018-01-23 12:32:44 -05:00
Gennadiy Civil
1489dc8daa
Merge branch 'master' into support_xboxone 2018-01-18 17:42:34 -05:00
Gennadiy Civil
20b53ad786
Merge branch 'master' into win-libcxx 2018-01-18 17:41:36 -05:00
Peter Collingbourne
ba99a04be2 Check whether _MSC_VER is defined when detecting presence of cxxabi.h under libc++.
If _MSC_VER is defined, it means that we are using the Microsoft
ABI, so cxxabi.h (which is associated with the Itanium ABI) will not
be available.
2018-01-17 20:29:10 -08:00
Fedor Trushkin
9c82e7745c Expose ScopedTrace utility in public interface 2018-01-17 16:41:59 +01:00
gpetit
33d73d42b4 Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne 2018-01-12 10:20:26 -05:00
Gennadiy Civil
93b77987f5 continue upstream/merge, etc 2018-01-11 17:36:34 -05:00
Gennadiy Civil
6914ae2394 Upstream cl 103120214 2018-01-11 11:31:23 -05:00
Gennadiy Civil
6a26e47cfc Code merge, upstreaming accumulated changes, cleanup 2018-01-10 14:42:29 -05:00
Gennadiy Civil
62dbaa2947 revert 2018-01-10 14:00:52 -05:00
Gennadiy Civil
d630a8bdac code merges, cleanup 2018-01-10 13:58:00 -05:00
Gennadiy Civil
2ad5661db2 Upstream of cl 129104714 2018-01-09 16:41:15 -05:00
Gennadiy Civil
9fce984a67 wip, cleanups/merge 2018-01-09 14:48:06 -05:00
Gennadiy Civil
258fd6e168 cleanup, merge 2018-01-09 13:59:27 -05:00
David Benjamin
1acf8c752e Also define GTEST_ATTRIBUTE_PRINTF_ in clang-cl.
clang-cl is clang for Windows running in MSVC mode. Chromium uses it for
Windows builds. clang-cl is weird in that it defines __clang__ and
_MSC_VER, but *NOT* __GNUC__. This is vaguely analogous to how normal
clang defines __clang__ (what it is) and __GNUC__ (what it is compatible
with).

However, clang-cl still implements most GCC extensions, being clang.
Notably, the way to control -Wformat-literal is still with
__attribute__((__format__)). For better error-checking and strict
-Wformatl-literal compatibility (see
53c478d639), define
GTEST_ATTRIBUTE_PRINTF_ in clang-cl too.
2018-01-03 14:55:52 -05:00
David Benjamin
90244a6aef Fix testing::Combine on MSVC 2017.
On platforms with std::tuple and not std::tr1::tuple, GTEST_HAS_COMBINE
gets turned off when it works fine (due to GTEST_TUPLE_NAMESPACE_).
Elsewhere in the project, several GTEST_HAS_TR1_TUPLE checks
additionally check GTEST_HAS_STD_TUPLE_, so use that formulation.

(The ones that don't are specific to std::tr1::tuple and are followed by
an identical GTEST_HAS_STD_TUPLE_ version underneath it.)

In particular, this fixes testing::Combine on MSVC 2017, which regressed
here:
https://github.com/google/googletest/pull/1348#issuecomment-353879010
2018-01-02 12:57:49 -05:00
Gennadiy Civil
55fca1937d
Merge branch 'master' into hethi/issue-360-remove-GTEST_HAS_PARAM_TESTS 2017-12-09 09:41:02 -05:00
Wojciech Mamrak
57bb0bbbf8
Remove C4996 warning in VS2017 2017-12-07 18:20:25 +01:00
Gennadiy Civil
49eb76df47
Merge branch 'master' into hethi/issue-360-remove-GTEST_HAS_PARAM_TESTS 2017-11-07 10:32:23 -08:00
m-gupta
060783b7d2 Merge branch 'master' into gtestapifix 2017-10-25 10:24:56 -07:00
Arkadiy Shapkin
77380cddf7 Enable C++11 features for VS2015 and VS2017 2017-10-25 03:24:49 +03:00
Manoj Gupta
1beff241c3 googletest: Add GTEST_API_ attribute to ThreadLocal class.
ThreadLocal class needs to be have default visibility.
Root cause is gtest uses typeinfo for the ThreadLocal class.
The problem manifests When gtest/gmock are built as a shared library
with libc++. When a class is used in typeinfo, it must have default
visibility.

There is an explanation about typeinfo and visibility here:
https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html

When libc++ is used with gtest in shared library mode, any tests
that are compiled with -fvisibility=hidden and exercise the
macro EXPECT_CALL, it results in an abort like:
[ FATAL ] /usr/include/gtest/internal/gtest-port.h:1394::
Condition typeid(*base) == typeid(Derived) failed.
This is because the typeinfo for ThreadLocal class is not visible.
Therefore, linker failed to match it to the shared library symbol, creating a
new symbol instead.

This fixes https://github.com/google/googletest/issues/1207.
2017-10-20 14:41:06 -07:00
Herbert Thielen
ceee80c383 Merge branch 'master' into hethi/issue-360-remove-GTEST_HAS_PARAM_TESTS 2017-10-04 21:03:47 +02:00
Jonathan Wakely
b70cf1a663 Use gender-neutral pronouns in comments and docs 2017-09-27 13:31:13 +01:00
Herbert Thielen
98024ad202 Merge branch 'master' into hethi/issue-360-remove-GTEST_HAS_PARAM_TESTS 2017-09-24 10:01:52 +02:00
Benjamin Kircher
d4af64ca13 Remove redundant declaration
TempDir() function is declared twice, once in `internal/gtest-port.h`
and a second time in `gtest.h`.

Fixes a warning with GCC when -Wredundant-decls is given.
2017-09-16 11:51:36 +02:00
Herbert Thielen
aa0b5458a1 remove GTEST_HAS_PARAM_TESTS
As mentioned in issue #360:
"Now that all the platforms gtest supports work with value-parameterized
tests, we should remove the uses of the GTEST_HAS_PARAM_TESTS macro from
the codebase everywhere."
https://github.com/google/googletest/issues/360
2017-09-04 19:38:35 +02:00
Scott Graham
c3d1d33560 Detect Fuchsia, and set GTEST_HAS_PTHREAD on GTEST_OS_FUCHSIA 2017-08-29 12:45:26 -07:00
Daniel Krügler
8304d06199 Merge branch 'master' into master 2017-08-21 20:14:09 +02:00
Gennadiy Civil
673c975a96 Merge pull request #905 from iignatev/master
enable null detection on Solaris Studio 12u4+
2017-08-13 21:34:10 -04:00
Gennadiy Civil
c523461f3a Merge pull request #937 from srz-zumix/fix-gtest-port-typo
Fix or condition typo ( '|' -> '||' )
2017-08-10 21:30:13 -04:00
drgler
71ca4bae10 Infinite Loop when calling a mock function that takes boost::filesystem::path as parameter #521: Add is_same type trait and prevent infinite loops for recursive containers 2017-08-09 19:08:22 +02:00
Billy Donahue
4bab34d208 Merge pull request #1081 from krytarowski/netbsd-1
Add NetBSD support
2017-06-23 19:35:25 -04:00
Billy Donahue
c2d90bddc6 Create gtest-internal.h 2017-06-11 18:34:04 -04:00
Gennadiy Civil
76491b74de Changes add ability to overwrite TempDir(), issue https://github.com/google/googletest/issues/1093 2017-05-18 10:19:28 -04:00
Nico Weber
09fd5b3ebf Use std::string and ::string explicitly in gtest and gmock code.
This merges a Google-internal change (117235625).

Original CL description:
This CL was created manually in about an hour with sed, a Python script
to find all the places unqualified 'string' was mentioned, and some help
from Emacs to add the "std::" qualifications, plus a few manual tweaks.
2017-05-15 17:53:04 -04:00
Billy Donahue
8c7f93feda Merge pull request #1078 from pwnall/gtest_api_port
Pick up GTEST_API_ definition in gtest/internal/custom/gtest-port.h.
2017-05-10 22:10:01 -04:00
Billy Donahue
887d569eb0 Merge pull request #965 from davidben/format-attr
Annotate ColoredPrintf with the format attribute and fix bugs.
2017-05-07 01:07:16 -04:00
Kamil Rytarowski
fac0dfbe73 Add NetBSD support
NetBSD is a modern UNIX-like Operating System.

Enable GTEST_HAS_PTHREAD and GTEST_HAS_DEATH_TEST on NetBSD.
2017-05-06 04:18:58 +02:00
Victor Costan
b7cf4414d9 Pick up GTEST_API_ definition in gtest/internal/custom/gtest-port.h.
This makes it possible for a port to define the specifier used for
exported symbols without having to change Google Test.
2017-05-04 10:19:47 -07:00
Billy Donahue
0ad83afdaa Merge pull request #1034 from dankegel/master
Minimal changes to fix build failures on Microsoft Visual Studio 2015
2017-05-02 14:53:21 -04:00
Gennadiy Civil
611e8a99de Changes to make TempDir() public
Fixes #1076.
2017-05-02 14:16:11 -04:00
Dan Kegel
518e0519ca Minimal changes to fix build failures on Microsoft Visual Studio 2015
Fixes the following errors:

hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. [googlemock\gtest\gtest-printers_test.vcxproj]
hash_set(17): error C2338: <hash_set> is deprecated and will be REMOVED. Please use <unordered_set>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning. [googlemock\gtest\gtest-printers_test.vcxproj]
googletest\test\gtest_catch_exceptions_test_.cc(152): error C2220: warning treated as error - no 'object' file generated
googletest\test\gtest_catch_exceptions_test_.cc(152): warning C4297: 'CxxExceptionInDestructorTest::~CxxExceptionInDestructorTest': function assumed not to throw an exception but does
  googletest\test\gtest_catch_exceptions_test_.cc(152): note: destructor or deallocator has a (possibly implicit) non-throwing exception specification

There were already some checks for _MSC_VER in the code, so this commit
continues in that vein.
2017-03-01 18:40:48 -08:00
David Benjamin
53c478d639 Annotate ColoredPrintf with the format attribute and fix bugs.
googletest doesn't currently build with clang's very aggressive
-Wformat-nonliteral warning. It requires that all non-literal format
strings come from the argument of a function annotated with a compatible
format attribute.

Fixing that reports that ColoredPrintf's callers weren't passing the
normal -Wformat warning. Some messages were passed directly into the
format string rather than via "%s".
2016-12-21 20:57:21 -05:00
srz_zumix
75b683df46 Fix or condition typo ( '|' -> '||' ) 2016-11-11 12:21:56 +09:00
Billy Donahue
a2b8a8e076 Merge pull request #918 from DanAlbert/fix-android-GTEST_HAS_CLONE
Fix detection of GTEST_HAS_CLONE for Android.
2016-11-03 16:36:28 -04:00
Dan Albert
4eafafbde5 Fix detection of GTEST_HAS_CLONE for Android.
This was not in Gingerbread for anything but ARM (even though the
libs were hacked to lie about it being available in gingerbread).
2016-11-01 06:37:49 -07:00
iignatev
7fbc5986cc enable null detection on Solaris Studio 12u4+ 2016-10-17 20:49:59 +03:00
Arkadiy Shapkin
d8fe70f477 Fix build with MinGW-w64 2016-09-05 00:57:49 +03:00