#include #include #include #include "../include/checked_result.hpp" bool test1(){ using namespace boost::numeric; checked_result x_min = { std::numeric_limits >::min() }; std::cout << "checked_result min = " << x_min << std::endl; checked_result x_max = { std::numeric_limits>::max() }; std::cout << "checked_result max = " << x_max << std::endl; return true; } bool test2(){ using namespace boost::numeric; checked_result x1(0); assert(0 == x1); checked_result x2(exception_type::overflow_error, "exception message"); assert(! x2.no_exception()); return true; } int main(){ return ( test1() && test2() /* && test3() && test4() && test5() */ ) ? 0 : 1; }