Menu

Spec++ / News: Recent posts

Spec++ 0.0.7 Released

Version: 0.0.7 of Spec++

This release contains a new expectation API and many other changes.

The new expectation API uses a new syntax:

actual( v.empty() ).predicate.should.be_true();
actual( v.empty() ).predicate.should.not.be_true();

SPECPP_MAIN is now THEBC_SPECPP_MAIN, context is THEBC_CONTEXT and specify
is THEBC_SPECIFY. If you like the context and specify naming better I
recommend doing:
#define context THEBC_CONTEXT
#define specify THEBC_SPECIFY... read more

Posted by Fredrik 2007-06-03

Spec++ 0.0.5 Released

Spec++ is a framework for practicing Behavior Driven Development(BDD) in C++.

The example below demonstrates how a Spec++ specification could look like. In
this short example we are developing a stack container. Our mission is to test
it's behavior. We start by setting up a helper class (stack_helper) that are
going to contain setup, teardown, helper methods and objects needed to test the
behavior. We can now decide what context we are testing our behavior in "An
empty stack" is the context in our example. The next step is to specify the
behavior, "should not be empty after push". We can now do a push to our stack
and then write our expectation, value( stack.empty() ).should.be( false ).... read more

Posted by Fredrik 2007-02-27