- 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
-
- 17 Mar, 2020 1 commit
-
-
Abseil Team authored
Move internal function out of header because Hyrum's law always wins. PiperOrigin-RevId: 301446904
-
- 28 Feb, 2020 1 commit
-
-
Abseil Team authored
Rename internal color enumerators to avoid conflicts with curses.h macro definitions. Fixes #2685 PiperOrigin-RevId: 297639382
-
- 21 Feb, 2020 1 commit
-
-
Johan Mabille authored
-
- 21 Jan, 2020 1 commit
-
-
Abseil Team authored
Add extra filtering so that the reported message differentiates between the case where INSTANTIATE_TEST_SUITE_P is missing vs. the case where TEST_P is missing. PiperOrigin-RevId: 290114508
-
- 16 Jan, 2020 4 commits
-
-
Abseil Team authored
Correct the spelling of PARAMETERIZED. PiperOrigin-RevId: 289897278
-
Abseil Team authored
Wire up things to support marking a type paramaterized test as allowed to be un-instantiated. PiperOrigin-RevId: 289699939
-
Abseil Team authored
Add GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST to mark a paramaterized test as allowed to be un-instantiated. This allows test suites, that are defined in libraries and, for other reasons, get linked in (which should probably be avoided, but isn't always possible) to be marked as allowed to go uninstantiated. This can also be used to grandfather existing issues and expedite adoption of the checks with regards to new cases before they can be fixed. PiperOrigin-RevId: 289581573
-
Abseil Team authored
Change testing::TempDir() return value for Android PiperOrigin-RevId: 289102017
-
- 02 Jan, 2020 1 commit
-
-
Abseil Team authored
Add option (default to disabled) to make C++ type parameterized tests (TYPED_TEST_P) fail when they're not instantiated. When an un-instantiated TYPED_TEST_P is found, a new test will be inserted that emits a suitable message. For now, that is just a notice, but the hope it to flip the bit to make it fail by default. PiperOrigin-RevId: 286408038
-
- 13 Dec, 2019 1 commit
-
-
Abseil Team authored
Detect when C++ parametric tests (TEST_P) are not instantiated. When an un-instantiated TEST_P is found, a new test will be inserted that will emit a warning message. This can be made to error with minor code edits. In the future, that is intended to be the default. PiperOrigin-RevId: 284901666
-
- 06 Dec, 2019 1 commit
-
-
Abseil Team authored
Change googletest to notice failures during SetUpTestSuite() and TearDownTestSuite(). Previously, errors that occurred during those functions were logged but otherwise ignored. After this change, such failures will cause the test to fail and a brief summary will be printed at the bottom of the test log. See https://github.com/google/googletest/issues/2330. PiperOrigin-RevId: 284033342
-
- 22 Nov, 2019 1 commit
-
-
Abseil Team authored
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
-