diff options
Diffstat (limited to 'tests/run/cpp_stl_cpp11.pyx')
-rw-r--r-- | tests/run/cpp_stl_cpp11.pyx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/run/cpp_stl_cpp11.pyx b/tests/run/cpp_stl_cpp11.pyx index f4fa4d360..087d9b1aa 100644 --- a/tests/run/cpp_stl_cpp11.pyx +++ b/tests/run/cpp_stl_cpp11.pyx @@ -1,5 +1,5 @@ # mode: run -# tag: cpp, werror, cpp11 +# tag: cpp, werror, cpp11, no-cpp-locals import sys from libcpp.unordered_map cimport unordered_map @@ -113,7 +113,7 @@ def test_unordered_set_functionality(): unordered_set[int].iterator iterator = int_set.begin() int_set.insert(1) assert int_set.size() == 1 - int_set.erase(int_set.begin(), int_set.end()) + int_set.erase(unordered_set[int].const_iterator(int_set.begin()), unordered_set[int].const_iterator(int_set.end())) assert int_set.size() == 0 int_set.insert(1) assert int_set.erase(1) == 1 # returns number of elements erased @@ -137,6 +137,7 @@ def test_unordered_set_functionality(): int_set.bucket_count() int_set.max_bucket_count() int_set.bucket(3) + assert int_set.load_factor() > 0 return "pass" @@ -175,7 +176,7 @@ def test_unordered_map_functionality(): int_map.clear() int_map.insert(int_map2.begin(), int_map2.end()) assert int_map.size() == 2 - assert int_map.erase(int_map.begin(), int_map.end()) == int_map.end() + assert int_map.erase(unordered_map[int,int].const_iterator(int_map.begin()), unordered_map[int,int].const_iterator(int_map.end())) == int_map.end() int_map.max_load_factor(0.5) assert int_map.max_load_factor() == 0.5 @@ -187,6 +188,7 @@ def test_unordered_map_functionality(): int_map.bucket_count() int_map.max_bucket_count() int_map.bucket(3) + assert int_map.load_factor() > 0 intptr_map[0] = NULL intptr = intptr_map.const_at(0) |