1// Copyright (C) 2005, 2009 Free Software Foundation
2//
3// This file is part of the GNU ISO C++ Library.  This library is free
4// software; you can redistribute it and/or modify it under the
5// terms of the GNU General Public License as published by the
6// Free Software Foundation; either version 3, or (at your option)
7// any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License along
15// with this library; see the file COPYING3.  If not see
16// <http://www.gnu.org/licenses/>.
17
18// 27.6.2.5.4 basic_ostream character inserters
19
20#include <string>
21#include <ostream>
22#include <fstream>
23#include <testsuite_hooks.h>
24
25// ofstream
26void test01()
27{
28  std::wstring str01;
29  const int size = 1000;
30  const char name_02[] = "wostream_inserter_char-1.txt";
31
32  // initialize string
33  for(int i=0 ; i < size; i++) {
34    str01 += L'1';
35    str01 += L'2';
36    str01 += L'3';
37    str01 += L'4';
38    str01 += L'5';
39    str01 += L'6';
40    str01 += L'7';
41    str01 += L'8';
42    str01 += L'9';
43    str01 += L'\n';
44  }
45  std::wofstream f(name_02);
46
47  f << str01;
48  f.close();
49}
50
51int main()
52{
53  test01();
54  return 0;
55}
56