Upstream version 8.36.169.0
[platform/framework/web/crosswalk.git] / src / third_party / libc++ / trunk / test / containers / unord / unord.set / unord.set.cnstr / assign_copy.pass.cpp
index a1f8c48..6925e30 100644 (file)
@@ -72,6 +72,24 @@ int main()
         assert(c.max_load_factor() == 1);
     }
     {
+        typedef std::unordered_set<int> C;
+        typedef int P;
+        P a[] =
+        {
+            P(1),
+            P(2),
+            P(3),
+            P(4),
+            P(1),
+            P(2)
+        };
+        C c(a, a + sizeof(a)/sizeof(a[0]));
+        C *p = &c;
+        c = *p;
+        assert(c.size() == 4);
+        assert(std::is_permutation(c.begin(), c.end(), a));
+    }
+    {
         typedef other_allocator<int> A;
         typedef std::unordered_set<int,
                                    test_hash<std::hash<int> >,