You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by vi...@apache.org on 2008/06/27 00:48:22 UTC

svn commit: r672048 - /stdcxx/branches/4.3.x/tests/utilities/

Author: vitek
Date: Thu Jun 26 15:48:21 2008
New Revision: 672048

URL: http://svn.apache.org/viewvc?rev=672048&view=rev
Log:
2008-06-27  Travis Vitek  <vi...@roguewave.com>

	* tests/utilities/20.forward.cpp [_RWSTD_NO_EXT_CXX_0X]: Add
	guard to get test to compile and run when extension is not
	explicitly enabled. Include rw/_defs.h explicitly in case
	rw_driver.h does not.
	* tests/utilities/20.tuple.cnstr.cpp: Ditto.
	* tests/utilities/20.tuple.elem.cpp: Ditto.
	* tests/utilities/20.tuple.helpers.cpp: Ditto.
	* tests/utilities/20.meta.help.cpp: include rw/_defs.h explicitly
	in case rw_driver.h does not.
	* tests/utilities/20.meta.rel.cpp: Ditto.
	* tests/utilities/20.meta.trans.arr.cpp: Ditto.
	* tests/utilities/20.meta.trans.cv.cpp: Ditto.
	* tests/utilities/20.meta.trans.ptr.cpp: Ditto.
	* tests/utilities/20.meta.trans.ref.cpp: Ditto.
	* tests/utilities/20.meta.unary.comp.cpp: Ditto.
	* tests/utilities/20.meta.trans.other.cpp: Ditto. Move includes
	inside _RWSTD_NO_EXT_CXX_0X block.
	* tests/utilities/20.meta.trans.sign.cpp: Ditto.
	* tests/utilities/20.meta.unary.cat.cpp: Ditto.
	* tests/utilities/20.meta.unary.prop.cpp: Ditto.

Modified:
    stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.cv.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.other.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ptr.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ref.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.cat.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.comp.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.elem.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.helpers.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=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.forward.cpp Thu Jun 26 15:48:21 2008
@@ -26,11 +26,16 @@
  * 
  **************************************************************************/
 
+#include <rw_driver.h>
+#include <rw/_defs.h>
+
+// compile out all test code if extensions disabled
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
 #include <rw/_forward.h>
 #include <rw/_meta_rel.h>
 #include <rw/_static_assert.h>
 
-#include <rw_driver.h>
 
 
 struct Foo
@@ -116,6 +121,17 @@
     return 0;
 }
 
+#else // !_RWSTD_NO_EXT_CXX_0X
+
+static int run_test (int, char*[])
+{
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+    return 0;
+}
+
+#endif // !_RWSTD_NO_EXT_CXX_0X
+
 /*extern*/ int
 main (int argc, char* argv [])
 {

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp Thu Jun 26 15:48:21 2008
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp Thu Jun 26 15:48:21 2008
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp Thu Jun 26 15:48:21 2008
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.cv.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.cv.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.cv.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.cv.cpp Thu Jun 26 15:48:21 2008
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.other.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.other.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.other.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.other.cpp Thu Jun 26 15:48:21 2008
@@ -28,14 +28,17 @@
  **************************************************************************/
 
 #include <rw_driver.h>
-#include <rw_printf.h> // for rwsprintfa()
-#include <stdlib.h>    // for free()
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
 
 #include <type_traits>
 
+#include <rw_printf.h> // for rwsprintfa()
+
+#include <stdlib.h>    // for free()
+
 /**************************************************************************/
 
 template <class T>

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ptr.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ptr.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ptr.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ptr.cpp Thu Jun 26 15:48:21 2008
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ref.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ref.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ref.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ref.cpp Thu Jun 26 15:48:21 2008
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp Thu Jun 26 15:48:21 2008
@@ -27,15 +27,16 @@
  *
  **************************************************************************/
 
-#include <stddef.h>
-
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
 
 #include <type_traits>
 
+#include <stddef.h>
+
 /**************************************************************************/
 
 template <class T, class U>

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.cat.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.cat.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.cat.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.cat.cpp Thu Jun 26 15:48:21 2008
@@ -27,15 +27,16 @@
  *
  **************************************************************************/
 
-#include <stddef.h>
-
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
 
 #include <type_traits>
 
+#include <stddef.h>
+
 /**************************************************************************/
 
 static void

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.comp.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.comp.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.comp.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.comp.cpp Thu Jun 26 15:48:21 2008
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X

Modified: stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp?rev=672048&r1=672047&r2=672048&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp Thu Jun 26 15:48:21 2008
@@ -27,15 +27,16 @@
  *
  **************************************************************************/
 
-#include <stddef.h>
-
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
 
 #include <type_traits>
 
+#include <stddef.h>
+
 /**************************************************************************/
 
 struct struct_t {

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=672048&r1=672047&r2=672048&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 Jun 26 15:48:21 2008
@@ -26,13 +26,18 @@
  * 
  **************************************************************************/
 
+#include <rw_driver.h>
+#include <rw/_defs.h>
+
+// compile out all test code if extensions disabled
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
 #include <tuple>
 
 #include "20.tuple.h"
 
 /**************************************************************************/
 
-#include <rw_driver.h>
 
 static void
 test_default_ctor ()
@@ -346,6 +351,18 @@
     return 0;
 }
 
+#else // !_RWSTD_NO_EXT_CXX_0X
+
+static int
+run_test (int, char*[])
+{
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+    return 0;
+}
+
+#endif // !_RWSTD_NO_EXT_CXX_0X
+
 /*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=672048&r1=672047&r2=672048&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 Jun 26 15:48:21 2008
@@ -26,13 +26,18 @@
  * 
  **************************************************************************/
 
+#include <rw_driver.h>
+#include <rw/_defs.h>
+
+// compile out all test code if extensions disabled
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
 #include <tuple>
 
 #include "20.tuple.h"
 
 /**************************************************************************/
 
-#include <rw_driver.h>
 #include <rw_valcmp.h>
 
 static void
@@ -78,6 +83,18 @@
     return 0;
 }
 
+#else // !_RWSTD_NO_EXT_CXX_0X
+
+static int
+run_test (int, char*[])
+{
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+    return 0;
+}
+
+#endif // !_RWSTD_NO_EXT_CXX_0X
+
 /*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=672048&r1=672047&r2=672048&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 Jun 26 15:48:21 2008
@@ -26,13 +26,18 @@
  * 
  **************************************************************************/
 
+#include <rw_driver.h>
+#include <rw/_defs.h>
+
+// compile out all test code if extensions disabled
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
 #include <tuple>
 
 #include "20.tuple.h"
 
 /**************************************************************************/
 
-#include <rw_driver.h>
 
 static void
 test_tuple_size ()
@@ -141,6 +146,18 @@
     return 0;
 }
 
+#else // !_RWSTD_NO_EXT_CXX_0X
+
+static int
+run_test (int, char*[])
+{
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+    return 0;
+}
+
+#endif // !_RWSTD_NO_EXT_CXX_0X
+
 /*extern*/ int
 main (int argc, char* argv [])
 {



Re: svn commit: r672048 - /stdcxx/branches/4.3.x/tests/utilities/

Posted by Martin Sebor <se...@roguewave.com>.
Travis Vitek wrote:
>  
> 
> Martin Sebor wrote:
>> vitek@apache.org wrote:
>>> Author: vitek
>>> Date: Thu Jun 26 15:48:21 2008
>>> New Revision: 672048
>>>
>>> URL: http://svn.apache.org/viewvc?rev=672048&view=rev
>>> Log:
>>> 2008-06-27  Travis Vitek  <vi...@roguewave.com>
>>>
>>> 	* tests/utilities/20.forward.cpp [_RWSTD_NO_EXT_CXX_0X]: Add
>>> 	guard to get test to compile and run when extension is not
>>> 	explicitly enabled. Include rw/_defs.h explicitly in case
>>> 	rw_driver.h does not.
>> Every stdcxx header should always end up #including <rw/_defs.h>
>> so that no code outside the library needs to (as always, there
>> are unavoidable exceptions). <rw_driver.h> includes the header
>> via <rw_testdefs.h> which in turn should be #included by every
>> test driver header.
> 
> Yes, I know.
> 
>> Are there any circumstances when this doesn't happen?
> 
> No. My comment is misleading. I'm simply applying the undocumented style
> for #include directives in stdcxx [http://tinyurl.com/6abxfz], which is
> quoted below...

This applies to library headers only (modulo exceptions, the
rest of the project doesn't #include any private headers as
a rule).

> 
>   > 
>   >> 2. include directives are in alphabetical order, with
>   >> rw/_defs.h being last (it still ends up getting included
>   >> first, indirectly, by the first header); the exception
>   >> here is when a stdcxx config macro needs to be tested
>   >> before the first #include directive
>   > 
> 
>> Martin
>>
>>


RE: svn commit: r672048 - /stdcxx/branches/4.3.x/tests/utilities/

Posted by Travis Vitek <Tr...@roguewave.com>.
 

Martin Sebor wrote:
>
>vitek@apache.org wrote:
>> Author: vitek
>> Date: Thu Jun 26 15:48:21 2008
>> New Revision: 672048
>> 
>> URL: http://svn.apache.org/viewvc?rev=672048&view=rev
>> Log:
>> 2008-06-27  Travis Vitek  <vi...@roguewave.com>
>> 
>> 	* tests/utilities/20.forward.cpp [_RWSTD_NO_EXT_CXX_0X]: Add
>> 	guard to get test to compile and run when extension is not
>> 	explicitly enabled. Include rw/_defs.h explicitly in case
>> 	rw_driver.h does not.
>
>Every stdcxx header should always end up #including <rw/_defs.h>
>so that no code outside the library needs to (as always, there
>are unavoidable exceptions). <rw_driver.h> includes the header
>via <rw_testdefs.h> which in turn should be #included by every
>test driver header.

Yes, I know.

>
> Are there any circumstances when this doesn't happen?

No. My comment is misleading. I'm simply applying the undocumented style
for #include directives in stdcxx [http://tinyurl.com/6abxfz], which is
quoted below...

  > 
  >> 2. include directives are in alphabetical order, with
  >> rw/_defs.h being last (it still ends up getting included
  >> first, indirectly, by the first header); the exception
  >> here is when a stdcxx config macro needs to be tested
  >> before the first #include directive
  > 

>Martin
>
>

Re: svn commit: r672048 - /stdcxx/branches/4.3.x/tests/utilities/

Posted by Martin Sebor <se...@roguewave.com>.
vitek@apache.org wrote:
> Author: vitek
> Date: Thu Jun 26 15:48:21 2008
> New Revision: 672048
> 
> URL: http://svn.apache.org/viewvc?rev=672048&view=rev
> Log:
> 2008-06-27  Travis Vitek  <vi...@roguewave.com>
> 
> 	* tests/utilities/20.forward.cpp [_RWSTD_NO_EXT_CXX_0X]: Add
> 	guard to get test to compile and run when extension is not
> 	explicitly enabled. Include rw/_defs.h explicitly in case
> 	rw_driver.h does not.

Every stdcxx header should always end up #including <rw/_defs.h>
so that no code outside the library needs to (as always, there
are unavoidable exceptions). <rw_driver.h> includes the header
via <rw_testdefs.h> which in turn should be #included by every
test driver header. Are there any circumstances when this
doesn't happen?

Martin