annotate tests/automated/ccl-tests.el @ 2071:0f60caa73962

[xemacs-hg @ 2004-05-11 11:33:08 by stephent] gensym docstring <87r7tryzla.fsf@tleepslib.sk.tsukuba.ac.jp> set-eol-detection fix <87vfj3yzs8.fsf@tleepslib.sk.tsukuba.ac.jp> etags.el tests <87zn8fz03v.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Tue, 11 May 2004 11:33:22 +0000
parents 943eaba38521
children baf6c66f6f47
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
1 ;;; ccl-tests.el --- Testsuites on CCL ; -*- coding: iso-2022-7bit -*-
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
2
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
3 ;; Copyright (C) 2000 MIYASHITA Hisashi
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
4
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
5 ;; This file is part of XEmacs.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
6
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
7 ;; XEmacs is free software; you can redistribute it and/or modify it
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
8 ;; under the terms of the GNU General Public License as published by
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
9 ;; the Free Software Foundation; either version 2, or (at your option)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
10 ;; any later version.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
11
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
12 ;; XEmacs is distributed in the hope that it will be useful, but
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
13 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
15 ;; General Public License for more details.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
16
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
17 ;; You should have received a copy of the GNU General Public License
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
18 ;; along with XEmacs; see the file COPYING. If not, write to the Free
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
19 ;; Software Foundation,59 Temple Place - Suite 330,
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
20 ;; Boston, MA 02111-1307, USA.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
21
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
22 ;;; Section 0. Useful functions to construct test suites.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
23
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
24 (defvar ccl-test-last-register-state nil)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
25
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
26 (defun ccl-test-register-ccl-program (sym prog)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
27 (let ((compiled (ccl-compile prog)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
28 (register-ccl-program sym compiled)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
29 compiled))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
30
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
31 (defun ccl-test (prog &optional regs return-reg-idx)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
32 (ccl-test-register-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
33 'ccl-test prog)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
34 (cond ((< (length regs) 8)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
35 (setq ccl-test-last-register-state
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
36 (apply #'vector (append regs (make-list (- 8 (length regs)) 0)))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
37 ((> (length regs) 8)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
38 (setq ccl-test-last-register-state
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
39 (apply #'vector (subseq regs 0 8))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
40 (t
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
41 (setq ccl-test-last-register-state
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
42 (apply #'vector regs))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
43 (ccl-execute
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
44 'ccl-test
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
45 ccl-test-last-register-state)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
46 (if (null return-reg-idx)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
47 (setq return-reg-idx 0))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
48 (aref ccl-test-last-register-state return-reg-idx))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
49
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
50 (defun ccl-test-on-stream (prog string
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
51 &optional not-check-coding-system)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
52 (ccl-test-register-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
53 'ccl-test-decoder prog)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
54 (setq ccl-test-last-register-state (make-vector 9 0))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
55 (let ((str2
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
56 (ccl-execute-on-string
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
57 'ccl-test-decoder
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
58 ccl-test-last-register-state
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
59 string)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
60 (if (not not-check-coding-system)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
61 (Assert (string=
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
62 str2
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
63 (decode-coding-string
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
64 string 'ccl-test-coding-system))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
65 str2))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
66
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
67 (defvar ccl-test-symbol-idx 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
68 (defun ccl-test-generate-symbol (idx)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
69 (intern (format "ccl-test-map-sym-%d" idx)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
70
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
71 (defun ccl-test-construct-map-structure (maps &optional idx)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
72 (setq ccl-test-symbol-idx (if idx idx 0))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
73 (let (map result sym)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
74 (while maps
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
75 (setq map (car maps)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
76 maps (cdr maps))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
77 (cond ((vectorp map)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
78 (setq sym (ccl-test-generate-symbol
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
79 ccl-test-symbol-idx)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
80 ccl-test-symbol-idx
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
81 (1+ ccl-test-symbol-idx))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
82 (register-code-conversion-map
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
83 sym map)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
84 (set sym map)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
85 (setq result (cons sym result)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
86
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
87 ((symbolp map)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
88 (setq result (cons sym result)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
89
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
90 ((consp map)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
91 (setq result
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
92 (cons (ccl-test-construct-map-structure
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
93 map ccl-test-symbol-idx)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
94 result)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
95 (t
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
96 (error "Unknown data:%S" map))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
97 (nreverse result)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
98
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
99 (defun ccl-test-map-multiple (val maps)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
100 (ccl-test
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
101 `(0 ((map-multiple
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
102 r1 r0
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
103 ,(ccl-test-construct-map-structure maps))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
104 (list val))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
105 (cons (aref ccl-test-last-register-state 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
106 (aref ccl-test-last-register-state 1)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
107
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
108 (defun ccl-test-iterate-multiple-map (val maps)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
109 (ccl-test
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
110 `(0 ((iterate-multiple-map
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
111 r1 r0
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
112 ,@(ccl-test-construct-map-structure maps))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
113 (list val))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
114 (cons (aref ccl-test-last-register-state 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
115 (aref ccl-test-last-register-state 1)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
116
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
117 (defun ccl-test-setup ()
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
118 (define-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
119 ccl-test-decoder
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
120 '(1 (read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
121 (loop
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
122 (write-read-repeat r0))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
123 (define-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
124 ccl-test-encoder
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
125 '(1 (read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
126 (loop
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
127 (write-read-repeat r0))))
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
128 (or (find-coding-system 'ccl-test-coding-system)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
129 (make-coding-system
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
130 'ccl-test-coding-system
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
131 'ccl
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
132 "CCL TEST temprary coding-system."
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
133 '(mnemonic "CCL-TEST"
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
134 eol-type lf
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
135 decode ccl-test-decoder
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 444
diff changeset
136 encode ccl-test-encoder))))
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
137
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
138 ;;; Section 1. arithmetic operations.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
139
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
140 (defun ccl-test-normal-expr ()
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
141 ;; normal-expr
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
142 (let ((r0 0) (r1 10) (r2 20) (r3 21) (r4 7))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
143 (Assert (= (ccl-test '(0 ((r0 = ((((r1 * r2) + r3) % r4) << 2))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
144 (list r0 r1 r2 r3 r4))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
145 (ash (% (+ (* r1 r2) r3) r4) 2))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
146
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
147 (Assert (\= (ccl-test '(0 ((r2 = (r1 < 10))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
148 (r0 = (r2 > 10))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
149 '(0 5))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
150 0))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
151
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
152 (let ((r0 0) (r1 #x10FF) (r2 #xCC) (r3 #xE0))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
153 (Assert (= (ccl-test '(0 ((r0 = (((r1 & #xFF) ^ r2) | r3))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
154 (list r0 r1 r2 r3))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
155 (logior (logxor (logand r1 #xFF) r2) r3))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
156
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
157 ;; checking range of SJIS
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
158 ;; 81(40-7E, 80-FC), 82, 9F, E0, E1, EF
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
159
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
160 (let ((hs '(#x81 #x82 #x9F #xE0 #xE1 #xEF))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
161 func high low)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
162 (setq func
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
163 (lambda (high low)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
164 (let (ch c1 c2)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
165 (setq ch (split-char (decode-shift-jis-char
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
166 (cons high low))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
167 (setq c1 (nth 1 ch)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
168 c2 (nth 2 ch))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
169 (ccl-test '(0 ((r0 = (r1 de-sjis r2))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
170 (list 0 high low))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
171 (Assert (and (= c1 (aref ccl-test-last-register-state 0))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
172 (= c2 (aref ccl-test-last-register-state 7))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
173 (ccl-test '(0 ((r0 = (r1 en-sjis r2))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
174 (list 0 c1 c2))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
175 (Assert (and (= high (aref ccl-test-last-register-state 0))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
176 (= low (aref ccl-test-last-register-state 7)))))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
177 (while (setq high (car hs))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
178 (setq hs (cdr hs))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
179 (setq low #x40)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
180 (while (<= low #x7E)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
181 (funcall func high low)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
182 (setq low (1+ low)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
183 (setq low #x80)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
184 (while (<= low #xFC)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
185 (funcall func high low)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
186 (setq low (1+ low)))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
187
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
188 ;; self-expr
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
189 (Assert (= (ccl-test '(0 ((r0 += 20)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
190 (r0 *= 40)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
191 (r0 -= 15)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
192 '(100))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
193 (- (* (+ 100 20) 40) 15)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
194
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
195 ;; ref. array
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
196 (Assert (= (ccl-test '(0 ((r0 = r0 [100 101 102 103 104])))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
197 '(3))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
198 103)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
199
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
200 ;;; Section 2. Simple read and write
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
201 (defun ccl-test-simple-read-and-write ()
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
202 ;; constant
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
203 (let* ((str "1234567890abcdefghij")
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
204 (dum (make-string 1 ?X)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
205 (Assert
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
206 (string= (ccl-test-on-stream
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
207 `(,(length str)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
208 ((loop (read r0) (write ,str)))) dum)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
209 str)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
210 ;; register
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
211 (let* ((str "1234567890abcdefghij"))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
212 (Assert
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
213 (string= (ccl-test-on-stream `(1 ((read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
214 (loop
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
215 (write r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
216 (read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
217 (repeat))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
218 str)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
219 str))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
220 (Assert
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
221 (string= (ccl-test-on-stream `(1 ((read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
222 (loop
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
223 (write-read-repeat r0))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
224 str)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
225 str)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
226
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
227 ;; expression
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
228 (let ((str "1234567890abcdefghij")
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
229 str2 i len)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
230 (setq str2 ""
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
231 len (length str)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
232 i 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
233 (while (< i len)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
234 (setq str2 (concat str2 (char-to-string
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
235 (+ (char-to-int (aref str i)) 3))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
236 (setq i (1+ i)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
237 (Assert
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
238 (string= (ccl-test-on-stream `(1 ((read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
239 (loop
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
240 (write (r0 + 3))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
241 (read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
242 (repeat))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
243 str)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
244 str2))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
245 (Assert
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
246 (string= (ccl-test-on-stream `(1 ((read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
247 (loop
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
248 (r0 += 3)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
249 (write-read-repeat r0))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
250 str)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
251 str2)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
252
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
253
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
254 ;; write via array
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
255 (let* ((str (mapconcat (lambda (x) (char-to-string (int-to-char x)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
256 '(0 1 2 3 4 5 6) "")))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
257 (Assert
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
258 (string= (ccl-test-on-stream
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
259 `(1 ((read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
260 (loop
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
261 (write r0
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
262 ,(vector (make-char 'japanese-jisx0208 36 34)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
263 (make-char 'japanese-jisx0208 36 36)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
264 (make-char 'japanese-jisx0208 36 38)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
265 (make-char 'japanese-jisx0208 36 40)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
266 (make-char 'japanese-jisx0208 36 42)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
267 (make-char 'japanese-jisx0208 36 43)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
268 (make-char 'japanese-jisx0208 36 45)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
269 (make-char 'japanese-jisx0208 36 47)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
270 (make-char 'japanese-jisx0208 36 49)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
271 (make-char 'japanese-jisx0208 36 51)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
272 (read r0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
273 (repeat))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
274 str t)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
275 (mapconcat #'char-to-string
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
276 (list (make-char 'japanese-jisx0208 36 34)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
277 (make-char 'japanese-jisx0208 36 36)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
278 (make-char 'japanese-jisx0208 36 38)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
279 (make-char 'japanese-jisx0208 36 40)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
280 (make-char 'japanese-jisx0208 36 42)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
281 (make-char 'japanese-jisx0208 36 43)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
282 (make-char 'japanese-jisx0208 36 45))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
283 "")))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
284
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
285 ;;; Section 3. read-multibyte-character, and write-multibyte-character
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
286 (defun ccl-test-read-write-multibyte-character ()
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
287 ;; simple test.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
288 (let* ((str (concat "LMDXXX..."
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
289 (mapconcat #'char-to-string
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
290 (list (make-char 'japanese-jisx0208 36 36)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
291 (make-char 'japanese-jisx0208 36 36)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
292 (make-char 'japanese-jisx0208 50 67)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
293 (make-char 'japanese-jisx0208 56 58)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
294 (make-char 'japanese-jisx0208 72 104)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
295 (make-char 'japanese-jisx0208 36 108)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
296 (make-char 'japanese-jisx0208 36 70)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
297 (make-char 'japanese-jisx0208 36 45)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
298 (make-char 'japanese-jisx0208 36 63)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
299 (make-char 'japanese-jisx0208 33 35))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
300 "")
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
301 "...")))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
302 (Assert
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
303 (string=
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
304 (ccl-test-on-stream
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
305 `(1 ((loop
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
306 (read-multibyte-character r0 r1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
307 (write-multibyte-character r0 r1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
308 (repeat))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
309 str t)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
310 str)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
311 ;;
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
312 )
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
313
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
314 ;;; Section 4. CCL call
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
315 (defun ccl-test-ccl-call ()
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
316 ;; set up
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
317 (define-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
318 ccl-test-sub1
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
319 '(0
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
320 ((r5 = ?z))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
321 (define-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
322 ccl-test-sub2
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
323 '(0
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
324 ((call ccl-test-sub1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
325 (r0 = (r5 * 20)))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
326 (define-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
327 ccl-test-sub3
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
328 '(1
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
329 ((call ccl-test-sub2)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
330 (write r5)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
331 (write (r0 / 20)))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
332 (Assert (string=
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
333 (ccl-test-on-stream
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
334 '(1 ((loop (read r0) (call ccl-test-sub3))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
335 "A")
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
336 "zz")))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
337
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
338 ;;; Section 5. Map-instructions
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
339 (defun ccl-test-map-instructions ()
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
340 ;; set up
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
341 (define-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
342 ccl-test-arith-1
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
343 '(0
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
344 ((r0 += 1000000))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
345
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
346 (define-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
347 ccl-test-lambda
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
348 '(0
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
349 ((r0 = -3))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
350
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
351 (define-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
352 ccl-test-t
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
353 '(0
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
354 ((r0 = -2))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
355
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
356 (define-ccl-program
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
357 ccl-test-nil
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
358 '(0
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
359 ((r0 = -1))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
360
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
361 ;; 1-level normal 1 mapping
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
362 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
363 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
364 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
365 (ccl-test-map-multiple
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
366 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
367 '([100 1 2 3 4 5])))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
368 '(0 99 100 101 102 103 104 105 106 107))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
369 '((0 . -1) (99 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
370 (1 . 0) (2 . 0) (3 . 0) (4 . 0) (5 . 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
371 (105 . -1) (106 . -1) (107 . -1))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
372
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
373 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
374 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
375 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
376 (ccl-test-iterate-multiple-map
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
377 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
378 '([100 1 2 3 4 5])))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
379 '(0 99 100 101 102 103 104 105 106 107))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
380 '((0 . -1) (99 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
381 (1 . 0) (2 . 0) (3 . 0) (4 . 0) (5 . 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
382 (105 . -1) (106 . -1) (107 . -1))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
383
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
384 ;; 1-level normal 2 mappings
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
385 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
386 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
387 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
388 (ccl-test-map-multiple
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
389 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
390 '([100 1 2 nil 4 5]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
391 [101 12 13 14 15 16 17])))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
392 '(0 99 100 101 102 103 104 105 106 107))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
393 '((0 . -1) (99 . -1) (1 . 0) (2 . 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
394 (13 . 1) (4 . 0) (5 . 0) (16 . 1) (17 . 1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
395 (107 . -1))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
396
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
397 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
398 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
399 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
400 (ccl-test-iterate-multiple-map
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
401 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
402 '([100 1 2 3 4 5]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
403 [101 12 13 14 15 16 17])))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
404 '(0 99 100 101 102 103 104 105 106 107))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
405 '((0 . -1) (99 . -1) (1 . 0) (2 . 0) (3 . 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
406 (4 . 0) (5 . 0) (16 . 1) (17 . 1) (107 . -1))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
407
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
408
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
409 ;; 1-level normal 7 mappings
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
410 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
411 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
412 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
413 (ccl-test-map-multiple
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
414 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
415 '([100 1 2 nil 4 5]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
416 [101 12 13 14 15 16 17]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
417 [1000 101 102 103 nil 105 106 nil 108]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
418 [1005 1006 1007 1008 1009 1010 1011 1012]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
419 [10005 10006 10007 10008 10009 10010 10011 10012]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
420 [20000 20000 20001 20002 nil 20004 20005 20006]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
421 [20003 30000 30010 30020 30030 30040 30050 30060]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
422 )))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
423 '(0 99 100 101 102 103 104 105 106 107
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
424 998 999 1000 1001 1002 1003 1004 1005 1006 1007
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
425 9999 10000 10001 10002 10003 10004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
426 19999 20000 20001 20002 20003 20004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
427 20005 20006))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
428 '((0 . -1) (99 . -1) (1 . 0) (2 . 0) (13 . 1) (4 . 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
429 (5 . 0) (16 . 1) (17 . 1) (107 . -1) (998 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
430 (999 . -1) (101 . 2) (102 . 2) (103 . 2) (1003 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
431 (105 . 2) (106 . 2) (1007 . 3) (108 . 2) (9999 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
432 (10000 . -1) (10001 . -1) (10002 . -1) (10003 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
433 (10004 . -1) (19999 . -1) (20000 . 5) (20001 . 5)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
434 (20002 . 5) (30000 . 6) (20004 . 5) (20005 . 5) (20006 . 5))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
435
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
436 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
437 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
438 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
439 (ccl-test-iterate-multiple-map
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
440 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
441 '([100 1 2 nil 4 5]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
442 [101 12 13 14 15 16 17]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
443 [1000 101 102 103 nil 105 106 nil 108]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
444 [1005 1006 1007 1008 1009 1010 1011 1012]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
445 [10005 10006 10007 10008 10009 10010 10011 10012]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
446 [20000 20000 20001 20002 nil 20004 20005 20006]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
447 [20003 30000 30010 30020 30030 30040 30050 30060]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
448 )))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
449 '(0 99 100 101 102 103 104 105 106 107
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
450 998 999 1000 1001 1002 1003 1004 1005 1006 1007
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
451 9999 10000 10001 10002 10003 10004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
452 19999 20000 20001 20002 20003 20004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
453 20005 20006))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
454 '((0 . -1) (99 . -1) (1 . 0) (2 . 0) (13 . 1) (4 . 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
455 (5 . 0) (16 . 1) (17 . 1) (107 . -1) (998 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
456 (999 . -1) (101 . 2) (102 . 2) (103 . 2) (1003 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
457 (105 . 2) (106 . 2) (1007 . 3) (108 . 2) (9999 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
458 (10000 . -1) (10001 . -1) (10002 . -1) (10003 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
459 (10004 . -1) (19999 . -1) (20000 . 5) (20001 . 5)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
460 (20002 . 5)(30000 . 6)(20004 . 5)(20005 . 5)(20006 . 5))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
461
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
462 ;; 1-level 7 mappings including CCL call
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
463
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
464 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
465 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
466 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
467 (ccl-test-map-multiple
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
468 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
469 '([100 1 2 nil 4 5]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
470 [101 12 13 14 15 16 17]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
471 [1000 101 ccl-test-arith-1 103 nil 105 106 ccl-test-nil 108]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
472 [1005 1006 1007 1008 1009 ccl-test-lambda 1011 1012]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
473 [10005 10006 10007 10008 10009 10010 10011 10012]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
474 [20000 20000 20001 20002 nil 20004 20005 20006]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
475 [20003 30000 30010 30020 30030 30040 30050 30060]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
476 )))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
477 '(0 99 100 101 102 103 104 105 106 107
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
478 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
479 9999 10000 10001 10002 10003 10004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
480 19999 20000 20001 20002 20003 20004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
481 20005 20006))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
482 '((0 . -1) (99 . -1) (1 . 0) (2 . 0) (13 . 1) (4 . 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
483 (5 . 0) (16 . 1) (17 . 1) (107 . -1) (998 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
484 (999 . -1) (101 . 2) (1001001 . 2) (103 . 2)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
485 (1003 . -1) (105 . 2) (106 . 2) (1007 . 3) (108 . 2)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
486 (1009 . 3) (1009 . 3) (9999 . -1) (10000 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
487 (10001 . -1) (10002 . -1) (10003 . -1) (10004 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
488 (19999 . -1) (20000 . 5) (20001 . 5) (20002 . 5)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
489 (30000 . 6)(20004 . 5)(20005 . 5)(20006 . 5))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
490
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
491 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
492 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
493 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
494 (ccl-test-iterate-multiple-map
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
495 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
496 '([100 1 2 nil 4 5]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
497 [101 12 13 14 15 16 17]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
498 [1000 101 ccl-test-arith-1 103 nil 105 106 ccl-test-nil 108]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
499 [1005 1006 1007 1008 1009 ccl-test-lambda 1011 1012]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
500 [10005 10006 10007 10008 10009 10010 10011 10012]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
501 [20000 20000 20001 20002 nil 20004 20005 20006]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
502 [20003 30000 30010 30020 30030 30040 30050 30060]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
503 )))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
504 '(0 99 100 101 102 103 104 105 106 107
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
505 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
506 9999 10000 10001 10002 10003 10004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
507 19999 20000 20001 20002 20003 20004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
508 20005 20006))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
509 '((0 . -1) (99 . -1) (1 . 0) (2 . 0) (13 . 1) (4 . 0)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
510 (5 . 0) (16 . 1) (17 . 1) (107 . -1) (998 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
511 (999 . -1) (101 . 2) (1001001 . 0) (103 . 2)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
512 (1003 . -1) (105 . 2) (106 . 2) (-1 . 0) (108 . 2)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
513 (1009 . 3) (-3 . 0) (9999 . -1) (10000 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
514 (10001 . -1) (10002 . -1) (10003 . -1) (10004 . -1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
515 (19999 . -1) (20000 . 5) (20001 . 5) (20002 . 5)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
516 (30000 . 6) (20004 . 5) (20005 . 5) (20006 . 5))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
517
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
518 ;; 3-level mappings
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
519 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
520 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
521 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
522 (ccl-test-map-multiple
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
523 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
524 '([100 1 2 nil 4 5]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
525 [101 12 13 14 15 16 17]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
526 [1000 101 102 103 nil 105 106 nil 108]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
527 (([1005 1006 1007 1008 1009 1010 1011 1012]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
528 [10005 10006 20007 20008 10009 10010 10011 10012])
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
529 [20000 20000 20001 20002 nil 20004 20005 20006]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
530 [1006 2006 2007 2008 2009 2010]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
531 ([20003 30000 30010 30020 30030 30040 30050 30060]))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
532 [t t 0 1000000]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
533 [1008 1108 1109 1110 1111 1112 1113])))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
534 '(0 99 100 101 102 103 104 105 106 107
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
535 998 999 1000 1001 1002 1003 1004 1005 1006 1007
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
536 1008 1009 1010 1011 1012 1013 1014
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
537 9999 10000 10001 10002 10003 10004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
538 10005 10006 10007 10008 10009 10010
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
539 19999 20000 20001 20002 20003 20004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
540 20005 20006))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
541 '((0 . 11) (99 . 11) (1 . 0) (2 . 0) (13 . 1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
542 (4 . 0) (5 . 0) (16 . 1) (17 . 1) (107 . 11)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
543 (998 . 11) (999 . 11) (101 . 2) (102 . 2)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
544 (103 . 2) (1003 . 11) (105 . 2) (106 . 2)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
545 (1006 . 11) (108 . 2) (1108 . 12) (1109 . 12)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
546 (1110 . 12) (1111 . 12) (1112 . 12) (1113 . 12)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
547 (1014 . 11) (9999 . 11) (10000 . 11) (10001 . 11)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
548 (10002 . 11) (10003 . 11) (10004 . 11) (10005 . 11)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
549 (30040 . 10) (30050 . 10) (10008 . 11) (10009 . 11)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
550 (10010 . 11) (19999 . 11) (20000 . 11) (20001 . 11)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
551 (20002 . 11) (20003 . 11) (20004 . 11) (20005 . 11)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
552 (20006 . 11))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
553
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
554
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
555 ;; 3-level mappings including CCL call
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
556 (Assert (equal
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
557 (mapcar
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
558 (lambda (val)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
559 (ccl-test-map-multiple
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
560 val
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
561 '([100 1 2 nil 4 5]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
562 [101 12 13 14 15 16 17]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
563 [1000 101 102 103 nil ccl-test-arith-1 106 nil 108]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
564 (([1005 1006 1007 1008 1009 1010 1011 ccl-test-arith-1
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
565 70 71 72 73]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
566 [10005 10006 20007 20008 10009 10010 10011 10012])
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
567 [70 ccl-test-t ccl-test-lambda ccl-test-nil ccl-test-nil]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
568 [72 lambda]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
569 [20000 20000 20001 20002 nil 20004 20005 20006]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
570 [1006 2006 2007 2008 2009 2010]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
571 ([20003 30000 30010 ccl-test-arith-1 30030 30040
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
572 ccl-test-arith-1 30060]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
573 [1001010 50 51 52 53 54 55]))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
574 [t t 0 1000000]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
575 [t ccl-test-arith-1 0 10]
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
576 [1008 1108 1109 1110 1111 1112 1113])))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
577 '(0 99 100 101 102 103 104 105 106 107
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
578 998 999 1000 1001 1002 1003 1004 1005 1006 1007
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
579 1008 1009 1010 1011 1012 1013 1014 1015 1016
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
580 9999 10000 10001 10002 10003 10004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
581 10005 10006 10007 10008 10009 10010
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
582 19999 20000 20001 20002 20003 20004
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
583 20005 20006))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
584 '((1000000 . 15) (99 . 14) (1 . 0) (2 . 0) (13 . 1)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
585 (4 . 0) (5 . 0) (16 . 1) (17 . 1) (107 . 14) (998 . 14)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
586 (999 . 14) (101 . 2) (102 . 2) (103 . 2) (1003 . 14)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
587 (1001004 . 2) (106 . 2) (1006 . 14) (108 . 2) (1108 . 16)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
588 (1109 . 16) (1110 . 16) (51 . 13) (1112 . 16) (71 . 7)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
589 (72 . 8) (1015 . 14) (1016 . 14) (9999 . 14) (10000 . 14)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
590 (10001 . 14) (10002 . 14) (10003 . 14) (10004 . 14)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
591 (10005 . 14) (30040 . 12) (1020008 . 12) (10008 . 14)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
592 (10009 . 14) (10010 . 14) (19999 . 14) (20000 . 14)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
593 (20001 . 14) (20002 . 14) (20003 . 14) (20004 . 14)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
594 (20005 . 14) (20006 . 14))))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
595 ;; All map-instruction tests ends here.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
596 )
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
597
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
598 (defun ccl-test-suites ()
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
599 (ccl-test-setup)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
600 (ccl-test-normal-expr)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
601 (ccl-test-simple-read-and-write)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
602 (ccl-test-read-write-multibyte-character)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
603 (ccl-test-ccl-call)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
604 (ccl-test-map-instructions))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
605
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
606 ;;; start tests only when ccl-execute is enabled.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
607 (if (fboundp 'ccl-execute)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
608 (ccl-test-suites))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
609
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents:
diff changeset
610 ;;; ccl-test.el ends here.