libstdc++: Clean up @diff@ markup in some I/O tests
We have a number of 27_io/* tests with comments like this: // @require@ %-*.tst // @diff@ %-*.tst %-*.txt It seems that these declare required data files used by the test and a post-test action to compare the test output with the expected result. We do have tests that depend on some *.tst and/or *.txt files that are copied from testsuite/data into each test's working directory before it runs, so the comments are related to those dependencies. However, nothing in the current test framework actually makes use of these comments. Currently, every test gets a fresh copy of every *.tst and *.txt file in the testsuite/data directory, whether the test actually requires them or not. This change is the first in a series to clean up this unused markup in the tests. This first step is to just remove all @require@ and @diff@ comments where they seem to serve no purpose at all. These tests do not open any of the *.tst or *.txt files that are copied into the test's working directory from the testsuite/data directory, so they don't "require" any of those files, and there's no need to "diff" them after the test runs. libstdc++-v3/ChangeLog: * testsuite/27_io/basic_filebuf/close/char/4879.cc: Remove @require@ and @diff@ comments. * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise. * testsuite/27_io/basic_filebuf/open/char/3.cc: Likewise. * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise. * testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc: Likewise. * testsuite/27_io/basic_filebuf/snextc/char/2-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc: Likewise. * testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc: Likewise. * testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sputc/char/1-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sputc/char/2-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sputn/char/1-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sputn/char/2-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc: Likewise. * testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc: Likewise. * testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc: Likewise. * testsuite/27_io/basic_filebuf/sputc/char/1-io.cc: Likewise. Remove unused variable. * testsuite/27_io/basic_filebuf/sputn/char/2-io.cc: Likewise. * testsuite/27_io/basic_ofstream/cons/char/1.cc: Remove @require@ and @diff@ comments. Remove unused variables. * testsuite/27_io/basic_ofstream/rdbuf/char/2832.cc: Remove * testsuite/27_io/ios_base/sync_with_stdio/2.cc: Likewise.
This commit is contained in:
parent
93ced50d1c
commit
3216b13165
28 changed files with 24 additions and 109 deletions
|
@ -18,9 +18,7 @@
|
|||
// 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
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
// 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
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
// 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
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
// 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
|
||||
|
|
|
@ -17,15 +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.4 Overridden virtual functions
|
||||
|
||||
#include <fstream>
|
||||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sbumpc_1out.tst"; // empty file, need to create
|
||||
|
||||
void test05()
|
||||
|
|
|
@ -17,15 +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.4 Overridden virtual functions
|
||||
|
||||
#include <fstream>
|
||||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sbumpc_2out.tst"; // empty file, need to create
|
||||
|
||||
void test05()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sgetc_1out.tst"; // empty file, need to create
|
||||
|
||||
// Test overloaded virtual functions.
|
||||
|
|
|
@ -17,15 +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.4 Overridden virtual functions
|
||||
|
||||
#include <fstream>
|
||||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sgetc_2out.tst"; // empty file, need to create
|
||||
|
||||
// Test overloaded virtual functions.
|
||||
|
|
|
@ -17,15 +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.4 Overridden virtual functions
|
||||
|
||||
#include <fstream>
|
||||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sgetn_1out.tst"; // empty file, need to create
|
||||
|
||||
// Test overloaded virtual functions.
|
||||
|
|
|
@ -17,15 +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.4 Overridden virtual functions
|
||||
|
||||
#include <fstream>
|
||||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sgetn_2out.tst"; // empty file, need to create
|
||||
|
||||
// Test overloaded virtual functions.
|
||||
|
|
|
@ -17,15 +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.4 Overridden virtual functions
|
||||
|
||||
#include <fstream>
|
||||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_snextc_2out.tst"; // empty file, need to create
|
||||
|
||||
void test05()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_01[] = "tmp_sputbackc_1io.tst"; // empty file, need to create
|
||||
|
||||
void test01()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_01[] = "tmp_sputbackc_1out.tst"; // empty file, need to create
|
||||
|
||||
// Test overloaded virtual functions.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_01[] = "tmp_sputbackc_2io.tst"; // empty file, need to create
|
||||
|
||||
void test01()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_01[] = "tmp_sputbackc_2out.tst"; // empty file, need to create
|
||||
|
||||
// Test overloaded virtual functions.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,10 +25,6 @@
|
|||
#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_1io.tst";
|
||||
|
||||
void test05()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sputc_1out.tst"; // empty file, need to create
|
||||
|
||||
void test05()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sputc_2out.tst"; // empty file, need to create
|
||||
|
||||
void test05()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sputn_1out.tst"; // empty file, need to create
|
||||
|
||||
void test05()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,10 +25,6 @@
|
|||
#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_2io.tst"; // empty file, need to create
|
||||
|
||||
void test05()
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
// 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 "" }
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_02[] = "tmp_sputn_2out.tst"; // empty file, need to create
|
||||
|
||||
void test05()
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_01[] = "tmp_sungetc_1io.tst"; // empty file, need to create
|
||||
|
||||
void test01()
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_01[] = "tmp_sungetc_1out.tst"; // empty file, need to create
|
||||
|
||||
// Test overloaded virtual functions.
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_01[] = "tmp_sungetc_2io.tst"; // empty file, need to create
|
||||
|
||||
void test01()
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_io.h>
|
||||
|
||||
// @require@ %-*.tst %-*.txt
|
||||
// @diff@ %-*.tst %*.txt
|
||||
|
||||
const char name_01[] = "tmp_sungetc_2out.tst"; // empty file, need to create
|
||||
|
||||
// Test overloaded virtual functions.
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// 27.8.1.10 ofstream member functions
|
||||
// @require@ %-*.tst
|
||||
// @diff@ %-*.tst %-*.txt
|
||||
// C++98 27.8.1.10 ofstream member functions
|
||||
|
||||
// { dg-require-fileio "" }
|
||||
|
||||
|
|
|
@ -15,16 +15,12 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// 27.8.1.10 ofstream member functions
|
||||
// @require@ %-*.tst
|
||||
// @diff@ %-*.tst %-*.txt
|
||||
// C++98 27.8.1.10 ofstream member functions
|
||||
|
||||
#include <ostream>
|
||||
#include <fstream>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
const char name_01[] = "ofstream_members-1.tst";
|
||||
|
||||
void
|
||||
redirect_buffer(std::ios& stream, std::streambuf* new_buf)
|
||||
{ stream.rdbuf(new_buf); }
|
||||
|
@ -36,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;
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// 27.4.2.4 ios_base static members
|
||||
// @require@ %-*.tst
|
||||
// @diff@ %-*.tst %-*.txt
|
||||
// C++98 27.4.2.4 ios_base static members
|
||||
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
|
|
Loading…
Add table
Reference in a new issue