hana/test/_include/auto
2017-12-01 18:00:49 -08:00
..
all_of.hpp [any_of] Fix a bug where we called the predicate once more than necessary 2017-02-03 13:58:08 -08:00
any_of.hpp [any_of] Fix a bug where we called the predicate once more than necessary 2017-02-03 13:58:08 -08:00
ap.hpp [tests] Add automatic unit tests for 'ap' 2017-12-01 18:00:49 -08:00
at.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
cartesian_product.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
drop_back.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
drop_front.hpp [tests] Add missing automatic test cases and get rid of custom tests for Fusion 2017-11-26 14:18:07 -08:00
drop_while.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
for_each.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
group.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
index_if.hpp [index_if] New index_if function 2017-04-07 16:19:52 -07:00
insert_range.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
insert.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
intersperse.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
is_empty.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
length.hpp [tests] Add missing automatic test cases and get rid of custom tests for Fusion 2017-11-26 14:18:07 -08:00
lexicographical_compare.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
make.hpp [tests] Add missing automatic test cases and get rid of custom tests for Fusion 2017-11-26 14:18:07 -08:00
none_of.hpp [any_of] Fix a bug where we called the predicate once more than necessary 2017-02-03 13:58:08 -08:00
partition.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
permutations.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
README.md [tests] Add automatic unit tests for 'ap' 2017-12-01 18:00:49 -08:00
remove_at.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
remove_range.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
reverse.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
scans.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
sequence.hpp [tests] Add missing automatic test cases and get rid of custom tests for Fusion 2017-11-26 14:18:07 -08:00
slice.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
sort.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
span.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
take_back.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
take_front.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
take_while.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
test_case.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
transform.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
unfolds.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
unique.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
zips.hpp Bump copyright year to 2017 2017-01-07 14:14:18 -08:00

The headers in this directory provide facilities for automatic unit testing. Basically, each header defines unit tests for an algorithm or a set of related algorithms. To get the tests for these algorithms, simply include the header at global scope. However, before including the header, you must define the following macros:

`MAKE_TUPLE(...)`
    Must expand to a sequence holding `__VA_ARGS__`. A valid definition
    would be `hana::make_tuple(__VA_ARGS__)`.

`TUPLE_TYPE(...)`
    Must expand to the type of a sequence holding objects of type `__VA_ARGS__`.
    A valid definition would be `hana::tuple<__VA_ARGS__>`.

`TUPLE_TAG`
    Must expand to the tag of the sequence. A valid definition would
    be `hana::tuple_tag`.

The following macros may or may not be defined:

`MAKE_TUPLE_NO_CONSTEXPR`
    Must be defined if the `MAKE_TUPLE` macro can't be used inside a
    constant expression. Otherwise, `MAKE_TUPLE` is assumed to be able
    to construct a `constexpr` container.

The following directories contain automatic unit tests, and the following is sufficient when adding a new automatic unit test (in a file ${FILE}):

DIRECTORIES=$(find test -type d -name auto | grep -v test/_include/auto)
for d in ${DIRECTORIES}; do
    cat > ${d}/${FILE}.cpp <<EOF
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)

#include "_specs.hpp"
#include <auto/${FILE}.hpp>

int main() { }
EOF
done