move verbose-tests? out of private, change decode-test word to set the verbose mode itself, use images.pam in images test vocabs
parent
7d005111a4
commit
cfdaaec068
|
@ -1,10 +1,8 @@
|
||||||
! Copyright (C) 2009 Doug Coleman.
|
! Copyright (C) 2009 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: images.png images.testing namespaces tools.test
|
USING: images.png images.testing namespaces tools.test
|
||||||
tools.test.private ;
|
images.pam ;
|
||||||
IN: images.png.tests
|
IN: images.png.tests
|
||||||
|
|
||||||
verbose-tests? off
|
|
||||||
"vocab:images/testing/png/rgb.png" decode-test
|
"vocab:images/testing/png/rgb.png" decode-test
|
||||||
"vocab:images/testing/png/yin_yang.png" decode-test
|
"vocab:images/testing/png/yin_yang.png" decode-test
|
||||||
verbose-tests? on
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2009 Keith Lazuka.
|
! Copyright (C) 2009 Keith Lazuka.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: fry images.loader io io.encodings.binary io.files
|
USING: fry images.loader io io.encodings.binary io.files
|
||||||
io.pathnames io.streams.byte-array kernel locals quotations
|
io.pathnames io.streams.byte-array kernel locals namespaces
|
||||||
sequences tools.test ;
|
quotations sequences tools.test ;
|
||||||
IN: images.testing
|
IN: images.testing
|
||||||
|
|
||||||
:: encode-test ( path image-class -- )
|
:: encode-test ( path image-class -- )
|
||||||
|
@ -26,6 +26,8 @@ IN: images.testing
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
: decode-test ( path -- )
|
: decode-test ( path -- )
|
||||||
[ load-image 1quotation ]
|
f verbose-tests? [
|
||||||
[ '[ _ pam-name load-image ] ] bi
|
[ load-image 1quotation ]
|
||||||
unit-test ;
|
[ '[ _ pam-name load-image ] ] bi
|
||||||
|
unit-test
|
||||||
|
] with-variable ;
|
||||||
|
|
|
@ -2,14 +2,12 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors images.testing images.tiff images.viewer io
|
USING: accessors images.testing images.tiff images.viewer io
|
||||||
io.encodings.binary io.files namespaces sequences tools.test
|
io.encodings.binary io.files namespaces sequences tools.test
|
||||||
tools.test.private ;
|
images.pam ;
|
||||||
IN: images.tiff.tests
|
IN: images.tiff.tests
|
||||||
|
|
||||||
verbose-tests? off
|
|
||||||
"vocab:images/testing/tiff/octagon.tiff" decode-test
|
"vocab:images/testing/tiff/octagon.tiff" decode-test
|
||||||
"vocab:images/testing/tiff/elephants.tiff" decode-test
|
"vocab:images/testing/tiff/elephants.tiff" decode-test
|
||||||
"vocab:images/testing/tiff/noise.tiff" decode-test
|
"vocab:images/testing/tiff/noise.tiff" decode-test
|
||||||
"vocab:images/testing/tiff/alpha.tiff" decode-test
|
"vocab:images/testing/tiff/alpha.tiff" decode-test
|
||||||
"vocab:images/testing/tiff/color_spectrum.tiff" decode-test
|
"vocab:images/testing/tiff/color_spectrum.tiff" decode-test
|
||||||
! "vocab:images/testing/tiff/rgb.tiff" decode-test
|
! "vocab:images/testing/tiff/rgb.tiff" decode-test
|
||||||
verbose-tests? on
|
|
||||||
|
|
|
@ -27,6 +27,9 @@ T{ error-type
|
||||||
{ quot [ test-failures get ] }
|
{ quot [ test-failures get ] }
|
||||||
} define-error-type
|
} define-error-type
|
||||||
|
|
||||||
|
SYMBOL: verbose-tests?
|
||||||
|
t verbose-tests? set-global
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: <test-failure> ( error experiment file line# -- triple )
|
: <test-failure> ( error experiment file line# -- triple )
|
||||||
|
@ -79,9 +82,6 @@ MACRO: <experiment> ( word -- )
|
||||||
[ name>> experiment-title ] bi
|
[ name>> experiment-title ] bi
|
||||||
'[ _ ndup _ narray _ prefix ] ;
|
'[ _ ndup _ narray _ prefix ] ;
|
||||||
|
|
||||||
SYMBOL: verbose-tests?
|
|
||||||
t verbose-tests? set-global
|
|
||||||
|
|
||||||
: experiment. ( seq -- )
|
: experiment. ( seq -- )
|
||||||
[ first write ": " write ]
|
[ first write ": " write ]
|
||||||
[ rest verbose-tests? get [ . ] [ short. ] if flush ] bi ;
|
[ rest verbose-tests? get [ . ] [ short. ] if flush ] bi ;
|
||||||
|
|
Loading…
Reference in New Issue