Commit Graph

201 Commits

Author SHA1 Message Date
Abseil Team
4bb49ed640 Apply clang-tidy modernize-use-nullptr to googletest.
Now that googletest has moved to C++11, it should no longer
use NULL or 0 for the null pointer. This patch converts all
such usages to nullptr using clang-tidy.

This prevents LLVM from issuing -Wzero-as-null-pointer-constant
warnings.

PiperOrigin-RevId: 215814400
2018-10-05 12:54:14 -04:00
Arseny Aprelev
00938b2b22 Merge 2ce0685f76 into 75e834700d
Closes #1544
With refinements and changes

PiperOrigin-RevId: 215273083
2018-10-02 13:03:28 -04:00
Abseil Team
2b016ca493 Googletest export
Project import generated by Copybara.

PiperOrigin-RevId: 214456152
2018-09-25 13:05:37 -04:00
misterg
b2788286d1 Googletest export
Project import generated by Copybara.

PiperOrigin-RevId: 214441835
2018-09-25 13:05:25 -04:00
Abseil Team
0fc5466dbb Googletest export
Project import generated by Copybara.
Including recently accepted and merged PRs

PiperOrigin-RevId: 213856848
2018-09-25 13:05:03 -04:00
Gennadiy Civil
6596471104
Formatting 2018-09-23 09:41:12 -07:00
Gennadiy Civil
78d3bfeb44
Formatting 2018-09-23 09:34:47 -07:00
Jonny007-MKD
cecea92af8 Rename private member of AdditionalMessage
Shorten lines in unit tests
2018-09-23 15:46:47 +02:00
Jonny007-MKD
1cb10b357a Readded changes from 6494f5232b 2018-09-23 15:15:38 +02:00
Matthieu Longo
c9fe337ae2 [msys] fix unittest ColoredOutputTest.UsesColorsWhenTermSupportsColors 2018-09-18 18:29:42 +02:00
Dominic Sacré
13c5230bbf Add user-defined copy constructor to ValueArray
Fix Clang warning:
| warning: definition of implicit copy constructor for 'ValueArray2<bool, bool>'
| is deprecated because it has a user-declared copy assignment operator [-Wdeprecated]
2018-08-31 14:57:23 +02:00
Abseil Team
03867b5389 Googletest export
Add the possibility of specifying the name in type parameterized tests.

Similar to how the last parameter of INSTANTIATE_TEST_CASE_P allows to override the name for (non-type) parametrized tests, this adds the possibility of adding a parameter to INSTANTIATE_TYPED_TEST_CASE_P. The argument has to be a class, which contains a static templated function GetName<T>(int), returning the name for type T.

PiperOrigin-RevId: 210532231
2018-08-28 16:53:45 -04:00
Abseil Team
52f8183e7f Googletest export
Breaks Windows builds

PiperOrigin-RevId: 210434120
2018-08-28 16:53:38 -04:00
Abseil Team
167c5e8188 Googletest export
Fix Theta(N^2) memory usage of EXPECT_EQ(string) when the strings don't match.

The underlying CalculateOptimalEdits() implementation used a simple
dynamic-programming approach that always used N^2 memory and time. This meant
that tests for equality of large strings were ticking time bombs: They'd work
fine as long as the test passed, but as soon as the strings differed the test
would OOM, which is very hard to debug.
I switched it out for a Dijkstra search, which is still worst-case O(N^2), but
in the usual case of mostly-matching strings, it is much closer to linear.

PiperOrigin-RevId: 210405025
2018-08-28 16:53:30 -04:00
misterg
df428ec118 googletest export
- 209457654 Import of OSS PR, https://github.com/google/googletest/pu... by misterg <misterg@google.com>

PiperOrigin-RevId: 209457654
2018-08-20 14:50:48 -04:00
Gennadiy Civil
b1bfdf0bf4
Small formatting change
And then we can merge
2018-08-16 15:10:07 -04:00
Gennadiy Civil
3c4f437c24
Merge branch 'master' into master 2018-08-15 11:33:15 -07:00
Gennadiy Civil
265efde9a5 Comments changes, no functionality changes. 2018-08-14 15:04:11 -04:00
Gennadiy Civil
a3c0dd0f4d Comments changes, no functionality changes 2018-08-14 14:04:07 -04:00
Gennadiy Civil
2421eff9f7
Merge branch 'master' into deprecate 2018-08-14 08:47:13 -07:00
tisi1988
87a37c60e3
Merge branch 'master' into master 2018-08-14 15:32:22 +02:00
Gennadiy Civil
c203bee245 formatting custom/README.md 2018-08-13 22:45:53 -04:00
Gennadiy Civil
9060e19c87 formatting for new READMEs 2018-08-13 16:23:17 -04:00
Gennadiy Civil
63baab8924 Move instructions into custom/README files 2018-08-13 14:31:56 -04:00
Gennadiy Civil
4d9411467d code management comments, [ci-skip], no functionality changes 2018-08-09 12:21:49 -04:00
Loo Rong Jie
24786cb498
Merge branch 'master' into deprecate 2018-08-09 20:08:44 +08:00
tisi1988
efe27ac05c
Merge branch 'master' into master 2018-08-09 10:58:22 +02:00
Gennadiy Civil
b345bf9090 Formatting changes,small cleanup, no functionality changes 2018-08-07 11:49:47 -04:00
tisi1988
e9b05a4d6a
Merge branch 'master' into master 2018-08-07 11:12:00 +02:00
Gennadiy Civil
61f949387e
Merge branch 'master' into deprecate 2018-08-03 12:05:07 -04:00
tisi1988
25e1436b08
Merge branch 'master' into master 2018-08-01 12:11:18 +02:00
Gennadiy Civil
6269264dfe
Merge branch 'master' into deprecate 2018-07-30 16:11:06 -04:00
Gennadiy Civil
f978c651ed
Merge branch 'master' into master 2018-07-30 14:01:17 -04:00
Gennadiy Civil
984cba30ed Formatting changes for automatic code management 2018-07-27 11:15:08 -04:00
Gennadiy Civil
6cacb41935
Merge branch 'master' into deprecate 2018-07-26 13:04:53 -04:00
Piotr Kąkol
309e8a271e Updated broken and outdated URLs 2018-07-25 19:19:26 +02:00
Gennadiy Civil
ed1edf641d Formatting changes, code sync 2018-07-25 10:24:13 -04:00
tisi1988
1ae4fdb790
Merge branch 'master' into master 2018-07-23 10:10:26 +02:00
Gennadiy Civil
fd4f7cc729
Merge branch 'master' into deprecate 2018-07-20 15:53:16 -04:00
Gennadiy Civil
a02af2f689 code merge 2018-07-20 11:28:58 -04:00
Gennadiy Civil
1f9c668a04
Merge branch 'master' into deprecate 2018-07-19 11:07:10 -04:00
Gennadiy Civil
7e73a7ae6e Formatting and a link 2018-07-18 11:17:19 -04:00
Loo Rong Jie
3a8d744030 Disable MSVC function deprecation when using Clang 2018-07-13 21:23:28 +08:00
tisi1988
de6e079f15
Merge branch 'master' into master 2018-07-12 11:06:08 +02:00
杜修杏
03ea2fdecb VS2005 with SP1(_MSC_VER=1400) already supports __pragma 2018-06-29 11:19:46 +08:00
tisi1988
dfddc98718 FIX: Compilation warning with GCC regarding a non-initialised member from MutexBase class. 2018-06-27 22:49:04 +02:00
Rohan Joyce
0563b52d3a Eliminate GTEST_TEST_FILTER_ENV_VAR_.
GTEST_TEST_FILTER_ENV_VAR_ was used to specify an environment variable to obtain
the default test filter from. By default it was unset which broke
"--test_filter" for bazel. This CL eliminates GTEST_TEST_FILTER_ENV_VAR_ and
explicitly obtains the default test filter from the environment variable
TESTBRIDGE_TEST_ONLY if it exists.
2018-06-14 15:45:55 -04:00
Gennadiy Civil
28c91e2cea Formatting changes 2018-05-23 11:03:31 -04:00
James Dennett
49ecebd1f2
Downgrade to C++98.
Some projects cannot handle C++11 yet.
2018-05-21 12:27:52 -07:00
James Dennett
ec2c911b33
Downgrade to C++98 code.
Some users are not ready for C++11 yet.
2018-05-21 10:59:24 -07:00
James Dennett
54e331b88b
Add support for versioned standard libraries.
This canonicalizes demangled names by omitting a nested inline namespace within namespace std if the name of the nested namespace begins with a double underscore.  This improves compatibility with libc++.
2018-05-10 22:39:19 -07:00
James Dennett
fc66ae45fc
Update generated code. 2018-05-10 22:36:50 -07:00
Fabrice de Gans-Riberi
d4b5281d11 Add Fuchsia support for death test. 2018-05-01 16:22:09 -07:00
Gennadiy Civil
6f9db26159 merging 2018-04-10 16:34:21 -04:00
fo40225
a0c27bd8a5 fix build break on locale windows 2018-04-04 23:16:16 +08:00
Gennadiy Civil
a2dd136578 merging port, cont. 191443078 2018-04-03 11:38:30 -04:00
Gennadiy Civil
aa349acb07 merging, cont - 2 2018-04-03 11:23:54 -04:00
Gennadiy Civil
2cedd5b9c1 merging gtest-port.h , 191439094 2018-04-03 11:06:20 -04:00
Gennadiy Civil
04d1e56bd2 merging, just comments format 2018-04-03 09:56:23 -04:00
Gennadiy Civil
5beb452bbe testing, merge 2018-04-03 09:45:49 -04:00
Gennadiy Civil
df5a48da03 Testing, gtest-port.h merge 2018-04-03 09:31:10 -04:00
Gennadiy Civil
87a4cdddd0 merging gtest-port.h, again - 1 2018-04-02 14:22:24 -04:00
Gennadiy Civil
b2373c6f51
Revert "merging gtest-port 1 of N" 2018-03-29 13:28:29 -04:00
Gennadiy Civil
54bb165ffd
Revert "merging gtest-port, 2" 2018-03-29 13:27:11 -04:00
Gennadiy Civil
8e0364a37b merging gtest-port, 2 2018-03-29 09:46:13 -04:00
Gennadiy Civil
aea6fc32aa merging gtest-port 1 of N 2018-03-27 15:19:40 -04:00
Gennadiy Civil
3df7cbe6f7 merges, gtest 2018-03-26 13:04:28 -04:00
Gennadiy Civil
0f6567954f more merges 2018-03-22 10:56:35 -04:00
Gennadiy Civil
691e38e518 More merges 2018-03-21 16:31:31 -04:00
Gennadiy Civil
a3c2e107ae cl 189032107, again 2018-03-16 15:56:31 -04:00
Gennadiy Civil
080fcbe0aa cl 189032107 2018-03-16 13:36:36 -04:00
Gennadiy Civil
a178cc7ef7 merge, again, IsRecursiveContainer 2018-03-15 14:31:37 -04:00
Gennadiy Civil
2814b4b089 merging, merging 2018-03-13 16:02:05 -04:00
Gennadiy Civil
5461f63d01 Merge branch 'master' of https://github.com/google/googletest 2018-03-13 11:13:58 -04:00
Gennadiy Civil
af463c43ac More merges, removing old dead code 2018-03-13 11:13:37 -04:00
Bernhard Bauer
fc437ef4b2
Merge branch 'master' into upstream_188748737 2018-03-12 18:15:35 +00:00
Bernhard Bauer
7b70413e0c Allow macros inside of parametrized test names.
This allows doing things like TEST_P(TestFixture, MAYBE(TestName))
for nicer conditional test disabling.

Upstream of cr/188748737.

Tested:
Added unit tests MacroNamingTest and MacroNamingTestNonParametrized.
2018-03-12 18:14:06 +00:00
Gennadiy Civil
cf9d6344d2 merges-port(1) 2018-03-12 11:51:44 -04:00
Gennadiy Civil
89d6f70f34 merges-8 2018-03-05 15:53:36 -05:00
Gennadiy Civil
0d5e01ad7b Merges-1 2018-03-05 12:26:15 -05:00
Gennadiy Civil
ce61dc54a2
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
84ec2e0365 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
d4f77c1e3a
Merge branch 'master' into win-libcxx2 2018-02-27 10:00:29 -05:00
Anders Sundman (asum)
11e1dd257b Removed trailing comma in enum 2018-02-23 14:55:24 +01:00
Gennadiy Civil
a3e322b24f cleanup, merges 2018-02-13 15:25:57 -05:00
Gennadiy Civil
575c081227 merging 2018-02-09 17:45:10 -05:00
Gennadiy Civil
49fc378e0a merges 2018-02-09 16:02:17 -05:00
Gennadiy Civil
22a115055a
Merge pull request #1446 from tholsapp/master
Fixed typos
2018-02-09 11:34:26 -05:00
Gennadiy Civil
ec7faa943d merges 2018-02-09 10:41:09 -05:00
Troy Holsapple
c8510504dd Fixed typos 2018-02-07 22:06:00 -08:00
Peter Collingbourne
3498a1ac52 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
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