diff options
author | Jerry Quinn <jlquinn@optonline.net> | 2003-07-01 05:44:42 +0000 |
---|---|---|
committer | Jerry Quinn <jlquinn@gcc.gnu.org> | 2003-07-01 05:44:42 +0000 |
commit | 5ee78c21f1ba4f4451dfe3721c12d5cb56c28864 (patch) | |
tree | 8e14aa152117afa01a8f4eac31ba0ce132b03eb9 | |
parent | e97ee22ea59e2314ee8669cb2d99ab3814732376 (diff) | |
download | gcc-5ee78c21f1ba4f4451dfe3721c12d5cb56c28864.zip gcc-5ee78c21f1ba4f4451dfe3721c12d5cb56c28864.tar.gz gcc-5ee78c21f1ba4f4451dfe3721c12d5cb56c28864.tar.bz2 |
7.cc: New.
2003-07-01 Jerry Quinn <jlquinn@optonline.net>
* 22_locale/num_put/put/char/7.cc: New.
* 22_locale/num_put/put/wchar_t/7.cc: New.
From-SVN: r68762
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc | 41 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc | 42 |
3 files changed, 88 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 930c0d8..fcdb9e0 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-07-01 Jerry Quinn <jlquinn@optonline.net> + + * 22_locale/num_put/put/char/7.cc: New. + * 22_locale/num_put/put/wchar_t/7.cc: New. + 2003-06-30 Jerry Quinn <jlquinn@optonline.net> * src/locale.cc (__use_cache<numpunct>): 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 0000000..1066c56 --- /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 <iostream> +#include <locale> + +// libstdc++/9828 +void test01() +{ + using namespace std; + typedef num_put<char> np_t; + + ostringstream stream; + const np_t& np = use_facet<np_t>(stream.getloc()); + + np.put(stream, wcout, ' ', static_cast<long>(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 0000000..12e8a5f --- /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 <sstream> +#include <iostream> +#include <locale> + +// libstdc++/9828 +void test01() +{ + using namespace std; + typedef num_put<wchar_t> npw_t; + + wostringstream stream; + const npw_t& npw = use_facet<npw_t>(stream.getloc()); + + npw.put(stream, cout, L' ', static_cast<long>(10)); + VERIFY( stream.str() == L' '); +} + +int main() +{ + test01(); + return 0; +} |