-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Liftoff fix #57
Liftoff fix #57
Conversation
README.md
Outdated
|
||
### Setup tests | ||
Since header-only libraries are _not_ compiled, they require a compiled parent. This is done by using the [`#include`](https://github.com/mapbox/cpp/blob/master/glossary.md#include) keyword. We can use a compiled test file to use your new header, using [Catch](https://github.com/catchorg/Catch2) for assertions. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work starting to spell this out. The parent
metaphor is a good idea, but I'm getting snagged on it, since I think the header would make more sense to be the "parent" since the .cpp depends on it. How about: Since header-only libraries are _not_ normally compiled themselves, to test them you need to [
#include](https://github.com/mapbox/cpp/blob/master/glossary.md#include) them in a
.cpp(aka a [translation unit](https://github.com/mapbox/cpp/blob/master/glossary.md#translation-unit)) to compile and run their code. We recommend using [Catch](https://github.com/catchorg/Catch2) to make writing this
.cpp` file easy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks @springmeyer ! Just pushed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✊ @GretaCB
While double checking that this works, found a couple bugs. Related to mapbox/node-cpp-skel#87
Also adding more detailed docs for how to get started.
cc @mapbox/core-tech