https://github.com/ibob/doctest-lib
A CMake wrapper of https://github.com/doctest/doctest/ to make life easier
https://github.com/ibob/doctest-lib
Last synced: over 1 year ago
JSON representation
A CMake wrapper of https://github.com/doctest/doctest/ to make life easier
- Host: GitHub
- URL: https://github.com/ibob/doctest-lib
- Owner: iboB
- License: mit
- Created: 2020-10-28T13:30:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-26T02:50:00.000Z (about 3 years ago)
- Last Synced: 2025-02-14T14:55:57.110Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 96.7 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# doctest-lib
A wrapper of the awesome C++ unit-testing library **[doctest](https://github.com/doctest/doctest/)**.
It makes using the library as a submodule with CMake a bit easier.
It has a `CMakeLists.txt` which is supposed to be added by `add_subdirectory` and defines the following targets:
* `doctest::headers` or `doctest-headers` - a header-only interface library, in case you want to add the implementation in your own files
* `doctest::doctest` or `doctest` - a static library with no main function, in case you want to write your own
* `doctest::main` or `doctest-main` - a static library which defines a main function and is the common way of using doctest
To use doctest with this helper: `#include `
For the header-only use include the implementation with `#include `
With this you don't have to define your own file with a doctest implementation and it doesn't impose any compiler or linker settings whatsoever on the caller.
## Copying
The files in `doctest/parts` are copied from [doctest/doctest](https://github.com/doctest/doctest/) and are under the [MIT Software License](http://opensource.org/licenses/MIT). Copyright © 2016-2021 Viktor Kirilov
Everything else is simple boilerplate which I release in the public domain.