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

Side by Side Diff: remoting/base/breakpad_win_unittest.cc

Issue 1216903002: clang/win: Build without -Wno-null-dereference. (Closed) Base URL: ssh://sammc-z620-l.syd/usr/local/google/home/sammc/chrome/src@clang
Patch Set: Created 5 years, 5 months 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 | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 ASSERT_TRUE(crash_server_->Start()); 137 ASSERT_TRUE(crash_server_->Start());
138 } 138 }
139 } 139 }
140 140
141 TEST_F(BreakpadWinDeathTest, TestAccessViolation) { 141 TEST_F(BreakpadWinDeathTest, TestAccessViolation) {
142 if (callbacks_.get()) { 142 if (callbacks_.get()) {
143 EXPECT_CALL(*callbacks_, OnClientDumpRequested()); 143 EXPECT_CALL(*callbacks_, OnClientDumpRequested());
144 } 144 }
145 145
146 // Generate access violation exception. 146 // Generate access violation exception.
147 ASSERT_DEATH(*reinterpret_cast<int*>(NULL) = 1, ""); 147 ASSERT_DEATH(*reinterpret_cast<volatile int*>(NULL) = 1, "");
148 } 148 }
149 149
150 TEST_F(BreakpadWinDeathTest, TestInvalidParameter) { 150 TEST_F(BreakpadWinDeathTest, TestInvalidParameter) {
151 if (callbacks_.get()) { 151 if (callbacks_.get()) {
152 EXPECT_CALL(*callbacks_, OnClientDumpRequested()); 152 EXPECT_CALL(*callbacks_, OnClientDumpRequested());
153 } 153 }
154 154
155 // Cause the invalid parameter callback to be called. 155 // Cause the invalid parameter callback to be called.
156 ASSERT_EXIT(printf(NULL), testing::ExitedWithCode(0), ""); 156 ASSERT_EXIT(printf(NULL), testing::ExitedWithCode(0), "");
157 } 157 }
158 158
159 TEST_F(BreakpadWinDeathTest, TestDebugbreak) { 159 TEST_F(BreakpadWinDeathTest, TestDebugbreak) {
160 if (callbacks_.get()) { 160 if (callbacks_.get()) {
161 EXPECT_CALL(*callbacks_, OnClientDumpRequested()); 161 EXPECT_CALL(*callbacks_, OnClientDumpRequested());
162 } 162 }
163 163
164 // See if __debugbreak() is intercepted. 164 // See if __debugbreak() is intercepted.
165 ASSERT_DEATH(__debugbreak(), ""); 165 ASSERT_DEATH(__debugbreak(), "");
166 } 166 }
167 167
168 } // namespace remoting 168 } // namespace remoting
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698