| 441 | } |
| 442 | |
| 443 | void |
| 444 | test_H() |
| 445 | { |
| 446 | using namespace date; |
| 447 | using namespace std::chrono; |
| 448 | using date::sys_time; |
| 449 | { |
| 450 | std::istringstream in{"2016-12-11 15"}; |
| 451 | sys_time<hours> tp; |
| 452 | in >> parse("%F %H", tp); |
| 453 | assert(!in.fail()); |
| 454 | assert(!in.bad()); |
| 455 | assert(tp == sys_days{2016_y/12/11} + hours{15}); |
| 456 | } |
| 457 | { |
| 458 | std::istringstream in{"2016-12-11 24"}; |
| 459 | sys_time<hours> tp; |
| 460 | in >> parse("%F %H", tp); |
| 461 | assert(in.fail()); |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | void |
| 466 | test_Ip() |