- 14 Sep, 2021 1 commit
-
-
Abseil Team authored
Avoid segfault on null premature_exit_filepath. PiperOrigin-RevId: 395965853
-
- 06 Aug, 2021 1 commit
-
-
victordk13 authored
-
- 24 Jul, 2021 1 commit
-
-
slowy07 authored
-
- 22 Jul, 2021 1 commit
-
-
Abseil Team authored
Delete GOOGLETEST_CM.* tags from C++ code. PiperOrigin-RevId: 386268534
-
- 07 Jul, 2021 2 commits
-
-
Abseil Team authored
Introduce GTEST_FLAG_GET and GTEST_FLAG_SET macros. PiperOrigin-RevId: 382808313
-
Abseil Team authored
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
-
- 17 Apr, 2021 1 commit
-
-
dmauro authored
Use the time_point from steady_clock instead of the template This fixes the build on some embedded compilers PiperOrigin-RevId: 368879480
-
- 15 Apr, 2021 1 commit
-
-
John Bampton authored
-
- 14 Apr, 2021 1 commit
-
-
Abseil Team authored
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
-
- 16 Mar, 2021 1 commit
-
-
Abseil Team authored
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
-
- 09 Mar, 2021 2 commits
-
-
Abseil Team authored
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
-
Abseil Team authored
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
-
- 18 Feb, 2021 1 commit
-
-
Abseil Team authored
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
-
- 05 Feb, 2021 1 commit
-
-
dmcardle authored
Use linear-time string globbing in UnitTestOptions::MatchesFilter. Algorithm is based on https://research.swtch.com/glob. Closes #3227 PiperOrigin-RevId: 355222440
-
- 06 Jan, 2021 1 commit
-
-
David Benjamin authored
This fixes build issues with GoogleTest when built with -Wformat-nonliteral and unblocks updating GoogleTest in BoringSSL. It was added in 53c478d6, which caught some bugs. Then it was moved to the header and accidentally dropped in 482ac6ee.
-
- 03 Jan, 2021 1 commit
-
-
Krystian Kuzniarek authored
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).
-
- 05 Dec, 2020 1 commit
-
-
malcops authored
-
- 14 Nov, 2020 1 commit
-
-
Vinson Lee authored
Signed-off-by:Vinson Lee <vlee@freedesktop.org>
-
- 12 Nov, 2020 1 commit
-
-
Abseil Team authored
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
-
- 11 Nov, 2020 1 commit
-
-
Abseil Team authored
Remove unreachable code when GTEST_CUSTOM_TEMPDIR_FUNCTION_ is defined. PiperOrigin-RevId: 341810264
-
- 08 Nov, 2020 1 commit
-
-
Hyuk Myeong authored
-
- 20 Oct, 2020 1 commit
-
-
Arthur Sonzogni authored
Replace "definedin in" by "defined in" in files: - googletest/src/gtest.cc - googletest/test/googletest-output-test-golden-lin.txt
-
- 24 Sep, 2020 2 commits
-
-
Abseil Team authored
Revision of recent DoubleNearPredFormat change to support more toolchains. isnan() is a macro in C99, and std::isnan() is a function in C++11. The previous change used `isnan` directly, and broke some tests in open source. This CL changes it to follow the practice in gmock-matchers.h, and spell uses of isnan as (std::isnan)(f) . The parens around `std::isnan` prevent it from being recognized as a macro in the preprocessor. PiperOrigin-RevId: 333374377
-
Abseil Team authored
Improve DoubleNearPredFormat output on bad epsilons DoubleNearPredFormat will happily accept epsilon values (abs_error) that are so small that they are meaningless. This turns EXPECT_NEAR into a complicated and non-obvious version of EXPECT_EQ. This change modifies DoubleNearPredFormat) so that when there is a failure it calculates the smallest meaningful epsilon value, given the input values, and then prints a message which explains what happened. If a true equality test is wanted either pass a literal 0.0 as abs_error or use EXPECT_EQ. If a check for being almost equal is wanted consider using EXPECT_DOUBLE_EQ which, contrary to its name, verifies that the two numbers are *almost* equal (within four ULPs). With this change the flaky test mentioned in crbug.com/786046 gives this output: The difference between 4.2934311416234112e+18 and 4.2934311416234107e+18 is 512, where 4.2934311416234112e+18 evaluates to 4.2934311416234112e+18, 4.2934311416234107e+18 evaluates to 4.2934311416234107e+18. The abs_error parameter 1.0 evaluates to 1 which is smaller than the minimum distance between doubles for numbers of this magnitude which is 512, thus making this EXPECT_NEAR check equivalent to EXPECT_EQUAL. Consider using EXPECT_DOUBLE_EQ instead. Tested: I confirmed that this change detects the bad epsilon value that caused crbug.com/786046 in Chromium and added a test for the desired output. PiperOrigin-RevId: 332946880
-
- 08 Sep, 2020 1 commit
-
-
dmauro authored
Implements GetTimeInMillis() using std::chrono for portability Fixes #2995 PiperOrigin-RevId: 329709958
-
- 01 Sep, 2020 2 commits
-
-
Abseil Team authored
gtest.cc: make ColoredPrintf static the prototype was removed from gtest.h in cl/301446904; quiets a -Wmissing-declarations warning PiperOrigin-RevId: 329569020
-
Abseil Team authored
Add millisecond precision to start timestamp in XML/JSON output - Previous timestamp had format YYYY-MM-DDThh:mm:ss, now YYYY-MM-DDThh:mm:ss.sss - This conforms to the ISO 8601 standard PiperOrigin-RevId: 329503623
-
- 28 Jul, 2020 1 commit
-
-
srz_zumix authored
-
- 18 Jun, 2020 1 commit
-
-
Abseil Team authored
gtest.cc: fix a couple typos s/paramaterized/parameterized/ PiperOrigin-RevId: 316878900
-
- 10 Jun, 2020 1 commit
-
-
Abseil Team authored
Fail TEST_Ps or TYPED_TEST_Ps that are defined but are not instantiated, as well as the opposite case, where INSTANTIATE_TEST_SUITE_P or INSTANTIATE_TYPED_TEST_SUITE_P is used but without any matching TEST_P or TYPED_TEST_P. PiperOrigin-RevId: 315255779
-
- 08 May, 2020 2 commits
-
-
Martin Storsjö authored
The documentation for IsDebuggerPresent says that one just should include windows.h, as that one is an umbrella header that includes the header that declares IsDebuggerPresent. In older Windows SDKs, debugapi.h didn't exist and IsDebuggerPresent was declared in winbase.h (also included by windows.h). This should fix issue #2822 properly.
-
Martin Storsjö authored
This reverts commit a9f6c1ed. That commit cannot fix the issue it sets out to fix. The original issue, #2822, was that building with a toolset targeting XP compatibility is missing the debugapi.h header - as debugapi.h didn't exist in older Windows SDKs. Commit a9f6c1ed misinterpreted the Microsoft documentation about IsDebuggerPresent. The information about which header to use, "debugapi.h (include Windows.h)" means that the function declaration currently lives in debugapi.h, but for compatibility, just include the Windows.h umbrella header. In older Windows SDKs (e.g. the v6.0a SDK), IsDebuggerPresent is declared in winbase.h, and debugapi.h doesn't exist at all in those versions. Including Windows.h with a different capitalization than the existing include won't help finding headers that don't exist. Including Windows.h with a capital W breaks cross compilation with mingw toolchains, where the header always has been spelled with a lower case W. When building on native windows, the file system is case insensitive and the capitalization doesn't matter. This fixes issue #2840.
-
- 05 May, 2020 1 commit
-
-
Abseil Team authored
Addresses Github issue (https://github.com/google/googletest/issues/2822) by following the Microsoft documention (https://docs.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-isdebuggerpresent) to include capital-W Windows.h before including debugapi.h. See "Header debugapi.h (include Windows.h)" PiperOrigin-RevId: 309745868
-
- 09 Apr, 2020 1 commit
-
-
Malcolm Parsons authored
-
- 29 Mar, 2020 1 commit
-
-
Laurent VERDOÏA authored
-
- 26 Mar, 2020 3 commits
-
-
Mario Voorsluys authored
-
Mario Voorsluys authored
-
Mario Voorsluys authored
-
- 24 Mar, 2020 1 commit
-
-
Abseil Team authored
Add --gtest_fail_fast support to googletest. - Analogous functionality to to golang -test.failfast and python --failfast - Stops test execution upon first test failure. - Also add support Bazel equivalent env var (TESTBRIDGE_TEST_RUNNER_FAIL_FAST) PiperOrigin-RevId: 302488880
-
- 19 Mar, 2020 1 commit
-
-
Calum Robinson authored
Only prints failures and a total pass count
-