summaryrefslogtreecommitdiffstats
path: root/googletest/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2203 from ngie-eign:issue-2189Gennadiy Civil2019-04-033-0/+120
|\ | | | | | | PiperOrigin-RevId: 241803437
| * Handle GTEST_SKIP() when calling `Environment::SetUp()`refs/pull/2203/headEnji Cooper2019-03-302-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gtest prior to this change would completely ignore `GTEST_SKIP()` if called in `Environment::SetUp()`, instead of bailing out early, unlike `Test::SetUp()`, which would cause the tests themselves to be skipped. The only way (prior to this change) to skip the tests would be to trigger a fatal error via `GTEST_FAIL()`. Desirable behavior, in this case, when dealing with `Environment::SetUp()` is to check for prerequisites on a system (example, kernel supports a particular featureset, e.g., capsicum), and skip the tests. The alternatives prior to this change would be undesirable: - Failing sends the wrong message to the test user, as the result of the tests is indeterminate, not failed. - Having to add per-test class abstractions that override `SetUp()` to test for the capsicum feature set, then skip all of the tests in their respective SetUp fixtures, would be a lot of human and computational work; checking for the feature would need to be done for all of the tests, instead of once for all of the tests. For those reasons, making `Environment::SetUp()` handle `GTEST_SKIP()`, by not executing the testcases, is the most desirable solution. In order to properly diagnose what happened when running the tests if they are skipped, print out the diagnostics in an ad hoc manner. Update the documentation to note this change and integrate a new test, gtest_skip_in_environment_setup_test, into the test suite. This change addresses #2189. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* | Googletest exportAbseil Team2019-04-014-168/+2
|/ | | | | | | | 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-284-324/+478
| | | | | | Update XML and JSON output to be consistent with the standard. PiperOrigin-RevId: 239833242
* 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
* Don't hardcode the filename in ↵refs/pull/2147/headEnji Cooper2019-02-211-1/+1
| | | | | | | | | | | | | | | | | `CxxExceptionDeathTest.PrintsMessageForStdException` Due to some caveats in the FreeBSD build system and the fact that the source file is used to compile 2 different death tests with different flags, I needed (as a shortterm workaround) to copy the test to 2 differently named files. While this works for compiling the test, as I discovered, this doesn't work with running `CxxExceptionDeathTest.PrintsMessageForStdException`, as the testcase hardcodes `googletest-death-test_ex_test.cc`. Use `__FILE__` when looking for failures, as opposed to looking for the hardcoded name as it can vary depending on how the test was built. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Merge pull request #2121 from ngie-eign:add-dragonflybsd-and-kfreebsd-supportGennadiy Civil2019-02-131-1/+3
|\ | | | | | | PiperOrigin-RevId: 233789488
| * Import `patch-bsd-defines` from FreeBSD ports [1]Enji Cooper2019-02-131-1/+3
| | | | | | | | | | | | | | | | | | | | 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>
* | Fix -Wunused-private-field issues with clangrefs/pull/2119/headEnji Cooper2019-02-131-0/+2
|/ | | | | | | Provide dummy accessors for private values that are set in initializers, but not actually used. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Googletest exportmisterg2019-02-041-0/+5
| | | | | | | | 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 exportAbseil Team2019-01-141-6/+10
| | | | | | | Deduplicate testing::ReferenceWrapper with std::reference_wrapper. Minor cleanups in matchers_test. PiperOrigin-RevId: 229022872
* Googletest exportmisterg2019-01-1124-494/+486
| | | | | | 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-032-1/+11
| | | | | | Fixes #1261 PiperOrigin-RevId: 227740670
* Googletest exportmisterg2019-01-035-117/+280
| | | | | | TestCase->TestSuite refactoring PiperOrigin-RevId: 227702164
* Googletest exportmisterg2019-01-0212-26/+1
| | | | | | 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
* Merge #2002Ryohei Machida2018-12-271-0/+6
| | | | PiperOrigin-RevId: 227030722
* Googletest exportAbseil Team2018-12-203-5/+163
| | | | | | Add public entry point testing::RegisterTest. PiperOrigin-RevId: 226350937
* Googletest exportAbseil Team2018-12-201-18/+3
| | | | | | Unifdef c++11-related macros from googletest now that it requires C++11. PiperOrigin-RevId: 225905601
* Googletest exportmisterg2018-12-171-0/+7
| | | | | | Internal Change PiperOrigin-RevId: 225849972
* Googletest exportAbseil Team2018-12-133-9/+35
| | | | | | Support skipped in XML and JSON output PiperOrigin-RevId: 225386540
* Googletest exportAbseil Team2018-12-0317-153/+117
| | | | | | Applied fixes for ClangTidy modernize-use-override and modernize-use-using. PiperOrigin-RevId: 223800219
* Googletest exportdurandal2018-11-291-23/+11
| | | | | Fix: remove two added testcases that depend on gmock; I'll put them back later in a way that doesn't break the build. PiperOrigin-RevId: 223227562
* Googletest exportdurandal2018-11-291-10/+68
| | | | | | Accept gmock matchers in EXPECT_EXIT and friends to allow matches other than simple regex matches on death output. PiperOrigin-RevId: 223035409
* Googletest exportdurandal2018-11-201-0/+8
| | | | | | Move the Matcher<T> interface to googletest so I can use it to extend death test regex matching in a subsequent change. PiperOrigin-RevId: 221675910
* Remove GTEST_HAS_HASH_SET/MAP checkRobin Lindén2018-11-101-3/+0
|
* Googletest exportkrzysio2018-11-071-48/+18
| | | | | | | | Improve Bazel build files. New target gtest_prod allows access to the FRIEND_TEST macro without depending on the entirety of GTest in production executables. Additionally, duplicate config_setting rules were removed and formatting was adjusted. PiperOrigin-RevId: 220279205
* Googletest exportmisterg2018-10-314-14/+4
| | | | | | Remove scoped_ptr replace with std::unique_ptr PiperOrigin-RevId: 219291284
* Merge pull request #1941 from barkovv:masterGennadiy Civil2018-10-292-28/+7
|\ | | | | | | PiperOrigin-RevId: 219134349
| * Replaced all NULLs with nullptr in googletestVadim Barkov2018-10-282-7/+7
| |
* | Googletest exportmisterg2018-10-292-152/+0
|/ | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 219129336
* Googletest exportAbseil Team2018-10-262-0/+152
| | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218618184
* Googletest exportmisterg2018-10-262-152/+0
| | | | | | Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218571466
* Googletest exportdurandal2018-10-241-0/+17
| | | | | | Honor GTEST_SKIP() in SetUp(). PiperOrigin-RevId: 218387359
* Googletest exportAbseil Team2018-10-221-0/+78
| | | | | | Change ValuesArray to require much less template instantiation depth. PiperOrigin-RevId: 218170842
* Merge branch 'master' into python3-testsrefs/pull/1839/headGennadiy Civil2018-10-197-537/+61
|\
| * Googletest exportmisterg2018-10-181-0/+12
| | | | | | | | | | | | | | New variadic implementation for gtest-param-test Removed non-variadic implementation and added variadic for ValueArray and Values PiperOrigin-RevId: 217703627
| * Remove duplicate functionality PrintValue (in ↵misterg2018-10-111-37/+1
| | | | | | | | | | | | googletest-param-test-test.cc), use testing::PrintToString PiperOrigin-RevId: 216733373
| * Merge c41b2bf861ef2ac1a975af05ff66d9256f280b01 into ↵KO Myung-Hun2018-10-113-2/+9
| | | | | | | | | | | | | | | | f203b2db77161fe54846ea9e839ebec81aeeccac Closes #1899 PiperOrigin-RevId: 216719020
| * Project import generated by Copybara.Abseil Team2018-10-111-0/+524
| | | | | | | | PiperOrigin-RevId: 216423319
| * Internal Changemisterg2018-10-111-524/+0
| | | | | | | | PiperOrigin-RevId: 216417182
| * Unconditionally use std::tuple.Abseil Team2018-10-093-504/+48
| | | | | | | | | | | | Remove all mention of TR1 tuple and our own implementation of tuple. PiperOrigin-RevId: 216395043
| * Update BUILD.bazelGennadiy Civil2018-10-091-5/+2
| | | | | | Remove references to googletest-tuple-test.cc
* | Merge branch 'master' into python3-testsGennadiy Civil2018-10-0518-600/+277
|\ \ | |/
| * Apply clang-tidy modernize-use-nullptr to googletest.Abseil Team2018-10-0517-567/+276
| | | | | | | | | | | | | | | | | | | | | | 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
| * Remove checking for C++ 11 and a pre-C++11 test from googletest testsmisterg2018-10-043-33/+1
| | | | | | | | PiperOrigin-RevId: 215789971
* | Merge branch 'master' into python3-testsGennadiy Civil2018-10-043-5/+71
|\ \ | |/