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

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

Issue 8561031: Replace ScopedCommandLineOverride with TestSuite listener. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Last nit from Pawel. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 // Defines a basic test suite framework for running gtest based tests. You can 9 // Defines a basic test suite framework for running gtest based tests. You can
10 // instantiate this class in your main function and call its Run method to run 10 // instantiate this class in your main function and call its Run method to run
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 static bool ShouldIgnoreFailure(const testing::TestInfo& test); 43 static bool ShouldIgnoreFailure(const testing::TestInfo& test);
44 44
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();
54
53 int Run(); 55 int Run();
54 56
55 // 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
56 // process exit code. 58 // process exit code.
57 static const char kStrictFailureHandling[]; 59 static const char kStrictFailureHandling[];
58 60
59 protected: 61 protected:
60 // By default fatal log messages (e.g. from DCHECKs) result in error dialogs 62 // By default fatal log messages (e.g. from DCHECKs) result in error dialogs
61 // which gum up buildbots. Use a minimalistic assert handler which just 63 // which gum up buildbots. Use a minimalistic assert handler which just
62 // terminates the process. 64 // terminates the process.
(...skipping 15 matching lines...) Expand all
78 DISALLOW_COPY_AND_ASSIGN(TestSuite); 80 DISALLOW_COPY_AND_ASSIGN(TestSuite);
79 }; 81 };
80 82
81 } // namespace base 83 } // namespace base
82 84
83 // TODO(brettw) remove this. This is a temporary hack to allow WebKit to compile 85 // TODO(brettw) remove this. This is a temporary hack to allow WebKit to compile
84 // until we can update it to use "base::" (preventing a two-sided patch). 86 // until we can update it to use "base::" (preventing a two-sided patch).
85 using base::TestSuite; 87 using base::TestSuite;
86 88
87 #endif // BASE_TEST_TEST_SUITE_H_ 89 #endif // BASE_TEST_TEST_SUITE_H_
OLDNEW
« no previous file with comments | « no previous file | base/test/test_suite.cc » ('j') | chrome/common/extensions/extension_manifests_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698