|
Boost-Commit : |
From: steven_at_[hidden]
Date: 2008-05-16 19:46:28
Author: steven_watanabe
Date: 2008-05-16 19:46:27 EDT (Fri, 16 May 2008)
New Revision: 45443
URL: http://svn.boost.org/trac/boost/changeset/45443
Log:
Added test to verify that no two base units use the same ordinal
Added:
sandbox/units/libs/units/test_headers/generate_header.jam (contents, props changed)
Text files modified:
sandbox/units/libs/units/test_headers/Jamfile.v2 | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
Modified: sandbox/units/libs/units/test_headers/Jamfile.v2
==============================================================================
--- sandbox/units/libs/units/test_headers/Jamfile.v2 (original)
+++ sandbox/units/libs/units/test_headers/Jamfile.v2 2008-05-16 19:46:27 EDT (Fri, 16 May 2008)
@@ -10,25 +10,32 @@
import testing ;
import path ;
import regex ;
+import print ;
+import generate_header ;
-project test :
+project test_headers :
requirements <include>$(BOOST_ROOT) <include>../../..
;
-rule setup ( ) {
+headers = ;
+rule setup ( ) {
for local file in [ path.glob-tree ../../../boost/units : *.hpp ] {
+ headers += $(file) ;
result += [ compile test.cpp : <define>BOOST_UNITS_HEADER_NAME=$(file) <dependency>$(file) : [ regex.replace [ path.relative-to ../../.. $(file) ] "/" "_" ] ] ;
}
-
return $(result) ;
-
}
+tests = [ setup ] ;
+
+generate-include-all-cpp include_all : $(headers) ;
+
import testing ;
test-suite units_headers :
- [ setup ]
+ $(tests)
+ [ compile include_all : <include>. : include_all_headers ]
;
Added: sandbox/units/libs/units/test_headers/generate_header.jam
==============================================================================
--- (empty file)
+++ sandbox/units/libs/units/test_headers/generate_header.jam 2008-05-16 19:46:27 EDT (Fri, 16 May 2008)
@@ -0,0 +1,27 @@
+# generate_header.jam
+#
+# Copyright (c) 2008
+# Steven Watanabe
+#
+# 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 type ;
+import generators ;
+import print ;
+import path ;
+
+rule generate_include_all ( target : sources * : properties * ) {
+
+ print.output $(target) ;
+
+ for local file in $(sources) {
+ print.text "#include <$(file:G=)>" ;
+ }
+
+}
+
+type.register GENERATE_INCLUDE_ALL_CPP : : CPP ;
+
+generators.register-composing generate_header.generate_include_all : HPP : GENERATE_INCLUDE_ALL_CPP ;
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