Raymond Toy pushed to branch issue-495-describe-deftypes at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • tests/deftype.lisp
    ... ... @@ -25,8 +25,12 @@
    25 25
     
    
    26 26
     (define-test issue.495.lambda-list
    
    27 27
       (:tag :issues)
    
    28
    -  ;; lambda-list should be empty
    
    29
    -  (assert-false (c::info :type :lambda-list 'issue.495.no-args))
    
    28
    +  ;; lambda-list should be empty.  Make sure the lambda-list is NIL
    
    29
    +  ;; and that it was actually recorded.
    
    30
    +  (multiple-value-bind (result recorded-p)
    
    31
    +      (c::info :type :lambda-list 'issue.495.no-args)
    
    32
    +    (assert-equal nil result)
    
    33
    +    (assert-true recorded-p))
    
    30 34
       ;; lambda-list should match
    
    31 35
       (assert-equal '(&optional low high)
    
    32 36
     		(c::info :type :lambda-list 'issue.495.optional))
    
    ... ... @@ -72,15 +76,10 @@
    72 76
       ;;
    
    73 77
       ;; Create a temp file that contains the deftype.  Compile it and
    
    74 78
       ;; load it into this lisp.
    
    75
    -  (ext:with-temporary-file (temp-file)
    
    76
    -    (with-open-file (s temp-file
    
    77
    -		       :direction :io
    
    78
    -		       :if-exists :supersede
    
    79
    -		       :element-type 'character)
    
    80
    -      (format s "(in-package ~A)~%" (package-name *test-package*))
    
    81
    -      (format s "(deftype issue.495.locn () 'integer)")
    
    82
    -      (file-position s 0)
    
    83
    -      (ext:compile-from-stream s)))
    
    79
    +  (with-input-from-string (s (format nil
    
    80
    +				     "(in-package ~A)~%(deftype issue.495.locn () 'integer)"
    
    81
    +				     (package-name *test-package*)))
    
    82
    +    (ext:compile-from-stream s))
    
    84 83
       ;; The source-location should be stored only in the :deftype, not
    
    85 84
       ;; :defvar.
    
    86 85
       (assert-true (c::info :source-location :deftype 'issue.495.locn))