stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r673865 - in /stdcxx/branches/4.3.x/tests/utilities: 20.forward.cpp 20.tuple.cnstr.cpp 20.tuple.creation.cpp 20.tuple.elem.cpp 20.tuple.helpers.cpp 20.tuple.rel.cpp
Date Thu, 03 Jul 2008 23:26:24 GMT
Author: vitek
Date: Thu Jul  3 16:26:24 2008
New Revision: 673865

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

	* tests/utilities/20.tuple.cnstr.cpp [_RWSTD_NO_RVALUE_REFERENCES]:
	Disable body of test if _RWSTD_NO_EXT_CXX_0X is not defined but tuples
	are unavailable due to insufficient compiler support.
	(run_test) [_RWSTD_NO_RVALUE_REFERENCES, _RWSTD_NO_EXT_CXX_0X]: Display
	descriptive warning explaining why test is disabled.
	* tests/utilities/20.tuple.helpers.cpp: Ditto.
	* tests/utilities/20.tuple.creation.cpp: Ditto.
	* tests/utilities/20.tuple.elem.cpp: Ditto.
	* tests/utilities/20.tuple.rel.cpp: Ditto.
	* tests/utilities/20.forward.cpp (run_test): Run test_identity() even
	when rvalue references are not supported. Display descriptive warning
	explaining why parts of test are disabled.


Modified:
    stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.elem.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.helpers.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.rel.cpp

Modified: stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp?rev=673865&r1=673864&r2=673865&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp Thu Jul  3 16:26:24 2008
@@ -43,20 +43,19 @@
    Foo (int& ) { }
 };
 
-// compile tests
-
-typedef std::identity<Foo> FooIdent;
-typedef std::identity<Foo>::type FooIdentType;
-
-_RWSTD_STATIC_ASSERT ((_RW::__rw_is_same<Foo, FooIdentType>::value),
-                      "(is_same<Foo, FooIdentType>), got false, "
-                      "expected true");
 
 static void
 test_identity ()
 {
     rw_info (0, __FILE__, __LINE__, "std::identity<T> class template");
 
+    typedef std::identity<Foo> FooIdent;
+    typedef std::identity<Foo>::type FooIdentType;
+
+    _RWSTD_STATIC_ASSERT ((_RW::__rw_is_same<Foo, FooIdentType>::value),
+                          "is_same<Foo, FooIdentType>::value is false, "
+                          "expected true");
+
     int i = 1;
     FooIdent foo_ident;
     Foo foo = foo_ident (i);
@@ -65,6 +64,8 @@
 
 /**************************************************************************/
 
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
 // using example from standard as a test case
 
 template <class Type>
@@ -83,6 +84,8 @@
     return shared_ptr<Type> (new Type (std::forward<AType> (at)));
 }
 
+/**************************************************************************/
+
 static void
 test_forward ()
 {
@@ -99,21 +102,23 @@
 
 }
 
+#endif // _RWSTD_NO_RVALUE_REFERENCES
+
 /**************************************************************************/
 
 static int
 run_test (int /*unused*/, char* /*unused*/ [])
 {
+    test_identity ();
 
 #if !defined _RWSTD_NO_RVALUE_REFERENCES
 
-    test_identity ();
     test_forward ();
     test_move ();
 
 #else // no rvalue references
 
-    rw_info (true, __FILE__, __LINE__,
+    rw_warn (0, 0, __LINE__,
              "No compiler support for rvalue references; tests disabled.");
 
 #endif   // !defined _RWSTD_NO_RVALUE_REFERENCES

Modified: stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp?rev=673865&r1=673864&r2=673865&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp Thu Jul  3 16:26:24 2008
@@ -29,7 +29,8 @@
 #include <rw_driver.h>
 
 // compile out all test code if extensions disabled
-#ifndef _RWSTD_NO_EXT_CXX_0X
+#if    !defined (_RWSTD_NO_EXT_CXX_0X) \
+    && !defined(_RWSTD_NO_RVALUE_REFERENCES)
 
 #include <tuple>
 
@@ -366,17 +367,28 @@
     return 0;
 }
 
-#else // !_RWSTD_NO_EXT_CXX_0X
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 static int
 run_test (int, char*[])
 {
-    rw_info (0, 0, __LINE__,
-             "tests for C++0x tuple extension disabled");
+#if defined (_RWSTD_NO_EXT_CXX_OX)
+
+    rw_warn (0, 0, __LINE__,
+			 "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+			 "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+			 "defined");
+
+#endif
+
     return 0;
 }
 
-#endif // !_RWSTD_NO_EXT_CXX_0X
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 /*extern*/ int
 main (int argc, char* argv [])

Modified: stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp?rev=673865&r1=673864&r2=673865&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp Thu Jul  3 16:26:24 2008
@@ -28,8 +28,9 @@
 
 #include <rw_driver.h>
 
- // compile out all test code if extensions disabled
- #ifndef _RWSTD_NO_EXT_CXX_0X
+// compile out all test code if extensions disabled
+#if    !defined(_RWSTD_NO_EXT_CXX_0X) \
+    && !defined(_RWSTD_NO_RVALUE_REFERENCES)
 
 #include <functional>           // for reference_wrapper
 #include <tuple>
@@ -106,17 +107,28 @@
     return 0;
 }
 
-#else // !_RWSTD_NO_EXT_CXX_0X
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 static int
 run_test (int, char*[])
 {
-    rw_info (0, 0, __LINE__,
-             "tests for C++0x tuple extension disabled");
+#if defined (_RWSTD_NO_EXT_CXX_0X)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+	         "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+			 "defined");
+
+#endif
+
     return 0;
 }
 
-#endif // !_RWSTD_NO_EXT_CXX_0X
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 /*extern*/ int
 main (int argc, char* argv [])

Modified: stdcxx/branches/4.3.x/tests/utilities/20.tuple.elem.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.tuple.elem.cpp?rev=673865&r1=673864&r2=673865&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.tuple.elem.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.tuple.elem.cpp Thu Jul  3 16:26:24 2008
@@ -29,7 +29,8 @@
 #include <rw_driver.h>
 
 // compile out all test code if extensions disabled
-#ifndef _RWSTD_NO_EXT_CXX_0X
+#if    !defined (_RWSTD_NO_EXT_CXX_0X) \
+    && !defined (_RWSTD_NO_RVALUE_REFERENCES)
 
 #include <tuple>
 
@@ -150,17 +151,29 @@
     return 0;
 }
 
-#else // !_RWSTD_NO_EXT_CXX_0X
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 static int
 run_test (int, char*[])
 {
-    rw_info (0, 0, __LINE__,
-             "tests for C++0x tuple extension disabled");
+
+#if defined (_RWSTD_NO_EXT_CXX_0X)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+			 "defined");
+
+#endif
+
     return 0;
 }
 
-#endif // !_RWSTD_NO_EXT_CXX_0X
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 /*extern*/ int
 main (int argc, char* argv [])

Modified: stdcxx/branches/4.3.x/tests/utilities/20.tuple.helpers.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.tuple.helpers.cpp?rev=673865&r1=673864&r2=673865&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.tuple.helpers.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.tuple.helpers.cpp Thu Jul  3 16:26:24 2008
@@ -29,7 +29,8 @@
 #include <rw_driver.h>
 
 // compile out all test code if extensions disabled
-#ifndef _RWSTD_NO_EXT_CXX_0X
+#if    !defined (_RWSTD_NO_EXT_CXX_0X) \
+    && !defined (_RWSTD_NO_RVALUE_REFERENCES)
 
 #include <tuple>
 
@@ -144,17 +145,29 @@
     return 0;
 }
 
-#else // !_RWSTD_NO_EXT_CXX_0X
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 static int
 run_test (int, char*[])
 {
-    rw_info (0, 0, __LINE__,
-             "tests for C++0x tuple extension disabled");
+
+#if defined (_RWSTD_NO_EXT_CXX_0X)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+			 "defined");
+
+#endif
+
     return 0;
 }
 
-#endif // !_RWSTD_NO_EXT_CXX_0X
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 /*extern*/ int
 main (int argc, char* argv [])

Modified: stdcxx/branches/4.3.x/tests/utilities/20.tuple.rel.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.tuple.rel.cpp?rev=673865&r1=673864&r2=673865&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.tuple.rel.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.tuple.rel.cpp Thu Jul  3 16:26:24 2008
@@ -29,7 +29,8 @@
 #include <rw_driver.h>
 
 // compile out all test code if extensions disabled
-#ifndef _RWSTD_NO_EXT_CXX_0X
+#if    !defined (_RWSTD_NO_EXT_CXX_0X) \
+    && !defined (_RWSTD_NO_RVALUE_REFERENCES)
 
 #include <tuple>
 
@@ -115,17 +116,29 @@
     return 0;
 }
 
-#else // !_RWSTD_NO_EXT_CXX_0X
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 static int
 run_test (int, char*[])
 {
-    rw_info (0, 0, __LINE__,
-             "tests for C++0x tuple extension disabled");
+
+#if defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_OX is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+			 "defined");
+
+#endif
+
     return 0;
 }
 
-#endif // !_RWSTD_NO_EXT_CXX_0X
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
 
 /*extern*/ int
 main (int argc, char* argv [])



Mime
View raw message