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

Side by Side Diff: base/gtest_prod_util.h

Issue 9350051: Removing unneeded macro (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years, 10 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 | « no previous file | chrome/browser/ui/webui/print_preview/sticky_settings.h » ('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_GTEST_PROD_UTIL_H_ 5 #ifndef BASE_GTEST_PROD_UTIL_H_
6 #define BASE_GTEST_PROD_UTIL_H_ 6 #define BASE_GTEST_PROD_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "testing/gtest/include/gtest/gtest_prod.h" 9 #include "testing/gtest/include/gtest/gtest_prod.h"
10 10
(...skipping 23 matching lines...) Expand all
34 // bool private_var; 34 // bool private_var;
35 // }; 35 // };
36 // } // namespace foo 36 // } // namespace foo
37 // 37 //
38 // class MyClassTest::TestMethod() { 38 // class MyClassTest::TestMethod() {
39 // foo::MyClass foo_class; 39 // foo::MyClass foo_class;
40 // foo_class.private_var = true; 40 // foo_class.private_var = true;
41 // } 41 // }
42 // 42 //
43 // Unless you forward declare MyClassTest::TestMethod outside of namespace foo. 43 // Unless you forward declare MyClassTest::TestMethod outside of namespace foo.
44 // Use FORWARD_DECLARE_TEST_ALL_PREFIXES to do so for all possible prefixes. 44 // Use FORWARD_DECLARE_TEST to do so for all possible prefixes.
45 // 45 //
46 // Example usage: 46 // Example usage:
47 // 47 //
48 // FORWARD_DECLARE_TEST_ALL_PREFIXES(MyClassTest, TestMethod); 48 // FORWARD_DECLARE_TEST(MyClassTest, TestMethod);
49 // 49 //
50 // namespace foo { 50 // namespace foo {
51 // class MyClass { 51 // class MyClass {
52 // private: 52 // private:
53 // FRIEND_TEST_ALL_PREFIXES(::MyClassTest, TestMethod); // NOTE use of :: 53 // FRIEND_TEST_ALL_PREFIXES(::MyClassTest, TestMethod); // NOTE use of ::
54 // bool private_var; 54 // bool private_var;
55 // }; 55 // };
56 // } // namespace foo 56 // } // namespace foo
57 // 57 //
58 // class MyClassTest::TestMethod() { 58 // class MyClassTest::TestMethod() {
59 // foo::MyClass foo_class; 59 // foo::MyClass foo_class;
60 // foo_class.private_var = true; 60 // foo_class.private_var = true;
61 // } 61 // }
62 62
63 #define FORWARD_DECLARE_TEST(test_case_name, test_name) \ 63 #define FORWARD_DECLARE_TEST(test_case_name, test_name) \
64 class test_case_name##_##test_name##_Test\ 64 class test_case_name##_##test_name##_Test; \
65 65 class test_case_name##_##DISABLED_##test_name##_Test; \
66 #define FORWARD_DECLARE_TEST_ALL_PREFIXES(test_case_name, test_name) \ 66 class test_case_name##_##FLAKY_##test_name##_Test; \
67 FORWARD_DECLARE_TEST(test_case_name, test_name); \ 67 class test_case_name##_##FAILS_##test_name##_Test
68 FORWARD_DECLARE_TEST(test_case_name, DISABLED_##test_name); \
69 FORWARD_DECLARE_TEST(test_case_name, FLAKY_##test_name); \
70 FORWARD_DECLARE_TEST(test_case_name, FAILS_##test_name)
71 68
72 #endif // BASE_GTEST_PROD_UTIL_H_ 69 #endif // BASE_GTEST_PROD_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/sticky_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698