Boost logo

Boost :

From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2006-09-15 00:35:13


Hi Kevin (and everyone else)!

Attached are `spec.hpp' which implements the inital supported BDD
terms (equal, not_equal, between(...)and(...) ).

On 9/15/06, Kevin Wheatley <hxpro_at_[hidden]> wrote:
>
> I think I agree that the should.equal() part may be better expressed
> at equals() (Law of Demeter style) but its context specific, so
> perhaps a wider interface is called for to improve the expressiveness.
>

I've been thinking about it, but unless I find a (better) way to be
able to offer different specifications based on different subjects:
there's value(...), object(...), pointer(...) then "should" will
remain. (Please see attached files)

Unless the following is possible:

template <typename _T>
struct value {
  explicit value(const _T & value) : _value(value) { };

  const _T & value;

  // ... implement equals(), does_not_equal(), etc. etc.
};

And be able to use `value' in the following use case:

int i = 0;
value(i).equals(0);

And leverage automatic type deduction for type parameters (which I'm
not sure is even possible)... I'm sticking with "should" for the
meantime. :D

>
> My end point would be that a BDD framework would be helpful if it
> could provide a wide enough set of expressions to allow the users to
> interact with the developers in an improved way.
>

I've attached the initial explorations (one header, and a test
implementation). Comments and insights will be most appreciated. :)

> [OT bit follows]
>
> As to the ghostly reference, it was for a visual effect for a film and
> the request came from an artist to a developer, in this case it was
> important that the two work directly to express the requirements and
> not have 2-3 layers of interpretation between them.
> "make it look ghostly" might be the name of a test suite or behavioral
> description suite/acceptance tests essentially a starting point for
> ubiquitous language.
>

Very interesting indeed. I would think BDD will be very useful in
these situations, especially for the developers and even non-technical
customers (who feel comfortable with english anyway).

-- 
Dean Michael C. Berris
C++ Software Architect
Orange and Bronze Software Labs, Ltd. Co.
web: http://software.orangeandbronze.com/
email: dean_at_[hidden]
mobile: +63 928 7291459
phone: +63 2 8943415
other: +1 408 4049532
blogs: http://mikhailberis.blogspot.com http://3w-agility.blogspot.com
http://cplusplus-soup.blogspot.com





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk