Googletest - Google Testing and Mocking Framework

Related tags

Debug googletest
Overview

GoogleTest

OSS Builds Status

Build status

Announcements

Release 1.10.x

Release 1.10.x is now available.

Coming Soon

Welcome to GoogleTest, Google's C++ test framework!

This repository is a merger of the formerly separate GoogleTest and GoogleMock projects. These were so closely related that it makes sense to maintain and release them together.

Getting Started

The information for GoogleTest is available in the GoogleTest Primer documentation.

GoogleMock is an extension to GoogleTest for writing and using C++ mock classes. See the separate GoogleMock documentation.

More detailed documentation for googletest is in its interior googletest/README.md file.

Features

  • An xUnit test framework.
  • Test discovery.
  • A rich set of assertions.
  • User-defined assertions.
  • Death tests.
  • Fatal and non-fatal failures.
  • Value-parameterized tests.
  • Type-parameterized tests.
  • Various options for running the tests.
  • XML test report generation.

Supported Platforms

GoogleTest requires a codebase and compiler compliant with the C++11 standard or newer.

The GoogleTest code is officially supported on the following platforms. Operating systems or tools not listed below are community-supported. For community-supported platforms, patches that do not complicate the code may be considered.

If you notice any problems on your platform, please file an issue on the GoogleTest GitHub Issue Tracker. Pull requests containing fixes are welcome!

Operating Systems

  • Linux
  • macOS
  • Windows

Compilers

  • gcc 5.0+
  • clang 5.0+
  • MSVC 2015+

macOS users: Xcode 9.3+ provides clang 5.0+.

Build Systems

Note: Bazel is the build system used by the team internally and in tests. CMake is supported on a best-effort basis and by the community.

Who Is Using GoogleTest?

In addition to many internal projects at Google, GoogleTest is also used by the following notable projects:

Related Open Source Projects

GTest Runner is a Qt5 based automated test-runner and Graphical User Interface with powerful features for Windows and Linux platforms.

GoogleTest UI is a test runner that runs your test binary, allows you to track its progress via a progress bar, and displays a list of test failures. Clicking on one shows failure text. Google Test UI is written in C#.

GTest TAP Listener is an event listener for GoogleTest that implements the TAP protocol for test result output. If your test runner understands TAP, you may find it useful.

gtest-parallel is a test runner that runs tests from your binary in parallel to provide significant speed-up.

GoogleTest Adapter is a VS Code extension allowing to view GoogleTest in a tree view, and run/debug your tests.

C++ TestMate is a VS Code extension allowing to view GoogleTest in a tree view, and run/debug your tests.

Cornichon is a small Gherkin DSL parser that generates stub code for GoogleTest.

Contributing Changes

Please read CONTRIBUTING.md for details on how to contribute to this project.

Happy testing!

Issues
  • Install CMake export files

    Install CMake export files

    CMake export files automate the task of importing GTest libraries into the CMake project that links them (See Exporting from an Installation Tree). Also:

    1. Issue https://github.com/google/googletest/issues/878 mentions two alternative approaches, but the CMake export files are the more idiomatic solution nowadays (see The Ultimate Guide to Modern CMake). Specifically: a. The add_subdirectory approach might interfere with the global settings of the host CMake project. b. The find_package approach does not support Release+Debug installations. The CMake export files address both these limitations.
    2. W.r.t. PR #768, this patch uses 'GTest' instead of 'Gtest' for the CMake namespace of the exported targets. Rationale: to be consistent with the existing 'FindGtest' CMake module (https://cmake.org/cmake/help/v3.10/module/FindGTest.html).
    3. Also, w.r.t. PR #768, this patch does not override the DEBUG_POSTFIX CMake property for the exported targets. Rationale: give to the user the flexibility to choose its own suffix (and if to use one at all).
    GC Attention Set cla: yes 
    opened by stefanosoffia 46
  • Test Pull For Monotonic clock

    Test Pull For Monotonic clock

    This is a tentative cross platform patch for enabling a monotonic clock in gtest for test elapsed time. It uses C++ 11 chrono library if available; otherwise specific OS calls for Windows/Linux/Mac.

    opened by bryanzim 40
  • add timeouts to tests

    add timeouts to tests

    it would be nice to implement timeouts for tests.
    thus a test will fail if it does not complete successfully within the alloted 
    time frame. makes it easier to impose performance restrictions on cerain 
    operations, and also to make sure that if a certain test hangs, other test 
    cases can run instead of aborting everything/
    
    

    Original issue reported on code.google.com by [email protected] on 29 Dec 2010 at 7:15

    Priority-Low auto-migrated Type-Enhancement OpSys-All Usability 
    opened by GoogleCodeExporter 38
  • Allow MOCK_METHOD without specifying the argument count

    Allow MOCK_METHOD without specifying the argument count

    Currently, you must use the correct MOCK_METHODn macro:

    MOCK_METHOD2(foo, void(int, int));
    MOCK_METHOD3(bar, void(int, int, int));
    

    I suggest a variation that works without the number:

    MOCK_METHOD(foo, void, (int, int));
    MOCK_METHOD(bar, void, (int, int, int));
    

    Note that the return type is now separate from the argument types.

    Implementing this isn't complicated. It's basically this:

    #define MOCK_METHOD(name, ret, args) MOCK_METHOD##PP_NARG(args)(name, ret args)
    

    Where PP_NARG is define as in this StackOverflow answer. It will be limited to a maximum number of arguments - but so are existing MOCK_METHODn macros. Perhaps there's a more elegant implementation, instead of reducing it to existing macros.

    I'm willing to do the development (if I think there's a chance that it will be accepted).

    opened by ugoren 31
  • Use override keyword with new C++11 compilers

    Use override keyword with new C++11 compilers

    From @GoogleCodeExporter on August 24, 2015 22:40

    The C++11 standard introduces new "override" and "final" keywords in virtual 
    function declarations. The "override" keyword is especially useful in context 
    of creating mock functions. Macros MOCK_METHOD* expand to virtual methods that 
    have to be present in base class in order to be useful as mocks. And, since we 
    have to define mocks and class interface separately, this creates a possible 
    gap for bugs when changing method prototypes.
    
    For example, changing a type of argument in base class method, without updating 
    the associated MOCK_METHOD* macro, will define the mock method as overloading 
    and compilers will silently allow such buggy code to compile. However, using 
    the new C++11 feature, mismatched function declarations will result in compile 
    error, thus allowing the programmer to clearly state his purpose.
    
    In my projects, I patched GMock macros to optionally include the override 
    keyword - see the attached diff. I think such improvement merits for inclusion 
    in upstream, so I decided to create this issue.
    

    Original issue reported on code.google.com by [email protected] on 15 Dec 2012 at 9:23

    Attachments:

    Copied from original issue: google/googlemock#157

    help wanted good first issue 
    opened by BillyDonahue 31
  • 10.6 SL : pointer being freed was not allocated

    10.6 SL : pointer being freed was not allocated

    What steps will reproduce the problem?
    1. Build and link code on MacOS X 10.6 GM
    2. Run any test code with or without debugger
    
    What is the expected output? What do you see instead?
    
    1. If code is run without a debugger, the following errors appear in the 
    terminal, EVERY time 
    there is text to display:
    
    <proc>(27319) malloc: *** error for object 0x7fff70ca5500: pointer being freed 
    was not 
    allocated
    *** set a breakpoint in malloc_error_break to debug
    
    The tests will still run, as the SIGABRT is being caught by gtest, but the 
    error will persist.
    
    2. If the code is run with a debugger, here is the following output:
    
    <proc>(27319) malloc: *** error for object 0x7fff70ca5500: pointer being freed 
    was not 
    allocated
    *** set a breakpoint in malloc_error_break to debug
    Program received signal:  “SIGABRT”.
    
    What version of the product are you using? On what operating system?
    
    GTest 1.3.0, 10.6 Snow Leopard (10A432)
    
    Please provide any additional information below.
    
    There seems to be some funny interaction with the libstdc++ and gtest 1.3.0. 
    10.5.x (all 
    versions) work perfectly with gtest 1.3.0
    
    
    

    Original issue reported on code.google.com by [email protected] on 31 Aug 2009 at 3:05

    Priority-Low Type-Defect auto-migrated OpSys-OSX 
    opened by GoogleCodeExporter 31
  • googletest on Visual Studio 2012 RC on Windows 8 RC does not compile

    googletest on Visual Studio 2012 RC on Windows 8 RC does not compile

    I would like to request that the team supports Windows 8 RC.  I know that 
    Windows 8 RC is not a release from Microsoft.  However, being able to support 
    developers working on the Windows 8 platform would be really nice.  Currently, 
    trying to even compile gtest on Windows 8 fails.  I detail the problems below.  
    
    What steps will reproduce the problem?
    1.  Loading the solution with Visual Studio 2012 RC on Windows 8 RC Build 8400 
    will cause the solution to be converted to Visual Studio 2012 v110 code 
    generation.
    2.  Upon attempting to build gtest a number of compiler issues occur.  All of 
    the errors occur in gtest-param-util-generated.h related to templates.  Visual 
    Studio 2012 has an issue with the number of template arguments in 
    std::tr1::tuple according to the compiler.
    
    What is the expected output? What do you see instead?
    The expected output is that the build is successful.  Instead, I get the 
    following output:  
    
    Note: Output has been modified slightly to hide some details unrelated to gtest:
    
    1>\ext\gtest-1.5.0\include\gtest\internal\gtest-param-util-generated.h(4015): 
    error C2977: 'std::tuple' : too many template arguments
    1>          c:\program files (x86)\microsoft visual studio 
    11.0\vc\include\utility(73) : see declaration of 'std::tuple'
    1>          
    \ext\gtest-1.5.0\include\gtest\internal\gtest-param-util-generated.h(4247) : 
    see reference to class template instantiation 
    'testing::internal::CartesianProductGenerator9<T1,T2,T3,T4,T5,T6,T7,T8,T9>' 
    being compiled
    1>c:\users\msfrucht\desktop\win8nfc\win8nfc\c3nfc\ext\gtest-1.5.0\include\gtest\
    internal\gtest-param-util-generated.h(4015): error C3203: 'tuple' : 
    unspecialized class template can't be used as a template argument for template 
    parameter 'T', expected a real type
    1>c:\users\msfrucht\desktop\win8nfc\win8nfc\c3nfc\ext\gtest-1.5.0\include\gtest\
    internal\gtest-param-util-generated.h(4015): error C2955: 'std::tuple' : use of 
    class template requires template argument list
    1>          c:\program files (x86)\microsoft visual studio 
    11.0\vc\include\utility(73) : see declaration of 'std::tuple'
    1>\ext\gtest-1.5.0\include\gtest\internal\gtest-param-util-generated.h(4015): 
    error C2955: 'testing::internal::ParamGeneratorInterface' : use of class 
    template requires template argument list
    1>          \ext\gtest-1.5.0\include\gtest\internal\gtest-param-util.h(141) : 
    see declaration of 'testing::internal::ParamGeneratorInterface'
    1>\gtest-1.5.0\include\gtest\internal\gtest-param-util-generated.h(4017): error 
    C2977: 'std::tuple' : too many template arguments
    1>          c:\program files (x86)\microsoft visual studio 
    11.0\vc\include\utility(73) : see declaration of 'std::tuple'
    
    What version of Google Test are you using? On what operating system?
    I am using Google Test 1.5 on Windows 8 RC Build 8400 x64.
    
    

    Original issue reported on code.google.com by [email protected] on 4 Jun 2012 at 11:45

    Type-Defect auto-migrated Priority-Medium 
    opened by GoogleCodeExporter 30
  • need a way to resume from the TEST that crashed

    need a way to resume from the TEST that crashed

    Requested by Timur Iskhodzhanov <[email protected]>:
    
    Consider we have a large number of tests in one executable (e.g.
    Chromium unit_tests or ui_tests)
    
    Use case:
    One's local change has introduced a failure in a test X.Y which is
    executed somewhere in the middle of the test run
    (e.g. the whole binary takes 10 minutes, the failure happens after 5
    minutes of running).
    
    If he/she is sure the tests that are executed before X.Y are not
    affected by the fix - he/she should be able to skip them and run only
    X.Y and the following tests.
    
    This feature will be especially useful for those who develop Valgrind-
    like tools and test them using binaries based on googletest.
    In this case it's quite common that some particular test is failing
    when run under the tool and when it's fixed we should run only those
    tests that follow X.Y
    
    By "failure" I meant a crash or non-googletest assertion.
    So the execution stops when X.Y fails.
    
    Example: Chromium code uses CHECKs inside its code and as soon as they
    fail, it prints out the stack trace and aborts the execution.
    Another example: if there is a bug in Valgrind-like tool, it may crash
    in an internal assertion when running X.Y and stop the test execution.
    

    Original issue reported on code.google.com by [email protected] on 7 Sep 2010 at 7:07

    auto-migrated Type-Enhancement Priority-High OpSys-All Usability 
    opened by GoogleCodeExporter 29
  • Skipping tests at runtime with GTEST_SKIP()

    Skipping tests at runtime with GTEST_SKIP()

    Description

    Nothing fancy, plain and simple test skipping based on condition evaluated at runtime. One might want to skip

    • tests which are not supported within current environment,
    • tests which depend on some external resource with conditional availability,
    • tests which require privileges when run under user with no such privileges, etc.

    Feature has been requested several times, see #160, #490 and #822. Works as demonstrated in sample test:

    TEST(SkipTest, DoesSkip) {
      SKIP();
      EXPECT_EQ(0, 1);
    }
    

    yields

    [==========] Running 1 test from 1 test case.
    [----------] Global test environment set-up.
    [----------] 1 test from SkipTest
    [ RUN      ] SkipTest.DoesSkip
    [  SKIPPED ] SkipTest.DoesSkip (1 ms)
    [----------] 1 test from SkipTest (1 ms total)
    
    [----------] Global test environment tear-down
    [==========] 1 test from 1 test case ran. (1 ms total)
    [  PASSED  ] 0 tests.
    [  SKIPPED ] 1 test, listed below:
    [  SKIPPED ] SkipTest.DoesSkip
    

    Skipped tests are displayed in green, and are not considered neither successful nor failed since they have never been completely run.

    Further work

    There are some conceptual issues which are not yet resolved, but I would love to hear you thoughts on them.

    1. Listing all skipped tests on teardown might be not such a good idea; it is at least reasonable to add compile option to control this behaviour.
    2. If test is skipped at any point, all preceding failures, which occurred in this test, are ignored; this can be handled in test result assigning with checking for failures before setting kSkip result.
    3. Skipping is not available from SetUp() and TearDown() methods, as well as from functions external to test body, since skipping aborts only current function; this can be resolved by adding additional AssertHelpers in fashion similar to handling FAIL().
    4. Additional improvements shall be made in loggers to support this additional test result.
    GC Attention Set cla: yes 
    opened by aprlv 28
  • Fix FreeBSD -Werror compilation issues

    Fix FreeBSD -Werror compilation issues

    The attached pull request fixes 2 trivial issues when compiling the googletest tests on FreeBSD with WARNS >= 1, i.e., -Werror on, with clang.

    This issue was seen when trying to integrate googletest 1.8.1 into the FreeBSD base system on my GitHub project branch.

    This PR requires #2100.

    cla: yes Conversation On-Going 
    opened by ngie-eign 27
  • Regular expressions from C++ 11?

    Regular expressions from C++ 11?

    Hi, I did a preliminary check and it doesn't seem that Google Test uses C++'s regex library. Would you be interested in adding it? Or are there reasons why this is not a good idea?

    If it is something worthwhile, I'd like to take a closer look and propose a pull request.

    opened by lbartnik 26
  • Unable to generate coredump file When google test crashes

    Unable to generate coredump file When google test crashes

    Hi, I need to use coredump file to debug when the program crashe, but the coredump file can't be generated. Repetition steps:

    1. ulimit -c unlimited
    2. execute the gtest executable file and crash

    I've added the relevant compile support command to Cmake, but it still doesn't work:

    SET(CMAKE_BUILD_TYPE RelWithDebInfo)
    SET(CMAKE_BUILD_TYPE "Debug")  
    SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")  
    SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")  
    add_compile_options(-std=c++11 -pthread -g  -ggdb -O0 -Wall   -fstack-protector-all -march=native -fnon-call-exceptions)
    

    I wonder if GTest currently supports the generation of coredump files. If there is such a generation mechanism, please tell me how to use it.

    By the way, why does Gtest need to run all the previous test cases before it can stop at the GDB breakpoint?

    Br, xiaofyao

    bug 
    opened by xiaofyao 0
  • Allow naming expectations

    Allow naming expectations

    Does the feature exist in the most recent commit? No

    Why do we need this feature? When a test has multiple EXPECT_CALLs on the same function, it becomes difficult to determine which expectation is unmet.

    Allowing the naming of expectations allows for more helpful error messages to help pinpoint which expectation failed.

    Describe the proposal

    Allow the specifying of name in the EXPECT_CALL

        EXPECT_CALL(my_func, Call(_)).Name("Expect my_func to be called");
    

    which should produce the following error message on failure

    Actual function call count doesn't match "Expect my_func to be called"
             Expected: to be called at least once
               Actual: never called - unsatisfied and active
    

    Related: https://github.com/google/googletest/issues/3683

    enhancement 
    opened by rcywongaa 0
  • The issue of using custom comparators on new library releases.

    The issue of using custom comparators on new library releases.

    I had some problems migrating from version 1.8.1 to 1.12.1.

    The fact is that I have my custom macro for comparing entities with each other. Inside it, I used the macro EXPECT_PRED_FORMAT#(arg1...argN), where I passed a personal comparator and arguments as parameters. For my macro to work successfully, I needed to create my own .h is the file where I included the gtest/gtest_pred_impl.h file and implemented its behavior there. With migration to version 1.12.1 (I haven't tried other release versions) my project stopped assembling, giving me a compilation error, which can be seen below:

    Console output
    ...: error: incomplete type 'testing::TestPartResult' named in nested name specifier
    ...
    ...\googletest\googletest\include\gtest/internal/gtest-internal.h(1350,38): note: expanded from macro 'GTEST_NONFATAL_FAILURE_'
      GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
    ...\googletest\googletest\include\gtest/internal/gtest-internal.h(1344,50): note: expanded from macro 'GTEST_MESSAGE_'
      GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
                                                     ^~~~~~~~~~~
    ...\googletest\googletest\include\gtest/internal/gtest-internal.h(1340,37): note: expanded from macro 'GTEST_MESSAGE_AT_'
      ::testing::internal::AssertHelper(result_type, file, line, message) = \
                                        ^~~~~~~~~~~
    ...\googletest\googletest\include\gtest/internal/gtest-internal.h(108,7): note: forward declaration of 'testing::TestPartResult'
    class TestPartResult;   // Result of a test part.
    
    ...: error: no member named 'AssertHelper' in namespace 'testing::internal'' ... ...\googletest\googletest\include\gtest/gtest_pred_impl.h(224,52): note: expanded from macro 'EXPECT_PRED_FORMAT4' GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ...\googletest\googletest\include\gtest/gtest_pred_impl.h(213,66): note: expanded from macro 'GTEST_PRED_FORMAT4_' GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), on_failure) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) ...\googletest\googletest\include\gtest/internal/gtest-internal.h(1350,3): note: expanded from macro 'GTEST_NONFATAL_FAILURE_' GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...\googletest\googletest\include\gtest/internal/gtest-internal.h(1344,3): note: expanded from macro 'GTEST_MESSAGE_' GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...\googletest\googletest\include\gtest/internal/gtest-internal.h(1340,24): note: expanded from macro 'GTEST_MESSAGE_AT_' ::testing::internal::AssertHelper(result_type, file, line, message) = \
    "path-to-my-macro-file": error: no member named 'FormatForComparisonFailureMessage' in namespace 'testing::internal' testing::internal::FormatForComparisonFailureMessage(strExp, strAct), ~~~~~~~~~~~~~~~~~~~^

    My custom comparator looks like this:

    template<typename T1, typename T2>
    static testing::AssertionResult cmpHelperRt(const char*, const char*, const char*, const char*, const T1& expected,
                                                const T2& actual, const std::string& expectedExpr,
                                                const std::string& actualExpr) {
        if (expected == actual) {
            return testing::AssertionSuccess();
        }
    
        return cmpEqFail(expected, actual, expectedExpr, actualExpr);
    }
    
    #define EXPECT_RV_EQ(first, second) EXPECT_PRED_FORMAT4(cmpHelperRt, (first), (second), #first, #second)
    

    However, connecting the "core" library file ("gtest/gtest.h") now solves this problem. Is this part of the library design that requires the user to explicitly connect the main library file, even in places where it is not particularly necessary, or have I encountered a bug?

    bug 
    opened by kdator 0
  • Documentation inconsistent on test names and underscores

    Documentation inconsistent on test names and underscores

    The docs on generating custom names for parameterized tests says that underscores are not allowed

    https://github.com/google/googletest/blob/b1e9b6323a17002b8359fef338c57bc0437caf57/docs/advanced.md?plain=1#L1184-L1186

    but then in the example a few lines later, and underscore is used

    https://github.com/google/googletest/blob/b1e9b6323a17002b8359fef338c57bc0437caf57/docs/advanced.md?plain=1#L1218-L1224

    and in the documentation for the fourth parameter of INSTANTIATE_TEST_SUITE_P, it is explicitly allowed

    https://github.com/google/googletest/blob/b1e9b6323a17002b8359fef338c57bc0437caf57/docs/reference/testing.md?plain=1#L113-L117

    So which is it?

    bug 
    opened by BMBurstein 0
  • QNX compilation failure of .WillOnce()

    QNX compilation failure of .WillOnce()

    Describe the bug

    During an uplift of our gtest version we got compilation failures for our QNX compiler but not for gcc or clang. I bisected it to this commit: https://github.com/google/googletest/commit/0498660ea575bfeb4b3b0879fa6aa6904d1df373 by @jacobsa.

    Steps to reproduce the bug

    The following works on gcc and clang but not on QNX 7:

    #include <gmock/gmock.h>
    #include <gtest/gtest.h>
    
    class Turtle
    {
     public:
        Turtle() {}
        virtual ~Turtle() {}
        virtual int age() const = 0;
    };
    
    class MockTurtle : public Turtle
    {
     public:
        MOCK_METHOD(int, age, (), (const, override));
    };
    
    TEST(Turtle, TurtleAgeTest)
    {
        MockTurtle turtle;
        EXPECT_CALL(turtle, age()).WillOnce(::testing::Return(1));
        turtle.age();
    }
    

    Changing .WillOnce() to .WillRepeatedly() makes it compile on all our platforms.

    Does the bug persist in the most recent commit?

    Verified that it fails on: bea621c3c39d8a7f71f07bd543c3a58bfa684f92

    What operating system and version are you using?

    Ubuntu 18.04.

    What compiler and version are you using?

    QNX 7.

    What build system are you using?

    Bazel 5.1.1.

    Additional context

    BUILD.bazel

    cc_test(
        name = "foo",
        srcs = [
            "foo.cpp",
        ],
        deps = [
            "@googletest//:gtest_main",
        ],
    )
    

    Error message:

    $ bazel build --config=aarch64_qnx_qcc //:foo
    INFO: Invocation ID: c62e4d54-c742-4b31-8bd8-5892fc173d93
    INFO: Analyzed target //:foo (<redacted>).
    INFO: Found 1 target...
    ERROR: /<redacted>/BUILD.bazel:8:10: Compiling foo.cpp failed: (Exit 1): qcc failed: error executing command external/qnx/qcc -V5.4.0,gcc_ntoaarch64le -Wc,-fstack-protector-strong -Wc,-fno-omit-frame-pointer -Wc,-fno-var-tracking '-Wc,-fmessage-length=0' -fno-math-errno -Wc,-fasynchronous-unwind-tables ... (remaining 50 arguments skipped)
    
    Use --sandbox_debug to see verbose messages from the sandbox
    In file included from external/googletest/googlemock/include/gmock/gmock.h:56:0,
                     from foo.cpp:1:
    external/googletest/googlemock/include/gmock/gmock-actions.h: In instantiation of 'struct testing::internal::negation<testing::internal::conjunction<std::__1::is_constructible<std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >, testing::internal::is_callable_r_impl<void, int, std::__1::tuple<testing::OnceAction<int()>&&> > > >':
    external/googletest/googlemock/include/gmock/gmock-actions.h:284:8:   required from 'struct testing::internal::conjunction<testing::internal::negation<std::__1::is_same<testing::OnceAction<int()>, std::__1::tuple<testing::OnceAction<int()>&&> > >, testing::internal::negation<testing::internal::conjunction<std::__1::is_constructible<std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >, testing::internal::is_callable_r_impl<void, int, std::__1::tuple<testing::OnceAction<int()>&&> > > >, testing::internal::conjunction<std::__1::is_constructible<std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >, testing::internal::is_callable_r_impl<void, int, std::__1::tuple<testing::OnceAction<int()>&&> > > >'
    external/googletest/googlemock/include/gmock/gmock-actions.h:476:30:   required by substitution of 'template<class Callable, typename std::__1::enable_if<testing::internal::conjunction<testing::internal::negation<std::__1::is_same<testing::OnceAction<int()>, typename std::__1::decay<_Tp>::type> >, testing::internal::negation<testing::internal::conjunction<std::__1::is_constructible<typename std::__1::decay<_Tp>::type, Callable>, testing::internal::is_callable_r_impl<void, int, typename std::__1::decay<_Tp>::type> > >, testing::internal::conjunction<std::__1::is_constructible<typename std::__1::decay<_Tp>::type, Callable>, testing::internal::is_callable_r_impl<void, int, typename std::__1::decay<_Tp>::type> > >::value, int>::type <anonymous> > testing::OnceAction<Result(Args ...)>::OnceAction(Callable&&) [with Callable = std::__1::tuple<testing::OnceAction<int()>&&>; typename std::__1::enable_if<testing::internal::conjunction<testing::internal::negation<std::__1::is_same<testing::OnceAction<int()>, typename std::__1::decay<_Tp>::type> >, testing::internal::negation<testing::internal::conjunction<std::__1::is_constructible<typename std::__1::decay<_Tp>::type, Callable>, testing::internal::is_callable_r_impl<void, int, typename std::__1::decay<_Tp>::type> > >, testing::internal::conjunction<std::__1::is_constructible<typename std::__1::decay<_Tp>::type, Callable>, testing::internal::is_callable_r_impl<void, int, typename std::__1::decay<_Tp>::type> > >::value, int>::type <anonymous> = <missing>]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/type_traits:2384:43:   required by substitution of 'template<class _Tp, class ... _Args> typename std::__1::__select_2nd<decltype (std::__1::move((_Tp)((declval<_Args>)()...))), std::__1::integral_constant<bool, true> >::type std::__1::__is_constructible_test(_Tp&&, _Args&& ...) [with _Tp = std::__1::tuple<testing::OnceAction<int()>&&>; _Args = {std::__1::tuple<testing::OnceAction<int()>&&>}]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/type_traits:2395:50:   required from 'struct std::__1::__libcpp_is_constructible<false, std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/type_traits:2443:8:   [ skipping 11 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/__tuple:290:8:   required from 'struct std::__1::__tuple_convertible<std::__1::tuple<std::__1::tuple<testing::OnceAction<int()>&&> >, std::__1::__tuple_types<testing::OnceAction<int()>&&>, true, true>'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/tuple:542:59:   required by substitution of 'template<class ... _Up, typename std::__1::enable_if<(((sizeof... (_Up) <= 1ul) && std::__1::__tuple_convertible<std::__1::tuple<_Tp ...>, typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul), 0ul>::type, std::__1::__tuple_like<typename std::__1::remove_reference<std::__1::tuple<_Tp ...> >::type>::value, std::__1::__tuple_like<typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul), 0ul>::type>::value>::value) && std::__1::__all_default_constructible<typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, 1ul, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul)>::type>::value), bool>::type <anonymous> > constexpr std::__1::tuple<_Tp>::tuple(_Up&& ...) [with _Up = {std::__1::tuple<testing::OnceAction<int()>&&>}; typename std::__1::enable_if<(((sizeof... (_Up) <= 1ul) && std::__1::__tuple_convertible<std::__1::tuple<_Tp ...>, typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul), 0ul>::type, std::__1::__tuple_like<typename std::__1::remove_reference<std::__1::tuple<_Tp ...> >::type>::value, std::__1::__tuple_like<typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul), 0ul>::type>::value>::value) && std::__1::__all_default_constructible<typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, 1ul, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul)>::type>::value), bool>::type <anonymous> = <missing>]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/tuple:878:55:   required from 'constexpr std::__1::tuple<_Tp&& ...> std::__1::forward_as_tuple(_Tp&& ...) [with _Tp = {testing::OnceAction<int()>}]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/memory:3801:43:   required from 'std::__1::__shared_ptr_emplace<_Tp, _Alloc>::__shared_ptr_emplace(_Alloc, _Args&& ...) [with _Args = {testing::OnceAction<int()>}; _Tp = testing::OnceAction<int()>; _Alloc = std::__1::allocator<testing::OnceAction<int()> >]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/memory:4394:5:   required from 'static std::__1::shared_ptr<_Tp> std::__1::shared_ptr<_Tp>::make_shared(_Args&& ...) [with _Args = {testing::OnceAction<int()>}; _Tp = testing::OnceAction<int()>]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/memory:4758:40:   required from 'typename std::__1::enable_if<(! std::__1::is_array<_Tp>::value), std::__1::shared_ptr<_Tp> >::type std::__1::make_shared(_Args&& ...) [with _Tp = testing::OnceAction<int()>; _Args = {testing::OnceAction<int()>}; typename std::__1::enable_if<(! std::__1::is_array<_Tp>::value), std::__1::shared_ptr<_Tp> >::type = std::__1::shared_ptr<testing::OnceAction<int()> >]'
    external/googletest/googlemock/include/gmock/gmock-spec-builders.h:986:40:   required from 'testing::internal::TypedExpectation<R(Args ...)>& testing::internal::TypedExpectation<R(Args ...)>::WillOnce(testing::OnceAction<Result(Args ...)>) [with R = int; Args = {}]'
    foo.cpp:21:61:   required from here
    external/googletest/googlemock/include/gmock/gmock-actions.h:271:41: error: incomplete type 'testing::internal::conjunction<std::__1::is_constructible<std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >, testing::internal::is_callable_r_impl<void, int, std::__1::tuple<testing::OnceAction<int()>&&> > >' used in nested name specifier
         : std::integral_constant<bool, bool(!P::value)> {};
                                             ^
    external/googletest/googlemock/include/gmock/gmock-actions.h: In instantiation of 'struct testing::internal::conjunction<testing::internal::negation<testing::internal::conjunction<std::__1::is_constructible<std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >, testing::internal::is_callable_r_impl<void, int, std::__1::tuple<testing::OnceAction<int()>&&> > > >, testing::internal::conjunction<std::__1::is_constructible<std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >, testing::internal::is_callable_r_impl<void, int, std::__1::tuple<testing::OnceAction<int()>&&> > > >':
    external/googletest/googlemock/include/gmock/gmock-actions.h:284:8:   required from 'struct testing::internal::conjunction<testing::internal::negation<std::__1::is_same<testing::OnceAction<int()>, std::__1::tuple<testing::OnceAction<int()>&&> > >, testing::internal::negation<testing::internal::conjunction<std::__1::is_constructible<std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >, testing::internal::is_callable_r_impl<void, int, std::__1::tuple<testing::OnceAction<int()>&&> > > >, testing::internal::conjunction<std::__1::is_constructible<std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >, testing::internal::is_callable_r_impl<void, int, std::__1::tuple<testing::OnceAction<int()>&&> > > >'
    external/googletest/googlemock/include/gmock/gmock-actions.h:476:30:   required by substitution of 'template<class Callable, typename std::__1::enable_if<testing::internal::conjunction<testing::internal::negation<std::__1::is_same<testing::OnceAction<int()>, typename std::__1::decay<_Tp>::type> >, testing::internal::negation<testing::internal::conjunction<std::__1::is_constructible<typename std::__1::decay<_Tp>::type, Callable>, testing::internal::is_callable_r_impl<void, int, typename std::__1::decay<_Tp>::type> > >, testing::internal::conjunction<std::__1::is_constructible<typename std::__1::decay<_Tp>::type, Callable>, testing::internal::is_callable_r_impl<void, int, typename std::__1::decay<_Tp>::type> > >::value, int>::type <anonymous> > testing::OnceAction<Result(Args ...)>::OnceAction(Callable&&) [with Callable = std::__1::tuple<testing::OnceAction<int()>&&>; typename std::__1::enable_if<testing::internal::conjunction<testing::internal::negation<std::__1::is_same<testing::OnceAction<int()>, typename std::__1::decay<_Tp>::type> >, testing::internal::negation<testing::internal::conjunction<std::__1::is_constructible<typename std::__1::decay<_Tp>::type, Callable>, testing::internal::is_callable_r_impl<void, int, typename std::__1::decay<_Tp>::type> > >, testing::internal::conjunction<std::__1::is_constructible<typename std::__1::decay<_Tp>::type, Callable>, testing::internal::is_callable_r_impl<void, int, typename std::__1::decay<_Tp>::type> > >::value, int>::type <anonymous> = <missing>]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/type_traits:2384:43:   required by substitution of 'template<class _Tp, class ... _Args> typename std::__1::__select_2nd<decltype (std::__1::move((_Tp)((declval<_Args>)()...))), std::__1::integral_constant<bool, true> >::type std::__1::__is_constructible_test(_Tp&&, _Args&& ...) [with _Tp = std::__1::tuple<testing::OnceAction<int()>&&>; _Args = {std::__1::tuple<testing::OnceAction<int()>&&>}]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/type_traits:2395:50:   required from 'struct std::__1::__libcpp_is_constructible<false, std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/type_traits:2443:8:   required from 'struct std::__1::__is_constructible_void_check<false, std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/type_traits:2469:30:   [ skipping 11 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/tuple:542:59:   required by substitution of 'template<class ... _Up, typename std::__1::enable_if<(((sizeof... (_Up) <= 1ul) && std::__1::__tuple_convertible<std::__1::tuple<_Tp ...>, typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul), 0ul>::type, std::__1::__tuple_like<typename std::__1::remove_reference<std::__1::tuple<_Tp ...> >::type>::value, std::__1::__tuple_like<typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul), 0ul>::type>::value>::value) && std::__1::__all_default_constructible<typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, 1ul, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul)>::type>::value), bool>::type <anonymous> > constexpr std::__1::tuple<_Tp>::tuple(_Up&& ...) [with _Up = {std::__1::tuple<testing::OnceAction<int()>&&>}; typename std::__1::enable_if<(((sizeof... (_Up) <= 1ul) && std::__1::__tuple_convertible<std::__1::tuple<_Tp ...>, typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul), 0ul>::type, std::__1::__tuple_like<typename std::__1::remove_reference<std::__1::tuple<_Tp ...> >::type>::value, std::__1::__tuple_like<typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul), 0ul>::type>::value>::value) && std::__1::__all_default_constructible<typename std::__1::__make_tuple_types<std::__1::tuple<testing::OnceAction<int()>&&>, 1ul, ((sizeof... (_Up) < 1ul) ? sizeof... (_Up) : 1ul)>::type>::value), bool>::type <anonymous> = <missing>]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/tuple:878:55:   required from 'constexpr std::__1::tuple<_Tp&& ...> std::__1::forward_as_tuple(_Tp&& ...) [with _Tp = {testing::OnceAction<int()>}]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/memory:3801:43:   required from 'std::__1::__shared_ptr_emplace<_Tp, _Alloc>::__shared_ptr_emplace(_Alloc, _Args&& ...) [with _Args = {testing::OnceAction<int()>}; _Tp = testing::OnceAction<int()>; _Alloc = std::__1::allocator<testing::OnceAction<int()> >]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/memory:4394:5:   required from 'static std::__1::shared_ptr<_Tp> std::__1::shared_ptr<_Tp>::make_shared(_Args&& ...) [with _Args = {testing::OnceAction<int()>}; _Tp = testing::OnceAction<int()>]'
    /<redacted>/external/qnx/target/qnx7/usr/include/c++/v1/memory:4758:40:   required from 'typename std::__1::enable_if<(! std::__1::is_array<_Tp>::value), std::__1::shared_ptr<_Tp> >::type std::__1::make_shared(_Args&& ...) [with _Tp = testing::OnceAction<int()>; _Args = {testing::OnceAction<int()>}; typename std::__1::enable_if<(! std::__1::is_array<_Tp>::value), std::__1::shared_ptr<_Tp> >::type = std::__1::shared_ptr<testing::OnceAction<int()> >]'
    external/googletest/googlemock/include/gmock/gmock-spec-builders.h:986:40:   required from 'testing::internal::TypedExpectation<R(Args ...)>& testing::internal::TypedExpectation<R(Args ...)>::WillOnce(testing::OnceAction<Result(Args ...)>) [with R = int; Args = {}]'
    foo.cpp:21:61:   required from here
    external/googletest/googlemock/include/gmock/gmock-actions.h:284:8: error: 'value' is not a member of 'testing::internal::negation<testing::internal::conjunction<std::__1::is_constructible<std::__1::tuple<testing::OnceAction<int()>&&>, std::__1::tuple<testing::OnceAction<int()>&&> >, testing::internal::is_callable_r_impl<void, int, std::__1::tuple<testing::OnceAction<int()>&&> > > >'
     struct conjunction<P1, Ps...>
            ^
    cc: /<redacted>/external/qnx/host/linux/x86_64/usr/lib/gcc/aarch64-unknown-nto-qnx7.0.0/5.4.0/cc1plus error 1
    Target //:foo failed to build
    Use --verbose_failures to see the command lines of failed build steps.
    INFO: Elapsed time: 2.591s, Critical Path: 1.25s
    INFO: 5 processes: 5 internal.
    FAILED: Build did NOT complete successfully
    
    bug help wanted 
    opened by mnil 2
Releases(release-1.12.1)
  • release-1.12.1(Jun 30, 2022)

    Release Notes

    GoogleTest will not accept patches of new features to the v1.12.x branch.
    We recommend building GoogleTest from the latest commit instead.
    Exceptional critical bug fixes may be considered.

    C++ Language Support

    • This will be the last release to support C++11. Future releases will require at least C++14.

    Mocking

    • Support for move-only values to Return (https://github.com/google/googletest/commit/5126f7166109666a9c0534021fb1a3038659494c)

    Matchers

    • New matchers
      • WhenBase64Unescaped (https://github.com/google/googletest/commit/652ec31f9f53ab34af1257e5e2783d77e872ed45)
    • ResultOf() now has a 3-arg overload that takes a description string for better error messages (https://github.com/google/googletest/commit/0e402173c97aea7a00749e825b194bfede4f2e45)

    Build & Test

    • CMake minimum increased to 3.5
    • Bazel users that build GoogleTest using the Abseil library as a dependency now also require a dependency on RE2 (https://github.com/google/googletest/commit/e33c2b24ca3e13df961ed369f7ed21e4cfcf9eec)
    • Bazel users that build GoogleTest using the Abseil library now use the Abseil library to parse all command-line flags (https://github.com/google/googletest/commit/25dcdc7e8bfac8967f20fb2c0a628f5cf442188d)

    Patches

    58d77fa8070e8cec2dc1ed015d66b454c8d78850 - Fixes the version number in CMakeLists.txt (#3911)

    Source code(tar.gz)
    Source code(zip)
  • release-1.12.0(Jun 23, 2022)

    Release Notes

    GoogleTest will not accept patches of new features to v1.12.0.
    We recommend building GoogleTest from the latest commit instead.
    Exceptional critical bug fixes may be considered.

    C++ Language Support

    • This will be the last release to support C++11. Future releases will require at least C++14.

    Mocking

    • Support for move-only values to Return (https://github.com/google/googletest/commit/5126f7166109666a9c0534021fb1a3038659494c)

    Matchers

    • New matchers
      • WhenBase64Unescaped (https://github.com/google/googletest/commit/652ec31f9f53ab34af1257e5e2783d77e872ed45)
    • ResultOf() now has a 3-arg overload that takes a description string for better error messages (https://github.com/google/googletest/commit/0e402173c97aea7a00749e825b194bfede4f2e45)

    Build & Test

    • CMake minimum increased to 3.5
    • Bazel users that build GoogleTest using the Abseil library as a dependency now also require a dependency on RE2 (https://github.com/google/googletest/commit/e33c2b24ca3e13df961ed369f7ed21e4cfcf9eec)
    • Bazel users that build GoogleTest using the Abseil library now use the Abseil library to parse all command-line flags (https://github.com/google/googletest/commit/25dcdc7e8bfac8967f20fb2c0a628f5cf442188d)
    Source code(tar.gz)
    Source code(zip)
  • release-1.11.0(Jun 12, 2021)

    Release Notes

    GoogleTest will not accept patches of new features to v1.11.0.
    We recommend building GoogleTest from the latest commit instead.
    Exceptional critical bug fixes may be considered.

    Documentation

    • Contents significantly updated
    • Files moved into docs (https://github.com/google/googletest/commit/489283524e3726b7adb9692763c2fb61b235d41a)
    • Now using GitHub pages (https://github.com/google/googletest/commit/1a5a78b9a9c6c285a7897a411cb96bb2ab36d277, https://github.com/google/googletest/commit/d9c309fdab807b716c2cf4d4a42989b8c34f712a, https://github.com/google/googletest/commit/c3fc92f0b7ad49ce59d804dc644dcb5ecbc0c29c)
    • Added Bazel quickstart (https://github.com/google/googletest/commit/32ad3c8c36382165274385a28a23addbea581f5d)
    • Added CMake quickstart (https://github.com/google/googletest/commit/d4e3b8cedf4f57922efa586cb3c796c8fee2d3f3)

    Mocking

    • MOCK_METHOD now handles noexcept correctly (https://github.com/google/googletest/pull/2498)
    • MOCK_METHOD now supports ref-qualifiers (https://github.com/google/googletest/commit/d89b36302116233b8c6377e6e891083f41ee51c5)
    • MOCK_METHOD now supports returning function pointers (https://github.com/google/googletest/commit/1f9edcd9698162b48d94e1ef2e6a2ab7ab4e6c56)
    • DoAll now accepts move-only arguments (https://github.com/google/googletest/commit/48ec64092a38621210ecd835fde61d76861269c1)
    • MockFunction can now be used for mocking std::function (https://github.com/google/googletest/pull/2350)
    • MockFunction is now templated for use with other function classes, besides std::function (https://github.com/google/googletest/commit/662fe38e44900c007eccb65a5d2ea19df7bd520e)
    • ACTION macros now support more than 10 arguments (https://github.com/google/googletest/commit/63713e1ce49019da205daa1ca91b73fcfc9b333f)

    Matchers

    • New matchers
      • IsNan (https://github.com/google/googletest/commit/bbe4b7363bbaa7c9e07dbacde11602a4c69504d3)
      • FieldsAre (https://github.com/google/googletest/commit/a4621888650aaae118de93f9faf8ef5a18cab303)
      • Pointer (https://github.com/google/googletest/commit/a02a591605dfef9addde49634bf010dbe8f95c50)
      • Address (https://github.com/google/googletest/commit/e5644f5f12ff3d5b2232dabc1c5ea272a52e8155)
      • Throws and ThrowsMessage (https://github.com/google/googletest/pull/2904)
    • New actions
      • ReturnRoundRobin (https://github.com/google/googletest/commit/37f322783175a66c11785d17fc153477b0777753)
    • Added Matcher<std::string_view> specialization that internally stores a string instead of string_view (https://github.com/google/googletest/commit/6f5fd0d7199b9a19faa9f499ecc266e6ae0329e7)
    • String matchers now accept string_view input (https://github.com/google/googletest/commit/13a433a94dd9c7e55907d7a9b75f44ff82f309eb)
    • DoubleNearPredFormat matcher now fails on impractically small epsilons (https://github.com/google/googletest/commit/b5687db554a295e697f5d459cf6d3f343d2ca179)
    • Truly matcher now explains failures (https://github.com/google/googletest/commit/0c400f67fcf305869c5fb113dd296eca266c9725)
    • Matchers can now be implemented without extending MatcherInterface (https://github.com/google/googletest/commit/c13c27a513ecd1cbf5700a45fe590e85e8ae6770)
    • Added output messages for skipped tests (https://github.com/google/googletest/pull/2517, https://github.com/google/googletest/pull/2767)

    Behavior

    • New flags
      • --gtest_brief shows only test failures in output (https://github.com/google/googletest/pull/2751)
      • --gtest_fail_fast stops test execution on first failure (https://github.com/google/googletest/commit/1ced315a483f4ecac21893ce6ceeb502afb82eff)
    • Failures in SetUpTestSuite and TearDownTestSuite now cause tests to fail rather than log (https://github.com/google/googletest/commit/9ed99c6c837ae1cbfcabd36959fc802ebb5ae07f)
    • Uninstantiated TEST_P and TYPED_TEST_P now fail unless allowlisted using GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST (https://github.com/google/googletest/commit/d442089d53cecbba59b2d8f35d06eac01f1e46da, https://github.com/google/googletest/commit/a13a0626188b4e7d22d63a4c9fcfe9f441c81e4a, https://github.com/google/googletest/commit/0b024bd91a14a77a7e7d6072ccd88e09c86ddeaa, https://github.com/google/googletest/commit/3e79d366e380ec85b7de9409211b184bc8529655, https://github.com/google/googletest/commit/ec94d9f24c92a5090fda5567156d6dde99cdbf31)

    Output

    • Added specialized printing for std::any, std::optional, and std::variant (https://github.com/google/googletest/pull/2742)
    • Added recursive printing for std::unique_ptr and std::shared_ptr (https://github.com/google/googletest/commit/6b2e74905e9a7e70c7d1017ee0dfe5a8e88a1300)
    • Printing incomplete types is now supported (https://github.com/google/googletest/commit/f8304d762e0ed119d3d1c72deb1976dc80029db5)
    • Start timestamps in XML/JSON output now use millisecond precision (https://github.com/google/googletest/commit/af1e75ce0b3429d70790c049d8dbb0aae3e2480f)
    • Added more structured information about test suite to XML/JSON output on environment failures (https://github.com/google/googletest/commit/ac1d60c2b5ae62a06eca1d2c0f9d6dc92cda8711)

    Build & Test

    • CMake minimum increased to 2.8.12 (https://github.com/google/googletest/pull/3094)
    • GoogleTest is now using Kokoro CI instead of Travis and AppVeyor

    Misc

    • Removed support for GTEST_HAS_STD_STRING (https://github.com/google/googletest/pull/2456)
    • Replaced pump code generation with variadic templates (https://github.com/google/googletest/pull/2388, https://github.com/google/googletest/commit/d8eeb9760afcab45dbdd887c2b6d106887c1739d, https://github.com/google/googletest/commit/4b9c1691c4b7f01fbd9d37d86c88cdad298d48e9, https://github.com/google/googletest/commit/fbf67a70d07543f40832d0cd7a58f304bc6ab1d1, https://github.com/google/googletest/commit/41b5f149ab306e96b5b2faf523505d75acffd98a, https://github.com/google/googletest/commit/710f9c11ca79e578bb38d98d10ab9b70d41d5e07, https://github.com/google/googletest/commit/997c36c1881105bd7ce482a1ec93759badf64ce6, https://github.com/google/googletest/commit/59dea67b815a046122d77113d5c6df1df66076bb)
    Source code(tar.gz)
    Source code(zip)
  • release-1.10.0(Oct 3, 2019)

    Release 1.10.0 1.10.0 Release reflects a current version of the project. The 1.10.x will not consider any requests for any new features, The bug fix requests will only be considered if proven "critical"

    High Level Changes: This release deprecated "....TEST_CASE" API in favor of "....TEST_SUITE". In a nutshell if you have code that uses something like "INSTANTIATE_TYPED_TEST_CASE_P " - this and all other "*_TEST_CASE " are now deprecated in favor of more standard _TEST_SUITE. See https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature.

    There is also new powerful MOCK_METHOD macro. See https://github.com/google/googletest/blob/72adf7a4155b6642da1e6761678fe546590c0269/googlemock/docs/cook_book.md#creating-mock-classes. This replaces older way of mocking. For example (Old) MOCK_METHOD1(Bar, double(std::string s)); (New) MOCK_METHOD(double, Bar, (std::string s), (override)); So there is no need to count the parameters anymore.

    Source code(tar.gz)
    Source code(zip)
  • release-1.8.1(Aug 31, 2018)

    1.8.1 Release reflects a current version of the project. The 1.8.x is the last release supporting pre-C++11 compilers. The 1.8.x will not accept any requests for any new features and any bugfix requests will only be accepted if proven "critical"

    Source code(tar.gz)
    Source code(zip)
Owner
Google
Google ❤️ Open Source
Google
🧪 single header unit testing framework for C and C++

?? utest.h A simple one header solution to unit testing for C/C++. Usage Just #include "utest.h" in your code! The current supported platforms are Lin

Neil Henning 499 Aug 5, 2022
A unit testing framework for C

Check Table of Contents About Installing Linking Packaging About Check is a unit testing framework for C. It features a simple interface for defining

null 892 Jul 29, 2022
The fastest feature-rich C++11/14/17/20 single-header testing framework

master branch Windows All dev branch Windows All doctest is a new C++ testing framework but is by far the fastest both in compile times (by orders of

Viktor Kirilov 4.1k Aug 9, 2022
A testing micro framework for creating function test doubles

Fake Function Framework (fff) A Fake Function Framework for C Hello Fake World! Capturing Arguments Return Values Resetting a Fake Call History Defaul

Mike Long 499 Aug 3, 2022
Minimal unit testing framework for C

MinUnit Minunit is a minimal unit testing framework for C/C++ self-contained in a single header file. It provides a way to define and configure test s

David Siñuela Pastor 429 Aug 8, 2022
A lightweight unit testing framework for C++

Maintenance of UnitTest++, recently sporadic, is officially on hiatus until 26 November 2020. Subscribe to https://github.com/unittest-cpp/unittest-cp

UnitTest++ 503 Aug 5, 2022
UT: C++20 μ(micro)/Unit Testing Framework

"If you liked it then you "should have put a"_test on it", Beyonce rule [Boost::ext].UT / μt | Motivation | Quick Start | Overview | Tutorial | Exampl

boost::ext 888 Aug 7, 2022
Simple Unit Testing for C

Unity Test Copyright (c) 2007 - 2021 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams Welcome to the Unity Test Project, one of the

Throw The Switch 2.6k Aug 11, 2022
A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)

Catch2 v3 is being developed! You are on the devel branch, where the next major version, v3, of Catch2 is being developed. As it is a significant rewo

Catch Org 15.4k Aug 11, 2022
A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)

Catch2 v3 is being developed! You are on the devel branch, where the next major version, v3, of Catch2 is being developed. As it is a significant rewo

Catch Org 15.4k Aug 8, 2022
C++ Benchmark Authoring Library/Framework

Celero C++ Benchmarking Library Copyright 2017-2019 John Farrier Apache 2.0 License Community Support A Special Thanks to the following corporations f

John Farrier 711 Jul 29, 2022
A C++ micro-benchmarking framework

Nonius What is nonius? Nonius is an open-source framework for benchmarking small snippets of C++ code. It is very heavily inspired by Criterion, a sim

Nonius 334 Jun 27, 2022
test framework

Photesthesis This is a small, experimental parameterized-testing tool. It is intended to be used in concert with another unit-testing framework (eg. C

Graydon Hoare 11 Jun 2, 2021
A simple framework for compile-time benchmarks

Metabench A simple framework for compile-time microbenchmarks Overview Metabench is a single, self-contained CMake module making it easy to create com

Louis Dionne 162 Jul 8, 2022
DotX64Dbg aims to provide a seamless way to write and test plugins for X64Dbg using .Net 5.0 and C#.

DotX64Dbg (EARLY ALPHA) Plugins and Scripting with C# for x64Dbg. Create Plugins for X64Dbg with ease DotX64Dbg aims to provide a seamless way to writ

ζeh Matt 7 Jan 21, 2022
The world's first free and open-source PlayStation 3 emulator/debugger, written in C++ for Windows and Linux.

The world's first free and open-source PlayStation 3 emulator/debugger, written in C++ for Windows and Linux.

null 11.5k Aug 14, 2022
A simple C++ 03/11/etc timer class for ~microsecond-precision cross-platform benchmarking. The implementation is as limited and as simple as possible to create the lowest amount of overhead.

plf_nanotimer A simple C++ 03/11/etc timer class for ~microsecond-precision cross-platform benchmarking. The implementation is as limited and simple a

Matt Bentley 89 Jul 15, 2022
Anti-Debug and Anti-Memory Dump for Android

AntiDebugandMemoryDump Anti-Debug and Anti-Memory Dump for Android Some known techniques for anti-debug and anti-memory dump have been used in this pr

Darvin 165 Aug 5, 2022
An efficient OpenFST-based tool for calculating WER and aligning two transcript sequences.

fstalign Overview Installation Dependencies Build Docker Quickstart WER Subcommand Align Subcommand Inputs Outputs Overview fstalign is a tool for cre

Rev 104 Aug 1, 2022