]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/2.cc
cea71c3a31d2898b282310deb17e8715b525551b
4 // Copyright (C) 1999-2013 Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
21 // 27.6.2.5.4 basic_ostream character inserters
22 // @require@ %-*.tst %-*.txt
23 // @diff@ %-*.tst %-*.txt
27 #include <testsuite_hooks.h>
29 // via Brent Verner <brent@rcfile.org>
30 // http://gcc.gnu.org/ml/libstdc++/2000-06/msg00005.html
36 typedef ios::pos_type pos_type
;
38 const char* TEST_IN
= "ostream_inserter_other_in";
39 const char* TEST_OUT
= "ostream_inserter_other_out";
40 pos_type i_read
, i_wrote
, rs
, ws
;
41 double tf_size
= BUFSIZ
* 2.5;
42 ofstream
testfile(TEST_IN
);
44 for (int i
= 0; i
< tf_size
; ++i
)
49 ofstream
out(TEST_OUT
);
51 in
.seekg(0, ios_base::beg
);
52 out
.seekp(0, ios_base::beg
);
55 in
.seekg(0, ios_base::end
);
56 out
.seekp(0, ios_base::end
);
57 i_read
= in
.tellg() - rs
;
58 i_wrote
= out
.tellp() - ws
;