| 1 | // __gnu_pbds::test::basic_type has ambiguous string conversions in C++17 |
| 2 | // { dg-do run { target { ! c++17 } } } |
| 3 | // { dg-require-time "" } |
| 4 | // { dg-require-cstdint "" } |
| 5 | // This can take long on simulators, timing out the test. |
| 6 | // { dg-options "-DITERATIONS=5" { target simulator } } |
| 7 | // { dg-timeout-factor 2.0 } |
| 8 | |
| 9 | // -*- C++ -*- |
| 10 | |
| 11 | // Copyright (C) 2005-2025 Free Software Foundation, Inc. |
| 12 | // |
| 13 | // This file is part of the GNU ISO C++ Library. This library is free |
| 14 | // software; you can redistribute it and/or modify it under the terms |
| 15 | // of the GNU General Public License as published by the Free Software |
| 16 | // Foundation; either version 3, or (at your option) any later |
| 17 | // version. |
| 18 | |
| 19 | // This library is distributed in the hope that it will be useful, but |
| 20 | // WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 | // General Public License for more details. |
| 23 | |
| 24 | // You should have received a copy of the GNU General Public License |
| 25 | // along with this library; see the file COPYING3. If not see |
| 26 | // <http://www.gnu.org/licenses/>. |
| 27 | |
| 28 | |
| 29 | // Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL. |
| 30 | |
| 31 | // Permission to use, copy, modify, sell, and distribute this software |
| 32 | // is hereby granted without fee, provided that the above copyright |
| 33 | // notice appears in all copies, and that both that copyright notice |
| 34 | // and this permission notice appear in supporting documentation. None |
| 35 | // of the above authors, nor IBM Haifa Research Laboratories, make any |
| 36 | // representation about the suitability of this software for any |
| 37 | // purpose. It is provided "as is" without express or implied |
| 38 | // warranty. |
| 39 | |
| 40 | /** |
| 41 | * @file trie_data_map_rand_regression_test.cpp |
| 42 | * Contains a random-operation test for maps and sets. |
| 43 | */ |
| 44 | |
| 45 | #define PB_DS_REGRESSION |
| 46 | |
| 47 | #include <regression/rand/assoc/rand_regression_test.hpp> |
| 48 | #include <regression/common_type.hpp> |
| 49 | |
| 50 | #ifndef ITERATIONS |
| 51 | # ifdef _GLIBCXX_DEBUG |
| 52 | # define ITERATIONS 100 |
| 53 | # else |
| 54 | # define ITERATIONS 5000 |
| 55 | #endif |
| 56 | #endif |
| 57 | |
| 58 | #ifndef KEYS |
| 59 | # ifdef _GLIBCXX_DEBUG |
| 60 | # define KEYS 200 |
| 61 | # else |
| 62 | # define KEYS 10000 |
| 63 | # endif |
| 64 | #endif |
| 65 | |
| 66 | int |
| 67 | main(int argc, char* a_p_argv[]) |
| 68 | { |
| 69 | using namespace __gnu_pbds::test; |
| 70 | typedef trie_map_tl_t map_tl_t; |
| 71 | |
| 72 | return rand_regression_test(ITERATIONS, KEYS, |
| 73 | "trie_data_map_rand_regression_test", |
| 74 | map_tl_t()); |
| 75 | } |