]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc
Reshuffle 27_io testsuite.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 27_io / basic_istream / extractors_other / char / 1.cc
similarity index 76%
rename from libstdc++-v3/testsuite/27_io/istream_extractor_other.cc
rename to libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc
index fbf8f4293c69c2c6e32284874e5181ceb6e2d899..c2afc80348cabbc067cb7eb4801646aac35ce611 100644 (file)
@@ -1,6 +1,6 @@
 // 1999-07-28 bkoz
 
-// Copyright (C) 1999, 2001 Free Software Foundation
+// Copyright (C) 1999, 2001, 2003 Free Software Foundation
 //
 // 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
 #include <fstream>
 #include <testsuite_hooks.h>
 
-
 // stringbufs.
-bool test01() {
-
+void test01() 
+{
   typedef std::ios::traits_type ctraits_type;
 
   bool test = true;
@@ -135,74 +134,10 @@ bool test01() {
   VERIFY( strtmp == str_02 ); // as only an "in" buffer
   VERIFY( isbuf_03.sgetc() == 'a' );
   VERIFY( is_04.peek() == ctraits_type::eof() );
-
-#ifdef DEBUG_ASSERT
-  assert(test);
-#endif
-  return test;
-}
-
-// filebufs.
-bool test02() {
-
-  bool test = true;
-  typedef std::ios::traits_type ctraits_type;
-  const char name_01[] = "istream_extractor_other-1.txt"; //read 
-  const char name_02[] = "istream_extractor_other-2.txt"; //write
-
-  std::filebuf fbin, fbout;
-  fbin.open(name_01, std::ios_base::in);
-  fbout.open(name_02, std::ios_base::out | std::ios_base::trunc);
-  VERIFY( fbin.is_open() );
-  VERIFY( fbout.is_open() );
-
-  if (test)
-    {
-      std::istream is(&fbin);
-      is.unsetf(std::ios_base::skipws);
-      is >> &fbout;
-    }
-
-  fbout.close();
-  fbin.close();
-  VERIFY( !fbin.is_open() );
-  VERIFY( !fbout.is_open() );
-
-#ifdef DEBUG_ASSERT
-  assert(test);
-#endif
-  return test;
-}
-
-void test03() 
-{
-  using namespace std;  
-  bool test = true;
-
-  // template<_CharT, _Traits>
-  //  basic_istream& operator>>(ios_base& (*pf) (ios_base&))
-  {
-    int i = 0;
-    std::istringstream iss(" 43");
-    iss >> std::noskipws >> i;
-    std::ios::iostate i3 = iss.rdstate();
-    VERIFY ( !iss ); //should set failbit
-  }
-
-  // template<_CharT, _Traits>
-  //  basic_istream& operator>>(basic_ios& (*pf) (basic_ios&))
-
-  // template<_CharT, _Traits>
-  //  basic_istream& operator>>(basic_istream& (*pf) (basic_istream&))
 }
 
-
 int main()
 {
   test01();
-  test02();
-  test03();
   return 0;
 }