mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-14 22:10:43 +00:00
Don't compile Catch2 into release builds
This commit is contained in:
Vendored
+18
-3
@@ -22,12 +22,15 @@
|
||||
* THE SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include "common/globalconfig.h"
|
||||
|
||||
#if ENABLED(ENABLE_UNIT_TESTS)
|
||||
|
||||
#define CATCH_CONFIG_RUNNER
|
||||
#define CATCH_CONFIG_NOSTDOUT
|
||||
#include "catch.hpp"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "serialise/serialiser.h"
|
||||
#include "strings/string_utils.h"
|
||||
#include "catch.hpp"
|
||||
|
||||
// since we force use of ToStr for everything and don't allow using catch's stringstream (so that
|
||||
// enums get forwarded to ToStr) we need to implement ToStr for one of Catch's structs.
|
||||
@@ -310,4 +313,16 @@ extern "C" RENDERDOC_API int RENDERDOC_CC RENDERDOC_RunUnitTests(const rdcstr &c
|
||||
// the return value to 255 prevents false negative when some multiple
|
||||
// of 256 tests has failed
|
||||
return (numFailed < 0xff ? numFailed : 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
extern "C" RENDERDOC_API int RENDERDOC_CC RENDERDOC_RunUnitTests(const rdcstr &command,
|
||||
const rdcarray<rdcstr> &args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // ENABLED(ENABLE_UNIT_TESTS)
|
||||
|
||||
Reference in New Issue
Block a user