1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
* 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.
*/
use rxing::{oned::Code39Reader, BarcodeFormat, MultiFormatReader};
mod common;
/**
* @author Sean Owen
*/
#[test]
fn code39_black_box1_test_case() {
let mut tester = common::AbstractBlackBoxTestCase::new(
"test_resources/blackbox/code39-1",
MultiFormatReader::default(),
BarcodeFormat::CODE_39,
);
// 2 failes on row 169
// super("src/test/resources/blackbox/code39-1", new MultiFormatReader(), BarcodeFormat.CODE_39);
tester.add_test(4, 4, 0.0);
tester.add_test(4, 4, 180.0);
tester.test_black_box();
}
/**
* @author dswitkin@google.com (Daniel Switkin)
*/
#[test]
fn code39_black_box3_test_case() {
let mut tester = common::AbstractBlackBoxTestCase::new(
"test_resources/blackbox/code39-3",
MultiFormatReader::default(),
BarcodeFormat::CODE_39,
);
// super("src/test/resources/blackbox/code39-3", new MultiFormatReader(), BarcodeFormat.CODE_39);
tester.add_test(17, 17, 0.0);
tester.add_test(17, 17, 180.0);
tester.test_black_box();
}
/**
* @author Sean Owen
*/
#[test]
fn code39_extended_black_box2_test_case() {
let mut tester = common::AbstractBlackBoxTestCase::new(
"test_resources/blackbox/code39-2",
Code39Reader::with_all_config(false, true),
BarcodeFormat::CODE_39,
);
// super("src/test/resources/blackbox/code39-2", new Code39Reader(false, true), BarcodeFormat.CODE_39);
tester.add_test(2, 2, 0.0);
tester.add_test(2, 2, 180.0);
tester.test_black_box();
}