"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/test/java/com/google/zxing/client/result/ParsedReaderResultTestCase.java" between
zxing-zxing-3.4.1.tar.gz and zxing-zxing-3.5.0.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Info: Project is in maintenance mode (no active development).

ParsedReaderResultTestCase.java  (zxing-zxing-3.4.1):ParsedReaderResultTestCase.java  (zxing-zxing-3.5.0)
skipping to change at line 311 skipping to change at line 311
doTestResult("mmsto:+15551212", "+15551212", ParsedResultType.SMS); doTestResult("mmsto:+15551212", "+15551212", ParsedResultType.SMS);
doTestResult("mmsto:+15551212:subject", "+15551212\nsubject", ParsedResultTy pe.SMS); doTestResult("mmsto:+15551212:subject", "+15551212\nsubject", ParsedResultTy pe.SMS);
doTestResult("mmsto:+15551212:My message", "+15551212\nMy message", ParsedRe sultType.SMS); doTestResult("mmsto:+15551212:My message", "+15551212\nMy message", ParsedRe sultType.SMS);
doTestResult("mmsto:+15551212:What's up?", "+15551212\nWhat's up?", ParsedRe sultType.SMS); doTestResult("mmsto:+15551212:What's up?", "+15551212\nWhat's up?", ParsedRe sultType.SMS);
doTestResult("mmsto:+15551212:Directions: Do this", "+15551212\nDirections: Do this", doTestResult("mmsto:+15551212:Directions: Do this", "+15551212\nDirections: Do this",
ParsedResultType.SMS); ParsedResultType.SMS);
doTestResult("mmsto:212-555-1212:Here's a longer message. Should be fine.", doTestResult("mmsto:212-555-1212:Here's a longer message. Should be fine.",
"212-555-1212\nHere's a longer message. Should be fine.", ParsedResultTy pe.SMS); "212-555-1212\nHere's a longer message. Should be fine.", ParsedResultTy pe.SMS);
} }
/*
@Test
public void testNDEFText() {
doTestResult(new byte[] {(byte)0xD1,(byte)0x01,(byte)0x05,(byte)0x54,
(byte)0x02,(byte)0x65,(byte)0x6E,(byte)0x68,
(byte)0x69},
ParsedResultType.TEXT);
}
@Test
public void testNDEFURI() {
doTestResult(new byte[] {(byte)0xD1,(byte)0x01,(byte)0x08,(byte)0x55,
(byte)0x01,(byte)0x6E,(byte)0x66,(byte)0x63,
(byte)0x2E,(byte)0x63,(byte)0x6F,(byte)0x6D},
ParsedResultType.URI);
}
@Test
public void testNDEFSmartPoster() {
doTestResult(new byte[] {(byte)0xD1,(byte)0x02,(byte)0x2F,(byte)0x53,
(byte)0x70,(byte)0x91,(byte)0x01,(byte)0x0E,
(byte)0x55,(byte)0x01,(byte)0x6E,(byte)0x66,
(byte)0x63,(byte)0x2D,(byte)0x66,(byte)0x6F,
(byte)0x72,(byte)0x75,(byte)0x6D,(byte)0x2E,
(byte)0x6F,(byte)0x72,(byte)0x67,(byte)0x11,
(byte)0x03,(byte)0x01,(byte)0x61,(byte)0x63,
(byte)0x74,(byte)0x00,(byte)0x51,(byte)0x01,
(byte)0x12,(byte)0x54,(byte)0x05,(byte)0x65,
(byte)0x6E,(byte)0x2D,(byte)0x55,(byte)0x53,
(byte)0x48,(byte)0x65,(byte)0x6C,(byte)0x6C,
(byte)0x6F,(byte)0x2C,(byte)0x20,(byte)0x77,
(byte)0x6F,(byte)0x72,(byte)0x6C,(byte)0x64},
ParsedResultType.NDEF_SMART_POSTER);
}
*/
private static void doTestResult(String contents, private static void doTestResult(String contents,
String goldenResult, String goldenResult,
ParsedResultType type) { ParsedResultType type) {
doTestResult(contents, goldenResult, type, BarcodeFormat.QR_CODE); // QR cod e is arbitrary doTestResult(contents, goldenResult, type, BarcodeFormat.QR_CODE); // QR cod e is arbitrary
} }
private static void doTestResult(String contents, private static void doTestResult(String contents,
String goldenResult, String goldenResult,
ParsedResultType type, ParsedResultType type,
BarcodeFormat format) { BarcodeFormat format) {
 End of changes. 1 change blocks. 
36 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)