OSDN Git Service

* testsuite/tr1/2_general_utilities/shared_ptr/cons/
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Dec 2011 17:31:00 +0000 (17:31 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Dec 2011 17:31:00 +0000 (17:31 +0000)
weak_ptr_expired.cc: Modify to PASS instead of XFAIL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182661 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/cons/weak_ptr_expired.cc

index 6401cf9..2d9e423 100644 (file)
@@ -1,3 +1,8 @@
+2011-12-23  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * testsuite/tr1/2_general_utilities/shared_ptr/cons/
+       weak_ptr_expired.cc: Modify to PASS instead of XFAIL.
+
 2011-12-23  Kai Tietz  <ktietz@redhat.com>
 
        * config/os/mingw32-w64/os_defines.h (__USE_MINGW_ANSI_STDIO): Define.
 2011-12-23  Kai Tietz  <ktietz@redhat.com>
 
        * config/os/mingw32-w64/os_defines.h (__USE_MINGW_ANSI_STDIO): Define.
index 27fbc70..3cf9ba1 100644 (file)
@@ -1,5 +1,5 @@
-// { dg-do run { xfail *-*-* } }
-// Copyright (C) 2005, 2009 Free Software Foundation
+// { dg-do run }
+// Copyright (C) 2005, 2009, 2010, 2011 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
 //
 // 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
@@ -29,7 +29,7 @@ struct A { };
 int
 test01()
 {
 int
 test01()
 {
-  bool test __attribute__((unused)) = true;
+  bool test = false;
 
   std::tr1::shared_ptr<A> a1(new A);
   std::tr1::weak_ptr<A> wa(a1);
 
   std::tr1::shared_ptr<A> a1(new A);
   std::tr1::weak_ptr<A> wa(a1);
@@ -42,12 +42,9 @@ test01()
   catch (const std::tr1::bad_weak_ptr&)
   {
     // Expected.
   catch (const std::tr1::bad_weak_ptr&)
   {
     // Expected.
-      __throw_exception_again;
-  }
-  catch (...)
-  {
-    // Failed.
+    test = true;
   }
   }
+  VERIFY( test );
 
   return 0;
 }
 
   return 0;
 }