Package intelhex :: Module test
[hide private]
[frames] | no frames]

Module test

source code

Test suite for IntelHex class.
Classes [hide private]
  TestIntelHexBase
Base class for all tests.
  TestIntelHex
  TestIntelHexLoadBin
  TestIntelHexStartingAddressRecords
  TestIntelHex_big_files
Test that data bigger than 64K read/write correctly
  TestIntelHexGetPutString
  TestIntelHexDump
  TestIntelHexMerge
  TestIntelHex16bit
  TestIntelHexErrors
Tests for custom errors classes
  TestDecodeHexRecords
Testing that decoding of records is correct and all errors raised when needed
  TestHex2Bin
  TestBuildRecords
  Test_GetFileAndAddrRange
Variables [hide private]
  hex8 = ':1004E300CFF0FBE2FDF220FF20F2E120E2FBE6F396\n:1004F300...
  bin8 = array('B', [2, 5, 162, 229, 118, 36, 106, 248, 230, 5, ...
  hex16 = ':020000040000FA\n:10000000000083120313072055301820042...
  bin16 = array('H', [0, 4739, 4867, 8199, 12373, 8216, 10244, 5...
  hex64k = ':020000040000FA\n:0100000001FE\n:020000040001F9\n:01...
  data64k = {0: 1, 65536: 2}
  hex_rectype3 = ':0400000312345678E5\n:0100000001FE\n:00000001F...
  data_rectype3 = {0: 1}
  start_addr_rectype3 = {'CS': 4660, 'IP': 22136}
  hex_rectype5 = ':0400000512345678E3\n:0100000002FD\n:00000001F...
  data_rectype5 = {0: 2}
  start_addr_rectype5 = {'EIP': 305419896}
  hex_empty_file = ':00000001FF\n'
  hex_simple = ':10000000000083120313072055301820042883169C\n:10...
  hex_bug_lp_341051 = ':020FEC00E4E738\n:040FF00022E122E1F7\n:00...
Variables Details [hide private]

hex8

Value:
''':1004E300CFF0FBE2FDF220FF20F2E120E2FBE6F396
:1004F3000A00FDE0E1E2E3B4E4E5BAE6E7B3BFE80E
:10050300E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8E0
:10051300F9FCFEFF00C0C1C2C3A5C4C5AAC6C7B2C9
:10052300AFC8C9CACBCCCDCECFD0D1D2D3D4D5D6F8
:07053300D7D8D9DCDEDF00A0
:10053A0078227C007D007BFF7A0479F57E007F2398
:10054A0012042F78457C007D007BFF7A0579187E9E
...

bin8

Value:
array('B', [2, 5, 162, 229, 118, 36, 106, 248, 230, 5, 118, 34, 120, 1\
03, 48, 7, 2, 120, 106, 228, 117, 240, 1, 18, 4, 173, 2, 4, 85, 32, 0,\
 235, 127, 46, 210, 0, 128, 24, 239, 84, 15, 36, 144, 212, 52, 64, 212\
, 255, 48, 4, 11, 239, 36, 191, 180, 26, 0, 80, 3, 36, 97, 255, 229, 1\
19, 96, 2, 21, 119, 5, 122, 229, 122, 112, 2, 5, 121, 48, 7, 13, 120, \
103, 228, 117, 240, 1, 18, 4, 173, 239, 2, 4, 155, 2, 5, 123, 116, 3, \
210, 7, 128, 3, 228, 194, 7, 245, 118, 139, 103, 138, 104, 137, 105, 2\
28, 245, 119, 245, 121, 245, 122, 229, 119, 96, 7, 127, 32, 18, 0, 62,\
...

hex16

Value:
''':020000040000FA
:10000000000083120313072055301820042883169C
:10001000031340309900181598168312031318160D
:1000200098170800831203138C1E14281A0808005E
:0C003000831203130C1E1A28990008000C
:00000001FF
'''

bin16

Value:
array('H', [0, 4739, 4867, 8199, 12373, 8216, 10244, 5763, 4867, 12352\
, 153, 5400, 5784, 4739, 4867, 5656, 6040, 8, 4739, 4867, 7820, 10260,\
 2074, 8, 4739, 4867, 7692, 10266, 153, 8, 16383, 16383])

hex64k

Value:
''':020000040000FA
:0100000001FE
:020000040001F9
:0100000002FD
:00000001FF
'''

hex_rectype3

Value:
''':0400000312345678E5
:0100000001FE
:00000001FF
'''

hex_rectype5

Value:
''':0400000512345678E3
:0100000002FD
:00000001FF
'''

hex_simple

Value:
''':10000000000083120313072055301820042883169C
:10001000031340309900181598168312031318160D
:1000200098170800831203138C1E14281A0808005E
:0C003000831203130C1E1A28990008000C
:00000001FF
'''

hex_bug_lp_341051

Value:
''':020FEC00E4E738
:040FF00022E122E1F7
:00000001FF
'''