Specs
Beautiful C++ Test Framework
Loading...
Searching...
No Matches
Specs

Beautiful C++ Test Framework

  • Syntax is simple and configurable
  • Supports Asynchronous tests
  • Supports runnings tests from shared libraries
  • Supports any C++ assertion library (e.g. snowhouse or libassert)

What?

Specs is a C++ test framework with simple syntax which supports async tests.

#define SPEC_GROUP My_Tests
#include <Specs.h>
Setup { /* Setup Code */ }
Teardown { /* Teardown Code */ }
Test("Some thing") {
assert_that(69 == 420);
AssertThat(69, Equals(420));
}
TestAsync("Slow thing") {
// Do something slow...
done();
}
#define Setup
Definition Setup.h:5
#define TestAsync(description)
Definition TestAsync.h:5
#define Teardown
Definition Teardown.h:5
#define Test(description)
Definition Test.h:5
#define assert_that(...)
Definition assert_that.h:5

Why?

  1. I enjoy authoring testing frameworks.
  2. I wanted very simple, readable syntax for tests.
  3. I wanted to use existing assertion libraries.
  4. I needed to write async tests.
  5. I needed to be able to load and run tests from shared libraries.

I'm proud of the result and I hope you enjoy using it!