tree_no_data_map_rand.cc: Move...
authorBenjamin Kosnik <bkoz@redhat.com>
Fri, 22 Jul 2011 04:17:17 +0000 (04:17 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Fri, 22 Jul 2011 04:17:17 +0000 (04:17 +0000)
2011-07-21  Benjamin Kosnik  <bkoz@redhat.com>

* testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc: Move...
* testsuite/ext/pb_ds/regression/tree_set_rand.cc: ... here.
* testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc: Move...
* testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc: ... here.
* testsuite/ext/pb_ds/regression/tree_data_map_rand.cc: Move...
* testsuite/ext/pb_ds/regression/tree_map_rand.cc: ... here.
* testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc: Move...
* testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc: ... here.

* testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc: Move...
* testsuite/ext/pb_ds/regression/trie_set_rand.cc: ... here.
* testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc: Move...
* testsuite/ext/pb_ds/regression/trie_set_rand_debug.cc: ... here.
* testsuite/ext/pb_ds/regression/trie_data_map_rand.cc: Move...
* testsuite/ext/pb_ds/regression/trie_map_rand.cc: ... here.
* testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc: Move...
* testsuite/ext/pb_ds/regression/trie_map_rand_debug.cc: ... here.

* testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc: Move.
* testsuite/ext/pb_ds/regression/list_update_set_rand.cc: ...here.
* testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc:
Move...
* testsuite/ext/pb_ds/regression/list_update_set_rand_debug.cc: ...here.
* testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc: Move...
* testsuite/ext/pb_ds/regression/list_update_map_rand.cc: ...here.
* testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc:
Move...
* testsuite/ext/pb_ds/regression/list_update_map_rand_debug.cc: ...here.

* testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc: Move...
* testsuite/ext/pb_ds/regression/hash_set_rand.cc: ...here.
* testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc: Move...
* testsuite/ext/pb_ds/regression/hash_set_rand_debug.cc: ...here.

* testsuite/ext/pb_ds/regression/hash_data_map_rand.cc: Move...
* testsuite/ext/pb_ds/regression/hash_map_rand.cc: ...here.
* testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc: Move...
* testsuite/ext/pb_ds/regression/hash_map_rand_debug.cc: ...here.

From-SVN: r176613

33 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand_debug.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand_debug.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand_debug.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand_debug.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand_debug.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc [deleted file]
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand_debug.cc [new file with mode: 0644]

index 5b088765ca10f966bef502aa44a0654054dc869e..ec5509eb9ee0be746f323bbc121c7b80dcddcbd9 100644 (file)
@@ -1,3 +1,44 @@
+2011-07-21  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc: Move...
+       * testsuite/ext/pb_ds/regression/tree_set_rand.cc: ... here.
+       * testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc: Move...
+       * testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc: ... here.
+       * testsuite/ext/pb_ds/regression/tree_data_map_rand.cc: Move...
+       * testsuite/ext/pb_ds/regression/tree_map_rand.cc: ... here.
+       * testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc: Move...
+       * testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc: ... here.
+
+       * testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc: Move...
+       * testsuite/ext/pb_ds/regression/trie_set_rand.cc: ... here.
+       * testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc: Move...
+       * testsuite/ext/pb_ds/regression/trie_set_rand_debug.cc: ... here.
+       * testsuite/ext/pb_ds/regression/trie_data_map_rand.cc: Move...
+       * testsuite/ext/pb_ds/regression/trie_map_rand.cc: ... here.
+       * testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc: Move...
+       * testsuite/ext/pb_ds/regression/trie_map_rand_debug.cc: ... here.
+
+       * testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc: Move.
+       * testsuite/ext/pb_ds/regression/list_update_set_rand.cc: ...here.
+       * testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc:
+       Move...
+       * testsuite/ext/pb_ds/regression/list_update_set_rand_debug.cc: ...here.
+       * testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc: Move...
+       * testsuite/ext/pb_ds/regression/list_update_map_rand.cc: ...here.
+       * testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc:
+       Move...
+       * testsuite/ext/pb_ds/regression/list_update_map_rand_debug.cc: ...here.
+
+       * testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc: Move...
+       * testsuite/ext/pb_ds/regression/hash_set_rand.cc: ...here.
+       * testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc: Move...
+       * testsuite/ext/pb_ds/regression/hash_set_rand_debug.cc: ...here.
+
+       * testsuite/ext/pb_ds/regression/hash_data_map_rand.cc: Move...
+       * testsuite/ext/pb_ds/regression/hash_map_rand.cc: ...here.
+       * testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc: Move...
+       * testsuite/ext/pb_ds/regression/hash_map_rand_debug.cc: ...here.
+
 2011-07-21  François Dumont  <francois.cppdevs@free.fr>
 
        * include/debug/safe_unordered_sequence.h,
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand.cc
deleted file mode 100644 (file)
index 5656a5b..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2005, 2006, 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 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/>.
-
-
-// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-
-// Permission to use, copy, modify, sell, and distribute this software
-// is hereby granted without fee, provided that the above copyright
-// notice appears in all copies, and that both that copyright notice
-// and this permission notice appear in supporting documentation. None
-// of the above authors, nor IBM Haifa Research Laboratories, make any
-// representation about the suitability of this software for any
-// purpose. It is provided "as is" without express or implied
-// warranty.
-
-/**
- * @file hash_data_map_rand_regression_test.cpp
- * Contains a random-operation test for maps and sets.
- */
-
-#define PB_DS_REGRESSION
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-
-#ifndef ITERATIONS
-# ifdef _GLIBCXX_DEBUG
-#  define ITERATIONS 100
-# else
-#  define ITERATIONS 5000
-#endif
-#endif
-
-#ifndef KEYS
-# ifdef _GLIBCXX_DEBUG
-#  define KEYS 200
-# else
-#  define KEYS 10000
-# endif
-#endif
-
-int
-main(int argc, char* a_p_argv[])
-{
-  using namespace __gnu_pbds::test;
-  typedef hash_map_tl_t map_tl_t;
-
-  return rand_regression_test(ITERATIONS, KEYS,
-                             "hash_data_map_rand_regression_test",
-                             map_tl_t());
-}
-
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc
deleted file mode 100644 (file)
index 65d9c11..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-// { dg-require-debug-mode "" }
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2011 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/>.
-
-/**
- * @file hash_data_map_rand.cc
- * Contains a random-operation test for maps and sets, separated out.
- */
-
-#define PB_DS_REGRESSION
-//#define PB_DS_REGRESSION_TRACE
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-#include <ext/throw_allocator.h>
-#include <ext/pb_ds/tag_and_trait.hpp>
-
-#ifndef ITERATIONS
-# define ITERATIONS 100
-#endif
-
-#ifndef KEYS
-# define KEYS 200
-#endif
-
-// Debug version of the rand regression tests, based on hash_data_map_rand
-
-// 1
-// Simplify things by unrolling the typelist of the different
-// container types into individual statements.
-//
-// Unroll the typelist represented by priority_queue_types, from
-// regression/common_type.hpp. This is just a compile-time list of 5
-// hash tables, with different policies for the type of table
-// (gp_hash, cc_hash), for the resize policies and probe functions.
-using namespace __gnu_pbds::test::detail;
-using namespace __gnu_pbds;
-typedef __gnu_pbds::test::basic_type                   basic_type;
-typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
-typedef std::equal_to<basic_type>                      equal_type;
-
-
-typedef __gnu_pbds::test::direct_mod_range_hashing_t_<allocator_type>
-                                                       cprobe_type1;
-
-typedef __gnu_pbds::test::direct_mask_range_hashing_t_<allocator_type>
-                                                       cprobe_type2;
-
-
-typedef __gnu_pbds::test::quadratic_probe_fn_t_<basic_type, allocator_type>
-                                                       probe_type1;
-
-typedef __gnu_pbds::test::linear_probe_fn_t_<basic_type, allocator_type>
-                                                       probe_type2;
-
-
-typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
-                                                           1, 8, 1, 2, false>
-                                                       trigger_type1;
-
-typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
-                                                           1, 8, 1, 2, true>
-                                                       trigger_type2;
-
-typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
-                                                           1, 8, 1, 1, false>
-                                                       trigger_type3;
-
-typedef __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<allocator_type, 1, 2, false>
-                                                       trigger_type4;
-
-typedef __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<allocator_type, 1, 2, true>
-                                                       trigger_type5;
-
-
-typedef hash_standard_resize_policy<__gnu_pbds::test::hash_prime_size_policy_t_, trigger_type1, false, unsigned long>                  resize_type1;
-
-typedef hash_standard_resize_policy<__gnu_pbds::test::hash_exponential_size_policy_t_<allocator_type>, trigger_type2, true, unsigned long>
-                                                       resize_type2;
-
-typedef hash_standard_resize_policy<__gnu_pbds::test::hash_exponential_size_policy_t_<allocator_type>, trigger_type5, false, unsigned long>
-                                                       resize_type3;
-
-
-
-// gp_hash 1
-typedef gp_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type1, probe_type1, resize_type1,
-                     false, allocator_type>
-                                                       gp_hash_type1;
-
-// gp_hash 2
-typedef gp_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type2, probe_type2, resize_type2,
-                     true, allocator_type>
-                                                       gp_hash_type2;
-
-
-// cc_hash 1
-typedef cc_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type2, resize_type3,
-                     false, allocator_type>
-                                                       cc_hash_type1;
-
-// cc_hash 2
-typedef cc_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type2, resize_type2,
-                     false, allocator_type>
-                                                       cc_hash_type2;
-
-// cc_hash 3
-typedef cc_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type1, resize_type1,
-                     true, allocator_type>
-                                                       cc_hash_type3;
-
-// 2
-// Specialize container_rand_regression_test for specific container
-// type and test function.
-
-#ifdef SPECIALIZE
-// For testing one specific container type.
-typedef cc_hash_type1                                  test_type;
-
-void debug_break_here() { }
-
-namespace __gnu_pbds {
-  namespace test {
-    namespace detail {
-
-      template<>
-      void
-      container_rand_regression_test<test_type>::operator()()
-      {
-      }
-    }
-  }
-}
-#endif
-
-int
-main()
-{
-  // Set up the test object.
-  size_t sd = 1303948889;
-  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
-
-  // 1
-  // Determine the problem container, function that fails.
-  test(gp_hash_type1());
-  test(gp_hash_type2());
-
-  test(cc_hash_type1());
-  test(cc_hash_type2());
-  test(cc_hash_type3());
-
-#ifdef SPECIALIZE
-  // 2
-  // With specified problem container set test_type typedef
-  // appropriately above. Then, specialize operator()(), also
-  // above. Finally, run this below.
-  using namespace std;
-  test_type obj;
-  test(obj);
-#endif
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand.cc
new file mode 100644 (file)
index 0000000..5656a5b
--- /dev/null
@@ -0,0 +1,73 @@
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 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 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/>.
+
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file hash_data_map_rand_regression_test.cpp
+ * Contains a random-operation test for maps and sets.
+ */
+
+#define PB_DS_REGRESSION
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+
+#ifndef ITERATIONS
+# ifdef _GLIBCXX_DEBUG
+#  define ITERATIONS 100
+# else
+#  define ITERATIONS 5000
+#endif
+#endif
+
+#ifndef KEYS
+# ifdef _GLIBCXX_DEBUG
+#  define KEYS 200
+# else
+#  define KEYS 10000
+# endif
+#endif
+
+int
+main(int argc, char* a_p_argv[])
+{
+  using namespace __gnu_pbds::test;
+  typedef hash_map_tl_t map_tl_t;
+
+  return rand_regression_test(ITERATIONS, KEYS,
+                             "hash_data_map_rand_regression_test",
+                             map_tl_t());
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_map_rand_debug.cc
new file mode 100644 (file)
index 0000000..65d9c11
--- /dev/null
@@ -0,0 +1,189 @@
+// { dg-require-debug-mode "" }
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2011 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/>.
+
+/**
+ * @file hash_data_map_rand.cc
+ * Contains a random-operation test for maps and sets, separated out.
+ */
+
+#define PB_DS_REGRESSION
+//#define PB_DS_REGRESSION_TRACE
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+#include <ext/throw_allocator.h>
+#include <ext/pb_ds/tag_and_trait.hpp>
+
+#ifndef ITERATIONS
+# define ITERATIONS 100
+#endif
+
+#ifndef KEYS
+# define KEYS 200
+#endif
+
+// Debug version of the rand regression tests, based on hash_data_map_rand
+
+// 1
+// Simplify things by unrolling the typelist of the different
+// container types into individual statements.
+//
+// Unroll the typelist represented by priority_queue_types, from
+// regression/common_type.hpp. This is just a compile-time list of 5
+// hash tables, with different policies for the type of table
+// (gp_hash, cc_hash), for the resize policies and probe functions.
+using namespace __gnu_pbds::test::detail;
+using namespace __gnu_pbds;
+typedef __gnu_pbds::test::basic_type                   basic_type;
+typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
+typedef std::equal_to<basic_type>                      equal_type;
+
+
+typedef __gnu_pbds::test::direct_mod_range_hashing_t_<allocator_type>
+                                                       cprobe_type1;
+
+typedef __gnu_pbds::test::direct_mask_range_hashing_t_<allocator_type>
+                                                       cprobe_type2;
+
+
+typedef __gnu_pbds::test::quadratic_probe_fn_t_<basic_type, allocator_type>
+                                                       probe_type1;
+
+typedef __gnu_pbds::test::linear_probe_fn_t_<basic_type, allocator_type>
+                                                       probe_type2;
+
+
+typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
+                                                           1, 8, 1, 2, false>
+                                                       trigger_type1;
+
+typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
+                                                           1, 8, 1, 2, true>
+                                                       trigger_type2;
+
+typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
+                                                           1, 8, 1, 1, false>
+                                                       trigger_type3;
+
+typedef __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<allocator_type, 1, 2, false>
+                                                       trigger_type4;
+
+typedef __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<allocator_type, 1, 2, true>
+                                                       trigger_type5;
+
+
+typedef hash_standard_resize_policy<__gnu_pbds::test::hash_prime_size_policy_t_, trigger_type1, false, unsigned long>                  resize_type1;
+
+typedef hash_standard_resize_policy<__gnu_pbds::test::hash_exponential_size_policy_t_<allocator_type>, trigger_type2, true, unsigned long>
+                                                       resize_type2;
+
+typedef hash_standard_resize_policy<__gnu_pbds::test::hash_exponential_size_policy_t_<allocator_type>, trigger_type5, false, unsigned long>
+                                                       resize_type3;
+
+
+
+// gp_hash 1
+typedef gp_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type1, probe_type1, resize_type1,
+                     false, allocator_type>
+                                                       gp_hash_type1;
+
+// gp_hash 2
+typedef gp_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type2, probe_type2, resize_type2,
+                     true, allocator_type>
+                                                       gp_hash_type2;
+
+
+// cc_hash 1
+typedef cc_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type2, resize_type3,
+                     false, allocator_type>
+                                                       cc_hash_type1;
+
+// cc_hash 2
+typedef cc_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type2, resize_type2,
+                     false, allocator_type>
+                                                       cc_hash_type2;
+
+// cc_hash 3
+typedef cc_hash_table<basic_type, basic_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type1, resize_type1,
+                     true, allocator_type>
+                                                       cc_hash_type3;
+
+// 2
+// Specialize container_rand_regression_test for specific container
+// type and test function.
+
+#ifdef SPECIALIZE
+// For testing one specific container type.
+typedef cc_hash_type1                                  test_type;
+
+void debug_break_here() { }
+
+namespace __gnu_pbds {
+  namespace test {
+    namespace detail {
+
+      template<>
+      void
+      container_rand_regression_test<test_type>::operator()()
+      {
+      }
+    }
+  }
+}
+#endif
+
+int
+main()
+{
+  // Set up the test object.
+  size_t sd = 1303948889;
+  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
+
+  // 1
+  // Determine the problem container, function that fails.
+  test(gp_hash_type1());
+  test(gp_hash_type2());
+
+  test(cc_hash_type1());
+  test(cc_hash_type2());
+  test(cc_hash_type3());
+
+#ifdef SPECIALIZE
+  // 2
+  // With specified problem container set test_type typedef
+  // appropriately above. Then, specialize operator()(), also
+  // above. Finally, run this below.
+  using namespace std;
+  test_type obj;
+  test(obj);
+#endif
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand.cc
deleted file mode 100644 (file)
index e0530f5..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2005, 2006, 2009, 2011 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/>.
-
-
-// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-
-// Permission to use, copy, modify, sell, and distribute this software
-// is hereby granted without fee, provided that the above copyright
-// notice appears in all copies, and that both that copyright notice
-// and this permission notice appear in supporting documentation. None
-// of the above authors, nor IBM Haifa Research Laboratories, make any
-// representation about the suitability of this software for any
-// purpose. It is provided "as is" without express or implied
-// warranty.
-
-/**
- * @file hash_no_data_map_rand_regression_test.cpp
- * Contains a random-operation test for maps and sets.
- */
-
-#define PB_DS_REGRESSION
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-
-#ifndef ITERATIONS
-# ifdef _GLIBCXX_DEBUG
-#  define ITERATIONS 100
-# else
-#  define ITERATIONS 5000
-#endif
-#endif
-
-#ifndef KEYS
-# ifdef _GLIBCXX_DEBUG
-#  define KEYS 200
-# else
-#  define KEYS 10000
-# endif
-#endif
-
-int
-main(int argc, char* a_p_argv[])
-{
-  using namespace __gnu_pbds::test;
-  typedef hash_set_tl_t map_tl_t;
-
-  return rand_regression_test(ITERATIONS, KEYS,
-                             "hash_no_data_map_rand_regression_test",
-                             map_tl_t());
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc
deleted file mode 100644 (file)
index bc5a596..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-// { dg-require-debug-mode "" }
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2011 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/>.
-
-/**
- * @file hash_data_map_rand.cc
- * Contains a random-operation test for maps and sets, separated out.
- */
-
-#define PB_DS_REGRESSION
-//#define PB_DS_REGRESSION_TRACE
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-#include <ext/throw_allocator.h>
-#include <ext/pb_ds/tag_and_trait.hpp>
-
-#ifndef ITERATIONS
-# define ITERATIONS 100
-#endif
-
-#ifndef KEYS
-# define KEYS 200
-#endif
-
-// Debug version of the rand regression tests, based on hash_data_map_rand
-
-// 1
-// Simplify things by unrolling the typelist of the different
-// container types into individual statements.
-//
-// Unroll the typelist represented by priority_queue_types, from
-// regression/common_type.hpp. This is just a compile-time list of 5
-// hash tables, with different policies for the type of table
-// (gp_hash, cc_hash), for the resize policies and probe functions.
-using namespace __gnu_pbds::test::detail;
-using namespace __gnu_pbds;
-typedef __gnu_pbds::test::basic_type                   basic_type;
-typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
-typedef std::equal_to<basic_type>                      equal_type;
-
-
-typedef __gnu_pbds::test::direct_mod_range_hashing_t_<allocator_type>
-                                                       cprobe_type1;
-
-typedef __gnu_pbds::test::direct_mask_range_hashing_t_<allocator_type>
-                                                       cprobe_type2;
-
-
-typedef __gnu_pbds::test::quadratic_probe_fn_t_<basic_type, allocator_type>
-                                                       probe_type1;
-
-typedef __gnu_pbds::test::linear_probe_fn_t_<basic_type, allocator_type>
-                                                       probe_type2;
-
-
-typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
-                                                           1, 8, 1, 2, false>
-                                                       trigger_type1;
-
-typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
-                                                           1, 8, 1, 2, true>
-                                                       trigger_type2;
-
-typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
-                                                           1, 8, 1, 1, false>
-                                                       trigger_type3;
-
-typedef __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<allocator_type, 1, 2, false>
-                                                       trigger_type4;
-
-typedef __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<allocator_type, 1, 2, true>
-                                                       trigger_type5;
-
-
-typedef hash_standard_resize_policy<__gnu_pbds::test::hash_prime_size_policy_t_, trigger_type1, false, unsigned long>                  resize_type1;
-
-typedef hash_standard_resize_policy<__gnu_pbds::test::hash_exponential_size_policy_t_<allocator_type>, trigger_type2, true, unsigned long>
-                                                       resize_type2;
-
-typedef hash_standard_resize_policy<__gnu_pbds::test::hash_exponential_size_policy_t_<allocator_type>, trigger_type5, false, unsigned long>
-                                                       resize_type3;
-
-
-
-// gp_hash 1
-typedef gp_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type1, probe_type1, resize_type1,
-                     false, allocator_type>
-                                                       gp_hash_type1;
-
-// gp_hash 2
-typedef gp_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type2, probe_type2, resize_type2,
-                     true, allocator_type>
-                                                       gp_hash_type2;
-
-
-// cc_hash 1
-typedef cc_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type2, resize_type3,
-                     false, allocator_type>
-                                                       cc_hash_type1;
-
-// cc_hash 2
-typedef cc_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type2, resize_type2,
-                     false, allocator_type>
-                                                       cc_hash_type2;
-
-// cc_hash 3
-typedef cc_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
-                     equal_type, cprobe_type1, resize_type1,
-                     true, allocator_type>
-                                                       cc_hash_type3;
-
-// 2
-// Specialize container_rand_regression_test for specific container
-// type and test function.
-
-#ifdef SPECIALIZE
-// For testing one specific container type.
-typedef cc_hash_type1                                  test_type;
-
-void debug_break_here() { }
-
-namespace __gnu_pbds {
-  namespace test {
-    namespace detail {
-
-      template<>
-      void
-      container_rand_regression_test<test_type>::operator()()
-      {
-      }
-    }
-  }
-}
-#endif
-
-int
-main()
-{
-  // Set up the test object.
-  size_t sd = 1303948889;
-  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
-
-  // 1
-  // Determine the problem container, function that fails.
-  test(gp_hash_type1());
-  test(gp_hash_type2());
-
-  test(cc_hash_type1());
-  test(cc_hash_type2());
-  test(cc_hash_type3());
-
-#ifdef SPECIALIZE
-  // 2
-  // With specified problem container set test_type typedef
-  // appropriately above. Then, specialize operator()(), also
-  // above. Finally, run this below.
-  using namespace std;
-  test_type obj;
-  test(obj);
-#endif
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand.cc
new file mode 100644 (file)
index 0000000..e0530f5
--- /dev/null
@@ -0,0 +1,72 @@
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009, 2011 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/>.
+
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file hash_no_data_map_rand_regression_test.cpp
+ * Contains a random-operation test for maps and sets.
+ */
+
+#define PB_DS_REGRESSION
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+
+#ifndef ITERATIONS
+# ifdef _GLIBCXX_DEBUG
+#  define ITERATIONS 100
+# else
+#  define ITERATIONS 5000
+#endif
+#endif
+
+#ifndef KEYS
+# ifdef _GLIBCXX_DEBUG
+#  define KEYS 200
+# else
+#  define KEYS 10000
+# endif
+#endif
+
+int
+main(int argc, char* a_p_argv[])
+{
+  using namespace __gnu_pbds::test;
+  typedef hash_set_tl_t map_tl_t;
+
+  return rand_regression_test(ITERATIONS, KEYS,
+                             "hash_no_data_map_rand_regression_test",
+                             map_tl_t());
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_set_rand_debug.cc
new file mode 100644 (file)
index 0000000..bc5a596
--- /dev/null
@@ -0,0 +1,189 @@
+// { dg-require-debug-mode "" }
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2011 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/>.
+
+/**
+ * @file hash_data_map_rand.cc
+ * Contains a random-operation test for maps and sets, separated out.
+ */
+
+#define PB_DS_REGRESSION
+//#define PB_DS_REGRESSION_TRACE
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+#include <ext/throw_allocator.h>
+#include <ext/pb_ds/tag_and_trait.hpp>
+
+#ifndef ITERATIONS
+# define ITERATIONS 100
+#endif
+
+#ifndef KEYS
+# define KEYS 200
+#endif
+
+// Debug version of the rand regression tests, based on hash_data_map_rand
+
+// 1
+// Simplify things by unrolling the typelist of the different
+// container types into individual statements.
+//
+// Unroll the typelist represented by priority_queue_types, from
+// regression/common_type.hpp. This is just a compile-time list of 5
+// hash tables, with different policies for the type of table
+// (gp_hash, cc_hash), for the resize policies and probe functions.
+using namespace __gnu_pbds::test::detail;
+using namespace __gnu_pbds;
+typedef __gnu_pbds::test::basic_type                   basic_type;
+typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
+typedef std::equal_to<basic_type>                      equal_type;
+
+
+typedef __gnu_pbds::test::direct_mod_range_hashing_t_<allocator_type>
+                                                       cprobe_type1;
+
+typedef __gnu_pbds::test::direct_mask_range_hashing_t_<allocator_type>
+                                                       cprobe_type2;
+
+
+typedef __gnu_pbds::test::quadratic_probe_fn_t_<basic_type, allocator_type>
+                                                       probe_type1;
+
+typedef __gnu_pbds::test::linear_probe_fn_t_<basic_type, allocator_type>
+                                                       probe_type2;
+
+
+typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
+                                                           1, 8, 1, 2, false>
+                                                       trigger_type1;
+
+typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
+                                                           1, 8, 1, 2, true>
+                                                       trigger_type2;
+
+typedef __gnu_pbds::test::hash_load_check_resize_trigger_t_<allocator_type,
+                                                           1, 8, 1, 1, false>
+                                                       trigger_type3;
+
+typedef __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<allocator_type, 1, 2, false>
+                                                       trigger_type4;
+
+typedef __gnu_pbds::test::cc_hash_max_collision_check_resize_trigger_t_<allocator_type, 1, 2, true>
+                                                       trigger_type5;
+
+
+typedef hash_standard_resize_policy<__gnu_pbds::test::hash_prime_size_policy_t_, trigger_type1, false, unsigned long>                  resize_type1;
+
+typedef hash_standard_resize_policy<__gnu_pbds::test::hash_exponential_size_policy_t_<allocator_type>, trigger_type2, true, unsigned long>
+                                                       resize_type2;
+
+typedef hash_standard_resize_policy<__gnu_pbds::test::hash_exponential_size_policy_t_<allocator_type>, trigger_type5, false, unsigned long>
+                                                       resize_type3;
+
+
+
+// gp_hash 1
+typedef gp_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type1, probe_type1, resize_type1,
+                     false, allocator_type>
+                                                       gp_hash_type1;
+
+// gp_hash 2
+typedef gp_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type2, probe_type2, resize_type2,
+                     true, allocator_type>
+                                                       gp_hash_type2;
+
+
+// cc_hash 1
+typedef cc_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type2, resize_type3,
+                     false, allocator_type>
+                                                       cc_hash_type1;
+
+// cc_hash 2
+typedef cc_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type2, resize_type2,
+                     false, allocator_type>
+                                                       cc_hash_type2;
+
+// cc_hash 3
+typedef cc_hash_table<basic_type, null_type, __gnu_pbds::test::hash,
+                     equal_type, cprobe_type1, resize_type1,
+                     true, allocator_type>
+                                                       cc_hash_type3;
+
+// 2
+// Specialize container_rand_regression_test for specific container
+// type and test function.
+
+#ifdef SPECIALIZE
+// For testing one specific container type.
+typedef cc_hash_type1                                  test_type;
+
+void debug_break_here() { }
+
+namespace __gnu_pbds {
+  namespace test {
+    namespace detail {
+
+      template<>
+      void
+      container_rand_regression_test<test_type>::operator()()
+      {
+      }
+    }
+  }
+}
+#endif
+
+int
+main()
+{
+  // Set up the test object.
+  size_t sd = 1303948889;
+  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
+
+  // 1
+  // Determine the problem container, function that fails.
+  test(gp_hash_type1());
+  test(gp_hash_type2());
+
+  test(cc_hash_type1());
+  test(cc_hash_type2());
+  test(cc_hash_type3());
+
+#ifdef SPECIALIZE
+  // 2
+  // With specified problem container set test_type typedef
+  // appropriately above. Then, specialize operator()(), also
+  // above. Finally, run this below.
+  using namespace std;
+  test_type obj;
+  test(obj);
+#endif
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc
deleted file mode 100644 (file)
index e91a753..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// { dg-require-time "" }
-
-// -*- C++ -*-
-
-// Copyright (C) 2005, 2006, 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 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/>.
-
-
-// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-
-// Permission to use, copy, modify, sell, and distribute this software
-// is hereby granted without fee, provided that the above copyright
-// notice appears in all copies, and that both that copyright notice
-// and this permission notice appear in supporting documentation. None
-// of the above authors, nor IBM Haifa Research Laboratories, make any
-// representation about the suitability of this software for any
-// purpose. It is provided "as is" without express or implied
-// warranty.
-
-/**
- * @file list_update_data_map_rand.cc
- * Contains a random-operation test for maps and sets.
- */
-
-#define PB_DS_REGRESSION
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-
-int
-main(int argc, char* a_p_argv[])
-{
-  using namespace __gnu_pbds::test;
-  typedef lu_map_tl_t map_tl_t;
-
-  return rand_regression_test(50, 10, 
-                             "lu_data_map_rand_regression_test",
-                             map_tl_t());
-}
-
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc
deleted file mode 100644 (file)
index 3a9fc3c..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-// { dg-require-debug-mode "" }
-// { dg-require-time "" }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2011 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/>.
-
-/**
- * @file list_update_data_map_rand_debug.cc
- * Contains a random-operation test for maps and sets, separated out.
- */
-
-#define PB_DS_REGRESSION
-//#define PB_DS_REGRESSION_TRACE
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-#include <ext/throw_allocator.h>
-#include <ext/pb_ds/tag_and_trait.hpp>
-
-// Debug version of the rand regression tests, based on list_update_data_map.
-
-// 1
-// Simplify things by unrolling the typelist of the different
-// container types into individual statements.
-//
-// Unroll the typelist represented by list_update_types, from
-// regression/common_type.hpp. This is just a compile-time list of
-// list_update types, with different policies for the type of
-// update (lu_move_to_front_policy, lu_counter_policy).
-
-using namespace __gnu_pbds::test::detail;
-using namespace __gnu_pbds;
-typedef __gnu_pbds::test::basic_type                   basic_type;
-typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
-typedef std::equal_to<basic_type>                      equal_type;
-
-typedef __gnu_pbds::test::lu_move_to_front_policy_t_   policy_type1;
-
-typedef __gnu_pbds::test::lu_counter_policy_t_<allocator_type, 5u>
-                                                       policy_type2;
-
-
-typedef list_update<basic_type, basic_type, equal_type, policy_type1,
-                   allocator_type>
-                                                       list_type1;
-
-typedef list_update<basic_type, basic_type, equal_type, policy_type2,
-                   allocator_type>
-                                                       list_type2;
-
-// 2
-// Specialize container_rand_regression_test for specific container
-// type and test function.
-
-#ifdef SPECIALIZE
-// For testing one specific container type.
-typedef list_type1                                     test_type;
-
-void debug_break_here() { }
-
-namespace __gnu_pbds {
-  namespace test {
-    namespace detail {
-
-      template<>
-      void
-      container_rand_regression_test<test_type>::operator()()
-      {
-      }
-
-    }
-  }
-}
-#endif
-
-int
-main()
-{
-  // Set up the test object.
-  size_t sd = 1303948889;
-  rand_reg_test test(sd, 50, 10, .2, .6, .2, .001, .25, true);
-
-  // 1
-  // Determine the problem container, function that fails.
-  test(list_type1());
-  test(list_type2());
-
-#ifdef SPECIALIZE
-  // 2
-  // With specified problem container set test_type typedef
-  // appropriately above. Then, specialize operator()(), also
-  // above. Finally, run this below.
-  using namespace std;
-  test_type obj;
-  test(obj);
-#endif
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand.cc
new file mode 100644 (file)
index 0000000..e91a753
--- /dev/null
@@ -0,0 +1,54 @@
+// { dg-require-time "" }
+
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 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 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/>.
+
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file list_update_data_map_rand.cc
+ * Contains a random-operation test for maps and sets.
+ */
+
+#define PB_DS_REGRESSION
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+
+int
+main(int argc, char* a_p_argv[])
+{
+  using namespace __gnu_pbds::test;
+  typedef lu_map_tl_t map_tl_t;
+
+  return rand_regression_test(50, 10, 
+                             "lu_data_map_rand_regression_test",
+                             map_tl_t());
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_map_rand_debug.cc
new file mode 100644 (file)
index 0000000..3a9fc3c
--- /dev/null
@@ -0,0 +1,116 @@
+// { dg-require-debug-mode "" }
+// { dg-require-time "" }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2011 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/>.
+
+/**
+ * @file list_update_data_map_rand_debug.cc
+ * Contains a random-operation test for maps and sets, separated out.
+ */
+
+#define PB_DS_REGRESSION
+//#define PB_DS_REGRESSION_TRACE
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+#include <ext/throw_allocator.h>
+#include <ext/pb_ds/tag_and_trait.hpp>
+
+// Debug version of the rand regression tests, based on list_update_data_map.
+
+// 1
+// Simplify things by unrolling the typelist of the different
+// container types into individual statements.
+//
+// Unroll the typelist represented by list_update_types, from
+// regression/common_type.hpp. This is just a compile-time list of
+// list_update types, with different policies for the type of
+// update (lu_move_to_front_policy, lu_counter_policy).
+
+using namespace __gnu_pbds::test::detail;
+using namespace __gnu_pbds;
+typedef __gnu_pbds::test::basic_type                   basic_type;
+typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
+typedef std::equal_to<basic_type>                      equal_type;
+
+typedef __gnu_pbds::test::lu_move_to_front_policy_t_   policy_type1;
+
+typedef __gnu_pbds::test::lu_counter_policy_t_<allocator_type, 5u>
+                                                       policy_type2;
+
+
+typedef list_update<basic_type, basic_type, equal_type, policy_type1,
+                   allocator_type>
+                                                       list_type1;
+
+typedef list_update<basic_type, basic_type, equal_type, policy_type2,
+                   allocator_type>
+                                                       list_type2;
+
+// 2
+// Specialize container_rand_regression_test for specific container
+// type and test function.
+
+#ifdef SPECIALIZE
+// For testing one specific container type.
+typedef list_type1                                     test_type;
+
+void debug_break_here() { }
+
+namespace __gnu_pbds {
+  namespace test {
+    namespace detail {
+
+      template<>
+      void
+      container_rand_regression_test<test_type>::operator()()
+      {
+      }
+
+    }
+  }
+}
+#endif
+
+int
+main()
+{
+  // Set up the test object.
+  size_t sd = 1303948889;
+  rand_reg_test test(sd, 50, 10, .2, .6, .2, .001, .25, true);
+
+  // 1
+  // Determine the problem container, function that fails.
+  test(list_type1());
+  test(list_type2());
+
+#ifdef SPECIALIZE
+  // 2
+  // With specified problem container set test_type typedef
+  // appropriately above. Then, specialize operator()(), also
+  // above. Finally, run this below.
+  using namespace std;
+  test_type obj;
+  test(obj);
+#endif
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand.cc
deleted file mode 100644 (file)
index 72273a8..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// { dg-require-time "" }
-
-// -*- C++ -*-
-
-// Copyright (C) 2005, 2006, 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 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/>.
-
-
-// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-
-// Permission to use, copy, modify, sell, and distribute this software
-// is hereby granted without fee, provided that the above copyright
-// notice appears in all copies, and that both that copyright notice
-// and this permission notice appear in supporting documentation. None
-// of the above authors, nor IBM Haifa Research Laboratories, make any
-// representation about the suitability of this software for any
-// purpose. It is provided "as is" without express or implied
-// warranty.
-
-/**
- * @file lu_no_data_map_rand_regression_test.cpp
- * Contains a random-operation test for maps and sets.
- */
-
-#define PB_DS_REGRESSION
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-
-int
-main(int argc, char* a_p_argv[])
-{
-  using namespace __gnu_pbds::test;
-  typedef lu_set_tl_t map_tl_t;
-
-  return rand_regression_test(50, 10,
-                             "lu_no_data_map_rand_regression_test",
-                             map_tl_t());
-}
-
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc
deleted file mode 100644 (file)
index 065ca9d..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-// { dg-require-debug-mode "" }
-// { dg-require-time "" }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2011 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/>.
-
-/**
- * @file list_update_data_map_rand_debug.cc
- * Contains a random-operation test for maps and sets, separated out.
- */
-
-#define PB_DS_REGRESSION
-//#define PB_DS_REGRESSION_TRACE
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-#include <ext/throw_allocator.h>
-#include <ext/pb_ds/tag_and_trait.hpp>
-
-// Debug version of the rand regression tests, based on list_update_data_map.
-
-// 1
-// Simplify things by unrolling the typelist of the different
-// container types into individual statements.
-//
-// Unroll the typelist represented by list_update_types, from
-// regression/common_type.hpp. This is just a compile-time list of
-// list_update types, with different policies for the type of
-// update (lu_move_to_front_policy, lu_counter_policy).
-
-using namespace __gnu_pbds::test::detail;
-using namespace __gnu_pbds;
-typedef __gnu_pbds::test::basic_type                   basic_type;
-typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
-typedef std::equal_to<basic_type>                      equal_type;
-
-typedef __gnu_pbds::test::lu_move_to_front_policy_t_   policy_type1;
-
-typedef __gnu_pbds::test::lu_counter_policy_t_<allocator_type, 5u>
-                                                       policy_type2;
-
-
-typedef list_update<basic_type, null_type, equal_type, policy_type1,
-                   allocator_type>
-                                                       list_type1;
-
-typedef list_update<basic_type, null_type, equal_type, policy_type2,
-                   allocator_type>
-                                                       list_type2;
-
-// 2
-// Specialize container_rand_regression_test for specific container
-// type and test function.
-
-#ifdef SPECIALIZE
-// For testing one specific container type.
-typedef list_type1                                     test_type;
-
-void debug_break_here() { }
-
-namespace __gnu_pbds {
-  namespace test {
-    namespace detail {
-
-      template<>
-      void
-      container_rand_regression_test<test_type>::operator()()
-      {
-      }
-
-    }
-  }
-}
-#endif
-
-int
-main()
-{
-  // Set up the test object.
-  size_t sd = 1303948889;
-  rand_reg_test test(sd, 50, 10, .2, .6, .2, .001, .25, true);
-
-  // 1
-  // Determine the problem container, function that fails.
-  test(list_type1());
-  test(list_type2());
-
-#ifdef SPECIALIZE
-  // 2
-  // With specified problem container set test_type typedef
-  // appropriately above. Then, specialize operator()(), also
-  // above. Finally, run this below.
-  using namespace std;
-  test_type obj;
-  test(obj);
-#endif
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand.cc
new file mode 100644 (file)
index 0000000..72273a8
--- /dev/null
@@ -0,0 +1,54 @@
+// { dg-require-time "" }
+
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 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 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/>.
+
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file lu_no_data_map_rand_regression_test.cpp
+ * Contains a random-operation test for maps and sets.
+ */
+
+#define PB_DS_REGRESSION
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+
+int
+main(int argc, char* a_p_argv[])
+{
+  using namespace __gnu_pbds::test;
+  typedef lu_set_tl_t map_tl_t;
+
+  return rand_regression_test(50, 10,
+                             "lu_no_data_map_rand_regression_test",
+                             map_tl_t());
+}
+
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_set_rand_debug.cc
new file mode 100644 (file)
index 0000000..065ca9d
--- /dev/null
@@ -0,0 +1,116 @@
+// { dg-require-debug-mode "" }
+// { dg-require-time "" }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2011 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/>.
+
+/**
+ * @file list_update_data_map_rand_debug.cc
+ * Contains a random-operation test for maps and sets, separated out.
+ */
+
+#define PB_DS_REGRESSION
+//#define PB_DS_REGRESSION_TRACE
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+#include <ext/throw_allocator.h>
+#include <ext/pb_ds/tag_and_trait.hpp>
+
+// Debug version of the rand regression tests, based on list_update_data_map.
+
+// 1
+// Simplify things by unrolling the typelist of the different
+// container types into individual statements.
+//
+// Unroll the typelist represented by list_update_types, from
+// regression/common_type.hpp. This is just a compile-time list of
+// list_update types, with different policies for the type of
+// update (lu_move_to_front_policy, lu_counter_policy).
+
+using namespace __gnu_pbds::test::detail;
+using namespace __gnu_pbds;
+typedef __gnu_pbds::test::basic_type                   basic_type;
+typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
+typedef std::equal_to<basic_type>                      equal_type;
+
+typedef __gnu_pbds::test::lu_move_to_front_policy_t_   policy_type1;
+
+typedef __gnu_pbds::test::lu_counter_policy_t_<allocator_type, 5u>
+                                                       policy_type2;
+
+
+typedef list_update<basic_type, null_type, equal_type, policy_type1,
+                   allocator_type>
+                                                       list_type1;
+
+typedef list_update<basic_type, null_type, equal_type, policy_type2,
+                   allocator_type>
+                                                       list_type2;
+
+// 2
+// Specialize container_rand_regression_test for specific container
+// type and test function.
+
+#ifdef SPECIALIZE
+// For testing one specific container type.
+typedef list_type1                                     test_type;
+
+void debug_break_here() { }
+
+namespace __gnu_pbds {
+  namespace test {
+    namespace detail {
+
+      template<>
+      void
+      container_rand_regression_test<test_type>::operator()()
+      {
+      }
+
+    }
+  }
+}
+#endif
+
+int
+main()
+{
+  // Set up the test object.
+  size_t sd = 1303948889;
+  rand_reg_test test(sd, 50, 10, .2, .6, .2, .001, .25, true);
+
+  // 1
+  // Determine the problem container, function that fails.
+  test(list_type1());
+  test(list_type2());
+
+#ifdef SPECIALIZE
+  // 2
+  // With specified problem container set test_type typedef
+  // appropriately above. Then, specialize operator()(), also
+  // above. Finally, run this below.
+  using namespace std;
+  test_type obj;
+  test(obj);
+#endif
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand.cc
deleted file mode 100644 (file)
index 01751e3..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2005, 2006, 2009, 2011 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/>.
-
-
-// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-
-// Permission to use, copy, modify, sell, and distribute this software
-// is hereby granted without fee, provided that the above copyright
-// notice appears in all copies, and that both that copyright notice
-// and this permission notice appear in supporting documentation. None
-// of the above authors, nor IBM Haifa Research Laboratories, make any
-// representation about the suitability of this software for any
-// purpose. It is provided "as is" without express or implied
-// warranty.
-
-/**
- * @file tree_data_map_rand_regression_test.cpp
- * Contains a random-operation test for maps and sets.
- */
-
-#define PB_DS_REGRESSION
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-
-#ifndef ITERATIONS
-# ifdef _GLIBCXX_DEBUG
-#  define ITERATIONS 100
-# else
-#  define ITERATIONS 5000
-#endif
-#endif
-
-#ifndef KEYS
-# ifdef _GLIBCXX_DEBUG
-#  define KEYS 200
-# else
-#  define KEYS 10000
-# endif
-#endif
-
-int
-main(int argc, char* a_p_argv[])
-{
-  using namespace __gnu_pbds::test;
-  typedef tree_map_tl_t map_tl_t;
-
-  return rand_regression_test(ITERATIONS, KEYS,
-                             "tree_data_map_rand_regression_test",
-                             map_tl_t());
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc
deleted file mode 100644 (file)
index 75b31f0..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-// { dg-require-debug-mode "" }
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2011 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/>.
-
-/**
- * @file tree_data_map_rand_debug.cc
- * Contains a random-operation test for maps and sets, separated out.
- */
-
-#define PB_DS_REGRESSION
-//#define PB_DS_REGRESSION_TRACE
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-#include <ext/throw_allocator.h>
-#include <ext/pb_ds/tag_and_trait.hpp>
-
-#ifndef ITERATIONS
-# define ITERATIONS 100
-#endif
-
-#ifndef KEYS
-# define KEYS 200
-#endif
-
-// Debug version of the rand regression tests, based on tree_data_map.
-
-// 1
-// Simplify things by unrolling the typelist of the different
-// container types into individual statements.
-//
-// Unroll the typelist represented by tree_types, from
-// regression/common_type.hpp. This is just a compile-time list of 6
-// tree types, with different policies for the type of tree
-// (ov_tree_tag, rb_tree_tag, splay_tree_tag) and for the node
-// update (null_node_update, tree_order_statistics_node_update)
-
-using namespace __gnu_pbds::test::detail;
-using namespace __gnu_pbds;
-typedef __gnu_pbds::test::basic_type                   basic_type;
-typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
-
-// ov_tree_tag
-typedef tree<basic_type, basic_type, std::less<basic_type>,
-            ov_tree_tag, null_node_update,
-            allocator_type>                            ov_tree_type1;
-
-typedef tree<basic_type, basic_type, std::less<basic_type>,
-            ov_tree_tag, tree_order_statistics_node_update,
-            allocator_type>                            ov_tree_type2;
-
-// rb_tree_tag
-typedef tree<basic_type, basic_type, std::less<basic_type>,
-            rb_tree_tag, null_node_update,
-            allocator_type>                            rb_tree_type1;
-
-typedef tree<basic_type, basic_type, std::less<basic_type>,
-            rb_tree_tag, tree_order_statistics_node_update,
-            allocator_type>                            rb_tree_type2;
-
-// splay_tree_tag
-typedef tree<basic_type, basic_type, std::less<basic_type>,
-            splay_tree_tag, null_node_update,
-            allocator_type>                            splay_tree_type1;
-
-typedef tree<basic_type, basic_type, std::less<basic_type>,
-            splay_tree_tag, tree_order_statistics_node_update,
-            allocator_type>                            splay_tree_type2;
-
-
-// 2
-// Specialize container_rand_regression_test for specific container
-// type and test function.
-
-#ifdef SPECIALIZE
-// For testing one specific container type.
-typedef ov_tree_type2                                  test_type;
-
-void debug_break_here() { }
-
-namespace __gnu_pbds {
-  namespace test {
-    namespace detail {
-
-      template<>
-      void
-      container_rand_regression_test<test_type>::operator()()
-      {
-      }
-
-    }
-  }
-}
-#endif
-
-int
-main()
-{
-  // Set up the test object.
-  size_t sd = 1303948889;
-  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
-
-  // 1
-  // Determine the problem container, function that fails.
-  test(ov_tree_type1());
-  test(ov_tree_type2());
-  test(rb_tree_type1());
-  test(rb_tree_type2());
-  test(splay_tree_type1());
-  test(splay_tree_type2());
-
-#ifdef SPECIALIZE
-  // 2
-  // With specified problem container set test_type typedef
-  // appropriately above. Then, specialize operator()(), also
-  // above. Finally, run this below.
-  using namespace std;
-  test_type obj;
-  test(obj);
-#endif
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand.cc
new file mode 100644 (file)
index 0000000..01751e3
--- /dev/null
@@ -0,0 +1,72 @@
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009, 2011 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/>.
+
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file tree_data_map_rand_regression_test.cpp
+ * Contains a random-operation test for maps and sets.
+ */
+
+#define PB_DS_REGRESSION
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+
+#ifndef ITERATIONS
+# ifdef _GLIBCXX_DEBUG
+#  define ITERATIONS 100
+# else
+#  define ITERATIONS 5000
+#endif
+#endif
+
+#ifndef KEYS
+# ifdef _GLIBCXX_DEBUG
+#  define KEYS 200
+# else
+#  define KEYS 10000
+# endif
+#endif
+
+int
+main(int argc, char* a_p_argv[])
+{
+  using namespace __gnu_pbds::test;
+  typedef tree_map_tl_t map_tl_t;
+
+  return rand_regression_test(ITERATIONS, KEYS,
+                             "tree_data_map_rand_regression_test",
+                             map_tl_t());
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc
new file mode 100644 (file)
index 0000000..75b31f0
--- /dev/null
@@ -0,0 +1,144 @@
+// { dg-require-debug-mode "" }
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2011 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/>.
+
+/**
+ * @file tree_data_map_rand_debug.cc
+ * Contains a random-operation test for maps and sets, separated out.
+ */
+
+#define PB_DS_REGRESSION
+//#define PB_DS_REGRESSION_TRACE
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+#include <ext/throw_allocator.h>
+#include <ext/pb_ds/tag_and_trait.hpp>
+
+#ifndef ITERATIONS
+# define ITERATIONS 100
+#endif
+
+#ifndef KEYS
+# define KEYS 200
+#endif
+
+// Debug version of the rand regression tests, based on tree_data_map.
+
+// 1
+// Simplify things by unrolling the typelist of the different
+// container types into individual statements.
+//
+// Unroll the typelist represented by tree_types, from
+// regression/common_type.hpp. This is just a compile-time list of 6
+// tree types, with different policies for the type of tree
+// (ov_tree_tag, rb_tree_tag, splay_tree_tag) and for the node
+// update (null_node_update, tree_order_statistics_node_update)
+
+using namespace __gnu_pbds::test::detail;
+using namespace __gnu_pbds;
+typedef __gnu_pbds::test::basic_type                   basic_type;
+typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
+
+// ov_tree_tag
+typedef tree<basic_type, basic_type, std::less<basic_type>,
+            ov_tree_tag, null_node_update,
+            allocator_type>                            ov_tree_type1;
+
+typedef tree<basic_type, basic_type, std::less<basic_type>,
+            ov_tree_tag, tree_order_statistics_node_update,
+            allocator_type>                            ov_tree_type2;
+
+// rb_tree_tag
+typedef tree<basic_type, basic_type, std::less<basic_type>,
+            rb_tree_tag, null_node_update,
+            allocator_type>                            rb_tree_type1;
+
+typedef tree<basic_type, basic_type, std::less<basic_type>,
+            rb_tree_tag, tree_order_statistics_node_update,
+            allocator_type>                            rb_tree_type2;
+
+// splay_tree_tag
+typedef tree<basic_type, basic_type, std::less<basic_type>,
+            splay_tree_tag, null_node_update,
+            allocator_type>                            splay_tree_type1;
+
+typedef tree<basic_type, basic_type, std::less<basic_type>,
+            splay_tree_tag, tree_order_statistics_node_update,
+            allocator_type>                            splay_tree_type2;
+
+
+// 2
+// Specialize container_rand_regression_test for specific container
+// type and test function.
+
+#ifdef SPECIALIZE
+// For testing one specific container type.
+typedef ov_tree_type2                                  test_type;
+
+void debug_break_here() { }
+
+namespace __gnu_pbds {
+  namespace test {
+    namespace detail {
+
+      template<>
+      void
+      container_rand_regression_test<test_type>::operator()()
+      {
+      }
+
+    }
+  }
+}
+#endif
+
+int
+main()
+{
+  // Set up the test object.
+  size_t sd = 1303948889;
+  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
+
+  // 1
+  // Determine the problem container, function that fails.
+  test(ov_tree_type1());
+  test(ov_tree_type2());
+  test(rb_tree_type1());
+  test(rb_tree_type2());
+  test(splay_tree_type1());
+  test(splay_tree_type2());
+
+#ifdef SPECIALIZE
+  // 2
+  // With specified problem container set test_type typedef
+  // appropriately above. Then, specialize operator()(), also
+  // above. Finally, run this below.
+  using namespace std;
+  test_type obj;
+  test(obj);
+#endif
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand.cc
deleted file mode 100644 (file)
index c7dadb0..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2005, 2006, 2009, 2011 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/>.
-
-
-// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-
-// Permission to use, copy, modify, sell, and distribute this software
-// is hereby granted without fee, provided that the above copyright
-// notice appears in all copies, and that both that copyright notice
-// and this permission notice appear in supporting documentation. None
-// of the above authors, nor IBM Haifa Research Laboratories, make any
-// representation about the suitability of this software for any
-// purpose. It is provided "as is" without express or implied
-// warranty.
-
-/**
- * @file tree_no_data_map_rand_regression_test.cpp
- * Contains a random-operation test for maps and sets.
- */
-
-#define PB_DS_REGRESSION
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-
-
-#ifndef ITERATIONS
-# ifdef _GLIBCXX_DEBUG
-#  define ITERATIONS 100
-# else
-#  define ITERATIONS 5000
-#endif
-#endif
-
-#ifndef KEYS
-# ifdef _GLIBCXX_DEBUG
-#  define KEYS 200
-# else
-#  define KEYS 10000
-# endif
-#endif
-
-int
-main(int argc, char* a_p_argv[])
-{
-  using namespace __gnu_pbds::test;
-  typedef tree_set_tl_t map_tl_t;
-
-  return rand_regression_test(ITERATIONS, KEYS,
-                             "tree_no_data_map_rand_regression_test",
-                             map_tl_t());
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc
deleted file mode 100644 (file)
index 1e85d01..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-// { dg-require-debug-mode "" }
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2011 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/>.
-
-/**
- * @file tree_data_map_rand_debug.cc
- * Contains a random-operation test for maps and sets, separated out.
- */
-
-#define PB_DS_REGRESSION
-//#define PB_DS_REGRESSION_TRACE
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-#include <ext/throw_allocator.h>
-#include <ext/pb_ds/tag_and_trait.hpp>
-
-#ifndef ITERATIONS
-# define ITERATIONS 100
-#endif
-
-#ifndef KEYS
-# define KEYS 200
-#endif
-
-// Debug version of the rand regression tests, based on tree_data_map.
-
-// 1
-// Simplify things by unrolling the typelist of the different
-// container types into individual statements.
-//
-// Unroll the typelist represented by tree_types, from
-// regression/common_type.hpp. This is just a compile-time list of 6
-// tree types, with different policies for the type of tree
-// (ov_tree_tag, rb_tree_tag, splay_tree_tag) and for the node
-// update (null_node_update, tree_order_statistics_node_update)
-
-using namespace __gnu_pbds::test::detail;
-using namespace __gnu_pbds;
-typedef __gnu_pbds::test::basic_type                   basic_type;
-typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
-
-// ov_tree_tag
-typedef tree<basic_type, null_type, std::less<basic_type>,
-            ov_tree_tag, null_node_update,
-            allocator_type>                            ov_tree_type1;
-
-typedef tree<basic_type, null_type, std::less<basic_type>,
-            ov_tree_tag, tree_order_statistics_node_update,
-            allocator_type>                            ov_tree_type2;
-
-// rb_tree_tag
-typedef tree<basic_type, null_type, std::less<basic_type>,
-            rb_tree_tag, null_node_update,
-            allocator_type>                            rb_tree_type1;
-
-typedef tree<basic_type, null_type, std::less<basic_type>,
-            rb_tree_tag, tree_order_statistics_node_update,
-            allocator_type>                            rb_tree_type2;
-
-// splay_tree_tag
-typedef tree<basic_type, null_type, std::less<basic_type>,
-            splay_tree_tag, null_node_update,
-            allocator_type>                            splay_tree_type1;
-
-typedef tree<basic_type, null_type, std::less<basic_type>,
-            splay_tree_tag, tree_order_statistics_node_update,
-            allocator_type>                            splay_tree_type2;
-
-
-// 2
-// Specialize container_rand_regression_test for specific container
-// type and test function.
-
-#ifdef SPECIALIZE
-// For testing one specific container type.
-typedef ov_tree_type2                                  test_type;
-
-void debug_break_here() { }
-
-namespace __gnu_pbds {
-  namespace test {
-    namespace detail {
-
-      template<>
-      void
-      container_rand_regression_test<test_type>::operator()()
-      {
-      }
-
-    }
-  }
-}
-#endif
-
-int
-main()
-{
-  // Set up the test object.
-  size_t sd = 1303948889;
-  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
-
-  // 1
-  // Determine the problem container, function that fails.
-  test(ov_tree_type1());
-  test(ov_tree_type2());
-  test(rb_tree_type1());
-  test(rb_tree_type2());
-  test(splay_tree_type1());
-  test(splay_tree_type2());
-
-#ifdef SPECIALIZE
-  // 2
-  // With specified problem container set test_type typedef
-  // appropriately above. Then, specialize operator()(), also
-  // above. Finally, run this below.
-  using namespace std;
-  test_type obj;
-  test(obj);
-#endif
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand.cc
new file mode 100644 (file)
index 0000000..c7dadb0
--- /dev/null
@@ -0,0 +1,73 @@
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009, 2011 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/>.
+
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file tree_no_data_map_rand_regression_test.cpp
+ * Contains a random-operation test for maps and sets.
+ */
+
+#define PB_DS_REGRESSION
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+
+
+#ifndef ITERATIONS
+# ifdef _GLIBCXX_DEBUG
+#  define ITERATIONS 100
+# else
+#  define ITERATIONS 5000
+#endif
+#endif
+
+#ifndef KEYS
+# ifdef _GLIBCXX_DEBUG
+#  define KEYS 200
+# else
+#  define KEYS 10000
+# endif
+#endif
+
+int
+main(int argc, char* a_p_argv[])
+{
+  using namespace __gnu_pbds::test;
+  typedef tree_set_tl_t map_tl_t;
+
+  return rand_regression_test(ITERATIONS, KEYS,
+                             "tree_no_data_map_rand_regression_test",
+                             map_tl_t());
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc
new file mode 100644 (file)
index 0000000..1e85d01
--- /dev/null
@@ -0,0 +1,144 @@
+// { dg-require-debug-mode "" }
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2011 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/>.
+
+/**
+ * @file tree_data_map_rand_debug.cc
+ * Contains a random-operation test for maps and sets, separated out.
+ */
+
+#define PB_DS_REGRESSION
+//#define PB_DS_REGRESSION_TRACE
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+#include <ext/throw_allocator.h>
+#include <ext/pb_ds/tag_and_trait.hpp>
+
+#ifndef ITERATIONS
+# define ITERATIONS 100
+#endif
+
+#ifndef KEYS
+# define KEYS 200
+#endif
+
+// Debug version of the rand regression tests, based on tree_data_map.
+
+// 1
+// Simplify things by unrolling the typelist of the different
+// container types into individual statements.
+//
+// Unroll the typelist represented by tree_types, from
+// regression/common_type.hpp. This is just a compile-time list of 6
+// tree types, with different policies for the type of tree
+// (ov_tree_tag, rb_tree_tag, splay_tree_tag) and for the node
+// update (null_node_update, tree_order_statistics_node_update)
+
+using namespace __gnu_pbds::test::detail;
+using namespace __gnu_pbds;
+typedef __gnu_pbds::test::basic_type                   basic_type;
+typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
+
+// ov_tree_tag
+typedef tree<basic_type, null_type, std::less<basic_type>,
+            ov_tree_tag, null_node_update,
+            allocator_type>                            ov_tree_type1;
+
+typedef tree<basic_type, null_type, std::less<basic_type>,
+            ov_tree_tag, tree_order_statistics_node_update,
+            allocator_type>                            ov_tree_type2;
+
+// rb_tree_tag
+typedef tree<basic_type, null_type, std::less<basic_type>,
+            rb_tree_tag, null_node_update,
+            allocator_type>                            rb_tree_type1;
+
+typedef tree<basic_type, null_type, std::less<basic_type>,
+            rb_tree_tag, tree_order_statistics_node_update,
+            allocator_type>                            rb_tree_type2;
+
+// splay_tree_tag
+typedef tree<basic_type, null_type, std::less<basic_type>,
+            splay_tree_tag, null_node_update,
+            allocator_type>                            splay_tree_type1;
+
+typedef tree<basic_type, null_type, std::less<basic_type>,
+            splay_tree_tag, tree_order_statistics_node_update,
+            allocator_type>                            splay_tree_type2;
+
+
+// 2
+// Specialize container_rand_regression_test for specific container
+// type and test function.
+
+#ifdef SPECIALIZE
+// For testing one specific container type.
+typedef ov_tree_type2                                  test_type;
+
+void debug_break_here() { }
+
+namespace __gnu_pbds {
+  namespace test {
+    namespace detail {
+
+      template<>
+      void
+      container_rand_regression_test<test_type>::operator()()
+      {
+      }
+
+    }
+  }
+}
+#endif
+
+int
+main()
+{
+  // Set up the test object.
+  size_t sd = 1303948889;
+  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
+
+  // 1
+  // Determine the problem container, function that fails.
+  test(ov_tree_type1());
+  test(ov_tree_type2());
+  test(rb_tree_type1());
+  test(rb_tree_type2());
+  test(splay_tree_type1());
+  test(splay_tree_type2());
+
+#ifdef SPECIALIZE
+  // 2
+  // With specified problem container set test_type typedef
+  // appropriately above. Then, specialize operator()(), also
+  // above. Finally, run this below.
+  using namespace std;
+  test_type obj;
+  test(obj);
+#endif
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand.cc
deleted file mode 100644 (file)
index 8a39028..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2005, 2006, 2009, 2011 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/>.
-
-
-// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-
-// Permission to use, copy, modify, sell, and distribute this software
-// is hereby granted without fee, provided that the above copyright
-// notice appears in all copies, and that both that copyright notice
-// and this permission notice appear in supporting documentation. None
-// of the above authors, nor IBM Haifa Research Laboratories, make any
-// representation about the suitability of this software for any
-// purpose. It is provided "as is" without express or implied
-// warranty.
-
-/**
- * @file trie_data_map_rand_regression_test.cpp
- * Contains a random-operation test for maps and sets.
- */
-
-#define PB_DS_REGRESSION
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-
-#ifndef ITERATIONS
-# ifdef _GLIBCXX_DEBUG
-#  define ITERATIONS 100
-# else
-#  define ITERATIONS 5000
-#endif
-#endif
-
-#ifndef KEYS
-# ifdef _GLIBCXX_DEBUG
-#  define KEYS 200
-# else
-#  define KEYS 10000
-# endif
-#endif
-
-int
-main(int argc, char* a_p_argv[])
-{
-  using namespace __gnu_pbds::test;
-  typedef trie_map_tl_t map_tl_t;
-
-  return rand_regression_test(ITERATIONS, KEYS,
-                             "trie_data_map_rand_regression_test",
-                             map_tl_t());
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc
deleted file mode 100644 (file)
index 701e7d8..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-// { dg-require-debug-mode "" }
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2011 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/>.
-
-/**
- * @file trie_data_map_rand_debug.cc
- * Contains a random-operation test for maps and sets, separated out.
- */
-
-#define PB_DS_REGRESSION
-//#define PB_DS_REGRESSION_TRACE
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-#include <ext/throw_allocator.h>
-#include <ext/pb_ds/tag_and_trait.hpp>
-
-#ifndef ITERATIONS
-# define ITERATIONS 100
-#endif
-
-#ifndef KEYS
-# define KEYS 200
-#endif
-
-// Debug version of the rand regression tests, based on trie_no_data_map.
-
-// 1
-// Simplify things by unrolling the typelist of the different
-// container types into individual statements.
-//
-// Unroll the typelist represented by tree_types, from
-// regression/common_type.hpp. This is just a compile-time list of 6
-// tree types, with different policies for the type of tree
-// (pat_trie_tag) and for the node
-// update (null_node_update, trie_order_statistics_node_update,
-// trie_order_staticstics_node_update, trie_prefix_search_node_update)
-
-using namespace __gnu_pbds::test::detail;
-using namespace __gnu_pbds;
-typedef __gnu_pbds::test::basic_type                   basic_type;
-typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
-typedef __gnu_pbds::trie_string_access_traits<basic_type, char('a'), 100,
-                                               false, allocator_type>
-                                                       etraits_type;
-
-// pat_trie_tag
-typedef trie<basic_type, basic_type, etraits_type, pat_trie_tag,
-            null_node_update, allocator_type>
-                                                       trie_type1;
-
-typedef trie<basic_type, basic_type, etraits_type, pat_trie_tag,
-            trie_order_statistics_node_update, allocator_type>
-                                                       trie_type2;
-
-typedef trie<basic_type, basic_type, etraits_type, pat_trie_tag,
-            trie_prefix_search_node_update, allocator_type>
-                                                       trie_type3;
-
-
-// 2
-// Specialize container_rand_regression_test for specific container
-// type and test function.
-
-#ifdef SPECIALIZE
-// For testing one specific container type.
-typedef trie_type1                                     test_type;
-
-void debug_break_here() { }
-
-namespace __gnu_pbds {
-  namespace test {
-    namespace detail {
-
-      template<>
-      void
-      container_rand_regression_test<test_type>::operator()()
-      {
-
-      }
-    }
-  }
-}
-#endif
-
-int
-main()
-{
-  // Set up the test object.
-  size_t sd = 1303948889;
-  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
-
-  // 1
-  // Determine the problem container, function that fails.
-  test(trie_type1());
-  test(trie_type2());
-  test(trie_type3());
-
-#ifdef SPECIALIZE
-  // 2
-  // With specified problem container set test_type typedef
-  // appropriately above. Then, specialize operator()(), also
-  // above. Finally, run this below.
-  using namespace std;
-  test_type obj;
-  test(obj);
-#endif
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand.cc
new file mode 100644 (file)
index 0000000..8a39028
--- /dev/null
@@ -0,0 +1,72 @@
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009, 2011 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/>.
+
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trie_data_map_rand_regression_test.cpp
+ * Contains a random-operation test for maps and sets.
+ */
+
+#define PB_DS_REGRESSION
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+
+#ifndef ITERATIONS
+# ifdef _GLIBCXX_DEBUG
+#  define ITERATIONS 100
+# else
+#  define ITERATIONS 5000
+#endif
+#endif
+
+#ifndef KEYS
+# ifdef _GLIBCXX_DEBUG
+#  define KEYS 200
+# else
+#  define KEYS 10000
+# endif
+#endif
+
+int
+main(int argc, char* a_p_argv[])
+{
+  using namespace __gnu_pbds::test;
+  typedef trie_map_tl_t map_tl_t;
+
+  return rand_regression_test(ITERATIONS, KEYS,
+                             "trie_data_map_rand_regression_test",
+                             map_tl_t());
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_map_rand_debug.cc
new file mode 100644 (file)
index 0000000..701e7d8
--- /dev/null
@@ -0,0 +1,131 @@
+// { dg-require-debug-mode "" }
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2011 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/>.
+
+/**
+ * @file trie_data_map_rand_debug.cc
+ * Contains a random-operation test for maps and sets, separated out.
+ */
+
+#define PB_DS_REGRESSION
+//#define PB_DS_REGRESSION_TRACE
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+#include <ext/throw_allocator.h>
+#include <ext/pb_ds/tag_and_trait.hpp>
+
+#ifndef ITERATIONS
+# define ITERATIONS 100
+#endif
+
+#ifndef KEYS
+# define KEYS 200
+#endif
+
+// Debug version of the rand regression tests, based on trie_no_data_map.
+
+// 1
+// Simplify things by unrolling the typelist of the different
+// container types into individual statements.
+//
+// Unroll the typelist represented by tree_types, from
+// regression/common_type.hpp. This is just a compile-time list of 6
+// tree types, with different policies for the type of tree
+// (pat_trie_tag) and for the node
+// update (null_node_update, trie_order_statistics_node_update,
+// trie_order_staticstics_node_update, trie_prefix_search_node_update)
+
+using namespace __gnu_pbds::test::detail;
+using namespace __gnu_pbds;
+typedef __gnu_pbds::test::basic_type                   basic_type;
+typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
+typedef __gnu_pbds::trie_string_access_traits<basic_type, char('a'), 100,
+                                               false, allocator_type>
+                                                       etraits_type;
+
+// pat_trie_tag
+typedef trie<basic_type, basic_type, etraits_type, pat_trie_tag,
+            null_node_update, allocator_type>
+                                                       trie_type1;
+
+typedef trie<basic_type, basic_type, etraits_type, pat_trie_tag,
+            trie_order_statistics_node_update, allocator_type>
+                                                       trie_type2;
+
+typedef trie<basic_type, basic_type, etraits_type, pat_trie_tag,
+            trie_prefix_search_node_update, allocator_type>
+                                                       trie_type3;
+
+
+// 2
+// Specialize container_rand_regression_test for specific container
+// type and test function.
+
+#ifdef SPECIALIZE
+// For testing one specific container type.
+typedef trie_type1                                     test_type;
+
+void debug_break_here() { }
+
+namespace __gnu_pbds {
+  namespace test {
+    namespace detail {
+
+      template<>
+      void
+      container_rand_regression_test<test_type>::operator()()
+      {
+
+      }
+    }
+  }
+}
+#endif
+
+int
+main()
+{
+  // Set up the test object.
+  size_t sd = 1303948889;
+  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
+
+  // 1
+  // Determine the problem container, function that fails.
+  test(trie_type1());
+  test(trie_type2());
+  test(trie_type3());
+
+#ifdef SPECIALIZE
+  // 2
+  // With specified problem container set test_type typedef
+  // appropriately above. Then, specialize operator()(), also
+  // above. Finally, run this below.
+  using namespace std;
+  test_type obj;
+  test(obj);
+#endif
+
+  return 0;
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand.cc
deleted file mode 100644 (file)
index 2414118..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2005, 2006, 2009, 2010, 2011 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/>.
-
-
-// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
-
-// Permission to use, copy, modify, sell, and distribute this software
-// is hereby granted without fee, provided that the above copyright
-// notice appears in all copies, and that both that copyright notice
-// and this permission notice appear in supporting documentation. None
-// of the above authors, nor IBM Haifa Research Laboratories, make any
-// representation about the suitability of this software for any
-// purpose. It is provided "as is" without express or implied
-// warranty.
-
-/**
- * @file trie_no_data_map_rand_regression_test.cpp
- * Contains a random-operation test for maps and sets.
- */
-
-#define PB_DS_REGRESSION
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-
-#ifndef ITERATIONS
-# ifdef _GLIBCXX_DEBUG
-#  define ITERATIONS 100
-# else
-#  define ITERATIONS 5000
-#endif
-#endif
-
-#ifndef KEYS
-# ifdef _GLIBCXX_DEBUG
-#  define KEYS 200
-# else
-#  define KEYS 10000
-# endif
-#endif
-
-int
-main(int argc, char* a_p_argv[])
-{
-  using namespace __gnu_pbds::test;
-  typedef trie_set_tl_t map_tl_t;
-
-  return rand_regression_test(ITERATIONS, KEYS,
-                             "trie_no_data_map_rand_regression_test",
-                             map_tl_t());
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc
deleted file mode 100644 (file)
index 19a201d..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-// { dg-require-debug-mode "" }
-// { dg-require-time "" }
-// This can take long on simulators, timing out the test.
-// { dg-options "-DITERATIONS=5" { target simulator } }
-// { dg-timeout-factor 2.0 }
-
-// -*- C++ -*-
-
-// Copyright (C) 2011 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/>.
-
-/**
- * @file trie_data_map_rand_debug.cc
- * Contains a random-operation test for maps and sets, separated out.
- */
-
-#define PB_DS_REGRESSION
-//#define PB_DS_REGRESSION_TRACE
-
-#include <regression/rand/assoc/rand_regression_test.hpp>
-#include <regression/common_type.hpp>
-#include <ext/throw_allocator.h>
-#include <ext/pb_ds/tag_and_trait.hpp>
-
-#ifndef ITERATIONS
-# define ITERATIONS 100
-#endif
-
-#ifndef KEYS
-# define KEYS 200
-#endif
-
-// Debug version of the rand regression tests, based on trie_no_data_map.
-
-// 1
-// Simplify things by unrolling the typelist of the different
-// container types into individual statements.
-//
-// Unroll the typelist represented by tree_types, from
-// regression/common_type.hpp. This is just a compile-time list of 6
-// tree types, with different policies for the type of tree
-// (pat_trie_tag) and for the node
-// update (null_node_update, trie_order_statistics_node_update,
-// trie_order_staticstics_node_update, trie_prefix_search_node_update)
-
-using namespace __gnu_pbds::test::detail;
-using namespace __gnu_pbds;
-typedef __gnu_pbds::test::basic_type                   basic_type;
-typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
-typedef __gnu_pbds::trie_string_access_traits<basic_type, char('a'), 100,
-                                               false, allocator_type>
-                                                       etraits_type;
-
-// pat_trie_tag
-typedef trie<basic_type, null_type, etraits_type, pat_trie_tag,
-            null_node_update, allocator_type>
-                                                       trie_type1;
-
-typedef trie<basic_type, null_type, etraits_type, pat_trie_tag,
-            trie_order_statistics_node_update, allocator_type>
-                                                       trie_type2;
-
-typedef trie<basic_type, null_type, etraits_type, pat_trie_tag,
-            trie_prefix_search_node_update, allocator_type>
-                                                       trie_type3;
-
-
-// 2
-// Specialize container_rand_regression_test for specific container
-// type and test function.
-
-#ifdef SPECIALIZE
-// For testing one specific container type.
-typedef trie_type1                                     test_type;
-
-void debug_break_here() { }
-
-namespace __gnu_pbds {
-  namespace test {
-    namespace detail {
-
-      template<>
-      void
-      container_rand_regression_test<test_type>::operator()()
-      {
-
-      }
-    }
-  }
-}
-#endif
-
-int
-main()
-{
-  // Set up the test object.
-  size_t sd = 1303948889;
-  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
-
-  // 1
-  // Determine the problem container, function that fails.
-  test(trie_type1());
-  test(trie_type2());
-  test(trie_type3());
-
-#ifdef SPECIALIZE
-  // 2
-  // With specified problem container set test_type typedef
-  // appropriately above. Then, specialize operator()(), also
-  // above. Finally, run this below.
-  using namespace std;
-  test_type obj;
-  test(obj);
-#endif
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand.cc
new file mode 100644 (file)
index 0000000..2414118
--- /dev/null
@@ -0,0 +1,72 @@
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009, 2010, 2011 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/>.
+
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trie_no_data_map_rand_regression_test.cpp
+ * Contains a random-operation test for maps and sets.
+ */
+
+#define PB_DS_REGRESSION
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+
+#ifndef ITERATIONS
+# ifdef _GLIBCXX_DEBUG
+#  define ITERATIONS 100
+# else
+#  define ITERATIONS 5000
+#endif
+#endif
+
+#ifndef KEYS
+# ifdef _GLIBCXX_DEBUG
+#  define KEYS 200
+# else
+#  define KEYS 10000
+# endif
+#endif
+
+int
+main(int argc, char* a_p_argv[])
+{
+  using namespace __gnu_pbds::test;
+  typedef trie_set_tl_t map_tl_t;
+
+  return rand_regression_test(ITERATIONS, KEYS,
+                             "trie_no_data_map_rand_regression_test",
+                             map_tl_t());
+}
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand_debug.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_set_rand_debug.cc
new file mode 100644 (file)
index 0000000..19a201d
--- /dev/null
@@ -0,0 +1,131 @@
+// { dg-require-debug-mode "" }
+// { dg-require-time "" }
+// This can take long on simulators, timing out the test.
+// { dg-options "-DITERATIONS=5" { target simulator } }
+// { dg-timeout-factor 2.0 }
+
+// -*- C++ -*-
+
+// Copyright (C) 2011 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/>.
+
+/**
+ * @file trie_data_map_rand_debug.cc
+ * Contains a random-operation test for maps and sets, separated out.
+ */
+
+#define PB_DS_REGRESSION
+//#define PB_DS_REGRESSION_TRACE
+
+#include <regression/rand/assoc/rand_regression_test.hpp>
+#include <regression/common_type.hpp>
+#include <ext/throw_allocator.h>
+#include <ext/pb_ds/tag_and_trait.hpp>
+
+#ifndef ITERATIONS
+# define ITERATIONS 100
+#endif
+
+#ifndef KEYS
+# define KEYS 200
+#endif
+
+// Debug version of the rand regression tests, based on trie_no_data_map.
+
+// 1
+// Simplify things by unrolling the typelist of the different
+// container types into individual statements.
+//
+// Unroll the typelist represented by tree_types, from
+// regression/common_type.hpp. This is just a compile-time list of 6
+// tree types, with different policies for the type of tree
+// (pat_trie_tag) and for the node
+// update (null_node_update, trie_order_statistics_node_update,
+// trie_order_staticstics_node_update, trie_prefix_search_node_update)
+
+using namespace __gnu_pbds::test::detail;
+using namespace __gnu_pbds;
+typedef __gnu_pbds::test::basic_type                   basic_type;
+typedef __gnu_cxx::throw_allocator_random<basic_type>  allocator_type;
+typedef __gnu_pbds::trie_string_access_traits<basic_type, char('a'), 100,
+                                               false, allocator_type>
+                                                       etraits_type;
+
+// pat_trie_tag
+typedef trie<basic_type, null_type, etraits_type, pat_trie_tag,
+            null_node_update, allocator_type>
+                                                       trie_type1;
+
+typedef trie<basic_type, null_type, etraits_type, pat_trie_tag,
+            trie_order_statistics_node_update, allocator_type>
+                                                       trie_type2;
+
+typedef trie<basic_type, null_type, etraits_type, pat_trie_tag,
+            trie_prefix_search_node_update, allocator_type>
+                                                       trie_type3;
+
+
+// 2
+// Specialize container_rand_regression_test for specific container
+// type and test function.
+
+#ifdef SPECIALIZE
+// For testing one specific container type.
+typedef trie_type1                                     test_type;
+
+void debug_break_here() { }
+
+namespace __gnu_pbds {
+  namespace test {
+    namespace detail {
+
+      template<>
+      void
+      container_rand_regression_test<test_type>::operator()()
+      {
+
+      }
+    }
+  }
+}
+#endif
+
+int
+main()
+{
+  // Set up the test object.
+  size_t sd = 1303948889;
+  rand_reg_test test(sd, ITERATIONS, KEYS, 0.2, .6, .2, .001, .25, true);
+
+  // 1
+  // Determine the problem container, function that fails.
+  test(trie_type1());
+  test(trie_type2());
+  test(trie_type3());
+
+#ifdef SPECIALIZE
+  // 2
+  // With specified problem container set test_type typedef
+  // appropriately above. Then, specialize operator()(), also
+  // above. Finally, run this below.
+  using namespace std;
+  test_type obj;
+  test(obj);
+#endif
+
+  return 0;
+}