summaryrefslogtreecommitdiff
path: root/core/src/test/java/com
diff options
context:
space:
mode:
authorSean Owen <srowen@gmail.com>2016-11-29 15:16:07 +0300
committerSean Owen <srowen@gmail.com>2016-11-29 15:16:07 +0300
commit0dfda0807876a53be295fa0abafd53866edf13bd (patch)
tree18520e63e57e51361b7fe06ab0a3c8c69fdd3e7d /core/src/test/java/com
parent64eb07747e24468d62bd86998dfa064832192d96 (diff)
downloadzxing-0dfda0807876a53be295fa0abafd53866edf13bd.tar.xz
Fix typos; avoid use of java.util.Date; other small improvements from inspection; deprecate some accidentally-public methods
Diffstat (limited to 'core/src/test/java/com')
-rw-r--r--core/src/test/java/com/google/zxing/client/result/CalendarParsedResultTestCase.java4
-rw-r--r--core/src/test/java/com/google/zxing/common/AbstractBlackBoxTestCase.java10
-rw-r--r--core/src/test/java/com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java2
3 files changed, 8 insertions, 8 deletions
diff --git a/core/src/test/java/com/google/zxing/client/result/CalendarParsedResultTestCase.java b/core/src/test/java/com/google/zxing/client/result/CalendarParsedResultTestCase.java
index 4e53bbafe..e81f10979 100644
--- a/core/src/test/java/com/google/zxing/client/result/CalendarParsedResultTestCase.java
+++ b/core/src/test/java/com/google/zxing/client/result/CalendarParsedResultTestCase.java
@@ -231,8 +231,8 @@ public final class CalendarParsedResultTestCase extends Assert {
assertEquals(summary, calResult.getSummary());
assertEquals(location, calResult.getLocation());
DateFormat dateFormat = makeGMTFormat();
- assertEquals(startString, dateFormat.format(calResult.getStart()));
- assertEquals(endString, calResult.getEnd() == null ? null : dateFormat.format(calResult.getEnd()));
+ assertEquals(startString, dateFormat.format(calResult.getStartTimestamp()));
+ assertEquals(endString, calResult.getEndTimestamp() < 0L ? null : dateFormat.format(calResult.getEndTimestamp()));
assertEquals(organizer, calResult.getOrganizer());
assertArrayEquals(attendees, calResult.getAttendees());
assertEqualOrNaN(latitude, calResult.getLatitude());
diff --git a/core/src/test/java/com/google/zxing/common/AbstractBlackBoxTestCase.java b/core/src/test/java/com/google/zxing/common/AbstractBlackBoxTestCase.java
index d1a0eb5d4..c5129ee9c 100644
--- a/core/src/test/java/com/google/zxing/common/AbstractBlackBoxTestCase.java
+++ b/core/src/test/java/com/google/zxing/common/AbstractBlackBoxTestCase.java
@@ -141,7 +141,7 @@ public abstract class AbstractBlackBoxTestCase extends Assert {
int[] passedCounts = new int[testCount];
int[] misreadCounts = new int[testCount];
int[] tryHarderCounts = new int[testCount];
- int[] tryHaderMisreadCounts = new int[testCount];
+ int[] tryHarderMisreadCounts = new int[testCount];
for (Path testImage : imageFiles) {
log.info(String.format("Starting %s", testImage));
@@ -186,7 +186,7 @@ public abstract class AbstractBlackBoxTestCase extends Assert {
if (decode(bitmap, rotation, expectedText, expectedMetadata, true)) {
tryHarderCounts[x]++;
} else {
- tryHaderMisreadCounts[x]++;
+ tryHarderMisreadCounts[x]++;
}
} catch (ReaderException ignored) {
log.fine(String.format("could not read at rotation %f w/TH", rotation));
@@ -212,10 +212,10 @@ public abstract class AbstractBlackBoxTestCase extends Assert {
tryHarderCounts[x], imageFiles.size(), testResult.getTryHarderCount()));
failed = imageFiles.size() - tryHarderCounts[x];
log.info(String.format(" %d failed due to misreads, %d not detected",
- tryHaderMisreadCounts[x], failed - tryHaderMisreadCounts[x]));
+ tryHarderMisreadCounts[x], failed - tryHarderMisreadCounts[x]));
totalFound += passedCounts[x] + tryHarderCounts[x];
totalMustPass += testResult.getMustPassCount() + testResult.getTryHarderCount();
- totalMisread += misreadCounts[x] + tryHaderMisreadCounts[x];
+ totalMisread += misreadCounts[x] + tryHarderMisreadCounts[x];
totalMaxMisread += testResult.getMaxMisreads() + testResult.getMaxTryHarderMisreads();
}
@@ -247,7 +247,7 @@ public abstract class AbstractBlackBoxTestCase extends Assert {
assertTrue(label,
misreadCounts[x] <= testResult.getMaxMisreads());
assertTrue("Try harder, " + label,
- tryHaderMisreadCounts[x] <= testResult.getMaxTryHarderMisreads());
+ tryHarderMisreadCounts[x] <= testResult.getMaxTryHarderMisreads());
}
}
}
diff --git a/core/src/test/java/com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java b/core/src/test/java/com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java
index 3ce4e7c19..0f258519a 100644
--- a/core/src/test/java/com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java
+++ b/core/src/test/java/com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java
@@ -126,7 +126,7 @@ public abstract class AbstractNegativeBlackBoxTestCase extends AbstractBlackBoxT
*
* @param image The image to test
* @param rotationInDegrees The amount of rotation to apply
- * @return true if nothing found, false if a non-existant barcode was detected
+ * @return true if nothing found, false if a non-existent barcode was detected
*/
private boolean checkForFalsePositives(BufferedImage image, float rotationInDegrees) {
BufferedImage rotatedImage = rotateImage(image, rotationInDegrees);