summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-internal.h
Commit message (Collapse)AuthorAgeFilesLines
* Googletest exportAbseil Team2020-01-091-1/+1
| | | | | | | | Removing GTEST_API from TrueWithString. This type is only used in test code on one side of a DLL boundary so it is not necessary. PiperOrigin-RevId: 288927929
* Googletest exportAbseil Team2020-01-091-1/+1
| | | | | | | Close #2658 Mark test case destrucors as override. PiperOrigin-RevId: 288507991
* Merge pull request #2639 from trzecieu:trzeci/move_ctor_assignAndy Soffer2020-01-021-2/+5
|\ | | | | | | PiperOrigin-RevId: 286896167
| * Define default destructor for test classesPiotr Paczkowski (trzeci.eu)2019-12-201-0/+1
| |
| * Deleted functions as part of public interfacePiotr Paczkowski (trzeci.eu)2019-12-201-4/+4
| |
| * Disable move constructor and assignment operator for test classes.trzeci2019-12-171-0/+2
| | | | | | | | | | | | | | | | | | Disable move operations for TEST() and TEST_F() macros. Previous implementation disabled only copy ctor and assing operator, but this was violating rule of 5[1], which was captured by static code analysis tools like clang-tidy `cppcoreguidelines-special-member-functions`. [1]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all
* | Googletest exportAbseil Team2020-01-021-2/+9
| | | | | | | | | | | | | | | | 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
* | Merge pull request #2624 from ShabbyX:masterAndy Soffer2020-01-021-1/+10
|\ \ | |/ |/| | | PiperOrigin-RevId: 286397298
| * Workaround VS bug w.r.t empty arguments to macrosShahbaz Youssefi2019-12-161-1/+10
|/ | | | | | | | | | | | | | | | Empty arguments can be passed to macros per C99 and C++11 specs, which can then be forwarded to other macros. Visual Studio's compiler has a bug in the following situation: #define A(x) #x #define B(x, y) A(x) B(, b) In the above case, Visual Studio first expands x to nothing, then complains that A is not invoked with the right amount of arguments. However, x in A(x) is still one argument, even if it expands to no preprocessing tokens. See also https://stackoverflow.com/a/7674214.
* Googletest exportAbseil Team2019-11-221-5/+6
| | | | | | | | | | | | | 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 #2569 from bgianfo:masterGennadiy Civil2019-11-201-2/+3
|\ | | | | | | PiperOrigin-RevId: 281321427
| * Fix FlatTuple compilation on older msvc.refs/pull/2569/headBrian Gianforcaro2019-11-161-2/+4
|/ | | | | | | | | | | | googletest 1.10.0 fails to compile on msvc version 19.00.23917 with one compilation error: src\googletest\include\gtest\internal\gtest-internal.h(1188) : error C2039: 'FlatTupleBase<testing::internal::FlatTuple<bool,bool>,testing::internal::IndexSequence<0,1> >': is not a member of 'testing::internal::FlatTuple<bool,bool>' This PR fixes the compilation error by explicitly specifying the full type that Indices is located in the base type.
* Merge pull request #2373 from Youw:masterXiaoyi Zhang2019-11-051-3/+33
|\ | | | | | | PiperOrigin-RevId: 278601074
| * Added special catch for std::exception in GTEST_TEST_NO_THROW_refs/pull/2373/headIhor Dutchak2019-10-301-3/+31
| |
* | replace autogenerated TemplatesX classes by variadic onesKrystian Kuzniarek2019-10-251-1/+1
| |
* | replace autogenerated TypesX classes by variadic onesKrystian Kuzniarek2019-10-251-2/+2
| |
* | Googletest exportAbseil Team2019-10-221-2/+1
| | | | | | | | | | | | | | | | Remove bool_constant in favor of std::integral_constant<bool, ...>; The one non-trivial use of bool_constant has been changed to have significantly fewer template specializations. PiperOrigin-RevId: 275842490
* | Googletest exportAbseil Team2019-10-111-21/+23
| | | | | | | | | | | | | | Fix the O(n^2) number of instantiations in ElemFromList. It is now O(n). It still has O(1) instantiation depth. PiperOrigin-RevId: 273980821
* | Merge pull request #2475 from peterbarker:pr/google-add-overrideGennadiy Civil2019-10-081-1/+1
|\ \ | | | | | | | | | PiperOrigin-RevId: 273379796
| * | Add many missing override keywordsrefs/pull/2475/headPeter Barker2019-09-251-1/+1
| | | | | | | | | | | | This helps corrects builds with -Werror=suggest-overrides
* | | Googletest exportAbseil Team2019-10-031-0/+4
|/ / | | | | | | | | | | | | | | | | Add a compile time check to ensure that the parameters to TEST and TEST_F are not empty Some compilers may already fail in that case and even where it works, it's likely to result in technically invalid code by virtue of creating reserved identifiers: https://en.cppreference.com/w/cpp/language/identifiers PiperOrigin-RevId: 272543242
* | Googletest exportkuzkry2019-09-161-4/+3
| | | | | | | | | | | | | | | | | | Merge 3bdefdb473d304803d2a38e2a2cd5cdc1827c3bd into fb49e6c164490a227bbb7cf5223b846c836a0305 Closes #2407 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2407 from kuzkry:StaticAssertTypeEq 3bdefdb473d304803d2a38e2a2cd5cdc1827c3bd PiperOrigin-RevId: 269255328
* | Merge pull request #2387 from kuzkry:iffShaindel Schwartz2019-09-121-5/+5
|\ \ | | | | | | | | | PiperOrigin-RevId: 268693457
| * | restore mistakenly removed iffs in their explicit formrefs/pull/2387/headKrystian Kuzniarek2019-08-201-6/+6
| | | | | | | | | | | | | | | Due to confusion arisen from "iff" standing for "if and only if", this commit uses the latter.
* | | Googletest exportHosein Ghahremanzadeh2019-09-121-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Merge 4c9ef099b29d2c840c04643cd9662fd7be712f7b into 565f1b848215b77c3732bca345fe76a0431d8b34 Closes #2403 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2403 from IYP-Programer-Yeah:remove-compile-assert-type-equal 4c9ef099b29d2c840c04643cd9662fd7be712f7b PiperOrigin-RevId: 268681883
* | | 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
* | | Googletest exportkuzkry2019-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #2400 from kuzkry:custom-type-traits-enable_ifXiaoyi Zhang2019-08-231-7/+0
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 264693952
| * | | remove a custom implementation of std::enable_ifKrystian Kuzniarek2019-08-131-7/+0
| | |/ | |/|
* | | 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
| |/
* | remove custom implementations of std::is_samerefs/pull/2399/headKrystian Kuzniarek2019-08-141-3/+3
|/
* fix typosrefs/pull/2356/headKrystian Kuzniarek2019-07-301-5/+5
|
* Googletest exportmisterg2019-04-181-8/+14
| | | | | | Expose more information in SuiteApiResolver diagnostic output PiperOrigin-RevId: 244179347
* clang: fix `-Wsign-conversion` errorsEnji Cooper2019-04-061-1/+1
| | | | | | | | | | | 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-03-211-4/+1
| | | | | | Remove mention of unused type ProtocolMessage. PiperOrigin-RevId: 239242706
* Googletest exportAbseil Team2019-03-051-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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-011-1/+1
| | | | | | | | | | | | | | 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 exportmisterg2019-02-041-15/+27
| | | | | | Mark legacy _TEST_CASE_ macros as deprecated PiperOrigin-RevId: 232303251
* Googletest exportmisterg2019-01-081-50/+2
| | | | | | | 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-47/+101
| | | | | | TestCase->TestSuite refactoring PiperOrigin-RevId: 227702164
* Googletest exportAbseil Team2019-01-021-18/+21
| | | | | | | | 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-031-1/+1
| | | | | | Applied fixes for ClangTidy modernize-use-override and modernize-use-using. PiperOrigin-RevId: 223800219
* Remove workarounds for unsupported MSVC versionsRobin Lindén2018-11-101-10/+0
|
* Googletest exportmisterg2018-11-011-0/+15
| | | | | | Adding GTEST_INTERNAL_DEPRECATED ability to mark deprecated PiperOrigin-RevId: 219515184
* Merge pull request #1941 from barkovv:masterGennadiy Civil2018-10-291-22/+22
|\ | | | | | | PiperOrigin-RevId: 219134349
| * Replaced all NULLs with nullptr in googletestVadim Barkov2018-10-281-1/+1
|/
* Googletest exportAbseil Team2018-10-221-0/+106
| | | | | | Change ValuesArray to require much less template instantiation depth. PiperOrigin-RevId: 218170842