From b9a6d2af16c3f03537d305c309d80d83c7f6e6cc Mon Sep 17 00:00:00 2001 From: Itms Date: Mon, 15 Aug 2016 12:15:19 +0000 Subject: [PATCH] Use the debugger output on Windows for invalid parameter tests (see bd9bc6db78). This way, the test output is not polluted by the error messages when running in debug mode. This was SVN commit r18608. --- source/lib/tests/test_secure_crt.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/lib/tests/test_secure_crt.h b/source/lib/tests/test_secure_crt.h index fadf402272..76f612adfc 100644 --- a/source/lib/tests/test_secure_crt.h +++ b/source/lib/tests/test_secure_crt.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 Wildfire Games +/* Copyright (c) 2016 Wildfire Games * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -39,21 +39,18 @@ public: SuppressErrors() { // Redirect the assertion output to somewhere where it shouldn't be noticed - old_mode = _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); - old_file = _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); + old_mode = _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); // Replace the invalid parameter handler with one that ignores everything old_handler = _set_invalid_parameter_handler(&invalid_parameter_handler); } ~SuppressErrors() { _CrtSetReportMode(_CRT_ASSERT, old_mode); - _CrtSetReportFile(_CRT_ASSERT, old_file); _set_invalid_parameter_handler(old_handler); } private: int old_mode; - _HFILE old_file; _invalid_parameter_handler old_handler; static void invalid_parameter_handler(const wchar_t* UNUSED(expression), const wchar_t* UNUSED(function),