Skip to content

Commit bc14de3

Browse files
committed
Progress on tests and general code improvements
1 parent 0f94f93 commit bc14de3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

index.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ layout: default
33
profile: true
44
---
55

6-
C++Spec is a behavior-driven development library for C++ with an RSpec-inspired DSL. Designed with ease of use and rapid prototyping in mind, C++Spec offers an alternative to traditional testing libraries and frameworks. Some of the core concepts:
6+
C++Spec is a behavior-driven development library for C++ with an RSpec-inspired DSL. Designed with ease of use and rapid prototyping in mind, C++Spec offers an alternative to traditional testing libraries and frameworks. Some things that make C++Spec different than other testing libraries:
77

88
- A clean, readable syntax
99
- As few macros as possibles
1010
- Use as a library, not a framework
1111
- Easily extensible with custom matchers.
1212
- Support for the RSpec and Jasmine constructs you'd expect, such as describe, context, it, expect, and let.
1313
- Can automatically generate documentation strings based on your tests
14+
- Cross-platform with no need to change complex build settings.
15+
16+
1417

1518
## An example:
1619

@@ -42,17 +45,17 @@ int_list_spec("A list of ints", {1,2,3}, $ {
4245
4346
## Usage:
4447
45-
Download the [header file]() and put it in your project either alongside your tests or in a folder that is in your `INCLUDE` path. Then, simply `#include "cppspec.hpp"` and you're ready to go.
48+
Download the [header file]() and put it in your project either alongside your tests or in a folder that is in your `INCLUDE` path. Then, simply `#include "cppspec.hpp"` and you're ready to go. Both user and API documentation is available at the top of this page, and a tutorial will soon be available.
4649
4750
## How does it work?
4851
4952
C++Spec utilizes templated classes and functions as well as C++14 features in order to automatically deduce the types of your objects and construct your tests.
5053
5154
Lambdas are passed to functions (such as `context` and `it`) in order to build an execution tree at runtime. A formatter object visits each node when the tests are run and prints the status of the tests and any errors.
5255
53-
## I'm getting really long errors. What's going on?
56+
## I'm getting really long compiler errors. What's going on?
5457
55-
Due to how the library is constructed with both templates and auto-type lambdas, error messages from the compiler can be difficult to understand. Errors also tend to cascade and make the enclosing objects also fail, further obfuscating what's actually going wrong.
58+
Due to how the library is constructed with both templates and type-deduced (auto) lambdas, error messages from the compiler can be difficult to understand. Errors also tend to cascade and make the structures above the problem code also fail to compile, further obfuscating what's actually going wrong.
5659
5760
Usually, the only information you want is the actual error, not all of the template substitution notes. You can reduce the template backtrace by using the flag `-ftemplate-backtrace-limit=1` when compiling with GCC and Clang.
5861

0 commit comments

Comments
 (0)