diff --git a/core/test/data/blackbox/partial/01.jpg b/core/test/data/blackbox/partial/01.jpg new file mode 100644 index 000000000..770c9d418 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 index 000000000..3146ff7b5 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 index 000000000..42f7a12c1 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 index 000000000..c3e3f00ff 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 index 000000000..536b33e30 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 index 000000000..da0fab463 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 index 000000000..bbd9105f8 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 index 000000000..386aef65d 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 index 000000000..3d1cc19af 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 index 000000000..5c78acc8e 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 index 000000000..32b7f0b62 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 index 000000000..46084907d 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 index 000000000..a1db52174 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 index 000000000..21b40604c 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 index 000000000..606349008 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 index 000000000..cacdfc3d6 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 index 000000000..26fda115e 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/negative/FalsePositivesBlackBoxTestCase.java similarity index 91% rename from core/test/src/com/google/zxing/common/FalsePositivesBlackBoxTestCase.java rename to core/test/src/com/google/zxing/negative/FalsePositivesBlackBoxTestCase.java index 83df937a4..f07348ec2 100644 --- a/core/test/src/com/google/zxing/common/FalsePositivesBlackBoxTestCase.java +++ b/core/test/src/com/google/zxing/negative/FalsePositivesBlackBoxTestCase.java @@ -14,7 +14,9 @@ * limitations under the License. */ -package com.google.zxing.common; +package com.google.zxing.negative; + +import com.google.zxing.common.AbstractNegativeBlackBoxTestCase; import java.io.File; 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 index 000000000..a077ccb6c --- /dev/null +++ b/core/test/src/com/google/zxing/negative/PartialBlackBoxTestCase.java @@ -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