Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55555 - in trunk/libs/spirit: repository/test/test_headers test/test_headers
From: frabar666_at_[hidden]
Date: 2009-08-12 17:00:47


Author: fbarel
Date: 2009-08-12 17:00:46 EDT (Wed, 12 Aug 2009)
New Revision: 55555
URL: http://svn.boost.org/trac/boost/changeset/55555

Log:
Spirit: add test_headers to repository + shorten test names
Added:
   trunk/libs/spirit/repository/test/test_headers/
   trunk/libs/spirit/repository/test/test_headers/Jamfile (contents, props changed)
   trunk/libs/spirit/repository/test/test_headers/main.cpp (contents, props changed)
   trunk/libs/spirit/repository/test/test_headers/test.cpp (contents, props changed)
Text files modified:
   trunk/libs/spirit/test/test_headers/Jamfile | 10 +++++-----
   1 files changed, 5 insertions(+), 5 deletions(-)

Added: trunk/libs/spirit/repository/test/test_headers/Jamfile
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/repository/test/test_headers/Jamfile 2009-08-12 17:00:46 EDT (Wed, 12 Aug 2009)
@@ -0,0 +1,77 @@
+# Jamfile
+#
+# Copyright (c) 2007-2008 Steven Watanabe
+# Copyright (c) 2009 Joel de Guzman
+# Copyright (c) 2009 Hartmut Kaiser
+# Copyright (c) 2009 Francois Barel
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt
+
+import testing ;
+import path ;
+import regex ;
+import print ;
+import sequence ;
+import feature ;
+
+project boost/spirit/repository/test/test_headers
+ : requirements
+ <include>$(BOOST_ROOT)
+ <include>../../../../..
+ <toolset>gcc:<cxxflags>-ftemplate-depth-300
+ <toolset>darwin:<cxxflags>-ftemplate-depth-300
+ ;
+
+headers =
+[
+ path.glob-tree ../../../../../boost/spirit/repository/include : *.hpp
+] ;
+
+for local file in $(headers)
+{
+ compile test.cpp
+ : # requirements
+ <define>BOOST_SPIRIT_HEADER_NAME=$(file)
+ <dependency>$(file)
+ : # test name
+ [ regex.replace [ path.relative-to ../../../../../boost/spirit/repository $(file) ] "/" "_" ]
+ ;
+}
+
+feature.feature <generate-include-all-order> : forward reverse : incidental ;
+
+rule generate-include-all ( target : sources * : properties * )
+{
+ print.output $(target) ;
+
+ if <generate-include-all-order>reverse in $(properties)
+ {
+ sources = [ sequence.reverse $(sources) ] ;
+ }
+
+ for local file in $(sources)
+ {
+ print.text "#include <$(file:G=)>
+" : overwrite ;
+ }
+
+}
+
+make auto_all1.cpp
+ : $(headers)
+ : @generate-include-all
+ ;
+
+make auto_all2.cpp
+ : $(headers)
+ : @generate-include-all
+ : <generate-include-all-order>reverse
+ ;
+
+# this ought to catch non-inlined functions and other duplicate definitions
+link auto_all1.cpp auto_all2.cpp main.cpp
+ : <include>.
+ : auto_all_headers
+ ;

Added: trunk/libs/spirit/repository/test/test_headers/main.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/repository/test/test_headers/main.cpp 2009-08-12 17:00:46 EDT (Wed, 12 Aug 2009)
@@ -0,0 +1,14 @@
+// Copyright (c) 2003-2008 Matthias Christian Schabel
+// Copyright (c) 2007-2008 Steven Watanabe
+// Copyright (c) 2009 Joel de Guzman
+// Copyright (c) 2009 Hartmut Kaiser
+// Copyright (c) 2009 Francois Barel
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+int main()
+{
+ return 0;
+}

Added: trunk/libs/spirit/repository/test/test_headers/test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/repository/test/test_headers/test.cpp 2009-08-12 17:00:46 EDT (Wed, 12 Aug 2009)
@@ -0,0 +1,22 @@
+// Copyright (c) 2003-2008 Matthias Christian Schabel
+// Copyright (c) 2007-2008 Steven Watanabe
+// Copyright (c) 2009 Joel de Guzman
+// Copyright (c) 2009 Hartmut Kaiser
+// Copyright (c) 2009 Francois Barel
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_SPIRIT_STRINGIZE_IMPL(x) #x
+#define BOOST_SPIRIT_STRINGIZE(x) BOOST_SPIRIT_STRINGIZE_IMPL(x)
+
+#define BOOST_SPIRIT_HEADER BOOST_SPIRIT_STRINGIZE(BOOST_SPIRIT_HEADER_NAME)
+
+#include BOOST_SPIRIT_HEADER
+#include BOOST_SPIRIT_HEADER
+
+int main()
+{
+ return 0;
+}

Modified: trunk/libs/spirit/test/test_headers/Jamfile
==============================================================================
--- trunk/libs/spirit/test/test_headers/Jamfile (original)
+++ trunk/libs/spirit/test/test_headers/Jamfile 2009-08-12 17:00:46 EDT (Wed, 12 Aug 2009)
@@ -36,7 +36,7 @@
             <define>BOOST_SPIRIT_HEADER_NAME=$(file)
             <dependency>$(file)
         : # test name
- [ regex.replace [ path.relative-to ../../../.. $(file) ] "/" "_" ]
+ [ regex.replace [ path.relative-to ../../../../boost/spirit $(file) ] "/" "_" ]
         ;
 }
 
@@ -59,19 +59,19 @@
 
 }
 
-make include_all1.cpp
+make auto_all1.cpp
     : $(headers)
     : @generate-include-all
     ;
 
-make include_all2.cpp
+make auto_all2.cpp
     : $(headers)
     : @generate-include-all
     : <generate-include-all-order>reverse
     ;
 
 # this ought to catch non-inlined functions and other duplicate definitions
-link include_all1.cpp include_all2.cpp main.cpp
+link auto_all1.cpp auto_all2.cpp main.cpp
     : <include>.
- : include_all_headers
+ : auto_all_headers
     ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk