Skip to content
/ mochapp Public

C++11 Header Only Testing Framework Inspired by Mocha

License

Notifications You must be signed in to change notification settings

twxs/mochapp

Repository files navigation

mochapp

Simple C++11 Header Only Test Framework Inspired by Mocha

Build Status

Usage :

#include <mochapp/mochapp.h>
using namspace mochapp;

int main(){
describe("#equals()", [] {
    it("Should failed", [] {
        Assert::equals(5, 4);
    });
    it("Should pass", [] {
        Assert::isTrue(true);
    });
});
return 0;
}

Will output :

  #equals()
    ✘ Should failed (0ms)
    ✔ Should pass (0ms)

Hooks

describe("Hooks", [] {
		
    before([] {
        // runs before all tests in this block
    });
    after([] { 
        // runs after all tests in this block
    });
    beforeEach([] { 
        // runs before each test in this block 
    });
    afterEach([] { 
        // runs after each test in this block
    });

    // test cases

});

Reporters

About

C++11 Header Only Testing Framework Inspired by Mocha

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published