source: branches/0.22.x/abcl/test/lisp/abcl/misc-tests.lisp

Last change on this file was 12402, checked in by Mark Evenson, 15 years ago

Move abcl-test-lisp to ASDF packaging.

Change to ASDF packaging of abcl-test-lisp. Remove ASDF system
'abcl-tests' as ASDF systems without components don't carry
dependencies transitively. Remove unneed :BEFORE load of
abcl-test-lisp. Renamed conflicting tests now that they are loaded via
ASDF.

Implement ability to run tests matching a string. Export
ABCL.TEST.LISP::RUN-MATCHING as external symbol.

Added 'test/lisp/abcl/math-tests.lisp' back to ABCL.TEST.LISP, fixing
errors that prevented it from working.

Fix bug with directories specified to three-arg form of SYS:ZIP. JAR
files always use '/' to name hierarchial entries. Allow of a top
directory for creating hierarchially ZIPs: for arguments like
"pathname pathnames &optional topdir" all pathnames will be
interpolated relative to topdir.

Contains the version of jar-file tests corresponding to PATHNAME,
TRUENAME, and PROBE-FILE. The tests for jar-file will currently fail
as it needs the implementation of SYS:UNZIP which in turn depends on
the new version of Pathname which should follow shortly in a separate
commit.

jar-file initilization rewritten in Lisp, so it works under Windows.

Java tests for Pathname and Stream.

Help my dyslexic brain by renaming
*abcl-{lisp-test,test,lisp}-directory* to *abcl-test-directory*.

Refinement of jar-file tests. Correct all JAR-FILE.PATHNAME.* tests.
JAR-FILE tests use the cross-platform form of COPY-FILE. Renamed test,
using WITH-JAR-FILE-INIT macro.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1;;; misc-tests.lisp
2;;;
3;;; Copyright (C) 2005 Peter Graves
4;;; $Id: misc-tests.lisp 12402 2010-01-26 11:15:48Z mevenson $
5;;;
6;;; This program is free software; you can redistribute it and/or
7;;; modify it under the terms of the GNU General Public License
8;;; as published by the Free Software Foundation; either version 2
9;;; of the License, or (at your option) any later version.
10;;;
11;;; This program is distributed in the hope that it will be useful,
12;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with this program; if not, write to the Free Software
18;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
20(in-package #:abcl.test.lisp)
21
22(deftest misc.dotimes.1
23  (progn
24    (fmakunbound 'misc.dotimes.1)
25    (defun misc.dotimes.1 ()
26      (let ((sum 0)) (dotimes (i 10) (setq i 42) (incf sum i)) sum))
27    (misc.dotimes.1))
28  420)
29
30(deftest dotimes.1.compiled
31  (progn
32    (fmakunbound 'dotimes.1.compiled)
33    (defun dotimes.1.compiled ()
34      (let ((sum 0)) (dotimes (i 10) (setq i 42) (incf sum i)) sum))
35    (compile 'dotimes.1.compiled)
36    (dotimes.1.compiled))
37  420)
38
39(deftest misc.dotimes.2
40  (progn
41    (fmakunbound 'misc.dotimes.2)
42    (defun misc.dotimes.2 (count)
43      (let ((sum 0)) (dotimes (i count) (setq i 42) (incf sum i)) sum))
44    (misc.dotimes.2 10))
45  420)
46
47(deftest dotimes.2.compiled
48  (progn
49    (fmakunbound 'dotimes.2.compiled)
50    (defun dotimes.2.compiled (count)
51      (let ((sum 0)) (dotimes (i count) (setq i 42) (incf sum i)) sum))
52    (compile 'dotimes.2.compiled)
53    (dotimes.2.compiled 10))
54  420)
55
56(deftest funcall.1
57  (funcall
58   (compile nil (lambda (a b c d e f) (list a b c d e f)))
59   1 2 3 4 5 6)
60  (1 2 3 4 5 6))
61
62(deftest funcall.2
63  (funcall
64   (compile nil (lambda (a b c d e f g) (list a b c d e f g )))
65   1 2 3 4 5 6 7)
66  (1 2 3 4 5 6 7))
67
68(deftest funcall.3
69  (funcall
70   (compile nil (lambda (a b c d e f g h) (list a b c d e f g h)))
71   1 2 3 4 5 6 7 8)
72  (1 2 3 4 5 6 7 8))
73
74(deftest funcall.4
75  (funcall
76   (compile nil (lambda (a b c d e f g h i) (list a b c d e f g h i)))
77   1 2 3 4 5 6 7 8 9)
78  (1 2 3 4 5 6 7 8 9))
79
80(deftest funcall.5
81  (funcall
82   (compile nil (lambda (a b c d e f g h i j) (list a b c d e f g h i j)))
83   1 2 3 4 5 6 7 8 9 10)
84  (1 2 3 4 5 6 7 8 9 10))
85
86(deftest copy-list.1
87  (eq (copy-list nil) nil)
88  t)
89
90(deftest read-from-string.1
91  (read-from-string "(1 2 #-abcl #k(3 4))")
92  (1 2)
93  20)
94
95(deftest read-from-string.2
96  (read-from-string "(1 2 #+nil #k(3 4))")
97  (1 2)
98  19)
Note: See TracBrowser for help on using the repository browser.