>>> test_wrap_pair(2, 2.25)
(2, 2.25, True)
"""
- cdef Pair[int, double] *pair
- cdef Wrap[Pair[int, double]] *wrap
try:
pair = new Pair[int, double](i, x)
wrap = new Wrap[Pair[int, double]](deref(pair))
>>> test_int(100, 100)
(100, 100, True)
"""
- cdef Wrap[int] *a, *b
try:
a = new Wrap[int](x)
b = new Wrap[int](0)
>>> test_double(100, 100)
(100.0, 100.0, True)
"""
- cdef Wrap[double] *a, *b
try:
a = new Wrap[double](x)
b = new Wrap[double](-1)
>>> test_pair(2, 2.25)
(2, 2.25, True, False)
"""
- cdef Pair[int, double] *pair
try:
pair = new Pair[int, double](i, x)
return pair.first(), pair.second(), deref(pair) == deref(pair), deref(pair) != deref(pair)