This repository has been archived by the owner on Jun 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# specpp | ||
|
||
This is a small library to do BDD in C++ in a DSL:ish syntax. | ||
|
||
**this is not maintained** | ||
|
||
## Example | ||
|
||
```C++ | ||
struct char_helper | ||
{ | ||
char_helper(): | ||
str( "ABC 123 A93!" ) | ||
, credit( "0000 1111 2222 3333" ) | ||
, credit_error( "0000 1111 2222 QQQQ" ) | ||
{ | ||
} | ||
|
||
char* str; | ||
std::string credit; | ||
std::string credit_error; | ||
}; | ||
|
||
context("The string group (equal)", char_helper) | ||
{ | ||
specify("should have support for equality") | ||
{ | ||
actual( str ).string.should.equal( "ABC 123 A93!" ); | ||
} | ||
specify("should have support for not equal") | ||
{ | ||
actual( str ).string.should.not.equal( "X" ); | ||
} | ||
specify("should have support for equality operator") | ||
{ | ||
actual( str ).string.should == "ABC 123 A93!"; | ||
} | ||
specify("should have support for not equal operator") | ||
{ | ||
actual( str ).string.should != "X" ; | ||
} | ||
} | ||
``` |