stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r682512 - in /stdcxx/trunk/tests/utilities: 20.meta.rel.cpp 20.meta.trans.other.cpp 20.meta.unary.prop.cpp
Date Mon, 04 Aug 2008 21:26:00 GMT
Author: vitek
Date: Mon Aug  4 14:26:00 2008
New Revision: 682512

URL: http://svn.apache.org/viewvc?rev=682512&view=rev
Log:
2008-08-04  Travis Vitek  <vitek@roguewave.com>

	Merge r676102 and r679158 from branches/4.3.x


	2008-07-11  Travis Vitek  <vitek@roguewave.com>

	STDCXX-916
	* tests/utilities/20.meta.trans.other.cpp (_cond_if_char): Change
	linkage so that function is found when instantiating cond_if_char.
	* tests/utilities/20.meta.unary.prop.cpp: Add constructor to type
	member_t.
	[_RWSTD_NO_LONG_LONG]: Guard code using long long to avoid compile
	error when type is not supported.


	2008-07-23  Travis Vitek  <vitek@roguewave.com>

	* tests/utilities/20.meta.rel.cpp (test_is_same): Add cv-qual
	testing.
	(test_is_base_of): Ditto.
	(test_is_convertible) [_MSC_VER]: Work around msvc extension
	that allows conversion from function pointer to void pointer.

Modified:
    stdcxx/trunk/tests/utilities/20.meta.rel.cpp
    stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp
    stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp

Modified: stdcxx/trunk/tests/utilities/20.meta.rel.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.meta.rel.cpp?rev=682512&r1=682511&r2=682512&view=diff
==============================================================================
--- stdcxx/trunk/tests/utilities/20.meta.rel.cpp (original)
+++ stdcxx/trunk/tests/utilities/20.meta.rel.cpp Mon Aug  4 14:26:00 2008
@@ -150,6 +150,15 @@
     TEST (std::is_same, signed long, unsigned long, false);
     TEST (std::is_same, unsigned long, signed long, false);
 
+    TEST (std::is_same, long, const long, false);
+    TEST (std::is_same, const long, long, false);
+
+    TEST (std::is_same, long, volatile long, false);
+    TEST (std::is_same, volatile long, long, false);
+
+    TEST (std::is_same, long, const volatile long, false);
+    TEST (std::is_same, const volatile long, long, false);
+
     TEST (std::is_same, enum_A, char, false);
     TEST (std::is_same, enum_A, short, false);
     TEST (std::is_same, enum_A, int, false);
@@ -224,6 +233,21 @@
     TEST (std::is_base_of, struct_A, derived_private_t<struct_A>, true);
 #endif
 
+    // cv-qualified
+    TEST (std::is_base_of, const struct_A, struct_A, true);
+    TEST (std::is_base_of, struct_A, const struct_A, true);
+    TEST (std::is_base_of, volatile struct_A, struct_A, true);
+    TEST (std::is_base_of, struct_A, volatile struct_A, true);
+    TEST (std::is_base_of, const volatile struct_A, struct_A, true);
+    TEST (std::is_base_of, struct_A, const volatile struct_A, true);
+
+    TEST (std::is_base_of, const struct_A, derived_t<struct_A>, true);
+    TEST (std::is_base_of, struct_A, const derived_t<struct_A>, true);
+    TEST (std::is_base_of, volatile struct_A, derived_t<struct_A>, true);
+    TEST (std::is_base_of, struct_A, volatile derived_t<struct_A>, true);
+    TEST (std::is_base_of, const volatile struct_A, derived_t<struct_A>, true);
+    TEST (std::is_base_of, struct_A, const volatile derived_t<struct_A>, true);
+
     // other combinations should fail
     TEST (std::is_base_of, signed char, char, false);
     TEST (std::is_base_of, char, signed char, false);
@@ -366,7 +390,14 @@
     TEST (std::is_convertible, int (), int (&)(char), false);
 
     TEST (std::is_convertible, int*, void*, true);
+
+#if defined (_MSC_VER) || defined (__IBMCPP__)
+    // microsoft language extension allows this conversion, and that
+    // extension is enabled by default.
+    TEST (std::is_convertible, int (*)(), void*, true);
+#else
     TEST (std::is_convertible, int (*)(), void*, false);
+#endif
 
     TEST (std::is_convertible,
           int (*)(derived_t<struct_A>*),

Modified: stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp?rev=682512&r1=682511&r2=682512&view=diff
==============================================================================
--- stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp (original)
+++ stdcxx/trunk/tests/utilities/20.meta.trans.other.cpp Mon Aug  4 14:26:00 2008
@@ -70,12 +70,14 @@
     return 0;
 }
 
-static int _cond_if_char (void* = 0)
+// must have external linkage
+int _cond_if_char (void*)
 {
     return 0;
 }
 
-static int _cond_if_char (long* = 0)
+// must have external linkage
+int _cond_if_char (long*)
 {
     return 1;
 }

Modified: stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp?rev=682512&r1=682511&r2=682512&view=diff
==============================================================================
--- stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp (original)
+++ stdcxx/trunk/tests/utilities/20.meta.unary.prop.cpp Mon Aug  4 14:26:00 2008
@@ -96,6 +96,7 @@
 template <class T>
 struct member_t
 {
+    member_t (T);
     T val;
 };
 
@@ -933,13 +934,16 @@
     TEST (std::is_signed, signed short, true);
     TEST (std::is_signed, signed int, true);
     TEST (std::is_signed, signed long, true);
-    TEST (std::is_signed, signed long long, true);
 
     TEST (std::is_signed, unsigned char, false);
     TEST (std::is_signed, unsigned short, false);
     TEST (std::is_signed, unsigned int, false);
     TEST (std::is_signed, unsigned long, false);
+
+#ifndef _RWSTD_NO_LONG_LONG
+    TEST (std::is_signed,   signed long long, true);
     TEST (std::is_signed, unsigned long long, false);
+#endif
 
     TEST (std::is_signed, float, true);
     TEST (std::is_signed, double, true);
@@ -967,13 +971,16 @@
     TEST (std::is_unsigned, signed short, false);
     TEST (std::is_unsigned, signed int, false);
     TEST (std::is_unsigned, signed long, false);
-    TEST (std::is_unsigned, signed long long, false);
 
     TEST (std::is_unsigned, unsigned char, true);
     TEST (std::is_unsigned, unsigned short, true);
     TEST (std::is_unsigned, unsigned int, true);
     TEST (std::is_unsigned, unsigned long, true);
+
+#ifndef _RWSTD_NO_LONG_LONG
+    TEST (std::is_unsigned, signed long long, false);
     TEST (std::is_unsigned, unsigned long long, true);
+#endif
 
     TEST (std::is_unsigned, float, false);
     TEST (std::is_unsigned, double, false);



Mime
View raw message