Commit Graph

148 Commits

Author SHA1 Message Date
Louis Dionne
c92b2d64e1 [tests] Add automatic unit tests for 'ap' 2017-12-01 18:00:49 -08:00
Louis Dionne
154ddb4f83 [tests] Add missing automatic test cases and get rid of custom tests for Fusion 2017-11-26 14:18:07 -08:00
Louis Dionne
80939d4949 [ext.boost.fusion] Unconditionally enable some Fusion adaptor tests
Those tests were broken with older versions of Boost that we don't test
against anymore. Furthermore, since we document that Boost and standalone
Hana installations should not be mixed, there's no risk of this change
breaking any existing code (that would be mixing standalone Hana with an
old version of Boost).
2017-11-25 13:59:20 -08:00
Jason Rice
6d086796a3 [index_if] New index_if function
- Adds index_if
    - Rewrites detail::index_if to use recursive alias stuff
      optimized for tuple and basic_tuple
    - find_if now uses index_if for Iterables
    - at_key now uses index_if for Sequence
    - Removes duplicate code and unnecessary special case implementations
        - detail::advance_until
        - at_key::advance_until
        - tuple_tag implementation of find_if
    - Uses Foldable instead of Sequence for cases where length is known.
      (find_if had a specialization when Iterable and not Sequence)
    - Adds test.*.auto.index_if for Sequences
    - Adds test support/counter for testing infinite iterables
2017-04-07 16:19:52 -07:00
Louis Dionne
a39d2fb90c [any_of] Fix a bug where we called the predicate once more than necessary
Also, add automatic unit tests for any_of, all_of and none_of. This commit
also makes it easier to add new automatic unit tests by documenting a small
shell script.

Commit triggered by http://stackoverflow.com/q/42012512/627587
2017-02-03 13:58:08 -08:00
Louis Dionne
9895803ede Bump copyright year to 2017 2017-01-07 14:14:18 -08:00
Louis Dionne
c97f86e17b [tests] Remove occurences of using namespace boost::hana 2016-10-23 11:59:28 -07:00
Jason Rice
ea571a11fc Fix Github Issue 304
- Apparently std::array operator[] returns an lvalue reference when unpacking
    a temporary std::array. Using std::get<n> returns the
    proper reference type in the case of rvalues.
  - Adds test by ldionne
2016-10-23 11:59:02 -07:00
Louis Dionne
497604d4db [tests] Split unit tests for std::array 2016-08-30 21:28:49 -07:00
Louis Dionne
57d0882d2e [tests] Split unit tests for mpl::list and mpl::vector 2016-08-30 21:18:28 -07:00
Louis Dionne
c90e90b5bb [tests] Split unit tests for std::integral_constant 2016-08-30 20:59:05 -07:00
Louis Dionne
f240a9f9f2 [tests] Split unit tests for mpl::integral_c 2016-08-30 20:47:03 -07:00
Louis Dionne
b8e28e4a74 [tests] Create an automatic test for for_each 2016-07-07 21:36:11 -07:00
Louis Dionne
9398b89210 [test/take_back] Rename misnamed automatic take_back test files
Also use smaller sequences to accommodate boost::tuple.
2016-02-29 10:24:26 -05:00
Louis Dionne
50a8bd3684 [tests] Add automatic unit tests for at 2016-02-29 09:08:05 -05:00
Louis Dionne
3475065f23 [tests] Add an automatic unit test for is_empty 2016-02-29 09:08:05 -05:00
Louis Dionne
a6438720c0 [tests] Add an automatic test for transform 2016-02-27 14:36:57 -05:00
Louis Dionne
6798df624e [tests] Reorganize the test/_support folder
- Rename test/_support to test/_include
- Move stuff from test/_include/test to test/_include/support
- Move stuff in test/_include/support into global namespace
2016-02-22 19:09:50 -05:00
Louis Dionne
3a2ad0b2b5 [Hashable] Improve documentation and tests 2016-02-16 15:24:23 -05:00
Louis Dionne
b1696fe0cc [Metafunction] Do not automatically call decltype_ on metafunction arguments 2016-02-15 10:07:08 -05:00
Louis Dionne
15b5e32c7d [tests] Modularize the unit tests for std::pair, std::tuple and std::ratio 2016-02-05 18:19:24 -05:00
Louis Dionne
75f6be09ce Return references from at, at_key & friends
Resolves #90
2016-02-05 18:19:23 -05:00
Louis Dionne
23c3edc93b [NFC] Un-Doxygenize comments in non-header files 2016-02-04 11:07:41 -05:00
Louis Dionne
fdc6335c2e [integer_sequence] Add unit tests and benchmarks for find_if
Initially, this commit was supposed to provide a slightly
optimized version of `find_if` for `integer_sequence`.
Unfortunately, benchmarking did not show any significant
difference, and so the current implementation will be kept.

Benchmark data is here: http://pastebin.com/t3M8YwzD
2016-01-29 13:04:33 -05:00
Louis Dionne
3d92428052 [tests] Split unit tests for integer_sequence 2016-01-29 12:46:29 -05:00
Louis Dionne
81ddcfafaf Rename take to take_front
This improves consistency:
drop_front/drop_back
take_front/take_back
2016-01-12 10:10:03 -05:00
Louis Dionne
131c56c32a Add the take_back algorithm 2016-01-12 10:00:11 -05:00
Louis Dionne
9a1d5551d5 [tests] Move all support headers to the _support subdirectory 2016-01-04 11:18:46 -05:00
Louis Dionne
84977185da Update some copyright notices to 2016 2016-01-04 09:25:49 -05:00
Louis Dionne
2ca3f76e3f Remove workarounds for Boost 1.58 2016-01-04 09:25:49 -05:00
Louis Dionne
d9ade67d55 Modularize tests for drop_while, drop_front and lexicographical_compare 2016-01-04 09:25:49 -05:00
Louis Dionne
325c120918 Add modular tests for many algorithms
drop_back, insert, insert_range, intersperse, partition, reverse,
take, take_while
2016-01-04 09:25:49 -05:00
Louis Dionne
538aea1b50 Add modular tests for group 2016-01-04 09:25:48 -05:00
Louis Dionne
f5ac1659ae Add modular tests for sort 2016-01-04 09:25:48 -05:00
Louis Dionne
2f026a7a3f Add modular tests for span 2016-01-04 09:25:48 -05:00
Louis Dionne
0aed2fcb8c Add modular tests for remove_at 2016-01-04 09:25:48 -05:00
Louis Dionne
fd716089a5 Add modular tests for slice 2016-01-04 09:25:48 -05:00
Louis Dionne
e0cc06608c Add modular unit tests for unique 2016-01-04 09:25:48 -05:00
Louis Dionne
af98fc34d9 Make fusion::deque non-constexpr on Boost <= 1.57 2016-01-04 09:25:48 -05:00
Louis Dionne
77820757b8 [Tests] Start modularizing the unit tests in a more systematic way 2016-01-04 09:25:47 -05:00
Louis Dionne
6492ec66a5 [Tests] Remove some duplicate code in the tests for Fusion 2016-01-04 09:25:47 -05:00
Louis Dionne
c41a5cb6be Update copyright notices for 2016 2016-01-01 14:54:06 -05:00
Louis Dionne
1d57e8669e [std::tuple] Add a test to make sure we workaround libc++ bug 22806 2015-12-21 21:21:37 -05:00
Louis Dionne
e13d826496 [MPL] Add support for mpl::list 2015-11-12 14:23:15 -05:00
Louis Dionne
3707877225 [Iterable] Remove the tail function
Closes #158
2015-11-11 14:08:36 -05:00
Louis Dionne
35da925d19 [IntegralDomain] Rename to EuclideanRing
Note that no `norm` function is added for now, since the `norm` is not
tied to the specific Euclidean ring as explained in [1]. However, it
might be useful to enforce an arbitrary choice to be made for each
Euclidean ring. This could perhaps be added in the future.

Fixes #28

[1]: https://en.wikipedia.org/wiki/Euclidean_domain#Definition
2015-10-08 14:42:22 -04:00
Louis Dionne
cf063a4fe3 Return hana::integral_constants from type_traits adapters
Also, remove the ext/std/{type_traits,utility} headers in favour of the
<boost/hana/traits.hpp> header.
2015-09-21 07:45:04 -07:00
Louis Dionne
41c64b39a9 [IntegralDomain] Rename quot/rem to div/mod
Fixes #180
2015-09-14 14:18:29 -04:00
Louis Dionne
1d7b720c95 [Enumerable] Remove that concept entirely.
Enumerable was not being used inside the library, and its usefulness
was questionable due to the lack of upper/lower bounds.

Closes #23
2015-09-12 17:59:58 -04:00
Louis Dionne
cf56c3ab83 [Doc] Document new-style concepts and remove core/models.hpp 2015-09-05 19:27:38 -04:00