spdlog VS Google Test

Compare spdlog vs Google Test and see what are their differences.

spdlog

Fast C++ logging library. (by gabime)

Google Test

GoogleTest - Google Testing and Mocking Framework (by google)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
spdlog Google Test
43 67
21,936 32,542
- 1.7%
8.7 8.3
5 days ago 4 days ago
C++ C++
MIT BSD 3-clause "New" or "Revised" 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.

spdlog

Posts with mentions or reviews of spdlog. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-13.

Google Test

Posts with mentions or reviews of Google Test. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-11.
  • Creating k-NN with C++ (from Scratch)
    6 projects | dev.to | 11 Jan 2024
    cmake_minimum_required(VERSION 3.5) project(knn_cpp CXX) include(FetchContent) FetchContent_Declare( googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG release-1.11.0 ) FetchContent_MakeAvailable(googletest) FetchContent_Declare(matplotplusplus GIT_REPOSITORY https://github.com/alandefreitas/matplotplusplus GIT_TAG origin/master) FetchContent_GetProperties(matplotplusplus) if(NOT matplotplusplus_POPULATED) FetchContent_Populate(matplotplusplus) add_subdirectory(${matplotplusplus_SOURCE_DIR} ${matplotplusplus_BINARY_DIR} EXCLUDE_FROM_ALL) endif() function(knn_cpp_test TEST_NAME TEST_SOURCE) add_executable(${TEST_NAME} ${TEST_SOURCE}) target_link_libraries(${TEST_NAME} PUBLIC matplot) aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/../lib LIB_SOURCES) target_link_libraries(${TEST_NAME} PRIVATE gtest gtest_main gmock gmock_main) target_include_directories(${TEST_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../) target_sources(${TEST_NAME} PRIVATE ${LIB_SOURCES} ) include(GoogleTest) gtest_discover_tests(${TEST_NAME}) endfunction() knn_cpp_test(LinearAlgebraTest la_test.cc) knn_cpp_test(KnnTest knn_test.cc) knn_cpp_test(UtilsTest utils_test.cc)
  • Starting with C
    2 projects | dev.to | 1 Jan 2024
    Okay, time to start unit tests!!! We will use Unity Test Framework to do unit testing. It is one of widely used testing frameworks alongside with Check, Google Test etc. Just downloading source code, and putting it to the project folder is enough to make it work (that is also why it is portable).
  • Automatically run tests, formatters & linters with CI!
    5 projects | dev.to | 15 Nov 2023
    Roy's project uses Google Test, a C++ testing framework. His testing setup is similar to mine as we both keep source files in one directory and tests in another. The key difference is that I can run the tests using the Visual Studios run button. It was fairly easy to write the new tests as there were existing ones that I could reference to check the syntax!
  • C++ Unit Testing Using Google Test - My Experience
    3 projects | dev.to | 12 Nov 2023
    One popular C++ Testing Framework is Google Test, and is what I ended up using.
    3 projects | dev.to | 12 Nov 2023
    The Google Test Documentation provides a primer for first-time users. The primer introduces some basic concepts and terminology, some of which I've been able to learn for this lab exercise.
  • Basic C++ Unit Testing with GTest, CMake, and Submodules
    2 projects | dev.to | 26 Sep 2023
    > git submodule add https://github.com/google/googletest.git > git submodule update --init --recursive
  • CI/CD pipelines for embedded
    2 projects | /r/embedded | 15 May 2023
    Not sure about CppUnit but I can speak to my previous experience using the googletest framework which compiles your tests to an executable, and since it's a very simple framework we were able to cross-compile and run directly on our device. We just had to hook up a device to the server that was running the CI so it could flash it when needed. That basically meant that our process was:
  • Basic CMake question regarding subdirectories
    2 projects | /r/cpp_questions | 19 Apr 2023
  • IDE for CPP(leetcode)
    4 projects | /r/cpp_questions | 3 Jan 2023
    However, you can use a unit test framework like GoogleTest or Catch2 whic creates a main() function for you which allows you to run single functions, as long as they have been created through some preprocessor macros. Then you can use a VS Code test adapter like this or this which may let you run a single test by right clicking it directly in VS Code.
  • New to C++
    2 projects | /r/cpp | 20 Dec 2022
    Make sure you write unit tests, I use gtest but catch2 is also good.

What are some alternatives?

When comparing spdlog and Google Test you can also consider the following projects:

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)

glog - C++ implementation of the Google logging module

Boost.Test - The reference C++ unit testing framework (TDD, xUnit, C++03/11/14/17)

Boost.Log - Boost Logging library

CppUTest - CppUTest unit testing and mocking framework for C/C++

CppUnit - C++ port of JUnit

easyloggingpp - C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.

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

G3log - G3log is an asynchronous, "crash safe", logger that is easy to use with default logging sinks or you can add your own. G3log is made with plain C++14 (C++11 support up to release 1.3.2) with no external libraries (except gtest used for unit tests). G3log is made to be cross-platform, currently running on OSX, Windows and several Linux distros. See Readme below for details of usage.

plog - Portable, simple and extensible C++ logging library

log4cplus - log4cplus is a simple to use C++ logging API providing thread-safe, flexible, and arbitrarily granular control over log management and configuration. It is modelled after the Java log4j API.

Unity Test API - Simple Unit Testing for C