MCPcopy Create free account
hub / github.com/apache/qpid-proton-j / int_values

Method int_values

tests/python/proton_tests/codec.py:147–159  ·  view source on GitHub ↗

Set of test values for integer type dtype, include extreme and medial values

(self, dtype)

Source from the content-addressed store, hash-verified

145 }
146
147 def int_values(self, dtype):
148 """Set of test values for integer type dtype, include extreme and medial values"""
149 bits, signed = self.INT_TYPES[dtype]
150 values = [0, 1, 2, 5, 42]
151 if signed:
152 min, max = -2**(bits-1), 2**(bits-1)-1
153 values.append(max // 2)
154 values += [-i for i in values if i]
155 values += [min, max]
156 else:
157 max = 2**(bits) - 1
158 values += [max // 2, max]
159 return sorted(values)
160
161 def _testArray(self, dtype, descriptor, atype, *values):
162 if dtype: dTYPE = getattr(self.data, dtype.upper())

Callers 2

_test_int_arrayMethod · 0.95
_test_intMethod · 0.95

Calls 1

appendMethod · 0.65

Tested by

no test coverage detected