MCPcopy Create free account
hub / github.com/HowardHinnant/date / test_H

Function test_H

test/date_test/parse.pass.cpp:443–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443void
444test_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
465void
466test_Ip()

Callers 1

mainFunction · 0.85

Calls 1

parseFunction · 0.85

Tested by

no test coverage detected