Kaydet (Commit) 5478d5d8 authored tarafından Eike Rathke's avatar Eike Rathke

Add unit tests for ISO 8601 date+time input

Change-Id: Iab53f39313c1bac04fe5718823455e5ef0e52f13
üst 9b14d2ca
......@@ -1101,7 +1101,16 @@ void Test::testIsNumberFormat()
{ "5-12-14", false },
{ "005-12-14", true },
{ "15-10-30", true },
{ "2015-10-30", true }
{ "2015-10-30", true },
{ "1999-11-23T12:34:56", true },
{ "1999-11-23 12:34:56", true },
{ "1999-11-23T12:34:56.789", true },
{ "1999-11-23T12:34:56,789", true }, // ISO 8601 defines both dot and comma as fractional separator
{ "1999-11-23 12:34:56.789", true },
{ "1999-11-23 12:34:56,789", false }, // comma not in en-US if 'T' separator is not present,
// debatable, 'T' "may be omitted by mutual consent of those
// interchanging data, if ambiguity can be avoided."
{ "1999-11-23T12:34:56/789", false }
};
for (size_t i = 0; i < SAL_N_ELEMENTS(aTests); ++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment