]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/23_containers/unordered_multimap/allocator/minimal.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 23_containers / unordered_multimap / allocator / minimal.cc
index 79582e0123b4fe4c7fd7f33ee336a1ac8c0b493b..3eaec30ee87c105b723be758f4a7a214094a8a79 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2014 Free Software Foundation, Inc.
+// Copyright (C) 2013-2021 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
@@ -15,7 +15,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++11" }
+// { dg-do run { target c++11 } }
 
 #include <unordered_map>
 #include <memory>
@@ -43,18 +43,17 @@ bool operator<(const T& l, const T& r) { return l.i < r.i; }
 using __gnu_test::SimpleAllocator;
 
 template class std::unordered_multimap<T, T, hash, equal_to,
-                                      SimpleAllocator<T>>;
+                                      SimpleAllocator<std::pair<const T, T>>>;
 
 void test01()
 {
-  bool test __attribute__((unused)) = true;
-  typedef SimpleAllocator<T> alloc_type;
+  typedef SimpleAllocator<std::pair<const T, T>> alloc_type;
   typedef std::allocator_traits<alloc_type> traits_type;
   typedef std::unordered_multimap<T, T, hash, equal_to, alloc_type> test_type;
   test_type v(alloc_type{});
   v.emplace(std::piecewise_construct,
            std::make_tuple(T()), std::make_tuple(T()));
-  VERIFY( v.max_size() == traits_type::max_size(v.get_allocator()) );
+  VERIFY( v.max_size() < traits_type::max_size(v.get_allocator()) );
 }
 
 int main()