OSDN Git Service

2003-07-01 Jerry Quinn <jlquinn@optonline.net>
authorjlquinn <jlquinn@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Jul 2003 05:44:42 +0000 (05:44 +0000)
committerjlquinn <jlquinn@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Jul 2003 05:44:42 +0000 (05:44 +0000)
* 22_locale/num_put/put/char/7.cc: New.
* 22_locale/num_put/put/wchar_t/7.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68762 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc [new file with mode: 0644]

index 930c0d8..fcdb9e0 100644 (file)
@@ -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 (file)
index 0000000..1066c56
--- /dev/null
@@ -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 (file)
index 0000000..12e8a5f
--- /dev/null
@@ -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;
+}