Commit 3e17fd41 authored by Kevin R. Thornton's avatar Kevin R. Thornton

basic API tests for libcpp.limits added

parent baded180
...@@ -13,6 +13,7 @@ cimport libcpp.set ...@@ -13,6 +13,7 @@ cimport libcpp.set
cimport libcpp.stack cimport libcpp.stack
cimport libcpp.vector cimport libcpp.vector
cimport libcpp.complex cimport libcpp.complex
cimport libcpp.limits
from libcpp.deque cimport * from libcpp.deque cimport *
from libcpp.list cimport * from libcpp.list cimport *
...@@ -23,6 +24,7 @@ from libcpp.set cimport * ...@@ -23,6 +24,7 @@ from libcpp.set cimport *
from libcpp.stack cimport * from libcpp.stack cimport *
from libcpp.vector cimport * from libcpp.vector cimport *
from libcpp.complex cimport * from libcpp.complex cimport *
from libcpp.limits cimport *
cdef libcpp.deque.deque[int] d1 = deque[int]() cdef libcpp.deque.deque[int] d1 = deque[int]()
cdef libcpp.list.list[int] l1 = list[int]() cdef libcpp.list.list[int] l1 = list[int]()
...@@ -91,3 +93,17 @@ cdef const_vector_to_list(const vector[double]& cv): ...@@ -91,3 +93,17 @@ cdef const_vector_to_list(const vector[double]& cv):
lst.append(cython.operator.dereference(iter)) lst.append(cython.operator.dereference(iter))
cython.operator.preincrement(iter) cython.operator.preincrement(iter)
return lst return lst
cdef double dmax = numeric_limits[double].max()
cdef double dmin = numeric_limits[double].min()
cdef double deps = numeric_limits[double].epsilon()
cdef double dqnan = numeric_limits[double].quiet_NaN()
cdef double dsnan = numeric_limits[double].signaling_NaN()
cdef double dinf = numeric_limits[double].infinity()
cdef int imax = numeric_limits[int].max()
cdef int imin = numeric_limits[int].min()
cdef int ieps = numeric_limits[int].epsilon()
cdef int iqnan = numeric_limits[int].quiet_NaN()
cdef int isnan = numeric_limits[int].signaling_NaN()
cdef int iinf = numeric_limits[int].infinity()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment