summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * Fix INSTANTIATE_TEST_CASE_P with zero variadic argumentsAyaz Salikhov2019-01-182-7/+32
| |
* | Merge pull request #2041 from ciband:chore/fix_library_jsonGennadiy Civil2019-01-231-0/+4
|\ \ | |/ |/| | | PiperOrigin-RevId: 230554814
| * misc: Reapply Arduino functionsChris2019-01-041-0/+14
| |
| * misc: Revert formatting changes.Chris2019-01-041-157/+176
| |
| * Merge branch 'master' into chore/fix_library_jsonChris Johnson2019-01-0415-812/+832
| |\
| * | fix: Remove Arduino entry pointsChris2019-01-031-194/+169
| | | | | | | | | | | | | | | | | | 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.
* | | Googletest exportAbseil Team2019-01-141-7/+6
| | | | | | | | | | | | | | | | | | Add move-only argument support to almost all remaining matchers. PiperOrigin-RevId: 229030728
* | | Googletest exportAbseil Team2019-01-141-2/+1
| | | | | | | | | | | | | | | | | | | | | Deduplicate testing::ReferenceWrapper with std::reference_wrapper. Minor cleanups in matchers_test. PiperOrigin-RevId: 229022872
* | | Googletest exportAbseil Team2019-01-101-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warning about deprecation of implicit operations such as copy constructors or assignment operators. Specifically: MatcherBase's default copy constructor, assignment operator, move operator, and move assignment operator are now declared explicitly rather than depending on the compiler implicit generation (which is disallowed/warned against due to MatcherBase's declaration of the destructor). PiperOrigin-RevId: 228573333
* | | Merge pull request #2051 from enptfb55:mastergennadiycivil2019-01-081-6/+6
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 228337465
| * | | fixing build errors for unused parameterrefs/pull/2051/headrefs/pull/2050/headSal Amato2019-01-061-6/+6
| | |/ | |/|
* | | Googletest exportmisterg2019-01-083-53/+5
| | | | | | | | | | | | | | | | | | | | | Replace testing::internal::ImplicitlyConvertible with std::is_convertible Fixes #2054 PiperOrigin-RevId: 228334305
* | | Googletest exportAbseil Team2019-01-071-5/+22
|/ / | | | | | | | | | | Fix GTEST_IS_NULL_LITERAL_ for types that have magic implicit conversions. PiperOrigin-RevId: 227879345
* | Googletest exportmisterg2019-01-031-37/+37
| | | | | | | | | | | | Fixes #1261 PiperOrigin-RevId: 227740670
* | Googletest exportmisterg2019-01-0310-518/+663
| | | | | | | | | | | | TestCase->TestSuite refactoring PiperOrigin-RevId: 227702164
* | Googletest exportmisterg2019-01-025-20/+0
| | | | | | | | | | | | Internal Change PiperOrigin-RevId: 227575279
* | Googletest exportAbseil Team2019-01-028-105/+33
| | | | | | | | | | | | | | | | Remove the #ifs for old, unsupported and buggy compilers: * old versions of GCC & MSVC * Symbian PiperOrigin-RevId: 227116941
* | Merge #2002Ryohei Machida2018-12-271-22/+9
| | | | | | | | PiperOrigin-RevId: 227030722
* | Googletest exportAbseil Team2018-12-201-0/+86
| | | | | | | | | | | | Add public entry point testing::RegisterTest. PiperOrigin-RevId: 226350937
* | Googletest exportAbseil Team2018-12-201-113/+8
| | | | | | | | | | | | Unifdef c++11-related macros from googletest now that it requires C++11. PiperOrigin-RevId: 225905601
* | Googletest exportAbseil Team2018-12-171-18/+11
|/ | | | | | Remove GTEST_REFERENCE_TO_CONST_ usage from GMock. In C++11, it's redundant. PiperOrigin-RevId: 225719210
* Googletest exportmisterg2018-12-131-1/+1
| | | | | | Internal Change PiperOrigin-RevId: 225231727