New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix symbology identifier tests #1396
Fix symbology identifier tests #1396
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1396 +/- ##
============================================
+ Coverage 79.25% 79.26% +0.01%
Complexity 4367 4367
============================================
Files 251 251
Lines 14641 14641
Branches 3017 3017
============================================
+ Hits 11603 11605 +2
+ Misses 2154 2152 -2
Partials 884 884
Continue to review full report at Codecov.
|
@@ -482,9 +482,6 @@ public Result decodeRow(int rowNumber, BitArray row, Map<DecodeHintType,?> hints | |||
} | |||
} | |||
break; | |||
case CODE_FNC_2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you, but why is this definitely unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This switch(code)
is in the else
block from line 463, and corresponding if
is at line 458.
The line 458 is:
if (code < 100) {
Therefore, the code
in this switch
expression is greater than or equal to 100.
And CODE_FNC_2
is 97 (defined at line 160), so there is no chance to match to this case
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objection from me. Looks like CODE_C is numeric only and can't contain FNC2 (but a leading FNC1). So, no harm done, it is removable dead code.
( and good to see improvements coming in on the symbology identifier code 👍 )
I found that some metadata tests did not work because the *.metadata.txt filename did not match to the png file.
First, in this PR, I renamed them to correct names.
And I also found that the symbology-identifier was not implemented in the ITFReader and there was no metadata test for the RSS14.
I implemented it, and added a metadata test file.
In addition, I removed unused code in the Code128Reader.
CODE_FNC_2 (value=97) is not available in the CODE_C (value=97 means "97"; see line 458-462 of Code128Reader.java).