From ce9d176535bd4948cd63bfa3982314754a422edd Mon Sep 17 00:00:00 2001 From: Valentin Valls Date: Fri, 20 Apr 2018 15:55:27 +0200 Subject: Add const_at to unordered map --- tests/run/cpp_stl_cpp11.pyx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/run') diff --git a/tests/run/cpp_stl_cpp11.pyx b/tests/run/cpp_stl_cpp11.pyx index 294d3984a..81914872a 100644 --- a/tests/run/cpp_stl_cpp11.pyx +++ b/tests/run/cpp_stl_cpp11.pyx @@ -151,6 +151,8 @@ def test_unordered_map_functionality(): unordered_map[int,int].iterator iterator = int_map.begin() pair[unordered_map[int,int].iterator, bint] pair_iter = int_map.insert(pair_insert) unordered_map[int, int] int_map2 + unordered_map[int, int*] intptr_map + const int* intptr assert int_map[1] == 2 assert int_map.size() == 1 assert int_map.erase(1) == 1 # returns number of elements erased @@ -178,4 +180,7 @@ def test_unordered_map_functionality(): int_map.bucket_count() int_map.max_bucket_count() int_map.bucket(3) + + intptr_map[0] = NULL + intptr = intptr_map.const_at(0) return "pass" -- cgit v1.2.1