]> gitweb.factorcode.org Git - factor.git/blob - basis/images/images-tests.factor
Fixes #2966
[factor.git] / basis / images / images-tests.factor
1 ! Copyright (C) 2009 Daniel Ehrenberg.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: images tools.test kernel accessors ;
4 IN: images.tests
5
6 { B{ 57 57 57 255 } } [ 1 1 T{ image f { 2 3 } RGBA ubyte-components f f B{
7     0 0 0 0
8     0 0 0 0
9     0 0 0 0
10     57 57 57 255
11     0 0 0 0
12     0 0 0 0
13 } } pixel-at ] unit-test
14
15 { B{
16     0 0 0 0
17     0 0 0 0
18     0 0 0 0
19     57 57 57 255
20     0 0 0 0
21     0 0 0 0
22 } } [ B{ 57 57 57 255 } 1 1 T{ image f { 2 3 } RGBA ubyte-components f f B{
23     0 0 0 0
24     0 0 0 0
25     0 0 0 0
26     0 0 0 0
27     0 0 0 0
28     0 0 0 0
29 } } [ set-pixel-at ] keep bitmap>> ] unit-test
30
31 { 40 30 } [
32     T{ image f { 10 3 } RGBA ubyte-components f f } rowstride
33     T{ image f { 10 3 } RGB ubyte-components f f } rowstride
34 ] unit-test