70 Commits

Author SHA1 Message Date
Gennadiy Civil
f7e1b4f330 merging port, cont. 191443078 2018-04-03 11:38:30 -04:00
Gennadiy Civil
ffcd94d903 merging, cont - 2 2018-04-03 11:23:54 -04:00
Gennadiy Civil
5539444c20 merging gtest-port.h , 191439094 2018-04-03 11:06:20 -04:00
Gennadiy Civil
4534287cb6 merging, just comments format 2018-04-03 09:56:23 -04:00
Gennadiy Civil
98f4d5db7a testing, merge 2018-04-03 09:45:49 -04:00
Gennadiy Civil
c300e3085b Testing, gtest-port.h merge 2018-04-03 09:31:10 -04:00
Gennadiy Civil
b4d1bd371d merging gtest-port.h, again - 1 2018-04-02 14:22:24 -04:00
Gennadiy Civil
73996ca508 Revert "merging gtest-port 1 of N" 2018-03-29 13:28:29 -04:00
Gennadiy Civil
148ec8fb4e Revert "merging gtest-port, 2" 2018-03-29 13:27:11 -04:00
Gennadiy Civil
be841c6ed1 merging gtest-port, 2 2018-03-29 09:46:13 -04:00
Gennadiy Civil
a81411ca4d merging gtest-port 1 of N 2018-03-27 15:19:40 -04:00
Gennadiy Civil
b7e7102bb3 merges, gtest 2018-03-26 13:04:28 -04:00
Gennadiy Civil
8dcfeca51f more merges 2018-03-22 10:56:35 -04:00
Gennadiy Civil
bc73e93ea5 More merges 2018-03-21 16:31:31 -04:00
Gennadiy Civil
5c87ce09b5 merging, merging 2018-03-13 16:02:05 -04:00
Gennadiy Civil
92be48af66 More merges, removing old dead code 2018-03-13 11:13:37 -04:00
Gennadiy Civil
2cb5677ab7 merges-port(1) 2018-03-12 11:51:44 -04:00
Gennadiy Civil
7ee36bdbea merges-8 2018-03-05 15:53:36 -05:00
Gennadiy Civil
80cd2a3c67 Merge pull request #1423 from pcc/win-libcxx2
Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC.
2018-02-27 14:00:29 -05:00
Victor Costan
8921d82a1c Switch default death test style back to "fast".
Google Test has recently (02/09/2018) switched the default death test
style from "fast" to "threadsafe" in
ec7faa943d

Threadsafe death tests have been used internally for a while, and are
proven to be a better default.

However, adopting this better default can be challenging for large
projects with a significant investment in custom infrastructure built on
top of Google Test. The same custom infrastructure can make it difficult
for large projects to switch back to the old default by passing in
--gtest_death_test_style=fast.

For the reasons above, the default switch is considered too disruptive,
and this CL reverts it. This CL also introduces the
GTEST_DEFAULT_DEATH_TEST_STYLE preprocesor macro, which replaces the
hard-coded default. The macro can be defined in
gtest/internal/custom/gtest-port.h by projects that are ready to migrate
to thread-safe death tests.
2018-02-27 07:50:03 -08:00
Gennadiy Civil
37cc7fb79a Merge branch 'master' into win-libcxx2 2018-02-27 10:00:29 -05:00
Gennadiy Civil
47607b5a5e cleanup, merges 2018-02-13 15:25:57 -05:00
Gennadiy Civil
2c7e37af6f merging 2018-02-09 17:45:10 -05:00
Gennadiy Civil
2848f99c65 merges 2018-02-09 16:02:17 -05:00
Gennadiy Civil
1fb2e10cfe merges 2018-02-09 10:41:09 -05:00
Peter Collingbourne
bf92c203ea Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC.
_HAS_EXCEPTIONS is specific to the MSVC STL and defining it to 0 causes
problems with libc++, so libc++ users may leave it undefined. This can
cause GTEST_HAS_EXCEPTIONS to be defined incorrectly if the user has
disabled exceptions via the compiler, which can lead to build errors.

_CPPUNWIND is a builtin macro provided by the compiler so it should
work with both STLs.
2018-01-25 14:15:43 -08:00
Peter Collingbourne
4185169167 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
David Benjamin
e7beafb2b1 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
53c478d639b8eebd2942e88266610ebc79c541f6), define
GTEST_ATTRIBUTE_PRINTF_ in clang-cl too.
2018-01-03 14:55:52 -05:00
David Benjamin
ce7f204275 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
000582a49b Merge branch 'master' into hethi/issue-360-remove-GTEST_HAS_PARAM_TESTS 2017-12-09 09:41:02 -05:00
Wojciech Mamrak
8f178075b9 Remove C4996 warning in VS2017 2017-12-07 18:20:25 +01:00
Gennadiy Civil
04c7a28aac Merge branch 'master' into hethi/issue-360-remove-GTEST_HAS_PARAM_TESTS 2017-11-07 10:32:23 -08:00
m-gupta
30d58bcd31 Merge branch 'master' into gtestapifix 2017-10-25 10:24:56 -07:00
Arkadiy Shapkin
85e4858c92 Enable C++11 features for VS2015 and VS2017 2017-10-25 03:24:49 +03:00
Manoj Gupta
f4d7a04eb4 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
79f678b5ad Merge branch 'master' into hethi/issue-360-remove-GTEST_HAS_PARAM_TESTS 2017-10-04 21:03:47 +02:00
Jonathan Wakely
c61e22b1fe Use gender-neutral pronouns in comments and docs 2017-09-27 13:31:13 +01:00
Herbert Thielen
ab5371cb87 Merge branch 'master' into hethi/issue-360-remove-GTEST_HAS_PARAM_TESTS 2017-09-24 10:01:52 +02:00
Benjamin Kircher
136f0e272d 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
492c6f88b8 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
4476885245 Detect Fuchsia, and set GTEST_HAS_PTHREAD on GTEST_OS_FUCHSIA 2017-08-29 12:45:26 -07:00
Daniel Krügler
71b9b22dd6 Merge branch 'master' into master 2017-08-21 20:14:09 +02:00
Gennadiy Civil
be0f3823ba Merge pull request #905 from iignatev/master
enable null detection on Solaris Studio 12u4+
2017-08-13 21:34:10 -04:00
Gennadiy Civil
db1a847416 Merge pull request #937 from srz-zumix/fix-gtest-port-typo
Fix or condition typo ( '|' -> '||' )
2017-08-10 21:30:13 -04:00
drgler
ec538fc0b8 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
843fe11a0e Merge pull request #1081 from krytarowski/netbsd-1
Add NetBSD support
2017-06-23 19:35:25 -04:00
Billy Donahue
7927e99b3e 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
8005a0be06 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
76042375b1 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
ca56e42c44 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