mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 11:27:15 +02:00
Update test jamfile to glob for project headers and create self-include tests
This commit is contained in:
@ -4,9 +4,13 @@
|
|||||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
# 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 LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
import path ;
|
||||||
|
import regex ;
|
||||||
import testing ;
|
import testing ;
|
||||||
import ../../config/checks/config : requires ;
|
import ../../config/checks/config : requires ;
|
||||||
|
|
||||||
|
path-constant TOP : . ;
|
||||||
|
|
||||||
# Adding -Wundef is blocked on (at least)
|
# Adding -Wundef is blocked on (at least)
|
||||||
# https://github.com/boostorg/type_traits/issues/165
|
# https://github.com/boostorg/type_traits/issues/165
|
||||||
|
|
||||||
@ -274,6 +278,25 @@ for local container in $(MMAP_CONTAINERS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
alias foa_mmap_tests : foa_mmap_$(MMAP_CONTAINERS)_tests ;
|
alias foa_mmap_tests : foa_mmap_$(MMAP_CONTAINERS)_tests ;
|
||||||
|
|
||||||
|
local include_root = [ path.make $(TOP)/../include ] ;
|
||||||
|
|
||||||
|
local headers = [ path.glob-tree $(include_root)/boost : *.hpp ] ;
|
||||||
|
|
||||||
|
local paths ;
|
||||||
|
local sanitized_paths ;
|
||||||
|
|
||||||
|
for local header in $(headers)
|
||||||
|
{
|
||||||
|
local path = [ path.relative-to $(include_root) $(header) ] ;
|
||||||
|
local sanitized = [ regex.replace $(path) "[/.\\]" "_" ] ;
|
||||||
|
paths += $(path) ;
|
||||||
|
sanitized_paths += $(sanitized) ;
|
||||||
|
run unordered/self_include_tests.cpp : : : <define>BOOST_UNORDERED_HEADER="$(path)" : foa_$(sanitized)_self_include_tests ;
|
||||||
|
}
|
||||||
|
|
||||||
|
alias foa_self_include_tests : foa_$(sanitized_paths)_self_include_tests ;
|
||||||
|
|
||||||
alias foa_tests :
|
alias foa_tests :
|
||||||
foa_$(FOA_TESTS)
|
foa_$(FOA_TESTS)
|
||||||
foa_$(FOA_EXCEPTION_TESTS)
|
foa_$(FOA_EXCEPTION_TESTS)
|
||||||
@ -281,6 +304,7 @@ alias foa_tests :
|
|||||||
foa_scoped_allocator
|
foa_scoped_allocator
|
||||||
foa_serialization_tests
|
foa_serialization_tests
|
||||||
foa_mmap_tests
|
foa_mmap_tests
|
||||||
|
foa_self_include_tests
|
||||||
;
|
;
|
||||||
|
|
||||||
local CFOA_TESTS =
|
local CFOA_TESTS =
|
||||||
|
11
test/unordered/self_include_tests.cpp
Normal file
11
test/unordered/self_include_tests.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#ifndef BOOST_UNORDERED_HEADER
|
||||||
|
#error "this requires a class template be passed as a macro"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STRINGIZE(text) STRINGIZE_I(text)
|
||||||
|
#define STRINGIZE_I(...) #__VA_ARGS__
|
||||||
|
|
||||||
|
#define HEADER STRINGIZE(BOOST_UNORDERED_HEADER)
|
||||||
|
#include HEADER
|
||||||
|
|
||||||
|
int main() {}
|
Reference in New Issue
Block a user