1 from std_unique_ptr
import (
12 assert isinstance(v, int)
16 assert isinstance(v, V1)
23 assert isinstance(v, str)
27 assert isinstance(v, complex)
30 unique_ptr_holder = UniquePtrHolder()
32 v = unique_ptr_holder.int_ptr
33 assert isinstance(v, int)
37 assert unique_ptr_holder.int_ptr == 20
39 v = unique_ptr_holder.v1_ptr
40 assert isinstance(v, V1)
44 assert unique_ptr_holder.v1_ptr.v == 10
46 v = unique_ptr_holder.null_ptr
49 v = unique_ptr_holder.str_ptr
50 assert isinstance(v, str)
54 assert unique_ptr_holder.str_ptr ==
"str"
56 v = unique_ptr_holder.complex_ptr
57 assert isinstance(v, complex)
61 assert unique_ptr_holder.complex_ptr == 1 + 0j