From patchwork Mon Jul 22 16:28:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1963335 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ZkJqCtMQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WSQnL1VhSz1yZ7 for ; Tue, 23 Jul 2024 02:33:10 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 03493386102E for ; Mon, 22 Jul 2024 16:33:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 2C7713858C52 for ; Mon, 22 Jul 2024 16:30:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C7713858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2C7713858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721665871; cv=none; b=ltR8JA41jipKVzU9TUr28ZICncPRv8zN6geiWBpEM77tRCz0MUUcZ17eZE7uP1sprvXjS/FwBoCun6ovUQCT6YsmcGARP5HFZkakebpTI7r/L4rG+k5Tcwh4i1byLK38obd/8NhMea76+RGAKjF7D4v4kHoPZQuSUoV4h5pvKBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1721665871; c=relaxed/simple; bh=+HMp2Pi6NFdlpVRzW+kZQuH0RA8J1dADZD0swmuiqak=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VzCaoXMAKKR326+hciZfo5uQEp0KmBiGuvABdGxsztniNi/bx+xvHEjCwo5majDRTGYblLNBdBNFhYQVDYig6EK4kzCvR3AFOgl3sHdpKza4Gwr0nL3BaE2I6s+BUX93Vrpwt11J85/Zi6/JdkEkCEcM9mEIH5SrYpydmXDqtWQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721665821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FGzxqGaiXg57xSkm9twXeUPUfiYQpJrNhB84r5Zc1m4=; b=ZkJqCtMQ+UHl2Dqe8NHOgzAMxuVBVN1HmeK6CU2KuoB8oyvDtPZjDPdo42V6EEQ5SVudGP QJUOSOTXMLPNYqTd4Oyy1zpJyn4I7859UdBGFLMXYII7cNpAtEMczSgHwbSkYXyIblTloo kEdYaZMV0jV+2Upq/bVQnXk2bEO5FRY= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-0PAs41E5ND6YQ9FvS_pFjg-1; Mon, 22 Jul 2024 12:30:18 -0400 X-MC-Unique: 0PAs41E5ND6YQ9FvS_pFjg-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 54E8A1944B31; Mon, 22 Jul 2024 16:30:17 +0000 (UTC) Received: from localhost (unknown [10.42.28.14]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 33FC91955E80; Mon, 22 Jul 2024 16:30:14 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH 2/8] libstdc++: Replace @require@ markup in some I/O tests Date: Mon, 22 Jul 2024 17:28:36 +0100 Message-ID: <20240722163010.3508334-2-jwakely@redhat.com> In-Reply-To: <20240722163010.3508334-1-jwakely@redhat.com> References: <20240722163010.3508334-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Tested x86_64-linux. -- >8 -- 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. --- .../testsuite/27_io/basic_filebuf/close/char/2.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/close/char/3.cc | 5 ++--- .../testsuite/27_io/basic_filebuf/close/char/4.cc | 5 ++--- .../testsuite/27_io/basic_filebuf/close/char/5.cc | 8 ++++---- .../testsuite/27_io/basic_filebuf/in_avail/char/1.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/is_open/char/1.cc | 5 ++--- .../testsuite/27_io/basic_filebuf/open/char/1.cc | 5 ++--- .../testsuite/27_io/basic_filebuf/open/char/2.cc | 5 ++--- .../testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc | 6 ++---- .../27_io/basic_filebuf/seekoff/char/1-in.cc | 6 ++---- .../27_io/basic_filebuf/seekoff/char/1-out.cc | 6 ++---- .../27_io/basic_filebuf/seekoff/char/2-in.cc | 6 ++---- .../27_io/basic_filebuf/seekoff/char/2-out.cc | 6 ++---- .../27_io/basic_filebuf/seekpos/char/1-in.cc | 6 ++---- .../27_io/basic_filebuf/seekpos/char/1-out.cc | 6 ++---- .../27_io/basic_filebuf/seekpos/char/2-in.cc | 6 ++---- .../27_io/basic_filebuf/seekpos/char/2-out.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/snextc/char/1-in.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/snextc/char/1-io.cc | 6 ++---- .../27_io/basic_filebuf/snextc/char/1-out.cc | 7 +++---- .../testsuite/27_io/basic_filebuf/snextc/char/2-in.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/snextc/char/2-io.cc | 6 ++---- .../27_io/basic_filebuf/sputbackc/char/1-in.cc | 6 ++---- .../27_io/basic_filebuf/sputbackc/char/2-in.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sputc/char/1-in.cc | 7 +++---- .../testsuite/27_io/basic_filebuf/sputc/char/2-in.cc | 7 +++---- .../testsuite/27_io/basic_filebuf/sputc/char/2-io.cc | 6 ++---- .../testsuite/27_io/basic_filebuf/sputn/char/1-in.cc | 7 +++---- .../testsuite/27_io/basic_filebuf/sputn/char/1-io.cc | 7 ++----- .../testsuite/27_io/basic_filebuf/sputn/char/2-in.cc | 7 +++---- .../27_io/basic_filebuf/sungetc/char/1-in.cc | 3 +-- .../27_io/basic_filebuf/sungetc/char/2-in.cc | 4 +--- .../testsuite/27_io/basic_ifstream/cons/char/1.cc | 5 ++--- .../testsuite/27_io/basic_ifstream/open/char/1.cc | 5 ++--- .../testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc | 11 +---------- .../27_io/basic_istream/readsome/char/6746-2.cc | 5 ++--- .../27_io/basic_istream/readsome/wchar_t/6746-2.cc | 5 ++--- .../27_io/basic_istream/seekg/char/sstream.cc | 5 ++--- .../27_io/basic_istream/seekg/wchar_t/sstream.cc | 5 ++--- .../testsuite/27_io/basic_istream/tellg/char/1.cc | 5 ++--- .../27_io/basic_istream/tellg/char/sstream.cc | 5 ++--- .../testsuite/27_io/basic_istream/tellg/wchar_t/1.cc | 5 ++--- .../27_io/basic_istream/tellg/wchar_t/sstream.cc | 5 ++--- .../testsuite/27_io/basic_ofstream/open/char/1.cc | 5 +++-- libstdc++-v3/testsuite/lib/dg-options.exp | 2 +- libstdc++-v3/testsuite/lib/libstdc++.exp | 1 + 57 files changed, 117 insertions(+), 208 deletions(-) diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc index c7f655d0bb7..fd71faed734 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc @@ -16,10 +16,9 @@ // . // { 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() { diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc index ff0b9a5fb7e..cd7550f5677 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc @@ -17,13 +17,12 @@ // with this library; see the file COPYING3. If not see // . -// 27.8.1.4 Overridden virtual functions +// C++98 27.8.1.3 filebuf member functions #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc index 0e0949d79e9..931da865247 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc @@ -18,10 +18,9 @@ // . // { 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. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc index 6402c77b44a..29804fb5014 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc @@ -17,11 +17,11 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc index 505293021ea..40b15317d69 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc @@ -17,16 +17,14 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include -// @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. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc index 54fb0094567..d8e23e534f6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc @@ -15,14 +15,13 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc index 7a5321bd80c..4ca94cf4879 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc @@ -15,14 +15,13 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc index 5801b2ad379..cdd06d38c35 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc @@ -15,14 +15,13 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc index 0f419c1df6d..b3733cc6916 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "sgetc.txt"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc index eceae02f5b3..439f8de29c6 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc index 8c4230c7091..d5b60e488b0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "sgetc.txt"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc index b8a152ad82a..b265cd55db4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc index c8584c2f18b..47d1b897963 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "seekoff.txt"; void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc index f78612cae88..7220b22c24c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "seekoff-1out.tst"; void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc index 7c3784f84dd..d69f2907773 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "seekoff.txt"; void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc index c4b0d4b72bc..e07b2097916 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "seekoff-2out.tst"; void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc index 88c6c7eee87..4e7d98716c1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "seekpos.txt"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc index a6cfbfc3e6e..7c0486ef8ca 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "seekpos-1out.tst"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc index 05eed15af24..3f80ec92079 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "seekpos.txt"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc index c1d7bf754ce..d0b34c23a4c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "seekpos-2out.tst"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc index 1e6dfd2bda3..27b8c5cc2e4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it // Test overloaded virtual functions. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc index 8f1f36c15cb..f9d68f6be0a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc index aca1593d5b5..955af5b6848 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "sgetc.txt"; // file with data in it // Test overloaded virtual functions. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc index b233df872d0..4fea4585ba7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc index 9791706a99f..2af5cb4493c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc @@ -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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "sgetn.txt"; // file with data in it // Test overloaded virtual functions. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc index 506d0676bd5..6ad69300323 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc @@ -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 #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc index 1b16f5d0b49..57074832062 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc @@ -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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "sgetn.txt"; // file with data in it // Test overloaded virtual functions. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc index c185a4adb1e..c3112f718a8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc @@ -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 #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc index e79972af7b2..0e5078c5a13 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc index a02aef40ccf..974c661c4ab 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc index b724f13c73b..a61a77b96c2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc @@ -17,15 +17,14 @@ // with this library; see the file COPYING3. If not see // . -// 27.8.1.4 Overridden virtual functions +// C++98 27.8.1.4 Overridden virtual functions + +// { dg-additional-files "sgetc.txt" } #include #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc index fa681efc83e..b2c754e5de3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "sgetc.txt"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc index c264412c103..0f62d465d4c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @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 diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc index c9e54caba81..642ed9e52f5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "sgetc.txt"; // file with data in it // Test overloaded virtual functions. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc index 684685dde74..1e4325e79b7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "sgetc.txt"; // file with data in it // Test overloaded virtual functions. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc index bbd25a5e85e..e76064dd592 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc @@ -17,15 +17,14 @@ // with this library; see the file COPYING3. If not see // . -// 27.8.1.4 Overridden virtual functions +// C++98 27.8.1.4 Overridden virtual functions + +// { dg-additional-files "filebuf_virtuals-1.txt" } #include #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc index 7505076f97c..c0d423bf063 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc @@ -17,15 +17,14 @@ // with this library; see the file COPYING3. If not see // . -// 27.8.1.4 Overridden virtual functions +// C++98 27.8.1.4 Overridden virtual functions + +// { dg-additional-files "filebuf_virtuals-1.txt" } #include #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc index 3125d52b42c..f182064ca19 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc @@ -17,17 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @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"; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc index dd951b040b4..fb9b181ad6c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc @@ -17,15 +17,14 @@ // with this library; see the file COPYING3. If not see // . -// 27.8.1.4 Overridden virtual functions +// C++98 27.8.1.4 Overridden virtual functions + +// { dg-additional-files "filebuf_virtuals-1.txt" } #include #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc index c01aed97664..125cde14fdb 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc @@ -17,18 +17,15 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include #include -// @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() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc index 6a008646fb3..da96056c2ce 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc @@ -17,15 +17,14 @@ // with this library; see the file COPYING3. If not see // . -// 27.8.1.4 Overridden virtual functions +// C++98 27.8.1.4 Overridden virtual functions + +// { dg-additional-files "filebuf_virtuals-1.txt" } #include #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it void test05() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc index ff2f0fd742f..12bd7da3282 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc @@ -25,8 +25,7 @@ #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt +// { dg-additional-files "sgetc.txt" } const char name_01[] = "sgetc.txt"; // file with data in it diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc index af3ad03ef8a..9f34255b8ad 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc @@ -20,14 +20,12 @@ // 27.8.1.4 Overridden virtual functions // { dg-require-fileio "" } +// { dg-additional-files "sgetc.txt" } #include #include #include -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %*.txt - const char name_01[] = "sgetc.txt"; // file with data in it // Test overloaded virtual functions. diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc index 2611caf54f9..f2658aed886 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc @@ -15,11 +15,10 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc index dcd16eddf60..c22de5305a7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc @@ -15,11 +15,10 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc index fac3275da67..3623da66dc2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc @@ -15,17 +15,12 @@ // with this library; see the file COPYING3. If not see // . -// 27.8.1.7 ifstream member functions -// @require@ %-*.tst %-*.txt -// @diff@ %-*.tst %-*.txt +// C++98 27.8.1.7 ifstream member functions #include #include #include -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; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc index 09cfc3aad0f..f18f60fa472 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc @@ -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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc index d19cb211f4e..3acd5fe7b1b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/wchar_t/6746-2.cc @@ -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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc index 1f9967405d8..72379664e33 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc @@ -17,12 +17,11 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/sstream.cc index da2e27e72a0..30a8a905b6e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/wchar_t/sstream.cc @@ -17,12 +17,11 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc index e956ecf4e4a..3ab92f9760e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc @@ -17,12 +17,11 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc index a45d0b59fb8..6da59d0d1a1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc @@ -17,12 +17,11 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/1.cc index e2f076a03d1..20b425cbbe0 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/1.cc @@ -16,11 +16,10 @@ // . // { 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/sstream.cc index b5d005c5342..9118e683c35 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/sstream.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/wchar_t/sstream.cc @@ -15,12 +15,11 @@ // with this library; see the file COPYING3. If not see // . -// 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 #include diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc index b24ffe210ce..45227107cbd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc @@ -15,8 +15,9 @@ // with this library; see the file COPYING3. If not see // . -// 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 "" } diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp index 0d77fb029b0..1d3160409f5 100644 --- a/libstdc++-v3/testsuite/lib/dg-options.exp +++ b/libstdc++-v3/testsuite/lib/dg-options.exp @@ -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 } diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 67a63f5b5f3..8efc6f7f089 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -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 != "" } {