catch2-with-gmock VS gtest_sample

Compare catch2-with-gmock vs gtest_sample and see what are their differences.

catch2-with-gmock

Exmaple of using Catch2 with GMock (by matepek)

gtest_sample

A very simple project using GTest (by changh95)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
catch2-with-gmock gtest_sample
1 1
13 8
- -
10.0 0.0
almost 4 years ago over 2 years ago
C++ CMake
MIT License -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

catch2-with-gmock

Posts with mentions or reviews of catch2-with-gmock. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-19.
  • Unit testing and mocking for c++
    6 projects | /r/cpp | 19 Oct 2021
    I'm answering a question asked not from me. I've used both Google.Test and Catch2 and latter one feels much nicer. Sections from Catch2 just do not exist in other frameworks however they are super powerful. It has drawbacks like not having out of the box macros for setting up stuff once for all the runs of a test before a test is run with various parameters. See https://github.com/catchorg/Catch2/issues/1602 Integrating gmock should be easy as I've seen but not flawless. As I remember some extra work needs to be done so expectations are verified at end of sections? See https://github.com/matepek/catch2-with-gmock Google.Test doesn't support (or at least didn't when I last looked) some combination of type and value generators. Other than that, the slightly uglier syntax and lack of sections (which is pretty big) it's all good. Especially with gmock all integrated and delivered to you in one package.

gtest_sample

Posts with mentions or reviews of gtest_sample. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-19.
  • Unit testing and mocking for c++
    6 projects | /r/cpp | 19 Oct 2021
    If you want to get started on GoogleTest fast, here’s a sample code that I made for a seminar. https://github.com/changh95/gtest_sample

What are some alternatives?

When comparing catch2-with-gmock and gtest_sample you can also consider the following projects:

FakeIt - C++ mocking made easy. A simple yet very expressive, headers only library for c++ mocking.

trompeloeil - Header only C++14 mocking framework

Catch - A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)

doctest - The fastest feature-rich C++11/14/17/20/23 single-header testing framework