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

Function test_M

test/date_test/parse.pass.cpp:551–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549}
550
551void
552test_M()
553{
554 using namespace date;
555 using namespace std::chrono;
556 using date::sys_time;
557 {
558 std::istringstream in{"2016-12-11 15"};
559 sys_time<minutes> tp;
560 in >> parse("%F %M", tp);
561 assert(!in.fail());
562 assert(!in.bad());
563 assert(tp == sys_days{2016_y/12/11} + minutes{15});
564 }
565 {
566 std::istringstream in{"2016-12-11 65"};
567 sys_time<minutes> tp;
568 in >> parse("%F %M", tp);
569 assert(in.fail());
570 }
571}
572
573void
574test_S()

Callers 1

mainFunction · 0.85

Calls 1

parseFunction · 0.85

Tested by

no test coverage detected