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

Function test_Z

test/date_test/parse.pass.cpp:848–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

846}
847
848void
849test_Z()
850{
851 using namespace date;
852 using namespace std::chrono;
853 using date::local_seconds, date::local_days;
854 {
855 std::string a;
856 std::istringstream in{"2016-12-26 15:53:22 word"};
857 local_seconds tp;
858 in >> parse("%F %T %Z", tp, a);
859 assert(!in.fail());
860 assert(!in.bad());
861 assert(tp == local_days{2016_y/12/26} + hours{15} + minutes{53} + seconds{22});
862 assert(a == "word");
863 }
864}
865
866void
867test_trailing_Z()

Callers 1

mainFunction · 0.85

Calls 1

parseFunction · 0.85

Tested by

no test coverage detected