|
Boost : |
From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2006-09-15 11:30:47
"Dean Michael Berris" <mikhailberis_at_[hidden]> writes:
> Hi Dave!
>
> On 9/14/06, David Abrahams <dave_at_[hidden]> wrote:
>>
>> Watching the video about 25% through, so far I don't get what he's
>> talking about or why BDD is different from what I do anyway or how it
>> can benefit me.
>>
>
> It's really just a "clarification" of Test Driven Development. The
> gist is as follows:
J.B. Rainsberger sums it up:
http://www.jbrains.ca/postings/read/38
Fundamentally, Behaviour-driven development is Test-driven development
practiced correctly, though frameworks tend to have different naming
conventions.
As JB points out, the wording is key --- some people associate specific
meanings with the word "test", which aren't what TDD is about, and using
"behaviour specification" instead gets around that.
I have experimented with various syntaxes in C++, such as
CHECK(some_value, must_be > 2 and must_be < 42);
CHECK(some_container, must_contain(3));
In the end, I've always come back to our trusty friend: ASSERT.
ASSERT_GREATER_THAN(some_value,2);
ASSERT_LESS_THAN(some_value,42);
ASSERT_NOT_EQUALS(std::count(some_container.begin(),some_container.end(),3),0);
Anthony
-- Anthony Williams Software Developer Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk