diff options
author | Valentin Valls <valentin.valls@esrf.fr> | 2018-04-20 15:55:27 +0200 |
---|---|---|
committer | Valentin Valls <valentin.valls@esrf.fr> | 2018-04-20 16:00:59 +0200 |
commit | ce9d176535bd4948cd63bfa3982314754a422edd (patch) | |
tree | 98bc5d5f59d685eba7533461837808c1c8d215c5 /tests | |
parent | 2e8a619272d0cf11e61f6867bf8f099e35ceea1f (diff) | |
download | cython-ce9d176535bd4948cd63bfa3982314754a422edd.tar.gz |
Add const_at to unordered map
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run/cpp_stl_cpp11.pyx | 5 |
1 files changed, 5 insertions, 0 deletions
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" |