summaryrefslogtreecommitdiffstats
path: root/googletest/src
Commit message (Collapse)AuthorAgeFilesLines
* Make g_argvs staticDominic Sacré2018-08-311-1/+1
| | | | | | Fix Clang warning: | warning: no previous extern declaration for non-static variable 'g_argvs' | [-Wmissing-variable-declarations]
* Googletest exportAbseil Team2018-08-283-510/+244
| | | | | | Breaks Windows builds PiperOrigin-RevId: 210434120
* Googletest exportAbseil Team2018-08-283-244/+510
| | | | | | | | | | | | | | Fix Theta(N^2) memory usage of EXPECT_EQ(string) when the strings don't match. The underlying CalculateOptimalEdits() implementation used a simple dynamic-programming approach that always used N^2 memory and time. This meant that tests for equality of large strings were ticking time bombs: They'd work fine as long as the test passed, but as soon as the strings differed the test would OOM, which is very hard to debug. I switched it out for a Dijkstra search, which is still worst-case O(N^2), but in the usual case of mostly-matching strings, it is much closer to linear. PiperOrigin-RevId: 210405025
* Googletest exportmisterg2018-08-281-6/+1
| | | | | | Code Cleanup PiperOrigin-RevId: 210393771
* Merge 72a2836945e7a3dcee0730166704587e10bf64ee into ↵David Schuldenfrei2018-08-271-71/+139
| | | | | | | | | | 1d9a1912e7f42e8ae66ea365b5b8508fecb31509 Closes #1658 Review and changes, mister@google.com PiperOrigin-RevId: 210374286
* Googletest exportrefs/pull/1779/headmisterg2018-08-231-7/+7
| | | | | | Remove unneeded check for NULL. Note: this started as OSS PR https://github.com/google/googletest/pull/967 but changed PiperOrigin-RevId: 209819732
* googletest exportmisterg2018-08-201-0/+5
| | | | | | - 209457654 Import of OSS PR, https://github.com/google/googletest/pu... by misterg <misterg@google.com> PiperOrigin-RevId: 209457654
* Merge branch 'master' into fix_death_test_child_mingw_wer_issue1116refs/pull/1120/headGennadiy Civil2018-08-201-0/+17
|\
| * Minor formatting/style changesGennadiy Civil2018-08-171-8/+7
| |
| * Merge branch 'master' into fix-argcConor Burgess2018-08-1710-197/+1018
| |\
| * \ Merge branch 'master' into fix-argcConor Burgess2018-02-126-37/+137
| |\ \
| * \ \ Merge branch 'master' into fix-argcConor Burgess2018-01-126-104/+58
| |\ \ \
| * | | | Fix location of `_NSGetArgv` correction.Conor Burgess2017-12-071-10/+11
| | | | |
| * | | | Fix value pointed to by `_NSGetArgc()` on macOSConor Burgess2017-12-071-0/+16
| | | | |
* | | | | Merge branch 'master' into fix_death_test_child_mingw_wer_issue1116Tanzinul Islam2018-08-1710-67/+140
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Small style changes. refs/pull/1142/headGennadiy Civil2018-08-161-14/+8
| | | | | | | | | | | | | | | Just small style changes and we can accept this PR
| * | | | Merge branch 'master' into masterGennadiy Civil2018-08-1610-309/+1144
| |\ \ \ \
| | * | | | Comments changes, no functionality changes. Gennadiy Civil2018-08-146-24/+24
| | | | | |
| | * | | | Comments changes, no functionality changesrefs/pull/1740/headGennadiy Civil2018-08-149-19/+8
| | | | | |
| | * | | | Merge branch 'master' into deprecaterefs/pull/1665/headGennadiy Civil2018-08-142-4/+7
| | |\ \ \ \
| | | * | | | Code formatting changes, clean up, no functionality changesrefs/pull/1738/headGennadiy Civil2018-08-141-1/+0
| | | | | | |
| | | * | | | code management comments, [ci-skip], no functionality changesGennadiy Civil2018-08-091-0/+1
| | | | | | |
| | | * | | | Fixing identation, causes build errors when warnings are treated as errorsrefs/pull/1721/headGennadiy Civil2018-08-091-1/+2
| | | | | | |
| | | * | | | Update gtest-death-test.ccGennadiy Civil2018-08-091-7/+9
| | | | | | |
| | | * | | | Fixing identation, causes build errors when warnings are treated as errorsGennadiy Civil2018-08-091-2/+2
| | | | | | |
| | * | | | | Merge branch 'master' into deprecateLoo Rong Jie2018-08-092-15/+54
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge branch 'master' of https://github.com/google/googletestGennadiy Civil2018-08-082-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Formatting changes and code sync Merge branch 'master' of https://github.com/google/googletest
| | | * | | | No default exception handlingWez2018-08-031-15/+50
| | | | | | |
| | * | | | | Merge branch 'master' into deprecateGennadiy Civil2018-08-031-1/+1
| | |\ \ \ \ \ | | | |/ / / /
| | * | | | | Merge branch 'master' into deprecateGennadiy Civil2018-07-301-1/+1
| | |\ \ \ \ \
| | * | | | | | Disable MSVC function deprecation when using ClangLoo Rong Jie2018-07-132-4/+4
| | | | | | | |
| * | | | | | | Merge branch 'master' of https://github.com/google/googletestScott Slack-Smith2017-11-243-41/+64
| |\ \ \ \ \ \ \
| * | | | | | | | *Silence false positive memory leaks reported by Microsoft's debug CRT*Scott Slack-Smith2017-06-301-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new RAII MemoryIsNotDeallocated class that excludes memory allocations from Microsoft’s debug CRT leak detection report. We use this RAII class to silence 2 false positive leaks that are caused by memory allocations that are intentionally never deallocated. *Background* The MS debug CRT has a lightweight memory leak detection mechanism that can only detect if a memory allocation is missing a matching deallocation. Consequently, it will report a false positive leak for memory that’s intentionally never deallocated. For example, memory that’s reachable for the entire lifetime of a app. Note the MS debug CRT is always tracking memory allocations but the final memory leak report is disabled by default. As you can’t avoid paying for its cost, you may as well use it. The memory leak report can be enabled by calling the following function #ifdef _MSC_VER _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF); #endif // _MSC_VER anywhere before exiting main. For example, the following are the false positive leaks reported before this change; Detected memory leaks! Dumping objects -> {750} normal block at 0x015DF938, 8 bytes long. Data: < ] > 00 F9 5D 01 00 00 00 00 {749} normal block at 0x015DEE60, 32 bytes long. Data: <` ] ` ] ` ] > 60 EE 5D 01 60 EE 5D 01 60 EE 5D 01 01 01 CD CD {748} normal block at 0x015DF900, 12 bytes long. Data: <8 ] ` ] > 38 F9 5D 01 60 EE 5D 01 00 00 00 00 {747} normal block at 0x015DA0F8, 24 bytes long. Data: < > FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 Object dump complete. As you can see from above it’s not easy to identify the above are false positives. Consequently, if false positive leaks are not fixed or silenced, then it becomes impractical to identify real memory leaks.
* | | | | | | | | Merge branch 'master' into fix_death_test_child_mingw_wer_issue1116Tanzinul Islam2018-08-018-41/+131
|\ \ \ \ \ \ \ \ \ | | |_|_|_|/ / / / | |/| | | | | | |
| * | | | | | | | Merge branch 'master' into masterrefs/pull/1685/headGennadiy Civil2018-07-301-1/+1
| |\ \ \ \ \ \ \ \ | | | |_|_|/ / / / | | |/| | | | | |
| | * | | | | | | small tweaks, OSS merge cl 206357486Gennadiy Civil2018-07-301-1/+1
| | | |_|/ / / / | | |/| | | | |
| * | | | | | | Updated broken and outdated URLsPiotr Kąkol2018-07-251-1/+1
| |/ / / / / /
| * | | | | | Adds stacktrace support from Abseil to Google TestDerek Mauro2018-07-102-3/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the ability to generate stacktraces in Google Test on both failures of assertions/expectations and on crashes. The stacktrace support is conditionally available only when using Abseil with Google Test. To use this support, run the test under Bazel with a command like this: bazel test --define absl=1 --test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1 //path/to/your:test The "--define absl=1" part enables stacktraces on assertion/expectation failures. The "--test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" part enables the signal handler that logs a stacktrace in the event of a crash (this also requires the "--define absl=1" part). This is not the default since it may interfere with existing tests.
| * | | | | | Eliminate GTEST_TEST_FILTER_ENV_VAR_.refs/pull/1622/headRohan Joyce2018-06-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GTEST_TEST_FILTER_ENV_VAR_ was used to specify an environment variable to obtain the default test filter from. By default it was unset which broke "--test_filter" for bazel. This CL eliminates GTEST_TEST_FILTER_ENV_VAR_ and explicitly obtains the default test filter from the environment variable TESTBRIDGE_TEST_ONLY if it exists.
| * | | | | | Reduce the number of strcmp calling while initializationTakuto Ikuta2018-06-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we do parallel test execution with a process for a test, initialization of gtest become performance bottleneck when the test binary contains many testcases. Especially, some parameterlized test in chromium browser affected by largely when address sanitizer is enabled. Address sanitizer does not allow using optimized strcmp function and test addition in parameterized test require lookup of test case using strcmp. This patch reduces the number of strcmp, it is called when registering parameterized test. Using reverse iterator improves the time to find registered tests in such case. Some tests for chromium browser using address sanitizer finished 2x faster with this patch.
| * | | | | | Merge branch 'master' of https://github.com/google/googletestGennadiy Civil2018-06-111-2/+2
| |\ \ \ \ \ \
| | * | | | | | Fuchsia: Change fdio include path.refs/pull/1623/headFabrice de Gans-Riberi2018-06-071-2/+2
| | | | | | | |
| * | | | | | | Rename AdvancedGuide.md to advanced.md and adjust the links. Gennadiy Civil2018-06-111-1/+1
| |/ / / / / / | | | | | | | | | | | | | | Part of documentation rationalization work
| * | | | | | Clean upFabrice de Gans-Riberi2018-05-311-5/+1
| | | | | | |
| * | | | | | Remvoe launchpad dependency from Fuchsia.Fabrice de Gans-Riberi2018-05-311-23/+26
| | | | | | |
| * | | | | | Formatting changes refs/pull/1607/headGennadiy Civil2018-05-235-5/+5
| | | | | | |
| * | | | | | Remove unused variable in Fuchsia.Fabrice de Gans-Riberi2018-05-111-1/+1
| | | | | | |
* | | | | | | Merge branch 'master' into fix_death_test_child_mingw_wer_issue1116Tanzinul Islam2018-05-133-15/+234
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Use NULL instead of nullptr, for pre-C++11 builds.refs/pull/1597/headJae Heon Lee2018-05-091-2/+2
| | | | | | |
| * | | | | | Fix the bug where ad_hoc_test_result() functions of UnitTest and TestCase ↵Jae Heon Lee2018-05-071-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | objects would return failures registered at TestCase and UnitTest scopes, respectively.