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

Function test_t

test/date_test/parse.pass.cpp:940–963  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

938}
939
940void
941test_t()
942{
943 using namespace std;
944 using namespace date;
945 {
946 istringstream in{"05/04/17"};
947 year_month_day d1;
948 in >> parse("%t%D", d1);
949 assert(d1 == may/4/2017);
950 }
951 {
952 istringstream in{" 05/04/17"};
953 year_month_day d1;
954 in >> parse("%t%D", d1);
955 assert(d1 == may/4/2017);
956 }
957 {
958 istringstream in{" 05/04/17"};
959 year_month_day d1;
960 in >> parse("%t%D", d1);
961 assert(in.fail());
962 }
963}
964
965int
966main()

Callers 1

mainFunction · 0.85

Calls 1

parseFunction · 0.85

Tested by

no test coverage detected