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

Overview

CppUTest

Build Status Build status Coverage Status ConanCenter package

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

More information on the project page

Slack channel: Join if link not expired

Getting Started

You'll need to do the following to get started:

Building from source (unix-based, cygwin, MacOSX):

  • git clone git://github.com/cpputest/cpputest.git
  • cd cpputest_build
  • autoreconf .. -i
  • ../configure
  • make

You can use make install if you want to install CppUTest system-wide

You can also use CMake, which also works for Windows Visual Studio.

  • Download latest version
  • cmake CMakeLists.txt
  • make

Then to get started, you'll need to do the following:

  • Add the include path to the Makefile. Something like:
    • CPPFLAGS += -I$(CPPUTEST_HOME)/include
  • Add the memory leak macros to your Makefile (needed for additional debug info!). Something like:
    • CXXFLAGS += -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorNewMacros.h
    • CFLAGS += -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorMallocMacros.h
  • Add the library linking to your Makefile. Something like:
    • LD_LIBRARIES = -L$(CPPUTEST_HOME)/lib -lCppUTest -lCppUTestExt

After this, you can write your first test:

TEST_GROUP(FirstTestGroup)
{
};

TEST(FirstTestGroup, FirstTest)
{
   FAIL("Fail me!");
}

Command line switches

  • -h help, shows the latest help, including the parameters we've implemented after updating this README page.
  • -v verbose, print each test name as it runs
  • -r# repeat the tests some number of times, default is one, default if # is not specified is 2. This is handy if you are experiencing memory leaks related to statics and caches.
  • -s# random shuffle the test execution order. # is an integer used for seeding the random number generator. # is optional, and if omitted, the seed value is chosen automatically, which results in a different order every time. The seed value is printed to console to make it possible to reproduce a previously generated execution order. Handy for detecting problems related to dependencies between tests.
  • -g group only run test whose group contains the substring group
  • -n name only run test whose name contains the substring name
  • -f crash on fail, run the tests as normal but, when a test fails, crash rather than report the failure in the normal way

Test Macros

  • TEST(group, name) - define a test
  • IGNORE_TEST(group, name) - turn off the execution of a test
  • TEST_GROUP(group) - Declare a test group to which certain tests belong. This will also create the link needed from another library.
  • TEST_GROUP_BASE(group, base) - Same as TEST_GROUP, just use a different base class than Utest
  • TEST_SETUP() - Declare a void setup method in a TEST_GROUP - this is the same as declaring void setup()
  • TEST_TEARDOWN() - Declare a void setup method in a TEST_GROUP
  • IMPORT_TEST_GROUP(group) - Export the name of a test group so it can be linked in from a library. Needs to be done in main.

Set up and tear down support

  • Each TEST_GROUP may contain a setup and/or a teardown method.
  • setup() is called prior to each TEST body and teardown() is called after the test body.

Assertion Macros

The failure of one of these macros causes the current test to immediately exit

  • CHECK(boolean condition) - checks any boolean result
  • CHECK_TRUE(boolean condition) - checks for true
  • CHECK_FALSE(boolean condition) - checks for false
  • CHECK_EQUAL(expected, actual) - checks for equality between entities using ==. So if you have a class that supports operator==() you can use this macro to compare two instances.
  • STRCMP_EQUAL(expected, actual) - check const char* strings for equality using strcmp
  • LONGS_EQUAL(expected, actual) - Compares two numbers
  • BYTES_EQUAL(expected, actual) - Compares two numbers, eight bits wide
  • POINTERS_EQUAL(expected, actual) - Compares two const void *
  • DOUBLES_EQUAL(expected, actual, tolerance) - Compares two doubles within some tolerance
  • ENUMS_EQUAL_INT(excepted, actual) - Compares two enums which their underlying type is int
  • ENUMS_EQUAL_TYPE(underlying_type, excepted, actual) - Compares two enums which they have the same underlying type
  • FAIL(text) - always fails
  • TEST_EXIT - Exit the test without failure - useful for contract testing (implementing an assert fake)

Customize CHECK_EQUAL to work with your types that support operator==()

  • Create the function: SimpleString StringFrom(const yourType&)

The Extensions directory has a few of these.

Building default checks with TestPlugin

  • CppUTest can support extra checking functionality by inserting TestPlugins
  • TestPlugin is derived from the TestPlugin class and can be inserted in the TestRegistry via the installPlugin method.
  • TestPlugins can be used for, for example, system stability and resource handling like files, memory or network connection clean-up.
  • In CppUTest, the memory leak detection is done via a default enabled TestPlugin

Example of a main with a TestPlugin:

int main(int ac, char** av)
{
   LogPlugin logPlugin;
   TestRegistry::getCurrentRegistry()->installPlugin(&logPlugin);
   int result = CommandLineTestRunner::RunAllTests(ac, av);
   TestRegistry::getCurrentRegistry()->resetPlugins();
   return result;
}

Memory leak detection

  • A platform specific memory leak detection mechanism is provided.
  • If a test fails and has allocated memory prior to the fail and that memory is not cleaned up by TearDown, a memory leak is reported. It is best to only chase memory leaks when other errors have been eliminated.
  • Some code uses lazy initialization and appears to leak when it really does not (for example: gcc stringstream used to in an earlier release). One cause is that some standard library calls allocate something and do not free it until after main (or never). To find out if a memory leak is due to lazy initialization set the -r switch to run tests twice. The signature of this situation is that the first run shows leaks and the second run shows no leaks. When both runs show leaks, you have a leak to find.

How is memory leak detection implemented?

  • Before setup() a memory usage checkpoint is recorded
  • After teardown() another checkpoint is taken and compared to the original checkpoint
  • In Visual Studio the MS debug heap capabilities are used
  • For GCC a simple new/delete count is used in overridden operators new, new[], delete and delete[]

If you use some leaky code that you can't or won't fix you can tell a TEST to ignore a certain number of leaks as in this example:

TEST(MemoryLeakWarningTest, Ignore1)
{
    EXPECT_N_LEAKS(1);
    char* arrayToLeak1 = new char[100];
}

Example Main

#include "CppUTest/CommandLineTestRunner.h"

int main(int ac, char** av)
{
  return RUN_ALL_TESTS(ac, av);
}

Example Test

#include "CppUTest/TestHarness.h"
#include "ClassName.h"

TEST_GROUP(ClassName)
{
  ClassName* className;

  void setup()
  {
    className = new ClassName();
  }
  void teardown()
  {
    delete className;
  }
};

TEST(ClassName, Create)
{
  CHECK(0 != className);
  CHECK(true);
  CHECK_EQUAL(1,1);
  LONGS_EQUAL(1,1);
  DOUBLES_EQUAL(1.000, 1.001, .01);
  STRCMP_EQUAL("hello", "hello");
  FAIL("The prior tests pass, but this one doesn't");
}

There are some scripts that are helpful in creating your initial h, cpp, and Test files. See scripts/README.TXT

Conan

CppUTest is available through conan-center.

conanfile.txt
[requires]
cpputest/4.0

[generators]
cmake_find_package
cmake_paths
CMake
find_package(CppUTest REQUIRED)

add_executable(example_test ExampleTest.cpp)

target_link_libraries(example_test PRIVATE
    CppUTest::CppUTest
    CppUTest::CppUTestExt)

Integration as external CMake project

Sometimes you want to use CppUTest in your project without installing it to your system or for having control over the version you are using. This little snippet get the wanted version from Github and builds it as a library.

# CppUTest
include(FetchContent)
FetchContent_Declare(
    CppUTest
    GIT_REPOSITORY https://github.com/cpputest/cpputest.git
    GIT_TAG        latest-passing-build # or use release tag, eg. v3.8
)
# Set this to ON if you want to have the CppUTests in your project as well.
set(TESTS OFF CACHE BOOL "Switch off CppUTest Test build")
FetchContent_MakeAvailable(CppUTest)

It can be used then like so:

add_executable(run_tests UnitTest1.cpp UnitTest2.cpp)
target_link_libraries(run_tests PRIVATE CppUTest CppUTestExt)
Issues
  • Possible bloating on MockFunctionCall interface

    Possible bloating on MockFunctionCall interface

    When i was implementing the new native type unsigned integer i noticed something a little odd on MockActualFunctionCall:

    MockFunctionCall& MockActualFunctionCall::andReturnValue(unsigned int)
    {
        FAIL("andReturnValue cannot be called on an ActualFunctionCall. Use returnValue instead to get the value.");
        return *this;
    }
    
    MockFunctionCall& MockActualFunctionCall::andReturnValue(int)
    {
        FAIL("andReturnValue cannot be called on an ActualFunctionCall. Use returnValue instead to get the value.");
        return *this;
    }
    
    MockFunctionCall& MockActualFunctionCall::andReturnValue(const char*)
    {
        FAIL("andReturnValue cannot be called on an ActualFunctionCall. Use returnValue instead to get the value.");
        return *this;
    }
    
    MockFunctionCall& MockActualFunctionCall::andReturnValue(double)
    {
        FAIL("andReturnValue cannot be called on an ActualFunctionCall. Use returnValue instead to get the value.");
        return *this;
    }
    
    MockFunctionCall& MockActualFunctionCall::andReturnValue(void*)
    {
        FAIL("andReturnValue cannot be called on an ActualFunctionCall. Use returnValue instead to get the value.");
        return *this;
    }
    

    It is a little odd to a object to implement a method only to fail since it cant implement the method, it seems that the MockFunctionCall has methods that does not belong only to a function call abstraction, but actually to a MockExpectedFunctionCall.

    Since on MockSupport we have different methods for actual and expected calls i dont get exactly why all the methods must be on the same interface. The concept of the interface is nice, but it seems to do more than it should (a case of interface segregation perhaps).

    The methods defined on MockFunctionCall that does no seem to belong there are:

    virtual MockFunctionCall& andReturnValue(int value)=0;
    virtual MockFunctionCall& andReturnValue(unsigned int value)=0;
    virtual MockFunctionCall& andReturnValue(double value)=0;
    virtual MockFunctionCall& andReturnValue(const char* value)=0;
    virtual MockFunctionCall& andReturnValue(void* value)=0;
    

    Is it the case of refactoring this on some way or im just missing the point ?

    opened by katcipis 81
  • How can we test one 16-bit system for CI?

    How can we test one 16-bit system for CI?

    Currently, I am still sort-of maintaining the TI C2000 compiler, which is a 16 bit compiler, every now and again. This will come to an end at some point, at the latest, when I don't have access to a license anymore.

    I noticed that, with this compiler, I tend to run into typical 16-bit platform related issues every now and again. These are not specifically related to the TI C2000 compiler, but would most likely occur on any 16 bit platform.

    My question here is whether we could setup either Travis CI or Appveryor (or use anything else that is open-source) to test CppU against a 16 bit platform, possibly using a simulator? Or would that be too much of an effort? Are there 16 bit users out there at all? Does it even make sense to run CppU on such a target / platform? For instance, due to memory limitations, I needed to divide up the CppU test base into four separate binaries.

    What are everybody's ideas on this? How relevant are 16 bit platforms for running CppU on?

    opened by arstrube 78
  • Output parameter support

    Output parameter support

    Initial support for output parameters.

    The implementation doesn't do any copying, it merely takes a value (primitive or pointer) and sets the output pointer to this value.

    Support is added to all Mock classes, including the C support.

    opened by abroekhuis 63
  • Any Plans To Make CppUTest 64 Bit Ready?

    Any Plans To Make CppUTest 64 Bit Ready?

    Just wondering, because I accidentally compiled it with a 64 bit compiler...

    It would be pretty easy to make the code 64 bit-ready, but considerably harder to maintain 32-bit compatibility at the same time...

    Example: You need StringFrom(size_t) (for 64 bit). You need StringFrom(uint32_t) (for Cpp library). This is considered a redeclaration by 32 bit compiler. You need unsigned long long etc. for 64 bit. 32 bit compiler (iso c98) does not know it. etc. etc.

    opened by arstrube 61
  • Why the tests output is not awesome anymore ?

    Why the tests output is not awesome anymore ?

    It was hard to think on a title to this issue :-). Basically i realized that two things changed on the output when i run the tests:

    1 - It says 2 tests have been run, it was much more awesome to see 2XX and 3XX tests running :-)

    2 - This is the saddest, when there is an error the old report would populate my vim quickfix list and i would jump to the first test that crashed (being able to use the quickfix list to navigate through all the failed tests). Now when the tests fail i get nothing :-(. Instead of a awesome quickfix list i get a file to open (tests-log or someting like that) to see what went wrong.

    I'm sorry if this is something that has already been debated, i tried to find something on the open issues about this, but had no success.

    opened by katcipis 57
  • Pending fixes for cl2k (Cl2000, c2000): C++ vs. C function pointer problem

    Pending fixes for cl2k (Cl2000, c2000): C++ vs. C function pointer problem

    Using a typedef inside the correct space (C or C++) is the only way to make a function pointer C-ish or Cpp-ish. It is also elegant and simple.

    I won't waste any more time on attempted hacks that invariably don't work.

    opened by arstrube 55
  • Using reference for output parameters reports double free

    Using reference for output parameters reports double free

    I got crazy by tracking down a double free issues with CPPUtest and I could narrow down the problem. The problem seems to come when I use a reference as an output parameter, it complains about double freeing the field in the referenced object. As always, an example is clearer than too many words:

    #include <string>
    
    #include <CppUTest/CommandLineTestRunner.h>
    #include <CppUTest/TestHarness.h>
    #include <CppUTestExt/MockSupport.h>
    
    //--------------------------------------------------------------------------------------------
    class MyReference
    {
    public:
        MyReference():
          m_name("Hello")
        {
        }
        ~MyReference(){}
    
    private:
        // If I remove this field, it works as expected
        std::string m_name; // Double freed!!!??
    };
    
    //--------------------------------------------------------------------------------------------
    class ReturnReference
    {
    public:
        ReturnReference(){}
        virtual ~ReturnReference(){}
    
        virtual bool returnReference(MyReference& ref)
        {
            ref = m_ref;
            return true;
        }
    private:
        MyReference m_ref;
    };
    
    //--------------------------------------------------------------------------------------------
    class ReturnReferenceMock:
            public ReturnReference
    {
    public:
        ReturnReferenceMock(){}
        ~ReturnReferenceMock(){}
    
        bool returnReference(MyReference& ref)
        {
            return mock().actualCall("returnReference").onObject(this).
                    withOutputParameter("ref", &ref).returnIntValue();
        }
    };
    
    //--------------------------------------------------------------------------------------------
    class UseReturnReference
    {
    public:
        UseReturnReference(ReturnReference* returnReference) :
            m_pReturnReference(returnReference)
        {
        }
    
        ~UseReturnReference()
        {
            delete m_pReturnReference;
        }
    
        void useReturnReference()
        {
            MyReference ref;
            m_pReturnReference->returnReference(ref);
        }
    
    private:
        ReturnReference* m_pReturnReference;
    };
    
    //--------------------------------------------------------------------------------------------
    TEST_GROUP(TestReferenceMock)
    {
    
        TEST_SETUP()
        {
            // XXX: Double free!
            //MemoryLeakWarningPlugin::turnOffNewDeleteOverloads();
        }
    
        TEST_TEARDOWN()
        {
            mock().clear();
            MemoryLeakWarningPlugin::turnOnNewDeleteOverloads();
        }
    };
    
    TEST(TestReferenceMock, willItFail)
    {
        ReturnReferenceMock* retRefMock = new ReturnReferenceMock();
        UseReturnReference useRef(retRefMock);
        MyReference* ref = new MyReference();
    
        mock().expectOneCall("returnReference").onObject(retRefMock).
                withOutputParameterReturning("ref", ref, sizeof(*ref)).
                andReturnValue(true);
    
        useRef.useReturnReference();
    
        mock().checkExpectations();
    
        // Not doing this reports a memory leak as expected!
        delete ref;
    }
    
    TEST(TestReferenceMock, willItFail2)
    {
        ReturnReferenceMock* retRefMock = new ReturnReferenceMock();
        UseReturnReference useRef(retRefMock);
        MyReference ref;
    
        mock().expectOneCall("returnReference").onObject(retRefMock).
                withOutputParameterReturning("ref", &ref, sizeof(ref)).
                andReturnValue(true);
    
        useRef.useReturnReference();
    
        mock().checkExpectations();
    }
    
    //--------------------------------------------------------------------------------------------
    int main(int argc, char* argv[])
    {
        // Run the tests
        return CommandLineTestRunner::RunAllTests(argc, argv);
    }
    
    

    The previous snippet reports the following error:

    main.cpp:112: error: Failure in TEST(TestReferenceMock, willItFail2)
    willItFail2:112: error:
        Deallocating non-allocated memory
       allocated at file: <unknown> line: 0 size: 0 type: unknown
       deallocated at file: <unknown> line: 0 type: delete
    
    
    .
    main.cpp:94: error: Failure in TEST(TestReferenceMock, willItFail)
    willItFail:94: error:
        Deallocating non-allocated memory
       allocated at file: <unknown> line: 0 size: 0 type: unknown
       deallocated at file: <unknown> line: 0 type: delete
    .
    Errors (2 failures, 2 tests, 2 ran, 6 checks, 0 ignored, 0 filtered out, 0 ms)
    

    This seems a bug in CPPUnit to me. However, the bug might probably come from a missuse of the library, but what am I doing wrong? Is it really possible to pass a reference as output parameter?

    opened by r4nd0m6uy 52
  • Alternate output parameters implementation

    Alternate output parameters implementation

    I based this off of the progress that @arstrube made. It is a little rough around the edges, but it copies the expected value to the output parameter only after the expected call has been selected (in MockCheckedActualCall::finalizeCallWhenFulfilled).

    It currently passes the tests that @arstrube wrote. More polish and more tests will be needed if this looks like a direction we want to go.

    opened by ryanplusplus 51
  • add support for long long integers as native types

    add support for long long integers as native types

    When testing code that needs to work on both 64-bit platforms and 32-bit platforms, the long integer may not guarantee 64bits of width on the 32-bit platform. This makes testing calls which take and return 64bit values difficult, as the test framework can't handle these natively.

    Add support for long long integers, so that test code can natively handle these larger values.

    Signed-off-by: Jacob Keller [email protected]

    opened by jacob-keller 50
  • Eclipse project reworked

    Eclipse project reworked

    1. Moved into a folder in platforms. This way, different Eclipse projects can be created per platform. This one is for Windows/Cygwin.
    2. Utilizes Eclipse C/C++ Unit test plugin. You can re-run selected tests, etc. like with JUnit.
    3. Build artifacts are put into cpputest_build folder.
    4. Before using the Eclipse project, you should
      • cd cpputest_build
      • autoreconf .. -i #if necessary
      • ../configure Works on my home and work machines, so I hope it will work for others.
    opened by arstrube 48
  • Issues encountered while building with VS2013 Express

    Issues encountered while building with VS2013 Express

    I built CppUTest with Visual Studio 2013, and ran into some issues. I managed to figure it out, so here is a summary in case you want to do changes in the sources or the documentation.

    • Cmake did not produce any makefiles, so the make (or nmake) wouldn't work as documented. What I did get was a solution (.sln) file and .vcxproj files. I can build those with msbuild from commandline or open them in the IDE.
    • The current build gives a warnings, and since warnings are treated as errors the build fails. All warnings are related of "unsafe" string functions:
    ..\Platforms\VisualCpp\UtestPlatform.cpp(123): warning C4996: 'strcpy': This
    function or variable may be unsafe. Consider using strcpy_s instead. To 
    disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    [C:\projects\cpputest\src\CppUTest\CppUTest.vcxproj]
    

    Since we are dealing with test code, and the *_s functions are MS specific I went for the disable option by adding the following to the CMakeList.txt file:

    if(MSVC)
        add_definitions(-D_CRT_SECURE_NO_WARNINGS)
    endif(MSVC)
    
    • There is no .lib files in the lib folder. Haven't figured out why yet.
    opened by emidttun 48
  • Remove `-Weverything` flag

    Remove `-Weverything` flag

    Since -Weverything enables every diagnostic, we generally don’t recommend using it. -Wall -Wextra are a better choice for most projects. Using -Weverything means that updating your compiler is more difficult because you’re exposed to experimental diagnostics which might be of lower quality than the default ones.

    https://clang.llvm.org/docs/UsersManual.html?highlight=weverything#diagnostics-enable-everything

    opened by thetic 0
  • Ignore apple clang warnings properly

    Ignore apple clang warnings properly

    Apple clang is different than normal clang for reasons. We need to ignore some stuff specifically for apple clang.

    I did some testing with https://github.com/sickcodes/Docker-OSX to figure out what versions of apple clang need what warnings surpressed.

    None of these warnings happen with normal clang.

    10.15: "Catalina"
     Apple clang version 11.0.3 (clang-1103.0.32.62)  Xcode_11.5
       No extra warning suppression required
     Apple clang version 12.0.0 (clang-1200.0.32.2)   Xcode_12
     Apple clang version 12.0.0 (clang-1200.0.32.27)  Xcode_12.2
     Apple clang version 12.0.0 (clang-1200.0.32.28)  Xcode_12.3
     Apple clang version 12.0.0 (clang-1200.0.32.29)  Xcode_12.4
       poison-system-directories
    11: "Big Sur"
     Apple clang version 12.0.5 (clang-1205.0.22.9)   Xcode_12.5
     Apple clang version 12.0.5 (clang-1205.0.22.11)  Xcode 12.5.1
       suggest-override
       suggest-destructor-override
       poison-system-directories
    12: "Monterey"
     Apple clang version 13.1.6 (clang-1316.0.21.2.5) Xcode ???
       suggest-override
       suggest-destructor-override
    

    I tested this change on all three versions of macos with one or two versions of clang and it worked fine on all of them.

    opened by mtfurlan 3
  • stop creating temp files that aren't cleaned up

    stop creating temp files that aren't cleaned up

    When I made 7fc2a5e18e5567df67a135d6a7fe6311f92a9660 I stored the return code from the test binary in a temp file and then deleted the temp file. But that temp file was created every time MakefileWorker.mk was sourced, not just when the targets were run.

    This commit changes it so the temp file is only created if the relevant targets are being run so it will always get deleted.

    opened by mtfurlan 2
Releases(latest-passing-build)
  • latest-passing-build(Apr 23, 2020)

  • v4.0(May 27, 2020)

    This release contains many small new features, such as:

    New functionality:

    • Added MemoryAccountant
    • Added SimpleStringCache that also removed the memory leak caused by longjmp in C
    • Thread-safe memory leak detector overloads
    • New command-line options:
      • -h help option
      • -s shuffle (random) option
      • -t run a specific test option
      • -vv extra verbose option
      • -k add a package name to junit output
    • Added new asserts: CHECK_COMPARE, and improved C macros
    • Support for newer compilers and address sanitizer

    Small improvements:

    • Fixed problems with gdb
    • More 16-bit support
    • Added Makefile for making the examples with an installed CppUTest
    • Small mock improvements
    • Removed more compiler warnings
    • Support for C++14, C++17, and C++2x (added to automated build)

    Improved maintainability:

    • Docker builds
    • Vastly improved the automated build with more platforms and variants
    • Continuously releasing the passing build
    • MS-DOS support (added to automated build)
    Source code(tar.gz)
    Source code(zip)
    cpputest-4.0.tar.gz(1.10 MB)
    cpputest-4.0.zip(1.72 MB)
  • v3.8(May 25, 2016)

  • 3.7.2(May 10, 2015)

  • v3.7.1(May 4, 2015)

  • v3.7(May 1, 2015)

  • v3.6(Jul 11, 2014)

🧪 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
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
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
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