aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prefix googletest binaries under its own subtree instead of `gtest`Enji Cooper2019-03-291-1/+1
| | | | | | | | | | | | | | | | | | Building all test binaries under their respective subtrees makes building the project via cmake easier to grok without additional hacks. In particular, when dealing with the conversion I proposed in https://reviews.freebsd.org/D19430 (switching from autotools to cmake), I ran into unexpected gtest prefixing under the googlemock directory, as opposed to the googletest directory. Example: Before: `googlemock/gtest/googletest-break-on-failure-unittest_` After: `googletest/googletest-break-on-failure-unittest_` The latter form is easier to translate to packaging manifests when building googlemock is disabled, as well as enabled, as the path remains consistent when the feature flag is disabled. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Googletest exportAbseil Team2019-03-286-337/+519
| | | | | | Update XML and JSON output to be consistent with the standard. PiperOrigin-RevId: 239833242
* Update CONTRIBUTING.mdGennadiy Civil2019-03-281-1/+1
|
* Update CONTRIBUTING.mdGennadiy Civil2019-03-281-1/+1
|
* Merge pull request #2199 from syohex/update-xcode-project-file-againGennadiy Civil2019-03-261-16/+4
|\ | | | | Update Xcode project file
| * Update Xcode project fileSyohei YOSHIDA2019-03-261-16/+4
|/ | | | | - Remove files which no longer exists - Add newer file
* Merge pull request #2193 from antismap/patch-1Gennadiy Civil2019-03-211-0/+2
|\ | | | | Note about INSTANTIATE_TEST_SUITE_P / INSTANTIATE_TEST_CASE_P
| * Update googletest/docs/advanced.mdGennadiy Civil2019-03-211-1/+1
| | | | | | Co-Authored-By: antismap <michael.thenault@gmail.com>
| * Note about INSTANTIATE_TEST_SUITE_P / INSTANTIATE_TEST_CASE_P keyword changeantismap2019-03-211-0/+2
| | | | | | See https://github.com/google/googletest/issues/2065
* | Merge pull request #2180 from twam:masterGennadiy Civil2019-03-212-5/+6
|\ \ | | | | | | | | | PiperOrigin-RevId: 239404016
| * | Remove old_crtdbg_flag_ member if not requiredTobias Müller2019-03-191-4/+6
| | |
* | | Googletest exportAbseil Team2019-03-214-14/+6
| | | | | | | | | | | | | | | | | | Remove mention of unused type ProtocolMessage. PiperOrigin-RevId: 239242706
* | | Googletest exportAbseil Team2019-03-212-61/+85
| |/ |/| | | | | | | | | Action helpers need to pass by const& so that they can work with unique_ptr. PiperOrigin-RevId: 239062671
* | Merge pull request #2181 from sethraymond/patch-1Gennadiy Civil2019-03-201-0/+1
|\ \ | |/ |/| DesignDoc Markdown table was broken
| * DesignDoc Markdown table was brokenSeth Raymond2019-03-151-0/+1
|/ | | Added a missing newline
* Merge pull request #2158 from CarloWood:masterGennadiy Civil2019-03-055-3/+5
|\ | | | | | | PiperOrigin-RevId: 236716851
| * Minor build system fixes.Carlo Wood2019-03-015-3/+5
| |
* | Googletest exportAbseil Team2019-03-053-98/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-052-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Build gmock cleanly with clang -Wextra-semi and -Wextra-semi-stmt Extends 56ef07a20308 to take -Wc++98-compat-extra-semi (https://reviews.llvm.org/D43162) and -Wextra-semi-stmt (https://reviews.llvm.org/D52695) into account. For https://crbug.com/926235. PiperOrigin-RevId: 236643095
* | 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-03-013-3/+3
|/ | | | | | | | | | Build gmock cleanly with clang -Wextra-semi For https://crbug.com/926235. From https://github.com/google/googletest/pull/2139. Fixes https://github.com/google/googletest/issues/2138. PiperOrigin-RevId: 235832527
* Googletest exportAbseil Team2019-02-256-2883/+134
| | | | | | Replace more pump'd code with variadic templates. PiperOrigin-RevId: 235584585
* Merge pull request #2152 from rsinnet/patch-1Gennadiy Civil2019-02-251-1/+1
|\ | | | | Fix grammatical error in primer.md
| * Fix grammatical error in primer.mdRyan Sinnet2019-02-251-1/+1
|/
* Merge pull request #2147 from ↵Gennadiy Civil2019-02-221-1/+1
|\ | | | | | | | | | | ngie-eign:gtest-test-death-test-dont-hardcode-test-name PiperOrigin-RevId: 235248114
| * Don't hardcode the filename in ↵Enji 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 #2126 from ngie-eign:clang-add-more-strict-warningsGennadiy Civil2019-02-221-0/+1
|\ \ | |/ |/| | | PiperOrigin-RevId: 235220570
| * Add `cxx_strict_flags` for clang to match FreeBSD's WARNS flagsEnji Cooper2019-02-131-0/+1
| | | | | | | | Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* | Merge pull request #2137 from ngie-eign:clang-ignore-sign-conversionGennadiy Civil2019-02-214-8/+8
|\ \ | | | | | | | | | PiperOrigin-RevId: 235012245
| * | Ignore `-Wsign-conversion` issuesEnji Cooper2019-02-181-1/+1
| |/ | | | | | | | | | | | | | | | | | | clang++ compilation when `-Wsign-conversion` is currently broken and the issues within the code are varied and widespread. For the time being ignore `-Wsign-conversion` issues, even though some of them are valid and bleed over into issues that would be found with `-Wtautological-compare`, et al. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* | Merge pull request #2061 from samolisov:building-with-bazel-as-a-dll-on-windowsGennadiy Civil2019-02-205-17/+81
|\ \ | | | | | | | | | PiperOrigin-RevId: 234845565
| * | Enable CI on Windows (appveyor) with BazelPavel Samolysov2019-01-222-10/+66
| | | | | | | | | | | | Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
| * | Enable building as a shared library (dll) on Windows with BazelPavel Samolysov2019-01-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the google test library is being built as a shared library using Bazel, so that there is a rule like cc_test( name = "iterator_traits_test", linkstatic = 0, deps = ["@gtest//:gtest_main"], ... ) in a BUILD file, the following error appears on Windows: INFO: Found 1 test target... ERROR: C:/../external/gtest/BUILD.bazel:55:1: output 'external/gtest/gtest.if.lib' was not created ERROR: C:/../external/gtest/BUILD.bazel:55:1: not all outputs were created or valid Target //test:iterator_traits_test failed to build The reason is a missing "win_def_file" attribute of the "gtest" and "gtest_main" rules in the BUILD.bazel inside the google test library package. The "windows_export_all_symbols" feature is added to the rules, this feature forces Bazel to export all symbols from the google test library to linker. I believe exporting all symbols from a testing library makes no problem for the application from a point of view on encapsulation. Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
* | | Merge pull request #2125 from ngie-eign:clang-unused-parameterGennadiy Civil2019-02-202-2/+2
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 234844287
| * | | Fix clang `-Wunused-parameter` warningsEnji Cooper2019-02-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Comment out unused method parameters in their relevant definitions. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
| * | | Fix clang `-Winconsistent-missing-override` warningsEnji Cooper2019-02-131-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | `DescribeTo(..)` and `MatchAndExplain(..)` in `gmock-matchers_test` both override virtual methods. Remove the `virtual` keyword and apply `override` to them instead. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* | | Merge pull request #2123 from ngie-eign:clang-inconsistent-missing-overrideGennadiy Civil2019-02-202-4/+4
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 234840107
| * | | Fix clang `-Winconsistent-missing-override` warningsEnji Cooper2019-02-131-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | `DescribeTo(..)` and `MatchAndExplain(..)` in `gmock-matchers_test` both override virtual methods. Remove the `virtual` keyword and apply `override` to them instead. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* | | Googletest exportmisterg2019-02-202-16/+1
| | | | | | | | | | | | | | | | | | Internal Change PiperOrigin-RevId: 234823465
* | | Googletest exportAbseil Team2019-02-201-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | Update gtest-death-test to use new Fuchsia API Fuchsia has renamed this API and removed the need for several parameters. We now use the newer, simpler API. PiperOrigin-RevId: 234617715
* | | Merge pull request #2141 from dspinellis/index-fixGennadiy Civil2019-02-201-1/+1
|\ \ \ | |/ / |/| | Avoid array index out of range
| * | Avoid array index out of rangeDiomidis Spinellis2019-02-201-1/+1
|/ / | | | | | | Issue: #2140
* | Merge pull request #2112 from knuto:pr/fix_null_pointerGennadiy Civil2019-02-132-5/+6
|\ \ | | | | | | | | | PiperOrigin-RevId: 233825166
| * | Stop TestInfo::Run() calling a function through null pointerJonathan Wakely2019-02-111-1/+3
| | | | | | | | | | | | | | | | | | | | | If the object was never created then trying to call &Test::DeleteSelf_ will dereference a null pointer, with undefined behaviour. Fixes #845
* | | Merge pull request #2121 from ngie-eign:add-dragonflybsd-and-kfreebsd-supportGennadiy Civil2019-02-135-8/+103
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 233789488
| * | | Import `patch-bsd-defines` from FreeBSD ports [1]Enji Cooper2019-02-124-4/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge pull request #2114 from knuto:pr/libtool_supportGennadiy Civil2019-02-132-5/+25
|\ \ \ \ | | | | | | | | | | | | | | | PiperOrigin-RevId: 233773676
| * | | | Generate a libgtest.la to help libtool managing dependenciesKnut Omang2019-02-111-0/+21
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building and using googletest from an install tree we want libtool to generate rpath in the dependent binaries to allow them to be executed from a build without a need for LD_LIBRARY_PATH or similar. For libtool based project this happens automatically as projects generates .la files and install them. Provide such a file for gtest as well to allow it to work smoothly with libtool based projects. Signed-off-by: Knut Omang <knut.omang@oracle.com>
* | | | Merge pull request #2119 from ngie-eign:clang-wunused-private-fieldGennadiy Civil2019-02-132-0/+4
|\ \ \ \ | | | | | | | | | | | | | | | PiperOrigin-RevId: 233762751
| * | | | Fix -Wunused-private-field issues with clangEnji Cooper2019-02-122-0/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Provide dummy accessors for private values that are set in initializers, but not actually used. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>