summaryrefslogtreecommitdiffstats
path: root/base/template_util_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/template_util_unittest.cc')
-rw-r--r--base/template_util_unittest.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/template_util_unittest.cc b/base/template_util_unittest.cc
index daf83b6..b330a01 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) {