Revert "isolate all headers to ensure that none rely on inclusions from another (#60)" (#62)

This reverts commit 284cde95a2.
This commit is contained in:
Rene Rivera
2017-10-04 14:13:28 -05:00
committed by GitHub
parent 284cde95a2
commit 7c99dfbbd5
2 changed files with 0 additions and 52 deletions

View File

@ -46,37 +46,9 @@ project predef-test
<dependency>$(predef-dependency) <dependency>$(predef-dependency)
; ;
import path ;
import regex ;
using testing ; using testing ;
# 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_all_headers_isolated
{
local all_rules = ;
local file ;
local headers_path = [ path.make $(BOOST_ROOT)/libs/predef/include/boost/predef ] ;
for file in [ path.glob-tree $(headers_path) : *.h* : predef ]
{
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_PREDEF_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(decl_test_name) ] ;
}
# ECHO All rules: $(all_rules) ;
return $(all_rules) ;
}
test-suite predef : test-suite predef :
[ test_all_headers_isolated ]
[ run info_as_cpp.cpp : : : <test-info>always_show_run_output ] [ run info_as_cpp.cpp : : : <test-info>always_show_run_output ]
[ run info_as_c.c : : : <test-info>always_show_run_output ] [ run info_as_c.c : : : <test-info>always_show_run_output ]
[ run info_as_objcpp.mm : : : <test-info>always_show_run_output ] [ run info_as_objcpp.mm : : : <test-info>always_show_run_output ]

View File

@ -1,24 +0,0 @@
/*
* Copyright Andrey Semashev 2015.
* 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)
*/
/*!
* \file decl_header.cpp
* \author Andrey Semashev
* \date 21.06.2015
*
* \brief This file contains a test boilerplate for checking that every
* public header is self-contained and does not have any missing
* #includes.
*/
#define BOOST_PREDEF_TEST_INCLUDE_HEADER() <boost/predef/BOOST_PREDEF_TEST_HEADER>
#include BOOST_PREDEF_TEST_INCLUDE_HEADER()
int main(int, char*[])
{
return 0;
}