mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Remove target temp dir creation
git-svn-id: https://zxing.googlecode.com/svn/trunk@2578 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
d5342e8e7f
commit
7a39922b30
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
package com.google.zxing.aztec.encoder;
|
package com.google.zxing.aztec.encoder;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
@ -320,9 +319,8 @@ public final class EncoderTest extends Assert {
|
||||||
assertEquals("Unexpected symbol format (compact)", compact, aztec.isCompact());
|
assertEquals("Unexpected symbol format (compact)", compact, aztec.isCompact());
|
||||||
assertEquals("Unexpected nr. of layers", layers, aztec.getLayers());
|
assertEquals("Unexpected nr. of layers", layers, aztec.getLayers());
|
||||||
BitMatrix matrix = aztec.getMatrix();
|
BitMatrix matrix = aztec.getMatrix();
|
||||||
new File("target/tmp").mkdirs();
|
AztecDetectorResult r =
|
||||||
//ImageWriter.saveAsBWImageFile(matrix, new File("target/tmp/aztec-out-" + (compact ? "c-" : "f-") + layers + ".png"));
|
new AztecDetectorResult(matrix, NO_POINTS, aztec.isCompact(), aztec.getCodeWords(), aztec.getLayers());
|
||||||
AztecDetectorResult r = new AztecDetectorResult(matrix, NO_POINTS, aztec.isCompact(), aztec.getCodeWords(), aztec.getLayers());
|
|
||||||
DecoderResult res = new Decoder().decode(r);
|
DecoderResult res = new Decoder().decode(r);
|
||||||
assertEquals(data, res.getText());
|
assertEquals(data, res.getText());
|
||||||
// Check error correction by introducing a few minor errors
|
// Check error correction by introducing a few minor errors
|
||||||
|
@ -348,7 +346,9 @@ public final class EncoderTest extends Assert {
|
||||||
private static void testStuffBits(int wordSize, String bits, String expected) {
|
private static void testStuffBits(int wordSize, String bits, String expected) {
|
||||||
BitArray in = toBitArray(bits);
|
BitArray in = toBitArray(bits);
|
||||||
BitArray stuffed = Encoder.stuffBits(in, wordSize);
|
BitArray stuffed = Encoder.stuffBits(in, wordSize);
|
||||||
assertEquals("stuffBits() failed for input string: " + bits, expected.replace(" ", ""), stuffed.toString().replace(" ", ""));
|
assertEquals("stuffBits() failed for input string: " + bits,
|
||||||
|
expected.replace(" ", ""),
|
||||||
|
stuffed.toString().replace(" ", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BitArray toBitArray(CharSequence bits) {
|
private static BitArray toBitArray(CharSequence bits) {
|
||||||
|
|
Loading…
Reference in a new issue