Googletest - Google Testing and Mocking Framework

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!

Owner
Google
Google ❤️ Open Source
Google
Comments
  • 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).
  • 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.

  • 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

  • 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).

  • 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

  • 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

  • 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

  • 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

  • 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.
  • 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.

  • 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.

  • Mocking Cookbook: Capter

    Mocking Cookbook: Capter "Mocking Non-virtual Methods" is incomplete

    In chapter "Mocking Non-virtual Methods" of the Mocking Cookbook the paragraph before the last starts with "One way to do it is ..." and explains the first way. Then the chapter ends without mentioning any other way.

  • Dll unloading crashes in Windows

    Dll unloading crashes in Windows

    I am creating this issue to talk about this similar problem described in: https://github.com/google/googletest/issues/1516.

    I'm using windows 11 latest version, visual C++ compiler.

    I am working in a code that consumes gmock (gtest 1.12.1 stable) to mock functions/calls, and a different test framework (that is not gtest). The tests are bundled into dlls. The dlls are unloaded right after the tests are executed, and this is triggering a crash in gtest-port.cc line 618: BAD_INSTRUCTION_PTR_c0000005.

    We are consuming gtest using vcpkg in our repo, only stable releases are available, but we can use local patches to fix build issues. Unfortunately our team is not allowed to use the most recent commit of this project in our repo, so this issue might or may not be fixed yet.

    When the dlls are not unloaded as cited in the reported issue, the crashes do not happen.

    Is there any solution for this issue that does not involve keeping the dlls loaded?

    Thanks, Celso

  • GCC 11 enum class operator<< overload in a namespace doesn't work in INSTANTIATE_TEST_SUITE_P

    GCC 11 enum class operator<< overload in a namespace doesn't work in INSTANTIATE_TEST_SUITE_P

    Describe the bug

    See the code in the next section. It works well in Ubuntu 20.04 (GCC 9.4.0 and libgtest-dev from apt source), but it doesn't work on Ubuntu 22.04 (GCC 11.3.0 and libgtest-dev from the apt source).

    Steps to reproduce the bug

    #include <gtest/gtest.h>
    
    #include <iostream>
    
    namespace xyz {
    
    enum class Color
    {
        RED,
        GREEN
    };
    
    }  // namespace xyz
    
    std::ostream& operator<<(std::ostream& os, const xyz::Color& color);
    
    class ColorTest : public testing::TestWithParam<xyz::Color> {};
    
    TEST_P(ColorTest, test) {}
    
    INSTANTIATE_TEST_SUITE_P(Test, ColorTest, testing::Values(xyz::Color::RED, xyz::Color::GREEN));
    
    int main(int argc, char* argv[]) {
        testing::InitGoogleTest(&argc, argv);
        return RUN_ALL_TESTS();
    }
    
    std::ostream& operator<<(std::ostream& os, const xyz::Color& color) {
        return (os << (static_cast<int>(color) + 100));
    }
    

    Install g++ and libgtest-dev inside a ubuntu:22.04 docker container. Then compile the code above with:

    g++ main.cc  /usr/lib/x86_64-linux-gnu/libgtest.a -pthread
    

    Does the bug persist in the most recent commit?

    Not verified yet.

    What operating system and version are you using?

    The ubuntu:22.04 docker container.

    What compiler and version are you using?

    g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
    Copyright (C) 2021 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    What build system are you using?

    Additional context

    There are various workarounds.

    1. Removing the namespace.
    5,6d4
    < namespace xyz {
    <
    13,15c11
    < }  // namespace xyz
    <
    < std::ostream& operator<<(std::ostream& os, const xyz::Color& color);
    ---
    > std::ostream& operator<<(std::ostream& os, const Color& color);
    17c13
    < class ColorTest : public testing::TestWithParam<xyz::Color> {};
    ---
    > class ColorTest : public testing::TestWithParam<Color> {};
    21c17
    < INSTANTIATE_TEST_SUITE_P(Test, ColorTest, testing::Values(xyz::Color::RED, xyz::Color::GREEN));
    ---
    > INSTANTIATE_TEST_SUITE_P(Test, ColorTest, testing::Values(Color::RED, Color::GREEN));
    28c24
    < std::ostream& operator<<(std::ostream& os, const xyz::Color& color) {
    ---
    > std::ostream& operator<<(std::ostream& os, const Color& color) {
    
    1. Use enum instead of enum class
    7c7
    < enum class Color
    ---
    > enum Color
    
  • EXPECT_THAT with Throws invokes callable twice when exception is not thrown

    EXPECT_THAT with Throws invokes callable twice when exception is not thrown

    Describe the bug

    EXPECT_THAT macro with the Throws expectation invokes the callable twice when it does not throw an exception. This does not happen when the exception is thrown.

    This causes failures for stateful lambdas or lambdas with side effects.

    Steps to reproduce the bug

    Repro code:

    #include <exception>
    #include <iostream>
    #include <gmock/gmock.h>
    
    int main()
    {
        int state = 1;
        EXPECT_THAT(([&] { std::cout << "I am invoked " << state++ << '\n'; }),
            testing::Throws<std::exception>());
    }
    

    Outputs:

    I am invoked 1
    I am invoked 2
    ...
    

    Also see https://godbolt.org/z/WE44hn5Kc.

    Does the bug persist in the most recent commit?

    Yes.

    What operating system and version are you using?

    Does not matter. The issue happens on both Windows and Linux.

    What compiler and version are you using?

    MSVC 17.4.1, clang trunk.

  • weird warning with mingw-gcc-12

    weird warning with mingw-gcc-12

    Describe the bug

    [10/183] Building CXX object googlemock/CMakeFiles/gmock-matchers-misc_test.dir/test/gmock-matchers-misc_test.cc.obj
    In file included from D:/a/_temp/msys64/mingw64/include/c++/12.2.0/x86_64-w64-mingw32/bits/c++allocator.h:33,
                     from D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/allocator.h:46,
                     from D:/a/_temp/msys64/mingw64/include/c++/12.2.0/deque:61,
                     from D:/a/googletest/googletest/googlemock/test/gmock-matchers_test.h:42,
                     from D:/a/googletest/googletest/googlemock/test/gmock-matchers-misc_test.cc:42:
    In member function 'void std::__new_allocator<_Tp>::deallocate(_Tp*, size_type) [with _Tp = int]',
        inlined from 'static void std::allocator_traits<std::allocator<_Tp1> >::deallocate(allocator_type&, pointer, size_type) [with _Tp = int]' at D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/alloc_traits.h:496:23,
        inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_deallocate(pointer, std::size_t) [with _Tp = int; _Alloc = std::allocator<int>]' at D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/stl_vector.h:[38](https://github.com/lygstate/googletest/actions/runs/3543908093/jobs/5950757313#step:4:39)7:19,
        inlined from 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = int; _Alloc = std::allocator<int>]' at D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/stl_vector.h:366:15,
        inlined from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = int; _Alloc = std::allocator<int>]' at D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/stl_vector.h:733:7,
        inlined from 'testing::internal::ContainerEqMatcher<std::vector<int> >::~ContainerEqMatcher()' at D:/a/googletest/googletest/googlemock/include/gmock/gmock-matchers.h:2406:7,
        inlined from 'testing::PolymorphicMatcher<testing::internal::ContainerEqMatcher<typename std::remove_const<_Tp>::type> > testing::ContainerEq(const Container&) [with Container = std::vector<int>]' at D:/a/googletest/googletest/googlemock/include/gmock/gmock-matchers.h:4714:43,
        inlined from 'virtual void testing::gmock_matchers_test::{anonymous}::ContainerEqExtraTest_MultipleValuesMissing_Test::TestBody()' at D:/a/googletest/googletest/googlemock/test/gmock-matchers-misc_test.cc:283:45:
    D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/new_allocator.h:158:33: warning: 'void operator delete(void*, std::size_t)' called on pointer '<unknown>' with nonzero offset [4, 9223372036854775804] [-Wfree-nonheap-object]
      158 |         _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n));
          |                                 ^
    In member function '_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = int]',
        inlined from 'static _Tp* std::allocator_traits<std::allocator<_Tp1> >::allocate(allocator_type&, size_type) [with _Tp = int]' at D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/alloc_traits.h:464:28,
        inlined from 'std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = int; _Alloc = std::allocator<int>]' at D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/stl_vector.h:378:33,
        inlined from 'void std::_Vector_base<_Tp, _Alloc>::_M_create_storage(std::size_t) [with _Tp = int; _Alloc = std::allocator<int>]' at D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/stl_vector.h:[39](https://github.com/lygstate/googletest/actions/runs/3543908093/jobs/5950757313#step:4:40)5:44,
        inlined from 'std::_Vector_base<_Tp, _Alloc>::_Vector_base(std::size_t, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>]' at D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/stl_vector.h:332:26,
        inlined from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]' at D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/stl_vector.h:598:61,
        inlined from 'static testing::internal::StlContainerView<RawContainer>::type testing::internal::StlContainerView<RawContainer>::Copy(const RawContainer&) [with RawContainer = std::vector<int>]' at D:/a/googletest/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:337:60,
        inlined from 'testing::internal::ContainerEqMatcher<Container>::ContainerEqMatcher(const Container&) [with Container = std::vector<int>]' at D:/a/googletest/googletest/googlemock/include/gmock/gmock-matchers.h:2[42](https://github.com/lygstate/googletest/actions/runs/3543908093/jobs/5950757313#step:4:43)0:9,
        inlined from 'testing::PolymorphicMatcher<testing::internal::ContainerEqMatcher<typename std::remove_const<_Tp>::type> > testing::ContainerEq(const Container&) [with Container = std::vector<int>]' at D:/a/googletest/googletest/googlemock/include/gmock/gmock-matchers.h:4714:[43](https://github.com/lygstate/googletest/actions/runs/3543908093/jobs/5950757313#step:4:44),
        inlined from 'virtual void testing::gmock_matchers_test::{anonymous}::ContainerEqExtraTest_MultipleValuesMissing_Test::TestBody()' at D:/a/googletest/googletest/googlemock/test/gmock-matchers-misc_test.cc:283:[45](https://github.com/lygstate/googletest/actions/runs/3543908093/jobs/5950757313#step:4:46):
    D:/a/_temp/msys64/mingw64/include/c++/12.2.0/bits/new_allocator.h:137:[55](https://github.com/lygstate/googletest/actions/runs/3543908093/jobs/5950757313#step:4:56): note: returned from 'void* operator new(std::size_t)'
      137 |         return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
          |                                                       ^
    [11/183] Building CXX object googlemock/CMakeFiles/gmock-more-actions_test.dir/test/gmock-more-actions_test.cc.obj
    [12/183] Building CXX object googlemock/CMakeFiles/gmock-nice-strict_test.dir/test/gmock-nice-strict_test.cc.obj
    

    Steps to reproduce the bug

    https://github.com/lygstate/googletest/actions/runs/3543908093/jobs/5950757313

Related tags
xtest is a C++ testing framework inspired by googletest.
xtest is a C++ testing framework inspired by googletest.

xtest C++ testing framework inspired by googletest Explore the docs » Wiki · Report Bug · Request Feature Contents xtest Commence Prerequisites Ubuntu

Jul 9, 2022
Header only C++14 mocking framework
Header only C++14 mocking framework

Trompeloeil Get: trompe l'oeil noun (Concise Encyclopedia) Style of representation in which a painted object is intended to deceive the viewer into be

Nov 25, 2022
C++ Unit Testing Easier: A Header-only C++ unit testing framework

CUTE C++ Unit Testing Easier: A Header-only C++ unit testing framework usually available as part of the Cevelop C++ IDE (http://cevelop.com) Dependenc

Aug 31, 2022
The C Unit Testing Library on GitHub is a library designed for easy unit testing in C

The C Unit Testing Library on GitHub is a library designed for easy unit testing in C. It was written by Brennan Hurst for the purpose of providing a J-Unit-like testing framework within C for personal projects.

Oct 11, 2021
Modern c++17 unit testing framework on Microsoft Windows, Apple macOS, Linux, iOS and android.
Modern c++17 unit testing framework on Microsoft Windows, Apple macOS, Linux, iOS and android.

tunit Modern c++17 unit testing framework on Windows, macOS, Linux, iOS and android. Continuous Integration build status Operating system Status Windo

Apr 5, 2022
The fastest feature-rich C++11/14/17/20 single-header testing framework
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

Dec 1, 2022
C++ xUnit-like testing framework without macros

tst C++ testing framework. Installation, documentation, tutorials See WiKi. Features xUnit-like concepts minimal use of preprocessor macros declarativ

Sep 26, 2022
c++ testing framework

iutest iutest - iris unit test framework Welcome to the iutest iutest is framework for writing C++ tests. Features An XUnit test framework. Header onl

Sep 12, 2022
UT: C++20 μ(micro)/Unit Testing Framework
UT: C++20 μ(micro)/Unit Testing Framework

"If you liked it then you "should have put a"_test on it", Beyonce rule UT / μt | Motivation | Quick Start | Overview | Tutorial | Examples | User Gui

Dec 3, 2022
A complete unit testing framework in a header

liblittletest A complete unit testing framework in a header liblittletest is an easy to use all-in-an-header testing framework; all you have to do in

Nov 11, 2021
Simple C testing framework

MrTest Simple C testing framework Usage Copy the mrtest.c and mrtest.h file into your project. In order to use the mrtest main: create a .c file that

Jul 20, 2022
A minimal testing framework for C/C++
A minimal testing framework for C/C++

mtest About mtest is a minimal testing framework for C++. Requirements Windows or UNIX-like host A compiler supporting C++11 Usage To include mtest in

Jan 10, 2022
Kernel-mode C++ unit testing framework in BDD-style

There is a lack of unit testing frameworks that work in OS kernel. This library closes that gap and is targeted for windows driver developers.

Oct 19, 2022
The fastest feature-rich C++11/14/17/20 single-header testing framework
The fastest feature-rich C++11/14/17/20 single-header testing framework

master branch dev branch doctest is a new C++ testing framework but is by far the fastest both in compile times (by orders of magnitude) and runtime c

Dec 2, 2022
C++ Testing using spies and fakes for isolation and simulation
C++ Testing using spies and fakes for isolation and simulation

ELFspy is a library for linux for writing tests using fakes and spies in C++. For very large call graphs, the testing of the higher nodes can be diffi

Nov 22, 2022
Practical mutation testing tool for C and C++

Mull Mull is a tool for Mutation Testing based on LLVM/Clang with a strong focus on C and C++ languages. For installation and usage please refer to th

Dec 5, 2022
testing joystick under Linux environment, support monitoring disconnection state and auto recovery mode

qjoystick This qjoystick class is rewritten based on the library: https://github.com/drewnoakes/joystick. Please look at this library if you want to s

Oct 30, 2021
Header-only C++11 library for property-based testing.

autocheck Header-only C++11 library for QuickCheck (and later, SmallCheck) testing. Please consult the wiki for documentation. Install conan remote ad

Nov 20, 2022
proftest is a C application for testing the quality of different operating system APIs for profiling.

proftest is a C application for testing the quality of different operating system APIs for profiling.

Jul 23, 2021