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

Side by Side Diff: base/test/test_suite.h

Issue 10834010: Revert 144488 - For unit tests, track additions to AtExitManager and warn. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « base/at_exit.cc ('k') | base/test/test_suite.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 (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 #ifndef BASE_TEST_TEST_SUITE_H_ 5 #ifndef BASE_TEST_TEST_SUITE_H_
6 #define BASE_TEST_TEST_SUITE_H_ 6 #define BASE_TEST_TEST_SUITE_H_
7 7
8 // Defines a basic test suite framework for running gtest based tests. You can 8 // Defines a basic test suite framework for running gtest based tests. You can
9 // instantiate this class in your main function and call its Run method to run 9 // instantiate this class in your main function and call its Run method to run
10 // any gtest based tests that are linked into your executable. 10 // any gtest based tests that are linked into your executable.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Returns true if the test failed and the failure shouldn't be ignored. 45 // Returns true if the test failed and the failure shouldn't be ignored.
46 static bool NonIgnoredFailures(const testing::TestInfo& test); 46 static bool NonIgnoredFailures(const testing::TestInfo& test);
47 47
48 // Returns the number of tests where the match function returns true. 48 // Returns the number of tests where the match function returns true.
49 int GetTestCount(TestMatch test_match); 49 int GetTestCount(TestMatch test_match);
50 50
51 void CatchMaybeTests(); 51 void CatchMaybeTests();
52 52
53 void ResetCommandLine(); 53 void ResetCommandLine();
54 54
55 void WatchAtExitManager();
56
57 int Run(); 55 int Run();
58 56
59 // A command-line flag that makes a test failure always result in a non-zero 57 // A command-line flag that makes a test failure always result in a non-zero
60 // process exit code. 58 // process exit code.
61 static const char kStrictFailureHandling[]; 59 static const char kStrictFailureHandling[];
62 60
63 protected: 61 protected:
64 // This constructor is only accessible to specialized test suite 62 // This constructor is only accessible to specialized test suite
65 // implementations which need to control the creation of an AtExitManager 63 // implementations which need to control the creation of an AtExitManager
66 // instance for the duration of the test. 64 // instance for the duration of the test.
(...skipping 26 matching lines...) Expand all
93 DISALLOW_COPY_AND_ASSIGN(TestSuite); 91 DISALLOW_COPY_AND_ASSIGN(TestSuite);
94 }; 92 };
95 93
96 } // namespace base 94 } // namespace base
97 95
98 // TODO(brettw) remove this. This is a temporary hack to allow WebKit to compile 96 // TODO(brettw) remove this. This is a temporary hack to allow WebKit to compile
99 // until we can update it to use "base::" (preventing a two-sided patch). 97 // until we can update it to use "base::" (preventing a two-sided patch).
100 using base::TestSuite; 98 using base::TestSuite;
101 99
102 #endif // BASE_TEST_TEST_SUITE_H_ 100 #endif // BASE_TEST_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « base/at_exit.cc ('k') | base/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698