aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/testsuite_hooks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/testsuite_hooks.cc')
-rw-r--r--libstdc++-v3/testsuite/testsuite_hooks.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/testsuite_hooks.cc b/libstdc++-v3/testsuite/testsuite_hooks.cc
index 8d3d5309e27..40189fbf5d4 100644
--- a/libstdc++-v3/testsuite/testsuite_hooks.cc
+++ b/libstdc++-v3/testsuite/testsuite_hooks.cc
@@ -2,7 +2,7 @@
// Utility subroutines for the C++ library testsuite.
//
-// Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -302,4 +302,22 @@ namespace __gnu_test
std::__throw_runtime_error("could not wait for semaphore");
#endif
}
+
+ // For use in 22_locale/time_get and time_put.
+ tm
+ test_tm(int sec, int min, int hour, int mday, int mon,
+ int year, int wday, int yday, int isdst)
+ {
+ static tm tmp;
+ 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