this_thread: Move...
authorBenjamin Kosnik <bkoz@redhat.com>
Sat, 21 Feb 2009 03:56:21 +0000 (03:56 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Sat, 21 Feb 2009 03:56:21 +0000 (03:56 +0000)
2009-02-20  Benjamin Kosnik  <bkoz@redhat.com>

* testsuite/30_threads/thread/this_thread: Move...
* testsuite/30_threads/this_thread: ...here.
* testsuite/20_util/unique_ptr/assign/assign.cc: Move...
* testsuite/20_util/unique_ptr/assign/assign_neg.cc: ...here.
* testsuite/20_util/ratio/cons/cons_overflow.cc: Move...
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: ...here.
* testsuite/20_util/ratio/operations/ops_overflow.cc: Move...
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: ...here.

From-SVN: r144346

15 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow.cc [deleted file]
libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow.cc [deleted file]
libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign.cc [deleted file]
libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/this_thread/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/this_thread/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/this_thread/3.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/this_thread/4.cc [new file with mode: 0644]
libstdc++-v3/testsuite/30_threads/thread/this_thread/1.cc [deleted file]
libstdc++-v3/testsuite/30_threads/thread/this_thread/2.cc [deleted file]
libstdc++-v3/testsuite/30_threads/thread/this_thread/3.cc [deleted file]
libstdc++-v3/testsuite/30_threads/thread/this_thread/4.cc [deleted file]

index dbd4a0aa494dcdea2ab4f4bc8331ebdc6f0dd3ba..fd8bf05c784b2a5f166a92cb027ad9fc77cb2a0c 100644 (file)
@@ -1,3 +1,14 @@
+2009-02-20  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * testsuite/30_threads/thread/this_thread: Move...
+       * testsuite/30_threads/this_thread: ...here.
+       * testsuite/20_util/unique_ptr/assign/assign.cc: Move...
+       * testsuite/20_util/unique_ptr/assign/assign_neg.cc: ...here.
+       * testsuite/20_util/ratio/cons/cons_overflow.cc: Move...
+       * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: ...here.
+       * testsuite/20_util/ratio/operations/ops_overflow.cc: Move...
+       * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: ...here.
+
 2009-02-20  Benjamin Kosnik  <bkoz@redhat.com>
 
        * doc/doxygen/user.cfg.in: Tweaks.
diff --git a/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow.cc b/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow.cc
deleted file mode 100644 (file)
index 220eb8f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
-// { dg-require-cstdint "" }
-
-// Copyright (C) 2008, 2009 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, 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 COPYING.  If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02110-1301, USA.
-
-#include <ratio>
-
-void
-test01()
-{
-  std::ratio<INTMAX_MAX, INTMAX_MAX> r1;
-  std::ratio<-INTMAX_MAX, INTMAX_MAX> r2;
-}
-
-void
-test02()
-{
-  std::ratio<INTMAX_MIN, 1> r1;
-}
-
-void
-test03()
-{
-  std::ratio<1, INTMAX_MIN> r1;
-}
-
-void
-test04()
-{
-  std::ratio<1,0> r1;
-}
-
-// { dg-error "instantiated from here" "" { target *-*-* } 35 }
-// { dg-error "instantiated from here" "" { target *-*-* } 41 }
-// { dg-error "instantiated from here" "" { target *-*-* } 47 }
-// { dg-error "denominator cannot be zero" "" { target *-*-* } 158 }
-// { dg-error "out of range" "" { target *-*-* } 159 }
-// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc b/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc
new file mode 100644 (file)
index 0000000..220eb8f
--- /dev/null
@@ -0,0 +1,55 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// Copyright (C) 2008, 2009 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, 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 COPYING.  If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
+
+#include <ratio>
+
+void
+test01()
+{
+  std::ratio<INTMAX_MAX, INTMAX_MAX> r1;
+  std::ratio<-INTMAX_MAX, INTMAX_MAX> r2;
+}
+
+void
+test02()
+{
+  std::ratio<INTMAX_MIN, 1> r1;
+}
+
+void
+test03()
+{
+  std::ratio<1, INTMAX_MIN> r1;
+}
+
+void
+test04()
+{
+  std::ratio<1,0> r1;
+}
+
+// { dg-error "instantiated from here" "" { target *-*-* } 35 }
+// { dg-error "instantiated from here" "" { target *-*-* } 41 }
+// { dg-error "instantiated from here" "" { target *-*-* } 47 }
+// { dg-error "denominator cannot be zero" "" { target *-*-* } 158 }
+// { dg-error "out of range" "" { target *-*-* } 159 }
+// { dg-excess-errors "In instantiation of" }
diff --git a/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow.cc b/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow.cc
deleted file mode 100644 (file)
index 318a8df..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
-// { dg-require-cstdint "" }
-
-// 2008-07-03 Chris Fairles <chris.fairles@gmail.com>
-
-// Copyright (C) 2008, 2009 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, 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 COPYING.  If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02110-1301, USA.
-
-#include <ratio>
-
-void
-test01()
-{
-  std::ratio_add<std::ratio<INTMAX_MAX, 1>, std::ratio<1>>::type r1;
-}
-
-void
-test02()
-{  
-  std::ratio_multiply<std::ratio<-INTMAX_MAX, 2>, std::ratio<3, 2>>::type r1;
-  std::ratio_multiply<std::ratio<INTMAX_MAX>, std::ratio<INTMAX_MAX>>::type r2;
-}
-
-// { dg-error "instantiated from here" "" { target *-*-* } 30 }
-// { dg-error "instantiated from here" "" { target *-*-* } 36 }
-// { dg-error "instantiated from here" "" { target *-*-* } 37 }
-// { dg-error "overflow in addition" "" { target *-*-* } 135 }
-// { dg-error "overflow in multiplication" "" { target *-*-* } 103 }
-// { dg-error "overflow in multiplication" "" { target *-*-* } 105 }
-// { dg-error "overflow in multiplication" "" { target *-*-* } 107 }
-// { dg-excess-errors "In instantiation of" }
-// { dg-excess-errors "out of range" }
diff --git a/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc b/libstdc++-v3/testsuite/20_util/ratio/operations/ops_overflow_neg.cc
new file mode 100644 (file)
index 0000000..318a8df
--- /dev/null
@@ -0,0 +1,48 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+// { dg-require-cstdint "" }
+
+// 2008-07-03 Chris Fairles <chris.fairles@gmail.com>
+
+// Copyright (C) 2008, 2009 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, 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 COPYING.  If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
+
+#include <ratio>
+
+void
+test01()
+{
+  std::ratio_add<std::ratio<INTMAX_MAX, 1>, std::ratio<1>>::type r1;
+}
+
+void
+test02()
+{  
+  std::ratio_multiply<std::ratio<-INTMAX_MAX, 2>, std::ratio<3, 2>>::type r1;
+  std::ratio_multiply<std::ratio<INTMAX_MAX>, std::ratio<INTMAX_MAX>>::type r2;
+}
+
+// { dg-error "instantiated from here" "" { target *-*-* } 30 }
+// { dg-error "instantiated from here" "" { target *-*-* } 36 }
+// { dg-error "instantiated from here" "" { target *-*-* } 37 }
+// { dg-error "overflow in addition" "" { target *-*-* } 135 }
+// { dg-error "overflow in multiplication" "" { target *-*-* } 103 }
+// { dg-error "overflow in multiplication" "" { target *-*-* } 105 }
+// { dg-error "overflow in multiplication" "" { target *-*-* } 107 }
+// { dg-excess-errors "In instantiation of" }
+// { dg-excess-errors "out of range" }
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign.cc
deleted file mode 100644 (file)
index 272ed3a..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
-
-// Copyright (C) 2008, 2009 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
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, 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 COPYING.  If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02110-1301, USA.
-
-#include <memory>
-
-struct base { virtual ~base() {} };
-struct derived : base {};
-
-void
-test01()
-{
-  std::unique_ptr<derived> p1(new derived);
-  std::unique_ptr<derived> p2(new derived);
-//  p2 = p1;  // should not compile
-  p2 = std::move(p1);
-  std::unique_ptr<base> p3(new base);
-//  p3 = p2;  // should not compile
-  p3 = std::move(p2);
-}
-
-void
-test02()
-{
-  std::unique_ptr<int[]> p1(new int(420));
-  std::unique_ptr<int[]> p2 = p1;
-}
-
-void
-test03()
-{
-  std::unique_ptr<int[2]> p1(new int[3]);
-  std::unique_ptr<int[2]> p2 = p1;
-}
-
-// { dg-error "used here" "" { target *-*-* } 43 }
-// { dg-error "no matching" "" { target *-*-* } 49 }
-// { dg-error "used here" "" { target *-*-* } 50 }
-// { dg-error "candidates are" "" { target *-*-* } 219 }
-// { dg-error "deleted function" "" { target *-*-* } 219 }
-// { dg-error "deleted function" "" { target *-*-* } 365 }
-// { dg-excess-errors "note" }
diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc
new file mode 100644 (file)
index 0000000..272ed3a
--- /dev/null
@@ -0,0 +1,59 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2008, 2009 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, 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 COPYING.  If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
+
+#include <memory>
+
+struct base { virtual ~base() {} };
+struct derived : base {};
+
+void
+test01()
+{
+  std::unique_ptr<derived> p1(new derived);
+  std::unique_ptr<derived> p2(new derived);
+//  p2 = p1;  // should not compile
+  p2 = std::move(p1);
+  std::unique_ptr<base> p3(new base);
+//  p3 = p2;  // should not compile
+  p3 = std::move(p2);
+}
+
+void
+test02()
+{
+  std::unique_ptr<int[]> p1(new int(420));
+  std::unique_ptr<int[]> p2 = p1;
+}
+
+void
+test03()
+{
+  std::unique_ptr<int[2]> p1(new int[3]);
+  std::unique_ptr<int[2]> p2 = p1;
+}
+
+// { dg-error "used here" "" { target *-*-* } 43 }
+// { dg-error "no matching" "" { target *-*-* } 49 }
+// { dg-error "used here" "" { target *-*-* } 50 }
+// { dg-error "candidates are" "" { target *-*-* } 219 }
+// { dg-error "deleted function" "" { target *-*-* } 219 }
+// { dg-error "deleted function" "" { target *-*-* } 365 }
+// { dg-excess-errors "note" }
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/1.cc b/libstdc++-v3/testsuite/30_threads/this_thread/1.cc
new file mode 100644 (file)
index 0000000..c012ea9
--- /dev/null
@@ -0,0 +1,58 @@
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+
+// Copyright (C) 2008 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)
+// 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <thread>
+#include <system_error>
+#include <testsuite_hooks.h>
+
+int main()
+{
+  bool test __attribute__((unused)) = true;
+
+  try 
+    {
+      std::thread::id id = std::this_thread::get_id();
+      VERIFY( id != std::thread::id() );      
+    }
+  catch (const std::system_error&)
+    {
+      VERIFY( false );
+    }
+  catch (...)
+    {
+      VERIFY( false );
+    }
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/2.cc b/libstdc++-v3/testsuite/30_threads/this_thread/2.cc
new file mode 100644 (file)
index 0000000..a632a45
--- /dev/null
@@ -0,0 +1,58 @@
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+// { dg-require-sched-yield "" }
+
+// Copyright (C) 2008, 2009 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)
+// 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <thread>
+#include <system_error>
+#include <testsuite_hooks.h>
+
+int main()
+{
+  bool test __attribute__((unused)) = true;
+
+  try 
+    {
+      std::this_thread::yield();
+    }
+  catch (const std::system_error&)
+    {
+      VERIFY( false );
+    }
+  catch (...)
+    {
+      VERIFY( false );
+    }
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/3.cc b/libstdc++-v3/testsuite/30_threads/this_thread/3.cc
new file mode 100644 (file)
index 0000000..564bd1f
--- /dev/null
@@ -0,0 +1,74 @@
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+// { dg-require-nanosleep "" }
+
+// Copyright (C) 2008 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)
+// 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <chrono>
+#include <thread>
+#include <system_error>
+#include <testsuite_hooks.h>
+
+namespace chr = std::chrono;
+
+void foo()
+{
+  bool test __attribute__((unused)) = true;
+
+  chr::system_clock::time_point begin = chr::system_clock::now();
+  chr::microseconds ms(500);
+
+  std::this_thread::sleep_for(ms);
+  
+  VERIFY( (chr::system_clock::now() - begin) >= ms );
+}
+
+int main()
+{
+  bool test __attribute__((unused)) = true;
+
+  try 
+    {
+      std::thread t(foo);
+      t.join();
+    }
+  catch (const std::system_error&)
+    {
+      VERIFY( false );
+    }
+  catch (...)
+    {
+      VERIFY( false );
+    }
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/4.cc b/libstdc++-v3/testsuite/30_threads/this_thread/4.cc
new file mode 100644 (file)
index 0000000..54bef5b
--- /dev/null
@@ -0,0 +1,74 @@
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+// { dg-require-nanosleep "" }
+
+// Copyright (C) 2008 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)
+// 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 COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <chrono>
+#include <thread>
+#include <system_error>
+#include <testsuite_hooks.h>
+
+namespace chr = std::chrono;
+
+void foo()
+{
+  bool test __attribute__((unused)) = true;
+
+  chr::system_clock::time_point begin = chr::system_clock::now();
+  chr::microseconds ms(500);
+
+  std::this_thread::sleep_until(chr::system_clock::now() + ms);
+  
+  VERIFY( (chr::system_clock::now() - begin) >= ms );
+}
+
+int main()
+{
+  bool test __attribute__((unused)) = true;
+
+  try 
+    {
+      std::thread t(foo);
+      t.join();
+    }
+  catch (const std::system_error&)
+    {
+      VERIFY( false );
+    }
+  catch (...)
+    {
+      VERIFY( false );
+    }
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/30_threads/thread/this_thread/1.cc b/libstdc++-v3/testsuite/30_threads/thread/this_thread/1.cc
deleted file mode 100644 (file)
index c012ea9..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
-// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
-// { dg-require-cstdint "" }
-// { dg-require-gthreads "" }
-
-// Copyright (C) 2008 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)
-// 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <thread>
-#include <system_error>
-#include <testsuite_hooks.h>
-
-int main()
-{
-  bool test __attribute__((unused)) = true;
-
-  try 
-    {
-      std::thread::id id = std::this_thread::get_id();
-      VERIFY( id != std::thread::id() );      
-    }
-  catch (const std::system_error&)
-    {
-      VERIFY( false );
-    }
-  catch (...)
-    {
-      VERIFY( false );
-    }
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/30_threads/thread/this_thread/2.cc b/libstdc++-v3/testsuite/30_threads/thread/this_thread/2.cc
deleted file mode 100644 (file)
index a632a45..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
-// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
-// { dg-require-cstdint "" }
-// { dg-require-gthreads "" }
-// { dg-require-sched-yield "" }
-
-// Copyright (C) 2008, 2009 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)
-// 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <thread>
-#include <system_error>
-#include <testsuite_hooks.h>
-
-int main()
-{
-  bool test __attribute__((unused)) = true;
-
-  try 
-    {
-      std::this_thread::yield();
-    }
-  catch (const std::system_error&)
-    {
-      VERIFY( false );
-    }
-  catch (...)
-    {
-      VERIFY( false );
-    }
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/30_threads/thread/this_thread/3.cc b/libstdc++-v3/testsuite/30_threads/thread/this_thread/3.cc
deleted file mode 100644 (file)
index 564bd1f..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
-// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
-// { dg-require-cstdint "" }
-// { dg-require-gthreads "" }
-// { dg-require-nanosleep "" }
-
-// Copyright (C) 2008 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)
-// 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <chrono>
-#include <thread>
-#include <system_error>
-#include <testsuite_hooks.h>
-
-namespace chr = std::chrono;
-
-void foo()
-{
-  bool test __attribute__((unused)) = true;
-
-  chr::system_clock::time_point begin = chr::system_clock::now();
-  chr::microseconds ms(500);
-
-  std::this_thread::sleep_for(ms);
-  
-  VERIFY( (chr::system_clock::now() - begin) >= ms );
-}
-
-int main()
-{
-  bool test __attribute__((unused)) = true;
-
-  try 
-    {
-      std::thread t(foo);
-      t.join();
-    }
-  catch (const std::system_error&)
-    {
-      VERIFY( false );
-    }
-  catch (...)
-    {
-      VERIFY( false );
-    }
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/30_threads/thread/this_thread/4.cc b/libstdc++-v3/testsuite/30_threads/thread/this_thread/4.cc
deleted file mode 100644 (file)
index 54bef5b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
-// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
-// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
-// { dg-require-cstdint "" }
-// { dg-require-gthreads "" }
-// { dg-require-nanosleep "" }
-
-// Copyright (C) 2008 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)
-// 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 COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
-
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
-#include <chrono>
-#include <thread>
-#include <system_error>
-#include <testsuite_hooks.h>
-
-namespace chr = std::chrono;
-
-void foo()
-{
-  bool test __attribute__((unused)) = true;
-
-  chr::system_clock::time_point begin = chr::system_clock::now();
-  chr::microseconds ms(500);
-
-  std::this_thread::sleep_until(chr::system_clock::now() + ms);
-  
-  VERIFY( (chr::system_clock::now() - begin) >= ms );
-}
-
-int main()
-{
-  bool test __attribute__((unused)) = true;
-
-  try 
-    {
-      std::thread t(foo);
-      t.join();
-    }
-  catch (const std::system_error&)
-    {
-      VERIFY( false );
-    }
-  catch (...)
-    {
-      VERIFY( false );
-    }
-
-  return 0;
-}