From 218aaec86650ec6cae2fc54fdfcedc5abccc55dd Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 22 Jul 2024 15:50:19 +0100 Subject: libstdc++: Rename tests [PR12048] These have the wrong PR number in the filenames. libstdc++-v3/ChangeLog: PR libstdc++/12048 * testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc: Move to... * testsuite/ext/stdio_sync_filebuf/wchar_t/12048-1.cc: ...here. * testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc: Move to... * testsuite/ext/stdio_sync_filebuf/wchar_t/12048-2.cc: ...here. * testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc: Move to... * testsuite/ext/stdio_sync_filebuf/wchar_t/12048-3.cc: ...here. * testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc: Move to... * testsuite/ext/stdio_sync_filebuf/wchar_t/12048-4.cc: ...here. --- .../ext/stdio_sync_filebuf/wchar_t/12048-1.cc | 46 ++++++++++++++++++++++ .../ext/stdio_sync_filebuf/wchar_t/12048-2.cc | 46 ++++++++++++++++++++++ .../ext/stdio_sync_filebuf/wchar_t/12048-3.cc | 46 ++++++++++++++++++++++ .../ext/stdio_sync_filebuf/wchar_t/12048-4.cc | 46 ++++++++++++++++++++++ .../ext/stdio_sync_filebuf/wchar_t/12948-1.cc | 46 ---------------------- .../ext/stdio_sync_filebuf/wchar_t/12948-2.cc | 46 ---------------------- .../ext/stdio_sync_filebuf/wchar_t/12948-3.cc | 46 ---------------------- .../ext/stdio_sync_filebuf/wchar_t/12948-4.cc | 46 ---------------------- 8 files changed, 184 insertions(+), 184 deletions(-) create mode 100644 libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-1.cc create mode 100644 libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-2.cc create mode 100644 libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-3.cc create mode 100644 libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-4.cc delete mode 100644 libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc delete mode 100644 libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc delete mode 100644 libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc delete mode 100644 libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-1.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-1.cc new file mode 100644 index 0000000..e71aee2 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-1.cc @@ -0,0 +1,46 @@ +// 2003-05-01 Petur Runolfsson + +// Copyright (C) 2003-2024 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-additional-files "cin_unget-1.txt" } + +#include +#include + +// libstdc++/12048 +void test02() +{ + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf sbuf(file); + std::wint_t c1 = sbuf.sbumpc(); + VERIFY( c1 != WEOF ); + std::wint_t c2 = sbuf.sungetc(); + VERIFY( c2 != WEOF ); + std::wint_t c3 = sbuf.sbumpc(); + VERIFY( c3 == c1 ); + + std::fclose(file); +} + +int main () +{ + test02(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-2.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-2.cc new file mode 100644 index 0000000..5293537 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-2.cc @@ -0,0 +1,46 @@ +// 2003-05-01 Petur Runolfsson + +// Copyright (C) 2003-2024 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include + +// { dg-additional-files "cin_unget-1.txt" } + +// libstdc++/12048 +void test03() +{ + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf sbuf(file); + std::wint_t c1 = sbuf.sbumpc(); + VERIFY( c1 != WEOF ); + std::wint_t c2 = sbuf.sungetc(); + VERIFY( c2 != WEOF ); + std::wint_t c3 = std::fgetwc(file); + VERIFY( c3 == c1 ); + + std::fclose(file); +} + +int main () +{ + test03(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-3.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-3.cc new file mode 100644 index 0000000..8274350 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-3.cc @@ -0,0 +1,46 @@ +// 2003-05-01 Petur Runolfsson + +// Copyright (C) 2003-2024 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-additional-files "cin_unget-1.txt" } + +#include +#include + +// libstdc++/12048 +void test04() +{ + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf sbuf(file); + wchar_t buf[2]; + VERIFY( sbuf.sgetn(buf, 2) == 2 ); + std::wint_t c2 = sbuf.sungetc(); + VERIFY( c2 != WEOF ); + std::wint_t c3 = sbuf.sbumpc(); + VERIFY( c3 == std::char_traits::to_int_type(buf[1]) ); + + std::fclose(file); +} + +int main () +{ + test04(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-4.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-4.cc new file mode 100644 index 0000000..7989edc --- /dev/null +++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12048-4.cc @@ -0,0 +1,46 @@ +// 2003-05-01 Petur Runolfsson + +// Copyright (C) 2003-2024 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-additional-files "cin_unget-1.txt" } + +#include +#include + +// libstdc++/12048 +void test05() +{ + const char* name = "cin_unget-1.txt"; + + std::FILE* file = std::fopen(name, "r"); + __gnu_cxx::stdio_sync_filebuf sbuf(file); + wchar_t buf[2]; + VERIFY( sbuf.sgetn(buf, 2) == 2 ); + std::wint_t c2 = sbuf.sungetc(); + VERIFY( c2 != WEOF ); + std::wint_t c3 = std::fgetwc(file); + VERIFY( c3 == std::char_traits::to_int_type(buf[1]) ); + + std::fclose(file); +} + +int main () +{ + test05(); + return 0; +} diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc deleted file mode 100644 index e71aee2..0000000 --- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc +++ /dev/null @@ -1,46 +0,0 @@ -// 2003-05-01 Petur Runolfsson - -// Copyright (C) 2003-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// { dg-additional-files "cin_unget-1.txt" } - -#include -#include - -// libstdc++/12048 -void test02() -{ - const char* name = "cin_unget-1.txt"; - - std::FILE* file = std::fopen(name, "r"); - __gnu_cxx::stdio_sync_filebuf sbuf(file); - std::wint_t c1 = sbuf.sbumpc(); - VERIFY( c1 != WEOF ); - std::wint_t c2 = sbuf.sungetc(); - VERIFY( c2 != WEOF ); - std::wint_t c3 = sbuf.sbumpc(); - VERIFY( c3 == c1 ); - - std::fclose(file); -} - -int main () -{ - test02(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc deleted file mode 100644 index 5293537..0000000 --- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc +++ /dev/null @@ -1,46 +0,0 @@ -// 2003-05-01 Petur Runolfsson - -// Copyright (C) 2003-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include -#include - -// { dg-additional-files "cin_unget-1.txt" } - -// libstdc++/12048 -void test03() -{ - const char* name = "cin_unget-1.txt"; - - std::FILE* file = std::fopen(name, "r"); - __gnu_cxx::stdio_sync_filebuf sbuf(file); - std::wint_t c1 = sbuf.sbumpc(); - VERIFY( c1 != WEOF ); - std::wint_t c2 = sbuf.sungetc(); - VERIFY( c2 != WEOF ); - std::wint_t c3 = std::fgetwc(file); - VERIFY( c3 == c1 ); - - std::fclose(file); -} - -int main () -{ - test03(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc deleted file mode 100644 index 8274350..0000000 --- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc +++ /dev/null @@ -1,46 +0,0 @@ -// 2003-05-01 Petur Runolfsson - -// Copyright (C) 2003-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// { dg-additional-files "cin_unget-1.txt" } - -#include -#include - -// libstdc++/12048 -void test04() -{ - const char* name = "cin_unget-1.txt"; - - std::FILE* file = std::fopen(name, "r"); - __gnu_cxx::stdio_sync_filebuf sbuf(file); - wchar_t buf[2]; - VERIFY( sbuf.sgetn(buf, 2) == 2 ); - std::wint_t c2 = sbuf.sungetc(); - VERIFY( c2 != WEOF ); - std::wint_t c3 = sbuf.sbumpc(); - VERIFY( c3 == std::char_traits::to_int_type(buf[1]) ); - - std::fclose(file); -} - -int main () -{ - test04(); - return 0; -} diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc deleted file mode 100644 index 7989edc..0000000 --- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc +++ /dev/null @@ -1,46 +0,0 @@ -// 2003-05-01 Petur Runolfsson - -// Copyright (C) 2003-2024 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -// { dg-additional-files "cin_unget-1.txt" } - -#include -#include - -// libstdc++/12048 -void test05() -{ - const char* name = "cin_unget-1.txt"; - - std::FILE* file = std::fopen(name, "r"); - __gnu_cxx::stdio_sync_filebuf sbuf(file); - wchar_t buf[2]; - VERIFY( sbuf.sgetn(buf, 2) == 2 ); - std::wint_t c2 = sbuf.sungetc(); - VERIFY( c2 != WEOF ); - std::wint_t c3 = std::fgetwc(file); - VERIFY( c3 == std::char_traits::to_int_type(buf[1]) ); - - std::fclose(file); -} - -int main () -{ - test05(); - return 0; -} -- cgit v1.1