Skip to content

Commit 49a0363

Browse files
committed
fixed tests build
1 parent c95c971 commit 49a0363

11 files changed

+44
-46
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,6 @@ export { default as ITFReader } from './core/oned/ITFReader';
115115
export { default as Code39Reader } from './core/oned/Code39Reader';
116116
export { default as RSS14Reader } from './core/oned/rss/RSS14Reader';
117117
export { default as RSSExpandedReader } from './core/oned/rss/expanded/RSSExpandedReader';
118+
export { default as AbstractExpandedDecoder } from './core/oned/rss/expanded/decoders/AbstractExpandedDecoder';
119+
export { createDecoder as createAbstractExpandedDecoder } from './core/oned/rss/expanded/decoders/AbstractExpandedDecoderComplement';
118120
export { default as MultiFormatOneDReader } from './core/oned/MultiFormatOneDReader';

src/test/core/common/AbstractBlackBox.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,23 @@
1616

1717
/*package com.google.zxing.common;*/
1818

19+
import {
20+
BarcodeFormat,
21+
BinaryBitmap,
22+
DecodeHintType,
23+
HybridBinarizer,
24+
LuminanceSource,
25+
Reader,
26+
Result,
27+
ResultMetadataType,
28+
ZXingStringEncoding
29+
} from '@zxing/library';
30+
import * as fs from 'fs';
31+
import * as path from 'path';
32+
import TestResult from '../common/TestResult';
33+
import SharpImageLuminanceSource from '../SharpImageLuminanceSource';
1934
import { assertEquals } from '../util/AssertUtils';
2035
import SharpImage from '../util/SharpImage';
21-
import SharpImageLuminanceSource from '../SharpImageLuminanceSource';
22-
import { BarcodeFormat } from '@zxing/library';
23-
import { BinaryBitmap } from '@zxing/library';
24-
import { DecodeHintType } from '@zxing/library';
25-
import { LuminanceSource } from '@zxing/library';
26-
import { Reader } from '@zxing/library';
27-
import { Result } from '@zxing/library';
28-
import { ResultMetadataType } from '@zxing/library';
29-
import TestResult from '../common/TestResult';
30-
import { HybridBinarizer } from '@zxing/library';
31-
import { ZXingStringEncoding } from '@zxing/library';
3236

3337

3438
/*import javax.imageio.ImageIO;*/

src/test/core/oned/rss/expanded/BinaryUtil.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import BitArray from '../../../../../core/common/BitArray';
1+
import { BitArray } from '@zxing/library';
22
import { assertEquals } from '../../../util/AssertUtils';
33
import BinaryUtil from './BinaryUtil';
44

src/test/core/oned/rss/expanded/BinaryUtil.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { BitArray } from '../../../../..';
2-
import IllegalStateException from '../../../../../core/IllegalStateException';
3-
import StringBuilder from '../../../../../core/util/StringBuilder';
1+
import { BitArray, IllegalStateException } from '@zxing/library';
2+
import StringBuilder from 'src/core/util/StringBuilder';
43

54
/*
65
* Copyright (C) 2010 ZXing authors

src/test/core/oned/rss/expanded/ExpandedInformationDecoder.spec.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
import { BitArray } from '../../../../..';
2-
import AbstractExpandedDecoder from '../../../../../core/oned/rss/expanded/decoders/AbstractExpandedDecoder';
3-
import { assertEquals } from '../../../util/AssertUtils';
4-
import BinaryUtil from './BinaryUtil';
5-
6-
7-
81
/*
92
* Copyright (C) 2010 ZXing authors
103
*
@@ -39,6 +32,10 @@ import BinaryUtil from './BinaryUtil';
3932
// import org.junit.Assert;
4033
// import org.junit.Test;
4134

35+
import { BitArray, AbstractExpandedDecoder, createAbstractExpandedDecoder } from '@zxing/library';
36+
import { assertEquals } from '../../../util/AssertUtils';
37+
import BinaryUtil from './BinaryUtil';
38+
4239
/**
4340
* @author Pablo Orduña, University of Deusto ([email protected])
4441
* @author Eduardo Castillejo, University of Deusto ([email protected])
@@ -48,7 +45,7 @@ it('ExpandedInformationDecoderTest', () => {
4845
it('testNoAi', () => {
4946
let information: BitArray = BinaryUtil.buildBitArrayFromString(' .......X ..XX..X. X.X....X .......X ....');
5047

51-
let decoder: AbstractExpandedDecoder = AbstractExpandedDecoder.createDecoder(information);
48+
let decoder: AbstractExpandedDecoder = createAbstractExpandedDecoder(information);
5249
let decoded: String = decoder.parseInformation();
5350
assertEquals('(10)12A', decoded);
5451
});

src/test/core/oned/rss/expanded/RSSExpandedBlackBox1.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626

2727
// package com.google.zxing.oned;
2828

29-
import BarcodeFormat from '../../../../../core/BarcodeFormat';
30-
import MultiFormatReader from '../../../../../core/MultiFormatReader';
29+
import { BarcodeFormat, MultiFormatReader } from '@zxing/library';
3130
import AbstractBlackBoxSpec from '../../../common/AbstractBlackBox';
3231

3332
/**
@@ -43,8 +42,8 @@ class RSSExpandedBlackBox1Spec extends AbstractBlackBoxSpec {
4342
}
4443

4544
describe('RSSExpandedBlackBox1Spec', () => {
46-
it('testBlackBox', done => {
45+
it('testBlackBox', async () => {
4746
const test = new RSSExpandedBlackBox1Spec();
48-
return test.testBlackBox(done);
47+
await test.testBlackBox();
4948
});
5049
});

src/test/core/oned/rss/expanded/RSSExpandedBlackBox2.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626

2727
// package com.google.zxing.oned;
2828

29-
import BarcodeFormat from '../../../../../core/BarcodeFormat';
30-
import MultiFormatReader from '../../../../../core/MultiFormatReader';
29+
import { BarcodeFormat, MultiFormatReader } from '@zxing/library';
3130
import AbstractBlackBoxSpec from '../../../common/AbstractBlackBox';
3231

3332
/**
@@ -43,9 +42,9 @@ class RSSExpandedBlackBox2TestCase extends AbstractBlackBoxSpec {
4342
}
4443

4544
describe('RSSExpandedBlackBox2TestCase', () => {
46-
it('testBlackBox', done => {
45+
it('testBlackBox', async () => {
4746
const test = new RSSExpandedBlackBox2TestCase();
48-
return test.testBlackBox(done);
47+
await test.testBlackBox();
4948
});
5049
});
5150

src/test/core/oned/rss/expanded/RSSExpandedBlackBox3.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626

2727
// package com.google.zxing.oned;
2828

29-
import BarcodeFormat from '../../../../../core/BarcodeFormat';
30-
import MultiFormatReader from '../../../../../core/MultiFormatReader';
29+
import { BarcodeFormat, MultiFormatReader } from '@zxing/library';
3130
import AbstractBlackBoxSpec from '../../../common/AbstractBlackBox';
3231

3332
/**
@@ -43,8 +42,8 @@ class RSSExpandedBlackBox3TestCase extends AbstractBlackBoxSpec {
4342
}
4443

4544
describe('RSSExpandedBlackBox3TestCase', () => {
46-
it('testBlackBox', done => {
45+
it('testBlackBox', async () => {
4746
const test = new RSSExpandedBlackBox3TestCase();
48-
return test.testBlackBox(done);
47+
await test.testBlackBox();
4948
});
5049
});

src/test/core/oned/rss/expanded/RSSExpandedStackedBlackBox1.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BarcodeFormat, MultiFormatReader } from '../../../../..';
1+
import { BarcodeFormat, MultiFormatReader } from '@zxing/library';
22
import AbstractBlackBoxSpec from '../../../common/AbstractBlackBox';
33

44
/*
@@ -48,9 +48,9 @@ class RSSExpandedStackedBlackBox1TestCase extends AbstractBlackBoxSpec {
4848
}
4949

5050
describe('RSSExpandedStackedBlackBox1TestCase', () => {
51-
it('testBlackBox', done => {
51+
it('testBlackBox', async () => {
5252
const test = new RSSExpandedStackedBlackBox1TestCase();
53-
return test.testBlackBox(done);
53+
await test.testBlackBox();
5454
});
5555
});
5656

src/test/core/oned/rss/expanded/RSSExpandedStackedBlackBox2.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { BarcodeFormat } from '../../../../..';
2-
import MultiFormatReader from '../../../../../core/MultiFormatReader';
1+
import { BarcodeFormat, MultiFormatReader } from '@zxing/library';
32
import AbstractBlackBoxSpec from '../../../common/AbstractBlackBox';
43

54
/*
@@ -49,9 +48,9 @@ class RSSExpandedStackedBlackBox2TestCase extends AbstractBlackBoxSpec {
4948
}
5049

5150
describe('RSSExpandedStackedBlackBox2TestCase', () => {
52-
it('testBlackBox', done => {
51+
it('testBlackBox', async () => {
5352
const test = new RSSExpandedStackedBlackBox2TestCase();
54-
return test.testBlackBox(done);
53+
await test.testBlackBox();
5554
});
5655
});
5756

src/test/core/oned/rss/expanded/TestCaseUtil.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { BinaryBitmap, GlobalHistogramBinarizer } from "../../../../..";
2-
import AbstractBlackBoxSpec from "../../../common/AbstractBlackBox";
3-
import SharpImageLuminanceSource from "../../../SharpImageLuminanceSource";
4-
import SharpImage from "../../../util/SharpImage";
1+
import { BinaryBitmap, GlobalHistogramBinarizer } from '@zxing/library';
2+
import AbstractBlackBoxSpec from '../../../common/AbstractBlackBox';
3+
import SharpImageLuminanceSource from '../../../SharpImageLuminanceSource';
4+
import SharpImage from '../../../util/SharpImage';
55

66
/*
77
* Copyright (C) 2012 ZXing authors

0 commit comments

Comments
 (0)