summaryrefslogtreecommitdiffstats
path: root/googletest/include
Commit message (Collapse)AuthorAgeFilesLines
* Googletest exportkuzkry2019-09-061-16/+2
| | | | | | | | | Merge 7f4f58da20e1066a888d3e4bcbef541db798a605 into 90a443f9c2437ca8a682a1ac625eba64e1d74a8a Closes #2395 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2395 from kuzkry:custom-type-traits-remove_reference 7f4f58da20e1066a888d3e4bcbef541db798a605 PiperOrigin-RevId: 266189044
* Merge pull request #2398 from kuzkry:custom-type-traits-iterator_traitsGennadiy Civil2019-08-292-24/+3
|\ | | | | | | PiperOrigin-RevId: 266136896
| * remove a custom implementation of std::iterator_traitsKrystian Kuzniarek2019-08-132-24/+3
| |
* | Googletest exportkuzkry2019-08-232-10/+3
| | | | | | | | | | | | | | | | | | Merge b8ca465e73ac0954a0c9eec2a84bdd8913d5763b into 90a443f9c2437ca8a682a1ac625eba64e1d74a8a Closes #2396 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2396 from kuzkry:custom-type-traits-true/false_type-and-bool_constant b8ca465e73ac0954a0c9eec2a84bdd8913d5763b PiperOrigin-RevId: 265064856
* | Merge pull request #2401 from kuzkry:custom-type-traits-add_lvalue_referenceXiaoyi Zhang2019-08-231-13/+0
|\ \ | | | | | | | | | PiperOrigin-RevId: 264842713
| * | remove a custom implementation of std::add_lvalue_referencerefs/pull/2401/headKrystian Kuzniarek2019-08-131-13/+0
| |/
* | Merge pull request #2400 from kuzkry:custom-type-traits-enable_ifXiaoyi Zhang2019-08-233-10/+3
|\ \ | | | | | | | | | PiperOrigin-RevId: 264693952
| * | remove a custom implementation of std::enable_ifKrystian Kuzniarek2019-08-133-13/+8
| |/
* | Merge pull request #2393 from kuzkry:custom-type-traits-remove_constXiaoyi Zhang2019-08-211-22/+1
|\ \ | | | | | | | | | PiperOrigin-RevId: 264652890
| * | remove a custom implementation of std::remove_constrefs/pull/2393/headKrystian Kuzniarek2019-08-131-22/+1
| |/
* | Merge pull request #2399 from kuzkry:custom-type-traits-is_sameGennadiy Civil2019-08-153-24/+10
|\ \ | | | | | | | | | PiperOrigin-RevId: 263568712
| * | remove custom implementations of std::is_samerefs/pull/2399/headKrystian Kuzniarek2019-08-143-24/+10
| |/
* | Merge pull request #2382 from kuzkry:dead-metafunctionGennadiy Civil2019-08-152-24/+0
|\ \ | | | | | | | | | PiperOrigin-RevId: 263416977
| * | remove a dead metafunctionKrystian Kuzniarek2019-08-072-24/+0
| |/
* | remove an outdated commentrefs/pull/2386/headKrystian Kuzniarek2019-08-111-6/+0
|/
* Merge pull request #2111 from knuto:pr/remove_slashGennadiy Civil2019-08-061-1/+4
|\ | | | | | | PiperOrigin-RevId: 261906004
| * Remove / from parameterized test names if base test name is emptyrefs/pull/2111/headKnut Omang2019-04-261-1/+4
| | | | | | | | | | | | | | This is useful to let a subsystem generate test names based on parameterized tests without exposing them as such to the user. Signed-off-by: Knut Omang <knut.omang@oracle.com>
* | Googletest exportmisterg2019-08-051-1/+1
| | | | | | | | | | | | Internal Change PiperOrigin-RevId: 261683482
* | Merge pull request #2358 from kuzkry:adjustment-of-similar-commentsGennadiy Civil2019-08-021-3/+3
|\ \ | | | | | | | | | PiperOrigin-RevId: 261355792
| * | adjust a comment to the similar section in advanced.mdrefs/pull/2358/headKrystian Kuzniarek2019-07-311-3/+3
| | | | | | | | | | | | in addition, fix typo of use -> us
* | | Googletest exportAbseil Team2019-08-011-0/+4
| | | | | | | | | | | | | | | | | | Document the fact that {Setup,TearDown}TestSuite failures are currently being dropped. PiperOrigin-RevId: 260962695
* | | fix typosrefs/pull/2356/headKrystian Kuzniarek2019-07-3010-62/+62
| | |
* | | Googletest exportAbseil Team2019-07-261-0/+15
|/ / | | | | | | | | | | | | | | 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 exportmisterg2019-06-051-1/+1
| | | | | | | | | | | | comment change PiperOrigin-RevId: 251231524
* | Merge pull request #2254 from chaoran:masterGennadiy Civil2019-05-171-3/+4
|\ \ | |/ |/| | | PiperOrigin-RevId: 248759825
| * Use std::addressof to instead of plain '&'.Chaoran Yang2019-05-121-2/+2
|/ | | | | Otherwise the code won't compile if the '&' operater is overloaded and return something that cannot be casted to void *.
* Googletest exportAbseil Team2019-04-241-0/+5
| | | | | | | | Add GTEST_FAIL_AT, an equivalent to ADD_FAILURE_AT but that spawns a fatal failure rather than a non-fatal, eg. the equivalent of an ASSERT* failure rather than an EXPECT* failure. PiperOrigin-RevId: 244746609
* Googletest exportmisterg2019-04-183-12/+18
| | | | | | Expose more information in SuiteApiResolver diagnostic output PiperOrigin-RevId: 244179347
* Merge pull request #2170 from ngie-eign:issue-2146-ver2Gennadiy Civil2019-04-182-1/+4
|\ | | | | | | PiperOrigin-RevId: 244069956
| * clang: fix `-Wsign-conversion` errorsEnji Cooper2019-04-062-1/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Sort Haiku platform definition alphabetically.refs/pull/2230/headCalvin Hill2019-04-121-2/+2
| | | | | | | | | | Fixes a minor ordering issue when defining the platform macro. Also fixes a minor typo: 'Max OS X' -> 'Mac OS X'.
* | Merge pull request #2226 from davidben:msvc-5046Gennadiy Civil2019-04-111-2/+9
|\ \ | | | | | | | | | PiperOrigin-RevId: 243121568
| * | MSVC C5046 warning is unavailable in MSVC 2015.refs/pull/2226/headDavid Benjamin2019-04-091-2/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the MSVC documentation the warning is new as of Visual Studio 2017, version 15.8. https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5046?view=vs-2019 GTest users building on MSVC 2015 or older versions of 2017 will, when C4616 is enabled, see a warning like: [...]gtest-matchers.h(53): error C2220: warning treated as error - no 'object' file generated [...]gtest-matchers.h(53): warning C4619: #pragma warning: there is no warning number '5046' Guard the mention of 5046 by an _MSC_VER check. VS2017 15.8 corresponds to an _MSC_VER of 1915. https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019
* | Merge pull request #2229 from return:haiku-supportGennadiy Civil2019-04-112-12/+16
|\ \ | |/ |/| | | PiperOrigin-RevId: 243104604
| * Add Haiku platform support.refs/pull/2229/headCalvin Hill2019-04-112-3/+7
|/ | | | | This allows googletest to recognize the Haiku operating system when running tests in other projects.
* Googletest exportAbseil Team2019-04-032-4/+4
| | | | | Typos: "more then" -> "more than". PiperOrigin-RevId: 241483698
* Googletest exportAbseil Team2019-04-011-0/+12
| | | | | | | | | | | | | | | 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-016-183/+4
| | | | | | | | 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-211-4/+1
| | | | | | Remove mention of unused type ProtocolMessage. PiperOrigin-RevId: 239242706
* Googletest exportAbseil Team2019-03-052-80/+14
| | | | | | | | | | | | | | | | | | | | | | | | Fix emission of -Wzero-as-null-pointer-constant when comparing integers. The following code fails to compile: #pragma clang diagnostic error "-Wzero-as-null-pointer-constant" void foo() { EXPECT_EQ(0, 0); } This happens because gtest checks the first argument to EXPECT_EQ and ASSERT_EQ is a null pointer constant. The magic it does to do this causes the warning to be emitted. This patch removes that check. It replaces the explicit check with a Compare overload that can only be selected when 0 or nullptr is passed on the LHS with a pointer on the right. This patch does not suppress -Wzero-as-null-pointer-constant when users are actually using it as NULL. PiperOrigin-RevId: 236654634
* Googletest exportAbseil Team2019-03-012-1/+10
| | | | | | | | | | | | | | Let embedders customize GTEST_INTERNAL_DEPRECATED(). GTEST_INTERNAL_DEPRECATED is currently used to nudge googletest users to migrate off old TEST_CASE macros to the new TEST_SUITE macros. This move is non-trivial for Chromium (see https://crbug.com/925652), and might be difficult for other big projects with many dependencies. This CL facilitates moving off of deprecated APIs by making it possible for an embedder to define GTEST_INTERNAL_DEPRECATED() in gtest/internal/custom/gtest-port.h. Example usage: 1) #define GTEST_INTERNAL_DEPRECATED() to nothing, to disable deprecation warnings while migrating off googletest's deprecated APIs. This can be preferable to having to disable all deprecation warnings (-Wno-error=deprecated or -Wno-deprecated-declarations). 2) #define GTEST_INTERNAL_DEPRECATED() for an unsupported compiler. PiperOrigin-RevId: 236171043
* Googletest exportAbseil Team2019-02-255-2880/+134
| | | | | | Replace more pump'd code with variadic templates. PiperOrigin-RevId: 235584585
* Import `patch-bsd-defines` from FreeBSD ports [1]Enji Cooper2019-02-132-3/+12
| | | | | | | | | | 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 exportAbseil Team2019-02-121-1/+2
| | | | | | Internal changes. PiperOrigin-RevId: 232953166
* Googletest exportAbseil Team2019-02-121-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix matcher comparisons for std::reference_wrapper. The googletest docs indicate that std::reference_wrapper should be used to for objects that should not be copied by the matcher (in fact, the ByRef() function is basically the same as a call to std::cref). However, for many types (such as std::string), the overloaded operator== will not resolve correctly. Specifically, this is problematic if operator== depends on template argument deduction, where the same type is named on LHS and RHS. Because template argument deduction happens before any implict conversions for purposes of overload resolution, attempting to compare T with std::reference_wrapper<T> simply looks like a comparison of unlike types. For exapmle, std::reference_wrapper<std::string> is implicitly convertible to 'const std::string&', which would be able to choose an overload specialization of operator==. However, the implicit conversion can only happen after template argument deduction for operator==, so a specialization that would other be an applicable overload is never considered. Note also that this change only affects matchers. There are good reasons that matchers may need to transparently hold a std::reference_wrapper. Other comparisons (like EXPECT_EQ, et. al.) don't need to capture a reference: they don't need to defer evaluation (as in googlemock), and they don't need to avoid copies (as the call chain of matchers does). PiperOrigin-RevId: 232499175
* Googletest exportmisterg2019-02-042-27/+30
| | | | | | | | Address -Wgnu-zero-variadic-macro-arguments Originally in OSS PR #2063 https://github.com/google/googletest/pull/2063 Fix regression in INSTANTIATE_TEST_SUITE_P macro to accept function pointers properly. PiperOrigin-RevId: 232316698
* Googletest exportmisterg2019-02-044-20/+61
| | | | | | Mark legacy _TEST_CASE_ macros as deprecated PiperOrigin-RevId: 232303251
* Googletest exportAbseil Team2019-02-041-4/+4
| | | | | | | Update example code in gtest.h to prefer override over virtual now that it is widely available in C++11. PiperOrigin-RevId: 232057792
* Merge pull request #2063 from mathbunnyru:masterAshley Hedberg2019-01-302-16/+29
|\ | | | | | | PiperOrigin-RevId: 231456275
* \ Merge pull request #2063 from mathbunnyru:masterGennadiy Civil2019-01-292-29/+16
|\ \ | |/ | | | | PiperOrigin-RevId: 231434457