Author: sebor
Date: Tue Jun 13 15:39:21 2006
New Revision: 413995
URL: http://svn.apache.org/viewvc?rev=413995&view=rev
Log:
2006-06-13 Martin Sebor <[EMAIL PROTECTED]>
* 22.locale.time.put.cpp (test_POSIX): Avoided exercising the "%Z"
directive with an invalid tm object (tm_isdst < 0). Added a couple
of test cases for the same directive (but with a valid tm object).
See STDCXX-201.
Modified:
incubator/stdcxx/trunk/tests/localization/22.locale.time.put.cpp
Modified: incubator/stdcxx/trunk/tests/localization/22.locale.time.put.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.time.put.cpp?rev=413995&r1=413994&r2=413995&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/localization/22.locale.time.put.cpp (original)
+++ incubator/stdcxx/trunk/tests/localization/22.locale.time.put.cpp Tue Jun 13
15:39:21 2006
@@ -1508,12 +1508,23 @@
rw_putenv ("TZ=foo0bar1");
TEST (T (0, 0, 0, 1, 0, 0, 0, 0, 0), "%Z", 0, 0, ' ', "foo");
TEST (T (0, 0, 0, 1, 0, 0, 0, 0, 1), "%Z", 0, 0, ' ', "bar");
- TEST (T (0, 0, 0, 1, 0, 0, 0, 0, -1), "%Z", 0, 0, ' ', "bar");
+
+ // the behavior when tmb is invalid (e.g., when (tm_isdst < 0))
+ // is undefined, avoid exercising it
+ // TEST (T (0, 0, 0, 1, 0, 0, 0, 0, -1), "%Z", 0, 0, ' ', "bar");
rw_putenv ("TZ=EST1EDT2");
TEST (T (0, 0, 0, 1, 0, 0, 0, 0, 0), "%Z", 0, 0, ' ', "EST");
TEST (T (0, 0, 0, 1, 0, 0, 0, 0, 1), "%Z", 0, 0, ' ', "EDT");
- TEST (T (0, 0, 0, 1, 0, 0, 0, 0, -1), "%Z", 0, 0, ' ', "EDT");
+
+ // the behavior when tmb is invalid (e.g., when (tm_isdst < 0))
+ // is undefined, avoid exercising it
+ // TEST (T (0, 0, 0, 1, 0, 0, 0, 0, -1), "%Z", 0, 0, ' ', "EDT");
+
+ // exercise two-digit hour
+ rw_putenv ("TZ=ABCD01DEFG02");
+ TEST (T (0, 0, 0, 1, 0, 0, 0, 0, 0), "%Z", 0, 0, ' ', "ABCD");
+ TEST (T (0, 0, 0, 1, 0, 0, 0, 0, 1), "%Z", 0, 0, ' ', "DEFG");
//////////////////////////////////////////////////////////////////
// %%: replaced by %