Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: webrtc/base/unittest_main.cc

Issue 1429513004: Switch usage of _DEBUG macro to NDEBUG. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: REBASE Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/thread.cc ('k') | webrtc/base/win32socketserver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2007 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2007 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 // 10 //
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 webrtc::test::InitFieldTrialsFromString(FLAG_force_fieldtrials); 71 webrtc::test::InitFieldTrialsFromString(FLAG_force_fieldtrials);
72 72
73 #if defined(WEBRTC_WIN) 73 #if defined(WEBRTC_WIN)
74 if (!FLAG_default_error_handlers) { 74 if (!FLAG_default_error_handlers) {
75 // Make sure any errors don't throw dialogs hanging the test run. 75 // Make sure any errors don't throw dialogs hanging the test run.
76 _set_invalid_parameter_handler(TestInvalidParameterHandler); 76 _set_invalid_parameter_handler(TestInvalidParameterHandler);
77 _set_purecall_handler(TestPureCallHandler); 77 _set_purecall_handler(TestPureCallHandler);
78 _CrtSetReportHook2(_CRT_RPTHOOK_INSTALL, TestCrtReportHandler); 78 _CrtSetReportHook2(_CRT_RPTHOOK_INSTALL, TestCrtReportHandler);
79 } 79 }
80 80
81 #ifdef _DEBUG // Turn on memory leak checking on Windows. 81 #if !defined(NDEBUG) // Turn on memory leak checking on Windows.
82 _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF |_CRTDBG_LEAK_CHECK_DF); 82 _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF |_CRTDBG_LEAK_CHECK_DF);
83 if (FLAG_crt_break_alloc >= 0) { 83 if (FLAG_crt_break_alloc >= 0) {
84 _crtBreakAlloc = FLAG_crt_break_alloc; 84 _crtBreakAlloc = FLAG_crt_break_alloc;
85 } 85 }
86 #endif // _DEBUG 86 #endif
87 #endif // WEBRTC_WIN 87 #endif // WEBRTC_WIN
88 88
89 rtc::Filesystem::SetOrganizationName("google"); 89 rtc::Filesystem::SetOrganizationName("google");
90 rtc::Filesystem::SetApplicationName("unittest"); 90 rtc::Filesystem::SetApplicationName("unittest");
91 91
92 // By default, log timestamps. Allow overrides by used of a --log flag. 92 // By default, log timestamps. Allow overrides by used of a --log flag.
93 rtc::LogMessage::LogTimestamps(); 93 rtc::LogMessage::LogTimestamps();
94 if (*FLAG_log != '\0') { 94 if (*FLAG_log != '\0') {
95 rtc::LogMessage::ConfigureLogging(FLAG_log); 95 rtc::LogMessage::ConfigureLogging(FLAG_log);
96 } 96 }
(...skipping 10 matching lines...) Expand all
107 107
108 #if defined(WEBRTC_WIN) 108 #if defined(WEBRTC_WIN)
109 // Unhook crt function so that we don't ever log after statics have been 109 // Unhook crt function so that we don't ever log after statics have been
110 // uninitialized. 110 // uninitialized.
111 if (!FLAG_default_error_handlers) 111 if (!FLAG_default_error_handlers)
112 _CrtSetReportHook2(_CRT_RPTHOOK_REMOVE, TestCrtReportHandler); 112 _CrtSetReportHook2(_CRT_RPTHOOK_REMOVE, TestCrtReportHandler);
113 #endif 113 #endif
114 114
115 return res; 115 return res;
116 } 116 }
OLDNEW
« no previous file with comments | « webrtc/base/thread.cc ('k') | webrtc/base/win32socketserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698