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

Side by Side Diff: base/memory/weak_ptr_unittest.nc

Issue 1514573005: Fix nocompile base_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« base/memory/scoped_ptr.h ('K') | « base/memory/scoped_ptr_unittest.nc ('k') | no next file » | 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 // This is a "No Compile Test" suite. 5 // This is a "No Compile Test" suite.
6 // http://dev.chromium.org/developers/testing/no-compile-tests 6 // http://dev.chromium.org/developers/testing/no-compile-tests
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 9
10 namespace base { 10 namespace base {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 WeakPtr<Unrelated> ptr = AsWeakPtr(&f); 108 WeakPtr<Unrelated> ptr = AsWeakPtr(&f);
109 } 109 }
110 110
111 #elif defined(NCTEST_UNRELATED_INSTANTIATED_HELPER) // [r"no matching function" ] 111 #elif defined(NCTEST_UNRELATED_INSTANTIATED_HELPER) // [r"no matching function" ]
112 112
113 void WontCompile() { 113 void WontCompile() {
114 DerivedProducer f; 114 DerivedProducer f;
115 WeakPtr<Unrelated> ptr = AsWeakPtr<Unrelated>(&f); 115 WeakPtr<Unrelated> ptr = AsWeakPtr<Unrelated>(&f);
116 } 116 }
117 117
118 #elif defined(NCTEST_COMPLETELY_UNRELATED_HELPER) // [r"fatal error: static_ass ert failed \"AsWeakPtr_argument_inherits_from_SupportsWeakPtr\""] 118 #elif defined(NCTEST_COMPLETELY_UNRELATED_HELPER) // [r"fatal error: static_ass ert failed \"AsWeakPtr argument must inherit from SupportsWeakPtr\""]
119 119
120 void WontCompile() { 120 void WontCompile() {
121 Unrelated f; 121 Unrelated f;
122 WeakPtr<Unrelated> ptr = AsWeakPtr(&f); 122 WeakPtr<Unrelated> ptr = AsWeakPtr(&f);
123 } 123 }
124 124
125 #elif defined(NCTEST_DERIVED_COMPLETELY_UNRELATED_HELPER) // [r"fatal error: st atic_assert failed \"AsWeakPtr_argument_inherits_from_SupportsWeakPtr\""] 125 #elif defined(NCTEST_DERIVED_COMPLETELY_UNRELATED_HELPER) // [r"fatal error: st atic_assert failed \"AsWeakPtr argument must inherit from SupportsWeakPtr\""]
126 126
127 void WontCompile() { 127 void WontCompile() {
128 DerivedUnrelated f; 128 DerivedUnrelated f;
129 WeakPtr<Unrelated> ptr = AsWeakPtr(&f); 129 WeakPtr<Unrelated> ptr = AsWeakPtr(&f);
130 } 130 }
131 131
132 #elif defined(NCTEST_AMBIGUOUS_ANCESTORS) // [r"fatal error: ambiguous conversi on from derived class 'base::MultiplyDerivedProducer' to base class 'base::inter nal::SupportsWeakPtrBase':"] 132 #elif defined(NCTEST_AMBIGUOUS_ANCESTORS) // [r"fatal error: ambiguous conversi on from derived class 'base::MultiplyDerivedProducer' to base class 'base::inter nal::SupportsWeakPtrBase':"]
133 133
134 void WontCompile() { 134 void WontCompile() {
135 MultiplyDerivedProducer f; 135 MultiplyDerivedProducer f;
136 WeakPtr<MultiplyDerivedProducer> ptr = AsWeakPtr(&f); 136 WeakPtr<MultiplyDerivedProducer> ptr = AsWeakPtr(&f);
137 } 137 }
138 138
139 #endif 139 #endif
140 140
141 } 141 }
OLDNEW
« base/memory/scoped_ptr.h ('K') | « base/memory/scoped_ptr_unittest.nc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698