// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved. #if PLATFORM_WINDOWS #ifdef USE_VLD_MEM_LEAKS_CHECK #include #endif #ifdef USE_VS_MEM_LEAKS_CHECK #define _CRTDBG_MAP_ALLOC #include #include #else #include #endif #define CATCH_CONFIG_RUNNER #include int main(int argc, char* argv[]) { #ifdef USE_VS_MEM_LEAKS_CHECK // Memory leaks detect inside VS int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); flag |= _CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF; _CrtSetDbgFlag(flag); #endif #ifdef USE_VLD_MEM_LEAKS_CHECK VLDGlobalEnable(); #endif int result = Catch::Session().run(argc, argv); return result; } #endif