summaryrefslogtreecommitdiffstats
path: root/googletest/src/gtest-port.cc
Commit message (Collapse)AuthorAgeFilesLines
* restore mistakenly removed iffs in their explicit formrefs/pull/2387/headKrystian Kuzniarek2019-08-201-18/+18
| | | | | Due to confusion arisen from "iff" standing for "if and only if", this commit uses the latter.
* fix typosrefs/pull/2356/headKrystian Kuzniarek2019-07-301-12/+12
|
* 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
* Address fallout from -Wsign-conversion work on Windowsrefs/pull/2241/headEnji Cooper2019-04-261-1/+1
| | | | | | | | 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>
* clang: fix `-Wsign-conversion` errorsEnji Cooper2019-04-061-2/+2
| | | | | | | | | | | 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-011-7/+0
| | | | | | | | 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
* Remove old_crtdbg_flag_ member if not requiredTobias Müller2019-03-191-4/+6
|
* 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>
* Googletest exportmisterg2019-01-021-7/+0
| | | | | | Internal Change PiperOrigin-RevId: 227575279
* Googletest exportmisterg2018-10-311-2/+2
| | | | | | Remove scoped_ptr replace with std::unique_ptr PiperOrigin-RevId: 219291284
* Merge pull request #1941 from barkovv:masterGennadiy Civil2018-10-291-33/+31
|\ | | | | | | PiperOrigin-RevId: 219134349
| * Replaced all NULLs with nullptr in googletestVadim Barkov2018-10-281-29/+29
| |
* | Googletest exportmisterg2018-10-291-5/+7
|/ | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 219129336
* Googletest exportAbseil Team2018-10-261-7/+5
| | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218618184
* Googletest exportmisterg2018-10-261-5/+7
| | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218571466
* Merge 41fc9745d4a448db7d932250d22fac1dda287443 into ↵Aaron Dierking2018-10-111-0/+3
| | | | | | | | 658c6390a5b363f46c6ad448ad1bce9d6e97e53a Accepts #1889 PiperOrigin-RevId: 216709878
* Apply clang-tidy modernize-use-nullptr to googletest.Abseil Team2018-10-051-13/+14
| | | | | | | | | | | Now that googletest has moved to C++11, it should no longer use NULL or 0 for the null pointer. This patch converts all such usages to nullptr using clang-tidy. This prevents LLVM from issuing -Wzero-as-null-pointer-constant warnings. PiperOrigin-RevId: 215814400
* 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-161-55/+90
|\
| * Comments changes, no functionality changes. Gennadiy Civil2018-08-141-3/+3
| |
| * Comments changes, no functionality changesrefs/pull/1740/headGennadiy Civil2018-08-141-2/+1
| |
| * Merge branch 'master' into deprecateGennadiy Civil2018-08-031-1/+1
| |\
| | * Updated broken and outdated URLsPiotr Kąkol2018-07-251-1/+1
| | |
| * | Disable MSVC function deprecation when using ClangLoo Rong Jie2018-07-131-2/+2
| |/
| * Style fixFabrice de Gans-Riberi2018-05-031-1/+1
| |
| * Fix commentsFabrice de Gans-Riberi2018-05-031-1/+1
| |
| * Fix more stuff and get tests to passFabrice de Gans-Riberi2018-05-031-1/+15
| |
| * Add Fuchsia support for death test.Fabrice de Gans-Riberi2018-05-011-0/+10
| |
| * merges, gtestGennadiy Civil2018-03-261-2/+2
| |
| * more mergesGennadiy Civil2018-03-221-1/+1
| |
| * More mergesGennadiy Civil2018-03-211-26/+26
| |
| * merges-8refs/pull/1493/headGennadiy Civil2018-03-051-10/+24
| |
| * cleanup/mergesGennadiy Civil2018-02-131-2/+6
| |
| * Merge branch 'master' into missing-declarationsrefs/pull/1007/headGennadiy Civil2018-01-051-8/+0
| |\
| | * upstreaming cl 124976692Gennadiy Civil2018-01-031-8/+0
| | |
| * | Pass the -Wmissing-declarations warning.David Benjamin2018-01-031-3/+5
| |/ | | | | | | | | | | This makes it easier to use GTest in projects that build with the -Wmissing-declarations warning. This fixes the warning in headers and source files, though not GTest's own tests as it is rather noisy there.
* | Merge branch 'master' of https://github.com/google/googletestScott Slack-Smith2017-11-241-1/+1
|\ \ | |/
| * Merge pull request #764 from flyd1005/wip-fix-typoGennadiy Civil2017-08-021-1/+1
| |\ | | | | | | remove duplicated words
| | * remove duplicated wordsrefs/pull/764/headLi Peng2016-04-271-1/+1
| | | | | | | | | | | | Signed-off-by: Li Peng <lip@dtdream.com>
* | | *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.
* | Use std::string and ::string explicitly in gtest and gmock code.refs/pull/1089/headNico Weber2017-05-151-2/+2
| | | | | | | | | | | | | | | | | | This merges a Google-internal change (117235625). Original CL description: This CL was created manually in about an hour with sed, a Python script to find all the places unqualified 'string' was mentioned, and some help from Emacs to add the "std::" qualifications, plus a few manual tweaks.
* | Changes to make TempDir() publicrefs/pull/1077/headGennadiy Civil2017-05-021-18/+0
|/ | | | Fixes #1076.
* Restructure $XML_OUTPUT_FILE logicDoug Greiman2016-02-261-18/+19
|
* Read Bazel's $XML_OUTPUT_FILE environment variableDoug Greiman2016-02-241-0/+19
| | | | | | If $XML_OUTPUT_FILE is set, and $GTEST_OUTPUT and --gtest_output are not specified, produce output as if GTEST_OUTPUT=xml:$XML_OUTPUT_FILE had been set.
* Add include of sys/types.h.refs/pull/602/headMatthew Brandyberry2015-10-021-0/+1
|
* Implement GetThreadCount for AIX.Matthew Brandyberry2015-10-021-0/+17
|
* Move everything in googletest into googletest/googletestBilly Donahue2015-08-251-0/+1221