Comments (7)
my guess is that DEBUG
(see here) isn't defined when xcode is used as the generator - a friend already told me about this - I hadn't tested it - will fix. This was taken directly from Catch so I supposed it would work for OSX...
from doctest.
Actually I was using the make generator : just type cmake then make
Hope this helps
from doctest.
Same issue if I write cmake -DCMAKE_BUILD_TYPE=Debug or Release
from doctest.
If I define DEBUG it will work.
However, my guess is that cmake defines NDEBUG for release builds, and nothing for debug builds (which is unfortunate). May be this should go in the readme.
See http://stackoverflow.com/questions/8591762/ifdef-debug-with-cmake-independent-from-platform
from doctest.
Hmm, "NDEBUG" should be defined for non-debug builds under clang and gcc if remember correctly.
from doctest.
Wrapping DOCTEST_BREAK_INTO_DEBUGGER
in a #ifdef DEBUG
is really unnecessary, since the extra code generated when defined is very small, while not defining it makes it a pain to use. People do run optimized code under debuggers. In other words, this is but a useless premature optimization. Yes, Catch does it, and that is equally pointless.
from doctest.
In fact, the DEBUG
guard is only present for OS X targets, but not Windows and Linux targets. An inconsistent design.
from doctest.
Related Issues (20)
- compiling with fastmath std::isnan(value)^flipped always evaluates to false
- Doctest segfault with CHECK in implement w/o main HOT 1
- Compilation error on minimal function taking and returning std::vector<std::pair<int, int>> HOT 3
- Abort execution of a subcase without halting the entire test case
- Request: Control via environment variables
- Suggestion: document a simpler CMake integration via FetchContent HOT 2
- Tests fail to compile: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage], etc HOT 2
- Warning from new CMake HOT 3
- Add DISCOVERY_MODE to doctest_discover_tests
- doctest outputs ANSI escapes to non-color TTYs, resulting in visible junk HOT 1
- Build error "error: zero as null pointer constant” (Xcode 15)
- doctest_discover_tests fails with ASAN on Windows HOT 1
- how to use with c++20 modules
- Add an "AND_GIVEN" macro for BDD-style test cases
- CodeQL warning in doctest header (use after free)
- Missing support for std::format HOT 1
- When one subcase fails, other independent sibling subcases are not executed anymore HOT 2
- Cannot include `doctest.h` in multiple translation units for Arduino (avr-gcc-7.3.0) HOT 1
- Feature request: predicate on CHECK_THROWS
- TYPE_TO_STRING does not work inside a TEST_SUITE / namespace HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctest.