356
|
1 |
"{ Package: 'exept:regression' }"
|
|
2 |
|
|
3 |
"{ NameSpace: RegressionTests }"
|
|
4 |
|
|
5 |
TestCase subclass:#ImageReaderTest
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'tests-Regression'
|
|
10 |
!
|
|
11 |
|
|
12 |
!ImageReaderTest class methodsFor:'documentation'!
|
|
13 |
|
|
14 |
documentation
|
|
15 |
"
|
|
16 |
documentation to be added.
|
|
17 |
|
|
18 |
[author:]
|
|
19 |
cg (cg@AQUA-DUO)
|
|
20 |
|
|
21 |
[instance variables:]
|
|
22 |
|
|
23 |
[class variables:]
|
|
24 |
|
|
25 |
[see also:]
|
|
26 |
|
|
27 |
"
|
|
28 |
! !
|
|
29 |
|
|
30 |
!ImageReaderTest methodsFor:'tests'!
|
|
31 |
|
|
32 |
test01
|
|
33 |
|img|
|
|
34 |
|
|
35 |
img := Image fromFile:(self class packageDirectory construct:'testData/test1.bmp').
|
357
|
36 |
self assert:(img notNil).
|
|
37 |
"/ img inspect.
|
356
|
38 |
|
357
|
39 |
self assert:((img colorAtX:0 y:0) rgbValue = 16r4040FF).
|
|
40 |
self assert:((img colorAtX:0 y:63) rgbValue = 16r4040FF).
|
|
41 |
self assert:((img colorAtX:0 y:18) rgbValue = 16r40FF40).
|
356
|
42 |
|
|
43 |
"
|
|
44 |
self run:#test01
|
|
45 |
self new test01
|
|
46 |
"
|
357
|
47 |
!
|
|
48 |
|
|
49 |
test02
|
|
50 |
|img|
|
|
51 |
|
|
52 |
img := Image fromFile:(self class packageDirectory construct:'testData/test4.bmp').
|
|
53 |
self assert:(img notNil).
|
|
54 |
"/ img inspect.
|
|
55 |
|
|
56 |
"
|
|
57 |
self run:#test02
|
|
58 |
self new test02
|
|
59 |
"
|
|
60 |
!
|
|
61 |
|
|
62 |
test03
|
|
63 |
|img|
|
|
64 |
|
|
65 |
img := Image fromFile:(self class packageDirectory construct:'testData/test8.bmp').
|
|
66 |
self assert:(img notNil).
|
|
67 |
"/ img inspect
|
|
68 |
|
|
69 |
"
|
|
70 |
self run:#test03
|
|
71 |
self new test03
|
|
72 |
"
|
|
73 |
!
|
|
74 |
|
|
75 |
test04
|
|
76 |
|img|
|
|
77 |
|
|
78 |
img := Image fromFile:(self class packageDirectory construct:'testData/testcompress4.bmp').
|
|
79 |
self assert:(img notNil).
|
|
80 |
"/ img inspect.
|
|
81 |
|
|
82 |
"
|
|
83 |
self run:#test04
|
|
84 |
self new test04
|
|
85 |
"
|
|
86 |
!
|
|
87 |
|
|
88 |
test05
|
|
89 |
|img|
|
|
90 |
|
|
91 |
img := Image fromFile:(self class packageDirectory construct:'testData/testcompress8.bmp').
|
|
92 |
self assert:(img notNil).
|
|
93 |
"/ img inspect.
|
|
94 |
|
|
95 |
"
|
|
96 |
self run:#test05
|
|
97 |
self new test05
|
|
98 |
"
|
|
99 |
!
|
|
100 |
|
|
101 |
test06
|
|
102 |
|img|
|
|
103 |
|
|
104 |
img := Image fromFile:(self class packageDirectory construct:'testData/test8os2.bmp').
|
|
105 |
self assert:(img notNil).
|
|
106 |
"/ img inspect.
|
|
107 |
|
|
108 |
"
|
|
109 |
self run:#test06
|
|
110 |
self new test06
|
|
111 |
"
|
|
112 |
!
|
|
113 |
|
|
114 |
test07
|
|
115 |
|img|
|
|
116 |
|
|
117 |
img := Image fromFile:(self class packageDirectory construct:'testData/test4os2v2.bmp').
|
|
118 |
self assert:(img notNil).
|
|
119 |
"/ img inspect.
|
|
120 |
|
|
121 |
"
|
|
122 |
self run:#test07
|
|
123 |
self new test07
|
|
124 |
"
|
|
125 |
!
|
|
126 |
|
|
127 |
test08
|
|
128 |
|img|
|
|
129 |
|
|
130 |
img := Image fromFile:(self class packageDirectory construct:'testData/test16.bmp').
|
|
131 |
self assert:(img notNil).
|
|
132 |
"/ img inspect.
|
|
133 |
|
|
134 |
"
|
|
135 |
self run:#test08
|
|
136 |
self new test08
|
|
137 |
"
|
|
138 |
!
|
|
139 |
|
|
140 |
test09
|
|
141 |
|img|
|
|
142 |
|
|
143 |
img := Image fromFile:(self class packageDirectory construct:'testData/test24.bmp').
|
|
144 |
self assert:(img notNil).
|
|
145 |
"/ img inspect.
|
|
146 |
|
|
147 |
"
|
|
148 |
self run:#test09
|
|
149 |
self new test09
|
|
150 |
"
|
|
151 |
!
|
|
152 |
|
|
153 |
test10
|
|
154 |
|img|
|
|
155 |
|
|
156 |
img := Image fromFile:(self class packageDirectory construct:'testData/test32.bmp').
|
|
157 |
self assert:(img notNil).
|
|
158 |
"/ img inspect.
|
|
159 |
|
|
160 |
"
|
|
161 |
self run:#test10
|
|
162 |
self new test10
|
|
163 |
"
|
356
|
164 |
! !
|
|
165 |
|
|
166 |
!ImageReaderTest class methodsFor:'documentation'!
|
|
167 |
|
|
168 |
version
|
|
169 |
^ '$Header$'
|
|
170 |
! !
|