| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Add printer for __{u,}int128_t.
PiperOrigin-RevId: 402417369
|
|\
| |
| |
| | |
PiperOrigin-RevId: 398271948
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not attempt to continue running a test suite if it already failed during
`SetUpTestSuite`.
The suite already failed and running the tests might just add noise to the run, or even crash the process unnecessarily.
Fixes #2187
PiperOrigin-RevId: 397770405
|
| |
| |
| |
| |
| |
| | |
Avoid segfault on null premature_exit_filepath.
PiperOrigin-RevId: 395965853
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Delete GOOGLETEST_CM.* tags from C++ code.
PiperOrigin-RevId: 386268534
|
| |
| |
| |
| |
| |
| | |
Introduce GTEST_FLAG_GET and GTEST_FLAG_SET macros.
PiperOrigin-RevId: 382808313
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
gtest: Add a flag to only set up/tear down test environments once when repeating
Currently when running a test multiple times using `--gtest_repeat` the global
test environment(s) are set up and torn down for each iteration of the test.
When checking for flakes in tests that have expensive dependencies that are set
up in the test environment (subprocesses, external dependencies, etc) this can
become expensive.
To support finding flakes in tests that fit into this category, where the setup
phase is expensive but each test case is fast, allow callers to specify via
`--gtest_recreate_environments_when_repeating=false` that the test environments
should only be set up once, for the first iteration, and only torn down once, on
the last iteration. This makes running a test with `--gtest_repeat=1000` a much
faster and more pleasant experience.
PiperOrigin-RevId: 382748942
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 379383941
|
| |/ |
|
| |
| |
| |
| |
| | |
cleanup: fix spurious MSAN warnings with Clang 12
PiperOrigin-RevId: 378430614
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
This callsite was previously updated to use ZX_INFO_PROCESS_V2 as a part of a soft transition. It is now time to revert back to `ZX_INFO_PROCESS` (which is now an alias of the former). See fxbug.dev/30751 for more details.
PiperOrigin-RevId: 372339833
|
| |
| |
| |
| |
| |
| | |
Fix iOS logging issues in tests
PiperOrigin-RevId: 370484087
|
| |
| |
| |
| |
| |
| | |
This callsite was previously updated to use ZX_INFO_PROCESS_V2 as a part of a soft transition. It is now time to revert back to `ZX_INFO_PROCESS` (which is now an alias of the former). See fxbug.dev/30751 for more details.
PiperOrigin-RevId: 369370855
|
| |
| |
| |
| |
| |
| | |
This callsite was previously updated to use ZX_INFO_PROCESS_V2 as a part of a soft transition. It is now time to revert back to `ZX_INFO_PROCESS` (which is now an alias of the former). See fxbug.dev/30751 for more details.
PiperOrigin-RevId: 369349579
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 369217358
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use the time_point from steady_clock instead of the template
This fixes the build on some embedded compilers
PiperOrigin-RevId: 368879480
|
|/ /
| |
| |
| |
| |
| | |
Fix -Wconversion issues on Fuchsia
PiperOrigin-RevId: 368520510
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add support to run gtest on Xtensa platform.
This add support to run GTest base test suits on Xtensa
(https://ip.cadence.com/ipportfolio/tensilica-ip) base simulator.
Xtensa only provides libc and some basic operations and does not run an
operating system by default.
PiperOrigin-RevId: 368162205
|
| |
| |
| |
| |
| |
| |
| | |
This is part of a soft transition over to having ZX_INFO_PROCESS
populate a new struct. See fxbug.dev/30751 for more details.
PiperOrigin-RevId: 367083068
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Print std::u8string, std::u16string, and std::u32string as string literals
Previously, these types were printed as "{ U+123, U+456, U+789 }". However,
printed output in that form is difficult to compare against any literals that
might be defined in code. Instead, just treat these types like std::string
and std::wstring, escaping non-ASCII characters with a hexadecimal escape
sequence.
The tests have also been updated to cover the new functionality: as a bonus,
the tests now also pass with the MSVC toolchain.
Internally, the code has been reorganized to primarily operate in terms of
char32_t, under the assumption that char32_t will always be at least as big
as wchar_t. While that assumption is currently true, perhaps it won't be in
the future...
PiperOrigin-RevId: 364033132
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
gtest: Output a canned test suite for environment failures in XML/JSON
This surfaces useful information about the environment failure in a structured form.
As we can see from the updated test, previously unsurfaced information is now present.
PiperOrigin-RevId: 362292322
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use monotonic time to measure test duration
System time may be updated while a test is running. When this occurs a
duration measured using system time may appear to move backwards, or
jump far forwards.
This change updates the duration measurement to use monotonic time
instead. Timestamps for the test start still use system time.
PiperOrigin-RevId: 361700881
|
| |
| |
| |
| |
| |
| |
| |
| | |
gtest.cc: Split out functions for printing `TestResult` objects
This will make it possible to reuse this code for outputting the "ad_hoc" `TestResult` objects in structured form in XML/JSON.
PiperOrigin-RevId: 361604860
|
| |
| |
| |
| |
| |
| | |
Update gtest doc link
PiperOrigin-RevId: 359622286
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Explicitly skip tests after fatal global environment setup errors
Previously the tests were all skipped, but the resulting output claimed all
tests passed.
Before:
```
[----------] Global test environment set-up.
<failure message>
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (83 ms total)
[ PASSED ] 1 test.
[ FAILED ] 0 tests, listed below:
```
After:
```
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
<failure message>
[----------] 1 test from SomeTest
[ RUN ] SomeTest.DoesFoo
<...>: Skipped
[ SKIPPED ] SomeTest.DoesFoo (0 ms)
[----------] 1 test from SomeTest (0 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (68 ms total)
[ PASSED ] 0 tests.
[ SKIPPED ] 1 test, listed below:
[ SKIPPED ] SomeTest.DoesFoo
[ FAILED ] 0 tests, listed below:
```
PiperOrigin-RevId: 358026389
|
| |
| |
| |
| |
| |
| | |
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard, attempt #2
PiperOrigin-RevId: 357056902
|
| |
| |
| |
| |
| |
| | |
Revert include guard fix
PiperOrigin-RevId: 356588893
|
| |
| |
| |
| |
| |
| | |
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard
PiperOrigin-RevId: 355882793
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use linear-time string globbing in UnitTestOptions::MatchesFilter.
Algorithm is based on https://research.swtch.com/glob.
Closes #3227
PiperOrigin-RevId: 355222440
|
| |
| |
| |
| |
| |
| | |
Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST.
PiperOrigin-RevId: 353935996
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 352626267
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Affects macros {ASSERT|EXPECT}_{EQ|NE|LE|LT|GE|GT}.
According to removed comments, these overloads were supposed to reduce
code bloat and allow anonymous enums on GCC 4.
However, the way it works on GCC 4 and the latest GCC (10.2 by now) is
that having:
template <typename T1, typename T2>
void foo(T1, T2);
using BiggestInt = long long;
void foo(BiggestInt, BiggestInt);
the template version takes precedence for almost every combination of
integral types except for two long long integers - i.e. implicit
promotion to long long is a worse match than generating a specific
template function.
Tested on GCC 4.8.1 (as GoogleTest requires C++11 and this was
the first C++11 feature-complete release of GCC),
GCC 4.8.5 (last of 4.8.x series) and the latest GCC (10.2.0).
|
|/
|
|
|
|
|
|
|
| |
This fixes build issues with GoogleTest when built with
-Wformat-nonliteral and unblocks updating GoogleTest in BoringSSL.
It was added in 53c478d639b8eebd2942e88266610ebc79c541f6, which caught
some bugs. Then it was moved to the header and accidentally dropped in
482ac6ee63429af2aa9c44f4e6427873fb68fb1f.
|
|
|
|
|
|
|
|
|
| |
Remove ZX_WAIT_ASYNC_ONCE flag
It is deprecated and will soon be removed in fuchsia source.
It's currently defined as 0 and references should be changed to 0.
PiperOrigin-RevId: 346787585
|
| |
|
|
|
|
| |
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
|
|
|
|
|
|
|
|
|
| |
Use environment variable TEST_TMPDIR in Linux environments
for temporary directory if available otherwise use /tmp/.
Bazel sets the environment variable TEST_TMPDIR when launching tests.
PiperOrigin-RevId: 342058921
|
|
|
|
|
|
| |
Remove unreachable code when GTEST_CUSTOM_TEMPDIR_FUNCTION_ is defined.
PiperOrigin-RevId: 341810264
|
|\
| |
| |
| | |
PiperOrigin-RevId: 341604515
|
| | |
|
|\ \
| |/
|/|
| | |
PiperOrigin-RevId: 341604408
|
|/
|
|
|
|
|
|
|
| |
On a diskless system you cannot get the current directory. So if
death tests are disabled anyway, there is no point trying to
get current directory.
Without this fix, running tests on diskless systems will fail,
even when death tests are disabled.
|
|\
| |
| |
| | |
PiperOrigin-RevId: 339242159
|
| | |
|
|/
|
|
|
|
| |
Replace "definedin in" by "defined in" in files:
- googletest/src/gtest.cc
- googletest/test/googletest-output-test-golden-lin.txt
|