
Dean Michael Berris wrote:
I had been thinking about the syntax to which the BDD approach allows us:
int my_value = 0; //... value(my_value).should.equal(10); // will throw an exception value(my_value).should.not_equal(9); // will also throw an exception
char * my_pointer = NULL; //... pointer(my_pointer).should.be_null(); // will evaluate to true, or do nothing pointer(my_pointer).should.not_be_null(); // will throw an exception
What's the added value of the above when compared to: value_should_equal(my_value, 10); value_should_not_equal(my_value, 9); pointer_should_be_null(my_pointer); pointer_should_not_be_null(my_pointer); or maybe: should_equal(my_value, 10); should_not_equal(my_value, 9); should_be_null(my_pointer); should_not_be_null(my_pointer); ? -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/