diff options
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/unordered_set')
7 files changed, 27 insertions, 7 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/final_hash.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/final_hash.cc index 5dced4cd1a6..e661ee401fb 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/final_hash.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/final_hash.cc @@ -10,7 +10,7 @@ // any later version. // This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without Pred the implied warranty of +// 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. diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc index b8957c31813..3a6984c4500 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc @@ -11,7 +11,7 @@ // any later version. // This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without Pred the implied warranty of +// 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. @@ -19,7 +19,7 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-error "static assertion failed" "" { target *-*-* } 186 } +// { dg-error "static assertion failed" "" { target *-*-* } 185 } #include <unordered_set> diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc index aba6f771d81..41f428a51db 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/reserve.cc @@ -40,8 +40,28 @@ void test01() } } +void test02() +{ + const int N = 1000; + + typedef std::unordered_set<int> Set; + Set s; + s.reserve(N); + s.reserve(N); + + std::size_t bkts = s.bucket_count(); + for (int i = 0; i != N; ++i) + { + s.insert(i); + // As long as we insert less than the reserved number of elements we + // shouldn't experiment any rehash. + VERIFY( s.bucket_count() == bkts ); + } +} + int main() { test01(); + test02(); return 0; } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc index c18b0598464..a1c0c8474e0 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc @@ -10,7 +10,7 @@ // any later version. // This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without Pred the implied warranty of +// 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. diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc index ea116c364af..2bb738afd91 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc @@ -10,7 +10,7 @@ // any later version. // This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without Pred the implied warranty of +// 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. diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc index 067e57a5e26..9053b000e4d 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc @@ -10,7 +10,7 @@ // any later version. // This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without Pred the implied warranty of +// 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. diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc index 760f10c7e85..7cfa4ad474b 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc @@ -10,7 +10,7 @@ // any later version. // This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without Pred the implied warranty of +// 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. |