mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
move all Result to RXingResult
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user