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

Side by Side Diff: util/test/multiprocess.cc

Issue 635883002: Don’t use using directives (“using namespace”) in tests (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 2 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 | « util/test/mac/mach_multiprocess_test.cc ('k') | util/test/multiprocess_exec.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 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 15 matching lines...) Expand all
26 #include "base/memory/scoped_ptr.h" 26 #include "base/memory/scoped_ptr.h"
27 #include "base/posix/eintr_wrapper.h" 27 #include "base/posix/eintr_wrapper.h"
28 #include "base/strings/stringprintf.h" 28 #include "base/strings/stringprintf.h"
29 #include "gtest/gtest.h" 29 #include "gtest/gtest.h"
30 #include "util/misc/scoped_forbid_return.h" 30 #include "util/misc/scoped_forbid_return.h"
31 #include "util/test/errors.h" 31 #include "util/test/errors.h"
32 32
33 namespace crashpad { 33 namespace crashpad {
34 namespace test { 34 namespace test {
35 35
36 using namespace testing;
37
38 namespace internal { 36 namespace internal {
39 37
40 struct MultiprocessInfo { 38 struct MultiprocessInfo {
41 MultiprocessInfo() 39 MultiprocessInfo()
42 : pipe_c2p_read(-1), 40 : pipe_c2p_read(-1),
43 pipe_c2p_write(-1), 41 pipe_c2p_write(-1),
44 pipe_p2c_read(-1), 42 pipe_p2c_read(-1),
45 pipe_p2c_write(-1), 43 pipe_p2c_write(-1),
46 child_pid(0) {} 44 child_pid(0) {}
47 45
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 202
205 // The child uses the write end of c2p and the read end of p2c. 203 // The child uses the write end of c2p and the read end of p2c.
206 info_->pipe_c2p_read.reset(); 204 info_->pipe_c2p_read.reset();
207 info_->pipe_p2c_write.reset(); 205 info_->pipe_p2c_write.reset();
208 206
209 MultiprocessChild(); 207 MultiprocessChild();
210 208
211 info_->pipe_c2p_write.reset(); 209 info_->pipe_c2p_write.reset();
212 info_->pipe_p2c_read.reset(); 210 info_->pipe_p2c_read.reset();
213 211
214 if (Test::HasFailure()) { 212 if (testing::Test::HasFailure()) {
215 // Trigger the ScopedForbidReturn destructor. 213 // Trigger the ScopedForbidReturn destructor.
216 return; 214 return;
217 } 215 }
218 216
219 exit(0); 217 exit(0);
220 } 218 }
221 219
222 } // namespace test 220 } // namespace test
223 } // namespace crashpad 221 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/test/mac/mach_multiprocess_test.cc ('k') | util/test/multiprocess_exec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698