Coverage for /home/runner/work/zserio/zserio/compiler/extensions/python/runtime/src/zserio/limits.py: 100%

34 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2024-12-05 10:43 +0000

1""" 

2Zserio types limits. 

3""" 

4 

5INT8_MAX = (1 << 7) - 1 

6INT8_MIN = -1 << 7 

7INT16_MAX = (1 << 15) - 1 

8INT16_MIN = -1 << 15 

9INT32_MAX = (1 << 31) - 1 

10INT32_MIN = -1 << 31 

11INT64_MAX = (1 << 63) - 1 

12INT64_MIN = -1 << 63 

13 

14UINT8_MAX = (1 << 8) - 1 

15UINT8_MIN = 0 

16UINT16_MAX = (1 << 16) - 1 

17UINT16_MIN = 0 

18UINT32_MAX = (1 << 32) - 1 

19UINT32_MIN = 0 

20UINT64_MAX = (1 << 64) - 1 

21UINT64_MIN = 0 

22 

23VARINT16_MAX = (1 << (6 + 8)) - 1 

24VARINT16_MIN = -VARINT16_MAX 

25VARINT32_MAX = (1 << (6 + 7 + 7 + 8)) - 1 

26VARINT32_MIN = -VARINT32_MAX 

27VARINT64_MAX = (1 << (6 + 7 + 7 + 7 + 7 + 7 + 7 + 8)) - 1 

28VARINT64_MIN = -VARINT64_MAX 

29VARINT_MAX = INT64_MAX 

30VARINT_MIN = INT64_MIN 

31 

32VARUINT16_MAX = (1 << (7 + 8)) - 1 

33VARUINT16_MIN = 0 

34VARUINT32_MIN = 0 

35VARUINT32_MAX = (1 << (7 + 7 + 7 + 8)) - 1 

36VARUINT64_MIN = 0 

37VARUINT64_MAX = (1 << (7 + 7 + 7 + 7 + 7 + 7 + 7 + 8)) - 1 

38VARUINT_MIN = 0 

39VARUINT_MAX = UINT64_MAX 

40VARSIZE_MIN = 0 

41VARSIZE_MAX = (1 << (2 + 7 + 7 + 7 + 8)) - 1