user.cfg.in: Add typeindex.
authorBenjamin Kosnik <bkoz@redhat.com>
Sat, 6 Nov 2010 03:35:46 +0000 (03:35 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Sat, 6 Nov 2010 03:35:46 +0000 (03:35 +0000)
2010-11-05  Benjamin Kosnik  <bkoz@redhat.com>

* doc/doxygen/user.cfg.in: Add typeindex.

* testsuite/util/testsuite_common_types.h (constexpr_comparison_eq_ne,
constexpr_comparison_operators): New.
* testsuite/20_util/duration/comparisons: Move...
* testsuite/20_util/duration/comparison_operators: ...here.
* testsuite/20_util/duration/comparison_operators/constexpr.cc: New.
* testsuite/20_util/time_point/comparison_operators/constexpr.cc: Add.

* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust line
numbers.
* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
* testsuite/29_atomics/atomic/cons/assign_neg.cc: Same.
* testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.

From-SVN: r166392

libstdc++-v3/ChangeLog
libstdc++-v3/doc/doxygen/user.cfg.in
libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/duration/comparison_operators/constexpr.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/duration/comparisons/1.cc [deleted file]
libstdc++-v3/testsuite/20_util/time_point/comparison_operators/constexpr.cc [new file with mode: 0644]
libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
libstdc++-v3/testsuite/util/testsuite_common_types.h

index 672d9f1a639b3077f6d5bdb5eba81dfce1107bed..262a74a6c3c9250f115346a7c87de02339294024 100644 (file)
@@ -1,3 +1,20 @@
+2010-11-05  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * doc/doxygen/user.cfg.in: Add typeindex.
+
+       * testsuite/util/testsuite_common_types.h (constexpr_comparison_eq_ne,
+       constexpr_comparison_operators): New.
+       * testsuite/20_util/duration/comparisons: Move...
+       * testsuite/20_util/duration/comparison_operators: ...here.
+       * testsuite/20_util/duration/comparison_operators/constexpr.cc: New.
+       * testsuite/20_util/time_point/comparison_operators/constexpr.cc: Add.
+
+       * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust line
+       numbers.
+       * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
+       * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same.
+       * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.
+
 2010-11-05  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/bits/shared_ptr.h (shared_ptr<>::__shared_ptr(),
index ed5c5a14810816fa2b4f09b25b581cdcf819c6af..32ea7481fb94fd6bfc9567ceff6a2112047638c2 100644 (file)
@@ -631,6 +631,7 @@ INPUT                  = @srcdir@/doc/doxygen/doxygroups.cc \
                          include/system_error \
                          include/thread \
                          include/tuple \
+                         include/typeindex \
                          include/type_traits \
                          include/unordered_map \
                          include/unordered_set \
diff --git a/libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc b/libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc
new file mode 100644 (file)
index 0000000..35151f2
--- /dev/null
@@ -0,0 +1,55 @@
+// { 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 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
+// <http://www.gnu.org/licenses/>.
+
+// 20.8.3 Class template duration [time.duration]
+
+#include <chrono>
+#include <testsuite_hooks.h>
+
+// 20.8.3.6 duration comparisons [time.duration.comparisons]
+void
+test01()
+{
+  bool test __attribute__((unused)) = true;
+  using namespace std::chrono;
+  
+  duration<int> d0(12);
+  duration<int> d1(3);
+  duration<int> d2(3);
+  
+  VERIFY(d1 < d0);  
+  VERIFY(d0 > d1);
+  
+  VERIFY(d0 != d1);
+  VERIFY(d1 == d2);
+  
+  VERIFY(d1 <= d2);
+  VERIFY(d1 >= d2);
+  
+  VERIFY(d1 <= d0);
+  VERIFY(d0 >= d1);  
+}
+
+int
+main()
+{
+  test01();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/duration/comparison_operators/constexpr.cc b/libstdc++-v3/testsuite/20_util/duration/comparison_operators/constexpr.cc
new file mode 100644 (file)
index 0000000..94338ce
--- /dev/null
@@ -0,0 +1,29 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2010 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
+// <http://www.gnu.org/licenses/>.
+
+#include <chrono>
+#include <testsuite_common_types.h>
+
+int main()
+{
+  __gnu_test::constexpr_comparison_operators test;
+  test.operator()<std::chrono::nanoseconds>();
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/duration/comparisons/1.cc b/libstdc++-v3/testsuite/20_util/duration/comparisons/1.cc
deleted file mode 100644 (file)
index 35151f2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-// { 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 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
-// <http://www.gnu.org/licenses/>.
-
-// 20.8.3 Class template duration [time.duration]
-
-#include <chrono>
-#include <testsuite_hooks.h>
-
-// 20.8.3.6 duration comparisons [time.duration.comparisons]
-void
-test01()
-{
-  bool test __attribute__((unused)) = true;
-  using namespace std::chrono;
-  
-  duration<int> d0(12);
-  duration<int> d1(3);
-  duration<int> d2(3);
-  
-  VERIFY(d1 < d0);  
-  VERIFY(d0 > d1);
-  
-  VERIFY(d0 != d1);
-  VERIFY(d1 == d2);
-  
-  VERIFY(d1 <= d2);
-  VERIFY(d1 >= d2);
-  
-  VERIFY(d1 <= d0);
-  VERIFY(d0 >= d1);  
-}
-
-int
-main()
-{
-  test01();
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/20_util/time_point/comparison_operators/constexpr.cc b/libstdc++-v3/testsuite/20_util/time_point/comparison_operators/constexpr.cc
new file mode 100644 (file)
index 0000000..427c513
--- /dev/null
@@ -0,0 +1,30 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2010 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
+// <http://www.gnu.org/licenses/>.
+
+#include <chrono>
+#include <testsuite_common_types.h>
+
+int main()
+{
+  using namespace std::chrono;
+  __gnu_test::constexpr_comparison_operators test;
+  test.operator()<time_point<system_clock>>();
+  return 0;
+}
index 9272c7eb3da4b9b5cd93b95a5b8230aabba121cc..6b04cf81db0a16f66f850809505232f7efe19ad9 100644 (file)
@@ -28,5 +28,5 @@ int main()
   return 0;
 }
 
-// { dg-error "deleted" "" { target *-*-* } 544 }
+// { dg-error "deleted" "" { target *-*-* } 571 }
 // { dg-prune-output "include" }
index 19b3a150c19d1005cab56c9803ed780a65661af7..cdd95fd1b49f1e2db1fe76b67c4b7a02a385ac7a 100644 (file)
@@ -28,5 +28,5 @@ int main()
   return 0;
 }
 
-// { dg-error "deleted" "" { target *-*-* } 583 }
+// { dg-error "deleted" "" { target *-*-* } 610 }
 // { dg-prune-output "include" }
index 12da321abd81b0e20323caa96dd481495afec168..265878d39df26165470887b8211fbc210b493a7b 100644 (file)
@@ -29,5 +29,5 @@ int main()
   return 0;
 }
 
-// { dg-error "deleted" "" { target *-*-* } 544 }
+// { dg-error "deleted" "" { target *-*-* } 571 }
 // { dg-prune-output "include" }
index e334f1b044763685063b0aee1b5e6e6586fd8ae9..acb8006ac46c652a5a5134517e6a7b2d48857b2f 100644 (file)
@@ -29,5 +29,5 @@ int main()
   return 0;
 }
 
-// { dg-error "deleted" "" { target *-*-* } 583 }
+// { dg-error "deleted" "" { target *-*-* } 610 }
 // { dg-prune-output "include" }
index c601063b0a3b3dd44169befc1292fc8827348caa..c78f9450417928ad36c8f5b68fa6dc5a31a54528 100644 (file)
@@ -462,8 +462,35 @@ namespace __gnu_test
       }
   };
 
-  // Generator to test standard layout
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+  struct constexpr_comparison_eq_ne
+  {
+    template<typename _Tp1, typename _Tp2 = _Tp1>
+      void 
+      operator()()
+      {
+       static_assert(_Tp1() == _Tp2(), "eq");
+       static_assert(!(_Tp1() != _Tp2()), "ne");
+      }
+  };
+
+  struct constexpr_comparison_operators
+  {
+    template<typename _Tp>
+      void 
+      operator()()
+      {
+       static_assert(!(_Tp() < _Tp()), "less");
+       static_assert(_Tp() <= _Tp(), "leq");
+       static_assert(!(_Tp() > _Tp()), "more");
+       static_assert(_Tp() >= _Tp(), "meq");
+       static_assert(_Tp() == _Tp(), "eq");
+       static_assert(!(_Tp() != _Tp()), "ne");
+      }
+  };
+
+  // Generator to test standard layout
   struct has_trivial_cons_dtor
   {
     template<typename _Tp>