X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fdump.impure-cload.lisp;h=a19094fca4e08ab91fa380492269c068056c551a;hb=2d10bc4b0d8557a5c553d13a3d520c40b48414db;hp=393e285953d5725f2ef66ed119c7f0065c6e90e5;hpb=27597523f06f6819f6bda1765e86ec4d58018dc2;p=sbcl.git diff --git a/tests/dump.impure-cload.lisp b/tests/dump.impure-cload.lisp index 393e285..a19094f 100644 --- a/tests/dump.impure-cload.lisp +++ b/tests/dump.impure-cload.lisp @@ -6,7 +6,7 @@ ;;;; While most of SBCL is derived from the CMU CL system, the test ;;;; files (like this one) were written from scratch after the fork ;;;; from CMU CL. -;;;; +;;;; ;;;; This software is in the public domain and is provided with ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. @@ -41,7 +41,7 @@ ;; an extremely meaningless MAKE-LOAD-FORM method whose only point ;; is to exercise the mechanism a little bit (values `(make-foo :x (list ',(foo-x foo))) - `(setf (foo-y ,foo) ',foo)))) + `(setf (foo-y ,foo) ',foo)))) (defparameter *foo* #.(make-foo :x "X" :y "Y")) @@ -55,7 +55,7 @@ ;;; symbol involves dumping a reference to the name of its package). (eval-when (:compile-toplevel :load-toplevel :execute) (setf (logical-pathname-translations "MY-LOGICAL-HOST") - (list '("**;*.*.*" "/tmp/*.*")))) + (list '("**;*.*.*" "/tmp/*.*")))) (defparameter *path* #p"MY-LOGICAL-HOST:FOO;BAR.LISP") @@ -63,8 +63,8 @@ ;;; their complex attributes. (defparameter *string* #.(make-array 3 :initial-element #\a - :fill-pointer 2 - :element-type 'character)) + :fill-pointer 2 + :element-type 'character)) ;;; SBCL 0.7.8 incorrectly read high bits of (COMPLEX DOUBLE-FLOAT) ;;; components as unsigned bytes. @@ -98,4 +98,28 @@ (defvar *2-bit* #.(make-array 5 :element-type '(unsigned-byte 2) :initial-element 0)) (defvar *4-bit* #.(make-array 5 :element-type '(unsigned-byte 4) :initial-element 1)) -(sb-ext:quit :unix-status 104) ; success +;;; tests for constant coalescing (and absence of such) in the +;;; presence of strings. +(progn + (defvar *character-string-1* #.(make-string 5 :initial-element #\a)) + (defvar *character-string-2* #.(make-string 5 :initial-element #\a)) + (assert (eq *character-string-1* *character-string-2*)) + (assert (typep *character-string-1* '(simple-array character (5))))) + +(progn + (defvar *base-string-1* + #.(make-string 5 :initial-element #\b :element-type 'base-char)) + (defvar *base-string-2* + #.(make-string 5 :initial-element #\b :element-type 'base-char)) + (assert (eq *base-string-1* *base-string-2*)) + (assert (typep *base-string-1* '(simple-base-string 5)))) + +#-#.(cl:if (cl:subtypep 'cl:character 'cl:base-char) '(and) '(or)) +(progn + (defvar *base-string* + #.(make-string 5 :element-type 'base-char :initial-element #\x)) + (defvar *character-string* + #.(make-string 5 :initial-element #\x)) + (assert (not (eq *base-string* *character-string*))) + (assert (typep *base-string* 'base-string)) + (assert (typep *character-string* '(vector character))))