From 681417f7a0044b5603fa7d4db57c5aecc914fc8e Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 22 Jul 2024 14:01:43 +0100 Subject: [PATCH] libstdc++: Use dg-additional-files in some algorithm tests Use the dg-additional-files directive to declare files that need to be copied into the test's working directory. This is currently redundant (as all .tst and .txt files are copied for all tests) but is a step towards not copying all files. libstdc++-v3/ChangeLog: * testsuite/25_algorithms/advance/istreambuf_iterators/char/2.cc: Use dg-additional-files. * testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/2.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc: Likewise. * testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc: Likewise. * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: Likewise. * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc: Likewise. * testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc: Likewise. * testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc: Likewise. --- .../25_algorithms/advance/istreambuf_iterators/char/2.cc | 1 + .../25_algorithms/advance/istreambuf_iterators/wchar_t/2.cc | 1 + .../testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc | 1 + .../25_algorithms/copy/streambuf_iterators/wchar_t/4.cc | 1 + .../testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc | 1 + .../testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc | 1 + .../testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc | 1 + .../25_algorithms/find/istreambuf_iterators/wchar_t/2.cc | 1 + 8 files changed, 8 insertions(+) diff --git a/libstdc++-v3/testsuite/25_algorithms/advance/istreambuf_iterators/char/2.cc b/libstdc++-v3/testsuite/25_algorithms/advance/istreambuf_iterators/char/2.cc index 1a0635c0cca..c5414d4975d 100644 --- a/libstdc++-v3/testsuite/25_algorithms/advance/istreambuf_iterators/char/2.cc +++ b/libstdc++-v3/testsuite/25_algorithms/advance/istreambuf_iterators/char/2.cc @@ -16,6 +16,7 @@ // . // { dg-require-fileio "" } +// { dg-additional-files "istream_unformatted-1.txt" } #include #include diff --git a/libstdc++-v3/testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/2.cc b/libstdc++-v3/testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/2.cc index 823e275da19..c2fd748cbf0 100644 --- a/libstdc++-v3/testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/25_algorithms/advance/istreambuf_iterators/wchar_t/2.cc @@ -16,6 +16,7 @@ // . // { dg-require-fileio "" } +// { dg-additional-files "istream_unformatted-1.txt" } #include #include diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc index 67888797047..3d1c7c7595d 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc @@ -27,6 +27,7 @@ #include // { dg-require-fileio "" } +// { dg-additional-files "istream_unformatted-1.txt" } // In the occasion of libstdc++/25482 void test01() diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc index e1adccfdd21..8d380052313 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc @@ -18,6 +18,7 @@ // . // { dg-require-fileio "" } +// { dg-additional-files "istream_unformatted-1.txt" } #include #include diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc index 5179d78b455..a437bedb420 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc @@ -1,5 +1,6 @@ // { dg-do run { target c++11 } } // { dg-require-fileio "" } +// { dg-additional-files "istream_unformatted-1.txt" } // Copyright (C) 2020-2024 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc index 14f58998fef..1353282f6a0 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc @@ -1,5 +1,6 @@ // { dg-do run { target c++11 } } // { dg-require-fileio "" } +// { dg-additional-files "istream_unformatted-1.txt" } // Copyright (C) 2020-2024 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc index 2a33bbaac9f..7a682edff7c 100644 --- a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc +++ b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/char/2.cc @@ -23,6 +23,7 @@ #include // { dg-require-fileio "" } +// { dg-additional-files "istream_unformatted-1.txt" } // In the occasion of libstdc++/25482 void test01() diff --git a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc index dfe5926c18a..c3187d17639 100644 --- a/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc @@ -18,6 +18,7 @@ // . // { dg-require-fileio "" } +// { dg-additional-files "istream_unformatted-1.txt" } #include #include