diff --git a/core/test/data/blackbox/qrcode1/1.jpg b/core/test/data/blackbox/qrcode1/1.jpg new file mode 100755 index 000000000..4aaf5ccdf Binary files /dev/null and b/core/test/data/blackbox/qrcode1/1.jpg differ diff --git a/core/test/data/blackbox/qrcode1/1.txt b/core/test/data/blackbox/qrcode1/1.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/1.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/10.jpg b/core/test/data/blackbox/qrcode1/10.jpg new file mode 100755 index 000000000..7ef08f62c Binary files /dev/null and b/core/test/data/blackbox/qrcode1/10.jpg differ diff --git a/core/test/data/blackbox/qrcode1/10.txt b/core/test/data/blackbox/qrcode1/10.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/10.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/11.jpg b/core/test/data/blackbox/qrcode1/11.jpg new file mode 100755 index 000000000..dc4e06f66 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/11.jpg differ diff --git a/core/test/data/blackbox/qrcode1/11.txt b/core/test/data/blackbox/qrcode1/11.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/11.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/12.jpg b/core/test/data/blackbox/qrcode1/12.jpg new file mode 100755 index 000000000..37f2dc6fd Binary files /dev/null and b/core/test/data/blackbox/qrcode1/12.jpg differ diff --git a/core/test/data/blackbox/qrcode1/12.txt b/core/test/data/blackbox/qrcode1/12.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/12.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/13.jpg b/core/test/data/blackbox/qrcode1/13.jpg new file mode 100755 index 000000000..7aa45fcc9 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/13.jpg differ diff --git a/core/test/data/blackbox/qrcode1/13.txt b/core/test/data/blackbox/qrcode1/13.txt new file mode 100644 index 000000000..c6adb03f9 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/13.txt @@ -0,0 +1 @@ +http://google.com/gwt/n?u=bluenile.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/14.jpg b/core/test/data/blackbox/qrcode1/14.jpg new file mode 100755 index 000000000..77a7c0520 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/14.jpg differ diff --git a/core/test/data/blackbox/qrcode1/14.txt b/core/test/data/blackbox/qrcode1/14.txt new file mode 100644 index 000000000..c6adb03f9 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/14.txt @@ -0,0 +1 @@ +http://google.com/gwt/n?u=bluenile.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/15.jpg b/core/test/data/blackbox/qrcode1/15.jpg new file mode 100755 index 000000000..ff6f10339 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/15.jpg differ diff --git a/core/test/data/blackbox/qrcode1/15.txt b/core/test/data/blackbox/qrcode1/15.txt new file mode 100644 index 000000000..c6adb03f9 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/15.txt @@ -0,0 +1 @@ +http://google.com/gwt/n?u=bluenile.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/16.jpg b/core/test/data/blackbox/qrcode1/16.jpg new file mode 100755 index 000000000..15bf0951c Binary files /dev/null and b/core/test/data/blackbox/qrcode1/16.jpg differ diff --git a/core/test/data/blackbox/qrcode1/16.txt b/core/test/data/blackbox/qrcode1/16.txt new file mode 100644 index 000000000..31a244c36 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/16.txt @@ -0,0 +1,4 @@ +Sean Owen +srowen@google.com +917-364-2918 +http://awesome-thoughts.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/17.jpg b/core/test/data/blackbox/qrcode1/17.jpg new file mode 100755 index 000000000..797df9053 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/17.jpg differ diff --git a/core/test/data/blackbox/qrcode1/17.txt b/core/test/data/blackbox/qrcode1/17.txt new file mode 100644 index 000000000..31a244c36 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/17.txt @@ -0,0 +1,4 @@ +Sean Owen +srowen@google.com +917-364-2918 +http://awesome-thoughts.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/18.jpg b/core/test/data/blackbox/qrcode1/18.jpg new file mode 100755 index 000000000..c850d251c Binary files /dev/null and b/core/test/data/blackbox/qrcode1/18.jpg differ diff --git a/core/test/data/blackbox/qrcode1/18.txt b/core/test/data/blackbox/qrcode1/18.txt new file mode 100644 index 000000000..31a244c36 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/18.txt @@ -0,0 +1,4 @@ +Sean Owen +srowen@google.com +917-364-2918 +http://awesome-thoughts.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/19.jpg b/core/test/data/blackbox/qrcode1/19.jpg new file mode 100755 index 000000000..de6c9048c Binary files /dev/null and b/core/test/data/blackbox/qrcode1/19.jpg differ diff --git a/core/test/data/blackbox/qrcode1/19.txt b/core/test/data/blackbox/qrcode1/19.txt new file mode 100644 index 000000000..31a244c36 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/19.txt @@ -0,0 +1,4 @@ +Sean Owen +srowen@google.com +917-364-2918 +http://awesome-thoughts.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/2.jpg b/core/test/data/blackbox/qrcode1/2.jpg new file mode 100755 index 000000000..2b055cb83 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/2.jpg differ diff --git a/core/test/data/blackbox/qrcode1/2.txt b/core/test/data/blackbox/qrcode1/2.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/2.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/20.jpg b/core/test/data/blackbox/qrcode1/20.jpg new file mode 100755 index 000000000..be87685fd Binary files /dev/null and b/core/test/data/blackbox/qrcode1/20.jpg differ diff --git a/core/test/data/blackbox/qrcode1/20.txt b/core/test/data/blackbox/qrcode1/20.txt new file mode 100644 index 000000000..31a244c36 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/20.txt @@ -0,0 +1,4 @@ +Sean Owen +srowen@google.com +917-364-2918 +http://awesome-thoughts.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/3.jpg b/core/test/data/blackbox/qrcode1/3.jpg new file mode 100755 index 000000000..3639fb61e Binary files /dev/null and b/core/test/data/blackbox/qrcode1/3.jpg differ diff --git a/core/test/data/blackbox/qrcode1/3.txt b/core/test/data/blackbox/qrcode1/3.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/3.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/4.jpg b/core/test/data/blackbox/qrcode1/4.jpg new file mode 100755 index 000000000..91d203b7c Binary files /dev/null and b/core/test/data/blackbox/qrcode1/4.jpg differ diff --git a/core/test/data/blackbox/qrcode1/4.txt b/core/test/data/blackbox/qrcode1/4.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/4.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/5.jpg b/core/test/data/blackbox/qrcode1/5.jpg new file mode 100755 index 000000000..69d7574a0 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/5.jpg differ diff --git a/core/test/data/blackbox/qrcode1/5.txt b/core/test/data/blackbox/qrcode1/5.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/5.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/6.jpg b/core/test/data/blackbox/qrcode1/6.jpg new file mode 100755 index 000000000..79f8b7f4f Binary files /dev/null and b/core/test/data/blackbox/qrcode1/6.jpg differ diff --git a/core/test/data/blackbox/qrcode1/6.txt b/core/test/data/blackbox/qrcode1/6.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/6.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/7.jpg b/core/test/data/blackbox/qrcode1/7.jpg new file mode 100755 index 000000000..a3eb61ed8 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/7.jpg differ diff --git a/core/test/data/blackbox/qrcode1/7.txt b/core/test/data/blackbox/qrcode1/7.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/7.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/8.jpg b/core/test/data/blackbox/qrcode1/8.jpg new file mode 100755 index 000000000..a30700981 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/8.jpg differ diff --git a/core/test/data/blackbox/qrcode1/8.txt b/core/test/data/blackbox/qrcode1/8.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/8.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode1/9.jpg b/core/test/data/blackbox/qrcode1/9.jpg new file mode 100755 index 000000000..f04c91543 Binary files /dev/null and b/core/test/data/blackbox/qrcode1/9.jpg differ diff --git a/core/test/data/blackbox/qrcode1/9.txt b/core/test/data/blackbox/qrcode1/9.txt new file mode 100644 index 000000000..cb6b80568 --- /dev/null +++ b/core/test/data/blackbox/qrcode1/9.txt @@ -0,0 +1 @@ +MEBKM:URL:http\://en.wikipedia.org/wiki/Main_Page;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/1.txt b/core/test/data/blackbox/qrcode2/1.txt new file mode 100644 index 000000000..58493bdf3 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/1.txt @@ -0,0 +1 @@ +When we at WRT talk about \"text,\" we are generally talking about a particular kind of readable information encoding - and readable is a complex proposition. Text may be stylized in a way we are unfamiliar with, as in blackletter - it may be interspersed with some markup we don\'t understand, such as HTML - it may be be a substitution system we aren\'t familiar with, such as braille or morse code - or it may be a system that, while technically human-readable, isn\'t particularly optimized for reading by humans, as with barcodes (although barcodes can be read). \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/1.url b/core/test/data/blackbox/qrcode2/1.url new file mode 100644 index 000000000..d607e5230 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/1.url @@ -0,0 +1 @@ +http://writerresponsetheory.org/wordpress/wp-content/uploads/qrcode_01.png \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/10.txt b/core/test/data/blackbox/qrcode2/10.txt new file mode 100644 index 000000000..14632d9bd --- /dev/null +++ b/core/test/data/blackbox/qrcode2/10.txt @@ -0,0 +1,2 @@ +Google モバイル +http://google.jp \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/10.url b/core/test/data/blackbox/qrcode2/10.url new file mode 100644 index 000000000..a59a08390 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/10.url @@ -0,0 +1 @@ +http://www.google.co.jp/mobile/images/qrcode_mobile.gif \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/2.txt b/core/test/data/blackbox/qrcode2/2.txt new file mode 100644 index 000000000..38d534e8e --- /dev/null +++ b/core/test/data/blackbox/qrcode2/2.txt @@ -0,0 +1 @@ +LANDBYASCARC PERCEPTIBLEC EEK,OOZI GITSWAYTHROU AWILDERNESSOFBESUPPOSED,I CANT,ORATL ASTDWARFISH.NO REESOFANYM NITUDEARETOBESOMEMISERA EFRAMEBUIL I GS,TENANTED, U INGSUMMER THEFUGITIVE;BUTTHEWHO ISLAND,WI H EXCEPTIONOFT W STERNPOI ,ANDALINEOFLLIAMLEGR .HEWASOF N ENTHUGUENOTF Y ANDHADON BEENWEALTHTIONCONSE ENTUPONH SD STERS,HELEFTNE LE NS,THEC OFHISFOREOUTHCARO A.THISISLA AVERYSINGULARO TCONSISTSO ITTLEELSEDSAQUART FAMILE. TI PARATEDFROMTHEMA AN BYASCAR YPERCEPTERESORT MARSH EN EVEGETATION,ASMIGH SU POSED, CANT,ORATREMITY, ORT OULTRIESTANDS,ANDWHEREARESOM MIS FRAMEBUIFEVER,MAYBE INDEED, TO;BUTT EISLAND,WITNYYEARSAGO,IC ACTED LLIAM AND.HEWASOFANNESHADREDUCEDHIM OWA IONC NSEQUENTUPONHISDSIDENCEATSULLIVA \'S HC ROLINA.THISISLANOUTTHR LESLON . THATN OINTE U RTEROF E.ITISTHROU ERNE DSANDSLI ,AFAVOR TOFT HEN.T \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/2.url b/core/test/data/blackbox/qrcode2/2.url new file mode 100644 index 000000000..b91982579 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/2.url @@ -0,0 +1 @@ +http://writerresponsetheory.org/query/poe/qrcode%20outputs/qrcodegen-examples/chunk-from-128-bug-head/encodes-by-nfggames/qr-chunk-from-128-bughead-ground.png \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/3.txt b/core/test/data/blackbox/qrcode2/3.txt new file mode 100644 index 000000000..dbd9b9383 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/3.txt @@ -0,0 +1 @@ +http://www.malcolmhall.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/3.url b/core/test/data/blackbox/qrcode2/3.url new file mode 100644 index 000000000..fe6f4dced --- /dev/null +++ b/core/test/data/blackbox/qrcode2/3.url @@ -0,0 +1 @@ +http://www.malcolmhall.com/wp-content/uploads/2006/07/200607260214.jpg \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/4.txt b/core/test/data/blackbox/qrcode2/4.txt new file mode 100644 index 000000000..dd36eda7f --- /dev/null +++ b/core/test/data/blackbox/qrcode2/4.txt @@ -0,0 +1 @@ +http://wwws.keihin.ktr.mlit.go.jp/keitai/ \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/4.url b/core/test/data/blackbox/qrcode2/4.url new file mode 100644 index 000000000..5f3914632 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/4.url @@ -0,0 +1 @@ +http://www.qrcodeblog.com/qr/0609/060902_qr_kawasaki_st02.jpg \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/5.txt b/core/test/data/blackbox/qrcode2/5.txt new file mode 100644 index 000000000..9a35ecda4 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/5.txt @@ -0,0 +1 @@ +2021200000 \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/5.url b/core/test/data/blackbox/qrcode2/5.url new file mode 100644 index 000000000..540863c89 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/5.url @@ -0,0 +1 @@ +http://mobile.kaywa.com/files/images/2007/4/480/mob181_1175524511.jpg \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/6.txt b/core/test/data/blackbox/qrcode2/6.txt new file mode 100644 index 000000000..87c34b5ee --- /dev/null +++ b/core/test/data/blackbox/qrcode2/6.txt @@ -0,0 +1 @@ +http://d.kaywa.com/20207100 \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/6.url b/core/test/data/blackbox/qrcode2/6.url new file mode 100644 index 000000000..a6ee3dd97 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/6.url @@ -0,0 +1 @@ +http://www.smoothplanet.com/files/images/2007/2/mob281_1170754866.jpg \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/7.txt b/core/test/data/blackbox/qrcode2/7.txt new file mode 100644 index 000000000..b8c822d82 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/7.txt @@ -0,0 +1 @@ +BIZCARD:N:Todd;X:Ogasawara;T:Tech Geek;C:MobileViews.com;A:MobileTown USA;E:editor@mobileviews.com;; \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/7.url b/core/test/data/blackbox/qrcode2/7.url new file mode 100644 index 000000000..2e0923bea --- /dev/null +++ b/core/test/data/blackbox/qrcode2/7.url @@ -0,0 +1 @@ +http://www.mobileviews.com/blog/wp-content/uploads/2006/11/livebarcode.gif \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/8.txt b/core/test/data/blackbox/qrcode2/8.txt new file mode 100644 index 000000000..9e0a7f830 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/8.txt @@ -0,0 +1 @@ +http://staticrooster.com \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/8.url b/core/test/data/blackbox/qrcode2/8.url new file mode 100644 index 000000000..2b2d912f6 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/8.url @@ -0,0 +1 @@ +http://staticrooster.com/tshirts/qr_sm.gif \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/9.txt b/core/test/data/blackbox/qrcode2/9.txt new file mode 100644 index 000000000..292aea1d2 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/9.txt @@ -0,0 +1 @@ +Morden \ No newline at end of file diff --git a/core/test/data/blackbox/qrcode2/9.url b/core/test/data/blackbox/qrcode2/9.url new file mode 100644 index 000000000..a86103718 --- /dev/null +++ b/core/test/data/blackbox/qrcode2/9.url @@ -0,0 +1 @@ +http://www.ihaveanidea.org/blogs/uploads/i/interactive/270.png \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/1.jpg b/core/test/data/blackbox/upc1/1.jpg new file mode 100755 index 000000000..3f9814103 Binary files /dev/null and b/core/test/data/blackbox/upc1/1.jpg differ diff --git a/core/test/data/blackbox/upc1/1.txt b/core/test/data/blackbox/upc1/1.txt new file mode 100644 index 000000000..830421913 --- /dev/null +++ b/core/test/data/blackbox/upc1/1.txt @@ -0,0 +1 @@ +036602301467 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/10.jpg b/core/test/data/blackbox/upc1/10.jpg new file mode 100755 index 000000000..800a83221 Binary files /dev/null and b/core/test/data/blackbox/upc1/10.jpg differ diff --git a/core/test/data/blackbox/upc1/10.txt b/core/test/data/blackbox/upc1/10.txt new file mode 100644 index 000000000..9a6f1d4ca --- /dev/null +++ b/core/test/data/blackbox/upc1/10.txt @@ -0,0 +1 @@ +027011006951 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/11.jpg b/core/test/data/blackbox/upc1/11.jpg new file mode 100755 index 000000000..268782513 Binary files /dev/null and b/core/test/data/blackbox/upc1/11.jpg differ diff --git a/core/test/data/blackbox/upc1/11.txt b/core/test/data/blackbox/upc1/11.txt new file mode 100644 index 000000000..9a6f1d4ca --- /dev/null +++ b/core/test/data/blackbox/upc1/11.txt @@ -0,0 +1 @@ +027011006951 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/12.jpg b/core/test/data/blackbox/upc1/12.jpg new file mode 100755 index 000000000..859f097bc Binary files /dev/null and b/core/test/data/blackbox/upc1/12.jpg differ diff --git a/core/test/data/blackbox/upc1/12.txt b/core/test/data/blackbox/upc1/12.txt new file mode 100644 index 000000000..4ea41b064 --- /dev/null +++ b/core/test/data/blackbox/upc1/12.txt @@ -0,0 +1 @@ +781735802045 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/13.jpg b/core/test/data/blackbox/upc1/13.jpg new file mode 100755 index 000000000..27ea1ff2f Binary files /dev/null and b/core/test/data/blackbox/upc1/13.jpg differ diff --git a/core/test/data/blackbox/upc1/13.txt b/core/test/data/blackbox/upc1/13.txt new file mode 100644 index 000000000..4ea41b064 --- /dev/null +++ b/core/test/data/blackbox/upc1/13.txt @@ -0,0 +1 @@ +781735802045 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/14.jpg b/core/test/data/blackbox/upc1/14.jpg new file mode 100755 index 000000000..4364d3acf Binary files /dev/null and b/core/test/data/blackbox/upc1/14.jpg differ diff --git a/core/test/data/blackbox/upc1/14.txt b/core/test/data/blackbox/upc1/14.txt new file mode 100644 index 000000000..b2327fc2d --- /dev/null +++ b/core/test/data/blackbox/upc1/14.txt @@ -0,0 +1 @@ +9781558604971 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/15.jpg b/core/test/data/blackbox/upc1/15.jpg new file mode 100755 index 000000000..19f658dc5 Binary files /dev/null and b/core/test/data/blackbox/upc1/15.jpg differ diff --git a/core/test/data/blackbox/upc1/15.txt b/core/test/data/blackbox/upc1/15.txt new file mode 100644 index 000000000..b2327fc2d --- /dev/null +++ b/core/test/data/blackbox/upc1/15.txt @@ -0,0 +1 @@ +9781558604971 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/16.jpg b/core/test/data/blackbox/upc1/16.jpg new file mode 100755 index 000000000..1a86184c0 Binary files /dev/null and b/core/test/data/blackbox/upc1/16.jpg differ diff --git a/core/test/data/blackbox/upc1/16.txt b/core/test/data/blackbox/upc1/16.txt new file mode 100644 index 000000000..ec6ea1e7d --- /dev/null +++ b/core/test/data/blackbox/upc1/16.txt @@ -0,0 +1 @@ +456314319671 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/17.jpg b/core/test/data/blackbox/upc1/17.jpg new file mode 100755 index 000000000..107038c35 Binary files /dev/null and b/core/test/data/blackbox/upc1/17.jpg differ diff --git a/core/test/data/blackbox/upc1/17.txt b/core/test/data/blackbox/upc1/17.txt new file mode 100644 index 000000000..99d98e6d4 --- /dev/null +++ b/core/test/data/blackbox/upc1/17.txt @@ -0,0 +1 @@ +434704791429 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/18.jpg b/core/test/data/blackbox/upc1/18.jpg new file mode 100755 index 000000000..037d5b45c Binary files /dev/null and b/core/test/data/blackbox/upc1/18.jpg differ diff --git a/core/test/data/blackbox/upc1/18.txt b/core/test/data/blackbox/upc1/18.txt new file mode 100644 index 000000000..d357ddfa6 --- /dev/null +++ b/core/test/data/blackbox/upc1/18.txt @@ -0,0 +1 @@ +024543136538 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/19.jpg b/core/test/data/blackbox/upc1/19.jpg new file mode 100755 index 000000000..d9a5628b7 Binary files /dev/null and b/core/test/data/blackbox/upc1/19.jpg differ diff --git a/core/test/data/blackbox/upc1/19.txt b/core/test/data/blackbox/upc1/19.txt new file mode 100644 index 000000000..d357ddfa6 --- /dev/null +++ b/core/test/data/blackbox/upc1/19.txt @@ -0,0 +1 @@ +024543136538 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/2.jpg b/core/test/data/blackbox/upc1/2.jpg new file mode 100755 index 000000000..9d47a9209 Binary files /dev/null and b/core/test/data/blackbox/upc1/2.jpg differ diff --git a/core/test/data/blackbox/upc1/2.txt b/core/test/data/blackbox/upc1/2.txt new file mode 100644 index 000000000..830421913 --- /dev/null +++ b/core/test/data/blackbox/upc1/2.txt @@ -0,0 +1 @@ +036602301467 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/20.jpg b/core/test/data/blackbox/upc1/20.jpg new file mode 100755 index 000000000..83b618a85 Binary files /dev/null and b/core/test/data/blackbox/upc1/20.jpg differ diff --git a/core/test/data/blackbox/upc1/20.txt b/core/test/data/blackbox/upc1/20.txt new file mode 100644 index 000000000..ac41ca891 --- /dev/null +++ b/core/test/data/blackbox/upc1/20.txt @@ -0,0 +1 @@ +752919460009 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/21.jpg b/core/test/data/blackbox/upc1/21.jpg new file mode 100755 index 000000000..0c5ba84b2 Binary files /dev/null and b/core/test/data/blackbox/upc1/21.jpg differ diff --git a/core/test/data/blackbox/upc1/21.txt b/core/test/data/blackbox/upc1/21.txt new file mode 100644 index 000000000..ac41ca891 --- /dev/null +++ b/core/test/data/blackbox/upc1/21.txt @@ -0,0 +1 @@ +752919460009 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/3.jpg b/core/test/data/blackbox/upc1/3.jpg new file mode 100755 index 000000000..28eb28390 Binary files /dev/null and b/core/test/data/blackbox/upc1/3.jpg differ diff --git a/core/test/data/blackbox/upc1/3.txt b/core/test/data/blackbox/upc1/3.txt new file mode 100644 index 000000000..e53c211b1 --- /dev/null +++ b/core/test/data/blackbox/upc1/3.txt @@ -0,0 +1 @@ +070097025088 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/4.jpg b/core/test/data/blackbox/upc1/4.jpg new file mode 100755 index 000000000..8631dd0b3 Binary files /dev/null and b/core/test/data/blackbox/upc1/4.jpg differ diff --git a/core/test/data/blackbox/upc1/4.txt b/core/test/data/blackbox/upc1/4.txt new file mode 100644 index 000000000..e53c211b1 --- /dev/null +++ b/core/test/data/blackbox/upc1/4.txt @@ -0,0 +1 @@ +070097025088 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/5.jpg b/core/test/data/blackbox/upc1/5.jpg new file mode 100755 index 000000000..9393eeeec Binary files /dev/null and b/core/test/data/blackbox/upc1/5.jpg differ diff --git a/core/test/data/blackbox/upc1/5.txt b/core/test/data/blackbox/upc1/5.txt new file mode 100644 index 000000000..e53c211b1 --- /dev/null +++ b/core/test/data/blackbox/upc1/5.txt @@ -0,0 +1 @@ +070097025088 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/6.jpg b/core/test/data/blackbox/upc1/6.jpg new file mode 100755 index 000000000..f847065c4 Binary files /dev/null and b/core/test/data/blackbox/upc1/6.jpg differ diff --git a/core/test/data/blackbox/upc1/6.txt b/core/test/data/blackbox/upc1/6.txt new file mode 100644 index 000000000..5dde677c5 --- /dev/null +++ b/core/test/data/blackbox/upc1/6.txt @@ -0,0 +1 @@ +9780393058673 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/7.jpg b/core/test/data/blackbox/upc1/7.jpg new file mode 100755 index 000000000..3cee83d41 Binary files /dev/null and b/core/test/data/blackbox/upc1/7.jpg differ diff --git a/core/test/data/blackbox/upc1/7.txt b/core/test/data/blackbox/upc1/7.txt new file mode 100644 index 000000000..5dde677c5 --- /dev/null +++ b/core/test/data/blackbox/upc1/7.txt @@ -0,0 +1 @@ +9780393058673 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/8.jpg b/core/test/data/blackbox/upc1/8.jpg new file mode 100755 index 000000000..0c53dea3f Binary files /dev/null and b/core/test/data/blackbox/upc1/8.jpg differ diff --git a/core/test/data/blackbox/upc1/8.txt b/core/test/data/blackbox/upc1/8.txt new file mode 100644 index 000000000..37e4df621 --- /dev/null +++ b/core/test/data/blackbox/upc1/8.txt @@ -0,0 +1 @@ +071831007995 \ No newline at end of file diff --git a/core/test/data/blackbox/upc1/9.jpg b/core/test/data/blackbox/upc1/9.jpg new file mode 100755 index 000000000..024d633b9 Binary files /dev/null and b/core/test/data/blackbox/upc1/9.jpg differ diff --git a/core/test/data/blackbox/upc1/9.txt b/core/test/data/blackbox/upc1/9.txt new file mode 100644 index 000000000..37e4df621 --- /dev/null +++ b/core/test/data/blackbox/upc1/9.txt @@ -0,0 +1 @@ +071831007995 \ No newline at end of file diff --git a/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java b/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java new file mode 100644 index 000000000..114a9e8e2 --- /dev/null +++ b/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java @@ -0,0 +1,118 @@ +/* + * Copyright 2008 Google Inc. + * + * 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 com.google.zxing.MonochromeBitmapSource; +import com.google.zxing.Reader; +import com.google.zxing.ReaderException; +import com.google.zxing.Result; +import com.google.zxing.client.j2se.BufferedImageMonochromeBitmapSource; +import junit.framework.TestCase; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileInputStream; +import java.io.FilenameFilter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.URL; + +/** + * @author srowen@google.com (Sean Owen) + */ +public abstract class AbstractBlackBoxTestCase extends TestCase { + + private static final FilenameFilter IMAGE_NAME_FILTER = new FilenameFilter() { + public boolean accept(File dir, String name) { + String lowerCase = name.toLowerCase(); + return + lowerCase.endsWith(".jpg") || lowerCase.endsWith(".jpeg") || + lowerCase.endsWith(".gif") || lowerCase.endsWith(".png") || + lowerCase.endsWith(".url"); + } + }; + + private final File testBase; + private final Reader barcodeReader; + private final double passPercent; + + protected AbstractBlackBoxTestCase(File testBase, Reader barcodeReader, double passPercent) { + this.testBase = testBase; + this.barcodeReader = barcodeReader; + this.passPercent = passPercent; + } + + public void testBlackBox() throws IOException { + + assertTrue("Please run from the 'core' directory", testBase.exists()); + + File[] imageFiles = testBase.listFiles(IMAGE_NAME_FILTER); + int passedCount = 0; + for (File testImage : imageFiles) { + System.out.println("Starting " + testImage.getAbsolutePath()); + + BufferedImage image; + if (testImage.getName().endsWith(".url")) { + String urlString = readFileAsString(testImage); + image = ImageIO.read(new URL(urlString)); + } else { + image = ImageIO.read(testImage); + } + MonochromeBitmapSource source = new BufferedImageMonochromeBitmapSource(image); + Result result; + try { + result = barcodeReader.decode(source); + } catch (ReaderException re) { + System.out.println(re); + continue; + } + + String testImageFileName = testImage.getName(); + File expectedTextFile = + new File(testBase, testImageFileName.substring(0, testImageFileName.indexOf('.')) + ".txt"); + String expectedText = readFileAsString(expectedTextFile); + String resultText = result.getText(); + + if (expectedText.equals(resultText)) { + passedCount++; + } else { + System.out.println("Mismatch: expected '" + expectedText + "' but got '" + resultText + '\''); + } + + } + + System.out.println(passedCount + " of " + imageFiles.length + " images passed"); + assertTrue("Too many images failed", passedCount >= (int) (imageFiles.length * passPercent)); + } + + private static String readFileAsString(File file) throws IOException { + StringBuilder result = new StringBuilder(); + InputStreamReader reader = new InputStreamReader(new FileInputStream(file), "UTF-8"); + char[] buffer = new char[512]; + try { + int charsRead; + while ((charsRead = reader.read(buffer)) > 0) { + result.append(buffer, 0, charsRead); + } + } finally { + reader.close(); + } + return result.toString(); + } + +} \ No newline at end of file diff --git a/core/test/src/com/google/zxing/qrcode/QRCodeReaderBlackBoxTestCase.java b/core/test/src/com/google/zxing/qrcode/QRCodeReaderBlackBoxTestCase.java new file mode 100644 index 000000000..3c005b313 --- /dev/null +++ b/core/test/src/com/google/zxing/qrcode/QRCodeReaderBlackBoxTestCase.java @@ -0,0 +1,32 @@ +/* + * Copyright 2008 Google Inc. + * + * 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.qrcode; + +import com.google.zxing.common.AbstractBlackBoxTestCase; + +import java.io.File; + +/** + * @author srowen@google.com (Sean Owen) + */ +public final class QRCodeReaderBlackBoxTestCase extends AbstractBlackBoxTestCase { + + public QRCodeReaderBlackBoxTestCase() { + super(new File("test/data/blackbox/qrcode1"), new QRCodeReader(), 0.5); + } + +} \ No newline at end of file diff --git a/core/test/src/com/google/zxing/qrcode/QRCodeReaderExternalTestCase.java b/core/test/src/com/google/zxing/qrcode/QRCodeReaderExternalTestCase.java new file mode 100644 index 000000000..8244a81ab --- /dev/null +++ b/core/test/src/com/google/zxing/qrcode/QRCodeReaderExternalTestCase.java @@ -0,0 +1,32 @@ +/* + * Copyright 2008 Google Inc. + * + * 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.qrcode; + +import com.google.zxing.common.AbstractBlackBoxTestCase; + +import java.io.File; + +/** + * @author srowen@google.com (Sean Owen) + */ +public final class QRCodeReaderExternalTestCase extends AbstractBlackBoxTestCase { + + public QRCodeReaderExternalTestCase() { + super(new File("test/data/blackbox/qrcode2"), new QRCodeReader(), 1.0); + } + +} \ No newline at end of file diff --git a/core/test/src/com/google/zxing/upc/UPCReaderBlackBoxTestCase.java b/core/test/src/com/google/zxing/upc/UPCReaderBlackBoxTestCase.java new file mode 100644 index 000000000..c1508498f --- /dev/null +++ b/core/test/src/com/google/zxing/upc/UPCReaderBlackBoxTestCase.java @@ -0,0 +1,32 @@ +/* + * Copyright 2008 Google Inc. + * + * 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.upc; + +import com.google.zxing.common.AbstractBlackBoxTestCase; + +import java.io.File; + +/** + * @author srowen@google.com (Sean Owen) + */ +public final class UPCReaderBlackBoxTestCase extends AbstractBlackBoxTestCase { + + public UPCReaderBlackBoxTestCase() { + super(new File("test/data/blackbox/upc1"), new UPCReader(), 0.5); + } + +} \ No newline at end of file