move all Result to RXingResult

This commit is contained in:
Henry Schimke
2022-08-20 12:12:30 -05:00
parent 9f72478dc8
commit 90ace738b7
149 changed files with 1658 additions and 1658 deletions

View File

@@ -18,11 +18,11 @@ package com.google.zxing.aztec.decoder;
import com.google.zxing.aztec.encoder.EncoderTest;
import com.google.zxing.FormatException;
import com.google.zxing.ResultPoint;
import com.google.zxing.aztec.AztecDetectorResult;
import com.google.zxing.RXingResultPoint;
import com.google.zxing.aztec.AztecDetectorRXingResult;
import com.google.zxing.common.BitArray;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.DecoderResult;
import com.google.zxing.common.DecoderRXingResult;
import org.junit.Test;
import org.junit.Assert;
@@ -31,7 +31,7 @@ import org.junit.Assert;
*/
public final class DecoderTest extends Assert {
private static final ResultPoint[] NO_POINTS = new ResultPoint[0];
private static final RXingResultPoint[] NO_POINTS = new RXingResultPoint[0];
@Test
public void testHighLevelDecode() throws FormatException {
@@ -64,7 +64,7 @@ public final class DecoderTest extends Assert {
}
@Test
public void testAztecResult() throws FormatException {
public void testAztecRXingResult() throws FormatException {
BitMatrix matrix = BitMatrix.parse(
"X X X X X X X X X X X X X X \n" +
"X X X X X X X X X X X X X X X \n" +
@@ -90,8 +90,8 @@ public final class DecoderTest extends Assert {
"X X X X X X X X X X X X X X \n" +
" X X X X X X X X X X X X X \n",
"X ", " ");
AztecDetectorResult r = new AztecDetectorResult(matrix, NO_POINTS, false, 30, 2);
DecoderResult result = new Decoder().decode(r);
AztecDetectorRXingResult r = new AztecDetectorRXingResult(matrix, NO_POINTS, false, 30, 2);
DecoderRXingResult result = new Decoder().decode(r);
assertEquals("88888TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT", result.getText());
assertArrayEquals(
new byte[] {-11, 85, 85, 117, 107, 90, -42, -75, -83, 107,
@@ -102,7 +102,7 @@ public final class DecoderTest extends Assert {
}
@Test
public void testAztecResultECI() throws FormatException {
public void testAztecRXingResultECI() throws FormatException {
BitMatrix matrix = BitMatrix.parse(
" X X X X X X \n" +
" X X X X X X X X X X X X \n" +
@@ -124,8 +124,8 @@ public final class DecoderTest extends Assert {
" X X X X X X X X X X X \n" +
"X X X X X X X X \n",
"X ", " ");
AztecDetectorResult r = new AztecDetectorResult(matrix, NO_POINTS, false, 15, 1);
DecoderResult result = new Decoder().decode(r);
AztecDetectorRXingResult r = new AztecDetectorRXingResult(matrix, NO_POINTS, false, 15, 1);
DecoderRXingResult result = new Decoder().decode(r);
assertEquals("Français", result.getText());
}
@@ -160,7 +160,7 @@ public final class DecoderTest extends Assert {
+ "X X X X . . . X . . X X X . X X . . X . . . . X X X . \n"
+ "X X . X . X . . . X . X . . . . X X . X . . X X . . . \n",
"X ", ". ");
AztecDetectorResult r = new AztecDetectorResult(matrix, NO_POINTS, true, 16, 4);
AztecDetectorRXingResult r = new AztecDetectorRXingResult(matrix, NO_POINTS, true, 16, 4);
new Decoder().decode(r);
}
@@ -195,7 +195,7 @@ public final class DecoderTest extends Assert {
+ ". X X X X . . X . . X X X . X X . . X . . . . X X X . \n"
+ "X X . . . X X . . X . X . . . . X X . X . . X . X . X \n",
"X ", ". ");
AztecDetectorResult r = new AztecDetectorResult(matrix, NO_POINTS, true, 16, 4);
AztecDetectorRXingResult r = new AztecDetectorRXingResult(matrix, NO_POINTS, true, 16, 4);
new Decoder().decode(r);
}