| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 621631167
Change-Id: I0790f7082ce3c20fef92958c820d40ec854fe91d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Support for Xbox platforms, requires the code to support compilation with the
WINAPI_FAMILY_GAMES subset of the Win32 API.
- Add support for WINAPI_FAMILY_GAMES to enable GTEST_OS_WINDOWS_GAMES platform.
- Disable stream redirection (GTEST_HAS_STREAM_REDIRECTION = 0) and colored TTY
printing for GTEST_OS_WINDOWS_GAMES platform. Both features currently require
Win32 functions that don't exist in the WINAPI_FAMILY_GAMES subset.
Misc fixes:
- gtest-port.cc: Move GTEST_DISABLE_MSC_DEPRECATED_PUSH_ into
GTEST_HAS_STREAM_REDIRECTION conditional section where the corresponding
GTEST_DISABLE_MSC_DEPRECATED_POP_ is located.
- googletest-port-test.cc: Switch stream redirection tests to be conditional on
GTEST_HAS_STREAM_REDIRECTION instead of !defined(GTEST_OS_WINDOWS_MOBILE).
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
during program exit
A race condition exist between the Watcher thread and main(). A case
was found where the Watcher thread does not get execution time before
the main function returns and calls atexit(). At that point the
Watcher thread started runing tls_init() code while the main thread
was shutting down. This resulted in rare crashes and deadlocks.
Fixes #4493
Closes #4494
PiperOrigin-RevId: 621619768
Change-Id: I66f00d8f0f3c37f9937c6d13890f7fa10038256d
|
|
|
|
|
|
|
|
|
| |
This is a somewhat recent change for Android (I'm not clear on whether it's a recent change for NetBSD, or if Android was just very behind on its implementation), so while this worked fine as recently as API 32 devices, REG_GNU is required for API 34 (API 33 untested).
A test actually caught this, but https://github.com/google/googletest/pull/4334 "fixed" the test rather than the implementation. This CL also reverts the test change so it can catch the failure.
PiperOrigin-RevId: 571126374
Change-Id: I420dfcedea58f2c8b605f699515d744006c0a9d9
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 565230380
Change-Id: I6e91eea46d05413d4d87e73a11941786604d9f27
|
| | |
|
|/
|
| |
Newer devices can have the latter location read-only. (I observed this with Termux on a non-rooted Pixel 6.)
|
|
|
|
|
| |
PiperOrigin-RevId: 529762901
Change-Id: I6ce4d630191bf265f847aef2d5dcc12a712faa60
|
|
|
|
|
| |
PiperOrigin-RevId: 525850646
Change-Id: I64387f5b933beb79cd05636dca81b7a75213383e
|
|
|
|
|
|
|
| |
This allows compilation with "-Wundef" (#3267).
PiperOrigin-RevId: 513944726
Change-Id: I1a3854bb2333d5dec6c0ff91ee1eddd9a766ab91
|
|
|
|
|
|
|
| |
This is compatible with compiling with "-Wundef" (#3267).
PiperOrigin-RevId: 513943378
Change-Id: I47cf5fabbb77be061c4483a0adc54511af6b191c
|
|
|
|
|
| |
PiperOrigin-RevId: 509947007
Change-Id: I31e1274afa889776829c877c40c9af589298dcf2
|
|\
| |
| |
| |
| | |
PiperOrigin-RevId: 454940948
Change-Id: Ic87dadfe9c6fc8882b0f425aa2056f0cc7a90b55
|
| |
| |
| |
| | |
Move declaration of kStdOutFileNo and kStdErrFileno closer to where they are used to avoid having to guard for GTEST_HAS_STREAM_REDIRECTION twice
|
|/
|
|
| |
Fix "unused variable" warning when GTEST_HAS_STREAM_REDIRECTION is set to false in gtest-port.cc
|
|
|
|
|
| |
PiperOrigin-RevId: 443715444
Change-Id: I3ffd54b63d2728ae4a668ee7875c8c3c8188087c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few tests are examining code locations and looking af the resulting line
numbers to verify that GoogleTest shows those to users correctly. Some of those
locations change when clang-format is run. For those locations, I've wrapped
portions in:
// clang-format off
...
// clang-format on
There may be other locations that are currently not tickled by running
clang-format.
PiperOrigin-RevId: 434844712
Change-Id: I3a9f0a6f39eff741c576b6de389bef9b1d11139d
|
|
|
|
|
| |
When _DEBUG is not defined the _CrtSetDbgFlag turns into ((int)0),
which causes unused-value warning for clang.
|
|\
| |
| |
| | |
PiperOrigin-RevId: 408896910
|
|/ |
|
|
|
|
|
|
|
| |
Remove GoogleTest's SleepMilliseconds function.
It is only used in tests and a portable implementation is available.
PiperOrigin-RevId: 405437102
|
|
|
|
|
|
|
|
|
|
| |
Replace the multiple implementations of Notification with a single
portable implementation.
The also removes the awkward loop with sleep in Notification and will
allow the removal of SleepMilliseconds.
PiperOrigin-RevId: 405399733
|
|\
| |
| |
| | |
PiperOrigin-RevId: 379383941
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the dependency on Objective C++ in iOS builds.
252ce9c52d304659eff6be558209c811b7191963 introduced the use of
NSTemporaryDirectory() on iOS, which requires Core Foundation, and
Objective C++.
This CL replaces NSTemporaryDirectory() with an equivalent solution
(according to Apple's documentation at [1]) available to C/C++ code.
Avoiding Objective C++ and Core Foundation makes it easier to integrate
googletest in projects that can't use the supplied Bazel build files.
[1] https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html#//apple_ref/doc/uid/TP40002585-SW10
PiperOrigin-RevId: 375474990
|
|/
|
|
|
|
| |
Fix iOS logging issues in tests
PiperOrigin-RevId: 370484087
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Building on OpenBSD 6.7 current fails due to implicit numeric
conversions:
OpenBSD clang version 8.0.1 (tags/RELEASE_801/final) (based on LLVM 8.0.1)
Target: amd64-unknown-openbsd6.7
Thread model: posix
InstalledDir: /usr/bin
In file included from /tmp/u/build/_deps/googletest-src/googletest/src/gtest-all.cc:45:
/tmp/u/build/_deps/googletest-src/googletest/src/gtest-port.cc:201:19: error: implicit conversion changes signedness:
'int' to 'unsigned long' [-Werror,-Wsign-conversion]
mib[5] = size / mib[4];
~ ^~~~~~
/tmp/u/build/_deps/googletest-src/googletest/src/gtest-port.cc:211:33: error: implicit conversion changes signedness:
'int' to 'unsigned long' [-Werror,-Wsign-conversion]
for (size_t i = 0; i < size / mib[4]; i++) {
~ ^~~~~~
/tmp/u/build/_deps/googletest-src/googletest/src/gtest-port.cc:215:10: error: implicit conversion changes signedness:
'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
return nthreads;
~~~~~~ ^~~~~~~~
/tmp/u/build/_deps/googletest-src/googletest/src/gtest-port.cc:201:17: error: implicit conversion loses integer
precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
mib[5] = size / mib[4];
~ ~~~~~^~~~~~~~
4 errors generated.
|
| |
|
|\
| |
| |
| | |
PiperOrigin-RevId: 281971090
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We use "MemoryIsNotDeallocated" to aovid internal expected leak reported
in Windows _Crt report, like:
{
#ifdef _MSC_VER
MemoryIsNotDeallocated memory_is_not_deeallocated;
#endif
static ThreadIdToThreadLocals* map = new
ThreadIdToThreadLocals();
return map;
}
But int the above code, only "new ThreadIdToThreadLocals()" is
protected, if we invoke "insert()" function of the return value,
the memory allocated in "insert()" will be reported to _Crt report
also. This change try to fix this issue.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Use standard C++11 integer types in gtest-port.h.
Remove testing::internal::{Int,Uint}{32,64} in favor of types
guaranteed to be in <cstdint> since C++11.
Tests for built-in integer type coverage are switched from
{Int,Uint}64 to [unsigned] long long, which is guaranteed by
C++11 to exist and be at least 64-bit wide.
PiperOrigin-RevId: 281565263
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a more portable path for Android to write temp files to.
/sdcard is *not* guaranteed to be available, but /data/local/tmp is.
In some emulated situations, /sdcard may not be mounted, may not be R/W, or
mounting may be delayed until *after* the test process begins.
This is fairly common location to use. See e.g.:
https://reviews.llvm.org/D9569
PiperOrigin-RevId: 270909282
|
|
|
|
|
| |
Due to confusion arisen from "iff" standing for "if and only if",
this commit uses the latter.
|
| |
|
|
|
|
|
|
| |
Add a safety nullptr check to catch the case where the /tmp file used for capturing a stream cannot be created.
PiperOrigin-RevId: 250523012
|
|
|
|
|
|
|
|
| |
Some Windows users builds were broken after a0d60be. This change
addresses the lingering -Wsign-conversion issues with those platforms
by adding some missing `static_cast` calls as needed.
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Cast some values as their unsigned equivalents or `size_t` to match the
parameter type used for the template object under test. Also, provide
UInt32 equivalent delegate methods for some callers (with
int-equivalents for backwards compatibility).
This closes #2146.
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
|
|
|
|
|
|
|
|
| |
Remove support for "global" ::string and ::wstring types.
This support existed for legacy codebases that existed from before namespaces
where a thing. It is no longer necessary.
PiperOrigin-RevId: 241335738
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As noted in the patch description:
* Add DragonFly and GNU/kFreeBSD support.
* Implement GetThreadCount() for BSDs.
1. https://svnweb.freebsd.org/ports/head/devel/googletest/files/patch-bsd-defines?revision=488934
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
|
|
|
|
|
|
| |
Internal Change
PiperOrigin-RevId: 227575279
|
|
|
|
|
|
| |
Remove scoped_ptr replace with std::unique_ptr
PiperOrigin-RevId: 219291284
|
|\
| |
| |
| | |
PiperOrigin-RevId: 219134349
|
| | |
|
|/
|
|
|
|
| |
Remove linked_ptr and use std::shared_ptr instead
PiperOrigin-RevId: 219129336
|
|
|
|
|
|
| |
Remove linked_ptr and use std::shared_ptr instead
PiperOrigin-RevId: 218618184
|
|
|
|
|
|
| |
Remove linked_ptr and use std::shared_ptr instead
PiperOrigin-RevId: 218571466
|
|
|
|
|
|
|
|
| |
658c6390a5b363f46c6ad448ad1bce9d6e97e53a
Accepts #1889
PiperOrigin-RevId: 216709878
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
Just small style changes and we can accept this PR
|