Add more tests to better cover DataMatrix, Maxicode decoding

This commit is contained in:
Sean Owen 2016-09-10 17:36:02 +01:00
parent cd8d9f9931
commit 28c3288094
18 changed files with 45 additions and 4 deletions

View file

@ -27,10 +27,10 @@ public final class DataMatrixBlackBox1TestCase extends AbstractBlackBoxTestCase
public DataMatrixBlackBox1TestCase() {
super("src/test/resources/blackbox/datamatrix-1", new MultiFormatReader(), BarcodeFormat.DATA_MATRIX);
addTest(18, 18, 0.0f);
addTest(18, 18, 90.0f);
addTest(18, 18, 180.0f);
addTest(18, 18, 270.0f);
addTest(21, 21, 0.0f);
addTest(21, 21, 90.0f);
addTest(21, 21, 180.0f);
addTest(21, 21, 270.0f);
}
}

View file

@ -0,0 +1,33 @@
/*
* Copyright 2016 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.zxing.maxicode;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.MultiFormatReader;
import com.google.zxing.common.AbstractBlackBoxTestCase;
public final class Maxicode1TestCase extends AbstractBlackBoxTestCase {
public Maxicode1TestCase() {
super("src/test/resources/blackbox/maxicode-1", new MultiFormatReader(), BarcodeFormat.MAXICODE);
addTest(5, 5, 0.0f);
//addTest(5, 5, 90.0f);
//addTest(5, 5, 180.0f);
//addTest(5, 5, 270.0f);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

View file

@ -0,0 +1 @@
Testing C40

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1 @@
EDIFACTEDIFACT

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1 @@
X12X12X12X12

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1 @@
[)>0196123450000222111MODE2

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -0,0 +1 @@
[)>0196123450000222111MODE3

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -0,0 +1 @@
[)>0196123450000222111MODE4

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -0,0 +1 @@
[)>0196123450000222111MODE5

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -0,0 +1 @@
[)>0196123450000222111MODE6