cppyabm  1.0.17
An agent-based library to integrate C++ and Python
Functions
test_stl Namespace Reference

Functions

def test_vector (doc)
 
def test_deque (doc)
 
def test_array (doc)
 
def test_valarray (doc)
 
def test_map (doc)
 
def test_set (doc)
 
def test_recursive_casting ()
 
def test_move_out_container ()
 
def test_optional ()
 
def test_exp_optional ()
 
def test_variant (doc)
 
def test_vec_of_reference_wrapper ()
 
def test_stl_pass_by_pointer (msg)
 
def test_missing_header_message ()
 
def test_function_with_string_and_vector_string_arg ()
 
def test_stl_ownership ()
 
def test_array_cast_sequence ()
 
def test_issue_1561 ()
 

Function Documentation

◆ test_array()

def test_stl.test_array (   doc)
std::array <-> list

Definition at line 36 of file test_stl.py.

◆ test_array_cast_sequence()

def test_stl.test_array_cast_sequence ( )

Definition at line 257 of file test_stl.py.

◆ test_deque()

def test_stl.test_deque (   doc)
std::deque <-> list

Definition at line 27 of file test_stl.py.

◆ test_exp_optional()

def test_stl.test_exp_optional ( )

Definition at line 140 of file test_stl.py.

◆ test_function_with_string_and_vector_string_arg()

def test_stl.test_function_with_string_and_vector_string_arg ( )
Check if a string is NOT implicitly converted to a list, which was the
behavior before fix of issue #1258

Definition at line 240 of file test_stl.py.

◆ test_issue_1561()

def test_stl.test_issue_1561 ( )
check fix for issue #1561 

Definition at line 261 of file test_stl.py.

◆ test_map()

def test_stl.test_map (   doc)
std::map <-> dict

Definition at line 56 of file test_stl.py.

◆ test_missing_header_message()

def test_stl.test_missing_header_message ( )
Trying convert `list` to a `std::vector`, or vice versa, without including
<pybind11/stl.h> should result in a helpful suggestion in the error message

Definition at line 219 of file test_stl.py.

◆ test_move_out_container()

def test_stl.test_move_out_container ( )
Properties use the `reference_internal` policy by default. If the underlying function
returns an rvalue, the policy is automatically changed to `move` to avoid referencing
a temporary. In case the return value is a container of user-defined types, the policy
also needs to be applied to the elements, not just the container.

Definition at line 99 of file test_stl.py.

◆ test_optional()

def test_stl.test_optional ( )

Definition at line 110 of file test_stl.py.

◆ test_recursive_casting()

def test_stl.test_recursive_casting ( )
Tests that stl casters preserve lvalue/rvalue context for container values

Definition at line 80 of file test_stl.py.

◆ test_set()

def test_stl.test_set (   doc)
std::set <-> set

Definition at line 69 of file test_stl.py.

◆ test_stl_ownership()

def test_stl.test_stl_ownership ( )

Definition at line 248 of file test_stl.py.

◆ test_stl_pass_by_pointer()

def test_stl.test_stl_pass_by_pointer (   msg)
Passing nullptr or None to an STL container pointer is not expected to work

Definition at line 190 of file test_stl.py.

◆ test_valarray()

def test_stl.test_valarray (   doc)
std::valarray <-> list

Definition at line 46 of file test_stl.py.

◆ test_variant()

def test_stl.test_variant (   doc)

Definition at line 166 of file test_stl.py.

◆ test_vec_of_reference_wrapper()

def test_stl.test_vec_of_reference_wrapper ( )
#171: Can't return reference wrappers (or STL structures containing them)

Definition at line 182 of file test_stl.py.

◆ test_vector()

def test_stl.test_vector (   doc)
std::vector <-> list

Definition at line 9 of file test_stl.py.