aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/test/gtest_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Googletest exportAbseil Team2020-04-041-2/+2
| | | | | | | | This change updates testing::internal::IsAProtocolMessage to return true not just for full proto messages but also for lite ones (i.e. those inheriting directly from MessageLite). PiperOrigin-RevId: 304286535
* Googletest exportAbseil Team2020-03-241-29/+56
| | | | | | | | | | Add --gtest_fail_fast support to googletest. - Analogous functionality to to golang -test.failfast and python --failfast - Stops test execution upon first test failure. - Also add support Bazel equivalent env var (TESTBRIDGE_TEST_RUNNER_FAIL_FAST) PiperOrigin-RevId: 302488880
* Merge pull request #2624 from ShabbyX:masterAndy Soffer2020-01-021-1/+1
|\ | | | | | | PiperOrigin-RevId: 286397298
| * Revert "Googletest export": disallow empty prefixShahbaz Youssefi2019-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 20b5b8ecc7a81d23b4716e22a2b35fd53379c8c6. Reason for revert: Breaks existing applications, such as ANGLE (angleproject.org), requires adding an extra prefix that needs to be typed for no reason (when testing from command line) and increases the logs' sizes by a non-trivial amount due to the very large number of tests ANGLE runs. Original commit message: Add a compile time check to ensure that the parameters to TEST_P and INSTANTIATE_TEST_SUITE_P are not empty. Some compilers 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 First, every project is perfectly capable of adding a prefix if they want to support such a compiler. This change penalizes every project. Second, using a prefix such as `_p` also results in reserved identifiers, so this change is not really solving the problem. For that matter, instead of generating `gtest_##prefix##...`, you can generate `gtest_x##prefix##...` to correctly fix the issue, including when empty prefixes are used.
* | Merge pull request #2590 from kuzkry:remove-workaround_g++-stale-commentsCJ Johnson2019-12-161-12/+0
|\ \ | |/ |/| | | PiperOrigin-RevId: 285812343
| * remove stale comments about older GCC versionsKrystian Kuzniarek2019-11-221-12/+0
| |
* | Merge pull request #2589 from ↵Matt Calabrese2019-12-131-9/+3
|\ \ | | | | | | | | | | | | | | | kuzkry:remove-workaround_g++-no-space-after-first-macro-argument PiperOrigin-RevId: 285255373
| * | remove g++ 2.95.0 workaround: no space after first comma in macrosKrystian Kuzniarek2019-11-221-9/+3
| |/
* | Googletest exportAbseil Team2019-12-061-16/+1
| | | | | | | | | | | | | | | | | | | | Change googletest to notice failures during SetUpTestSuite() and TearDownTestSuite(). Previously, errors that occurred during those functions were logged but otherwise ignored. After this change, such failures will cause the test to fail and a brief summary will be printed at the bottom of the test log. See https://github.com/google/googletest/issues/2330. PiperOrigin-RevId: 284033342
* | Googletest exportAbseil Team2019-11-221-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 #2373 from Youw:masterXiaoyi Zhang2019-11-051-0/+13
|\ \ | |/ |/| | | PiperOrigin-RevId: 278601074
| * Added special catch for std::exception in GTEST_TEST_NO_THROW_Ihor Dutchak2019-10-301-0/+13
| |
* | Merge pull request #2453 from kuzkry:gtest-port-clean-up_kMaxBiggestIntXiaoyi Zhang2019-11-041-3/+3
|\ \ | | | | | | | | | PiperOrigin-RevId: 278008286
* | | Merge pull request #2453 from kuzkry:gtest-port-clean-up_kMaxBiggestIntvslashg2019-11-011-3/+3
|\| | | | | | | | | | | PiperOrigin-RevId: 277979766
| * | remove BiggestIntKrystian Kuzniarek2019-10-241-3/+3
| | |
* | | Add more override keywordsRobert Luberda2019-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark more functions with "override" keyword, just like it was done in commit 2460f97152c. This should prevent compiler from complaining while compiling both user code, and the googletest code itself with the -Wsuggest-override option turned on; with the exception of: * calls to new MOCK_METHOD() in test/gmock-function-mocker_test.cc * calls to old MOCK_METHODx()/MOCK_CONST_METHODx() in other unit test files. Closes #2493
* | | Googletest exportAbseil Team2019-10-111-11/+6
| | | | | | | | | | | | | | | | | | | | | 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
* | | Googletest exportAbseil Team2019-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | Add a compile time check to ensure that the parameters to TEST_P and INSTANTIATE_TEST_SUITE_P are not empty. Some compilers 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: 273832263
* | | Merge pull request #2387 from kuzkry:iffShaindel Schwartz2019-09-121-5/+5
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 268693457
| * | | restore mistakenly removed iffs in their explicit formKrystian Kuzniarek2019-08-201-5/+5
| | |/ | |/| | | | | | | | | | Due to confusion arisen from "iff" standing for "if and only if", this commit uses the latter.
* | | Googletest exportHosein Ghahremanzadeh2019-09-121-10/+4
| |/ |/| | | | | | | | | | | | | | | 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-25/+0
| | | | | | | | | | | | | | | | | | 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 #2401 from kuzkry:custom-type-traits-add_lvalue_referenceXiaoyi Zhang2019-08-231-25/+0
|\ \ | | | | | | | | | PiperOrigin-RevId: 264842713
| * | remove a custom implementation of std::add_lvalue_referenceKrystian Kuzniarek2019-08-131-25/+0
| |/
* / remove a custom implementation of std::remove_constKrystian Kuzniarek2019-08-141-29/+2
|/
* Googletest exportmisterg2019-08-011-4/+7
| | | | | | Internal Change PiperOrigin-RevId: 260939845
* fix typosKrystian Kuzniarek2019-07-301-4/+4
|
* Googletest exportAbseil Team2019-04-241-0/+13
| | | | | | | | 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
* Merge pull request #2170 from ngie-eign:issue-2146-ver2Gennadiy Civil2019-04-181-18/+21
|\ | | | | | | PiperOrigin-RevId: 244069956
| * clang: fix `-Wsign-conversion` errorsEnji Cooper2019-04-051-18/+18
|/ | | | | | | | | | | 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-79/+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
* Googletest exportAbseil Team2019-03-211-3/+2
| | | | | | Remove mention of unused type ProtocolMessage. PiperOrigin-RevId: 239242706
* Googletest exportAbseil Team2019-03-051-18/+52
| | | | | | | | | | | | | | | | | | | | | | | | 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 exportmisterg2019-01-111-66/+69
| | | | | | Change tests to use new Test Suite API PiperOrigin-RevId: 228908894
* Googletest exportmisterg2019-01-081-30/+0
| | | | | | | Replace testing::internal::ImplicitlyConvertible with std::is_convertible Fixes #2054 PiperOrigin-RevId: 228334305
* Googletest exportAbseil Team2019-01-071-3/+23
| | | | | | Fix GTEST_IS_NULL_LITERAL_ for types that have magic implicit conversions. PiperOrigin-RevId: 227879345
* Googletest exportmisterg2019-01-031-0/+10
| | | | | | Fixes #1261 PiperOrigin-RevId: 227740670
* Googletest exportmisterg2019-01-031-0/+61
| | | | | | TestCase->TestSuite refactoring PiperOrigin-RevId: 227702164
* Googletest exportmisterg2019-01-021-1/+0
| | | | | | Internal Change PiperOrigin-RevId: 227575279
* Googletest exportAbseil Team2019-01-021-44/+3
| | | | | | | | Remove the #ifs for old, unsupported and buggy compilers: * old versions of GCC & MSVC * Symbian PiperOrigin-RevId: 227116941
* Googletest exportAbseil Team2018-12-201-0/+27
| | | | | | Add public entry point testing::RegisterTest. PiperOrigin-RevId: 226350937
* Googletest exportAbseil Team2018-12-031-26/+22
| | | | | | Applied fixes for ClangTidy modernize-use-override and modernize-use-using. PiperOrigin-RevId: 223800219
* Remove GTEST_HAS_HASH_SET/MAP checkRobin Lindén2018-11-101-3/+0
|
* Merge pull request #1941 from barkovv:masterGennadiy Civil2018-10-291-27/+6
|\ | | | | | | PiperOrigin-RevId: 219134349
| * Replaced all NULLs with nullptr in googletestVadim Barkov2018-10-281-6/+6
|/
* Googletest exportAbseil Team2018-10-221-0/+78
| | | | | | Change ValuesArray to require much less template instantiation depth. PiperOrigin-RevId: 218170842
* Apply clang-tidy modernize-use-nullptr to googletest.Abseil Team2018-10-051-490/+203
| | | | | | | | | | | 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
* Googletest exportAbseil Team2018-09-251-40/+4
| | | | | | Project import generated by Copybara. PiperOrigin-RevId: 214456152
* Googletest exportmisterg2018-09-251-4/+40
| | | | | | Project import generated by Copybara. PiperOrigin-RevId: 214441835
* Googletest exportAbseil Team2018-09-251-40/+4
| | | | | | | Project import generated by Copybara. Including recently accepted and merged PRs PiperOrigin-RevId: 213856848