lest 2 - learn from stf by Joel Falcou
Study stf by @jfalcou and let lest benefit from it.
Ideas:
- [ ] Use auto test case registration only.
- [ ] Use default suite, but still allow for user to specify one, e.g. for testing lest itself.
- [ ] Add ULP comparison
- [ ] Add PASS/FAIL/TYPE_IS/EXPR_IS/EXPR_TYPE
- [ ] Add typed tests (see what can be done w/o Boost).
- [ ] Fail empty test cases
- [ ] Simplify reporting mechanism
- [ ] Use C++ Detection Idiom (N4436), see below
- [ ] ...
Not supporting VC12 (VS2013), the detection mechanism can be simplified to:
#include <type_traits>
// Use pre-C++17 workaround for void_t:
// using std::void_t; // template< typename... > using void_t = void;
template<typename... Ts> struct make_void { typedef void type;};
template<typename... Ts> using void_t = typename make_void<Ts...>::type;
template< typename, typename = void_t<> >
struct has_begin : std::false_type{};
template< typename T >
struct has_begin<T, void_t<decltype(std::declval<T>().begin())>> : std::true_type{};
template <typename, typename = void_t<> >
struct has_end : std::false_type{};
template <typename T>
struct has_end<T, void_t<decltype(std::declval<T>().end())>> : std::true_type{};
template <typename T>
using is_sequence = std::integral_constant<bool, has_end<T>::value && has_begin<T>::value>;
would you be interested by some PR for those ?
A kind offer, in which I'm certainly interested (although I might not be entirely ready for it).
I Just created branch lest-v2 for it.
Good. What is the minimal language version 11 or 14 ? C++14 makes a lot of things easier with polymorphic lambda and auto without trailing decltype.
I like to keep it at C++11.
OK. I've forked the repo & will do some testing soon on how to adapt my old code to LEST.