1 | make -f ./Makefile.linux CONFIG= check |
---|
2 | make[1]: Entering directory `/home/mario/src/chicken-safer-scheduler' |
---|
3 | cd tests; sh runtests.sh |
---|
4 | copying required files to test-repository ... |
---|
5 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/setup-api.so test-repository |
---|
6 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/setup-api.import.so test-repository |
---|
7 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/setup-download.so test-repository |
---|
8 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/setup-download.import.so test-repository |
---|
9 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/chicken.import.so test-repository |
---|
10 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/lolevel.import.so test-repository |
---|
11 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/srfi-1.import.so test-repository |
---|
12 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/srfi-4.import.so test-repository |
---|
13 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/data-structures.import.so test-repository |
---|
14 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/ports.import.so test-repository |
---|
15 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/files.import.so test-repository |
---|
16 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/posix.import.so test-repository |
---|
17 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/srfi-13.import.so test-repository |
---|
18 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/srfi-69.import.so test-repository |
---|
19 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/extras.import.so test-repository |
---|
20 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/regex.import.so test-repository |
---|
21 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/srfi-14.import.so test-repository |
---|
22 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/tcp.import.so test-repository |
---|
23 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/foreign.import.so test-repository |
---|
24 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/scheme.import.so test-repository |
---|
25 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/srfi-18.import.so test-repository |
---|
26 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/utils.import.so test-repository |
---|
27 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/csi.import.so test-repository |
---|
28 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/irregex.import.so test-repository |
---|
29 | cp -r /home/mario/chicken-safer-scheduler/lib/chicken/5/types.db test-repository |
---|
30 | ======================================== compiler tests ... |
---|
31 | ../chicken compiler-tests.scm -output-file a.c -include-path .. |
---|
32 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
33 | rm a.c |
---|
34 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
35 | rm a.o |
---|
36 | 12 |
---|
37 | 12 |
---|
38 | 12 |
---|
39 | 12 |
---|
40 | 12 |
---|
41 | 1 2 3 |
---|
42 | 1 2 3 :1:2:3 |
---|
43 | 1 2 3 |
---|
44 | Good, unrepresentable C strings cause errors |
---|
45 | ======================================== compiler tests (lambda-lift) ... |
---|
46 | ../chicken compiler-tests-2.scm -output-file a.c -include-path .. -lambda-lift |
---|
47 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
48 | rm a.c |
---|
49 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
50 | rm a.o |
---|
51 | ======================================== compiler tests (unboxing) ... |
---|
52 | ../chicken compiler-tests-3.scm -output-file a.c -include-path .. -unsafe -unboxing |
---|
53 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
54 | rm a.c |
---|
55 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
56 | rm a.o |
---|
57 | ======================================== compiler inlining tests ... |
---|
58 | ../chicken inlining-tests.scm -output-file a.c -include-path .. -optimize-level 3 |
---|
59 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
60 | rm a.c |
---|
61 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
62 | rm a.o |
---|
63 | ======================================== scrutiny tests ... |
---|
64 | ../chicken scrutiny-tests.scm -output-file a.c -include-path .. -scrutinize -analyze-only -ignore-repository -types ../types.db |
---|
65 | ======================================== callback tests ... |
---|
66 | ../chicken callback-tests.scm -output-file a.c -include-path .. |
---|
67 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
68 | rm a.c |
---|
69 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
70 | rm a.o |
---|
71 | callbacks ... |
---|
72 | hi! |
---|
73 | callbacks ... |
---|
74 | hi! |
---|
75 | hi! |
---|
76 | [panic] callback returned twice - execution terminated |
---|
77 | |
---|
78 | callback-tests.scm:16: print |
---|
79 | ##sys#gc |
---|
80 | g1112 |
---|
81 | callback-tests.scm:7: call/cc |
---|
82 | callback-tests.scm:9: print |
---|
83 | callback-tests.scm:19: command-line-arguments |
---|
84 | callback-tests.scm:20: k1 |
---|
85 | callback-tests.scm:9: print <-- |
---|
86 | double-return from callback failed as it should. |
---|
87 | ======================================== runtime tests ... |
---|
88 | many arguments supported. |
---|
89 | ../chicken test-gc-hooks.scm -output-file a.c -include-path .. |
---|
90 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
91 | rm a.c |
---|
92 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
93 | rm a.o |
---|
94 | major gc ... |
---|
95 | >>>>> GC pre hook - mode=0, count=0 |
---|
96 | [GC] level 1 gcs(minor) 3 gcs(major) 1 |
---|
97 | [GC] stack 0xbfb39258 0xbfb553cc 0xbfb59258 |
---|
98 | [GC] from 0x4806f008 0x480835ec 0x480ac098 0x000145e4 |
---|
99 | [GC] to 0x48031008 0x48031008 0x4806e098 |
---|
100 | [GC] 0 locatives (from 32) |
---|
101 | <<<<< GC post hook - mode=1, count=0, ms=4 |
---|
102 | minor gc ... |
---|
103 | >>>>> GC pre hook - mode=0, count=0 |
---|
104 | <<<<< GC post hook - mode=0, count=0, ms=0 |
---|
105 | alloc ... |
---|
106 | >>>>> GC pre hook - mode=0, count=0 |
---|
107 | [GC] level 1 gcs(minor) 1 gcs(major) 2 |
---|
108 | [GC] stack 0xbfb39258 0xbfb58788 0xbfb59258 |
---|
109 | [GC] from 0x48031008 0x480455ec 0x4806e098 0x000145e4 |
---|
110 | [GC] to 0x4806f008 0x4806f008 0x480ac098 |
---|
111 | [GC] 0 locatives (from 32) |
---|
112 | <<<<< GC post hook - mode=1, count=0, ms=4 |
---|
113 | >>>>> GC pre hook - mode=2, count=0 |
---|
114 | [GC] (old) fromspace: start=0x48031008, limit=0x4806e098 |
---|
115 | [GC] (old) tospace: start=0x4806f008, limit=0x480ac098 |
---|
116 | [GC] resized heap to 11000004 bytes |
---|
117 | [GC] (new) fromspace: start=0x480ad008, limit=0x485ebc6a |
---|
118 | [GC] (new) tospace: start=0x485ec008, limit=0x48b2ac6a |
---|
119 | <<<<< GC post hook - mode=2, count=0, ms=0 |
---|
120 | >>>>> GC pre hook - mode=2, count=0 |
---|
121 | [GC] (old) fromspace: start=0x480ad008, limit=0x485ebc6a |
---|
122 | [GC] (old) tospace: start=0x485ec008, limit=0x48b2ac6a |
---|
123 | [GC] resized heap to 32000012 bytes |
---|
124 | [GC] (new) fromspace: start=0x48b2b008, limit=0x49a6d40e |
---|
125 | [GC] (new) tospace: start=0x49a6e008, limit=0x4a9b040e |
---|
126 | <<<<< GC post hook - mode=2, count=0, ms=0 |
---|
127 | resize ... |
---|
128 | >>>>> GC pre hook - mode=2, count=0 |
---|
129 | [GC] (old) fromspace: start=0x48b2b008, limit=0x49a6d40e |
---|
130 | [GC] (old) tospace: start=0x49a6e008, limit=0x4a9b040e |
---|
131 | [GC] resized heap to 64000024 bytes |
---|
132 | [GC] (new) fromspace: start=0x4a9b1008, limit=0x4c835814 |
---|
133 | [GC] (new) tospace: start=0x48031008, limit=0x49eb5814 |
---|
134 | <<<<< GC post hook - mode=2, count=0, ms=0 |
---|
135 | major gc ... |
---|
136 | >>>>> GC pre hook - mode=0, count=0 |
---|
137 | >>>>> GC pre hook - mode=2, count=1 |
---|
138 | [GC] (old) fromspace: start=0x4a9b1008, limit=0x4c835814 |
---|
139 | [GC] (old) tospace: start=0x48031008, limit=0x49eb5814 |
---|
140 | [GC] resized heap to 32000012 bytes |
---|
141 | [GC] (new) fromspace: start=0x4c836008, limit=0x4d77840e |
---|
142 | [GC] (new) tospace: start=0x48031008, limit=0x48f7340e |
---|
143 | <<<<< GC post hook - mode=2, count=1, ms=0 |
---|
144 | [GC] level 1 gcs(minor) 0 gcs(major) 3 |
---|
145 | [GC] stack 0xbfb39258 0xbfb57dac 0xbfb59258 |
---|
146 | [GC] from 0x4c836008 0x4c84a5ec 0x4d77840e 0x000145e4 |
---|
147 | [GC] to 0x48031008 0x48031008 0x48f7340e |
---|
148 | [GC] 0 locatives (from 32) |
---|
149 | <<<<< GC post hook - mode=1, count=0, ms=8 |
---|
150 | minor gc ... |
---|
151 | >>>>> GC pre hook - mode=0, count=0 |
---|
152 | <<<<< GC post hook - mode=0, count=0, ms=0 |
---|
153 | >>>>> GC pre hook - mode=0, count=0 |
---|
154 | >>>>> GC pre hook - mode=2, count=1 |
---|
155 | [GC] (old) fromspace: start=0x4c836008, limit=0x4d77840e |
---|
156 | [GC] (old) tospace: start=0x48031008, limit=0x48f7340e |
---|
157 | [GC] resized heap to 16000006 bytes |
---|
158 | [GC] (new) fromspace: start=0x48f74008, limit=0x4971520b |
---|
159 | [GC] (new) tospace: start=0x48031008, limit=0x487d220b |
---|
160 | <<<<< GC post hook - mode=2, count=1, ms=0 |
---|
161 | [GC] level 1 gcs(minor) 1 gcs(major) 4 |
---|
162 | [GC] stack 0xbfb39258 0xbfb58df8 0xbfb59258 |
---|
163 | [GC] from 0x48f74008 0x48f88610 0x4971520b 0x00014608 |
---|
164 | [GC] to 0x48031008 0x48031008 0x487d220b |
---|
165 | [GC] 0 locatives (from 32) |
---|
166 | <<<<< GC post hook - mode=1, count=0, ms=12 |
---|
167 | ======================================== library tests ... |
---|
168 | ../chicken records-and-setters-test.scm -output-file a.c -include-path .. |
---|
169 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
170 | rm a.c |
---|
171 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
172 | rm a.o |
---|
173 | ======================================== dynamic-wind tests ... |
---|
174 | ../chicken dwindtst.scm -output-file a.c -include-path .. |
---|
175 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
176 | rm a.c |
---|
177 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
178 | rm a.o |
---|
179 | *** Skipping "feeley-dynwind" for now *** |
---|
180 | ======================================== syntax tests ... |
---|
181 | 3 |
---|
182 | 100 |
---|
183 | (M1: (m1 n)) |
---|
184 | 3628800 |
---|
185 | 34 |
---|
186 | 45 |
---|
187 | now |
---|
188 | outer |
---|
189 | 7 |
---|
190 | "baz" |
---|
191 | "no baz" |
---|
192 | "no baz" |
---|
193 | ok |
---|
194 | (3 4) |
---|
195 | (... 1 2 3) |
---|
196 | 3 |
---|
197 | (99) |
---|
198 | 7 |
---|
199 | (1 2 3) |
---|
200 | 10 9 8 7 6 5 4 3 2 1 |
---|
201 | 10 9 8 7 6 5 4 3 2 1 |
---|
202 | 1 2 3 4 5 6 7 8 9 10 |
---|
203 | 3 |
---|
204 | ok |
---|
205 | caught |
---|
206 | (99) |
---|
207 | 1 |
---|
208 | ======================================== syntax tests (compiled) ... |
---|
209 | ../chicken syntax-tests.scm -output-file a.c -include-path .. |
---|
210 | |
---|
211 | Warning: redefinition of extended binding: setter |
---|
212 | (M1: (m1 n)) |
---|
213 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
214 | rm a.c |
---|
215 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
216 | rm a.o |
---|
217 | 3 |
---|
218 | 100 |
---|
219 | 3628800 |
---|
220 | 34 |
---|
221 | 45 |
---|
222 | now |
---|
223 | outer |
---|
224 | 7 |
---|
225 | "baz" |
---|
226 | "no baz" |
---|
227 | "no baz" |
---|
228 | ok |
---|
229 | (3 4) |
---|
230 | (... 1 2 3) |
---|
231 | 3 |
---|
232 | (99) |
---|
233 | 7 |
---|
234 | (1 2 3) |
---|
235 | 10 9 8 7 6 5 4 3 2 1 |
---|
236 | 10 9 8 7 6 5 4 3 2 1 |
---|
237 | 1 2 3 4 5 6 7 8 9 10 |
---|
238 | 3 |
---|
239 | ok |
---|
240 | caught |
---|
241 | (99) |
---|
242 | 1 |
---|
243 | ======================================== syntax tests (2, compiled) ... |
---|
244 | ../chicken syntax-tests-2.scm -output-file a.c -include-path .. |
---|
245 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
246 | rm a.c |
---|
247 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
248 | rm a.o |
---|
249 | ======================================== reexport tests ... |
---|
250 | |
---|
251 | Warning: reference to possibly unbound identifier: values |
---|
252 | 7 |
---|
253 | "abc-def-ghi" |
---|
254 | ../chicken reexport-tests.scm -output-file a.c -include-path .. |
---|
255 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
256 | rm a.c |
---|
257 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
258 | rm a.o |
---|
259 | 7 |
---|
260 | "abc-def-ghi" |
---|
261 | ../chicken reexport-m1.scm -output-file reexport-m1.c -dynamic -feature chicken-compile-shared -include-path .. -emit-all-import-libraries |
---|
262 | gcc reexport-m1.c -o reexport-m1.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
263 | rm reexport-m1.c |
---|
264 | gcc reexport-m1.o -o reexport-m1.so -shared -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
265 | rm reexport-m1.o |
---|
266 | ../chicken reexport-m1.import.scm -output-file reexport-m1.import.c -dynamic -feature chicken-compile-shared -include-path .. |
---|
267 | gcc reexport-m1.import.c -o reexport-m1.import.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
268 | rm reexport-m1.import.c |
---|
269 | gcc reexport-m1.import.o -o reexport-m1.import.so -shared -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
270 | rm reexport-m1.import.o |
---|
271 | (1 2 . 3) |
---|
272 | ../chicken reexport-m2.scm -output-file a.c -include-path .. |
---|
273 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
274 | rm a.c |
---|
275 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
276 | rm a.o |
---|
277 | (1 2 . 3) |
---|
278 | ======================================== compiler syntax tests ... |
---|
279 | ../chicken compiler-syntax-tests.scm -output-file a.c -include-path .. |
---|
280 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
281 | rm a.c |
---|
282 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
283 | rm a.o |
---|
284 | 9 |
---|
285 | 7 |
---|
286 | (cs-goo 2) |
---|
287 | zzz |
---|
288 | ======================================== import tests ... |
---|
289 | |
---|
290 | Warning: reference to possibly unbound identifier: s8vector? |
---|
291 | ======================================== import library tests ... |
---|
292 | ../chicken import-library-test1.scm -output-file a.c -include-path .. -emit-import-library foo |
---|
293 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
294 | rm a.c |
---|
295 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
296 | rm a.o |
---|
297 | ../chicken foo.import.scm -output-file foo.import.c -dynamic -feature chicken-compile-shared -include-path .. |
---|
298 | gcc foo.import.c -o foo.import.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
299 | rm foo.import.c |
---|
300 | gcc foo.import.o -o foo.import.so -shared -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
301 | rm foo.import.o |
---|
302 | ../chicken import-library-test2.scm -output-file a.c -include-path .. |
---|
303 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
304 | rm a.c |
---|
305 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
306 | rm a.o |
---|
307 | ======================================== syntax tests (matchable) ... |
---|
308 | (PASS) any |
---|
309 | (PASS) symbol |
---|
310 | (PASS) number |
---|
311 | (PASS) string |
---|
312 | (PASS) literal symbol |
---|
313 | (PASS) null |
---|
314 | (PASS) pair |
---|
315 | (PASS) vector |
---|
316 | (PASS) any doubled |
---|
317 | (PASS) and empty |
---|
318 | (PASS) and single |
---|
319 | (PASS) and double |
---|
320 | (PASS) or empty |
---|
321 | (PASS) or single |
---|
322 | (PASS) or double |
---|
323 | (PASS) not |
---|
324 | (PASS) pred |
---|
325 | (PASS) named pred |
---|
326 | (PASS) duplicate symbols pass |
---|
327 | (PASS) duplicate symbols fail |
---|
328 | (PASS) duplicate symbols samth |
---|
329 | (PASS) ellipses |
---|
330 | (PASS) real ellipses |
---|
331 | (PASS) vector ellipses |
---|
332 | (PASS) pred ellipses |
---|
333 | (PASS) failure continuation |
---|
334 | (PASS) let |
---|
335 | (PASS) let* |
---|
336 | (PASS) getter car |
---|
337 | (PASS) getter cdr |
---|
338 | (PASS) getter vector |
---|
339 | (PASS) setter car |
---|
340 | (PASS) setter cdr |
---|
341 | (PASS) setter vector |
---|
342 | (PASS) single tail |
---|
343 | (PASS) single tail 2 |
---|
344 | (PASS) multiple tail |
---|
345 | (PASS) Riastradh quasiquote |
---|
346 | 38 tests completed in 1.677 seconds |
---|
347 | 38 (100.00%) tests passed |
---|
348 | 0 (0.00%) tests failed |
---|
349 | ======================================== syntax tests (loopy-loop) ... |
---|
350 | (PASS) stepping |
---|
351 | (PASS) basic in-list |
---|
352 | (PASS) in-list with result |
---|
353 | (PASS) in-list with collecting |
---|
354 | (PASS) uneven length in-list's |
---|
355 | (PASS) in-lists |
---|
356 | (PASS) flatten (recursion test) |
---|
357 | (PASS) in-string |
---|
358 | (PASS) in-string with start |
---|
359 | (PASS) in-string with start and end |
---|
360 | (PASS) in-string with start, end and step |
---|
361 | (PASS) in-string-reverse |
---|
362 | (PASS) in-vector |
---|
363 | (PASS) in-permutations |
---|
364 | (PASS) in-permutations with length |
---|
365 | (PASS) in-combinations |
---|
366 | (PASS) in-hash-table |
---|
367 | 17 tests completed in 5.524 seconds |
---|
368 | 17 (100.00%) tests passed |
---|
369 | 0 (0.00%) tests failed |
---|
370 | ======================================== r4rstest ... |
---|
371 | (expect mult-float-print-test to fail) |
---|
372 | ======================================== syntax tests (r5rs_pitfalls) ... |
---|
373 | (expect two failures) |
---|
374 | Failure: 1.1, expected '0', got '1'. |
---|
375 | Failure: 1.2, expected '#t', got '#f'. |
---|
376 | Passed: 1.3 |
---|
377 | Passed: 2.1 |
---|
378 | Passed: 3.1 |
---|
379 | Passed: 3.2 |
---|
380 | Passed: 3.3 |
---|
381 | Passed: 3.4 |
---|
382 | Passed: 4.1 |
---|
383 | Passed: 4.2 |
---|
384 | Passed: 4.3 |
---|
385 | Passed: 5.1 |
---|
386 | Passed: 5.2 |
---|
387 | Passed: 5.3 |
---|
388 | Passed: 6.1 |
---|
389 | Passed: 7.1 |
---|
390 | Passed: 7.2 |
---|
391 | Passed: 7.3 |
---|
392 | Passed: 7.4 |
---|
393 | Passed: 8.1 |
---|
394 | Passed: 8.2 |
---|
395 | Passed: 8.3 |
---|
396 | Map is not call/cc safe, but probably tail recursive and efficient. |
---|
397 | ======================================== module tests ... |
---|
398 | (PASS) internal/variable |
---|
399 | (PASS) external/unimported variable (fail) |
---|
400 | (PASS) external/unimported syntax (fail) |
---|
401 | (PASS) external/imported variable |
---|
402 | (PASS) external/imported syntax |
---|
403 | (PASS) modified import |
---|
404 | (PASS) hidden import |
---|
405 | (PASS) prefixed import and reexport |
---|
406 | ok. |
---|
407 | (PASS) indirect imports |
---|
408 | f1 |
---|
409 | (PASS) chained indirect imports |
---|
410 | (PASS) literal compare and export |
---|
411 | (PASS) redefinition of indirect import |
---|
412 | (PASS) redefinition of indirect import (II) |
---|
413 | (PASS) value reexport |
---|
414 | (PASS) syntax reexport |
---|
415 | (PASS) primitive indirect value-binding reexport |
---|
416 | (PASS) extended lambda list uses expansion environment |
---|
417 | #<procedure (filter pred578 lis579)> |
---|
418 | (PASS) function defined in module that is the result of an expansion |
---|
419 | (PASS) syntax defined in module that is the result of an expansion |
---|
420 | 19 tests completed in 0.523 seconds |
---|
421 | 19 (100.00%) tests passed |
---|
422 | 0 (0.00%) tests failed |
---|
423 | () |
---|
424 | f1 |
---|
425 | oinkoink======================================== module tests (compiled) ... |
---|
426 | ../chicken module-tests-compiled.scm -output-file a.c -include-path .. |
---|
427 | gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
428 | rm a.c |
---|
429 | gcc a.o -o a.out -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
430 | rm a.o |
---|
431 | (PASS) inline in syntax |
---|
432 | (PASS) unmarked primitive exports |
---|
433 | 2 tests completed in 0.000 seconds |
---|
434 | 2 (100.00%) tests passed |
---|
435 | 0 (0.00%) tests failed |
---|
436 | ======================================== module tests (chained) ... |
---|
437 | f1 |
---|
438 | ../chicken test-chained-modules.scm -output-file test-chained-modules.c -dynamic -feature chicken-compile-shared -include-path .. -emit-import-library m3 |
---|
439 | gcc test-chained-modules.c -o test-chained-modules.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
440 | rm test-chained-modules.c |
---|
441 | gcc test-chained-modules.o -o test-chained-modules.so -shared -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
442 | rm test-chained-modules.o |
---|
443 | ../chicken m3.import.scm -output-file m3.import.c -dynamic -feature chicken-compile-shared -include-path .. |
---|
444 | gcc m3.import.c -o m3.import.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
445 | rm m3.import.c |
---|
446 | gcc m3.import.o -o m3.import.so -shared -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
447 | rm m3.import.o |
---|
448 | |
---|
449 | CHICKEN |
---|
450 | (c)2008-2010 The Chicken Team |
---|
451 | (c)2000-2007 Felix L. Winkelmann |
---|
452 | Version 4.6.1 (make-refactoring) |
---|
453 | linux-unix-gnu-ppc [ manyargs dload ptables ] |
---|
454 | compiled 2010-09-06 on mandolate (Linux) |
---|
455 | |
---|
456 | ; loading test-chained-modules.so ... |
---|
457 | ; loading /home/mario/chicken-safer-scheduler/lib/chicken/5/scheme.import.so ... |
---|
458 | ; loading /home/mario/chicken-safer-scheduler/lib/chicken/5/chicken.import.so ... |
---|
459 | f1 |
---|
460 | f1 |
---|
461 | f1 |
---|
462 | ======================================== module tests (ec) ... |
---|
463 | |
---|
464 | (let ((x 0)) (do-ec (set! x (+ x 1))) x) |
---|
465 | => 1 ; correct |
---|
466 | |
---|
467 | (let ((x 0)) (do-ec (:range i 10) (set! x (+ x 1))) x) |
---|
468 | => 10 ; correct |
---|
469 | |
---|
470 | (let ((x 0)) (do-ec (:range n 10) (:range k n) (set! x (+ x 1))) x) |
---|
471 | => 45 ; correct |
---|
472 | |
---|
473 | (list-ec 1) |
---|
474 | => (1) ; correct |
---|
475 | |
---|
476 | (list-ec (:range i 4) i) |
---|
477 | => (0 1 2 3) ; correct |
---|
478 | |
---|
479 | (list-ec (:range n 3) (:range k (+ n 1)) (list n k)) |
---|
480 | => ((0 0) (1 0) (1 1) (2 0) (2 1) (2 2)) ; correct |
---|
481 | |
---|
482 | (list-ec (:range n 5) (if (even? n)) (:range k (+ n 1)) (list n k)) |
---|
483 | => ((0 0) (2 0) (2 1) (2 2) (4 0) (4 1) (4 2) (4 3) (4 4)) ; correct |
---|
484 | |
---|
485 | (list-ec (:range n 5) (not (even? n)) (:range k (+ n 1)) (list n k)) |
---|
486 | => ((1 0) (1 1) (3 0) (3 1) (3 2) (3 3)) ; correct |
---|
487 | |
---|
488 | (list-ec (:range n 5) (and (even? n) (> n 2)) (:range k (+ n 1)) (list n k)) |
---|
489 | => ((4 0) (4 1) (4 2) (4 3) (4 4)) ; correct |
---|
490 | |
---|
491 | (list-ec (:range n 5) (or (even? n) (> n 3)) (:range k (+ n 1)) (list n k)) |
---|
492 | => ((0 0) (2 0) (2 1) (2 2) (4 0) (4 1) (4 2) (4 3) (4 4)) ; correct |
---|
493 | |
---|
494 | (let ((x 0)) (list-ec (:range n 10) (begin (set! x (+ x 1))) n) x) |
---|
495 | => 10 ; correct |
---|
496 | |
---|
497 | (list-ec (nested (:range n 3) (:range k n)) k) |
---|
498 | => (0 0 1) ; correct |
---|
499 | |
---|
500 | (append-ec (quote (a b))) |
---|
501 | => (a b) ; correct |
---|
502 | |
---|
503 | (append-ec (:range i 0) (quote (a b))) |
---|
504 | => () ; correct |
---|
505 | |
---|
506 | (append-ec (:range i 1) (quote (a b))) |
---|
507 | => (a b) ; correct |
---|
508 | |
---|
509 | (append-ec (:range i 2) (quote (a b))) |
---|
510 | => (a b a b) ; correct |
---|
511 | |
---|
512 | (string-ec #\a) |
---|
513 | => "a" ; correct |
---|
514 | |
---|
515 | (string-ec (:range i 0) #\a) |
---|
516 | => "" ; correct |
---|
517 | |
---|
518 | (string-ec (:range i 1) #\a) |
---|
519 | => "a" ; correct |
---|
520 | |
---|
521 | (string-ec (:range i 2) #\a) |
---|
522 | => "aa" ; correct |
---|
523 | |
---|
524 | (string-append-ec "ab") |
---|
525 | => "ab" ; correct |
---|
526 | |
---|
527 | (string-append-ec (:range i 0) "ab") |
---|
528 | => "" ; correct |
---|
529 | |
---|
530 | (string-append-ec (:range i 1) "ab") |
---|
531 | => "ab" ; correct |
---|
532 | |
---|
533 | (string-append-ec (:range i 2) "ab") |
---|
534 | => "abab" ; correct |
---|
535 | |
---|
536 | (vector-ec 1) |
---|
537 | => #(1) ; correct |
---|
538 | |
---|
539 | (vector-ec (:range i 0) i) |
---|
540 | => #() ; correct |
---|
541 | |
---|
542 | (vector-ec (:range i 1) i) |
---|
543 | => #(0) ; correct |
---|
544 | |
---|
545 | (vector-ec (:range i 2) i) |
---|
546 | => #(0 1) ; correct |
---|
547 | |
---|
548 | (vector-of-length-ec 1 1) |
---|
549 | => #(1) ; correct |
---|
550 | |
---|
551 | (vector-of-length-ec 0 (:range i 0) i) |
---|
552 | => #() ; correct |
---|
553 | |
---|
554 | (vector-of-length-ec 1 (:range i 1) i) |
---|
555 | => #(0) ; correct |
---|
556 | |
---|
557 | (vector-of-length-ec 2 (:range i 2) i) |
---|
558 | => #(0 1) ; correct |
---|
559 | |
---|
560 | (sum-ec 1) |
---|
561 | => 1 ; correct |
---|
562 | |
---|
563 | (sum-ec (:range i 0) i) |
---|
564 | => 0 ; correct |
---|
565 | |
---|
566 | (sum-ec (:range i 1) i) |
---|
567 | => 0 ; correct |
---|
568 | |
---|
569 | (sum-ec (:range i 2) i) |
---|
570 | => 1 ; correct |
---|
571 | |
---|
572 | (sum-ec (:range i 3) i) |
---|
573 | => 3 ; correct |
---|
574 | |
---|
575 | (product-ec 1) |
---|
576 | => 1 ; correct |
---|
577 | |
---|
578 | (product-ec (:range i 1 0) i) |
---|
579 | => 1 ; correct |
---|
580 | |
---|
581 | (product-ec (:range i 1 1) i) |
---|
582 | => 1 ; correct |
---|
583 | |
---|
584 | (product-ec (:range i 1 2) i) |
---|
585 | => 1 ; correct |
---|
586 | |
---|
587 | (product-ec (:range i 1 3) i) |
---|
588 | => 2 ; correct |
---|
589 | |
---|
590 | (product-ec (:range i 1 4) i) |
---|
591 | => 6 ; correct |
---|
592 | |
---|
593 | (min-ec 1) |
---|
594 | => 1 ; correct |
---|
595 | |
---|
596 | (min-ec (:range i 1) i) |
---|
597 | => 0 ; correct |
---|
598 | |
---|
599 | (min-ec (:range i 2) i) |
---|
600 | => 0 ; correct |
---|
601 | |
---|
602 | (max-ec 1) |
---|
603 | => 1 ; correct |
---|
604 | |
---|
605 | (max-ec (:range i 1) i) |
---|
606 | => 0 ; correct |
---|
607 | |
---|
608 | (max-ec (:range i 2) i) |
---|
609 | => 1 ; correct |
---|
610 | |
---|
611 | (first-ec #f 1) |
---|
612 | => 1 ; correct |
---|
613 | |
---|
614 | (first-ec #f (:range i 0) i) |
---|
615 | => #f ; correct |
---|
616 | |
---|
617 | (first-ec #f (:range i 1) i) |
---|
618 | => 0 ; correct |
---|
619 | |
---|
620 | (first-ec #f (:range i 2) i) |
---|
621 | => 0 ; correct |
---|
622 | |
---|
623 | (let ((last-i -1)) (first-ec #f (:range i 10) (begin (set! last-i i)) i) last-i) |
---|
624 | => 0 ; correct |
---|
625 | |
---|
626 | (last-ec #f 1) |
---|
627 | => 1 ; correct |
---|
628 | |
---|
629 | (last-ec #f (:range i 0) i) |
---|
630 | => #f ; correct |
---|
631 | |
---|
632 | (last-ec #f (:range i 1) i) |
---|
633 | => 0 ; correct |
---|
634 | |
---|
635 | (last-ec #f (:range i 2) i) |
---|
636 | => 1 ; correct |
---|
637 | |
---|
638 | (any?-ec #f) |
---|
639 | => #f ; correct |
---|
640 | |
---|
641 | (any?-ec #t) |
---|
642 | => #t ; correct |
---|
643 | |
---|
644 | (any?-ec (:range i 2 2) (even? i)) |
---|
645 | => #f ; correct |
---|
646 | |
---|
647 | (any?-ec (:range i 2 3) (even? i)) |
---|
648 | => #t ; correct |
---|
649 | |
---|
650 | (every?-ec #f) |
---|
651 | => #f ; correct |
---|
652 | |
---|
653 | (every?-ec #t) |
---|
654 | => #t ; correct |
---|
655 | |
---|
656 | (every?-ec (:range i 2 2) (even? i)) |
---|
657 | => #t ; correct |
---|
658 | |
---|
659 | (every?-ec (:range i 2 3) (even? i)) |
---|
660 | => #t ; correct |
---|
661 | |
---|
662 | (every?-ec (:range i 2 4) (even? i)) |
---|
663 | => #f ; correct |
---|
664 | |
---|
665 | (let ((sum-sqr (lambda (x result) (+ result (* x x))))) (fold-ec 0 (:range i 10) i sum-sqr)) |
---|
666 | => 285 ; correct |
---|
667 | |
---|
668 | (let ((minus-1 (lambda (x) (- x 1))) (sum-sqr (lambda (x result) (+ result (* x x))))) (fold3-ec (error "wrong") (:range i 10) i minus-1 sum-sqr)) |
---|
669 | => 284 ; correct |
---|
670 | |
---|
671 | (fold3-ec (quote infinity) (:range i 0) i min min) |
---|
672 | => infinity ; correct |
---|
673 | |
---|
674 | (list-ec (:list x (quote ())) x) |
---|
675 | => () ; correct |
---|
676 | |
---|
677 | (list-ec (:list x (quote (1))) x) |
---|
678 | => (1) ; correct |
---|
679 | |
---|
680 | (list-ec (:list x (quote (1 2 3))) x) |
---|
681 | => (1 2 3) ; correct |
---|
682 | |
---|
683 | (list-ec (:list x (quote (1)) (quote (2))) x) |
---|
684 | => (1 2) ; correct |
---|
685 | |
---|
686 | (list-ec (:list x (quote (1)) (quote (2)) (quote (3))) x) |
---|
687 | => (1 2 3) ; correct |
---|
688 | |
---|
689 | (list-ec (:string c "") c) |
---|
690 | => () ; correct |
---|
691 | |
---|
692 | (list-ec (:string c "1") c) |
---|
693 | => (#\1) ; correct |
---|
694 | |
---|
695 | (list-ec (:string c "123") c) |
---|
696 | => (#\1 #\2 #\3) ; correct |
---|
697 | |
---|
698 | (list-ec (:string c "1" "2") c) |
---|
699 | => (#\1 #\2) ; correct |
---|
700 | |
---|
701 | (list-ec (:string c "1" "2" "3") c) |
---|
702 | => (#\1 #\2 #\3) ; correct |
---|
703 | |
---|
704 | (list-ec (:vector x (vector)) x) |
---|
705 | => () ; correct |
---|
706 | |
---|
707 | (list-ec (:vector x (vector 1)) x) |
---|
708 | => (1) ; correct |
---|
709 | |
---|
710 | (list-ec (:vector x (vector 1 2 3)) x) |
---|
711 | => (1 2 3) ; correct |
---|
712 | |
---|
713 | (list-ec (:vector x (vector 1) (vector 2)) x) |
---|
714 | => (1 2) ; correct |
---|
715 | |
---|
716 | (list-ec (:vector x (vector 1) (vector 2) (vector 3)) x) |
---|
717 | => (1 2 3) ; correct |
---|
718 | |
---|
719 | (list-ec (:range x -2) x) |
---|
720 | => () ; correct |
---|
721 | |
---|
722 | (list-ec (:range x -1) x) |
---|
723 | => () ; correct |
---|
724 | |
---|
725 | (list-ec (:range x 0) x) |
---|
726 | => () ; correct |
---|
727 | |
---|
728 | (list-ec (:range x 1) x) |
---|
729 | => (0) ; correct |
---|
730 | |
---|
731 | (list-ec (:range x 2) x) |
---|
732 | => (0 1) ; correct |
---|
733 | |
---|
734 | (list-ec (:range x 0 3) x) |
---|
735 | => (0 1 2) ; correct |
---|
736 | |
---|
737 | (list-ec (:range x 1 3) x) |
---|
738 | => (1 2) ; correct |
---|
739 | |
---|
740 | (list-ec (:range x -2 -1) x) |
---|
741 | => (-2) ; correct |
---|
742 | |
---|
743 | (list-ec (:range x -2 -2) x) |
---|
744 | => () ; correct |
---|
745 | |
---|
746 | (list-ec (:range x 1 5 2) x) |
---|
747 | => (1 3) ; correct |
---|
748 | |
---|
749 | (list-ec (:range x 1 6 2) x) |
---|
750 | => (1 3 5) ; correct |
---|
751 | |
---|
752 | (list-ec (:range x 5 1 -2) x) |
---|
753 | => (5 3) ; correct |
---|
754 | |
---|
755 | (list-ec (:range x 6 1 -2) x) |
---|
756 | => (6 4 2) ; correct |
---|
757 | |
---|
758 | (list-ec (:real-range x 0.0 3.0) x) |
---|
759 | => (0.0 1.0 2.0) ; correct |
---|
760 | |
---|
761 | (list-ec (:real-range x 0 3.0) x) |
---|
762 | => (0.0 1.0 2.0) ; correct |
---|
763 | |
---|
764 | (list-ec (:real-range x 0 3 1.0) x) |
---|
765 | => (0.0 1.0 2.0) ; correct |
---|
766 | |
---|
767 | (string-ec (:char-range c #\a #\z) c) |
---|
768 | => "abcdefghijklmnopqrstuvwxyz" ; correct |
---|
769 | |
---|
770 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (:port x port read) x)))) |
---|
771 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
772 | |
---|
773 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (:port x port) x)))) |
---|
774 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
775 | |
---|
776 | (list-ec (:do ((i 0)) (< i 4) ((+ i 1))) i) |
---|
777 | => (0 1 2 3) ; correct |
---|
778 | |
---|
779 | (list-ec (:do (let ((x (quote x)))) ((i 0)) (< i 4) (let ((j (- 10 i)))) #t ((+ i 1))) j) |
---|
780 | => (10 9 8 7) ; correct |
---|
781 | |
---|
782 | (list-ec (:let x 1) x) |
---|
783 | => (1) ; correct |
---|
784 | |
---|
785 | (list-ec (:let x 1) (:let y (+ x 1)) y) |
---|
786 | => (2) ; correct |
---|
787 | |
---|
788 | (list-ec (:let x 1) (:let x (+ x 1)) x) |
---|
789 | => (2) ; correct |
---|
790 | |
---|
791 | (list-ec (:parallel (:range i 1 10) (:list x (quote (a b c)))) (list i x)) |
---|
792 | => ((1 a) (2 b) (3 c)) ; correct |
---|
793 | |
---|
794 | (list-ec (:while (:range i 1 10) (< i 5)) i) |
---|
795 | => (1 2 3 4) ; correct |
---|
796 | |
---|
797 | (list-ec (:until (:range i 1 10) (>= i 5)) i) |
---|
798 | => (1 2 3 4 5) ; correct |
---|
799 | |
---|
800 | (list-ec (:while (:list i (quote (1 2 3 4 5 6 7 8 9))) (< i 5)) i) |
---|
801 | => (1 2 3 4) ; correct |
---|
802 | |
---|
803 | (list-ec (:until (:list i (quote (1 2 3 4 5 6 7 8 9))) (>= i 5)) i) |
---|
804 | => (1 2 3 4 5) ; correct |
---|
805 | |
---|
806 | (list-ec (:while (:vector x (index i) (quote #(1 2 3 4 5))) (< x 10)) x) |
---|
807 | => (1 2 3 4 5) ; correct |
---|
808 | |
---|
809 | (list-ec (:while (:parallel (:range i 1 10) (:list j (quote (1 2 3 4 5 6 7 8 9)))) (< i 5)) (list i j)) |
---|
810 | => ((1 1) (2 2) (3 3) (4 4)) ; correct |
---|
811 | |
---|
812 | (list-ec (:until (:parallel (:range i 1 10) (:list j (quote (1 2 3 4 5 6 7 8 9)))) (>= i 5)) (list i j)) |
---|
813 | => ((1 1) (2 2) (3 3) (4 4) (5 5)) ; correct |
---|
814 | |
---|
815 | (let ((n 0)) (do-ec (:while (:range i 1 10) (begin (set! n (+ n 1)) (< i 5))) (if #f #f)) n) |
---|
816 | => 5 ; correct |
---|
817 | |
---|
818 | (let ((n 0)) (do-ec (:until (:range i 1 10) (begin (set! n (+ n 1)) (>= i 5))) (if #f #f)) n) |
---|
819 | => 5 ; correct |
---|
820 | |
---|
821 | (let ((n 0)) (do-ec (:while (:parallel (:range i 1 10) (:do () (begin (set! n (+ n 1)) #t) ())) (< i 5)) (if #f #f)) n) |
---|
822 | => 5 ; correct |
---|
823 | |
---|
824 | (let ((n 0)) (do-ec (:until (:parallel (:range i 1 10) (:do () (begin (set! n (+ n 1)) #t) ())) (>= i 5)) (if #f #f)) n) |
---|
825 | => 5 ; correct |
---|
826 | |
---|
827 | (list-ec (: c (quote (a b))) c) |
---|
828 | => (a b) ; correct |
---|
829 | |
---|
830 | (list-ec (: c (quote (a b)) (quote (c d))) c) |
---|
831 | => (a b c d) ; correct |
---|
832 | |
---|
833 | (list-ec (: c "ab") c) |
---|
834 | => (#\a #\b) ; correct |
---|
835 | |
---|
836 | (list-ec (: c "ab" "cd") c) |
---|
837 | => (#\a #\b #\c #\d) ; correct |
---|
838 | |
---|
839 | (list-ec (: c (vector (quote a) (quote b))) c) |
---|
840 | => (a b) ; correct |
---|
841 | |
---|
842 | (list-ec (: c (vector (quote a) (quote b)) (vector (quote c))) c) |
---|
843 | => (a b c) ; correct |
---|
844 | |
---|
845 | (list-ec (: i 0) i) |
---|
846 | => () ; correct |
---|
847 | |
---|
848 | (list-ec (: i 1) i) |
---|
849 | => (0) ; correct |
---|
850 | |
---|
851 | (list-ec (: i 10) i) |
---|
852 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
853 | |
---|
854 | (list-ec (: i 1 2) i) |
---|
855 | => (1) ; correct |
---|
856 | |
---|
857 | (list-ec (: i 1 2 3) i) |
---|
858 | => (1) ; correct |
---|
859 | |
---|
860 | (list-ec (: i 1 9 3) i) |
---|
861 | => (1 4 7) ; correct |
---|
862 | |
---|
863 | (list-ec (: i 0.0 1.0 0.2) i) |
---|
864 | => (0.0 0.2 0.4 0.6 0.8) ; correct |
---|
865 | |
---|
866 | (list-ec (: c #\a #\c) c) |
---|
867 | => (#\a #\b #\c) ; correct |
---|
868 | |
---|
869 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (: x port read) x)))) |
---|
870 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
871 | |
---|
872 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (: x port) x)))) |
---|
873 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
874 | |
---|
875 | (list-ec (:list c (index i) (quote (a b))) (list c i)) |
---|
876 | => ((a 0) (b 1)) ; correct |
---|
877 | |
---|
878 | (list-ec (:string c (index i) "a") (list c i)) |
---|
879 | => ((#\a 0)) ; correct |
---|
880 | |
---|
881 | (list-ec (:vector c (index i) (vector (quote a))) (list c i)) |
---|
882 | => ((a 0)) ; correct |
---|
883 | |
---|
884 | (list-ec (:range i (index j) 0 -3 -1) (list i j)) |
---|
885 | => ((0 0) (-1 1) (-2 2)) ; correct |
---|
886 | |
---|
887 | (list-ec (:real-range i (index j) 0 1 0.2) (list i j)) |
---|
888 | => ((0.0 0) (0.2 1) (0.4 2) (0.6 3) (0.8 4)) ; correct |
---|
889 | |
---|
890 | (list-ec (:char-range c (index i) #\a #\c) (list c i)) |
---|
891 | => ((#\a 0) (#\b 1) (#\c 2)) ; correct |
---|
892 | |
---|
893 | (list-ec (: x (index i) (quote (a b c d))) (list x i)) |
---|
894 | => ((a 0) (b 1) (c 2) (d 3)) ; correct |
---|
895 | |
---|
896 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (: x (index i) port) (list x i))))) |
---|
897 | => ((0 0) (1 1) (2 2) (3 3) (4 4) (5 5) (6 6) (7 7) (8 8) (9 9)) ; correct |
---|
898 | |
---|
899 | (list-ec (: i 5) (* i i)) |
---|
900 | => (0 1 4 9 16) ; correct |
---|
901 | |
---|
902 | (list-ec (: n 1 4) (: i n) (list n i)) |
---|
903 | => ((1 0) (2 0) (2 1) (3 0) (3 1) (3 2)) ; correct |
---|
904 | |
---|
905 | (list-ec (: x (index i) "abc") (list x i)) |
---|
906 | => ((#\a 0) (#\b 1) (#\c 2)) ; correct |
---|
907 | |
---|
908 | (list-ec (:string c (index i) "a" "b") (cons c i)) |
---|
909 | => ((#\a . 0) (#\b . 1)) ; correct |
---|
910 | |
---|
911 | (list-ec (:range x 5) (:range x x) x) |
---|
912 | => (0 0 1 0 1 2 0 1 2 3) ; correct |
---|
913 | |
---|
914 | (list-ec (:list x (quote (2 "23" (4)))) (: y x) y) |
---|
915 | => (0 1 #\2 #\3 4) ; correct |
---|
916 | |
---|
917 | (list-ec (:parallel (:integers x) (:do ((i 10)) (< x i) ((- i 1)))) (list x i)) |
---|
918 | => ((0 10) (1 9) (2 8) (3 7) (4 6)) ; correct |
---|
919 | |
---|
920 | (factorial 0) |
---|
921 | => 1 ; correct |
---|
922 | |
---|
923 | (factorial 1) |
---|
924 | => 1 ; correct |
---|
925 | |
---|
926 | (factorial 3) |
---|
927 | => 6 ; correct |
---|
928 | |
---|
929 | (factorial 5) |
---|
930 | => 120 ; correct |
---|
931 | |
---|
932 | (eratosthenes 50) |
---|
933 | => (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47) ; correct |
---|
934 | |
---|
935 | (length (eratosthenes 100000)) |
---|
936 | => 9592 ; correct |
---|
937 | |
---|
938 | (pythagoras 15) |
---|
939 | => ((3 4 5) (5 12 13) (6 8 10) (9 12 15)) ; correct |
---|
940 | |
---|
941 | (length (pythagoras 200)) |
---|
942 | => 127 ; correct |
---|
943 | |
---|
944 | (qsort (quote (1 5 4 2 4 5 3 2 1 3))) |
---|
945 | => (1 1 2 2 3 3 4 4 5 5) ; correct |
---|
946 | |
---|
947 | (pi-BBP 5) |
---|
948 | => 3.14159265322809 ; correct |
---|
949 | |
---|
950 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (read-lines "tmp1")) |
---|
951 | => ("0\n" "1\n" "2\n" "3\n" "4\n" "5\n" "6\n" "7\n" "8\n" "9\n") ; correct |
---|
952 | |
---|
953 | |
---|
954 | correct examples : 163 |
---|
955 | wrong examples : 0 |
---|
956 | |
---|
957 | ../chicken ec.scm -output-file ec.c -dynamic -feature chicken-compile-shared -include-path .. -emit-import-library ec |
---|
958 | gcc ec.c -o ec.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
959 | rm ec.c |
---|
960 | gcc ec.o -o ec.so -shared -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
961 | rm ec.o |
---|
962 | ../chicken ec.import.scm -output-file ec.import.c -dynamic -feature chicken-compile-shared -include-path .. |
---|
963 | gcc ec.import.c -o ec.import.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -I.. -I"/home/mario/chicken-safer-scheduler/include" |
---|
964 | rm ec.import.c |
---|
965 | gcc ec.import.o -o ec.import.so -shared -L.. -L"/home/mario/chicken-safer-scheduler/lib" -Wl,-R"/home/mario/chicken-safer-scheduler/lib" -lchicken -lm -ldl |
---|
966 | rm ec.import.o |
---|
967 | |
---|
968 | (let ((x 0)) (do-ec (set! x (+ x 1))) x) |
---|
969 | => 1 ; correct |
---|
970 | |
---|
971 | (let ((x 0)) (do-ec (:range i 10) (set! x (+ x 1))) x) |
---|
972 | => 10 ; correct |
---|
973 | |
---|
974 | (let ((x 0)) (do-ec (:range n 10) (:range k n) (set! x (+ x 1))) x) |
---|
975 | => 45 ; correct |
---|
976 | |
---|
977 | (list-ec 1) |
---|
978 | => (1) ; correct |
---|
979 | |
---|
980 | (list-ec (:range i 4) i) |
---|
981 | => (0 1 2 3) ; correct |
---|
982 | |
---|
983 | (list-ec (:range n 3) (:range k (+ n 1)) (list n k)) |
---|
984 | => ((0 0) (1 0) (1 1) (2 0) (2 1) (2 2)) ; correct |
---|
985 | |
---|
986 | (list-ec (:range n 5) (if (even? n)) (:range k (+ n 1)) (list n k)) |
---|
987 | => ((0 0) (2 0) (2 1) (2 2) (4 0) (4 1) (4 2) (4 3) (4 4)) ; correct |
---|
988 | |
---|
989 | (list-ec (:range n 5) (not (even? n)) (:range k (+ n 1)) (list n k)) |
---|
990 | => ((1 0) (1 1) (3 0) (3 1) (3 2) (3 3)) ; correct |
---|
991 | |
---|
992 | (list-ec (:range n 5) (and (even? n) (> n 2)) (:range k (+ n 1)) (list n k)) |
---|
993 | => ((4 0) (4 1) (4 2) (4 3) (4 4)) ; correct |
---|
994 | |
---|
995 | (list-ec (:range n 5) (or (even? n) (> n 3)) (:range k (+ n 1)) (list n k)) |
---|
996 | => ((0 0) (2 0) (2 1) (2 2) (4 0) (4 1) (4 2) (4 3) (4 4)) ; correct |
---|
997 | |
---|
998 | (let ((x 0)) (list-ec (:range n 10) (begin (set! x (+ x 1))) n) x) |
---|
999 | => 10 ; correct |
---|
1000 | |
---|
1001 | (list-ec (nested (:range n 3) (:range k n)) k) |
---|
1002 | => (0 0 1) ; correct |
---|
1003 | |
---|
1004 | (append-ec (quote (a b))) |
---|
1005 | => (a b) ; correct |
---|
1006 | |
---|
1007 | (append-ec (:range i 0) (quote (a b))) |
---|
1008 | => () ; correct |
---|
1009 | |
---|
1010 | (append-ec (:range i 1) (quote (a b))) |
---|
1011 | => (a b) ; correct |
---|
1012 | |
---|
1013 | (append-ec (:range i 2) (quote (a b))) |
---|
1014 | => (a b a b) ; correct |
---|
1015 | |
---|
1016 | (string-ec #\a) |
---|
1017 | => "a" ; correct |
---|
1018 | |
---|
1019 | (string-ec (:range i 0) #\a) |
---|
1020 | => "" ; correct |
---|
1021 | |
---|
1022 | (string-ec (:range i 1) #\a) |
---|
1023 | => "a" ; correct |
---|
1024 | |
---|
1025 | (string-ec (:range i 2) #\a) |
---|
1026 | => "aa" ; correct |
---|
1027 | |
---|
1028 | (string-append-ec "ab") |
---|
1029 | => "ab" ; correct |
---|
1030 | |
---|
1031 | (string-append-ec (:range i 0) "ab") |
---|
1032 | => "" ; correct |
---|
1033 | |
---|
1034 | (string-append-ec (:range i 1) "ab") |
---|
1035 | => "ab" ; correct |
---|
1036 | |
---|
1037 | (string-append-ec (:range i 2) "ab") |
---|
1038 | => "abab" ; correct |
---|
1039 | |
---|
1040 | (vector-ec 1) |
---|
1041 | => #(1) ; correct |
---|
1042 | |
---|
1043 | (vector-ec (:range i 0) i) |
---|
1044 | => #() ; correct |
---|
1045 | |
---|
1046 | (vector-ec (:range i 1) i) |
---|
1047 | => #(0) ; correct |
---|
1048 | |
---|
1049 | (vector-ec (:range i 2) i) |
---|
1050 | => #(0 1) ; correct |
---|
1051 | |
---|
1052 | (vector-of-length-ec 1 1) |
---|
1053 | => #(1) ; correct |
---|
1054 | |
---|
1055 | (vector-of-length-ec 0 (:range i 0) i) |
---|
1056 | => #() ; correct |
---|
1057 | |
---|
1058 | (vector-of-length-ec 1 (:range i 1) i) |
---|
1059 | => #(0) ; correct |
---|
1060 | |
---|
1061 | (vector-of-length-ec 2 (:range i 2) i) |
---|
1062 | => #(0 1) ; correct |
---|
1063 | |
---|
1064 | (sum-ec 1) |
---|
1065 | => 1 ; correct |
---|
1066 | |
---|
1067 | (sum-ec (:range i 0) i) |
---|
1068 | => 0 ; correct |
---|
1069 | |
---|
1070 | (sum-ec (:range i 1) i) |
---|
1071 | => 0 ; correct |
---|
1072 | |
---|
1073 | (sum-ec (:range i 2) i) |
---|
1074 | => 1 ; correct |
---|
1075 | |
---|
1076 | (sum-ec (:range i 3) i) |
---|
1077 | => 3 ; correct |
---|
1078 | |
---|
1079 | (product-ec 1) |
---|
1080 | => 1 ; correct |
---|
1081 | |
---|
1082 | (product-ec (:range i 1 0) i) |
---|
1083 | => 1 ; correct |
---|
1084 | |
---|
1085 | (product-ec (:range i 1 1) i) |
---|
1086 | => 1 ; correct |
---|
1087 | |
---|
1088 | (product-ec (:range i 1 2) i) |
---|
1089 | => 1 ; correct |
---|
1090 | |
---|
1091 | (product-ec (:range i 1 3) i) |
---|
1092 | => 2 ; correct |
---|
1093 | |
---|
1094 | (product-ec (:range i 1 4) i) |
---|
1095 | => 6 ; correct |
---|
1096 | |
---|
1097 | (min-ec 1) |
---|
1098 | => 1 ; correct |
---|
1099 | |
---|
1100 | (min-ec (:range i 1) i) |
---|
1101 | => 0 ; correct |
---|
1102 | |
---|
1103 | (min-ec (:range i 2) i) |
---|
1104 | => 0 ; correct |
---|
1105 | |
---|
1106 | (max-ec 1) |
---|
1107 | => 1 ; correct |
---|
1108 | |
---|
1109 | (max-ec (:range i 1) i) |
---|
1110 | => 0 ; correct |
---|
1111 | |
---|
1112 | (max-ec (:range i 2) i) |
---|
1113 | => 1 ; correct |
---|
1114 | |
---|
1115 | (first-ec #f 1) |
---|
1116 | => 1 ; correct |
---|
1117 | |
---|
1118 | (first-ec #f (:range i 0) i) |
---|
1119 | => #f ; correct |
---|
1120 | |
---|
1121 | (first-ec #f (:range i 1) i) |
---|
1122 | => 0 ; correct |
---|
1123 | |
---|
1124 | (first-ec #f (:range i 2) i) |
---|
1125 | => 0 ; correct |
---|
1126 | |
---|
1127 | (let ((last-i -1)) (first-ec #f (:range i 10) (begin (set! last-i i)) i) last-i) |
---|
1128 | => 0 ; correct |
---|
1129 | |
---|
1130 | (last-ec #f 1) |
---|
1131 | => 1 ; correct |
---|
1132 | |
---|
1133 | (last-ec #f (:range i 0) i) |
---|
1134 | => #f ; correct |
---|
1135 | |
---|
1136 | (last-ec #f (:range i 1) i) |
---|
1137 | => 0 ; correct |
---|
1138 | |
---|
1139 | (last-ec #f (:range i 2) i) |
---|
1140 | => 1 ; correct |
---|
1141 | |
---|
1142 | (any?-ec #f) |
---|
1143 | => #f ; correct |
---|
1144 | |
---|
1145 | (any?-ec #t) |
---|
1146 | => #t ; correct |
---|
1147 | |
---|
1148 | (any?-ec (:range i 2 2) (even? i)) |
---|
1149 | => #f ; correct |
---|
1150 | |
---|
1151 | (any?-ec (:range i 2 3) (even? i)) |
---|
1152 | => #t ; correct |
---|
1153 | |
---|
1154 | (every?-ec #f) |
---|
1155 | => #f ; correct |
---|
1156 | |
---|
1157 | (every?-ec #t) |
---|
1158 | => #t ; correct |
---|
1159 | |
---|
1160 | (every?-ec (:range i 2 2) (even? i)) |
---|
1161 | => #t ; correct |
---|
1162 | |
---|
1163 | (every?-ec (:range i 2 3) (even? i)) |
---|
1164 | => #t ; correct |
---|
1165 | |
---|
1166 | (every?-ec (:range i 2 4) (even? i)) |
---|
1167 | => #f ; correct |
---|
1168 | |
---|
1169 | (let ((sum-sqr (lambda (x result) (+ result (* x x))))) (fold-ec 0 (:range i 10) i sum-sqr)) |
---|
1170 | => 285 ; correct |
---|
1171 | |
---|
1172 | (let ((minus-1 (lambda (x) (- x 1))) (sum-sqr (lambda (x result) (+ result (* x x))))) (fold3-ec (error "wrong") (:range i 10) i minus-1 sum-sqr)) |
---|
1173 | => 284 ; correct |
---|
1174 | |
---|
1175 | (fold3-ec (quote infinity) (:range i 0) i min min) |
---|
1176 | => infinity ; correct |
---|
1177 | |
---|
1178 | (list-ec (:list x (quote ())) x) |
---|
1179 | => () ; correct |
---|
1180 | |
---|
1181 | (list-ec (:list x (quote (1))) x) |
---|
1182 | => (1) ; correct |
---|
1183 | |
---|
1184 | (list-ec (:list x (quote (1 2 3))) x) |
---|
1185 | => (1 2 3) ; correct |
---|
1186 | |
---|
1187 | (list-ec (:list x (quote (1)) (quote (2))) x) |
---|
1188 | => (1 2) ; correct |
---|
1189 | |
---|
1190 | (list-ec (:list x (quote (1)) (quote (2)) (quote (3))) x) |
---|
1191 | => (1 2 3) ; correct |
---|
1192 | |
---|
1193 | (list-ec (:string c "") c) |
---|
1194 | => () ; correct |
---|
1195 | |
---|
1196 | (list-ec (:string c "1") c) |
---|
1197 | => (#\1) ; correct |
---|
1198 | |
---|
1199 | (list-ec (:string c "123") c) |
---|
1200 | => (#\1 #\2 #\3) ; correct |
---|
1201 | |
---|
1202 | (list-ec (:string c "1" "2") c) |
---|
1203 | => (#\1 #\2) ; correct |
---|
1204 | |
---|
1205 | (list-ec (:string c "1" "2" "3") c) |
---|
1206 | => (#\1 #\2 #\3) ; correct |
---|
1207 | |
---|
1208 | (list-ec (:vector x (vector)) x) |
---|
1209 | => () ; correct |
---|
1210 | |
---|
1211 | (list-ec (:vector x (vector 1)) x) |
---|
1212 | => (1) ; correct |
---|
1213 | |
---|
1214 | (list-ec (:vector x (vector 1 2 3)) x) |
---|
1215 | => (1 2 3) ; correct |
---|
1216 | |
---|
1217 | (list-ec (:vector x (vector 1) (vector 2)) x) |
---|
1218 | => (1 2) ; correct |
---|
1219 | |
---|
1220 | (list-ec (:vector x (vector 1) (vector 2) (vector 3)) x) |
---|
1221 | => (1 2 3) ; correct |
---|
1222 | |
---|
1223 | (list-ec (:range x -2) x) |
---|
1224 | => () ; correct |
---|
1225 | |
---|
1226 | (list-ec (:range x -1) x) |
---|
1227 | => () ; correct |
---|
1228 | |
---|
1229 | (list-ec (:range x 0) x) |
---|
1230 | => () ; correct |
---|
1231 | |
---|
1232 | (list-ec (:range x 1) x) |
---|
1233 | => (0) ; correct |
---|
1234 | |
---|
1235 | (list-ec (:range x 2) x) |
---|
1236 | => (0 1) ; correct |
---|
1237 | |
---|
1238 | (list-ec (:range x 0 3) x) |
---|
1239 | => (0 1 2) ; correct |
---|
1240 | |
---|
1241 | (list-ec (:range x 1 3) x) |
---|
1242 | => (1 2) ; correct |
---|
1243 | |
---|
1244 | (list-ec (:range x -2 -1) x) |
---|
1245 | => (-2) ; correct |
---|
1246 | |
---|
1247 | (list-ec (:range x -2 -2) x) |
---|
1248 | => () ; correct |
---|
1249 | |
---|
1250 | (list-ec (:range x 1 5 2) x) |
---|
1251 | => (1 3) ; correct |
---|
1252 | |
---|
1253 | (list-ec (:range x 1 6 2) x) |
---|
1254 | => (1 3 5) ; correct |
---|
1255 | |
---|
1256 | (list-ec (:range x 5 1 -2) x) |
---|
1257 | => (5 3) ; correct |
---|
1258 | |
---|
1259 | (list-ec (:range x 6 1 -2) x) |
---|
1260 | => (6 4 2) ; correct |
---|
1261 | |
---|
1262 | (list-ec (:real-range x 0.0 3.0) x) |
---|
1263 | => (0.0 1.0 2.0) ; correct |
---|
1264 | |
---|
1265 | (list-ec (:real-range x 0 3.0) x) |
---|
1266 | => (0.0 1.0 2.0) ; correct |
---|
1267 | |
---|
1268 | (list-ec (:real-range x 0 3 1.0) x) |
---|
1269 | => (0.0 1.0 2.0) ; correct |
---|
1270 | |
---|
1271 | (string-ec (:char-range c #\a #\z) c) |
---|
1272 | => "abcdefghijklmnopqrstuvwxyz" ; correct |
---|
1273 | |
---|
1274 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (:port x port read) x)))) |
---|
1275 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
1276 | |
---|
1277 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (:port x port) x)))) |
---|
1278 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
1279 | |
---|
1280 | (list-ec (:do ((i 0)) (< i 4) ((+ i 1))) i) |
---|
1281 | => (0 1 2 3) ; correct |
---|
1282 | |
---|
1283 | (list-ec (:do (let ((x (quote x)))) ((i 0)) (< i 4) (let ((j (- 10 i)))) #t ((+ i 1))) j) |
---|
1284 | => (10 9 8 7) ; correct |
---|
1285 | |
---|
1286 | (list-ec (:let x 1) x) |
---|
1287 | => (1) ; correct |
---|
1288 | |
---|
1289 | (list-ec (:let x 1) (:let y (+ x 1)) y) |
---|
1290 | => (2) ; correct |
---|
1291 | |
---|
1292 | (list-ec (:let x 1) (:let x (+ x 1)) x) |
---|
1293 | => (2) ; correct |
---|
1294 | |
---|
1295 | (list-ec (:parallel (:range i 1 10) (:list x (quote (a b c)))) (list i x)) |
---|
1296 | => ((1 a) (2 b) (3 c)) ; correct |
---|
1297 | |
---|
1298 | (list-ec (:while (:range i 1 10) (< i 5)) i) |
---|
1299 | => (1 2 3 4) ; correct |
---|
1300 | |
---|
1301 | (list-ec (:until (:range i 1 10) (>= i 5)) i) |
---|
1302 | => (1 2 3 4 5) ; correct |
---|
1303 | |
---|
1304 | (list-ec (:while (:list i (quote (1 2 3 4 5 6 7 8 9))) (< i 5)) i) |
---|
1305 | => (1 2 3 4) ; correct |
---|
1306 | |
---|
1307 | (list-ec (:until (:list i (quote (1 2 3 4 5 6 7 8 9))) (>= i 5)) i) |
---|
1308 | => (1 2 3 4 5) ; correct |
---|
1309 | |
---|
1310 | (list-ec (:while (:vector x (index i) (quote #(1 2 3 4 5))) (< x 10)) x) |
---|
1311 | => (1 2 3 4 5) ; correct |
---|
1312 | |
---|
1313 | (list-ec (:while (:parallel (:range i 1 10) (:list j (quote (1 2 3 4 5 6 7 8 9)))) (< i 5)) (list i j)) |
---|
1314 | => ((1 1) (2 2) (3 3) (4 4)) ; correct |
---|
1315 | |
---|
1316 | (list-ec (:until (:parallel (:range i 1 10) (:list j (quote (1 2 3 4 5 6 7 8 9)))) (>= i 5)) (list i j)) |
---|
1317 | => ((1 1) (2 2) (3 3) (4 4) (5 5)) ; correct |
---|
1318 | |
---|
1319 | (let ((n 0)) (do-ec (:while (:range i 1 10) (begin (set! n (+ n 1)) (< i 5))) (if #f #f)) n) |
---|
1320 | => 5 ; correct |
---|
1321 | |
---|
1322 | (let ((n 0)) (do-ec (:until (:range i 1 10) (begin (set! n (+ n 1)) (>= i 5))) (if #f #f)) n) |
---|
1323 | => 5 ; correct |
---|
1324 | |
---|
1325 | (let ((n 0)) (do-ec (:while (:parallel (:range i 1 10) (:do () (begin (set! n (+ n 1)) #t) ())) (< i 5)) (if #f #f)) n) |
---|
1326 | => 5 ; correct |
---|
1327 | |
---|
1328 | (let ((n 0)) (do-ec (:until (:parallel (:range i 1 10) (:do () (begin (set! n (+ n 1)) #t) ())) (>= i 5)) (if #f #f)) n) |
---|
1329 | => 5 ; correct |
---|
1330 | |
---|
1331 | (list-ec (: c (quote (a b))) c) |
---|
1332 | => (a b) ; correct |
---|
1333 | |
---|
1334 | (list-ec (: c (quote (a b)) (quote (c d))) c) |
---|
1335 | => (a b c d) ; correct |
---|
1336 | |
---|
1337 | (list-ec (: c "ab") c) |
---|
1338 | => (#\a #\b) ; correct |
---|
1339 | |
---|
1340 | (list-ec (: c "ab" "cd") c) |
---|
1341 | => (#\a #\b #\c #\d) ; correct |
---|
1342 | |
---|
1343 | (list-ec (: c (vector (quote a) (quote b))) c) |
---|
1344 | => (a b) ; correct |
---|
1345 | |
---|
1346 | (list-ec (: c (vector (quote a) (quote b)) (vector (quote c))) c) |
---|
1347 | => (a b c) ; correct |
---|
1348 | |
---|
1349 | (list-ec (: i 0) i) |
---|
1350 | => () ; correct |
---|
1351 | |
---|
1352 | (list-ec (: i 1) i) |
---|
1353 | => (0) ; correct |
---|
1354 | |
---|
1355 | (list-ec (: i 10) i) |
---|
1356 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
1357 | |
---|
1358 | (list-ec (: i 1 2) i) |
---|
1359 | => (1) ; correct |
---|
1360 | |
---|
1361 | (list-ec (: i 1 2 3) i) |
---|
1362 | => (1) ; correct |
---|
1363 | |
---|
1364 | (list-ec (: i 1 9 3) i) |
---|
1365 | => (1 4 7) ; correct |
---|
1366 | |
---|
1367 | (list-ec (: i 0.0 1.0 0.2) i) |
---|
1368 | => (0.0 0.2 0.4 0.6 0.8) ; correct |
---|
1369 | |
---|
1370 | (list-ec (: c #\a #\c) c) |
---|
1371 | => (#\a #\b #\c) ; correct |
---|
1372 | |
---|
1373 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (: x port read) x)))) |
---|
1374 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
1375 | |
---|
1376 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (: x port) x)))) |
---|
1377 | => (0 1 2 3 4 5 6 7 8 9) ; correct |
---|
1378 | |
---|
1379 | (list-ec (:list c (index i) (quote (a b))) (list c i)) |
---|
1380 | => ((a 0) (b 1)) ; correct |
---|
1381 | |
---|
1382 | (list-ec (:string c (index i) "a") (list c i)) |
---|
1383 | => ((#\a 0)) ; correct |
---|
1384 | |
---|
1385 | (list-ec (:vector c (index i) (vector (quote a))) (list c i)) |
---|
1386 | => ((a 0)) ; correct |
---|
1387 | |
---|
1388 | (list-ec (:range i (index j) 0 -3 -1) (list i j)) |
---|
1389 | => ((0 0) (-1 1) (-2 2)) ; correct |
---|
1390 | |
---|
1391 | (list-ec (:real-range i (index j) 0 1 0.2) (list i j)) |
---|
1392 | => ((0.0 0) (0.2 1) (0.4 2) (0.6 3) (0.8 4)) ; correct |
---|
1393 | |
---|
1394 | (list-ec (:char-range c (index i) #\a #\c) (list c i)) |
---|
1395 | => ((#\a 0) (#\b 1) (#\c 2)) ; correct |
---|
1396 | |
---|
1397 | (list-ec (: x (index i) (quote (a b c d))) (list x i)) |
---|
1398 | => ((a 0) (b 1) (c 2) (d 3)) ; correct |
---|
1399 | |
---|
1400 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (my-call-with-input-file "tmp1" (lambda (port) (list-ec (: x (index i) port) (list x i))))) |
---|
1401 | => ((0 0) (1 1) (2 2) (3 3) (4 4) (5 5) (6 6) (7 7) (8 8) (9 9)) ; correct |
---|
1402 | |
---|
1403 | (list-ec (: i 5) (* i i)) |
---|
1404 | => (0 1 4 9 16) ; correct |
---|
1405 | |
---|
1406 | (list-ec (: n 1 4) (: i n) (list n i)) |
---|
1407 | => ((1 0) (2 0) (2 1) (3 0) (3 1) (3 2)) ; correct |
---|
1408 | |
---|
1409 | (list-ec (: x (index i) "abc") (list x i)) |
---|
1410 | => ((#\a 0) (#\b 1) (#\c 2)) ; correct |
---|
1411 | |
---|
1412 | (list-ec (:string c (index i) "a" "b") (cons c i)) |
---|
1413 | => ((#\a . 0) (#\b . 1)) ; correct |
---|
1414 | |
---|
1415 | (list-ec (:range x 5) (:range x x) x) |
---|
1416 | => (0 0 1 0 1 2 0 1 2 3) ; correct |
---|
1417 | |
---|
1418 | (list-ec (:list x (quote (2 "23" (4)))) (: y x) y) |
---|
1419 | => (0 1 #\2 #\3 4) ; correct |
---|
1420 | |
---|
1421 | (list-ec (:parallel (:integers x) (:do ((i 10)) (< x i) ((- i 1)))) (list x i)) |
---|
1422 | => ((0 10) (1 9) (2 8) (3 7) (4 6)) ; correct |
---|
1423 | |
---|
1424 | (factorial 0) |
---|
1425 | => 1 ; correct |
---|
1426 | |
---|
1427 | (factorial 1) |
---|
1428 | => 1 ; correct |
---|
1429 | |
---|
1430 | (factorial 3) |
---|
1431 | => 6 ; correct |
---|
1432 | |
---|
1433 | (factorial 5) |
---|
1434 | => 120 ; correct |
---|
1435 | |
---|
1436 | (eratosthenes 50) |
---|
1437 | => (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47) ; correct |
---|
1438 | |
---|
1439 | (length (eratosthenes 100000)) |
---|
1440 | => 9592 ; correct |
---|
1441 | |
---|
1442 | (pythagoras 15) |
---|
1443 | => ((3 4 5) (5 12 13) (6 8 10) (9 12 15)) ; correct |
---|
1444 | |
---|
1445 | (length (pythagoras 200)) |
---|
1446 | => 127 ; correct |
---|
1447 | |
---|
1448 | (qsort (quote (1 5 4 2 4 5 3 2 1 3))) |
---|
1449 | => (1 1 2 2 3 3 4 4 5 5) ; correct |
---|
1450 | |
---|
1451 | (pi-BBP 5) |
---|
1452 | => 3.14159265322809 ; correct |
---|
1453 | |
---|
1454 | (begin (let ((f (my-open-output-file "tmp1"))) (do-ec (:range n 10) (begin (write n f) (newline f))) (close-output-port f)) (read-lines "tmp1")) |
---|
1455 | => ("0\n" "1\n" "2\n" "3\n" "4\n" "5\n" "6\n" "7\n" "8\n" "9\n") ; correct |
---|
1456 | |
---|
1457 | |
---|
1458 | correct examples : 163 |
---|
1459 | wrong examples : 0 |
---|
1460 | |
---|
1461 | ======================================== hash-table tests ... |
---|
1462 | SRFI 69 procedures |
---|
1463 | HT - No Parameters |
---|
1464 | HT - Test Parameter |
---|
1465 | HT - Number Test Parameter |
---|
1466 | HT - All Optional Parameters |
---|
1467 | HT - All Parameters |
---|
1468 | HT - Insert with setter |
---|
1469 | HT - Insert with update! |
---|
1470 | HT - A-List |
---|
1471 | HT - set! overwrites |
---|
1472 | HT - Delete |
---|
1473 | HT - Remove |
---|
1474 | HT - Make from A-List |
---|
1475 | HT - Merge! |
---|
1476 | HT - Merge |
---|
1477 | HT - Map |
---|
1478 | HT - Fold |
---|
1479 | HT - Stress Insert 100000 Fixnum Key Items |
---|
1480 | 4.88s CPU time, 1.068s GC time (major), 258687 mutations, 22/4963 GCs (major/minor) |
---|
1481 | HT - Stress Retrieve 100000 Fixnum Key Items |
---|
1482 | 1.888s CPU time, 16 mutations, 0/3312 GCs (major/minor) |
---|
1483 | ======================================== lolevel tests ... |
---|
1484 | |
---|
1485 | Error: assertion failed: (= -1 (pointer-s8-ref some-chunk)) |
---|
1486 | |
---|
1487 | Call history: |
---|
1488 | |
---|
1489 | <syntax> (##core#if (##core#check (= -1 (pointer-s8-ref some-chunk))) (##core#undefined) (##sys#error "assert... |
---|
1490 | <syntax> (##core#check (= -1 (pointer-s8-ref some-chunk))) |
---|
1491 | <syntax> (= -1 (pointer-s8-ref some-chunk)) |
---|
1492 | <syntax> (pointer-s8-ref some-chunk) |
---|
1493 | <syntax> (##core#undefined) |
---|
1494 | <syntax> (##sys#error "assertion failed" (##core#quote (= -1 (pointer-s8-ref some-chunk)))) |
---|
1495 | <syntax> (##core#quote (= -1 (pointer-s8-ref some-chunk))) |
---|
1496 | <eval> (= -1 (pointer-s8-ref some-chunk)) |
---|
1497 | <eval> (pointer-s8-ref some-chunk) |
---|
1498 | <eval> (##sys#error "assertion failed" (##core#quote (= -1 (pointer-s8-ref some-chunk)))) <-- |
---|
1499 | make[1]: *** [check] Error 70 |
---|
1500 | make[1]: Leaving directory `/home/mario/src/chicken-safer-scheduler' |
---|
1501 | make: *** [check] Error 2 |
---|