X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests.lisp;h=fc950e47ddf2a17d3b1ef979d29061332de9ad8f;hb=3c0c56d3c9f641e1c07534d55db2577287ef885f;hp=aa6ea3b47d404ec812a4f52e761cf00db87d2519;hpb=832ae69f69b7c45a00914f10185a46dc59a23596;p=kmrcl.git diff --git a/tests.lisp b/tests.lisp index aa6ea3b..fc950e4 100644 --- a/tests.lisp +++ b/tests.lisp @@ -1,4 +1,4 @@ -;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Package: kmrcl-tests -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; @@ -7,7 +7,7 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Date Started: Apr 2003 ;;;; -;;;; $Id: tests.lisp,v 1.20 2003/06/25 19:38:26 kevin Exp $ +;;;; $Id$ ;;;; ;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg ;;;; @@ -102,8 +102,10 @@ (deftest css.4 (concat-separated-strings "|" '("ab" "cd") nil) "ab|cd") (deftest css.5 (concat-separated-strings "|" '("ab" "cd") nil '("ef")) "ab|cd|ef") -(deftest f.1 (filter #'(lambda (x) (when (oddp x) (* x x))) +(deftest f.1 (map-and-remove-nils #'(lambda (x) (when (oddp x) (* x x))) '(0 1 2 3 4 5 6 7 8 9)) (1 9 25 49 81)) +(deftest f.2 (filter #'(lambda (x) (when (oddp x) (* x x))) + '(0 1 2 3 4 5 6 7 8 9)) (1 3 5 7 9)) (deftest an.1 (appendnew '(a b c d) '(c c e f)) (a b c d e f)) @@ -178,6 +180,13 @@ (deftest duqs.4 (decode-uri-query-string "abc+d") "abc d") (deftest duqs.5 (decode-uri-query-string "abc%20d") "abc d") +(deftest sse.1 (string-strip-ending "" nil) "") +(deftest sse.2 (string-strip-ending "abc" nil) "abc") +(deftest sse.3 (string-strip-ending "abc" "ab") "abc") +(deftest sse.4 (string-strip-ending "abc" '("ab")) "abc") +(deftest sse.5 (string-strip-ending "abcd" '("a" "cd")) "ab") + + ;;; MOP Testing (eval-when (:compile-toplevel :load-toplevel :execute) @@ -186,13 +195,15 @@ #+kmrtest-mop (progn - (setf (find-class 'credit-rating) nil) (setf (find-class 'monitored-credit-rating) nil) + (setf (find-class 'credit-rating) nil) (defclass credit-rating () ((level :attributes (date-set time-set)) (id :attributes (person-setting))) - (:metaclass attributes-class)) + (:metaclass attributes-class) + #+lispworks (:optimize-slot-access nil) + ) (defclass monitored-credit-rating (credit-rating) ((level :attributes (last-checked interval date-set))