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

Unified Diff: base/template_util_unittest.cc

Issue 8483003: Callback API Change: Reimplement Bind(); support IgnoreResult, full currying, and use less types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/template_util.h ('k') | build/nocompile.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/template_util_unittest.cc
diff --git a/base/template_util_unittest.cc b/base/template_util_unittest.cc
index daf83b6578fd0ae22c6a7d7a4d9f8117f4473667..b330a013f6f7ccc222a2be74c320a2559c05cec0 100644
--- a/base/template_util_unittest.cc
+++ b/base/template_util_unittest.cc
@@ -51,6 +51,12 @@ TEST(TemplateUtilTest, IsConvertible) {
EXPECT_TRUE( (is_convertible<int, double>::value) );
EXPECT_TRUE( (is_convertible<int*, void*>::value) );
EXPECT_FALSE( (is_convertible<void*, int*>::value) );
+
+ // Array types are an easy corner case. Make sure to test that
+ // it does indeed compile.
+ EXPECT_FALSE( (is_convertible<int[10], double>::value) );
+ EXPECT_FALSE( (is_convertible<double, int[10]>::value) );
+ EXPECT_TRUE( (is_convertible<int[10], int*>::value) );
}
TEST(TemplateUtilTest, IsSame) {
« no previous file with comments | « base/template_util.h ('k') | build/nocompile.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698