#include <locale>
#include <sstream>
#include <testsuite_hooks.h>
void test01()
{
using namespace std;
typedef ostreambuf_iterator<char> iterator_type;
bool test __attribute__((unused)) = true;
tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
locale loc_c = locale::classic();
const string empty;
ostringstream oss;
oss.imbue(loc_c);
const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
oss.str(empty);
iterator_type os_it01 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a');
string result1 = oss.str();
VERIFY( result1 == "Sun" );
oss.str(empty);
iterator_type os_it21 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x');
string result21 = oss.str(); VERIFY( result21 == "04/04/71" );
oss.str(empty);
iterator_type os_it22 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X');
string result22 = oss.str(); VERIFY( result22 == "12:00:00" );
oss.str(empty);
iterator_type os_it31 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E');
string result31 = oss.str(); VERIFY( result31 == "04/04/71" );
oss.str(empty);
iterator_type os_it32 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E');
string result32 = oss.str(); VERIFY( result32 == "12:00:00" );
}
int main()
{
test01();
return 0;
}