libstdc++: Replace @require@ markup in some I/O tests

We can replace the @require@ markup with { dg-additional-files ... }
directives, so that the required files are explicitly named and are
explicitly copied into place for tests that require it. This will allow
a later change to remove the "Copy all required data files" step in the
proc libstdc++_init in testsuite/lib/libstdc++.exp that is marked TODO.
This commit uses dg-additional-files for a subset of the files that
contain @require@.

Also remove the @diff@ markup where appears to be copy & pasted from
other test files, and so serves no purpose. For example, there is no
output file created by 27_io/basic_ifstream/cons/char/1.cc so there is
nothing for @diff@ to compare. Maybe the purpose was to check that
reading the .tst file with an ifstream doesn't change it, but we've
survived without doing those comparisons for many years so I think we
can remove those cases of @diff@ markup.

libstdc++-v3/ChangeLog:

	* testsuite/27_io/basic_filebuf/close/char/2.cc: Remove
	@require@ and @diff@ markup. Use dg-additional-files. Remove
	unused variable.
	* testsuite/27_io/basic_filebuf/close/char/3.cc: Remove
	@require@ and @diff@ markup. Use dg-additional-files.
	* testsuite/27_io/basic_filebuf/close/char/4.cc: Likewise.
	* testsuite/27_io/basic_filebuf/close/char/5.cc: Likewise.
	* testsuite/27_io/basic_filebuf/in_avail/char/1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/is_open/char/1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/open/char/1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/open/char/2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/snextc/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/snextc/char/1-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/snextc/char/1-out.cc: Likewise.
	* testsuite/27_io/basic_filebuf/snextc/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/snextc/char/2-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc:
	Likewise.
	* testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc:
	Likewise.
	* testsuite/27_io/basic_filebuf/sputc/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sputc/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sputc/char/2-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sputn/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sputn/char/1-io.cc: Likewise.
	Remove unused variable.
	* testsuite/27_io/basic_filebuf/sputn/char/2-in.cc: Remove
	@require@ and @diff@ markup. Use dg-additional-files.
	* testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc: Likewise.
	* testsuite/27_io/basic_ifstream/cons/char/1.cc: Likewise.
	* testsuite/27_io/basic_ifstream/open/char/1.cc: Likewise.
	* testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc: Likewise.
	* testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
	Likewise.
	* testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc:
	Likewise.
	* testsuite/27_io/basic_istream/seekg/char/sstream.cc: Likewise.
	* testsuite/27_io/basic_istream/seekg/wchar_t/sstream.cc:
	Likewise.
	* testsuite/27_io/basic_istream/tellg/char/1.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/char/sstream.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/wchar_t/1.cc: Likewise.
	* testsuite/27_io/basic_istream/tellg/wchar_t/sstream.cc:
	Likewise.
	* testsuite/27_io/basic_ofstream/open/char/1.cc: Likewise.
	* testsuite/lib/dg-options.exp (dg-additional-files): Append to
	v3_additional_files instead of replacing.
	* testsuite/lib/libstdc++.exp (v3_target_compile): Reset
	v3_additional_files after copying files.
This commit is contained in:
Jonathan Wakely 2024-07-17 13:27:19 +01:00 committed by Jonathan Wakely
parent 3216b13165
commit dfd0753269
No known key found for this signature in database
57 changed files with 117 additions and 208 deletions

View file

@ -16,10 +16,9 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
// 27.8.1.3 filebuf member functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.8.1.3 filebuf member functions
// various tests for filebuf::open() and filebuf::close() including
// the non-portable functionality in the libstdc++-v3 IO library
@ -39,7 +38,6 @@
// this bug/situation.
const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
const char name_02[] = "filebuf_virtuals-2.txt"; // empty file, need to create
void test_02()
{

View file

@ -17,13 +17,12 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.3 filebuf member functions
#include <fstream>
#include <testsuite_hooks.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
// { dg-additional-files "filebuf_virtuals-1.txt" }
// NB: This test assumes that _M_buf_size == 40, and not the usual
// buffer_size length of BUFSIZ (8192), so that overflow/underflow can be

View file

@ -18,10 +18,9 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
// 27.8.1.3 filebuf member functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.8.1.3 filebuf member functions
// Test that upon filebuf::close() 27.8.1.1,3 is enforced.

View file

@ -17,11 +17,11 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.3 filebuf member functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.8.1.3 filebuf member functions
// Test that upon filebuf::close() 27.8.1.1,3 is enforced.
// { dg-additional-files "filebuf_virtuals-1.txt" }
// Test that upon filebuf::close() 27.8.1.1 p3 is enforced.
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -17,16 +17,14 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
// NB: This test assumes that _M_buf_size == 40, and not the usual
// buffer_size length of BUFSIZ (8192), so that overflow/underflow can be
// simulated a bit more readily.

View file

@ -15,14 +15,13 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.3 filebuf member functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.8.1.3 filebuf member functions
// various tests for filebuf::open() and filebuf::close() including
// the non-portable functionality in the libstdc++-v3 IO library
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_members-1.tst filebuf_members-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -15,14 +15,13 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.3 filebuf member functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.8.1.3 filebuf member functions
// various tests for filebuf::open() and filebuf::close() including
// the non-portable functionality in the libstdc++-v3 IO library
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_members-1.tst filebuf_members-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -15,14 +15,13 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.3 filebuf member functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.8.1.3 filebuf member functions
// various tests for filebuf::open() and filebuf::close() including
// the non-portable functionality in the libstdc++-v3 IO library
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <unistd.h>

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
const char name_03[] = "tmp_sbumpc_1io.tst"; // empty file, need to create

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
const char name_03[] = "tmp_sbumpc_2io.tst"; // empty file, need to create

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "seekoff.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "seekoff.txt";
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "seekoff-1out.tst" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "seekoff-1out.tst";
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "seekoff.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "seekoff.txt";
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "seekoff-2out.tst" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "seekoff-2out.tst";
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "seekpos.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "seekpos.txt"; // file with data in it
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "seekpos-1out.tst" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "seekpos-1out.tst"; // file with data in it
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "seekpos.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "seekpos.txt"; // file with data in it
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "seekpos-2out.tst" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "seekpos-2out.tst"; // file with data in it
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
// Test overloaded virtual functions.

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
const char name_03[] = "tmp_sgetc_1io.tst"; // empty file, need to create

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
// Test overloaded virtual functions.

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
const char name_03[] = "tmp_sgetc_2io.tst"; // empty file, need to create

View file

@ -21,18 +21,16 @@
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm*-*-elf arm*-*-eabi } }
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-require-binary-io "" }
// { dg-additional-files "sgetn.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetn.txt"; // file with data in it
// Test overloaded virtual functions.

View file

@ -21,18 +21,16 @@
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm*-*-elf arm*-*-eabi } }
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-require-binary-io "" }
// { dg-additional-files "sgetn.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetn.txt"; // file with data in it
const char name_03[] = "tmp_sgetn_1io.tst"; // empty file, need to create

View file

@ -21,18 +21,16 @@
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm*-*-elf arm*-*-eabi } }
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-require-binary-io "" }
// { dg-additional-files "sgetn.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetn.txt"; // file with data in it
// Test overloaded virtual functions.

View file

@ -21,18 +21,16 @@
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm*-*-elf arm*-*-eabi } }
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-require-binary-io "" }
// { dg-additional-files "sgetn.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetn.txt"; // file with data in it
const char name_03[] = "tmp_sgetn_2io.tst"; // empty file, need to create

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
const char name_02[] = "tmp_snextc_1out.tst"; // empty file, need to create
const char name_03[] = "tmp_snextc_1io.tst"; // empty file, need to create

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
const char name_02[] = "tmp_snextc_1out.tst"; // empty file, need to create
const char name_03[] = "tmp_snextc_1io.tst"; // empty file, need to create

View file

@ -17,15 +17,14 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
const char name_02[] = "tmp_snextc_1out.tst"; // empty file, need to create
const char name_03[] = "tmp_snextc_1io.tst"; // empty file, need to create

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
const char name_03[] = "tmp_snextc_2io.tst"; // empty file, need to create

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
// Test overloaded virtual functions.

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
// Test overloaded virtual functions.

View file

@ -17,15 +17,14 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
void test05()

View file

@ -17,15 +17,14 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
void test05()

View file

@ -17,17 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
const char name_03[] = "tmp_sputc_2io.tst";

View file

@ -17,15 +17,14 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
void test05()

View file

@ -17,18 +17,15 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
const char name_03[] = "tmp_sputn_1io.tst"; // empty file, need to create
void test05()

View file

@ -17,15 +17,14 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
void test05()

View file

@ -25,8 +25,7 @@
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
// { dg-additional-files "sgetc.txt" }
const char name_01[] = "sgetc.txt"; // file with data in it

View file

@ -20,14 +20,12 @@
// 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetc.txt" }
#include <fstream>
#include <testsuite_hooks.h>
#include <testsuite_io.h>
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %*.txt
const char name_01[] = "sgetc.txt"; // file with data in it
// Test overloaded virtual functions.

View file

@ -15,11 +15,10 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.7 ifstream member functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.8.1.7 ifstream member functions
// { dg-require-fileio "" }
// { dg-additional-files "ifstream_members-1.tst" }
#include <istream>
#include <fstream>

View file

@ -15,11 +15,10 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.7 ifstream member functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.8.1.7 ifstream member functions
// { dg-require-fileio "" }
// { dg-additional-files "ifstream_members-1.tst" }
#include <istream>
#include <fstream>

View file

@ -15,17 +15,12 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.7 ifstream member functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.8.1.7 ifstream member functions
#include <istream>
#include <fstream>
#include <testsuite_hooks.h>
const char name_01[] = "ifstream_members-1.tst";
const char name_02[] = "ifstream_members-1.txt";
void
redirect_buffer(std::ios& stream, std::streambuf* new_buf)
{ stream.rdbuf(new_buf); }
@ -37,10 +32,6 @@ active_buffer(std::ios& stream)
// libstdc++/2832
void test03()
{
const char* strlit01 = "fuck war";
const std::string str00;
const std::string str01(strlit01);
std::string str02;
std::filebuf fbuf;
std::streambuf* pbasebuf0 = &fbuf;

View file

@ -21,12 +21,11 @@
// causes "in_avail" to return an incorrect value.
// { dg-do run { xfail arm*-*-elf arm*-*-eabi } }
// 27.6.1.3 unformatted input functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.6.1.3 unformatted input functions
// { dg-require-fileio "" }
// { dg-require-binary-io "" }
// { dg-additional-files "istream_unformatted-1.tst" }
#include <istream>
#include <fstream>

View file

@ -21,10 +21,9 @@
// { dg-require-binary-io "" }
// { dg-require-fileio "" }
// { dg-additional-files "wistream_unformatted-1.tst" }
// 27.6.1.3 unformatted input functions
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// C++98 27.6.1.3 unformatted input functions
#include <istream>
#include <fstream>

View file

@ -17,12 +17,11 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.6.1.3 unformatted input functions
// C++98 27.6.1.3 unformatted input functions
// NB: ostream has a particular "seeks" category. Adopt this for istreams too.
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// { dg-require-fileio "" }
// { dg-additional-files "istream_seeks-1.tst" }
#include <istream>
#include <sstream>

View file

@ -17,12 +17,11 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.6.1.3 unformatted input functions
// C++98 27.6.1.3 unformatted input functions
// NB: ostream has a particular "seeks" category. Adopt this for istreams too.
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// { dg-require-fileio "" }
// { dg-additional-files "wistream_seeks-1.tst" }
#include <istream>
#include <sstream>

View file

@ -17,12 +17,11 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.6.1.3 unformatted input functions
// C++98 27.6.1.3 unformatted input functions
// NB: ostream has a particular "seeks" category. Adopt this for istreams too.
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// { dg-require-fileio "" }
// { dg-additional-files "istream_seeks-1.tst" }
#include <istream>
#include <sstream>

View file

@ -17,12 +17,11 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.6.1.3 unformatted input functions
// C++98 27.6.1.3 unformatted input functions
// NB: ostream has a particular "seeks" category. Adopt this for istreams too.
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// { dg-require-fileio "" }
// { dg-additional-files "istream_seeks-1.tst" }
#include <istream>
#include <sstream>

View file

@ -16,11 +16,10 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "wistream_seeks-1.tst" }
// 27.6.1.3 unformatted input functions
// C++98 27.6.1.3 unformatted input functions
// NB: ostream has a particular "seeks" category. Adopt this for istreams too.
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
#include <istream>
#include <sstream>

View file

@ -15,12 +15,11 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.6.1.3 unformatted input functions
// C++98 27.6.1.3 unformatted input functions
// NB: ostream has a particular "seeks" category. Adopt this for istreams too.
// @require@ %-*.tst %-*.txt
// @diff@ %-*.tst %-*.txt
// { dg-require-fileio "" }
// { dg-additional-files "wistream_seeks-1.tst" }
#include <istream>
#include <sstream>

View file

@ -15,8 +15,9 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.10 ofstream member functions
// @require@ %-*.tst
// C++98 27.8.1.10 ofstream member functions
// { dg-additional-files "ofstream_members-1.tst" }
// @diff@ %-*.tst %-*.txt
// { dg-require-fileio "" }

View file

@ -405,5 +405,5 @@ set v3_additional_files ""
# Process a { dg-additional-files "filelist" } directive in the test.
proc dg-additional-files { line filelist } {
global v3_additional_files
set v3_additional_files $filelist
append v3_additional_files " " $filelist
}

View file

@ -648,6 +648,7 @@ proc v3_target_compile { source dest type options } {
global srcdir
v3-copy-file "$srcdir/data/$file" $file
}
set v3_additional_files {}
set comp_output [target_compile $source $dest $type $options]
if { $type == "executable" && $file_to_delete != "" } {