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

Unified Diff: base/template_util_unittest.cc

Issue 6537001: Fix is_convertible for windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Silly Type conversion warning. Created 9 years, 10 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/template_util.h ('k') | no next file » | 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 51d4d332162a928c92a0f60f8dbf849a77311b5c..ea5f0ff8a676675e8ddf4637860c05d7473806ac 100644
--- a/base/template_util_unittest.cc
+++ b/base/template_util_unittest.cc
@@ -37,10 +37,8 @@ TEST(TemplateUtilTest, IsNonConstReference) {
EXPECT_TRUE(is_non_const_reference<int&>::value);
}
-#if !defined(OS_WIN)
-// TODO(ajwong): Why is is_convertible disabled on windows?
TEST(TemplateUtilTest, IsConvertible) {
- // Extra parents needed to make EXPECT_*'s parsing happy. Otherwise,
+ // Extra parens needed to make EXPECT_*'s parsing happy. Otherwise,
// it sees the equivalent of
//
// EXPECT_TRUE( (is_convertible < Child), (Parent > ::value));
@@ -48,8 +46,12 @@ TEST(TemplateUtilTest, IsConvertible) {
// Silly C++.
EXPECT_TRUE( (is_convertible<Child, Parent>::value) );
EXPECT_FALSE( (is_convertible<Parent, Child>::value) );
+ EXPECT_FALSE( (is_convertible<Parent, AStruct>::value) );
+
+ EXPECT_TRUE( (is_convertible<int, double>::value) );
+ EXPECT_TRUE( (is_convertible<int*, void*>::value) );
+ EXPECT_FALSE( (is_convertible<void*, int*>::value) );
}
-#endif // !defined(OS_WIN)
TEST(TemplateUtilTest, IsClass) {
EXPECT_TRUE(is_class<AStruct>::value);
« no previous file with comments | « base/template_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698