@@ -1127,23 +1127,47 @@ describe('Test createUniversalHex()', () => {
1127
1127
':1000600069E80000D59A0100D9930100678E01006C\n' + ':00000001FF\n'
1128
1128
) ;
1129
1129
1130
- const failFirst = ( ) => {
1130
+ const failFirstBlocks = ( ) => {
1131
+ const result = uh . createUniversalHex (
1132
+ [
1133
+ { hex : normalHexEof10 , boardId : 0x9900 } ,
1134
+ { hex : normalHex , boardId : 0x9903 } ,
1135
+ ] ,
1136
+ true
1137
+ ) ;
1138
+ } ;
1139
+ const failFirstSections = ( ) => {
1131
1140
const result = uh . createUniversalHex ( [
1132
1141
{ hex : normalHexEof10 , boardId : 0x9900 } ,
1133
1142
{ hex : normalHex , boardId : 0x9903 } ,
1134
1143
] ) ;
1135
1144
} ;
1136
- const failSecond = ( ) => {
1145
+ const failSecondBlocks = ( ) => {
1146
+ const result = uh . createUniversalHex (
1147
+ [
1148
+ { hex : normalHex , boardId : 0x9900 } ,
1149
+ { hex : normalHexEof12 , boardId : 0x9903 } ,
1150
+ ] ,
1151
+ true
1152
+ ) ;
1153
+ } ;
1154
+ const failSecondSections = ( ) => {
1137
1155
const result = uh . createUniversalHex ( [
1138
1156
{ hex : normalHex , boardId : 0x9900 } ,
1139
1157
{ hex : normalHexEof12 , boardId : 0x9903 } ,
1140
1158
] ) ;
1141
1159
} ;
1142
1160
1143
- expect ( failFirst ) . toThrow (
1161
+ expect ( failFirstBlocks ) . toThrow (
1162
+ 'EoF record found at line 10 of 14 in Board ID 39168'
1163
+ ) ;
1164
+ expect ( failFirstSections ) . toThrow (
1144
1165
'EoF record found at line 10 of 14 in Board ID 39168'
1145
1166
) ;
1146
- expect ( failSecond ) . toThrow (
1167
+ expect ( failSecondBlocks ) . toThrow (
1168
+ 'EoF record found at line 12 of 14 in Board ID 39171'
1169
+ ) ;
1170
+ expect ( failSecondSections ) . toThrow (
1147
1171
'EoF record found at line 12 of 14 in Board ID 39171'
1148
1172
) ;
1149
1173
} ) ;
0 commit comments