[glib: 5/6] tests: Add more ISO 8601 parser tests
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 5/6] tests: Add more ISO 8601 parser tests
- Date: Tue, 7 Aug 2018 09:59:45 +0000 (UTC)
commit 2ab7fd2951fdec42c3ef6350c7c862ccdf32c2a1
Author: Philip Withnall <withnall endlessm com>
Date: Mon Aug 6 13:59:45 2018 +0100
tests: Add more ISO 8601 parser tests
These come from looking at the code coverage data. We should now have
full branch coverage of the ISO 8601 parser.
Signed-off-by: Philip Withnall <withnall endlessm com>
glib/tests/timer.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/glib/tests/timer.c b/glib/tests/timer.c
index dc08d4c7c..f40a278b4 100644
--- a/glib/tests/timer.c
+++ b/glib/tests/timer.c
@@ -168,6 +168,15 @@ test_timeval_from_iso8601 (void)
{ FALSE, "20180803T140863.446178377+0100", { 0, 0 } },
{ FALSE, "20180803T140805.446178377+10000", { 0, 0 } },
{ FALSE, "20180803T140805.446178377+0160", { 0, 0 } },
+ { TRUE, "+1980-02-22T12:36:00+02:00", { 320063760, 0 } },
+ { FALSE, "-0005-01-01T00:00:00Z", { 0, 0 } },
+ { FALSE, "2018-08-06", { 0, 0 } },
+ { FALSE, "2018-08-06 13:51:00Z", { 0, 0 } },
+ { TRUE, "20180803T140805,446178377+0100", { 1533301685, 446178 } },
+ { TRUE, "2018-08-03T14:08:05.446178377-01:00", { 1533308885, 446178 } },
+ { FALSE, "2018-08-03T14:08:05.446178377 01:00", { 0, 0 } },
+ { TRUE, "1990-11-01T10:21:17", { 657454877, 0 } },
+ { TRUE, "1990-11-01T10:21:17 ", { 657454877, 0 } },
};
GTimeVal out;
gboolean success;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]