summaryrefslogtreecommitdiffstats
path: root/googletest/src
Commit message (Collapse)AuthorAgeFilesLines
* unify googletest and googlemock main functionsrefs/pull/2596/headKrystian Kuzniarek2019-11-221-3/+8
|
* Merge pull request #2453 from kuzkry:gtest-port-clean-up_kMaxBiggestIntXiaoyi Zhang2019-11-041-15/+16
|\ | | | | | | PiperOrigin-RevId: 278008286
* \ Merge pull request #2453 from kuzkry:gtest-port-clean-up_kMaxBiggestIntvslashg2019-11-011-16/+15
|\ \ | |/ | | | | PiperOrigin-RevId: 277979766
| * remove BiggestIntrefs/pull/2453/headKrystian Kuzniarek2019-10-241-4/+4
| |
* | Merge pull request #2515 from ciband:feat/support_esp8266vslashg2019-10-253-2/+14
|\ \ | | | | | | | | | PiperOrigin-RevId: 276333426
| * | Add ESP8266 configs to PlatformIO buildChris Johnson2019-10-112-2/+12
| | | | | | | | | | | | | | | Added various conditional compliations for ESP8266 to stub out missing functionality.
| * | feat: Add support for ESP8266 platformChris Johnson2019-10-113-2/+4
| | | | | | | | | | | | | | | | | | Added support for ESP8266 Arduino platform. Refactored Arduino defines to use the GTEST_OS_* model.
* | | [googletest] Output skip messagerefs/pull/2517/headAlexey Spiridonov2019-10-171-3/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #2208 Previously, skip messages were invisible, so debugging skips was hard. Now we have this: ``` $ ./googletest/gtest_skip_test Running main() from /home/lesha/github/snarkmaster/googletest/googletest/src/gtest_main.cc [==========] Running 3 tests from 2 test suites. [----------] Global test environment set-up. [----------] 1 test from SkipTest [ RUN ] SkipTest.DoesSkip /home/lesha/github/snarkmaster/googletest/googletest/test/gtest_skip_test.cc:38: Skipped skipping single test [ SKIPPED ] SkipTest.DoesSkip (0 ms) [----------] 1 test from SkipTest (1 ms total) ... ```
* | Merge pull request #2497 from thejcannon:handle_null_filenameGennadiy Civil2019-10-101-1/+5
|\ \ | | | | | | | | | PiperOrigin-RevId: 273585229
| * | Use FormatFileLocation for streaming file and linerefs/pull/2497/headJoshua Cannon2019-10-071-1/+2
|/ /
* | Googletest exportAbseil Team2019-09-271-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #2387 from kuzkry:iffShaindel Schwartz2019-09-124-116/+113
|\ \ | |/ |/| | | PiperOrigin-RevId: 268693457
| * restore mistakenly removed iffs in their explicit formrefs/pull/2387/headKrystian Kuzniarek2019-08-204-95/+100
| | | | | | | | | | Due to confusion arisen from "iff" standing for "if and only if", this commit uses the latter.
* | Googletest exportAbseil Team2019-09-062-3/+3
|/ | | | | | | | | | | Extend gtest-port and stubs for ESP_PLATFORM ESP_PLATFORM is the macro used to indicate compilation for the ESP32 using the esp-idf. This isn't a fully posix compatible system so various features of google test need to be stubbed out in order for it to work. It's oddly similar to the GTEST_OS_WINDOWS_PHONE setup. PiperOrigin-RevId: 267471968
* Fix #2371: Redirect Windows CRT assertions to stderrrefs/pull/2372/headAntoine Pitrou2019-08-061-5/+15
|
* Googletest exportAbseil Team2019-08-011-2/+2
| | | | | | | Fix signed conversion warning for wchar_t -> wint_t. Fixes Github issue #2300 PiperOrigin-RevId: 261045497
* Googletest exportmisterg2019-08-011-9/+49
| | | | | | Internal Change PiperOrigin-RevId: 260939845
* fix typosrefs/pull/2356/headKrystian Kuzniarek2019-07-304-61/+61
|
* Googletest exportAbseil Team2019-07-261-17/+24
| | | | | | | | Adds ISO8601 timestamps to XML output and RFC3339 timestamps to JSON output. Adds timestamps to testsuites, testsuite and testcases structured JSON/XML output for better reporting how/where time is spent on tests. PiperOrigin-RevId: 260039817
* Googletest exportAbseil Team2019-07-161-24/+34
| | | | | | | | | [Fuchsia] Update exception APIs used by death test. Migrates to the new channel-based exception APIs as the port APIs are deprecated and will be removed. PiperOrigin-RevId: 258175830
* Googletest exportAbseil Team2019-06-051-1/+1
| | | | | | fdio_pipe_half is now the same as fdio_pipe_half2. We can switch back to the cleaner name. PiperOrigin-RevId: 251633832
* Googletest exportAbseil Team2019-05-301-0/+9
| | | | | | Add a safety nullptr check to catch the case where the /tmp file used for capturing a stream cannot be created. PiperOrigin-RevId: 250523012
* unbreak windows buildrefs/pull/2260/headLingfeng Yang2019-05-221-1/+1
| | | | | windows msvc toolchain with werror and wconversion will break if converting long to DWORD.
* Fix -Wsign-conversion error by adding static_castrefs/pull/2245/headdaquexian2019-05-021-1/+1
|
* Address fallout from -Wsign-conversion work on Windowsrefs/pull/2241/headEnji Cooper2019-04-262-3/+4
| | | | | | | | 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>
* Googletest exportmisterg2019-04-181-2/+2
| | | | | | Fixes https://github.com/google/googletest/issues/2232 PiperOrigin-RevId: 244237560
* Merge pull request #2170 from ngie-eign:issue-2146-ver2Gennadiy Civil2019-04-186-44/+58
|\ | | | | | | PiperOrigin-RevId: 244069956
| * clang: fix `-Wsign-conversion` errorsEnji Cooper2019-04-066-36/+49
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Googletest exportAbseil Team2019-04-161-1/+1
| | | | | | | | | | | | [googletest] Fix death test condition. PiperOrigin-RevId: 243742424
* | Googletest exportAbseil Team2019-04-161-2/+6
|/ | | | | | | | | Migrate ZX_WAIT_ASYNC_REPEATING to ZX_WAIT_ASYNC_ONCE ZX_WAIT_ASYNC_REPEATING is deprecated so convert code to use ZX_WAIT_ASYNC_ONCE instead. PiperOrigin-RevId: 243707147
* Googletest exportAbseil Team2019-04-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [fdio] Improve fdio_pipe_half signature, step 3. The return value on fdio_pipe_half conflated two things: the error code on failure (as a zx_status_t) or a file descriptor on success. This technically worked, because they're both ints, the error code was always negative, and the file descriptor always positive. However, the stated return type of zx_status_t was misleading. This changes the signature such that it always returns an actual zx_status_t, and the file descriptor is returned through a pointer argument. Also remove the last argument, since it was always given the same value. This needs to be done as a soft transition because it's called from the Dart runtime, from googletest, and from Crashpad, and Crashpad and Chromium both depend on googletest on Fuchsia. The steps are as follows: 1) Add fdio_pipe_half2. 2) Update Dart to use fdio_pipe_half2. 3) Update googletest to use fdio_pipe_half2. 4) Roll updated googletest into Chronium. 5) Update Crashpad to use fdio_pipe_half2 and roll updated googletest into it. 6) Update fdio_pipe_half to match fdio_pipe_half2. 7) Update Dart to use fdio_pipe_half again. 8) Update googletest to use fdio_pipe_half again. 9) Roll updated googletest into Chronium. 10) Update Crashpad to use fdio_pipe_half again and roll updated googletest into it. 11) Remove fdio_pipe_half2. This is step 3. PiperOrigin-RevId: 241957137
* Merge pull request #2203 from ngie-eign:issue-2189Gennadiy Civil2019-04-031-3/+17
|\ | | | | | | PiperOrigin-RevId: 241803437
| * Handle GTEST_SKIP() when calling `Environment::SetUp()`refs/pull/2203/headEnji Cooper2019-03-301-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gtest prior to this change would completely ignore `GTEST_SKIP()` if called in `Environment::SetUp()`, instead of bailing out early, unlike `Test::SetUp()`, which would cause the tests themselves to be skipped. The only way (prior to this change) to skip the tests would be to trigger a fatal error via `GTEST_FAIL()`. Desirable behavior, in this case, when dealing with `Environment::SetUp()` is to check for prerequisites on a system (example, kernel supports a particular featureset, e.g., capsicum), and skip the tests. The alternatives prior to this change would be undesirable: - Failing sends the wrong message to the test user, as the result of the tests is indeterminate, not failed. - Having to add per-test class abstractions that override `SetUp()` to test for the capsicum feature set, then skip all of the tests in their respective SetUp fixtures, would be a lot of human and computational work; checking for the feature would need to be done for all of the tests, instead of once for all of the tests. For those reasons, making `Environment::SetUp()` handle `GTEST_SKIP()`, by not executing the testcases, is the most desirable solution. In order to properly diagnose what happened when running the tests if they are skipped, print out the diagnostics in an ad hoc manner. Update the documentation to note this change and integrate a new test, gtest_skip_in_environment_setup_test, into the test suite. This change addresses #2189. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* | Googletest exportAbseil Team2019-04-012-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add HWASan annotations. These mirror existing ASan annotations. HWASan uses memory (address) tagging to detect memory errors: https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html It inserts a random tag in the MSB of heap and stack allocation addresses. This tag dominates pointer comparison in StackGrowsDown(), making the result non-deterministic, and entirely unrelated to the actual stack growth direction. The function attribute disables this behavior. The annotations in gtest-printers are there because the printers are used to basically dump memory. The sanitizers may have ideas why this memory should not be accessed, and that is counter productive. In particular, the test may access only part of an array, but in case of a test failure gtest will dump the entire array which may contain uninitialized bytes - that's what SANITIZE_MEMORY annotation is for. There are similar reasons for ADDRESS and THREAD annotations. HWADDRESS in its current implementation can not cause issues there, I believe, but it falls under the same umbrella of tools whose checking should not apply to test printers because it is not the code under test. PiperOrigin-RevId: 241379822
* | Googletest exportAbseil Team2019-04-014-91/+2
|/ | | | | | | | 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
* Googletest exportAbseil Team2019-03-281-12/+40
| | | | | | Update XML and JSON output to be consistent with the standard. PiperOrigin-RevId: 239833242
* Remove old_crtdbg_flag_ member if not requiredTobias Müller2019-03-191-4/+6
|
* Googletest exportAbseil Team2019-03-051-1/+1
| | | | | | | | | | | | Build gmock cleanly with clang -Wextra-semi and -Wextra-semi-stmt Extends 56ef07a20308 to take -Wc++98-compat-extra-semi (https://reviews.llvm.org/D43162) and -Wextra-semi-stmt (https://reviews.llvm.org/D52695) into account. For https://crbug.com/926235. PiperOrigin-RevId: 236643095
* Googletest exportAbseil Team2019-02-201-6/+4
| | | | | | | | Update gtest-death-test to use new Fuchsia API Fuchsia has renamed this API and removed the need for several parameters. We now use the newer, simpler API. PiperOrigin-RevId: 234617715
* Merge pull request #2112 from knuto:pr/fix_null_pointerGennadiy Civil2019-02-131-0/+2
|\ | | | | | | PiperOrigin-RevId: 233825166
| * Stop TestInfo::Run() calling a function through null pointerrefs/pull/2112/headJonathan Wakely2019-02-111-1/+3
| | | | | | | | | | | | | | If the object was never created then trying to call &Test::DeleteSelf_ will dereference a null pointer, with undefined behaviour. Fixes #845
* | Import `patch-bsd-defines` from FreeBSD ports [1]Enji Cooper2019-02-131-0/+83
|/ | | | | | | | | | 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>
* Merge pull request #2098 from ciband:feat/finish_platformio_supportGennadiy Civil2019-02-041-2/+3
|\ | | | | | | PiperOrigin-RevId: 232028696
| * fix: Add Arduino to embedded platform listChris2019-02-011-2/+2
|/ | | | | Added Arduino to the embedded platform list to allow for a stubbed out version of GetCurrentDir.
* Merge pull request #2041 from ciband:chore/fix_library_jsonGennadiy Civil2019-01-232-7/+17
|\ | | | | | | PiperOrigin-RevId: 230554814
| * fix: Add Arduino setup()/loop() functions backChris2019-01-071-0/+14
| | | | | | | | Added setup()/loop() functions back to *_main.cc files to support compiling in CI. Future features could enable this for the end user.
| * Merge branch 'master' into chore/fix_library_jsonChris Johnson2019-01-047-501/+514
| |\
| * | fix: Remove Arduino entry pointsChris2019-01-031-16/+0
| | | | | | | | | | | | | | | | | | Improved flexibility by removing the Arduino entry points in favor of manual calls to setup/loop that the user can call from their entry point. This is the more common use case for Arudino. Also added the gtest/gmock_main files to the PlatformIO ignore list since we are not supporting that feature.
* | | Merge pull request #2048 from ciband:chore/clang_tidygennadiycivil2019-01-071-1/+1
|\ \ \ | |_|/ |/| | | | | PiperOrigin-RevId: 228173023
| * | clang-tidy: modernize-deprecated-headersrefs/pull/2048/headChris2019-01-051-1/+1
| |/