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

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

Issue 640383002: In tests, use ASSERT_NO_FATAL_FAILURE() (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.cc ('k') | util/test/multiprocess.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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 //! \brief Establishes the proper testing environment prior to forking. 87 //! \brief Establishes the proper testing environment prior to forking.
88 //! 88 //!
89 //! Subclasses that solely implement a test should not need to override this 89 //! Subclasses that solely implement a test should not need to override this
90 //! method. Subclasses that do not implement tests but instead implement 90 //! method. Subclasses that do not implement tests but instead implement
91 //! additional testing features on top of this class may override this method 91 //! additional testing features on top of this class may override this method
92 //! provided that they call the superclass’ implementation first as follows: 92 //! provided that they call the superclass’ implementation first as follows:
93 //! 93 //!
94 //! \code 94 //! \code
95 //! virtual void PreFork() override { 95 //! virtual void PreFork() override {
96 //! Multiprocess::PreFork(); 96 //! ASSERT_NO_FATAL_FAILURE(Multiprocess::PreFork());
97 //! if (testing::Test::HasFatalFailure()) {
98 //! return;
99 //! }
100 //! 97 //!
101 //! // Place subclass-specific pre-fork code here. 98 //! // Place subclass-specific pre-fork code here.
102 //! } 99 //! }
103 //! \endcode 100 //! \endcode
104 //! 101 //!
105 //! Subclass implementations may signal failure by raising their own fatal 102 //! Subclass implementations may signal failure by raising their own fatal
106 //! gtest assertions. 103 //! gtest assertions.
107 virtual void PreFork(); 104 virtual void PreFork();
108 105
109 //! \brief Returns the child process’ process ID. 106 //! \brief Returns the child process’ process ID.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 int code_; 182 int code_;
186 TerminationReason reason_; 183 TerminationReason reason_;
187 184
188 DISALLOW_COPY_AND_ASSIGN(Multiprocess); 185 DISALLOW_COPY_AND_ASSIGN(Multiprocess);
189 }; 186 };
190 187
191 } // namespace test 188 } // namespace test
192 } // namespace crashpad 189 } // namespace crashpad
193 190
194 #endif // CRASHPAD_UTIL_TEST_MULTIPROCESS_H_ 191 #endif // CRASHPAD_UTIL_TEST_MULTIPROCESS_H_
OLDNEW
« no previous file with comments | « util/test/mac/mach_multiprocess.cc ('k') | util/test/multiprocess.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698