diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 930c0d894ddb..fcdb9e01e977 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-07-01 Jerry Quinn + + * 22_locale/num_put/put/char/7.cc: New. + * 22_locale/num_put/put/wchar_t/7.cc: New. + 2003-06-30 Jerry Quinn * src/locale.cc (__use_cache): Revert previous relocation. diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc new file mode 100644 index 000000000000..1066c566b3d0 --- /dev/null +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc @@ -0,0 +1,41 @@ +// 2003-06-30 peturr02@ru.is + +// Copyright (C) 2003 Free Software Foundation +// +// 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include +#include + +// libstdc++/9828 +void test01() +{ + using namespace std; + typedef num_put np_t; + + ostringstream stream; + const np_t& np = use_facet(stream.getloc()); + + np.put(stream, wcout, ' ', static_cast(10)); + VERIFY( stream.str() == ' '); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc new file mode 100644 index 000000000000..12e8a5f3d051 --- /dev/null +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc @@ -0,0 +1,42 @@ +// 2003-06-30 peturr02@ru.is + +// Copyright (C) 2003 Free Software Foundation +// +// 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +#include +#include +#include + +// libstdc++/9828 +void test01() +{ + using namespace std; + typedef num_put npw_t; + + wostringstream stream; + const npw_t& npw = use_facet(stream.getloc()); + + npw.put(stream, cout, L' ', static_cast(10)); + VERIFY( stream.str() == L' '); +} + +int main() +{ + test01(); + return 0; +}