76 lines
2.6 KiB
Plaintext
76 lines
2.6 KiB
Plaintext
|
# Boost.Assign library
|
||
|
#
|
||
|
# Copyright Thorsten Ottosen 2003-2005. Use, modification and
|
||
|
# distribution is subject to 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)
|
||
|
#
|
||
|
# For more information, see http://www.boost.org/libs/assign/
|
||
|
#
|
||
|
|
||
|
import path ;
|
||
|
import regex ;
|
||
|
|
||
|
rule assign-test ( name )
|
||
|
{
|
||
|
return [
|
||
|
run $(name).cpp /boost/test//boost_unit_test_framework/<link>static ]
|
||
|
;
|
||
|
}
|
||
|
|
||
|
# this rule enumerates through all the headers and ensures
|
||
|
# that inclusion of the header by itself is sufficient to
|
||
|
# compile successfully, proving the header does not depend
|
||
|
# on any other headers to be included first - adapted from
|
||
|
# logic in the winapi test bjam script
|
||
|
rule test_headers
|
||
|
{
|
||
|
local all_rules = ;
|
||
|
local file ;
|
||
|
local headers_path = [ path.make $(BOOST_ROOT)/libs/assign/include/boost/assign ] ;
|
||
|
for file in [ path.glob-tree $(headers_path) : *.hpp : assign ]
|
||
|
{
|
||
|
local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
|
||
|
# Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
|
||
|
# All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
|
||
|
local test_name = [ regex.replace $(rel_file) "/" "-" ] ;
|
||
|
local decl_test_name = ~hdr-decl-$(test_name) ;
|
||
|
# ECHO $(rel_file) ;
|
||
|
all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_ASSIGN_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(decl_test_name) ] ;
|
||
|
}
|
||
|
|
||
|
local tests_path = [ path.make $(BOOST_ROOT)/libs/assign/test/compile-fail ] ;
|
||
|
for file in [ path.glob-tree $(tests_path) : *.cpp ]
|
||
|
{
|
||
|
local rel_file = [ path.relative-to $(tests_path) $(file) ] ;
|
||
|
local test_name = [ regex.replace [ regex.replace $(rel_file) "/" "-" ] ".cpp" "" ] ;
|
||
|
local decl_test_name = cf-$(test_name) ;
|
||
|
# ECHO $(rel_file) ;
|
||
|
all_rules += [ compile-fail $(file) : : $(decl_test_name) ] ;
|
||
|
}
|
||
|
|
||
|
# ECHO All rules: $(all_rules) ;
|
||
|
return $(all_rules) ;
|
||
|
}
|
||
|
|
||
|
|
||
|
test-suite assign :
|
||
|
[ test_headers ]
|
||
|
[ assign-test basic ]
|
||
|
[ assign-test std ]
|
||
|
[ assign-test array ]
|
||
|
[ assign-test list_of ]
|
||
|
[ assign-test ptr_list_of ]
|
||
|
[ assign-test static_list_of ]
|
||
|
[ assign-test tuple_list_of ]
|
||
|
[ assign-test list_inserter ]
|
||
|
[ assign-test ptr_list_inserter ]
|
||
|
[ assign-test ptr_map_inserter ]
|
||
|
[ assign-test list_of_workaround ]
|
||
|
[ assign-test email_example ]
|
||
|
[ assign-test my_vector_example ]
|
||
|
[ assign-test multi_index_container ]
|
||
|
;
|
||
|
|
||
|
|