mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
b68b609585
* Debug only wrapper class and funcions to perform some verifications only in debug build The best way to test the code is to create a proper tests. But tests just increase a probability that everithing works correct. To put more checks to runtime means sometimes a notable performance penalty. And there is a debug build for that reason. But writing a debug only code means to put here an there ugly macro conditions. Which make a code hard to read and fix. Function `debug_only::check` is a way to perform this kind of verification in a pure C++ style without macro magic. If you need to have some state for this checks use class `debug_only::Var`. This is a way to have a debug data and do verifications assosiated to it. * Add debug_only::verifyTrue for the simple boolean condition |
||
---|---|---|
.. | ||
tests | ||
CMakeLists.txt | ||
debug_only.h |