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) { |