summaryrefslogtreecommitdiffstats
path: root/googletest/src/gtest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Googletest exportHEADmasterAbseil Team2020-02-281-46/+49
| | | | | | | Rename internal color enumerators to avoid conflicts with curses.h macro definitions. Fixes #2685 PiperOrigin-RevId: 297639382
* Googletest exportAbseil Team2020-01-211-4/+17
| | | | | | 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
* Googletest exportAbseil Team2020-01-161-2/+3
| | | | | | Correct the spelling of PARAMETERIZED. PiperOrigin-RevId: 289897278
* Googletest exportAbseil Team2020-01-161-1/+8
| | | | | | Wire up things to support marking a type paramaterized test as allowed to be un-instantiated. PiperOrigin-RevId: 289699939
* Googletest exportAbseil Team2020-01-161-1/+18
| | | | | | | | | | 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
* Googletest exportAbseil Team2020-01-161-1/+5
| | | | | | Change testing::TempDir() return value for Android PiperOrigin-RevId: 289102017
* Googletest exportAbseil Team2020-01-021-0/+59
| | | | | | | | 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
* Googletest exportAbseil Team2019-12-131-0/+60
| | | | | | | | | | | 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
* Googletest exportAbseil Team2019-12-061-10/+29
| | | | | | | | | | 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
* Googletest exportAbseil Team2019-11-221-32/+31
| | | | | | | | | | | | | 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
* Merge pull request #2521 from Sinclair-John:masterAndy Getz2019-11-151-1/+4
|\ | | | | | | PiperOrigin-RevId: 280666222
| * Fix Issue 2418refs/pull/2521/headSinclair-John2019-10-181-1/+4
| |
* | 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-251-0/+2
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 276333426
| * | | feat: Add support for ESP8266 platformChris Johnson2019-10-111-0/+2
| | |/ | |/| | | | | | | | | | | | | 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 #2387 from kuzkry:iffShaindel Schwartz2019-09-121-80/+76
|\ \ | |/ |/| | | PiperOrigin-RevId: 268693457
| * restore mistakenly removed iffs in their explicit formrefs/pull/2387/headKrystian Kuzniarek2019-08-201-59/+63
| | | | | | | | | | Due to confusion arisen from "iff" standing for "if and only if", this commit uses the latter.
* | Googletest exportAbseil Team2019-09-061-1/+1
|/ | | | | | | | | | | 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-301-39/+39
|
* 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
* 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.
* 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-181-30/+39
|\ | | | | | | PiperOrigin-RevId: 244069956
| * clang: fix `-Wsign-conversion` errorsEnji Cooper2019-04-061-22/+31
|/ | | | | | | | | | | 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>
* 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-011-11/+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
* 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
* 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
* Merge pull request #2041 from ciband:chore/fix_library_jsonGennadiy Civil2019-01-231-0/+16
| | | | PiperOrigin-RevId: 230554814
* Googletest exportmisterg2019-01-031-364/+413
| | | | | | TestCase->TestSuite refactoring PiperOrigin-RevId: 227702164
* Googletest exportmisterg2019-01-021-25/+0
| | | | | | Internal Change PiperOrigin-RevId: 227575279
* Googletest exportAbseil Team2019-01-021-12/+6
| | | | | | | | Remove the #ifs for old, unsupported and buggy compilers: * old versions of GCC & MSVC * Symbian PiperOrigin-RevId: 227116941
* Googletest exportAbseil Team2018-12-131-1/+3
| | | | | | Support skipped in XML and JSON output PiperOrigin-RevId: 225386540
* Googletest exportmisterg2018-12-131-1/+1
| | | | | | Internal Change PiperOrigin-RevId: 225231727
* Googletest exportAbseil Team2018-12-031-29/+29
| | | | | | Applied fixes for ClangTidy modernize-use-override and modernize-use-using. PiperOrigin-RevId: 223800219
* Googletest exportmisterg2018-11-201-1/+1
| | | | | | Internal Change PiperOrigin-RevId: 222123106
* Remove workarounds for unsupported MSVC versionsRobin Lindén2018-11-101-16/+3
|
* Merge pull request #1941 from barkovv:masterGennadiy Civil2018-10-291-20/+17
|\ | | | | | | PiperOrigin-RevId: 219134349
| * Replaced all NULLs with nullptr in googletestVadim Barkov2018-10-281-12/+12
| |
* | Googletest exportmisterg2018-10-291-3/+0
|/ | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 219129336
* Googletest exportAbseil Team2018-10-261-0/+3
| | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218618184