Commit a98c14f4 by Paolo Carlini Committed by Paolo Carlini

testsuite_hooks.h (test_tm(unsigned)): Change to take all the tm members.

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.

From-SVN: r109407
parent 2f94c68c
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.
* testsuite/testsuite_hooks.cc (test_tm(unsigned)): Define.
* testsuite/22_locale/time_put/put/wchar_t/10.cc: Use it.
......
......@@ -47,7 +47,7 @@ void test01()
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
......
......@@ -47,8 +47,8 @@ void test01()
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);
......
......@@ -52,7 +52,7 @@ void test02()
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
......
......@@ -38,7 +38,7 @@ void test03()
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;
......
......@@ -48,7 +48,7 @@ void test01()
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
......
......@@ -47,8 +47,8 @@ void test01()
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);
......
......@@ -52,7 +52,7 @@ void test02()
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
......
......@@ -38,7 +38,7 @@ void test03()
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;
......
......@@ -38,7 +38,7 @@ void test01()
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&,
......
......@@ -40,7 +40,7 @@ void test02()
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;
......
......@@ -38,7 +38,7 @@ void test01()
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&,
......
......@@ -40,7 +40,7 @@ void test02()
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;
......
......@@ -50,7 +50,7 @@ void test01()
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
......
......@@ -39,7 +39,7 @@ void test02()
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;
......
......@@ -38,7 +38,7 @@ void test03()
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;
......
......@@ -46,7 +46,7 @@ void test01()
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);
......
......@@ -50,7 +50,7 @@ void test01()
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
......
......@@ -39,7 +39,7 @@ void test02()
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;
......
......@@ -38,7 +38,7 @@ void test03()
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;
......
......@@ -46,7 +46,7 @@ void test01()
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);
......
......@@ -47,7 +47,7 @@ void test01()
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&,
......
......@@ -52,7 +52,7 @@ void test02()
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);
......
......@@ -38,7 +38,7 @@ void test03()
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;
......
......@@ -47,7 +47,7 @@ void test01()
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&,
......
......@@ -52,7 +52,7 @@ void test02()
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);
......
......@@ -38,7 +38,7 @@ void test03()
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;
......
......@@ -47,7 +47,7 @@ void test01()
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
......
......@@ -38,7 +38,7 @@ void test03()
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;
......
......@@ -47,7 +47,7 @@ void test01()
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
......
......@@ -38,7 +38,7 @@ void test03()
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;
......
......@@ -32,7 +32,7 @@ void test01()
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();
......
......@@ -40,7 +40,7 @@ void test10()
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));
......
......@@ -35,7 +35,7 @@ void test01()
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();
......
......@@ -34,7 +34,7 @@ void test02()
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();
......
......@@ -34,7 +34,7 @@ void test03()
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();
......
......@@ -34,7 +34,7 @@ void test04()
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();
......
......@@ -33,7 +33,7 @@ void test05()
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";
......
......@@ -35,7 +35,7 @@ void test06()
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";
......
......@@ -35,7 +35,7 @@ void test07()
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";
......
......@@ -35,7 +35,7 @@ void test08()
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";
......
......@@ -40,7 +40,7 @@ void test09()
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;
......
......@@ -32,7 +32,7 @@ void test01()
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();
......
......@@ -40,7 +40,7 @@ void test10()
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));
......
......@@ -35,7 +35,7 @@ void test01()
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();
......
......@@ -34,7 +34,7 @@ void test02()
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();
......
......@@ -34,7 +34,7 @@ void test03()
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();
......
......@@ -34,7 +34,7 @@ void test04()
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();
......
......@@ -33,7 +33,7 @@ void test05()
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";
......
......@@ -35,7 +35,7 @@ void test06()
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";
......
......@@ -35,7 +35,7 @@ void test07()
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";
......
......@@ -35,7 +35,7 @@ void test08()
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";
......
......@@ -40,7 +40,7 @@ void test09()
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;
......
......@@ -305,24 +305,19 @@ namespace __gnu_test
// 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
......@@ -387,7 +387,8 @@ 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
......
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