]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc
Update copyright years in libstdc++-v3/
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 27_io / basic_filebuf / close / char / 2.cc
index 3af0a735c90ade3becef520580311149785550aa..aecf90209b57bb89855bebcef3c7c034a87451d4 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001-2014 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 2, or (at your option)
+// 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,
 // 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-require-fileio "" }
 
 // 27.8.1.3 filebuf member functions
 // @require@ %-*.tst %-*.txt
@@ -43,11 +44,11 @@ const char name_02[] = "filebuf_virtuals-2.txt"; // empty file, need to create
 void test_02()
 {
   bool test __attribute__((unused)) = true;
-  int close_num;
+  int close_num = 0;
 
   // read (ext)
   FILE* f2 = fopen(name_01, "r");
-  VERIFY( f2 != NULL );
+  VERIFY( f2 );
   if (f2)
   {
     __gnu_cxx::stdio_filebuf<char> fb(f2, std::ios_base::in, 512);
@@ -57,7 +58,7 @@ void test_02()
 
   // read (standard)
   FILE* f = fopen(name_01, "r");
-  VERIFY( f != NULL );
+  VERIFY( f );
   if (f)
   {
     std::ifstream ifstream1(name_01);