Ignore:
Timestamp:
Sep 30, 2010, 8:00:08 PM (9 years ago)
Author:
gz
Message:

Add test for defstruct warnings at safety 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ansi-tests/ccl.lsp

    r14246 r14314  
    895895  ())
    896896
    897 (defun test-compiler-warning (text)
     897(defun test-compiler-warning (text &key (safety 1))
    898898  (let ((warnings nil))
    899899    (handler-bind ((ccl::compiler-warning (lambda (c)
    900900                                            (push (ccl::compiler-warning-warning-type c) warnings)
    901901                                            (muffle-warning c))))
    902       (test-compile (test-source-file "~a" text) :hide-warnings t :break-on-program-errors nil))
     902      (test-compile (test-source-file "~a" text) :hide-warnings t :break-on-program-errors nil :safety safety))
    903903    (nreverse warnings)))
    904904 
     
    986986
    987987                            (deftype ccl.57879-6-type () 'null)")
     988  ())
     989
     990;; Same as above, but at safety 3.
     991(deftest ccl.86893
     992    (test-compiler-warning "(defstruct ccl.86893-struct (slot nil :type (or null ccl.86893-type)))
     993                            (defun ccl.86893-fn (x) (ccl.86893-struct-slot x))
     994
     995                            (deftype ccl.86893-type () 'null)"
     996                           :safety 3)
    988997  ())
    989998
Note: See TracChangeset for help on using the changeset viewer.