summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-08-19 22:30:31 +0200
committerMax Kellermann <max@musicpd.org>2019-12-16 23:24:43 +0100
commitba4cd47fd8cb853f1b4e04c7dcb5221bb0c05150 (patch)
tree04e1332b4c63472b59636af05eaed5810c0c41b9 /test
parentbbe403f141f8d37cc3776d72891ffe4523e59b26 (diff)
time/ISO8601: allow omitting the time of day
Diffstat (limited to 'test')
-rw-r--r--test/TestISO8601.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/TestISO8601.cxx b/test/TestISO8601.cxx
index 59849a0b8..d5e8dd2dc 100644
--- a/test/TestISO8601.cxx
+++ b/test/TestISO8601.cxx
@@ -45,6 +45,12 @@ static constexpr struct {
{ "2019-02-04T16:46:41Z", 1549298801, std::chrono::seconds(1) },
{ "2018-12-31T23:59:59Z", 1546300799, std::chrono::seconds(1) },
{ "2019-01-01T00:00:00Z", 1546300800, std::chrono::seconds(1) },
+
+ /* only date */
+ { "1970-01-01", 0, std::chrono::hours(24) },
+ { "2019-02-04", 1549238400, std::chrono::hours(24) },
+ { "2018-12-31", 1546214400, std::chrono::hours(24) },
+ { "2019-01-01", 1546300800, std::chrono::hours(24) },
};
TEST(ISO8601, Parse)