check("+inf \% +inf", (l % l) == i);
check("+inf % +inf", (l % l) == i);
void test_int(){  int_type i = int_type::neg_infinity();  check("is infinity", i.is_infinity());  check("is special_value (neg_inf)", i.is_special());  check("as_special convert", boost::date_time::neg_infin == i.as_special() );  check("as_special convert", boost::date_time::neg_infin == int_type::to_special(i.as_number()) );  int_type h = int_type::neg_infinity();  i = int_type::pos_infinity();  check("is infinity", i.is_infinity());  check("as_special convert", boost::date_time::pos_infin == i.as_special() );  check("infinity less",     h < i);  check("infinity less",     h < 0);  check("infinity greater",  i > h);  check("infinity greater",  i > 0);  h = int_type::not_a_number();  check("nan less",  !(h < 0));  check("nan greater",  !(h > 0));  check("nan equal",  h == int_type::not_a_number());  i = 1;  check("is infinity", !i.is_infinity());  int_type j = int_type::neg_infinity();  check("infinity less",     j < i);  check("infinity less",     !(j < j));  check("infinity greater",  (i > j));  check("infinity equal",    !(j == i));  check("infinity equal",    j == j);  check("infinity equal",    !(j == 0));  check("infinity not equal",    j != 0);  int_type k = 1;  check("as_special convert", boost::date_time::not_special == k.as_special() );  check("equal",             i == k);  check("infinity not equal",    i != int_type::neg_infinity());  check("infinity not equal",    i != int_type::pos_infinity());  int_type l = i + int_type::pos_infinity();  check("is special_value (pos_inf)", l.is_special());  check("add infinity" ,         l == int_type::pos_infinity());  check("inf - inf = nan",       (l - l) == int_type::not_a_number());  check("-inf + inf = nan",       (j + l) == int_type::not_a_number());  check("add 2",                 (i + 2) == 3);  i = int_type::not_a_number();  check("+inf * integer", (l * 2) == l);  check("+inf / integer", (l / 2) == l);  check("+inf \% -integer", (l % -2) == j);  check("+inf \% integer", (l % 2) == l);  check("+inf / -integer", (l / -2) == j);  check("+inf * -integer", (l * -2) == j);  check("+inf * -inf", (l * j) == j);  check("+inf / +inf", (l / l) == i);  check("+inf \% +inf", (l % l) == i);  check("+inf * zero", (l * 0) == i);  check("is special_value (nan)", i.is_special());  check("as_special convert", boost::date_time::not_a_date_time == i.as_special() );  check("add not a number",      (i + 2) == int_type::not_a_number());  check("sub not a number",      (i - 2) == int_type::not_a_number());  check("sub from infin",        (l - 2) == int_type::pos_infinity());  i = 5;  h = 3;  check("add zero ",             (i + 0) == 5);  check("sub from 5-2 ",         (i - 2) == 3);  check("remainder from 5/2 ",   (i % 2) == 1);  check("remainder from 5/3 ",   (i % h) == 2);  //  std::cout << i.as_number() << std::endl;  check("from special ",         int_type::from_special(boost::date_time::pos_infin) == int_type::pos_infinity());  check("from special ",         int_type::from_special(boost::date_time::neg_infin) == int_type::neg_infinity());  check("from special ",         int_type::from_special(boost::date_time::not_a_date_time) == int_type::not_a_number());  check("from special ",         int_type::from_special(boost::date_time::min_date_time) == int_type::min());  check("from special ",         int_type::from_special(boost::date_time::max_date_time) == int_type::max());}