+2006-01-05 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/testsuite_hooks.h (test_tm(unsigned)): Change to
+ take all the tm members.
+ * testsuite/testsuite_hooks.cc (test_tm): Adjust.
+ * testsuite/22_locale/time_put/put/wchar_t/10.cc: Update.
+ * testsuite/22_locale/time_put/put/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/4.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/6.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/7.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/8.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/9.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/17038.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/10.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/1.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/2.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/3.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/4.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/5.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/6.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/7.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/8.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/9.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/17038.cc: Likewise.
+ * testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_year/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/time_get/get_year/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_year/char/3.cc: Likewise.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_monthname/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_monthname/char/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/char/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_weekday/char/3.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/12750.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/12750.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_date/char/3.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/wchar_t/4.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/char/1.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/char/2.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/char/3.cc: Likewise.
+ * testsuite/22_locale/time_get/get_time/char/4.cc: Likewise.
+
2006-01-05 Paolo Carlini <pcarlini@suse.de>
* testsuite/testsuite_hooks.h (test_tm(unsigned)): New.
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday01 = __gnu_test::test_tm(2);
- const tm time_bday02 = __gnu_test::test_tm(3);
+ const tm time_bday01 = __gnu_test::test_tm(0, 0, 12, 2, 9, 103, 4, 274, -1);
+ const tm time_bday02 = __gnu_test::test_tm(0, 0, 12, 26, 9, 103, 0, 298, -1);
// inspection of named locales, is_IS
iss.imbue(loc_is);
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
const locale loc_c = locale::classic();
// Create "C" time objects
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
tm tm1;
istringstream iss;
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday01 = __gnu_test::test_tm(2);
- const tm time_bday02 = __gnu_test::test_tm(3);
+ const tm time_bday01 = __gnu_test::test_tm(0, 0, 12, 2, 9, 103, 4, 274, -1);
+ const tm time_bday02 = __gnu_test::test_tm(0, 0, 12, 26, 9, 103, 0, 298, -1);
// inspection of named locales, is_IS
iss.imbue(loc_is);
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
const locale loc_c = locale::classic();
// Create "C" time objects
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
tm tm1;
istringstream iss;
locale loc_c = locale::classic();
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_monthname(iter_type, iter_type, ios_base&,
VERIFY( loc_hk != loc_c );
VERIFY( loc_hk != loc_de );
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const string empty;
locale loc_c = locale::classic();
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_monthname(iter_type, iter_type, ios_base&,
VERIFY( loc_hk != loc_c );
VERIFY( loc_hk != loc_de );
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const wstring empty;
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// 2
// iter_type
VERIFY( loc_hk != loc_c );
const string empty;
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// create an ostream-derived object, cache the time_get facet
iterator_type end;
const locale loc_c = locale::classic();
// Create "C" time objects
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
tm tm1;
istringstream iss;
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(4);
+ const tm time_bday = __gnu_test::test_tm(60, 0, 12, 4, 3, 71, 0, 93, 0);
iss.str("12:00:60 ");
iterator_type is_it01(iss);
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// 2
// iter_type
VERIFY( loc_hk != loc_c );
const wstring empty;
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// create an ostream-derived object, cache the time_get facet
iterator_type end;
const locale loc_c = locale::classic();
// Create "C" time objects
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
tm tm1;
wistringstream iss;
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(4);
+ const tm time_bday = __gnu_test::test_tm(60, 0, 12, 4, 3, 71, 0, 93, 0);
iss.str(L"12:00:60 ");
iterator_type is_it01(iss);
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_weekday(iter_type, iter_type, ios_base&,
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// inspection of named locales, de_DE
iss.imbue(loc_de);
const locale loc_c = locale::classic();
// Create "C" time objects
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
tm tm1;
istringstream iss;
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_weekday(iter_type, iter_type, ios_base&,
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// inspection of named locales, de_DE
iss.imbue(loc_de);
const locale loc_c = locale::classic();
// Create "C" time objects
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
tm tm1;
wistringstream iss;
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_year(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
const locale loc_c = locale::classic();
// Create "C" time objects
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
tm tm1;
istringstream iss;
ios_base::iostate errorstate = good;
// create "C" time objects
- const tm time_bday = __gnu_test::test_tm(0);
+ const tm time_bday = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// iter_type
// get_year(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
const locale loc_c = locale::classic();
// Create "C" time objects
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
tm tm1;
istringstream iss;
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction
locale loc_c = locale::classic();
const locale loc_c = locale::classic();
const string x(50, 'x'); // have to have allocated string!
string res;
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
ostringstream oss;
oss.imbue(locale(loc_c, new time_put_type));
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction
locale loc_c = locale::classic();
bool test __attribute__((unused)) = true;
// create "C" time object
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction and sanity check
locale loc_c = locale::classic();
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction and sanity check.
locale loc_c = locale::classic();
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction and sanity check
locale loc_c = locale::classic();
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const char* date = "%A, the second of %B";
const char* date_ex = "%Ex";
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const char* date = "%A, the second of %B";
const char* date_ex = "%Ex";
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const char* date = "%A, the second of %B";
const char* date_ex = "%Ex";
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const char* date = "%A, the second of %B";
const char* date_ex = "%Ex";
const locale loc_c = locale::classic();
const string x(50, 'x'); // have to have allocated string!
string res;
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
const char* date = "%X, %A, the second of %B, %Y";
ostringstream oss;
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction
locale loc_c = locale::classic();
const locale loc_c = locale::classic();
const wstring x(50, 'x'); // have to have allocated wstring!
wstring res;
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
wostringstream oss;
oss.imbue(locale(loc_c, new time_put_type));
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction
locale loc_c = locale::classic();
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction and sanity check
locale loc_c = locale::classic();
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction and sanity check
locale loc_c = locale::classic();
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
// basic construction and sanity check
locale loc_c = locale::classic();
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const wchar_t* date = L"%A, the second of %B";
const wchar_t* date_ex = L"%Ex";
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const wchar_t* date = L"%A, the second of %B";
const wchar_t* date_ex = L"%Ex";
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const wchar_t* date = L"%A, the second of %B";
const wchar_t* date_ex = L"%Ex";
bool test __attribute__((unused)) = true;
// create "C" time objects
- const tm time1 = __gnu_test::test_tm(0);
+ const tm time1 = __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, 93, 0);
const wchar_t* date = L"%A, the second of %B";
const wchar_t* date_ex = L"%Ex";
const locale loc_c = locale::classic();
const wstring x(50, L'x'); // have to have allocated wstring!
wstring res;
- const tm time_sanity = __gnu_test::test_tm(1);
+ const tm time_sanity = __gnu_test::test_tm(0, 0, 12, 26, 5, 97, 2, 0, 0);
const wchar_t* date = L"%X, %A, the second of %B, %Y";
wostringstream oss;
// For use in 22_locale/time_get and time_put.
tm
- test_tm(unsigned index)
+ test_tm(int sec, int min, int hour, int mday, int mon,
+ int year, int wday, int yday, int isdst)
{
- const int data[5][9] = { { 0, 0, 12, 4, 3, 71, 0, 93, 0 },
- { 0, 0, 12, 26, 5, 97, 2, 0, 0 },
- { 0, 0, 12, 2, 9, 103, 4, 274, -1 },
- { 0, 0, 12, 26, 9, 103, 0, 298, -1 },
- { 60, 0, 12, 4, 3, 71, 0, 93, 0 } };
-
static tm tmp;
- tmp.tm_sec = data[index][0];
- tmp.tm_min = data[index][1];
- tmp.tm_hour = data[index][2];
- tmp.tm_mday = data[index][3];
- tmp.tm_mon = data[index][4];
- tmp.tm_year = data[index][5];
- tmp.tm_wday = data[index][6];
- tmp.tm_yday = data[index][7];
- tmp.tm_isdst = data[index][8];
+ tmp.tm_sec = sec;
+ tmp.tm_min = min;
+ tmp.tm_hour = hour;
+ tmp.tm_mday = mday;
+ tmp.tm_mon = mon;
+ tmp.tm_year = year;
+ tmp.tm_wday = wday;
+ tmp.tm_yday = yday;
+ tmp.tm_isdst = isdst;
return tmp;
}
}; // namespace __gnu_test
};
// For use in 22_locale/time_get and time_put.
- tm test_tm(unsigned);
+ tm test_tm(int sec, int min, int hour, int mday, int mon,
+ int year, int wday, int yday, int isdst);
} // namespace __gnu_test