Added blackbox test of partial barcodes which should not decode.
authordswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Wed, 25 Jun 2008 01:10:52 +0000 (01:10 +0000)
committerdswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Wed, 25 Jun 2008 01:10:52 +0000 (01:10 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@476 59b500cc-1b3d-0410-9834-0bbf25fbcc57

20 files changed:
core/test/data/blackbox/partial/01.jpg [new file with mode: 0644]
core/test/data/blackbox/partial/02.jpg [new file with mode: 0644]
core/test/data/blackbox/partial/03.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/04.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/05.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/06.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/07.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/08.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/09.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/10.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/11.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/12.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/13.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/14.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/15.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/16.jpg [new file with mode: 0755]
core/test/data/blackbox/partial/17.jpg [new file with mode: 0755]
core/test/src/com/google/zxing/common/FalsePositivesBlackBoxTestCase.java [deleted file]
core/test/src/com/google/zxing/negative/FalsePositivesBlackBoxTestCase.java [new file with mode: 0644]
core/test/src/com/google/zxing/negative/PartialBlackBoxTestCase.java [new file with mode: 0644]

diff --git a/core/test/data/blackbox/partial/01.jpg b/core/test/data/blackbox/partial/01.jpg
new file mode 100644 (file)
index 0000000..770c9d4
Binary files /dev/null and b/core/test/data/blackbox/partial/01.jpg differ
diff --git a/core/test/data/blackbox/partial/02.jpg b/core/test/data/blackbox/partial/02.jpg
new file mode 100644 (file)
index 0000000..3146ff7
Binary files /dev/null and b/core/test/data/blackbox/partial/02.jpg differ
diff --git a/core/test/data/blackbox/partial/03.jpg b/core/test/data/blackbox/partial/03.jpg
new file mode 100755 (executable)
index 0000000..42f7a12
Binary files /dev/null and b/core/test/data/blackbox/partial/03.jpg differ
diff --git a/core/test/data/blackbox/partial/04.jpg b/core/test/data/blackbox/partial/04.jpg
new file mode 100755 (executable)
index 0000000..c3e3f00
Binary files /dev/null and b/core/test/data/blackbox/partial/04.jpg differ
diff --git a/core/test/data/blackbox/partial/05.jpg b/core/test/data/blackbox/partial/05.jpg
new file mode 100755 (executable)
index 0000000..536b33e
Binary files /dev/null and b/core/test/data/blackbox/partial/05.jpg differ
diff --git a/core/test/data/blackbox/partial/06.jpg b/core/test/data/blackbox/partial/06.jpg
new file mode 100755 (executable)
index 0000000..da0fab4
Binary files /dev/null and b/core/test/data/blackbox/partial/06.jpg differ
diff --git a/core/test/data/blackbox/partial/07.jpg b/core/test/data/blackbox/partial/07.jpg
new file mode 100755 (executable)
index 0000000..bbd9105
Binary files /dev/null and b/core/test/data/blackbox/partial/07.jpg differ
diff --git a/core/test/data/blackbox/partial/08.jpg b/core/test/data/blackbox/partial/08.jpg
new file mode 100755 (executable)
index 0000000..386aef6
Binary files /dev/null and b/core/test/data/blackbox/partial/08.jpg differ
diff --git a/core/test/data/blackbox/partial/09.jpg b/core/test/data/blackbox/partial/09.jpg
new file mode 100755 (executable)
index 0000000..3d1cc19
Binary files /dev/null and b/core/test/data/blackbox/partial/09.jpg differ
diff --git a/core/test/data/blackbox/partial/10.jpg b/core/test/data/blackbox/partial/10.jpg
new file mode 100755 (executable)
index 0000000..5c78acc
Binary files /dev/null and b/core/test/data/blackbox/partial/10.jpg differ
diff --git a/core/test/data/blackbox/partial/11.jpg b/core/test/data/blackbox/partial/11.jpg
new file mode 100755 (executable)
index 0000000..32b7f0b
Binary files /dev/null and b/core/test/data/blackbox/partial/11.jpg differ
diff --git a/core/test/data/blackbox/partial/12.jpg b/core/test/data/blackbox/partial/12.jpg
new file mode 100755 (executable)
index 0000000..4608490
Binary files /dev/null and b/core/test/data/blackbox/partial/12.jpg differ
diff --git a/core/test/data/blackbox/partial/13.jpg b/core/test/data/blackbox/partial/13.jpg
new file mode 100755 (executable)
index 0000000..a1db521
Binary files /dev/null and b/core/test/data/blackbox/partial/13.jpg differ
diff --git a/core/test/data/blackbox/partial/14.jpg b/core/test/data/blackbox/partial/14.jpg
new file mode 100755 (executable)
index 0000000..21b4060
Binary files /dev/null and b/core/test/data/blackbox/partial/14.jpg differ
diff --git a/core/test/data/blackbox/partial/15.jpg b/core/test/data/blackbox/partial/15.jpg
new file mode 100755 (executable)
index 0000000..6063490
Binary files /dev/null and b/core/test/data/blackbox/partial/15.jpg differ
diff --git a/core/test/data/blackbox/partial/16.jpg b/core/test/data/blackbox/partial/16.jpg
new file mode 100755 (executable)
index 0000000..cacdfc3
Binary files /dev/null and b/core/test/data/blackbox/partial/16.jpg differ
diff --git a/core/test/data/blackbox/partial/17.jpg b/core/test/data/blackbox/partial/17.jpg
new file mode 100755 (executable)
index 0000000..26fda11
Binary files /dev/null and b/core/test/data/blackbox/partial/17.jpg differ
diff --git a/core/test/src/com/google/zxing/common/FalsePositivesBlackBoxTestCase.java b/core/test/src/com/google/zxing/common/FalsePositivesBlackBoxTestCase.java
deleted file mode 100644 (file)
index 83df937..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2008 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.common;
-
-import java.io.File;
-
-/**
- * This test ensures that random images with high contrast patterns do not decode as barcodes.
- *
- * @author dswitkin@google.com (Daniel Switkin)
- */
-public final class FalsePositivesBlackBoxTestCase extends AbstractNegativeBlackBoxTestCase {
-
-  public FalsePositivesBlackBoxTestCase() {
-    super(new File("test/data/blackbox/falsepositives"));
-    addTest(1, 0.0f);
-    addTest(1, 90.0f);
-    addTest(1, 180.0f);
-    addTest(0, 270.0f);
-  }
-
-}
diff --git a/core/test/src/com/google/zxing/negative/FalsePositivesBlackBoxTestCase.java b/core/test/src/com/google/zxing/negative/FalsePositivesBlackBoxTestCase.java
new file mode 100644 (file)
index 0000000..f07348e
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2008 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.negative;
+
+import com.google.zxing.common.AbstractNegativeBlackBoxTestCase;
+
+import java.io.File;
+
+/**
+ * This test ensures that random images with high contrast patterns do not decode as barcodes.
+ *
+ * @author dswitkin@google.com (Daniel Switkin)
+ */
+public final class FalsePositivesBlackBoxTestCase extends AbstractNegativeBlackBoxTestCase {
+
+  public FalsePositivesBlackBoxTestCase() {
+    super(new File("test/data/blackbox/falsepositives"));
+    addTest(1, 0.0f);
+    addTest(1, 90.0f);
+    addTest(1, 180.0f);
+    addTest(0, 270.0f);
+  }
+
+}
diff --git a/core/test/src/com/google/zxing/negative/PartialBlackBoxTestCase.java b/core/test/src/com/google/zxing/negative/PartialBlackBoxTestCase.java
new file mode 100644 (file)
index 0000000..a077ccb
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2008 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.negative;
+
+import com.google.zxing.common.AbstractNegativeBlackBoxTestCase;
+
+import java.io.File;
+
+/**
+ * This test ensures that partial barcodes do not decode.
+ *
+ * @author dswitkin@google.com (Daniel Switkin)
+ */
+public final class PartialBlackBoxTestCase extends AbstractNegativeBlackBoxTestCase {
+
+  public PartialBlackBoxTestCase() {
+    super(new File("test/data/blackbox/partial"));
+    addTest(0, 0.0f);
+    addTest(1, 90.0f);
+    addTest(1, 180.0f);
+    addTest(0, 270.0f);
+  }
+
+}
\ No newline at end of file