aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2802 from e-i-n-s:fix_clang_warningMark Barolak2020-04-161-4/+4
|\ | | | | | | PiperOrigin-RevId: 306460942
| * gtest-unittest-api_test - fix warning in clang buildMarco Studerus2020-04-061-4/+4
| |
* | Merge pull request #2810 from ptahmose:masterMark Barolak2020-04-161-1/+1
|\ \ | | | | | | | | | PiperOrigin-RevId: 306460738
| * | fix signed/unsigned comparison issue (on OpenBSD)Juergen Bohl2020-04-121-1/+1
| |/
* | Googletest exportAbseil Team2020-04-161-2/+2
| | | | | | | | | | | | Fix link to "After clause". Sorry, reader, but this heading is in another document! PiperOrigin-RevId: 305947971
* | Merge pull request #2756 from Conan-Kudo:fix-pkgconfig-reqsMark Barolak2020-04-163-3/+3
|\ \ | | | | | | | | | PiperOrigin-RevId: 305747437
| * | Ensure that gtest/gmock pkgconfig requirements specify versionNeal Gompa2020-03-213-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Google Test and Google Mock require matching versions to work, so this requirement should be described in the pkgconfig files. This change is derived from the one used for the Fedora gtest package. Signed-off-by: Neal Gompa <ngompa13@gmail.com>
* | | Merge pull request #2772 from Quuxplusone:travisMark Barolak2020-04-162-8/+5
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 305747317
| * | | Fix a typo in .travis.ymlArthur O'Dwyer2020-03-282-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code was trying to pass -Wgnu-zero-variadic-macro-arguments as part of CXXFLAGS, but it forgot the quotation marks needed around whitespace. This meant that option was ignored: https://travis-ci.org/github/google/googletest/jobs/666534177#L760 Unfortunately, the codebase is not remotely clean with respect to that warning option. It fails like this: https://travis-ci.org/github/Quuxplusone/googletest/jobs/668118135 So, remove that failing configuration from the test matrix until someone has time to look at it.
* | | | Merge pull request #2773 from Quuxplusone:replace-noexceptMark Barolak2020-04-161-1/+1
|\ \ \ \ | |_|_|/ |/| | | | | | | PiperOrigin-RevId: 305707266
| * | | Replace the last instance of `throw()` with `noexcept`. NFC.Arthur O'Dwyer2020-03-281-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a -Wdeprecated warning. /home/travis/build/Quuxplusone/googletest/googletest/test/googletest-death-test_ex_test.cc:62:28: error: dynamic exception specifications are deprecated [-Werror,-Wdeprecated] const char* what() const throw() override { return "exceptional message"; } ^~~~~~~ /home/travis/build/Quuxplusone/googletest/googletest/test/googletest-death-test_ex_test.cc:62:28: note: use 'noexcept' instead const char* what() const throw() override { return "exceptional message"; } ^~~~~~~ noexcept
* | | Merge pull request #2715 from kuzkry:document-premature-exit-file-protocolAndy Getz2020-04-041-0/+12
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 304617903
| * | | add documentation for the premature-exit-file protocolKrystian Kuzniarek2019-11-111-0/+12
| | | |
* | | | Merge pull request #2762 from pkryger:avoid_sigprofAndy Getz2020-04-041-5/+7
|\ \ \ \ | | | | | | | | | | | | | | | PiperOrigin-RevId: 304613137
| * | | | Swap settimer and sigaction calls to avoid SIGPROFPrzemek Kryger2020-03-241-5/+7
| | |_|/ | |/| | | | | | | | | | Fixes #2760.
* | | | Googletest exportAbseil Team2020-04-042-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Do not use std::result_of as it was removed in C++20. PiperOrigin-RevId: 303783600
* | | | Merge pull request #2765 from kuzkry:unsupported-build-systemsAndy Getz2020-03-311-71/+0
|\ \ \ \ | | | | | | | | | | | | | | | PiperOrigin-RevId: 303742575
| * | | | remove chapters on Autotools, Meson and plain MakefilesKrystian Kuzniarek2020-03-241-71/+0
| |/ / /
* | | | Merge pull request #2764 from kuzkry:googletest-output-test-dead-codeAndy Getz2020-03-311-57/+0
|\ \ \ \ | |_|_|/ |/| | | | | | | PiperOrigin-RevId: 303414597
| * | | remove dead code in googletest-output-testKrystian Kuzniarek2020-03-241-57/+0
| |/ /
* | | Merge pull request #2350 from adambadura:MockFunctionFromStdFunctionXiaoyi Zhang2020-03-242-38/+143
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 302677275
| * | | Add support for std::function in MockFunction (#2277)Adam Badura2020-03-182-40/+113
| | | |
| * | | Add tests for MockFunction deduction (#2277)Adam Badura2020-03-181-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Add tests checking that ::testing::MockFunction template argument can be deduced in a function call context. This is a property raised in the review, however, not checked before by any tests.
* | | | Googletest exportAbseil Team2020-03-2410-54/+784
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Googletest exportAbseil Team2020-03-201-1/+1
| | | | | | | | | | | | | | | | | | Internal change PiperOrigin-RevId: 302048013
* | | Merge pull request #2746 from Romain-Geissler-1A:mastervslashg2020-03-201-5/+18
|\ \ \ | |/ / |/| | | | | PiperOrigin-RevId: 302045808
| * | Make sure IsATTY does not clobber errno.Romain Geissler2020-03-111-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exposition of the problem: > cat main.cpp TEST(errnoTest, errnoTest) { ASSERT_EQ(errno, 0); } int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } Compiled with gcc 10 like this: > g++ -pthread -o runtest main.cpp -Wl,-Bstatic -lgtest -Wl,-Bdynamic Before patch: > ./runtest [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from errnoTest [ RUN ] errnoTest.errnoTest [ OK ] errnoTest.errnoTest (0 ms) [----------] 1 test from errnoTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (0 ms total) [ PASSED ] 1 test. (output is colored, I run this inside an interactive terminal). > ./runtest | cat [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from errnoTest [ RUN ] errnoTest.errnoTest main.cpp:5: Failure Expected equality of these values: (*__errno_location ()) Which is: 25 0 [ FAILED ] errnoTest.errnoTest (0 ms) [----------] 1 test from errnoTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (0 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] errnoTest.errnoTest 1 FAILED TEST (output is not colored, since IsTTY return false, because of the pipe, however it also clobbered errno for the tests). After the patch, both cases are working fine: > ./runtest [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from errnoTest [ RUN ] errnoTest.errnoTest [ OK ] errnoTest.errnoTest (0 ms) [----------] 1 test from errnoTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (0 ms total) [ PASSED ] 1 test. > ./runtest | cat [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from errnoTest [ RUN ] errnoTest.errnoTest [ OK ] errnoTest.errnoTest (0 ms) [----------] 1 test from errnoTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (0 ms total) [ PASSED ] 1 test.
* | | Googletest exportAbseil Team2020-03-172-6/+4
| | | | | | | | | | | | | | | | | | Move internal function out of header because Hyrum's law always wins. PiperOrigin-RevId: 301446904
* | | Googletest exportdmauro2020-03-171-5/+3
| | | | | | | | | | | | | | | | | | | | | Use a polymorphic matcher instead of the GreaterThan<int> test matcher to fix the sign-comparison warning on MSVC. PiperOrigin-RevId: 301163657
* | | Googletest exportAbseil Team2020-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix Compilation against CMake < 3.7 (Fix #2711) `VERSION_GREATER_EQUAL` was introduced in CMake 3.7 ref: https://cmake.org/cmake/help/v3.7/release/3.7.html#commands PiperOrigin-RevId: 300817917
* | | Googletest exportAbseil Team2020-03-172-4/+0
| | | | | | | | | | | | | | | | | | Internal change PiperOrigin-RevId: 299345492
* | | Googletest exportAbseil Team2020-03-172-259/+160
| | | | | | | | | | | | | | | | | | Simplify the fallback printing logic to have a single sequence of trial printers. PiperOrigin-RevId: 298621376
* | | Merge pull request #2722 from JohanMabille:warningsvslashg2020-03-171-1/+1
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 298608772
| * | | Fixed warningsJohan Mabille2020-02-211-1/+1
| | | |
* | | | Merge pull request #2716 from kuzkry:autotools-leftovervslashg2020-03-171-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | PiperOrigin-RevId: 298599235
| * | | | remove a dead reference to the Autotools scriptKrystian Kuzniarek2020-01-291-3/+3
| | | | |
* | | | | Googletest exportAbseil Team2020-03-171-1/+1
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove public buganizer reference from googletest cookbook. It also seems that this bug is obsolete. PiperOrigin-RevId: 298598298
* | | | Googletest exportAbseil Team2020-02-282-47/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename internal color enumerators to avoid conflicts with curses.h macro definitions. Fixes #2685 PiperOrigin-RevId: 297639382
* | | | Googletest exportAbseil Team2020-02-282-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Relax the implementation of MatcherCast to allow conversion of `Matcher<T>` to `Matcher<const T&>`. They have the same match signature. PiperOrigin-RevId: 297115843
* | | | Googletest exportAbseil Team2020-02-283-22/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow construction of an Action from a callable of zero args Action already allows construction from a callable with the same args as the mocked function, without needing to wrap the callable in Invoke. However, if you don't care about the arguments to the mocked function you need to either accept all of them or wrap your callable in InvokeWithoutArgs. This change makes both of those unnecessary, since it allows you to pass a no-args callable to Action directly. PiperOrigin-RevId: 296117034
* | | | Googletest exportAbseil Team2020-02-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the CMAKE_CXX_STANDARD from GoogleTest's CMakeLists.txt This causes ABI issues since it can create a mixed-mode build. The value should be inherited from the top-level build if it needs to be set. PiperOrigin-RevId: 294730724
* | | | Googletest exportAbseil Team2020-02-117-164/+197
| | | | | | | | | | | | | | | | | | | | | | | | Add gmock Matcher<std::string_view> specialization. PiperOrigin-RevId: 294443240
* | | | Googletest exportAbseil Team2020-02-113-1871/+1892
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix gmock_gen to use MOCK_METHOD instead of old style macros. Fix several related bugs in argument parsing and return types. - handle commas more correctly in return types - handle commas correctly in arguments - handle default values more correctly PiperOrigin-RevId: 294435093
* | | | Googletest exportAbseil Team2020-02-112-371/+406
| | | | | | | | | | | | | | | | | | | | | | | | Fix gmock_gen to use MOCK_METHOD instead of old style macros. PiperOrigin-RevId: 294360947
* | | | Googletest exportAbseil Team2020-02-112-406/+371
| | | | | | | | | | | | | | | | | | | | | | | | Fix gmock_gen to use MOCK_METHOD instead of old style macros. PiperOrigin-RevId: 294332975
* | | | Googletest exportAbseil Team2020-02-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor function GetNextPrime so that the loop precondition is checked before loop instead of during every loop run. Also by removing the loop condition, it shows that the only exit from the loop is the return statement. PiperOrigin-RevId: 293932783
* | | | Googletest exportAbseil Team2020-02-078-905/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of gmock-generated-matchers.h and gmock-generated-matchers.h.pump. Stop using pump for MATCHER* macroses generation. PiperOrigin-RevId: 293878808
* | | | Googletest exportdurandal2020-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tag the function generated by MATCHER with GTEST_ATTRIBUTE_UNUSED_ to fix CI builds of gmock-matchers_test.cc vs. -Wunused-function. See https://github.com/google/googletest/pull/2697 for breakage. PiperOrigin-RevId: 293669752
* | | | Googletest exportAbseil Team2020-02-078-1550/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of gmock-generated-function-mockers.h and gmock-generated-function-mockers.h.pump. Stop using pump for GMOCK_METHOD* macroses generation. PiperOrigin-RevId: 293454519