simpleparse.tests.test_common_numbers | index /home/mcfletch/pylive/simpleparse/tests/test_common_numbers.py |
Modules | ||||||
|
Classes | ||||||||
|
Functions | ||
|
Data | ||
_data = [('int_unsigned', <class simpleparse.common.numbers.IntInterpreter>, [('0 ', 1, 0), ('1 ', 1, 1), ('23 ', 2, 23), ('0x ', 1, 0), ('0. ', 1, 0)], ['.0', 'a']), ('int', <class simpleparse.common.numbers.IntInterpreter>, [('0 ', 1, 0), ('1 ', 1, 1), ('23 ', 2, 23), ('0x ', 1, 0), ('0. ', 1, 0), ('+0 ', 2, 0), ('+1 ', 2, 1), ('+23 ', 3, 23), ('+0x ', 2, 0), ('+0. ', 2, 0), ('-0 ', 2, 0), ('-1 ', 2, -1), ('-23 ', 3, -23), ('-0x ', 2, 0), ('-0. ', 2, 0)], ['.0', 'a', '+.0', '+a', '-.0', '-a']), ('hex', <class simpleparse.common.numbers.HexInterpreter>, [('0x0 ', 3, 0), ('0x1 ', 3, 1), ('0x23 ', 4, 35), ('0x0x ', 3, 0), ('0x0. ', 3, 0), ('+0x0 ', 4, 0), ('+0x1 ', 4, 1), ('+0x23 ', 5, 35), ('+0x0x ', 4, 0), ('+0x0. ', 4, 0), ('-0x0 ', 4, 0), ('-0x1 ', 4, -1), ('-0x23 ', 5, -35), ('-0x0x ', 4, 0), ('-0x0. ', 4, 0), ('0xa ', 3, 10), ('0xaaaaaaaaaaaaaaaaa ', 19, 196765270119568550570L), ('0xA ', 3, 10), ('0xAAAAAAAAAAAAAAAAA ', 19, 196765270119568550570L)], ['.0', 'a', '+.0', '+a', '-.0', '-a', '0x ', '0xg', '0x']), ('binary_number', <class simpleparse.common.numbers.BinaryInterpreter>, [('0b0 ', 2, 0), ('1b0 ', 2, 1), ('10b0 ', 3, 2), ('10000000000b0 ', 12, 1024), ('0B0 ', 2, 0), ('1B0 ', 2, 1), ('10B0 ', 3, 2), ('10000000000B0 ', 12, 1024)], ['.0', 'a', '+.0', '+a', '-.0', '-a', '0x ', '0xg', '0x']), ('float', <class simpleparse.common.numbers.FloatInterpreter>, [('0. ', 2, 0), ('1. ', 2, 1), ('23. ', 3, 23), ('.0 ', 2, 0), ('.1 ', 2, 0.10000000000000001), ('.23 ', 3, 0.23000000000000001), ('0.0x ', 3, 0), ('1.1x ', 3, 1.1000000000000001), ('2000000.22222222x ', 16, 2000000.2222222199), ('1.1e20 ', 6, 1.1e+20), ('1.1e-20 ', 7, 1.1e-20), ('-1.1e20 ', 7, -1.1e+20)], ['0x.0', '23', '-23', '-43*2a', '+23', '-a']), ('float_floatexp', <class simpleparse.common.numbers.FloatFloatExpInterpreter>, [('0. ', 2, 0), ('1. ', 2, 1), ('23. ', 3, 23), ('.0 ', 2, 0), ('.1 ', 2, 0.10000000000000001), ('.23 ', 3, 0.23000000000000001), ('0.0x ', 3, 0), ('1.1x ', 3, 1.1000000000000001), ('2000000.22222222x ', 16, 2000000.2222222199), ('1.1e20 ', 6, 1.1000000000000002e+20), ('1.1e-20 ', 7, 1.1e-20), ('-1.1e20 ', 7, -1.1000000000000002e+20), ('1.1e20.34 ', 9, 2.4065377863445073e+20), ('1.1e-.34 ', 8, 0.50279700857636256)], ['0x.0', '23', '-23', '-43*2a', '+23', '-a'])] |