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

Unified Diff: base/callback_unittest.nc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/callback_unittest.cc ('k') | base/cancelable_callback.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback_unittest.nc
diff --git a/base/callback_unittest.nc b/base/callback_unittest.nc
deleted file mode 100644
index e7607d98e7d0a4ed86a05ef4981877597874a87a..0000000000000000000000000000000000000000
--- a/base/callback_unittest.nc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/callback.h"
-
-namespace base {
-
-class Parent {
-};
-
-class Child : Parent {
-};
-
-#if defined(NCTEST_EQUALS_REQUIRES_SAMETYPE) // [r"fatal error: no viable conversion from 'Callback<int \(\)>' to 'const Callback<void \(\)>'"]
-
-// Attempting to call comparison function on two callbacks of different type.
-//
-// This should be a compile time failure because each callback type should be
-// considered distinct.
-void WontCompile() {
- Closure c1;
- Callback<int(void)> c2;
- c1.Equals(c2);
-}
-
-#elif defined(NCTEST_CONSTRUCTION_FROM_SUBTYPE) // [r"fatal error: no viable conversion from 'Callback<base::Parent \(\)>' to 'Callback<base::Child \(\)>'"]
-
-// Construction of Callback<A> from Callback<B> if A is supertype of B.
-//
-// While this is technically safe, most people aren't used to it when coding
-// C++ so if this is happening, it is almost certainly an error.
-void WontCompile() {
- Callback<Parent(void)> cb_a;
- Callback<Child(void)> cb_b = cb_a;
-}
-
-#elif defined(NCTEST_ASSIGNMENT_FROM_SUBTYPE) // [r"fatal error: no viable overloaded '='"]
-
-// Assignment of Callback<A> from Callback<B> if A is supertype of B.
-// See explanation for NCTEST_CONSTRUCTION_FROM_SUBTYPE
-void WontCompile() {
- Callback<Parent(void)> cb_a;
- Callback<Child(void)> cb_b;
- cb_a = cb_b;
-}
-
-#endif
-
-} // namespace base
« no previous file with comments | « base/callback_unittest.cc ('k') | base/cancelable_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698